From 38862b14370483828aea973442e04e0ad8118ea4 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sun, 6 Dec 2015 00:39:40 -0800 Subject: [PATCH 1/3] Cyborgs only die once when dead, and don't break binary talk --- code/modules/mob/living/silicon/robot/life.dm | 21 ++++++++----------- .../mob/living/silicon/robot/robot_damage.dm | 7 +++++++ 2 files changed, 16 insertions(+), 12 deletions(-) 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..bbeff3b6e3a 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -4,8 +4,15 @@ stat = CONSCIOUS return health = maxHealth - (getBruteLoss() + getFireLoss()) + 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) From 8f52b540c7781c13fe3beda992fac738f86f706e Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Sun, 6 Dec 2015 09:58:43 -0800 Subject: [PATCH 2/3] robot/updatehealth now factors in oxyloss --- code/modules/mob/living/silicon/robot/robot_damage.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index bbeff3b6e3a..58021c4193b 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -1,9 +1,9 @@ -/mob/living/silicon/robot/updatehealth() +mob/living/silicon/robot/updatehealth() if(status_flags & GODMODE) 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() From 6265c8e6c1e634f9817c359938b90200c0cfccdf Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Sun, 6 Dec 2015 10:25:48 -0800 Subject: [PATCH 3/3] DEATH TO THE RELATIVE PATHING SCUM --- code/modules/mob/living/silicon/robot/robot_damage.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index 58021c4193b..a8bd77155fa 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -1,4 +1,4 @@ -mob/living/silicon/robot/updatehealth() +/mob/living/silicon/robot/updatehealth() if(status_flags & GODMODE) health = maxHealth stat = CONSCIOUS