mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 09:31:30 +00:00
Robot immortality fixes.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
brute_damage += brute
|
||||
electronics_damage += electronics
|
||||
|
||||
if(brute_damage + electronics_damage > max_damage) destroy()
|
||||
if(brute_damage + electronics_damage >= max_damage) destroy()
|
||||
|
||||
/datum/robot_component/proc/heal_damage(brute, electronics)
|
||||
if(installed != 1)
|
||||
|
||||
@@ -66,9 +66,7 @@
|
||||
else
|
||||
src.camera.status = 1
|
||||
|
||||
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
updatehealth()
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
health = 100
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = 100 - getBruteLoss() - getFireLoss()
|
||||
health = 100 - (getBruteLoss() + getFireLoss())
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/getBruteLoss()
|
||||
var/amount = 0
|
||||
for(var/V in components)
|
||||
var/datum/robot_component/C = components[V]
|
||||
if(C.installed == 1) amount += C.brute_damage
|
||||
if(C.installed != 1) amount += C.brute_damage
|
||||
return amount
|
||||
|
||||
/mob/living/silicon/robot/getFireLoss()
|
||||
var/amount = 0
|
||||
for(var/V in components)
|
||||
var/datum/robot_component/C = components[V]
|
||||
if(C.installed == 1) amount += C.electronics_damage
|
||||
if(C.installed != 0) amount += C.electronics_damage
|
||||
return amount
|
||||
|
||||
/mob/living/silicon/robot/adjustBruteLoss(var/amount)
|
||||
@@ -52,7 +52,6 @@
|
||||
if(!parts.len) return
|
||||
var/datum/robot_component/picked = pick(parts)
|
||||
picked.heal_damage(brute,burn)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0)
|
||||
var/list/components = get_damageable_components()
|
||||
@@ -78,7 +77,6 @@
|
||||
|
||||
var/datum/robot_component/C = pick(components)
|
||||
C.take_damage(brute,burn,sharp)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/robot/heal_overall_damage(var/brute, var/burn)
|
||||
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
|
||||
@@ -95,7 +93,6 @@
|
||||
burn -= (burn_was-picked.electronics_damage)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/robot/take_overall_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/used_weapon = null)
|
||||
if(status_flags & GODMODE) return //godmode
|
||||
@@ -129,6 +126,4 @@
|
||||
brute -= (picked.brute_damage - brute_was)
|
||||
burn -= (picked.electronics_damage - burn_was)
|
||||
|
||||
parts -= picked
|
||||
|
||||
updatehealth()
|
||||
parts -= picked
|
||||
Reference in New Issue
Block a user