mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #2749 from Crazylemon64/cyborg_debugging
Cyborgs only die once when dead, and don't break binary talk
This commit is contained in:
@@ -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()
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -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 << "<span class='ghostalert'>Your cyborg shell has been repaired, re-enter if you want to continue!</span> (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)
|
||||
|
||||
Reference in New Issue
Block a user