Fixes IPC and Diona Knockdown Immunity

This commit is contained in:
Fox-McCloud
2017-07-20 21:01:55 -04:00
parent 3aa2558b98
commit 02f74932e2
25 changed files with 76 additions and 124 deletions
+2 -4
View File
@@ -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
+2 -18
View File
@@ -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)
+1 -1
View File
@@ -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()