mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 14:08:44 +01:00
Merge pull request #11923 from Heroman3003/selfpower
Makes suspension field generator function in areas without power
This commit is contained in:
@@ -13,6 +13,15 @@
|
||||
/obj/machinery/suspension_gen/Initialize()
|
||||
. = ..()
|
||||
cell = new /obj/item/weapon/cell/high(src)
|
||||
power_change()
|
||||
|
||||
/obj/machinery/suspension_gen/power_change()
|
||||
var/oldstat = stat
|
||||
if(cell)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
return (stat != oldstat)
|
||||
|
||||
/obj/machinery/suspension_gen/process()
|
||||
if(suspension_field)
|
||||
@@ -56,7 +65,7 @@
|
||||
|
||||
/obj/machinery/suspension_gen/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
var/list/data = ..()
|
||||
|
||||
|
||||
data["cell"] = cell
|
||||
data["cellCharge"] = cell?.charge
|
||||
data["cellMaxCharge"] = cell?.maxcharge
|
||||
|
||||
Reference in New Issue
Block a user