updates all BODYPART_ORGANIC occurances

:)
This commit is contained in:
DeltaFire
2020-10-06 18:01:25 +02:00
parent 4146566af0
commit 06cb91ca3d
13 changed files with 41 additions and 33 deletions

View File

@@ -228,7 +228,7 @@
for(var/BP in PP.bodyparts)
var/obj/item/bodypart/NN = BP
if(NN.status == BODYPART_ORGANIC && NN.species_id != "plasmaman") //getting every organic, non-plasmaman limb (augments/androids are immune to this)
if(NN.is_organic_limb() && NN.species_id != "plasmaman") //getting every organic, non-plasmaman limb (augments/androids are immune to this)
plasma_parts += NN
if(NN.is_robotic_limb(FALSE))
robo_parts += NN

View File

@@ -80,7 +80,7 @@
I.do_stagger_action(src, user, totitemdamage)
if(I.force)
apply_damage(totitemdamage, I.damtype, affecting, wound_bonus = I.wound_bonus, bare_wound_bonus = I.bare_wound_bonus, sharpness = I.get_sharpness()) //CIT CHANGE - replaces I.force with totitemdamage
if(I.damtype == BRUTE && affecting.status == BODYPART_ORGANIC)
if(I.damtype == BRUTE && affecting.is_organic_limb(FALSE))
var/basebloodychance = affecting.brute_dam + totitemdamage
if(prob(basebloodychance))
I.add_mob_blood(src)

View File

@@ -1651,7 +1651,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/bloody = 0
if(((I.damtype == BRUTE) && I.force && prob(25 + (I.force * 2))))
if(affecting.status == BODYPART_ORGANIC)
if(affecting.is_organic_limb(FALSE))
I.add_mob_blood(H) //Make the weapon bloody, not the person.
if(prob(I.force * 2)) //blood spatter!
bloody = 1

View File

@@ -688,7 +688,7 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
continue
. += "-[BP.body_zone]"
if(BP.status == BODYPART_ORGANIC)
if(BP.is_organic_limb(FALSE))
. += "-organic"
else
. += "-robotic"

View File

@@ -259,7 +259,7 @@
. += "-digitigrade[BP.use_digitigrade]"
if(BP.animal_origin)
. += "-[BP.animal_origin]"
if(BP.status == BODYPART_ORGANIC)
if(BP.is_organic_limb(FALSE))
. += "-organic"
else
. += "-robotic"

View File

@@ -391,10 +391,12 @@
if(!affecting)
to_chat(user, "<span class='warning'>The limb is missing!</span>")
return
if(affecting.status != BODYPART_ORGANIC)
if(!affecting.is_organic_limb())
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
return
else if(!affecting.is_organic_limb(FALSE) && mode != HYPO_INJECT)
to_chat(user, "<span class='notice'>Biomechanical limbs can only be treated via their integrated injection port, not via spraying!</span>")
return
//Always log attemped injections for admins
var/contained = vial.reagents.log_list()
log_combat(user, L, "attemped to inject", src, addition="which had [contained]")

View File

@@ -46,9 +46,11 @@
return
if(!L.can_inject(user, TRUE, user.zone_selected, FALSE, TRUE)) //stopped by clothing, like patches
return
if(affecting.status != BODYPART_ORGANIC)
if(!affecting.is_organic_limb())
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
return
else if(!affecting.is_organic_limb(FALSE))
to_chat(user, "<span class='notice'>Medical sprays won't work on a biomechanical limb!</span>")
if(L == user)
L.visible_message("<span class='notice'>[user] attempts to [apply_method] [src] on [user.p_them()]self.</span>")

View File

@@ -19,8 +19,10 @@
return
if(!L.can_inject(user, TRUE, user.zone_selected, FALSE, TRUE)) //stopped by clothing, not by species immunity.
return
if(affecting.status != BODYPART_ORGANIC)
if(!affecting.is_organic_limb())
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
else if(!affecting.is_organic_limb(FALSE))
to_chat(user, "<span class='notice'>Medical patches won't work on a biomechanical limb!</span>")
return
..()

View File

@@ -745,7 +745,7 @@
if(burnstate)
. += image('icons/mob/dam_mob.dmi', "[dmg_overlay_type]_[body_zone]_0[burnstate]", -DAMAGE_LAYER, image_dir)
if(!isnull(body_markings) && status == BODYPART_ORGANIC)
if(!isnull(body_markings) && is_organic_limb(FALSE))
if(!use_digitigrade)
if(body_zone == BODY_ZONE_CHEST)
. += image(body_markings_icon, "[body_markings]_[body_zone]_[icon_gender]", -MARKING_LAYER, image_dir)
@@ -922,7 +922,7 @@
update_disabled()
/obj/item/bodypart/proc/get_bleed_rate()
if(status != BODYPART_ORGANIC) // maybe in the future we can bleed oil from aug parts, but not now
if(!is_organic_limb()) // maybe in the future we can bleed oil from aug parts, but not now
return
var/bleed_rate = 0
if(generic_bleedstacks > 0)

View File

@@ -10,14 +10,14 @@
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = BODYPART_ORGANIC
requires_bodypart_type = 0
/datum/surgery_step/fix_brain
name = "fix brain"
implements = list(TOOL_HEMOSTAT = 85, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
time = 120 //long and complicated
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
if(!B)
if(!B || istype(B, /obj/item/organ/brain/ipc))
return FALSE
return TRUE

View File

@@ -27,15 +27,16 @@
if(!S.requires_bodypart)
continue
if(S.requires_bodypart_type) //ugly but it'll do.
if(S.requires_bodypart_type == BODYPART_ORGANIC)
if(!affecting.is_organic_limb(FALSE))
continue
else if(S.requires_bodypart_type == BODYPART_ROBOTIC)
if(!affecting.is_robotic_limb())
continue
else if(S.requires_bodypart_type == BODYPART_HYBRID)
if(!affecting.is_organic_limb() || !affecting.is_robotic_limb())
continue
switch(S.requires_bodypart_type)
if(BODYPART_ORGANIC)
if(!affecting.is_organic_limb(FALSE))
continue
if(BODYPART_ROBOTIC)
if(!affecting.is_robotic_limb())
continue
if(BODYPART_HYBRID)
if(!affecting.is_organic_limb() || !affecting.is_robotic_limb())
continue
if(S.requires_real_bodypart && affecting.is_pseudopart)
continue
else if(C && S.requires_bodypart) //mob with no limb in surgery zone when we need a limb
@@ -67,15 +68,16 @@
if(!S.requires_bodypart)
return
if(S.requires_bodypart_type) //*scream
if(S.requires_bodypart_type == BODYPART_ORGANIC)
if(!affecting.is_organic_limb(FALSE))
return
else if(S.requires_bodypart_type == BODYPART_ROBOTIC)
if(!affecting.is_robotic_limb())
return
else if(S.requires_bodypart_type == BODYPART_HYBRID)
if(!affecting.is_organic_limb() || !affecting.is_robotic_limb())
return
switch(S.requires_bodypart_type)
if(BODYPART_ORGANIC)
if(!affecting.is_organic_limb(FALSE))
return
if(BODYPART_ROBOTIC)
if(!affecting.is_robotic_limb())
return
if(BODYPART_HYBRID)
if(!affecting.is_organic_limb() || !affecting.is_robotic_limb())
return
else if(C && S.requires_bodypart)
return
if(S.lying_required && !(M.lying))