Fix get_clean_property in NTSL

This commit is contained in:
Byemoh
2025-02-16 22:37:32 -06:00
committed by GitHub
parent 5fe818274a
commit 5eb4052073

View File

@@ -80,9 +80,9 @@ GLOBAL_LIST_EMPTY(ntsl_methods)
/datum/n_struct/proc/get_clean_property(name, compare)
var/x = properties[name]
if(istext(x) && compare && x != compare) // Was changed
if(istext(x))
x = sanitize(x)
if(isnotpretty(x)) // Pretty filter stuff
if(compare && x != compare && isnotpretty(x)) // Pretty filter stuff
var/log_message = "An NTSL script just tripped the pretty filter, setting variable [name] from [compare] to value [x]!"
message_admins(log_message)
log_ntsl(log_message)