Merge pull request #5014 from Citadel-Station-13/upstream-merge-34314

[MIRROR] Datum var cleanup
This commit is contained in:
LetterJay
2018-01-21 23:14:18 -06:00
committed by GitHub
15 changed files with 40 additions and 60 deletions
@@ -43,7 +43,7 @@
return FALSE
. = ValidateAndSet("[var_value]")
if(.)
var_edited = TRUE
datum_flags |= DF_VAR_EDITED
return
if(var_name in banned_edits)
return FALSE
@@ -114,7 +114,7 @@
var/temp = text2num(trim(str_val))
if(!isnull(temp))
value = CLAMP(integer ? round(temp) : temp, min_val, max_val)
if(value != temp && !var_edited)
if(value != temp && !(datum_flags & DF_VAR_EDITED))
log_config("Changing [name] from [temp] to [value]!")
return TRUE
return FALSE