Adds atmos investigate_log

Sort of ported from the /vg/ atmos logging by N3X15
Right now includes opening/closing pumps and opening/closing canisters.
Also adds a message_admins() when a plasma canister is opened.
This commit is contained in:
tkdrg
2015-01-01 21:37:32 -03:00
parent 8e8b761ae2
commit e52ace562c
7 changed files with 38 additions and 6 deletions

View File

@@ -107,6 +107,8 @@ Passive gate is similar to the regular pump except:
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
var/old_on = on //for logging
if("power" in signal.data)
on = text2num(signal.data["power"])
@@ -120,6 +122,9 @@ Passive gate is similar to the regular pump except:
ONE_ATMOSPHERE*50
)
if(on != old_on)
investigate_log("was turned [on ? "on" : "off"] by a remote signal", "atmos")
if("status" in signal.data)
spawn(2)
broadcast_status()
@@ -147,8 +152,10 @@ Passive gate is similar to the regular pump except:
if(..()) return
if(href_list["power"])
on = !on
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
if(href_list["set_press"])
target_pressure = max(0, min(4500, safe_input("Pressure control", "Enter new output pressure (0-4500kPa)", target_pressure)))
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos")
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()