about summary refs log tree commit diff stats
path: root/Archipelago/textclient.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-09-20 21:29:42 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-09-20 21:29:42 -0400
commite92ae750012d37733ef803e882eb8191ad530e11 (patch)
tree6f92094b11232b0bbd555acf9e0e510e83131666 /Archipelago/textclient.gd
parented3247cd00cde86026379aebba200fee673cdba0 (diff)
downloadlingo-archipelago-e92ae750012d37733ef803e882eb8191ad530e11.tar.gz
lingo-archipelago-e92ae750012d37733ef803e882eb8191ad530e11.tar.bz2
lingo-archipelago-e92ae750012d37733ef803e882eb8191ad530e11.zip
Added proximity chat
Diffstat (limited to 'Archipelago/textclient.gd')
-rw-r--r--Archipelago/textclient.gd13
1 files changed, 12 insertions, 1 deletions
diff --git a/Archipelago/textclient.gd b/Archipelago/textclient.gd index 7bddf38..f100776 100644 --- a/Archipelago/textclient.gd +++ b/Archipelago/textclient.gd
@@ -84,5 +84,16 @@ func parse_printjson(text):
84 84
85func text_entered(text): 85func text_entered(text):
86 var apclient = global.get_node("Archipelago") 86 var apclient = global.get_node("Archipelago")
87 apclient.say(text.trim_suffix("\n")) 87 var cmd = text.trim_suffix("\n")
88 if cmd.begins_with("/say "):
89 if apclient.enable_multiplayer:
90 var msg = cmd.trim_prefix("/say ")
91 parse_printjson(
92 "[LOCAL] [color=#ee00ee]%s[/color]: %s" % [apclient.get_player_name(), msg]
93 )
94 get_tree().get_root().get_node("Spatial/Multiplayer").say(msg)
95 else:
96 parse_printjson("Multiplayer must be enabled to use /say")
97 else:
98 apclient.say(cmd)
88 entry.text = "" 99 entry.text = ""