0.3 features
This commit is contained in:
parent
8bac7851c7
commit
e6f1a0ee3e
@ -7,3 +7,13 @@ initial release
|
|||||||
- BBCode controlled by server host
|
- BBCode controlled by server host
|
||||||
- Spawning requires host
|
- Spawning requires host
|
||||||
- Clear chat button
|
- Clear chat button
|
||||||
|
|
||||||
|
0.2.1
|
||||||
|
----
|
||||||
|
- fix spawning oops
|
||||||
|
|
||||||
|
0.3
|
||||||
|
----
|
||||||
|
- log settings
|
||||||
|
- custom color
|
||||||
|
- server name & join message previews
|
@ -7,12 +7,17 @@ func setup(manager):
|
|||||||
get_node("%lucy_bbcode").pressed = manager.allow_bbcode
|
get_node("%lucy_bbcode").pressed = manager.allow_bbcode
|
||||||
get_node("%lucy_punchback").pressed = manager.do_punchback
|
get_node("%lucy_punchback").pressed = manager.do_punchback
|
||||||
get_node("%lucy_servername").text = manager.custom_server_name
|
get_node("%lucy_servername").text = manager.custom_server_name
|
||||||
|
get_node("%lucy_servername_preview").bbcode_text = manager.custom_server_name + "'s Lobby"
|
||||||
get_node("%lucy_servermsg").text = manager.server_join_message
|
get_node("%lucy_servermsg").text = manager.server_join_message
|
||||||
|
get_node("%lucy_servermsg_preview").bbcode_text = manager.server_join_message
|
||||||
get_node("%lucy_fpackets").value = manager.frame_packets
|
get_node("%lucy_fpackets").value = manager.frame_packets
|
||||||
get_node("%lucy_bpackets").value = manager.bulk_packets
|
get_node("%lucy_bpackets").value = manager.bulk_packets
|
||||||
get_node("%lucy_binterval").value = manager.bulk_interval
|
get_node("%lucy_binterval").value = manager.bulk_interval
|
||||||
get_node("%lucy_finterval").value = manager.full_interval
|
get_node("%lucy_finterval").value = manager.full_interval
|
||||||
|
|
||||||
|
get_node("%lucy_chatcolor_bool").pressed = manager.custom_color_enabled
|
||||||
|
get_node("%lucy_chatcolor").color = Color(manager.custom_color)
|
||||||
|
|
||||||
update()
|
update()
|
||||||
|
|
||||||
func update():
|
func update():
|
||||||
@ -22,10 +27,11 @@ func _ready():
|
|||||||
print("[LUCY] Menu Ready")
|
print("[LUCY] Menu Ready")
|
||||||
|
|
||||||
get_node("%lucy_bbcode").disabled = MANAGER.host_required and not Network.GAME_MASTER
|
get_node("%lucy_bbcode").disabled = MANAGER.host_required and not Network.GAME_MASTER
|
||||||
get_node("%lucy_raincloud").disabled = (MANAGER.host_required and not Network.GAME_MASTER) or not MANAGER.ingame
|
get_node("%lucy_raincloud").disabled = not Network.GAME_MASTER or not MANAGER.ingame
|
||||||
get_node("%lucy_meteor").disabled = (MANAGER.host_required and not Network.GAME_MASTER) or not MANAGER.ingame
|
get_node("%lucy_meteor").disabled = not Network.GAME_MASTER or not MANAGER.ingame
|
||||||
get_node("%lucy_freezerain").disabled = (MANAGER.host_required and not Network.GAME_MASTER) or not MANAGER.ingame
|
get_node("%lucy_freezerain").disabled = not Network.GAME_MASTER or not MANAGER.ingame
|
||||||
get_node("%lucy_clearrain").disabled = (MANAGER.host_required and not Network.GAME_MASTER) or not MANAGER.ingame
|
get_node("%lucy_clearrain").disabled = not Network.GAME_MASTER or not MANAGER.ingame
|
||||||
|
get_node("%lucy_clearmeteor").disabled = not Network.GAME_MASTER or not MANAGER.ingame
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
if event is InputEventKey and event.scancode == KEY_F5 && event.pressed:
|
if event is InputEventKey and event.scancode == KEY_F5 && event.pressed:
|
||||||
@ -45,8 +51,10 @@ func _on_lucy_bbcode_toggled(button_pressed):
|
|||||||
func _on_lucy_punchback_toggled(button_pressed):
|
func _on_lucy_punchback_toggled(button_pressed):
|
||||||
MANAGER.do_punchback = button_pressed
|
MANAGER.do_punchback = button_pressed
|
||||||
func _on_lucy_servername_text_changed(new_text):
|
func _on_lucy_servername_text_changed(new_text):
|
||||||
|
get_node("%lucy_servername_preview").bbcode_text = new_text + "'s Lobby"
|
||||||
MANAGER.custom_server_name = new_text
|
MANAGER.custom_server_name = new_text
|
||||||
func _on_lucy_servermsg_text_changed(new_text):
|
func _on_lucy_servermsg_text_changed(new_text):
|
||||||
|
get_node("%lucy_servermsg_preview").bbcode_text = new_text
|
||||||
MANAGER.server_join_message = new_text
|
MANAGER.server_join_message = new_text
|
||||||
func _on_lucy_fpackets_value_changed(value):
|
func _on_lucy_fpackets_value_changed(value):
|
||||||
MANAGER.frame_packets = value
|
MANAGER.frame_packets = value
|
||||||
@ -56,6 +64,10 @@ func _on_lucy_binterval_value_changed(value):
|
|||||||
MANAGER.bulk_interval = value
|
MANAGER.bulk_interval = value
|
||||||
func _on_lucy_finterval_value_changed(value):
|
func _on_lucy_finterval_value_changed(value):
|
||||||
MANAGER.full_interval = value
|
MANAGER.full_interval = value
|
||||||
|
func _on_lucy_chatcolor_bool_toggled(button_pressed):
|
||||||
|
MANAGER.custom_color_enabled = button_pressed
|
||||||
|
func _on_lucy_chatcolor_color_changed(color):
|
||||||
|
MANAGER.custom_color = color
|
||||||
|
|
||||||
func _on_lucy_raincloud_pressed():
|
func _on_lucy_raincloud_pressed():
|
||||||
if not MANAGER.ingame: return
|
if not MANAGER.ingame: return
|
||||||
@ -67,6 +79,7 @@ func _on_lucy_raincloud_pressed():
|
|||||||
|
|
||||||
func _on_lucy_meteor_pressed():
|
func _on_lucy_meteor_pressed():
|
||||||
if not MANAGER.ingame: return
|
if not MANAGER.ingame: return
|
||||||
|
if get_tree().get_nodes_in_group("meteor").size() > 10: return
|
||||||
print("[LUCY] Spawning meteor")
|
print("[LUCY] Spawning meteor")
|
||||||
var player_pos = MANAGER.get_player().global_transform.origin
|
var player_pos = MANAGER.get_player().global_transform.origin
|
||||||
var dist = INF
|
var dist = INF
|
||||||
@ -98,3 +111,10 @@ func _on_lucy_clearchat_pressed():
|
|||||||
Network.GAMECHAT = ""
|
Network.GAMECHAT = ""
|
||||||
Network.LOCAL_GAMECHAT = ""
|
Network.LOCAL_GAMECHAT = ""
|
||||||
Network.emit_signal("_chat_update")
|
Network.emit_signal("_chat_update")
|
||||||
|
|
||||||
|
func _on_lucy_clearmeteor_pressed():
|
||||||
|
if not MANAGER.ingame or not Network.GAME_MASTER: return
|
||||||
|
print("[LUCY] Clearing meteor")
|
||||||
|
for meteor in get_tree().get_nodes_in_group("meteor"):
|
||||||
|
meteor._deinstantiate(true)
|
||||||
|
|
||||||
|
@ -10,12 +10,13 @@ script = ExtResource( 1 )
|
|||||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
margin_bottom = 71.0
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
||||||
margin_left = 7.0
|
margin_left = 7.0
|
||||||
margin_top = 7.0
|
margin_top = 7.0
|
||||||
margin_right = 793.0
|
margin_right = 793.0
|
||||||
margin_bottom = 322.0
|
margin_bottom = 393.0
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer"]
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer"]
|
||||||
margin_right = 786.0
|
margin_right = 786.0
|
||||||
@ -76,10 +77,15 @@ margin_right = 218.0
|
|||||||
margin_bottom = 14.0
|
margin_bottom = 14.0
|
||||||
text = "No"
|
text = "No"
|
||||||
|
|
||||||
[node name="HFlowContainer4" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
[node name="HSeparator3" type="HSeparator" parent="PanelContainer/VBoxContainer"]
|
||||||
margin_top = 88.0
|
margin_top = 88.0
|
||||||
margin_right = 786.0
|
margin_right = 786.0
|
||||||
margin_bottom = 112.0
|
margin_bottom = 92.0
|
||||||
|
|
||||||
|
[node name="HFlowContainer4" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
|
margin_top = 96.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 120.0
|
||||||
rect_pivot_offset = Vector2( -141, -49 )
|
rect_pivot_offset = Vector2( -141, -49 )
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HFlowContainer4"]
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HFlowContainer4"]
|
||||||
@ -91,15 +97,43 @@ text = "Custom Server Name"
|
|||||||
[node name="lucy_servername" type="LineEdit" parent="PanelContainer/VBoxContainer/HFlowContainer4"]
|
[node name="lucy_servername" type="LineEdit" parent="PanelContainer/VBoxContainer/HFlowContainer4"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
margin_left = 139.0
|
margin_left = 139.0
|
||||||
margin_right = 197.0
|
margin_right = 786.0
|
||||||
margin_bottom = 24.0
|
margin_bottom = 24.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
expand_to_text_length = true
|
expand_to_text_length = true
|
||||||
placeholder_text = "Name"
|
placeholder_text = "Name"
|
||||||
|
|
||||||
[node name="HFlowContainer5" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
[node name="HFlowContainer6" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
margin_top = 116.0
|
margin_top = 124.0
|
||||||
margin_right = 786.0
|
margin_right = 786.0
|
||||||
margin_bottom = 140.0
|
margin_bottom = 138.0
|
||||||
|
rect_pivot_offset = Vector2( -141, -49 )
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HFlowContainer6"]
|
||||||
|
margin_right = 144.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
text = "Server Name Preview: "
|
||||||
|
|
||||||
|
[node name="lucy_servername_preview" type="RichTextLabel" parent="PanelContainer/VBoxContainer/HFlowContainer6"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
margin_left = 148.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
bbcode_text = "'s Lobby"
|
||||||
|
text = "'s Lobby"
|
||||||
|
scroll_active = false
|
||||||
|
|
||||||
|
[node name="HSeparator4" type="HSeparator" parent="PanelContainer/VBoxContainer"]
|
||||||
|
margin_top = 142.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 146.0
|
||||||
|
|
||||||
|
[node name="HFlowContainer5" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
|
margin_top = 150.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 174.0
|
||||||
rect_pivot_offset = Vector2( -141, -49 )
|
rect_pivot_offset = Vector2( -141, -49 )
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HFlowContainer5"]
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HFlowContainer5"]
|
||||||
@ -111,59 +145,119 @@ text = "Server Join Message"
|
|||||||
[node name="lucy_servermsg" type="LineEdit" parent="PanelContainer/VBoxContainer/HFlowContainer5"]
|
[node name="lucy_servermsg" type="LineEdit" parent="PanelContainer/VBoxContainer/HFlowContainer5"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
margin_left = 131.0
|
margin_left = 131.0
|
||||||
margin_right = 189.0
|
margin_right = 786.0
|
||||||
margin_bottom = 24.0
|
margin_bottom = 24.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
expand_to_text_length = true
|
expand_to_text_length = true
|
||||||
placeholder_text = "Message"
|
placeholder_text = "Message"
|
||||||
|
|
||||||
[node name="HFlowContainer2" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
[node name="HFlowContainer7" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
margin_top = 144.0
|
margin_top = 178.0
|
||||||
margin_right = 786.0
|
margin_right = 786.0
|
||||||
margin_bottom = 164.0
|
margin_bottom = 192.0
|
||||||
|
rect_pivot_offset = Vector2( -141, -49 )
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HFlowContainer7"]
|
||||||
|
margin_right = 145.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
text = "Join Message Preview: "
|
||||||
|
|
||||||
|
[node name="lucy_servermsg_preview" type="RichTextLabel" parent="PanelContainer/VBoxContainer/HFlowContainer7"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
margin_left = 149.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
scroll_active = false
|
||||||
|
|
||||||
|
[node name="HSeparator5" type="HSeparator" parent="PanelContainer/VBoxContainer"]
|
||||||
|
margin_top = 196.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 200.0
|
||||||
|
|
||||||
|
[node name="HFlowContainer8" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
|
margin_top = 204.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 228.0
|
||||||
|
rect_pivot_offset = Vector2( -141, -49 )
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HFlowContainer8"]
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = 107.0
|
||||||
|
margin_bottom = 19.0
|
||||||
|
text = "Chat Name Color"
|
||||||
|
|
||||||
|
[node name="lucy_chatcolor_bool" type="CheckBox" parent="PanelContainer/VBoxContainer/HFlowContainer8"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
margin_left = 111.0
|
||||||
|
margin_right = 181.0
|
||||||
|
margin_bottom = 24.0
|
||||||
|
text = "Enable"
|
||||||
|
|
||||||
|
[node name="lucy_chatcolor" type="ColorPickerButton" parent="PanelContainer/VBoxContainer/HFlowContainer8"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
margin_left = 185.0
|
||||||
|
margin_right = 227.0
|
||||||
|
margin_bottom = 24.0
|
||||||
|
rect_min_size = Vector2( 42, 0 )
|
||||||
|
edit_alpha = false
|
||||||
|
|
||||||
|
[node name="HFlowContainer2" type="HFlowContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
|
margin_top = 232.0
|
||||||
|
margin_right = 786.0
|
||||||
|
margin_bottom = 252.0
|
||||||
|
|
||||||
|
[node name="lucy_clearchat" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
||||||
|
margin_right = 76.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
hint_tooltip = "Clears game chat (for you only)"
|
||||||
|
text = "Clear Chat"
|
||||||
|
|
||||||
[node name="lucy_raincloud" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
[node name="lucy_raincloud" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
margin_right = 118.0
|
margin_left = 80.0
|
||||||
|
margin_right = 198.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
text = "Spawn Raincloud"
|
text = "Spawn Raincloud"
|
||||||
|
|
||||||
[node name="lucy_meteor" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
[node name="lucy_meteor" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
margin_left = 122.0
|
margin_left = 202.0
|
||||||
margin_right = 224.0
|
margin_right = 304.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
text = "Spawn Meteor"
|
text = "Spawn Meteor"
|
||||||
|
|
||||||
[node name="lucy_freezerain" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
[node name="lucy_freezerain" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
margin_left = 228.0
|
margin_left = 308.0
|
||||||
margin_right = 314.0
|
margin_right = 394.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
text = "Freeze Rain"
|
text = "Freeze Rain"
|
||||||
|
|
||||||
[node name="lucy_clearrain" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
[node name="lucy_clearrain" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
margin_left = 318.0
|
margin_left = 398.0
|
||||||
margin_right = 393.0
|
margin_right = 473.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
text = "Clear Rain"
|
text = "Clear Rain"
|
||||||
|
|
||||||
[node name="lucy_clearchat" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
[node name="lucy_clearmeteor" type="Button" parent="PanelContainer/VBoxContainer/HFlowContainer2"]
|
||||||
margin_left = 397.0
|
unique_name_in_owner = true
|
||||||
margin_right = 473.0
|
margin_left = 477.0
|
||||||
|
margin_right = 571.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
hint_tooltip = "Clears game chat (for you only)"
|
text = "Clear Meteor"
|
||||||
text = "Clear Chat"
|
|
||||||
|
|
||||||
[node name="HSeparator2" type="HSeparator" parent="PanelContainer/VBoxContainer"]
|
[node name="HSeparator2" type="HSeparator" parent="PanelContainer/VBoxContainer"]
|
||||||
margin_top = 168.0
|
margin_top = 256.0
|
||||||
margin_right = 786.0
|
margin_right = 786.0
|
||||||
margin_bottom = 172.0
|
margin_bottom = 260.0
|
||||||
|
|
||||||
[node name="HSplitContainer" type="HSplitContainer" parent="PanelContainer/VBoxContainer"]
|
[node name="HSplitContainer" type="HSplitContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
margin_top = 176.0
|
margin_top = 264.0
|
||||||
margin_right = 786.0
|
margin_right = 786.0
|
||||||
margin_bottom = 200.0
|
margin_bottom = 288.0
|
||||||
split_offset = 100
|
split_offset = 100
|
||||||
|
|
||||||
[node name="HFlowContainer3" type="HFlowContainer" parent="PanelContainer/VBoxContainer/HSplitContainer"]
|
[node name="HFlowContainer3" type="HFlowContainer" parent="PanelContainer/VBoxContainer/HSplitContainer"]
|
||||||
@ -208,9 +302,9 @@ rounded = true
|
|||||||
allow_greater = true
|
allow_greater = true
|
||||||
|
|
||||||
[node name="HSplitContainer2" type="HSplitContainer" parent="PanelContainer/VBoxContainer"]
|
[node name="HSplitContainer2" type="HSplitContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
margin_top = 204.0
|
margin_top = 292.0
|
||||||
margin_right = 786.0
|
margin_right = 786.0
|
||||||
margin_bottom = 228.0
|
margin_bottom = 316.0
|
||||||
split_offset = 100
|
split_offset = 100
|
||||||
|
|
||||||
[node name="HFlowContainer3" type="HFlowContainer" parent="PanelContainer/VBoxContainer/HSplitContainer2"]
|
[node name="HFlowContainer3" type="HFlowContainer" parent="PanelContainer/VBoxContainer/HSplitContainer2"]
|
||||||
@ -258,11 +352,14 @@ allow_greater = true
|
|||||||
[connection signal="toggled" from="PanelContainer/VBoxContainer/HFlowContainer/lucy_punchback" to="." method="_on_lucy_punchback_toggled"]
|
[connection signal="toggled" from="PanelContainer/VBoxContainer/HFlowContainer/lucy_punchback" to="." method="_on_lucy_punchback_toggled"]
|
||||||
[connection signal="text_changed" from="PanelContainer/VBoxContainer/HFlowContainer4/lucy_servername" to="." method="_on_lucy_servername_text_changed"]
|
[connection signal="text_changed" from="PanelContainer/VBoxContainer/HFlowContainer4/lucy_servername" to="." method="_on_lucy_servername_text_changed"]
|
||||||
[connection signal="text_changed" from="PanelContainer/VBoxContainer/HFlowContainer5/lucy_servermsg" to="." method="_on_lucy_servermsg_text_changed"]
|
[connection signal="text_changed" from="PanelContainer/VBoxContainer/HFlowContainer5/lucy_servermsg" to="." method="_on_lucy_servermsg_text_changed"]
|
||||||
|
[connection signal="toggled" from="PanelContainer/VBoxContainer/HFlowContainer8/lucy_chatcolor_bool" to="." method="_on_lucy_chatcolor_bool_toggled"]
|
||||||
|
[connection signal="color_changed" from="PanelContainer/VBoxContainer/HFlowContainer8/lucy_chatcolor" to="." method="_on_lucy_chatcolor_color_changed"]
|
||||||
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_clearchat" to="." method="_on_lucy_clearchat_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_raincloud" to="." method="_on_lucy_raincloud_pressed"]
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_raincloud" to="." method="_on_lucy_raincloud_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_meteor" to="." method="_on_lucy_meteor_pressed"]
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_meteor" to="." method="_on_lucy_meteor_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_freezerain" to="." method="_on_lucy_freezerain_pressed"]
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_freezerain" to="." method="_on_lucy_freezerain_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_clearrain" to="." method="_on_lucy_clearrain_pressed"]
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_clearrain" to="." method="_on_lucy_clearrain_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_clearchat" to="." method="_on_lucy_clearchat_pressed"]
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/HFlowContainer2/lucy_clearmeteor" to="." method="_on_lucy_clearmeteor_pressed"]
|
||||||
[connection signal="value_changed" from="PanelContainer/VBoxContainer/HSplitContainer/HFlowContainer3/lucy_fpackets" to="." method="_on_lucy_fpackets_value_changed"]
|
[connection signal="value_changed" from="PanelContainer/VBoxContainer/HSplitContainer/HFlowContainer3/lucy_fpackets" to="." method="_on_lucy_fpackets_value_changed"]
|
||||||
[connection signal="value_changed" from="PanelContainer/VBoxContainer/HSplitContainer/HFlowContainer/lucy_bpackets" to="." method="_on_lucy_bpackets_value_changed"]
|
[connection signal="value_changed" from="PanelContainer/VBoxContainer/HSplitContainer/HFlowContainer/lucy_bpackets" to="." method="_on_lucy_bpackets_value_changed"]
|
||||||
[connection signal="value_changed" from="PanelContainer/VBoxContainer/HSplitContainer2/HFlowContainer3/lucy_binterval" to="." method="_on_lucy_binterval_value_changed"]
|
[connection signal="value_changed" from="PanelContainer/VBoxContainer/HSplitContainer2/HFlowContainer3/lucy_binterval" to="." method="_on_lucy_binterval_value_changed"]
|
||||||
|
@ -16,8 +16,13 @@ var bulk_packets = 200 setget set_bulk_packets
|
|||||||
var bulk_interval = 1 setget set_bulk_interval
|
var bulk_interval = 1 setget set_bulk_interval
|
||||||
var full_interval = 5 setget set_full_interval
|
var full_interval = 5 setget set_full_interval
|
||||||
|
|
||||||
|
var custom_color_enabled = false setget set_custom_color_enabled
|
||||||
|
var custom_color = Color("009cd0") setget set_custom_color
|
||||||
|
|
||||||
var srv_allow_bbcode = false setget set_srv_bbcode
|
var srv_allow_bbcode = false setget set_srv_bbcode
|
||||||
|
|
||||||
|
var log_messages = false setget set_log_messages
|
||||||
|
|
||||||
# Patched Network vars
|
# Patched Network vars
|
||||||
# var LUCY_PACKETS_READ = 0
|
# var LUCY_PACKETS_READ = 0
|
||||||
# var LUCY_BULK_FULL_TIMER = 0
|
# var LUCY_BULK_FULL_TIMER = 0
|
||||||
@ -28,9 +33,17 @@ var srv_allow_bbcode = false setget set_srv_bbcode
|
|||||||
# var LUCY_CHAT_BBCODE
|
# var LUCY_CHAT_BBCODE
|
||||||
# var LUCY_SRV_NAME
|
# var LUCY_SRV_NAME
|
||||||
# var LUCY_PUNCHED_ME
|
# var LUCY_PUNCHED_ME
|
||||||
|
# var LUCY_INSTANCE_SENDER
|
||||||
|
# var LUCY_CUSTOM_COLOR_B
|
||||||
|
# var LUCY_CUSTOM_COLOR
|
||||||
|
# var LUCY_LOG_MESSAGES
|
||||||
|
|
||||||
var ingame = false
|
var ingame = false
|
||||||
|
|
||||||
|
func set_log_messages(val):
|
||||||
|
log_messages = val
|
||||||
|
Network.LUCY_LOG_MESSAGES = val
|
||||||
|
|
||||||
func set_punchback(punchback):
|
func set_punchback(punchback):
|
||||||
do_punchback = punchback
|
do_punchback = punchback
|
||||||
func set_bbcode(bbcode):
|
func set_bbcode(bbcode):
|
||||||
@ -60,6 +73,13 @@ func set_full_interval(val):
|
|||||||
full_interval = val
|
full_interval = val
|
||||||
Network.LUCY_BULK_FULL_INTERVAL = val
|
Network.LUCY_BULK_FULL_INTERVAL = val
|
||||||
Network.LUCY_BULK_FULL_TIMER = 0
|
Network.LUCY_BULK_FULL_TIMER = 0
|
||||||
|
func set_custom_color_enabled(val):
|
||||||
|
custom_color_enabled = val
|
||||||
|
Network.LUCY_CUSTOM_COLOR_B = val
|
||||||
|
func set_custom_color(val):
|
||||||
|
custom_color = Color(val)
|
||||||
|
custom_color.a = 1
|
||||||
|
Network.LUCY_CUSTOM_COLOR = Color(custom_color) if Color(custom_color) != Color("d5aa73") else Color("739ed5")
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
print("[LUCY] Loaded LucysTools")
|
print("[LUCY] Loaded LucysTools")
|
||||||
@ -127,6 +147,15 @@ func _on_enter(node: Node):
|
|||||||
self.allow_bbcode = allow_bbcode
|
self.allow_bbcode = allow_bbcode
|
||||||
lucys_menu.setup(self)
|
lucys_menu.setup(self)
|
||||||
|
|
||||||
|
const save_keys = [
|
||||||
|
"do_punchback", "allow_bbcode",
|
||||||
|
"custom_server_name", "server_join_message",
|
||||||
|
"frame_packets", "bulk_packets",
|
||||||
|
"bulk_interval", "full_interval",
|
||||||
|
"custom_color_enabled", "custom_color",
|
||||||
|
"log_messages"
|
||||||
|
]
|
||||||
|
|
||||||
func load_settings():
|
func load_settings():
|
||||||
print("[LUCY] Loading settings")
|
print("[LUCY] Loading settings")
|
||||||
var file = File.new()
|
var file = File.new()
|
||||||
@ -135,29 +164,18 @@ func load_settings():
|
|||||||
file.close()
|
file.close()
|
||||||
var result = parse.result
|
var result = parse.result
|
||||||
# trigger setters
|
# trigger setters
|
||||||
self.do_punchback = result.do_punchback
|
for key in result.keys():
|
||||||
self.allow_bbcode = result.allow_bbcode
|
if key in save_keys: self[key] = result[key]
|
||||||
self.custom_server_name = result.custom_server_name
|
|
||||||
self.server_join_message = result.server_join_message
|
|
||||||
self.frame_packets = result.frame_packets
|
|
||||||
self.bulk_packets = result.bulk_packets
|
|
||||||
self.bulk_interval = result.bulk_interval
|
|
||||||
self.full_interval = result.full_interval
|
|
||||||
self.host_required = result.host_required
|
|
||||||
|
|
||||||
func save_settings():
|
func save_settings():
|
||||||
print("[LUCY] Saving settings")
|
print("[LUCY] Saving settings")
|
||||||
var settings = {
|
|
||||||
"do_punchback": do_punchback,
|
custom_color = Color(custom_color).to_html()
|
||||||
"allow_bbcode": allow_bbcode,
|
|
||||||
"custom_server_name": custom_server_name,
|
var settings = {}
|
||||||
"server_join_message": server_join_message,
|
for key in save_keys:
|
||||||
"frame_packets": frame_packets,
|
settings[key] = self[key]
|
||||||
"bulk_packets": bulk_packets,
|
|
||||||
"bulk_interval": bulk_interval,
|
|
||||||
"full_interval": full_interval,
|
|
||||||
"host_required": host_required
|
|
||||||
}
|
|
||||||
var file = File.new()
|
var file = File.new()
|
||||||
if file.open(OS.get_executable_path().get_base_dir().plus_file("GDWeave/configs/LucysTools.json"),File.WRITE) == OK:
|
if file.open(OS.get_executable_path().get_base_dir().plus_file("GDWeave/configs/LucysTools.json"),File.WRITE) == OK:
|
||||||
file.store_string(JSON.print(settings))
|
file.store_string(JSON.print(settings))
|
||||||
|
@ -158,6 +158,46 @@ public class LucysChatChanges : IScriptMod
|
|||||||
new ConstantToken(new BoolVariant(false)),
|
new ConstantToken(new BoolVariant(false)),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
new CodeChange {
|
||||||
|
name = "custom chat color support",
|
||||||
|
// var final_color = Color(color) * Color(0.95, 0.9, 0.9)
|
||||||
|
// END
|
||||||
|
multitoken_prefix = new Func<Token, bool>[] {
|
||||||
|
t => t.Type == TokenType.PrVar,
|
||||||
|
t => t is IdentifierToken {Name: "final_color"},
|
||||||
|
t => t.Type == TokenType.OpAssign,
|
||||||
|
t => t.Type == TokenType.BuiltInType && t.AssociatedData == (uint)VariantType.Color,
|
||||||
|
t => t.Type == TokenType.ParenthesisOpen,
|
||||||
|
t => t is IdentifierToken {Name: "color"},
|
||||||
|
t => t.Type == TokenType.ParenthesisClose,
|
||||||
|
t => t.Type == TokenType.OpMul,
|
||||||
|
t => t.Type == TokenType.BuiltInType && t.AssociatedData == (uint)VariantType.Color,
|
||||||
|
t => t.Type == TokenType.ParenthesisOpen,
|
||||||
|
t => t is ConstantToken,
|
||||||
|
t => t.Type == TokenType.Comma,
|
||||||
|
t => t is ConstantToken,
|
||||||
|
t => t.Type == TokenType.Comma,
|
||||||
|
t => t is ConstantToken,
|
||||||
|
t => t.Type == TokenType.ParenthesisClose,
|
||||||
|
t => t.Type == TokenType.Newline,
|
||||||
|
},
|
||||||
|
// if Network.LUCY_CUSTOM_COLOR_B: final_color = LUCY_CUSTOM_COLOR
|
||||||
|
// END
|
||||||
|
code_to_add = new Token[] {
|
||||||
|
new Token(TokenType.CfIf),
|
||||||
|
new IdentifierToken("Network"),
|
||||||
|
new Token(TokenType.Period),
|
||||||
|
new IdentifierToken("LUCY_CUSTOM_COLOR_B"),
|
||||||
|
new Token(TokenType.Colon),
|
||||||
|
new IdentifierToken("final_color"),
|
||||||
|
new Token(TokenType.OpAssign),
|
||||||
|
new IdentifierToken("Network"),
|
||||||
|
new Token(TokenType.Period),
|
||||||
|
new IdentifierToken("LUCY_CUSTOM_COLOR"),
|
||||||
|
new Token(TokenType.Newline, 1),
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
IEnumerable<Token> IScriptMod.Modify(string path, IEnumerable<Token> tokens)
|
IEnumerable<Token> IScriptMod.Modify(string path, IEnumerable<Token> tokens)
|
||||||
@ -243,14 +283,28 @@ public class LucysNetFixes : IScriptMod {
|
|||||||
t => t.Type == TokenType.Colon,
|
t => t.Type == TokenType.Colon,
|
||||||
t => t.Type == TokenType.Newline
|
t => t.Type == TokenType.Newline
|
||||||
},
|
},
|
||||||
// print("[KICK]")
|
// if LUCY_LOG_MESSAGES: print("[KICK from", _get_username_from_id(packet_sender), " (", packet_sender, ")]")
|
||||||
// if GAME_MASTER: return
|
// if GAME_MASTER: return
|
||||||
// if packet_sender != KNOWN_GAME_MASTER: return
|
// if packet_sender != KNOWN_GAME_MASTER: return
|
||||||
// END
|
// END
|
||||||
code_to_add = new Token[] {
|
code_to_add = new Token[] {
|
||||||
|
new Token(TokenType.CfIf),
|
||||||
|
new IdentifierToken("LUCY_LOG_MESSAGES"),
|
||||||
|
new Token(TokenType.Colon),
|
||||||
new Token(TokenType.BuiltInFunc, (uint)BuiltinFunction.TextPrint),
|
new Token(TokenType.BuiltInFunc, (uint)BuiltinFunction.TextPrint),
|
||||||
new Token(TokenType.ParenthesisOpen),
|
new Token(TokenType.ParenthesisOpen),
|
||||||
new ConstantToken(new StringVariant("[KICK]")),
|
new ConstantToken(new StringVariant("[KICK from ")),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new IdentifierToken("_get_username_from_id"),
|
||||||
|
new Token(TokenType.ParenthesisOpen),
|
||||||
|
new IdentifierToken("packet_sender"),
|
||||||
|
new Token(TokenType.ParenthesisClose),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new ConstantToken(new StringVariant(" (")),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new IdentifierToken("packet_sender"),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new ConstantToken(new StringVariant(")]")),
|
||||||
new Token(TokenType.ParenthesisClose),
|
new Token(TokenType.ParenthesisClose),
|
||||||
new Token(TokenType.Newline, 4),
|
new Token(TokenType.Newline, 4),
|
||||||
|
|
||||||
@ -279,14 +333,28 @@ public class LucysNetFixes : IScriptMod {
|
|||||||
t => t.Type == TokenType.Colon,
|
t => t.Type == TokenType.Colon,
|
||||||
t => t.Type == TokenType.Newline
|
t => t.Type == TokenType.Newline
|
||||||
},
|
},
|
||||||
// print("[BAN]")
|
// if LUCY_LOG_MESSAGES: print("[BAN from", _get_username_from_id(packet_sender), " (", packet_sender, ")]")
|
||||||
// if GAME_MASTER: return
|
// if GAME_MASTER: return
|
||||||
// if packet_sender != KNOWN_GAME_MASTER: return
|
// if packet_sender != KNOWN_GAME_MASTER: return
|
||||||
// END
|
// END
|
||||||
code_to_add = new Token[] {
|
code_to_add = new Token[] {
|
||||||
|
new Token(TokenType.CfIf),
|
||||||
|
new IdentifierToken("LUCY_LOG_MESSAGES"),
|
||||||
|
new Token(TokenType.Colon),
|
||||||
new Token(TokenType.BuiltInFunc, (uint)BuiltinFunction.TextPrint),
|
new Token(TokenType.BuiltInFunc, (uint)BuiltinFunction.TextPrint),
|
||||||
new Token(TokenType.ParenthesisOpen),
|
new Token(TokenType.ParenthesisOpen),
|
||||||
new ConstantToken(new StringVariant("[BAN]")),
|
new ConstantToken(new StringVariant("[BAN from ")),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new IdentifierToken("_get_username_from_id"),
|
||||||
|
new Token(TokenType.ParenthesisOpen),
|
||||||
|
new IdentifierToken("packet_sender"),
|
||||||
|
new Token(TokenType.ParenthesisClose),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new ConstantToken(new StringVariant(" (")),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new IdentifierToken("packet_sender"),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new ConstantToken(new StringVariant(")]")),
|
||||||
new Token(TokenType.ParenthesisClose),
|
new Token(TokenType.ParenthesisClose),
|
||||||
new Token(TokenType.Newline, 4),
|
new Token(TokenType.Newline, 4),
|
||||||
|
|
||||||
@ -343,8 +411,11 @@ public class LucysNetFixes : IScriptMod {
|
|||||||
t => t.Type == TokenType.Colon,
|
t => t.Type == TokenType.Colon,
|
||||||
t => t.Type == TokenType.Newline
|
t => t.Type == TokenType.Newline
|
||||||
},
|
},
|
||||||
// print("[msg ", _get_username_from_id(packet_sender), "] ", DATA.message)
|
// if LUCY_LOG_MESSAGES: print("[msg ", _get_username_from_id(packet_sender), "] ", DATA.message)
|
||||||
code_to_add = new Token[] {
|
code_to_add = new Token[] {
|
||||||
|
new Token(TokenType.CfIf),
|
||||||
|
new IdentifierToken("LUCY_LOG_MESSAGES"),
|
||||||
|
new Token(TokenType.Colon),
|
||||||
new Token(TokenType.BuiltInFunc, (uint)BuiltinFunction.TextPrint),
|
new Token(TokenType.BuiltInFunc, (uint)BuiltinFunction.TextPrint),
|
||||||
new Token(TokenType.ParenthesisOpen),
|
new Token(TokenType.ParenthesisOpen),
|
||||||
new ConstantToken(new StringVariant("[msg ")),
|
new ConstantToken(new StringVariant("[msg ")),
|
||||||
@ -354,7 +425,11 @@ public class LucysNetFixes : IScriptMod {
|
|||||||
new IdentifierToken("packet_sender"),
|
new IdentifierToken("packet_sender"),
|
||||||
new Token(TokenType.ParenthesisClose),
|
new Token(TokenType.ParenthesisClose),
|
||||||
new Token(TokenType.Comma),
|
new Token(TokenType.Comma),
|
||||||
new ConstantToken(new StringVariant("] ")),
|
new ConstantToken(new StringVariant(" (")),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new IdentifierToken("packet_sender"),
|
||||||
|
new Token(TokenType.Comma),
|
||||||
|
new ConstantToken(new StringVariant(")] ")),
|
||||||
new Token(TokenType.Comma),
|
new Token(TokenType.Comma),
|
||||||
new IdentifierToken("DATA"),
|
new IdentifierToken("DATA"),
|
||||||
new Token(TokenType.Period),
|
new Token(TokenType.Period),
|
||||||
@ -687,6 +762,9 @@ public class LucysNetFixes : IScriptMod {
|
|||||||
// var LUCY_SRV_NAME = ""
|
// var LUCY_SRV_NAME = ""
|
||||||
// var LUCY_PUNCHED_ME = 0
|
// var LUCY_PUNCHED_ME = 0
|
||||||
// var LUCY_INSTANCE_SENDER = 0
|
// var LUCY_INSTANCE_SENDER = 0
|
||||||
|
// var LUCY_CUSTOM_COLOR_B = false
|
||||||
|
// var LUCY_CUSTOM_COLOR = 0
|
||||||
|
// var LUCY_LOG_MESSAGES = false
|
||||||
// END
|
// END
|
||||||
code_to_add = new Token[] {
|
code_to_add = new Token[] {
|
||||||
new Token(TokenType.PrVar),
|
new Token(TokenType.PrVar),
|
||||||
@ -748,6 +826,24 @@ public class LucysNetFixes : IScriptMod {
|
|||||||
new Token(TokenType.OpAssign),
|
new Token(TokenType.OpAssign),
|
||||||
new ConstantToken(new IntVariant(0)),
|
new ConstantToken(new IntVariant(0)),
|
||||||
new Token(TokenType.Newline, 0),
|
new Token(TokenType.Newline, 0),
|
||||||
|
|
||||||
|
new Token(TokenType.PrVar),
|
||||||
|
new IdentifierToken("LUCY_CUSTOM_COLOR_B"),
|
||||||
|
new Token(TokenType.OpAssign),
|
||||||
|
new ConstantToken(new BoolVariant(false)),
|
||||||
|
new Token(TokenType.Newline, 0),
|
||||||
|
|
||||||
|
new Token(TokenType.PrVar),
|
||||||
|
new IdentifierToken("LUCY_CUSTOM_COLOR"),
|
||||||
|
new Token(TokenType.OpAssign),
|
||||||
|
new ConstantToken(new IntVariant(0)),
|
||||||
|
new Token(TokenType.Newline, 0),
|
||||||
|
|
||||||
|
new Token(TokenType.PrVar),
|
||||||
|
new IdentifierToken("LUCY_LOG_MESSAGES"),
|
||||||
|
new Token(TokenType.OpAssign),
|
||||||
|
new ConstantToken(new BoolVariant(false)),
|
||||||
|
new Token(TokenType.Newline, 0),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -8,12 +8,16 @@ Client Features:
|
|||||||
- Lets you clear gamechat
|
- Lets you clear gamechat
|
||||||
- Sends messages on P2P channel 2 (This should make your messages more reliable for users who don't have LucysTools)
|
- Sends messages on P2P channel 2 (This should make your messages more reliable for users who don't have LucysTools)
|
||||||
- Only the game host can kick/ban you
|
- Only the game host can kick/ban you
|
||||||
|
- Allows changing your name's color in chat
|
||||||
|
|
||||||
Host Features:
|
Host Features:
|
||||||
- Lets you set a custom server name and message that will be sent when someone joins.
|
- Lets you set a custom server name and message that will be sent when someone joins.
|
||||||
- Lets you spawn rainclouds & meteors.
|
- Lets you spawn rainclouds & meteors.
|
||||||
- Lets you do 'raw' messages & BBCode in messages. If enabled, other players on the server can use BBCode too. (Not secure or anything, implemented client side)
|
- Lets you do 'raw' messages & BBCode in messages. If enabled, other players on the server can use BBCode too. (Not secure or anything, implemented client side)
|
||||||
|
|
||||||
|
Log Features:
|
||||||
|
- If you enable "log_messages" in the config file, messages, kicks, and bans will be logged to godot.log along with the user who sent the packet.
|
||||||
|
|
||||||
More coming soon!
|
More coming soon!
|
||||||
Probably certainly full of bugs.
|
Probably certainly full of bugs.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user