Vest/packages/vest_mainmenu/main_menu.gd

16 lines
590 B
GDScript

extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
var NetworkService = $"/root/NetworkService"
if NetworkService.NETWORK_MODE == 'server':
$"TabContainer/Singleplayer".queue_free()
var ConsoleService = $"/root/ConsoleService"
ConsoleService.connect("on_log", self, "update_log")
ConsoleService.connect("on_error", self, "update_log")
$"TabContainer/Logs/LogList".text = PoolStringArray(ConsoleService.log_messages).join("\n")
func update_log(log_messages):
$"TabContainer/Logs/LogList".text = PoolStringArray(log_messages).join("\n")