mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Added admin logging for the gravity generator.
This commit is contained in:
@@ -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") )
|
||||
/client/proc/investigate_show( subject in list("hrefs","notes","ntsl","singulo","wires","telesci", "gravity") )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder) return
|
||||
switch(subject)
|
||||
if("singulo", "ntsl", "wires", "telesci") //general one-round-only stuff
|
||||
if("singulo", "ntsl", "wires", "telesci", "gravity") //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>"
|
||||
|
||||
@@ -119,6 +119,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
var/broken_state = 0
|
||||
|
||||
/obj/machinery/gravity_generator/main/Destroy() // If we somehow get deleted, remove all of our other parts.
|
||||
investigate_log("was destroyed!", "gravity")
|
||||
on = 0
|
||||
update_list()
|
||||
for(var/obj/machinery/gravity_generator/part/O in parts)
|
||||
@@ -156,6 +157,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
breaker = 0
|
||||
set_power()
|
||||
set_state(0)
|
||||
investigate_log("has broken down.", "gravity")
|
||||
|
||||
/obj/machinery/gravity_generator/main/set_fix()
|
||||
..()
|
||||
@@ -239,6 +241,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
|
||||
if(href_list["gentoggle"])
|
||||
breaker = !breaker
|
||||
investigate_log("was toggled [breaker ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>"] by [usr.key].", "gravity")
|
||||
set_power()
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -246,6 +249,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
|
||||
/obj/machinery/gravity_generator/main/power_change()
|
||||
..()
|
||||
investigate_log("has [stat & NOPOWER ? "lost" : "regained"] power.", "gravity")
|
||||
set_power()
|
||||
|
||||
/obj/machinery/gravity_generator/main/get_status()
|
||||
@@ -267,6 +271,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
new_state = 1
|
||||
|
||||
charging_state = new_state ? POWER_UP : POWER_DOWN // Startup sequence animation.
|
||||
investigate_log("is now [charging_state == POWER_UP ? "charging" : "discharging"].", "gravity")
|
||||
update_icon()
|
||||
|
||||
// Set the state of the gravity.
|
||||
@@ -276,12 +281,17 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
use_power = on ? 2 : 1
|
||||
// Sound the alert if gravity was just enabled or disabled.
|
||||
var/alert = 0
|
||||
var/area/area = get_area(src)
|
||||
if(new_state) // If we turned on
|
||||
if(gravity_in_level() == 0)
|
||||
alert = 1
|
||||
investigate_log("was brought online and is now producing gravity for this level.", "gravity")
|
||||
message_admins("The gravity generator was brought online. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
|
||||
else
|
||||
if(gravity_in_level() == 1)
|
||||
alert = 1
|
||||
investigate_log("was brought offline and there is now no gravity for this level.", "gravity")
|
||||
message_admins("The gravity generator was brought offline with no backup generator. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
|
||||
|
||||
update_icon()
|
||||
update_list()
|
||||
|
||||
Reference in New Issue
Block a user