diff options
Diffstat (limited to 'client/settings.gd')
| -rw-r--r-- | client/settings.gd | 10 | 
1 files changed, 4 insertions, 6 deletions
| diff --git a/client/settings.gd b/client/settings.gd index 8d81f740..f2f4563c 100644 --- a/client/settings.gd +++ b/client/settings.gd @@ -67,8 +67,8 @@ static func get_root():  	])  static func trigger_hook(key: String, value): -	if Settings.change_hooks_display.get(key) != null: Settings.change_hooks_display.get(key).call(value) -	if Settings.change_hooks_apply.get(key) != null: Settings.change_hooks_apply.get(key).call(value) +	if Settings.change_hooks_display.get(key) != null: Settings.change_hooks_display.get(key).callv([value] if value != null else []) +	if Settings.change_hooks_apply.get(key) != null: Settings.change_hooks_apply.get(key).callv([value] if value != null else [])  	if key.find(".") != -1: trigger_hook(key.rsplit(".", false, 1)[0], null)  static func hook_changed(key: String, display: bool, callable: Callable): @@ -103,10 +103,8 @@ static var change_hooks_apply = {  static func apply_initial():  	for key in change_hooks_apply.keys(): -		if Global.settings.has(key): -			change_hooks_apply[key].call(Global.get_setting(key)) -		else: -			change_hooks_apply[key].call() +		if Global.settings.has(key): change_hooks_apply[key].call(Global.get_setting(key)) +		else: change_hooks_apply[key].call()  static func h_aa(mode):  	match mode: | 
