diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 533bc1f7a2b..a6ce6632258 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -21,15 +21,17 @@ ear_deaf = 0 -/mob/living/silicon/robot/proc/use_power() - if (is_component_functioning("power cell") && cell) +/mob/living/silicon/robot/proc/use_power() + if (stat == DEAD) + return + else if (is_component_functioning("power cell") && cell) if(module) for(var/obj/item/borg/B in module.modules) if(B.powerneeded) if((cell.charge * 100 / cell.maxcharge) < B.powerneeded) src << "Deactivating [B.name] due to lack of power!" - unEquip(B) - if(cell.charge <= 0) + unEquip(B) + if(cell.charge <= 0) uneq_all() update_headlamp(1) stat = UNCONSCIOUS @@ -60,7 +62,9 @@ if(!is_component_functioning("actuator")) Paralyse(3) eye_blind = 0 - stat = 0 + // Please, PLEASE be careful with statements like this - make sure they're not + // dead beforehand, for example -- Crazylemon + stat = CONSCIOUS has_power = 1 else uneq_all() @@ -68,13 +72,6 @@ update_headlamp(1) Paralyse(3) -/mob/living/silicon/robot/updatehealth() - if(status_flags & GODMODE) - health = maxHealth - stat = CONSCIOUS - return - health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss()) - /mob/living/silicon/robot/handle_regular_status_updates() . = ..() diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index 6628841fa40..a8bd77155fa 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -3,9 +3,16 @@ health = maxHealth stat = CONSCIOUS return - health = maxHealth - (getBruteLoss() + getFireLoss()) + health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss()) + if (stat == DEAD && health > 0) + update_revive() + var/mob/dead/observer/ghost = get_ghost() + if(ghost) + ghost << "Your cyborg shell has been repaired, re-enter if you want to continue! (Verbs -> Ghost -> Re-enter corpse)" + ghost << sound('sound/effects/genetics.ogg') return + /mob/living/silicon/robot/getBruteLoss() var/amount = 0 for(var/V in components)