A lot of IPC rework bugfixes. (#22561)

- bugfix: "Synthetic external armour now deteriorates with the actual
damage taken. Previously, the calculation led to the armour instead
taking less damage the less it was blocked."
- bugfix: "Fixing the synthetic endoskeleton now fixes the permanent
paincrit effect on IPCs. This was caused by the self preservation status
being toggled when the endoskeleton was destroyed, but it was never
reset when the endoskeleton was fixed."
- bugfix: "Species components are now added and removed properly,
meaning you can switch from IPC to human and back and forth as a
mercenary once more."
- bugfix: "The Bishop internal PDA now uses your actual ID on your
person as its own ID."
- bugfix: "Fixed the endoskeleton welder repair surgery. You can do this
surgery by using a welder while aiming chest and after having opened the
chest fully."
- bugfix: "The endoskeleton now takes damage from EMPs as well. This
should make them A LOT more effective against IPCs."
  - qol: "The posibrain will now show up in diagnostics."
- rscadd: "Posibrains can now be destroyed by hitting them. This will
completely kill the IPC's consciousness!"

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2026-06-01 10:32:39 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 4e2a68bdef
commit 7978efa75f
13 changed files with 126 additions and 14 deletions
@@ -62,6 +62,11 @@
electronics.heal_damage(electronics.max_integrity)
integrity_event_cooldown = initial(integrity_event_cooldown)
/obj/item/organ/internal/machine/heal_damage(amount)
. = ..()
if(initial(diagnostics_suite_visible) && !diagnostics_suite_visible)
diagnostics_suite_visible = TRUE
/obj/item/organ/internal/machine/process(seconds_per_tick)
..()
if(!owner)
@@ -107,11 +112,17 @@
/obj/item/organ/internal/machine/emp_act(severity)
. = ..()
var/damage_taken
switch(severity)
if(EMP_HEAVY)
take_internal_damage(4 * emp_coeff)
damage_taken = 15 * emp_coeff
take_internal_damage(damage_taken)
if(EMP_LIGHT)
take_internal_damage(2 * emp_coeff)
damage_taken = 10 * emp_coeff
take_internal_damage(damage_taken)
if(damage_taken)
SEND_SIGNAL(owner, COMSIG_DAMAGE_TO_ENDOSKELETON, damage_taken)
/**
* Called when prefs are synced to the organ to set the proper synthetic organ preset. Turns the pref into a preset singleton.
@@ -7,7 +7,6 @@
parent_organ = BP_HEAD
vital = TRUE
robotic_sprite = FALSE
diagnostics_suite_visible = FALSE
emp_coeff = 0.5
@@ -15,6 +14,9 @@
relative_size = 85
maxhealth = OBJECT_HEALTH_MEDIUM
should_use_health = TRUE
/// The type of 'robotic brain'. Must be a subtype of /obj/item/mmi/digital.
var/robotic_brain_type = /obj/item/mmi/digital/posibrain
/// The stored MMI object.
@@ -61,6 +63,13 @@
QDEL_NULL(sizzle)
return ..()
/obj/item/organ/internal/machine/posibrain/on_death(damage, damage_flags, damage_type, armor_penetration, obj/weapon)
playsound(src, SFX_BREAK_GLASS, 100, 1)
visible_message(SPAN_DANGER("\The [src] shatters spectacularly into a million pieces!"))
to_chat(owner, SPAN_DANGER("Your vision goes dark as your posibrain is destroyed, and your consciousness ceases to be."))
new /obj/effect/decal/cleanable/blood/gibs/robot(get_turf(src))
. = ..()
/obj/item/organ/internal/machine/posibrain/rejuvenate()
. = ..()
SEND_SIGNAL(owner, COMSIG_SYNTH_ENDOSKELETON_FULL_REPAIR)
@@ -75,6 +75,11 @@
else
crash_with("Something terrible happened in synthetic internal PDA init! Loc: [loc]")
/obj/item/modular_computer/handheld/pda/synthetic_internal/GetID()
var/obj/item/organ/internal/machine/wireless_access/access_point = loc
if(access_point.owner)
return access_point.owner.GetIdCard()
/obj/item/modular_computer/handheld/pda/synthetic_internal/Destroy()
if(access_point)
access_point.internal_pda = null
+1 -1
View File
@@ -505,7 +505,7 @@
add_pain(0.6 * burn + 0.4 * brute)
if(owner)
SEND_SIGNAL(owner, COMSIG_EXTERNAL_ORGAN_DAMAGE, burn + brute)
SEND_SIGNAL(owner, COMSIG_DAMAGE_TO_ENDOSKELETON, burn + brute)
//If there are still hurties to dispense
if (spillover)