Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cyborg Damage, Movement, and Power Overhaul #25252

Merged
merged 69 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
b82dd3c
Adding defines
BiancaWilkson Apr 24, 2024
419bcbe
More signals for external power
BiancaWilkson Apr 24, 2024
09a6133
Gets the reboot working
BiancaWilkson Apr 24, 2024
75e09c2
renaming a proc
BiancaWilkson Apr 24, 2024
218a8af
config stuff
BiancaWilkson Apr 24, 2024
9607694
Working on cyborg movement
BiancaWilkson Apr 24, 2024
6fc6750
Update code/modules/mob/living/silicon/robot/robot_damage.dm
BiancaWilkson Apr 24, 2024
7d01deb
Update code/modules/mob/living/silicon/robot/robot_damage.dm
BiancaWilkson Apr 24, 2024
714e0a7
Update code/modules/mob/living/silicon/robot/robot_damage.dm
BiancaWilkson Apr 24, 2024
bd5eceb
IOSYS where'd you come from
BiancaWilkson Apr 24, 2024
d263bbb
begon return 0
BiancaWilkson Apr 24, 2024
e0e8971
VTEC caps slowdown
BiancaWilkson Apr 25, 2024
96772be
Adjusting EMPs
BiancaWilkson Apr 25, 2024
3e30ec5
Funny arm is GONE
BiancaWilkson Apr 25, 2024
9169fcd
Oh yeah regenerating stamina might be a good thing
BiancaWilkson Apr 25, 2024
2bfca4b
Forgot you could uninstall vtec
BiancaWilkson Apr 25, 2024
2226a7d
icon machine broke
BiancaWilkson Apr 25, 2024
81985a0
Cell-less borgs can enter chargers to stay powered
BiancaWilkson Apr 25, 2024
74a860b
oh that was almost bad
BiancaWilkson Apr 25, 2024
2dc11a7
Fixes some logic
BiancaWilkson Apr 25, 2024
e9eb86c
its a surprise tool that will help us later
BiancaWilkson Apr 25, 2024
596fabf
Adjusting some numbers
BiancaWilkson Apr 25, 2024
726791f
Adds a sound to go along with the text alarm
BiancaWilkson Apr 25, 2024
528c560
dead things can still charge
BiancaWilkson Apr 25, 2024
e9c966b
Another logic error
BiancaWilkson Apr 25, 2024
ccb4613
Xenos too
BiancaWilkson Apr 25, 2024
875686c
Merge branch 'master' into borg-overhaul-project
BiancaWilkson Apr 25, 2024
3ca7163
sorry linter
BiancaWilkson Apr 25, 2024
b40a494
Merge branch 'master' into borg-overhaul-project
BiancaWilkson Apr 25, 2024
cff23dd
Merge branch 'master' into borg-overhaul-project
BiancaWilkson Apr 29, 2024
af07f54
Merge branch 'master' into borg-overhaul-project
BiancaWilkson May 7, 2024
0b3e6b9
Merge branch 'master' into borg-overhaul-project
BiancaWilkson May 16, 2024
5d43fcb
fixes CL
BiancaWilkson May 16, 2024
a679f71
Slightly more slowdown on stam damage
BiancaWilkson May 16, 2024
c34e4b7
Merge branch 'master' into borg-overhaul-project
S34NW May 17, 2024
6a5bd82
neurotoxin won't stun
BiancaWilkson May 20, 2024
5d6f1a4
SOUNDS!
BiancaWilkson May 20, 2024
185076a
3 flashes to stun instead of 4
BiancaWilkson May 27, 2024
c9ce676
Slightly longer stun
BiancaWilkson May 27, 2024
505ac23
Merge branch 'master' into borg-overhaul-project
BiancaWilkson May 27, 2024
17733dc
SPEEDING UP BORGS JUST FOR THE TM SINCE CONFIG DONT WORK
BiancaWilkson May 31, 2024
aba43e4
Keep borgs stunned forever
BiancaWilkson May 31, 2024
5ee5355
Power loss is more dangerous
BiancaWilkson May 31, 2024
b3d6085
Adds a stamina hud to borgs
BiancaWilkson Jun 2, 2024
0be1d19
Cyborgs now heal up properly
BiancaWilkson Jun 2, 2024
3e8312d
Removes an outdated comment
BiancaWilkson Jun 3, 2024
e50c9b9
Replacing parts works better now
BiancaWilkson Jun 3, 2024
8888f8a
EMPs disable components for a brief time
BiancaWilkson Jun 4, 2024
5de650d
More missed rebalances
BiancaWilkson Jun 4, 2024
9607693
When you forget to remove debug messages
BiancaWilkson Jun 5, 2024
d57ec66
WHAT
BiancaWilkson Jun 5, 2024
d9c8d53
Cult magic works + borgs can be silenced
BiancaWilkson Jun 5, 2024
cd6a0f7
Merge branch 'master' into borg-overhaul-project
BiancaWilkson Jun 5, 2024
bb5ed3b
2 flashes to stun, flashes confuse now
BiancaWilkson Jun 7, 2024
c473010
Update code/game/objects/items/devices/flash.dm
BiancaWilkson Jun 8, 2024
dbc6ea4
Abductors can stun borgs
BiancaWilkson Jun 12, 2024
0ccd1eb
Watcher/cyro rays deal stam to brog
BiancaWilkson Jun 13, 2024
4a92ea8
Fixes a rounding error when healing borgs back to full HP
BiancaWilkson Jun 23, 2024
3de5424
Fixed span
BiancaWilkson Jun 27, 2024
ab89e14
Fixed whitespace
BiancaWilkson Jun 27, 2024
8d17b85
Guard clausify
BiancaWilkson Jun 27, 2024
fca601c
Merge branch 'borg-overhaul-project' of https://github.com/BiancaWilk…
BiancaWilkson Jun 27, 2024
f9e4f68
Indents a message
BiancaWilkson Jun 27, 2024
1e946ec
Update code/modules/mob/living/silicon/robot/robot_damage.dm
BiancaWilkson Jul 8, 2024
3da20a4
Update code/modules/mob/living/silicon/robot/component.dm
BiancaWilkson Jul 8, 2024
36244a7
Update code/modules/mob/living/silicon/robot/robot_damage.dm
BiancaWilkson Jul 8, 2024
07fa921
that's not what stat does
BiancaWilkson Jul 8, 2024
ffd4d20
No more hardcoded speed, don't TM this branch
BiancaWilkson Jul 9, 2024
0e0389d
Merge branch 'master' into borg-overhaul-project
BiancaWilkson Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/combat_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define MAGIC "magic"

#define STUN "stun"
#define STAM_CRIT "stam_crit"
#define WEAKEN "weaken"
#define KNOCKDOWN "knockdown"
#define PARALYZE "paralize"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@
#define COMPONENT_NO_ATTACH (1<<0)
///sent from borg recharge stations: (amount, repairs)
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge"
///sent when a mob enters a borg charger
#define COMSIG_ENTERED_BORGCHARGER "enter_charger"
///sent when a mob exits a borg charger
#define COMSIG_EXITED_BORGCHARGER "exit_charger"
///sent when a mob/login() finishes: (client)
#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login"
///sent from borg mobs to itself, for tools to catch an upcoming destroy() due to safe decon (rather than detonation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// Move delay for humanoids
var/human_delay = 1.5
/// Move delay for cyborgs
var/robot_delay = 2.5
var/robot_delay = 1.5
hal9000PR marked this conversation as resolved.
Show resolved Hide resolved
/// Move delay for xenomorphs
var/alien_delay = 1.5
/// Move delay for slimes (xenobio, not slimepeople)
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/rechargestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
/obj/machinery/recharge_station/proc/go_out()
if(!occupant)
return
SEND_SIGNAL(occupant, COMSIG_EXITED_BORGCHARGER)
UnregisterSignal(occupant, COMSIG_MOVABLE_MOVED)
occupant.forceMove(loc)
occupant = null
Expand Down Expand Up @@ -232,6 +233,7 @@

target.stop_pulling()
QDEL_LIST_CONTENTS(target.grabbed_by)
SEND_SIGNAL(target, COMSIG_ENTERED_BORGCHARGER)
target.forceMove(src)
occupant = target
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(go_out))
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/devices/flash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
else if(issilicon(M))
add_attack_logs(user, M, "Flashed with [src]")
if(M.flash_eyes(affect_silicon = 1))
M.Weaken(rand(8 SECONDS, 12 SECONDS))
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with [src]!</span>", "<span class='danger'>You overload [M]'s sensors with [src]!</span>")
return 1
user.visible_message("<span class='disarm'>[user] fails to blind [M] with [src]!</span>", "<span class='warning'>You fail to blind [M] with [src]!</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/robot/robot_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

/obj/item/borg/upgrade/vtec
name = "robotic VTEC Module"
desc = "Used to activate a cyborg's VTEC systems, increasing their speed."
desc = "Used to activate a vehicle's VTEC systems, increasing their speed."
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
icon_state = "cyborg_upgrade2"
require_module = TRUE
origin_tech = "engineering=4;materials=5;programming=4"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/carbon_status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
stam_regen_start_time = world.time + (STAMINA_REGEN_BLOCK_TIME * stamina_regen_block_modifier)
var/prev = stam_paralyzed
stam_paralyzed = TRUE
ADD_TRAIT(src, TRAIT_IMMOBILIZED, "stam_crit") // make defines later
ADD_TRAIT(src, TRAIT_FLOORED, "stam_crit")
ADD_TRAIT(src, TRAIT_HANDS_BLOCKED, "stam_crit")
hal9000PR marked this conversation as resolved.
Show resolved Hide resolved
ADD_TRAIT(src, TRAIT_IMMOBILIZED, STAM_CRIT)
ADD_TRAIT(src, TRAIT_FLOORED, STAM_CRIT)
ADD_TRAIT(src, TRAIT_HANDS_BLOCKED, STAM_CRIT)
if(!prev && getStaminaLoss() < 120) // Puts you a little further into the initial stamcrit, makes stamcrit harder to outright counter with chems.
adjustStaminaLoss(30, FALSE)
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/carbon_update_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
else if(stam_paralyzed)
SEND_SIGNAL(src, COMSIG_CARBON_EXIT_STAMINACRIT)
stam_paralyzed = FALSE
REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, "stam_crit") // make defines later
REMOVE_TRAIT(src, TRAIT_FLOORED, "stam_crit")
REMOVE_TRAIT(src, TRAIT_HANDS_BLOCKED, "stam_crit")
REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, STAM_CRIT)
REMOVE_TRAIT(src, TRAIT_FLOORED, STAM_CRIT)
REMOVE_TRAIT(src, TRAIT_HANDS_BLOCKED, STAM_CRIT)

/mob/living/carbon/can_hear()
. = FALSE
Expand Down
20 changes: 14 additions & 6 deletions code/modules/mob/living/silicon/robot/component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@
var/mob/living/silicon/robot/owner
var/external_type = null // The actual device object that has to be installed for this.
var/obj/item/wrapped = null // The wrapped device(e.g. radio), only set if external_type isn't null
///How much a component is contributing to slowdown
var/current_slowdown_factor = 0
///The max amount of slowness a component can contribute, set to be 1% of the max damage
var/max_slowdown_factor

/datum/robot_component/New(mob/living/silicon/robot/R)
owner = R
max_slowdown_factor = (max_damage / 100)

// Should only ever be destroyed when a borg gets destroyed
/datum/robot_component/Destroy(force, ...)
Expand All @@ -35,7 +40,7 @@
go_offline()
owner.updatehealth("component '[src]' removed")

/datum/robot_component/proc/destroy()
/datum/robot_component/proc/break_component()
if(wrapped)
qdel(wrapped)
uninstall()
Expand All @@ -50,9 +55,9 @@

brute_damage += brute
electronics_damage += electronics

current_slowdown_factor = clamp((current_slowdown_factor + ((brute_damage + electronics_damage) / 100)), 0, max_slowdown_factor)
if(brute_damage + electronics_damage >= max_damage)
destroy()
break_component()

SStgui.update_uis(owner.self_diagnosis)

Expand All @@ -66,7 +71,7 @@

brute_damage = max(0, brute_damage - brute)
electronics_damage = max(0, electronics_damage - electronics)

current_slowdown_factor = clamp((current_slowdown_factor - ((brute_damage + electronics_damage) / 100)), 0, max_slowdown_factor)
SStgui.update_uis(owner.self_diagnosis)

/datum/robot_component/proc/is_powered()
Expand Down Expand Up @@ -112,6 +117,9 @@
/datum/robot_component/proc/go_offline()
return

/datum/robot_component/proc/get_movement_delay()
return (is_destroyed() ? max_slowdown_factor : current_slowdown_factor)

/datum/robot_component/armour
name = "armour plating"
external_type = /obj/item/robot_parts/robot_component/armour
Expand All @@ -136,13 +144,13 @@
owner.cell = null

/datum/robot_component/cell/is_powered()
return ..() && owner.cell
return ..() && owner.cell?.charge

/datum/robot_component/cell/Destroy(force, ...)
owner.cell = null
return ..()

/datum/robot_component/cell/destroy()
/datum/robot_component/cell/break_component()
..()
owner.cell = null

Expand Down
59 changes: 57 additions & 2 deletions code/modules/mob/living/silicon/robot/robot_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
heal_overall_damage(0, -amount, updating_health)
return STATUS_UPDATE_HEALTH

/mob/living/silicon/robot/update_stamina()
if(rebooting)
return
var/current_stam_damage = getStaminaLoss()
if(current_stam_damage > DAMAGE_PRECISION && (maxHealth - current_stam_damage) <= HEALTH_THRESHOLD_CRIT && !stat)
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
start_emergency_reboot()

/mob/living/silicon/robot/proc/get_damaged_components(get_brute, get_burn, get_borked = FALSE, get_missing = FALSE)
var/list/datum/robot_component/parts = list()
for(var/V in components)
Expand All @@ -58,11 +65,29 @@

/mob/living/silicon/robot/proc/get_armour()
if(!LAZYLEN(components))
return 0
return TRUE
var/datum/robot_component/C = components["armour"]
if(C && C.installed)
return C
return 0
return FALSE

/mob/living/silicon/robot/proc/get_cell_component()
if(!LAZYLEN(components))
return FALSE
var/datum/robot_component/C = components["power cell"]
if(C && C.installed)
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
return C
return FALSE

/mob/living/silicon/robot/proc/get_total_component_slowdown()
var/total_slowdown = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
total_slowdown += C.get_movement_delay()
return total_slowdown

/mob/living/silicon/robot/proc/get_stamina_slowdown()
return round((staminaloss / 50), 0.125)

/mob/living/silicon/robot/heal_organ_damage(brute, burn, updating_health = TRUE)
var/list/datum/robot_component/parts = get_damaged_components(brute, burn)
Expand Down Expand Up @@ -131,3 +156,33 @@

parts -= picked
updatehealth()

/*
Begins the stamcrit reboot process for borgs. Stuns them, and warns people if the borg has no power source.
*/
/mob/living/silicon/robot/proc/start_emergency_reboot()
rebooting = TRUE
if(!has_power_source())
visible_message(
"<span class='warning'>[src]'s system sounds an alarm,</span> <span class='robot>\"ERROR: NO POWER SOURCE DETECTED. SYSTEM SHUTDOWN EMINENT.\"</span>",
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
"<span class='warning'>EMERGENCY: FULL SYSTEM SHUTDOWN EMINENT.</span>"
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
)
else
visible_message(
"<span class='notice'>[src]'s lights suddenly go dark and [p_they()] seem to shut down.</span>",
"<span class='notice'>A fatal error has occured in the neural connections. Beginning emergency reboot.</span>"
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
)
var/stun_time = rand(10 SECONDS, 15 SECONDS)
Weaken(stun_time)
addtimer(CALLBACK(src, PROC_REF(end_emergency_reboot)), stun_time)
/*
Finishes the stamcrit process. If the borg doesn't have a power source for the reboot, they die.
*/
/mob/living/silicon/robot/proc/end_emergency_reboot()
rebooting = FALSE
if(!has_power_source())
death()
if(!stat)
hal9000PR marked this conversation as resolved.
Show resolved Hide resolved
return
setStaminaLoss(0) //Have you tried turning it off and on again?
to_chat(src, "<span class='notice'>Reboot complete, neural interface operational.")
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 7 additions & 0 deletions code/modules/mob/living/silicon/robot/robot_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,10 @@
step_away(src, user, 15)
sleep(3)
step_away(src, user, 15)

/mob/living/silicon/robot/flash_eyes(intensity, override_blindness_check, affect_silicon, visual, type)
if(affect_silicon)
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
var/software_damage = (intensity * 30)
adjustStaminaLoss(software_damage)
to_chat(src, "<span class='warning'>Error: Optical sensors overstimulated.</span>")
..()
48 changes: 25 additions & 23 deletions code/modules/mob/living/silicon/robot/robot_life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,35 @@


/mob/living/silicon/robot/proc/handle_robot_cell()
if(stat != DEAD)
if(!is_component_functioning("power cell"))
uneq_all()
low_power_mode = TRUE
update_headlamp()
diag_hud_set_borgcell()
return
if(low_power_mode)
if(is_component_functioning("power cell") && cell.charge)
low_power_mode = FALSE
update_headlamp()
else if(stat == CONSCIOUS)
use_power()
if(stat == DEAD)
return
if(externally_powered)
return
if(low_power_mode)
handle_no_power()
else if(!is_component_functioning("power cell")) //This makes it so you'll only get the warnings once per running out of charge
enter_low_power_mode()
else if(stat == CONSCIOUS)
use_power()

/mob/living/silicon/robot/proc/use_power()
// this check is safe because `cell` is guaranteed to be set when the power cell is functioning
if(is_component_functioning("power cell") && cell.charge)
if(cell.charge <= 100)
uneq_all()
var/amt = clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
else
uneq_all()
low_power_mode = TRUE
update_headlamp()
var/amt = clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
BiancaWilkson marked this conversation as resolved.
Show resolved Hide resolved
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
diag_hud_set_borgcell()

/mob/living/silicon/robot/proc/handle_no_power()
diag_hud_set_borgcell()
if(is_component_functioning("power cell"))
low_power_mode = FALSE
return
adjustStaminaLoss(1)

/mob/living/silicon/robot/proc/enter_low_power_mode()
low_power_mode = TRUE
playsound(src, "sound/mecha/lowpower.ogg", 50, FALSE, SOUND_RANGE_SET(10))
to_chat(src, "<span_class='warning'>Alert: Power cell requires immediate charging.</span>")
handle_no_power()

/mob/living/silicon/robot/proc/handle_equipment()
if(camera && !scrambledcodes)
if(stat == DEAD || wires.is_cut(WIRE_BORG_CAMERA))
Expand Down
20 changes: 18 additions & 2 deletions code/modules/mob/living/silicon/robot/robot_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/brute_mod = 1
/// Value incoming burn damage to borgs is multiplied by.
var/burn_mod = 1

///If the cyborg is rebooting from stamcrit
var/rebooting = FALSE
///If the cyborg is in a charger, or otherwise receiving power from an outside source.
var/externally_powered = FALSE
var/list/force_modules
var/allow_rename = TRUE
var/weapons_unlock = FALSE
Expand Down Expand Up @@ -185,7 +188,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
scanner = new(src)
scanner.Grant(src)
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(create_trail))

RegisterSignal(src, COMSIG_ENTERED_BORGCHARGER, PROC_REF(gain_external_power))
RegisterSignal(src, COMSIG_EXITED_BORGCHARGER, PROC_REF(lose_external_power))
robot_module_hat_offset(icon_state)

/mob/living/silicon/robot/get_radio()
Expand Down Expand Up @@ -1724,3 +1728,15 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
old_ai.connected_robots -= src
if(connected_ai)
connected_ai.connected_robots |= src

/mob/living/silicon/robot/proc/gain_external_power()
SIGNAL_HANDLER //COMSIG_ENTERED_BORGCHARGER
externally_powered = TRUE

/mob/living/silicon/robot/proc/lose_external_power()
SIGNAL_HANDLER //COMSIG_EXITED_BORGCHARGER
externally_powered = FALSE

/mob/living/silicon/robot/proc/has_power_source()
var/datum/robot_component/cell/cell = get_cell_component()
return cell.is_powered() || externally_powered
3 changes: 3 additions & 0 deletions code/modules/mob/living/silicon/robot/robot_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
/mob/living/silicon/robot/movement_delay()
. = ..()
. += speed
. += get_total_component_slowdown()
. += get_stamina_slowdown()
if(module_active && istype(module_active,/obj/item/borg/destroyer/mobility))
. -= 3
. += GLOB.configuration.movement.robot_delay
log_debug("total slowdown: [.]")

/mob/living/silicon/robot/mob_negates_gravity()
return HAS_TRAIT(src, TRAIT_MAGPULSE)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/silicon/robot/robot_update_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
if(!is_component_functioning("actuator") || !is_component_functioning("power cell") || HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStunned() || IsWeakened() || getOxyLoss() > maxHealth * 0.5) // Borgs need to be able to sleep for adminfreeze
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]")
Expand All @@ -23,11 +23,11 @@
WakeUp()
create_debug_log("woke up, trigger reason: [reason]")
else
if(health > 0 && !suiciding)
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, re-enter if you want to continue!</span> (Verbs -> Ghost -> Re-enter corpse)")
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]")
Expand Down
2 changes: 0 additions & 2 deletions code/modules/mob/living/silicon/silicon_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,8 @@
switch(severity)
if(EMP_HEAVY)
take_organ_damage(20)
Stun(16 SECONDS)
if(EMP_LIGHT)
take_organ_damage(10)
Stun(6 SECONDS)
flash_eyes(affect_silicon = 1)
to_chat(src, "<span class='danger'>*BZZZT*</span>")
to_chat(src, "<span class='warning'>Warning: Electromagnetic pulse detected.</span>")
Expand Down
Loading