mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Fixes two newmalf-related issues
- Fixes APC runtime. I am an idiot. I know. - Fixes potentional power issue with AI powersupply object, caused by AI having more than one powersupply. This sometimes caused AI to use 100kW instead of 50kW
This commit is contained in:
@@ -246,6 +246,8 @@ var/list/ai_verbs_default = list(
|
||||
if(!powered_ai || powered_ai.stat & DEAD)
|
||||
qdel()
|
||||
return
|
||||
if(powered_ai.psupply != src) // For some reason, the AI has different powersupply object. Delete this one, it's no longer needed.
|
||||
qdel(src)
|
||||
if(powered_ai.APU_power)
|
||||
use_power = 0
|
||||
return
|
||||
|
||||
@@ -159,10 +159,8 @@
|
||||
stat |= MAINT
|
||||
src.update_icon()
|
||||
|
||||
/obj/machinery/power/apc/initialize()
|
||||
..()
|
||||
/obj/machinery/power/apc/Destroy()
|
||||
src.update()
|
||||
|
||||
area.apc = null
|
||||
area.power_light = 0
|
||||
area.power_equip = 0
|
||||
@@ -179,7 +177,7 @@
|
||||
terminal = null
|
||||
|
||||
// Malf AI, removes the APC from AI's hacked APCs list.
|
||||
if(hacker && hacker.hacked_apcs && src in hacker.hacked_apcs)
|
||||
if((hacker) && (hacker.hacked_apcs) && (src in hacker.hacked_apcs))
|
||||
hacker.hacked_apcs -= src
|
||||
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user