Files
Paradise/code/modules/mob/living/silicon/robot/robot_update_status.dm
BiancaWilkson ec88636e6c Cyborg Damage, Movement, and Power Overhaul (#25252)
* Adding defines

* More signals for external power

* Gets the reboot working

* renaming a proc

* config stuff

* Working on cyborg movement

* Update code/modules/mob/living/silicon/robot/robot_damage.dm

Co-authored-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Update code/modules/mob/living/silicon/robot/robot_damage.dm

Co-authored-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Update code/modules/mob/living/silicon/robot/robot_damage.dm

Co-authored-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* IOSYS where'd you come from

* begon return 0

* VTEC caps slowdown

* Adjusting EMPs

* Funny arm is GONE

* Oh yeah regenerating stamina might be a good thing

* Forgot you could uninstall vtec

* icon machine broke

* Cell-less borgs can enter chargers to stay powered

* oh that was almost bad

* Fixes some logic

* its a surprise tool that will help us later

* Adjusting some numbers

* Adds a sound to go along with the text alarm

* dead things can still charge

* Another logic error

* Xenos too

* sorry linter

* fixes CL

* Slightly more slowdown on stam damage

* neurotoxin won't stun

* SOUNDS!

* 3 flashes to stun instead of 4

* Slightly longer stun

* SPEEDING UP BORGS JUST FOR THE TM SINCE CONFIG DONT WORK

* Keep borgs stunned forever

* Power loss is more dangerous

* Adds a stamina hud to borgs

* Cyborgs now heal up properly

* Removes an outdated comment

* Replacing parts works better now

* EMPs disable components for a brief time

* More missed rebalances

* When you forget to remove debug messages

* WHAT

* Cult magic works + borgs can be silenced

* 2 flashes to stun, flashes confuse now

* Update code/game/objects/items/devices/flash.dm

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>

* Abductors can stun borgs

* Watcher/cyro rays deal stam to brog

* Fixes a rounding error when healing borgs back to full HP

* Fixed span

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>

* Fixed whitespace

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>

* Guard clausify

* Indents a message

* Update code/modules/mob/living/silicon/robot/robot_damage.dm

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>

* Update code/modules/mob/living/silicon/robot/component.dm

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>

* Update code/modules/mob/living/silicon/robot/robot_damage.dm

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>

* that's not what stat does

* No more hardcoded speed, don't TM this branch

---------

Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
2024-07-09 17:44:50 +00:00

52 lines
1.8 KiB
Plaintext

// No args for restraints because robots don't have those
/mob/living/silicon/robot/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE)
if(stat || lockcharge || IsWeakened() || IsStunned() || IsParalyzed() || !is_component_functioning("actuator"))
return TRUE
/mob/living/silicon/robot/has_vision(information_only = FALSE)
return ..(information_only) && ((stat == DEAD && information_only) || is_component_functioning("camera"))
/mob/living/silicon/robot/update_stat(reason = "none given")
if(status_flags & GODMODE)
return
if(stat != DEAD)
if(health <= -maxHealth) //die only once
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStunned() || IsWeakened() || getOxyLoss() > maxHealth * 0.5) // Borgs need to be able to sleep for adminfreeze
if(stat == CONSCIOUS)
KnockOut()
create_debug_log("fell unconscious, trigger reason: [reason]")
else
if(stat == UNCONSCIOUS)
WakeUp()
create_debug_log("woke up, trigger reason: [reason]")
else
if(health > 0 && !suiciding && has_power_source())
update_revive()
var/mob/dead/observer/ghost = get_ghost()
if(ghost)
to_chat(ghost, "<span class='ghostalert'>Your cyborg shell has been repaired and repowered, re-enter if you want to continue!</span> (Verbs -> Ghost -> Re-enter corpse)")
SEND_SOUND(ghost, sound('sound/effects/genetics.ogg'))
create_attack_log("revived, trigger reason: [reason]")
create_log(MISC_LOG, "revived, trigger reason: [reason]")
diag_hud_set_status()
diag_hud_set_health()
update_health_hud()
/mob/living/silicon/robot/KnockOut(updating = TRUE)
. = ..()
update_headlamp()
/mob/living/silicon/robot/WakeUp(updating = TRUE)
. = ..()
update_headlamp()
/mob/living/silicon/robot/update_revive(updating = TRUE)
. = ..(updating)
if(.)
update_icons()