Improves collector feedback
This commit is contained in:
@@ -73,28 +73,34 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
/obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
to_chat(user, "<span class='notice'>The [W.name] detects that [last_power]W were recently produced.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/device/analyzer) && loaded_tank)
|
||||
atmosanalyzer_scan(loaded_tank.air_contents, user)
|
||||
else if(istype(W, /obj/item/weapon/tank/internals/plasma))
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>The [src] needs to be secured to the floor first!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
if(loaded_tank)
|
||||
to_chat(user, "<span class='warning'>There's already a plasma tank loaded!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
if(!user.drop_item())
|
||||
return 1
|
||||
return TRUE
|
||||
loaded_tank = W
|
||||
W.forceMove(src)
|
||||
update_icons()
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(loaded_tank && !locked)
|
||||
if(loaded_tank)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
return TRUE
|
||||
eject()
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There isn't a tank loaded!</span>")
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
default_unfasten_wrench(user, W, 0)
|
||||
return 1
|
||||
return TRUE
|
||||
else if(W.GetID())
|
||||
if(allowed(user))
|
||||
if(active)
|
||||
@@ -104,7 +110,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
to_chat(user, "<span class='warning'>The controls can only be locked when \the [src] is active!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm (rejected hunks)
|
||||
@@ -46,7 +46,9 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
toggle_power()
|
||||
user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \
|
||||
"<span class='notice'>You turn the [src.name] [active? "on":"off"].</span>")
|
||||
- var/fuel = loaded_tank.air_contents.gases["plasma"]
|
||||
+ var/fuel
|
||||
+ if(loaded_tank)
|
||||
+ fuel = loaded_tank.air_contents.gases["plasma"]
|
||||
fuel = fuel ? fuel[MOLES] : 0
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"<font color='red'>It is empty</font>"].","singulo")
|
||||
return
|
||||
Reference in New Issue
Block a user