mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Fixes IPC and Diona Knockdown Immunity
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(affected == null)
|
||||
return 0
|
||||
if(affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
if(affected.status & ORGAN_ROBOT)
|
||||
return 0
|
||||
return 1
|
||||
@@ -215,8 +213,6 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(affected == null)
|
||||
return 0
|
||||
if(affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
return !affected.cannot_amputate
|
||||
|
||||
/datum/surgery_step/generic/amputate/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
@@ -165,10 +165,6 @@
|
||||
H.h_style = "Bald"
|
||||
H.f_style = "Shaved"
|
||||
target.m_styles["head"] = "None"
|
||||
E.status &= ~ORGAN_DESTROYED
|
||||
if(E.children)
|
||||
for(var/obj/item/organ/external/C in E.children)
|
||||
C.status &= ~ORGAN_DESTROYED
|
||||
|
||||
|
||||
/datum/surgery_step/limb/connect
|
||||
@@ -197,10 +193,6 @@
|
||||
var/obj/item/organ/external/E = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] has connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>", \
|
||||
"<span class='notice'>You have connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>")
|
||||
E.status &= ~ORGAN_DESTROYED
|
||||
if(E.children)
|
||||
for(var/obj/item/organ/external/C in E.children)
|
||||
C.status &= ~ORGAN_DESTROYED
|
||||
target.update_body()
|
||||
target.updatehealth()
|
||||
target.UpdateDamageIcon()
|
||||
@@ -251,10 +243,6 @@
|
||||
var/new_limb_type = organ_data["path"]
|
||||
var/obj/item/organ/external/new_limb = new new_limb_type(target)
|
||||
new_limb.robotize(L.model_info)
|
||||
new_limb.status &= ~ORGAN_DESTROYED
|
||||
if(new_limb.children)
|
||||
for(var/obj/item/organ/external/C in new_limb.children)
|
||||
C.status &= ~ORGAN_DESTROYED
|
||||
if(L.sabotaged)
|
||||
new_limb.sabotaged = 1
|
||||
target.update_body()
|
||||
|
||||
@@ -195,7 +195,7 @@ var/list/organ_cache = list()
|
||||
return damage >= min_bruised_damage
|
||||
|
||||
/obj/item/organ/proc/is_broken()
|
||||
return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
|
||||
return (damage >= min_broken_damage || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
|
||||
|
||||
//Germs
|
||||
/obj/item/organ/proc/handle_antibiotics()
|
||||
@@ -243,14 +243,12 @@ var/list/organ_cache = list()
|
||||
robotic = 2
|
||||
status &= ~ORGAN_BROKEN
|
||||
status &= ~ORGAN_SPLINTED
|
||||
status &= ~ORGAN_CUT_AWAY
|
||||
status &= ~ORGAN_DESTROYED
|
||||
status |= ORGAN_ROBOT
|
||||
status |= ORGAN_ASSISTED
|
||||
|
||||
/obj/item/organ/proc/mechassist() //Used to add things like pacemakers, etc
|
||||
robotize(1) //Skip the icon/name setting that occurs in robotize to avoid having to reset the icon file.
|
||||
status &= ~ORGAN_ROBOT
|
||||
status |= ORGAN_ASSISTED
|
||||
robotic = 1
|
||||
min_bruised_damage = 15
|
||||
min_broken_damage = 35
|
||||
|
||||
@@ -114,7 +114,6 @@
|
||||
var/obj/item/removing = pick(contents)
|
||||
var/obj/item/organ/internal/O = removing
|
||||
if(istype(O))
|
||||
O.status |= ORGAN_CUT_AWAY
|
||||
if(!O.sterile)
|
||||
spread_germs_to_organ(O,user, W) // This wouldn't be any cleaner than the actual surgery
|
||||
user.put_in_hands(removing)
|
||||
@@ -143,7 +142,6 @@
|
||||
|
||||
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
|
||||
owner = target
|
||||
status = status & ~ORGAN_DESTROYED
|
||||
forceMove(owner)
|
||||
if(istype(owner))
|
||||
if(!isnull(owner.bodyparts_by_name[limb_name]))
|
||||
@@ -179,9 +177,6 @@
|
||||
if((brute <= 0) && (burn <= 0))
|
||||
return 0
|
||||
|
||||
if(status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
|
||||
if(!ignore_resists)
|
||||
brute *= brute_mod
|
||||
burn *= burn_mod
|
||||
@@ -325,12 +320,6 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
/obj/item/organ/external/process()
|
||||
if(owner)
|
||||
if(parent)
|
||||
if(parent.status & ORGAN_DESTROYED)
|
||||
status |= ORGAN_DESTROYED
|
||||
owner.update_body(1)
|
||||
return
|
||||
|
||||
//Chem traces slowly vanish
|
||||
if(owner.life_tick % 10 == 0)
|
||||
for(var/chemID in trace_chemicals)
|
||||
@@ -367,7 +356,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
*/
|
||||
/obj/item/organ/external/proc/update_germs()
|
||||
|
||||
if(status & (ORGAN_ROBOT|ORGAN_DESTROYED) || (IS_PLANT in owner.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
if((status & ORGAN_ROBOT) || (IS_PLANT in owner.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
@@ -447,9 +436,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
// new damage icon system
|
||||
// returns just the brute/burn damage code
|
||||
/obj/item/organ/external/proc/damage_state_text()
|
||||
if(status & ORGAN_DESTROYED)
|
||||
return "--"
|
||||
|
||||
var/tburn = 0
|
||||
var/tbrute = 0
|
||||
|
||||
@@ -650,7 +636,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
/obj/item/organ/external/proc/is_usable()
|
||||
if(((status & ORGAN_ROBOT) && get_damage() >= max_damage) && !tough) //robot limbs just become inoperable at max damage
|
||||
return
|
||||
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
|
||||
return !(status & (ORGAN_MUTATED|ORGAN_DEAD))
|
||||
|
||||
/obj/item/organ/external/proc/is_malfunctioning()
|
||||
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam) && !tough)
|
||||
@@ -670,8 +656,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
. = ..()
|
||||
|
||||
status |= ORGAN_DESTROYED
|
||||
|
||||
// Attached organs also fly off.
|
||||
if(!ignore_children)
|
||||
for(var/obj/item/organ/external/O in children)
|
||||
|
||||
@@ -172,7 +172,7 @@ var/global/list/limb_icon_cache = list()
|
||||
gender = "f"
|
||||
else
|
||||
gender = "m"
|
||||
if(limb_name == "head" && !(status & ORGAN_DESTROYED))
|
||||
if(limb_name == "head")
|
||||
var/obj/item/organ/external/head/head_organ = src
|
||||
head_organ.handle_alt_icon()
|
||||
|
||||
|
||||
@@ -264,8 +264,6 @@
|
||||
user.visible_message("<span class='notice'> [user] has transplanted [tool] into [target]'s [parse_zone(target_zone)].</span>",
|
||||
"<span class='notice'> You have transplanted [tool] into [target]'s [parse_zone(target_zone)].</span>")
|
||||
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
else if(current_type == "extract")
|
||||
var/mob/living/simple_animal/borer/B = target.has_brain_worms()
|
||||
if(target_zone == "head" && B && B.host == target)
|
||||
@@ -280,7 +278,6 @@
|
||||
|
||||
add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
|
||||
spread_germs_to_organ(I, user, tool)
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
var/obj/item/thing = I.remove(target)
|
||||
if(!istype(thing))
|
||||
thing.forceMove(get_turf(target))
|
||||
|
||||
@@ -56,8 +56,6 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(affected == null)
|
||||
return 0
|
||||
if(affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/robotics/external
|
||||
@@ -443,8 +441,6 @@
|
||||
user.visible_message("<span class='notice'> [user] has reattached [target]'s [I].</span>" , \
|
||||
"<span class='notice'> You have reattached [target]'s [I].</span>")
|
||||
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
else if(current_type == "install")
|
||||
user.visible_message("<span class='notice'> [user] has installed \the [tool] into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'> You have installed \the [tool] into [target]'s [affected.name].</span>")
|
||||
@@ -461,7 +457,6 @@
|
||||
|
||||
add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
|
||||
spread_germs_to_organ(I, user)
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
var/obj/item/thing = I.remove(target)
|
||||
if(!istype(thing))
|
||||
thing.forceMove(get_turf(target))
|
||||
|
||||
Reference in New Issue
Block a user