Fixes MCs not being rechargable

This commit is contained in:
Heroman
2020-02-22 11:28:17 +10:00
parent 45071a0f4c
commit 5d786ff855
3 changed files with 11 additions and 2 deletions

View File

@@ -72,7 +72,7 @@
if(EW.use_external_power)
to_chat(user, "<span class='notice'>\The [EW] has no recharge port.</span>")
return
else if(!G.get_cell())
if(!G.get_cell())
to_chat(user, "\The [G] does not have a battery installed.")
return

View File

@@ -16,6 +16,12 @@
return TRUE
return FALSE
/obj/item/modular_computer/get_cell()
if(battery_module)
return battery_module.battery
else
..()
// Tries to use power from APC, if present.
/obj/item/modular_computer/proc/apc_power(var/power_usage = 0)
apc_powered = TRUE

View File

@@ -77,3 +77,6 @@
/obj/item/weapon/computer_hardware/battery_module/proc/charge_to_full()
if(battery)
battery.charge = battery.maxcharge
/obj/item/weapon/computer_hardware/battery_module/get_cell()
return battery