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

Reworks CNS Implant + Emagged Upgraded Cybernetic Heart #18202

Merged
merged 7 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
4 changes: 2 additions & 2 deletions code/datums/outfits/outfit_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/eyes/hud/security,
/obj/item/organ/internal/eyes/cybernetic/xray,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened,
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/arm/combat/centcom
)
Expand Down Expand Up @@ -725,7 +725,7 @@
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/eyes/hud/security,
/obj/item/organ/internal/cyberimp/chest/nutriment/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened,
/obj/item/organ/internal/cyberimp/arm/flash,
/obj/item/organ/internal/eyes/cybernetic/shield
)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/uplink_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1621,9 +1621,9 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))

/datum/uplink_item/cyber_implants/antistun
name = "Hardened CNS Rebooter Implant"
desc = "This implant will help you get back up on your feet faster after being stunned. It is immune to EMP attacks. Comes with an autosurgeon."
desc = "This implant will help you get back up on your feet faster after being fatigued. It is immune to EMP attacks. Comes with an autosurgeon."
reference = "CIAS"
item = /obj/item/autosurgeon/organ/syndicate/anti_stun
item = /obj/item/autosurgeon/organ/syndicate/anti_stam
cost = 12

/datum/uplink_item/cyber_implants/reviver
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/central.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
)
cybernetic_implants = list(
/obj/item/organ/internal/eyes/cybernetic/xray/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened,
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/arm/combat/centcom
)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/projectiles/projectile/beams.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_CYAN

/obj/item/projectile/beam/disabler/on_hit(atom/target, blocked, hit_zone)
hal9000PR marked this conversation as resolved.
Show resolved Hide resolved
. = ..()
if(isliving(target))
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK, 15)

/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/research/designs/medical_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,13 @@

/datum/design/cyberimp_antistun
name = "CNS Rebooter implant"
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned. Incompatible with the Neural Jumpstarter."
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when fatigued. Incompatible with the Neural Jumpstarter."
id = "ci-antistun"
req_tech = list("materials" = 6, "programming" = 5, "biotech" = 6)
build_type = PROTOLATHE | MECHFAB
construction_time = 60
materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 500, MAT_GOLD = 1000)
build_path = /obj/item/organ/internal/cyberimp/brain/anti_stun
build_path = /obj/item/organ/internal/cyberimp/brain/anti_stam
category = list("Medical")

/datum/design/cyberimp_antisleep
Expand Down
12 changes: 6 additions & 6 deletions code/modules/response_team/ert_outfits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/eyes/hud/security,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened,
/obj/item/organ/internal/cyberimp/arm/flash
)

Expand Down Expand Up @@ -198,7 +198,7 @@
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/eyes/hud/security,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened,
/obj/item/organ/internal/cyberimp/arm/telebaton,
/obj/item/organ/internal/cyberimp/chest/reviver/hardened
)
Expand Down Expand Up @@ -282,7 +282,7 @@
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/eyes/hud/security,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened,
/obj/item/organ/internal/eyes/cybernetic/shield,
/obj/item/organ/internal/cyberimp/arm/toolset
)
Expand Down Expand Up @@ -389,7 +389,7 @@
/obj/item/organ/internal/cyberimp/arm/medibeam,
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/eyes/hud/medical,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened
)

implants = list(/obj/item/implant/mindshield,
Expand Down Expand Up @@ -456,7 +456,7 @@
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/eyes/hud/security,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened
)

implants = list(/obj/item/implant/mindshield,
Expand Down Expand Up @@ -528,7 +528,7 @@
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened,
/obj/item/organ/internal/cyberimp/arm/advmop,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened
)

implants = list(/obj/item/implant/mindshield,
Expand Down
36 changes: 18 additions & 18 deletions code/modules/surgery/organs/augments_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
/obj/item/organ/internal/cyberimp/brain/emp_act(severity)
if(!owner || emp_proof)
return
var/stun_amount = (5 + (severity-1 ? 0 : 5)) STATUS_EFFECT_CONSTANT
owner.Stun(stun_amount)
var/weaken_time = (5 + (severity-1 ? 0 : 5)) STATUS_EFFECT_CONSTANT
ItsMarmite marked this conversation as resolved.
Show resolved Hide resolved
owner.Weaken(weaken_time)
to_chat(owner, "<span class='warning'>Your body seizes up!</span>")
return stun_amount
return weaken_time


/obj/item/organ/internal/cyberimp/brain/anti_drop
Expand Down Expand Up @@ -120,42 +120,42 @@
ui_action_click()
return ..()

/obj/item/organ/internal/cyberimp/brain/anti_stun
/obj/item/organ/internal/cyberimp/brain/anti_stam
name = "CNS Rebooter implant"
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned. Incompatible with the Neural Jumpstarter."
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when fatigued. Incompatible with the Neural Jumpstarter."
implant_color = "#FFFF00"
slot = "brain_antistun"
origin_tech = "materials=5;programming=4;biotech=5"
var/stun_max_amount = 4 SECONDS

/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened
var/last_stamina_damage = 0
var/max_stamina_increment = 40
ItsMarmite marked this conversation as resolved.
Show resolved Hide resolved
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened
name = "Hardened CNS Rebooter implant"
emp_proof = TRUE

/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened/Initialize(mapload)
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened/Initialize(mapload)
. = ..()
desc += " The implant has been hardened. It is invulnerable to EMPs."
ItsMarmite marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/organ/internal/cyberimp/brain/anti_stun/on_life()
/obj/item/organ/internal/cyberimp/brain/anti_stam/on_life()
..()
if(crit_fail)
return
if(owner.AmountStun() > stun_max_amount)
owner.SetStunned(stun_max_amount)
if(owner.AmountWeakened() > stun_max_amount)
owner.SetWeakened(stun_max_amount)
if(last_stamina_damage + max_stamina_increment < owner.getStaminaLoss())
owner.setStaminaLoss(last_stamina_damage + max_stamina_increment)
last_stamina_damage = owner.getStaminaLoss()


/obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity)
/obj/item/organ/internal/cyberimp/brain/anti_stam/emp_act(severity)
..()
if(crit_fail || emp_proof)
return
crit_fail = TRUE
addtimer(CALLBACK(src, .proc/reboot), 90 / severity)

/obj/item/organ/internal/cyberimp/brain/anti_stun/proc/reboot()
/obj/item/organ/internal/cyberimp/brain/anti_stam/proc/reboot()
crit_fail = FALSE

/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened
name = "Hardened CNS Rebooter implant"
desc = "A military-grade version of the standard implant, for NT's more elite forces."
origin_tech = "materials=6;programming=5;biotech=5"
Expand Down Expand Up @@ -443,7 +443,7 @@
var/list/boxed = list(
/obj/item/autosurgeon/organ/syndicate/thermal_eyes,
/obj/item/autosurgeon/organ/syndicate/xray_eyes,
/obj/item/autosurgeon/organ/syndicate/anti_stun,
/obj/item/autosurgeon/organ/syndicate/anti_stam,
/obj/item/autosurgeon/organ/syndicate/reviver)
var/amount = 5

Expand Down
4 changes: 2 additions & 2 deletions code/modules/surgery/organs/autosurgeon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
/obj/item/autosurgeon/organ/syndicate/xray_eyes
starting_organ = /obj/item/organ/internal/eyes/cybernetic/xray/hardened

/obj/item/autosurgeon/organ/syndicate/anti_stun
starting_organ = /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened
/obj/item/autosurgeon/organ/syndicate/anti_stam
starting_organ = /obj/item/organ/internal/cyberimp/brain/anti_stam/hardened

/obj/item/autosurgeon/organ/syndicate/reviver
starting_organ = /obj/item/organ/internal/cyberimp/chest/reviver/hardened
Expand Down
4 changes: 1 addition & 3 deletions code/modules/surgery/organs/heart.dm
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,11 @@

if(!(status & ORGAN_DEAD))
var/boost = emagged ? 2 : 1
owner.AdjustDrowsy(-8 SECONDS * boost)
owner.AdjustParalysis(-2 SECONDS * boost)
owner.AdjustStunned(-2 SECONDS * boost)
owner.AdjustWeakened(-2 SECONDS * boost)
owner.AdjustKnockDown(-2 SECONDS * boost)
owner.SetSleeping(0)
owner.adjustStaminaLoss(-1 * boost)
owner.adjustStaminaLoss(-10 * boost)


/obj/item/organ/internal/heart/cybernetic/upgraded/proc/message_to_owner(mob/M, message)
Expand Down