do it better
This commit is contained in:
@@ -116,11 +116,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/components/binary/pump/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
investigate_log("Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [loc.loc]")
|
||||
investigate_log("Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [A]", "atmos")
|
||||
message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]")
|
||||
. = TRUE
|
||||
if("pressure")
|
||||
@@ -137,8 +139,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("Pump, [src.name], was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Pump, [src.name], was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [loc.loc]")
|
||||
investigate_log("Pump, [src.name], was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [A]", "atmos")
|
||||
message_admins("Pump, [src.name], was set to [target_pressure] kPa by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]")
|
||||
update_icon()
|
||||
|
||||
@@ -179,11 +181,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/can_unwrench(mob/user)
|
||||
if(..())
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
|
||||
else
|
||||
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]")
|
||||
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", "atmos")
|
||||
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] unwrenched a pump at [x], [y], [z]")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -54,8 +54,10 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
close()
|
||||
return
|
||||
open()
|
||||
investigate_log("Valve, [src.name], was manipiulated by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Valve, [src.name], was manipulated by [key_name(usr)] at [x], [y], [z], [loc.loc]")
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
investigate_log("Valve, [src.name], was manipiulated by [key_name(usr)] at [x], [y], [z], [A]", "atmos")
|
||||
message_admins("Valve, [src.name], was manipulated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a manual valve at [x], [y], [z]")
|
||||
|
||||
|
||||
|
||||
@@ -116,11 +116,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
investigate_log("Volume Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Volume Pump, [src.name], turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [loc.loc]")
|
||||
message_admins("Volume Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a volume pump at [x], [y], [z]")
|
||||
|
||||
. = TRUE
|
||||
@@ -139,7 +141,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if(.)
|
||||
transfer_rate = Clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("Volume Pump, [src.name], was set to [transfer_rate] L/s by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Volume Pump, [src.name], was set to [transfer_rate] L/s by [key_name(usr)] at [x], [y], [z], [loc.loc]")
|
||||
message_admins("Volume Pump, [src.name], was set to [transfer_rate] L/s by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a volume pump at [x], [y], [z]")
|
||||
update_icon()
|
||||
|
||||
@@ -176,11 +178,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/can_unwrench(mob/user)
|
||||
if(..())
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
|
||||
else
|
||||
investigate_log("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]")
|
||||
message_admins("Volume Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] unwrenched a volume pump at [x], [y], [z]")
|
||||
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user