From 4ad51dcc59d1a30d05166c01eb0113dbe098aca6 Mon Sep 17 00:00:00 2001 From: datlo Date: Fri, 4 Jan 2019 19:02:39 +0000 Subject: [PATCH] fix mech runtime --- code/game/mecha/mecha.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 32ee1c19cde..188196f2b80 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1378,14 +1378,16 @@ /obj/mecha/proc/use_power(amount) if(get_charge()) cell.use(amount) - update_cell() + if(occupant) + update_cell() return 1 return 0 /obj/mecha/proc/give_power(amount) if(!isnull(get_charge())) cell.give(amount) - update_cell() + if(occupant) + update_cell() return 1 return 0