Merge pull request #14217 from timothyteakettle/why

[s] why
This commit is contained in:
silicons
2021-02-09 02:51:44 -07:00
committed by GitHub

View File

@@ -151,7 +151,14 @@
var/obj/machinery/power/apc/target = locate(ref) in GLOB.apcs_list var/obj/machinery/power/apc/target = locate(ref) in GLOB.apcs_list
if(!target) if(!target)
return return
target.vars[type] = target.setsubsystem(text2num(value)) value = target.setsubsystem(text2num(value))
switch(type) // Sanity check
if("equipment", "lighting", "environ")
target.vars[type] = value
else
message_admins("Warning: possible href exploit by [key_name(usr)] - attempted to set [type] on [target] to [value]")
log_game("Warning: possible href exploit by [key_name(usr)] - attempted to set [type] on [target] to [value]")
return
target.update_icon() target.update_icon()
target.update() target.update()
var/setTo = "" var/setTo = ""