[s] sanity checks vv_edit_var() values (#52255)

cl ShizCalev
fix: Added some sanity checking for varedit values.
/cl
* sanity checks vv_edit_var() values

* this should be an or

* one more fix
This commit is contained in:
ShizCalev
2020-07-16 10:20:41 +12:00
committed by GitHub
parent 6baa3f6acf
commit 254536072e
22 changed files with 51 additions and 61 deletions
+4 -4
View File
@@ -802,13 +802,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/vv_edit_var(var_name, var_value)
. = ..()
switch(var_name)
if("icon")
if(NAMEOF(src, icon))
ghostimage_default.icon = icon
ghostimage_simple.icon = icon
if("icon_state")
if(NAMEOF(src, icon_state))
ghostimage_default.icon_state = icon_state
ghostimage_simple.icon_state = icon_state
if("fun_verbs")
if(NAMEOF(src, fun_verbs))
if(fun_verbs)
verbs += /mob/dead/observer/verb/boo
verbs += /mob/dead/observer/verb/possess
@@ -928,7 +928,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/vv_edit_var(var_name, var_value)
. = ..()
if(var_name == "invisibility")
if(var_name == NAMEOF(src, invisibility))
set_invisibility(invisibility) // updates light
/proc/set_observer_default_invisibility(amount, message=null)