We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac1b152 commit 4ca0d46Copy full SHA for 4ca0d46
server/assets/cli/cli.gd
@@ -1,6 +1,13 @@
1
extends Node
2
3
var thread
4
+var input = ""
5
+
6
+func _notification(what):
7
+ if (what == NOTIFICATION_WM_CLOSE_REQUEST):
8
+ print("stopping cli")
9
+ input="stop"
10
+# get_tree().quit()
11
12
func _init():
13
for i in range(OS.get_cmdline_args().size()):
@@ -26,7 +33,7 @@ func _ready():
26
33
27
34
28
35
func _thread_function():
29
- var input = ""
36
30
37
while input != "stop" && input != "quit" && input != "exit":
31
38
# printraw("gameserver$ ")
32
39
input = OS.read_string_from_stdin().strip_edges()
0 commit comments