Add vv_edit_var to ensure VV edits call our update procs too.

This commit is contained in:
Leshana
2020-04-24 12:43:34 -04:00
parent 7997b1b022
commit 16a9d2575c

View File

@@ -188,6 +188,21 @@ Class Procs:
else
return
/obj/machinery/vv_edit_var(var/var_name, var/new_value)
if(var_name == NAMEOF(src, use_power))
update_use_power(new_value)
return TRUE
else if(var_name == NAMEOF(src, power_channel))
update_power_channel(new_value)
return TRUE
else if(var_name == NAMEOF(src, idle_power_usage))
update_idle_power_usage(new_value)
return TRUE
else if(var_name == NAMEOF(src, active_power_usage))
update_active_power_usage(new_value)
return TRUE
return ..()
/obj/machinery/proc/operable(var/additional_flags = 0)
return !inoperable(additional_flags)