mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
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:
@@ -93,6 +93,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear ratchet.")
|
||||
investigate_log("was <span class='warning'>REMOVED</span> by [key_name(usr)]", "atmos")
|
||||
Deconstruct()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -115,6 +115,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
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"])
|
||||
|
||||
@@ -128,6 +130,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
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()
|
||||
@@ -154,8 +159,10 @@ Thus, the two variables affect pump operation are set in New():
|
||||
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()
|
||||
|
||||
@@ -113,6 +113,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
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"])
|
||||
|
||||
@@ -126,6 +128,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
air1.volume
|
||||
)
|
||||
|
||||
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()
|
||||
@@ -151,8 +156,10 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if(..()) return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
|
||||
if(href_list["set_transfer_rate"])
|
||||
transfer_rate = max(0, min(200, safe_input("Pressure control", "Enter new output pressure (0-4500kPa)", transfer_rate)))
|
||||
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", "atmos")
|
||||
usr.set_machine(src)
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -38,11 +38,13 @@
|
||||
update_icon_nopipes()
|
||||
parent1.update = 0
|
||||
parent2.update = 0
|
||||
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", "atmos")
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/proc/close()
|
||||
open = 0
|
||||
update_icon_nopipes()
|
||||
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", "atmos")
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/proc/normalize_dir()
|
||||
|
||||
@@ -128,6 +128,7 @@ update_flag
|
||||
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
|
||||
src.density = 0
|
||||
update_icon()
|
||||
investigate_log("was destroyed by heat/gunfire.", "atmos")
|
||||
|
||||
if (src.holding)
|
||||
src.holding.loc = src.loc
|
||||
@@ -229,6 +230,7 @@ update_flag
|
||||
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(!istype(W, /obj/item/weapon/wrench) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
|
||||
visible_message("<span class='danger'>[user] hits \the [src] with a [W]!</span>")
|
||||
investigate_log("was smacked with \a [W] by [key_name(user)]", "atmos")
|
||||
src.health -= W.force
|
||||
src.add_fingerprint(user)
|
||||
healthcheck()
|
||||
@@ -294,16 +296,22 @@ Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?sr
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["toggle"])
|
||||
var/logmsg
|
||||
if (valve_open)
|
||||
if (holding)
|
||||
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
|
||||
logmsg = "Valve was <b>closed</b> by [key_name(usr)], stopping the transfer into the [holding]<br>"
|
||||
else
|
||||
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the <font color='red'><b>air</b></font><br>"
|
||||
logmsg = "Valve was <b>closed</b> by [key_name(usr)], stopping the transfer into the <span class='userdanger'>air</span><br>"
|
||||
else
|
||||
if (holding)
|
||||
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the [holding]<br>"
|
||||
logmsg = "Valve was <b>opened</b> by [key_name(usr)], starting the transfer into the [holding]<br>"
|
||||
else
|
||||
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the <font color='red'><b>air</b></font><br>"
|
||||
logmsg = "Valve was <b>opened</b> by [key_name(usr)], starting the transfer into the <span class='userdanger'>air</span><br>"
|
||||
if(air_contents.toxins > 0)
|
||||
message_admins("[key_name(usr)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) opened a canister that contains plasma! (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
log_admin("[key_name(usr)] opened a canister that contains plasma at [x], [y], [z]")
|
||||
investigate_log(logmsg, "atmos")
|
||||
release_log += logmsg
|
||||
valve_open = !valve_open
|
||||
|
||||
if (href_list["remove_tank"])
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("hrefs","notes","ntsl","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter") )
|
||||
/client/proc/investigate_show( subject in list("hrefs","notes","ntsl","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter", "atmos") )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder) return
|
||||
switch(subject)
|
||||
if("singulo", "ntsl", "wires", "telesci", "gravity", "records", "cargo", "supermatter") //general one-round-only stuff
|
||||
if("singulo", "ntsl", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos") //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
|
||||
Reference in New Issue
Block a user