Merge pull request #13528 from DeltaFire15/robotic-limbs-PT2
Robotic limbs 2 : Threshhold Boogaloo
This commit is contained in:
@@ -55,6 +55,10 @@
|
||||
|
||||
#define BODYPART_ORGANIC 1
|
||||
#define BODYPART_ROBOTIC 2
|
||||
#define BODYPART_HYBRID 3
|
||||
|
||||
#define HYBRID_BODYPART_DAMAGE_THRESHHOLD 25 //How much damage has to be suffered until the damage threshhold counts as passed
|
||||
#define HYBRID_BODYPART_THESHHOLD_MINDAMAGE 15 //Which damage value this limb cannot be healed out of via easy nonsurgical means if the threshhold has been passed, state resets if damage value goes below mindamage.
|
||||
|
||||
#define BODYPART_NOT_DISABLED 0
|
||||
#define BODYPART_DISABLED_DAMAGE 1
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
|
||||
if(!istype(O))
|
||||
return
|
||||
if(O.status == BODYPART_ROBOTIC)
|
||||
if(O.is_robotic_limb())
|
||||
return
|
||||
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET) || (H.shoes && (H.shoes.body_parts_covered & FEET)))
|
||||
|
||||
@@ -49,7 +49,7 @@ BONUS
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
var/picked_bodypart = pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
|
||||
var/obj/item/bodypart/bodypart = M.get_bodypart(picked_bodypart)
|
||||
if(bodypart && bodypart.status == BODYPART_ORGANIC && !bodypart.is_pseudopart) //robotic limbs will mean less scratching overall
|
||||
if(bodypart && bodypart.is_organic_limb() && !bodypart.is_pseudopart) //robotic limbs will mean less scratching overall
|
||||
var/can_scratch = scratch && !M.incapacitated() && get_location_accessible(M, picked_bodypart)
|
||||
M.visible_message("[can_scratch ? "<span class='warning'>[M] scratches [M.p_their()] [bodypart.name].</span>" : ""]", "<span class='warning'>Your [bodypart.name] itches. [can_scratch ? " You scratch it." : ""]</span>")
|
||||
if(can_scratch)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
/// Used to "load" a persistent scar
|
||||
/datum/scar/proc/load(obj/item/bodypart/BP, version, description, specific_location, severity=WOUND_SEVERITY_SEVERE)
|
||||
if(!(BP.body_zone in applicable_zones) || !(BP.is_organic_limb() || BP.render_like_organic))
|
||||
if(!(BP.body_zone in applicable_zones) || !BP.is_organic_limb())
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
* * smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
|
||||
*/
|
||||
/datum/wound/proc/apply_wound(obj/item/bodypart/L, silent = FALSE, datum/wound/old_wound = null, smited = FALSE)
|
||||
if(!istype(L) || !L.owner || !(L.body_zone in viable_zones) || isalien(L.owner) || !(L.is_organic_limb() || L.render_like_organic))
|
||||
if(!istype(L) || !L.owner || !(L.body_zone in viable_zones) || isalien(L.owner) || !L.is_organic_limb())
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
else if(istype(O, /obj/item/bodypart))
|
||||
var/obj/item/bodypart/B = O
|
||||
if(B.status != BODYPART_ROBOTIC)
|
||||
if(!B.is_robotic_limb(FALSE))
|
||||
to_chat(user, "<span class='warning'>The machine only accepts cybernetics!</span>")
|
||||
return
|
||||
if(storedpart)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR
|
||||
if(affecting.is_organic_limb(FALSE)) //Limb must be organic to be healed - RR
|
||||
if(affecting.brute_dam && brute || affecting.burn_dam && burn)
|
||||
user.visible_message("<span class='green'>[user] applies \the [src] on [C]'s [affecting.name].</span>", "<span class='green'>You apply \the [src] on [C]'s [affecting.name].</span>")
|
||||
if(affecting.heal_damage(brute, burn))
|
||||
|
||||
@@ -103,7 +103,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
/obj/item/storage/book/bible/proc/bless(mob/living/carbon/human/H, mob/living/user)
|
||||
for(var/X in H.bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(BP.status == BODYPART_ROBOTIC)
|
||||
if(BP.is_robotic_limb())
|
||||
to_chat(user, "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>")
|
||||
return 0
|
||||
|
||||
|
||||
@@ -109,18 +109,25 @@
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
|
||||
//only heal to 25 if limb is damaged to or past 25 brute, otherwise heal normally
|
||||
var/difference = affecting.brute_dam - 25
|
||||
if(affecting && affecting.is_robotic_limb() && user.a_intent != INTENT_HARM)
|
||||
//only heal to threshhold_passed_mindamage if limb is damaged to or past threshhold, otherwise heal normally
|
||||
var/damage
|
||||
var/heal_amount = 15
|
||||
if(difference >= 0)
|
||||
heal_amount = difference
|
||||
|
||||
if(src.use_tool(H, user, 0, volume=50, amount=1))
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>",
|
||||
"<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
damage = affecting.brute_dam
|
||||
affecting.update_threshhold_state(burn = FALSE)
|
||||
if(affecting.threshhold_brute_passed)
|
||||
heal_amount = min(heal_amount, damage - affecting.threshhold_passed_mindamage)
|
||||
|
||||
if(!heal_amount)
|
||||
to_chat(user, "<span class='notice'>[user == H ? "Your" : "[H]'s"] [affecting.name] appears to have suffered severe internal damage and requires surgery to repair further.</span>")
|
||||
return
|
||||
item_heal_robotic(H, user, heal_amount, 0)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(!limb)
|
||||
replace_limb(zone)
|
||||
return
|
||||
if((limb.get_damage() >= (limb.max_damage / 2)) || (limb.status == BODYPART_ROBOTIC))
|
||||
if((limb.get_damage() >= (limb.max_damage / 2)) || limb.is_robotic_limb(FALSE))
|
||||
replace_limb(zone, limb)
|
||||
return
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/bodypart/chest/chest = owner.get_bodypart(BODY_ZONE_CHEST)
|
||||
if((chest.get_damage() >= (chest.max_damage / 4)) || (chest.status == BODYPART_ROBOTIC))
|
||||
if((chest.get_damage() >= (chest.max_damage / 4)) || chest.is_robotic_limb(FALSE))
|
||||
replace_chest(chest)
|
||||
return
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
addtimer(CALLBACK(src, .proc/keep_replacing_blood), 30)
|
||||
|
||||
/obj/item/organ/heart/gland/heal/proc/replace_chest(obj/item/bodypart/chest/chest)
|
||||
if(chest.status == BODYPART_ROBOTIC)
|
||||
if(chest.is_robotic_limb(FALSE))
|
||||
owner.visible_message("<span class='warning'>[owner]'s [chest.name] rapidly expels its mechanical components, replacing them with flesh!</span>", "<span class='userdanger'>Your [chest.name] rapidly expels its mechanical components, replacing them with flesh!</span>")
|
||||
playsound(owner, 'sound/magic/clockwork/anima_fragment_attack.ogg', 50, TRUE)
|
||||
var/list/dirs = GLOB.alldirs.Copy()
|
||||
|
||||
@@ -228,9 +228,9 @@
|
||||
|
||||
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.status == BODYPART_ROBOTIC)
|
||||
if(NN.is_robotic_limb(FALSE))
|
||||
robo_parts += NN
|
||||
|
||||
if(prob(35)) //checking if the delay is over & if the victim actually has any parts to nom
|
||||
|
||||
@@ -2740,7 +2740,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(initial_spawn)
|
||||
//delete any existing prosthetic limbs to make sure no remnant prosthetics are left over - But DO NOT delete those that are species-related
|
||||
for(var/obj/item/bodypart/part in character.bodyparts)
|
||||
if(part.status == BODYPART_ROBOTIC && !part.render_like_organic)
|
||||
if(part.is_robotic_limb(FALSE))
|
||||
qdel(part)
|
||||
character.regenerate_limbs() //regenerate limbs so now you only have normal limbs
|
||||
for(var/modified_limb in modified_limbs)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/datum/sprite_accessory/xeno_head/is_not_visible(var/mob/living/carbon/human/H, var/tauric)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
return (!H.dna.features["xenohead"] || H.dna.features["xenohead"] == "None" || H.head && (H.head.flags_inv & HIDEHAIR) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)) || !HD || (HD.status == BODYPART_ROBOTIC && !HD.render_like_organic))
|
||||
return (!H.dna.features["xenohead"] || H.dna.features["xenohead"] == "None" || H.head && (H.head.flags_inv & HIDEHAIR) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)) || !HD || HD.is_robotic_limb(FALSE))
|
||||
|
||||
/datum/sprite_accessory/xeno_head/standard
|
||||
name = "Standard"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/datum/sprite_accessory/ears/is_not_visible(var/mob/living/carbon/human/H, var/tauric)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
return (!H.dna.features["ears"] || H.dna.features["ears"] == "None" || H.head && (H.head.flags_inv & HIDEEARS) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEEARS)) || !HD || (HD.status == BODYPART_ROBOTIC && !HD.render_like_organic))
|
||||
return (!H.dna.features["ears"] || H.dna.features["ears"] == "None" || H.head && (H.head.flags_inv & HIDEEARS) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEEARS)) || !HD || HD.is_robotic_limb(FALSE))
|
||||
|
||||
/datum/sprite_accessory/ears/none
|
||||
name = "None"
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
/datum/sprite_accessory/ears/mam_ears/is_not_visible(var/mob/living/carbon/human/H, var/tauric)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
return (!H.dna.features["mam_ears"] || H.dna.features["mam_ears"] == "None" || H.head && (H.head.flags_inv & HIDEEARS) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEEARS)) || !HD || (HD.status == BODYPART_ROBOTIC && !HD.render_like_organic))
|
||||
return (!H.dna.features["mam_ears"] || H.dna.features["mam_ears"] == "None" || H.head && (H.head.flags_inv & HIDEEARS) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEEARS)) || !HD || HD.is_robotic_limb(FALSE))
|
||||
|
||||
/datum/sprite_accessory/ears/mam_ears/none
|
||||
name = "None"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/datum/sprite_accessory/frills/is_not_visible(var/mob/living/carbon/human/H, var/tauric)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
return (!H.dna.features["frills"] || H.dna.features["frills"] == "None" || H.head && (H.head.flags_inv & HIDEEARS) || !HD || HD.status == BODYPART_ROBOTIC)
|
||||
return (!H.dna.features["frills"] || H.dna.features["frills"] == "None" || H.head && (H.head.flags_inv & HIDEEARS) || !HD || HD.is_robotic_limb(FALSE))
|
||||
|
||||
/datum/sprite_accessory/frills/none
|
||||
name = "None"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/datum/sprite_accessory/horns/is_not_visible(var/mob/living/carbon/human/H, var/tauric)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
return (!H.dna.features["horns"] || H.dna.features["horns"] == "None" || H.head && (H.head.flags_inv & HIDEHAIR) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)) || !HD || (HD.status == BODYPART_ROBOTIC && !HD.render_like_organic))
|
||||
return (!H.dna.features["horns"] || H.dna.features["horns"] == "None" || H.head && (H.head.flags_inv & HIDEHAIR) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)) || !HD || HD.is_robotic_limb(FALSE))
|
||||
|
||||
/datum/sprite_accessory/horns/none
|
||||
name = "None"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/datum/sprite_accessory/snouts/is_not_visible(var/mob/living/carbon/human/H, var/tauric)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
return ((H.wear_mask && (H.wear_mask.flags_inv & HIDESNOUT)) || (H.head && (H.head.flags_inv & HIDESNOUT)) || !HD || (HD.status == BODYPART_ROBOTIC && !HD.render_like_organic))
|
||||
return ((H.wear_mask && (H.wear_mask.flags_inv & HIDESNOUT)) || (H.head && (H.head.flags_inv & HIDESNOUT)) || !HD || HD.is_robotic_limb(FALSE))
|
||||
|
||||
/datum/sprite_accessory/snout/guilmon
|
||||
name = "Guilmon"
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
/datum/sprite_accessory/snouts/mam_snouts/is_not_visible(var/mob/living/carbon/human/H, var/tauric)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
return ((H.wear_mask && (H.wear_mask.flags_inv & HIDESNOUT)) || (H.head && (H.head.flags_inv & HIDESNOUT)) || !HD || (HD.status == BODYPART_ROBOTIC && !HD.render_like_organic))
|
||||
return ((H.wear_mask && (H.wear_mask.flags_inv & HIDESNOUT)) || (H.head && (H.head.flags_inv & HIDESNOUT)) || !HD || HD.is_robotic_limb(FALSE))
|
||||
|
||||
/datum/sprite_accessory/snouts/mam_snouts/none
|
||||
name = "None"
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
icon_state = "[initial(icon_state)]_impregnated"
|
||||
|
||||
var/obj/item/bodypart/chest/LC = target.get_bodypart(BODY_ZONE_CHEST)
|
||||
if((!LC || LC.status != BODYPART_ROBOTIC) && !target.getorgan(/obj/item/organ/body_egg/alien_embryo))
|
||||
if((!LC || !LC.is_robotic_limb(FALSE)) && !target.getorgan(/obj/item/organ/body_egg/alien_embryo))
|
||||
new /obj/item/organ/body_egg/alien_embryo(target)
|
||||
|
||||
else
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -169,11 +169,11 @@
|
||||
////////////////////////////////////////////
|
||||
|
||||
//Returns a list of damaged bodyparts
|
||||
/mob/living/carbon/proc/get_damaged_bodyparts(brute = FALSE, burn = FALSE, stamina = FALSE, status)
|
||||
/mob/living/carbon/proc/get_damaged_bodyparts(brute = FALSE, burn = FALSE, stamina = FALSE, list/status)
|
||||
var/list/obj/item/bodypart/parts = list()
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(status && BP.status != status)
|
||||
if(status && !status[BP.status])
|
||||
continue
|
||||
if((brute && BP.brute_dam) || (burn && BP.burn_dam) || (stamina && BP.stamina_dam))
|
||||
parts += BP
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
apply_status_effect(/datum/status_effect/no_combat_mode/robotic_emp, severity / 20)
|
||||
severity *= 0.5
|
||||
for(var/obj/item/bodypart/L in src.bodyparts)
|
||||
if(L.status == BODYPART_ROBOTIC)
|
||||
if(L.is_robotic_limb())
|
||||
if(!informed)
|
||||
to_chat(src, "<span class='userdanger'>You feel a sharp pain as your robotic limbs overload.</span>")
|
||||
informed = TRUE
|
||||
|
||||
@@ -372,8 +372,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if(ROBOTIC_LIMBS in species_traits)
|
||||
for(var/obj/item/bodypart/B in C.bodyparts)
|
||||
B.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE) // Makes all Bodyparts robotic.
|
||||
B.render_like_organic = TRUE
|
||||
B.change_bodypart_status(BODYPART_HYBRID, FALSE, TRUE) // Makes all Bodyparts 'robotic'.
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
|
||||
|
||||
@@ -418,8 +417,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if(ROBOTIC_LIMBS in species_traits)
|
||||
for(var/obj/item/bodypart/B in C.bodyparts)
|
||||
B.change_bodypart_status(BODYPART_ORGANIC, FALSE, TRUE)
|
||||
B.render_like_organic = FALSE
|
||||
B.change_bodypart_status(initial(B.status), FALSE, TRUE)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
|
||||
|
||||
@@ -441,7 +439,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/dynamic_fhair_suffix = ""
|
||||
|
||||
//for augmented heads
|
||||
if(HD.status == BODYPART_ROBOTIC && !HD.render_like_organic)
|
||||
if(HD.is_robotic_limb(FALSE))
|
||||
return
|
||||
|
||||
//we check if our hat or helmet hides our facial hair.
|
||||
@@ -1034,7 +1032,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return FALSE
|
||||
if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED))
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || !O.is_robotic_limb()))
|
||||
if(return_warning)
|
||||
return_warning[1] = "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
|
||||
return FALSE
|
||||
@@ -1076,7 +1074,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return FALSE
|
||||
if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED))
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || !O.is_robotic_limb()))
|
||||
if(return_warning)
|
||||
return_warning[1] = "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
|
||||
return FALSE
|
||||
@@ -1091,7 +1089,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_L_LEG)
|
||||
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || !O.is_robotic_limb()))
|
||||
if(return_warning)
|
||||
return_warning[1] = "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
|
||||
return FALSE
|
||||
@@ -1107,7 +1105,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_R_LEG)
|
||||
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || !O.is_robotic_limb()))
|
||||
if(return_warning)
|
||||
return_warning[1] = "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
|
||||
return FALSE
|
||||
@@ -1677,7 +1675,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
|
||||
|
||||
@@ -12,15 +12,3 @@
|
||||
species_language_holder = /datum/language_holder/synthetic
|
||||
limbs_id = "synth"
|
||||
species_category = SPECIES_CATEGORY_ROBOT
|
||||
|
||||
/datum/species/android/on_species_gain(mob/living/carbon/C)
|
||||
. = ..()
|
||||
for(var/X in C.bodyparts)
|
||||
var/obj/item/bodypart/O = X
|
||||
O.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE)
|
||||
|
||||
/datum/species/android/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
for(var/X in C.bodyparts)
|
||||
var/obj/item/bodypart/O = X
|
||||
O.change_bodypart_status(BODYPART_ORGANIC,FALSE, TRUE)
|
||||
|
||||
@@ -696,7 +696,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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -379,7 +379,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
/proc/item_heal_robotic(mob/living/carbon/human/H, mob/user, brute_heal, burn_heal)
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC)
|
||||
if(affecting && affecting.is_robotic_limb())
|
||||
var/dam //changes repair text based on how much brute/burn was supplied
|
||||
if(brute_heal > burn_heal)
|
||||
dam = 1
|
||||
|
||||
@@ -548,16 +548,23 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return ..()
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC)
|
||||
//only heal to 25 if limb is damaged to or past 25 burn, otherwise heal normally
|
||||
var/difference = affecting.burn_dam - 25
|
||||
if(affecting && affecting.is_robotic_limb())
|
||||
//only heal to threshhold_passed_mindamage if limb is damaged to or past threshhold, otherwise heal normally
|
||||
var/damage
|
||||
var/heal_amount = 15
|
||||
if(difference >= 0)
|
||||
heal_amount = difference
|
||||
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the wires in [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the wires in [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
damage = affecting.burn_dam
|
||||
affecting.update_threshhold_state(brute = FALSE)
|
||||
if(affecting.threshhold_burn_passed)
|
||||
heal_amount = min(heal_amount, damage - affecting.threshhold_passed_mindamage)
|
||||
|
||||
if(!heal_amount)
|
||||
to_chat(user, "<span class='notice'>[user == H ? "Your" : "[H]'s"] [affecting.name] appears to have suffered severe internal damage and requires surgery to repair further.</span>")
|
||||
return
|
||||
if(item_heal_robotic(H, user, 0, heal_amount))
|
||||
use(1)
|
||||
return
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
if(starting)
|
||||
splatter_dir = get_dir(starting, target_loca)
|
||||
var/obj/item/bodypart/B = L.get_bodypart(def_zone)
|
||||
if(B && B.status == BODYPART_ROBOTIC) // So if you hit a robotic, it sparks instead of bloodspatters
|
||||
if(B && B.is_robotic_limb()) // So if you hit a robotic, it sparks instead of bloodspatters - Hybrid limbs don't bleed from this as of now too, subject to balance.. probably.
|
||||
do_sparks(2, FALSE, target.loc)
|
||||
if(prob(25))
|
||||
new /obj/effect/decal/cleanable/oil(target_loca)
|
||||
|
||||
@@ -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]")
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
if(iscarbon(host_mob))
|
||||
var/mob/living/carbon/C = host_mob
|
||||
var/list/parts = C.get_damaged_bodyparts(TRUE, TRUE, status = BODYPART_ROBOTIC)
|
||||
var/list/parts = C.get_damaged_bodyparts(TRUE, TRUE, status = BODYPART_ROBOTIC | BODYPART_HYBRID)
|
||||
if(!parts.len)
|
||||
return FALSE
|
||||
else
|
||||
@@ -132,7 +132,7 @@
|
||||
/datum/nanite_program/repairing/active_effect(mob/living/M)
|
||||
if(iscarbon(host_mob))
|
||||
var/mob/living/carbon/C = host_mob
|
||||
var/list/parts = C.get_damaged_bodyparts(TRUE, TRUE, status = BODYPART_ROBOTIC)
|
||||
var/list/parts = C.get_damaged_bodyparts(TRUE, TRUE, status = BODYPART_ROBOTIC | BODYPART_HYBRID)
|
||||
if(!parts.len)
|
||||
return
|
||||
var/update = FALSE
|
||||
|
||||
@@ -71,7 +71,12 @@
|
||||
var/medium_burn_msg = "blistered"
|
||||
var/heavy_burn_msg = "peeling away"
|
||||
|
||||
var/render_like_organic = FALSE // forces limb to render as if it were an organic limb
|
||||
|
||||
//Some special vars for robotic bodyparts, in the base type to prevent needing typecasting / fancy checks.
|
||||
var/easy_heal_threshhold = -1 //If greater or equal to zero, if limb damage of a type passes this threshhold, it cannot be healed beyond threshhold_passed_mindamage. Only needed for robotic limbs, but is in the basetype to prevent needing spaghetti-checks.
|
||||
var/threshhold_passed_mindamage = 0 //If the threshhold got passed, what is the minimum damage this limb can be healed to? Loses the threshhold-passed state healing is started while below mindamage.
|
||||
var/threshhold_brute_passed = FALSE
|
||||
var/threshhold_burn_passed = FALSE //Ugly but neccessary vars that might get replaced with a flag lateron maybe sometime.
|
||||
|
||||
/// The wounds currently afflicting this body part
|
||||
var/list/wounds
|
||||
@@ -143,7 +148,7 @@
|
||||
|
||||
/obj/item/bodypart/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
if(status != BODYPART_ROBOTIC)
|
||||
if(!is_robotic_limb())
|
||||
playsound(get_turf(src), 'sound/misc/splort.ogg', 50, 1, -1)
|
||||
pixel_x = rand(-3, 3)
|
||||
pixel_y = rand(-3, 3)
|
||||
@@ -151,7 +156,7 @@
|
||||
//empties the bodypart from its organs and other things inside it
|
||||
/obj/item/bodypart/proc/drop_organs(mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(status != BODYPART_ROBOTIC)
|
||||
if(!is_robotic_limb())
|
||||
playsound(T, 'sound/misc/splort.ogg', 50, 1, -1)
|
||||
if(current_gauze)
|
||||
QDEL_NULL(current_gauze)
|
||||
@@ -458,10 +463,10 @@
|
||||
//Cannot remove negative damage (i.e. apply damage)
|
||||
/obj/item/bodypart/proc/heal_damage(brute, burn, stamina, only_robotic = FALSE, only_organic = TRUE, updating_health = TRUE)
|
||||
|
||||
if(only_robotic && status != BODYPART_ROBOTIC) //This makes organic limbs not heal when the proc is in Robotic mode.
|
||||
if(only_robotic && !is_robotic_limb()) //This makes organic limbs not heal when the proc is in Robotic mode.
|
||||
return
|
||||
|
||||
if(only_organic && status != BODYPART_ORGANIC) //This makes robolimbs not healable by chems.
|
||||
if(only_organic && !is_organic_limb(FALSE)) //This makes robolimbs and hybridlimbs not healable by chems.
|
||||
return
|
||||
|
||||
brute_dam = round(max(brute_dam - brute, 0), DAMAGE_PRECISION)
|
||||
@@ -503,7 +508,7 @@
|
||||
if(!last_maxed && !silent)
|
||||
owner.emote("scream")
|
||||
last_maxed = TRUE
|
||||
if(!is_organic_limb() || stamina_dam >= max_damage)
|
||||
if(!is_organic_limb(FALSE) || stamina_dam >= max_damage)
|
||||
return BODYPART_DISABLED_DAMAGE
|
||||
else if(disabled && (get_damage(TRUE) <= (max_damage * 0.8))) // reenabled at 80% now instead of 50% as of wounds update
|
||||
last_maxed = FALSE
|
||||
@@ -545,7 +550,8 @@
|
||||
return FALSE
|
||||
|
||||
//Change organ status
|
||||
/obj/item/bodypart/proc/change_bodypart_status(new_limb_status, heal_limb, change_icon_to_default)
|
||||
/obj/item/bodypart/proc/change_bodypart_status(new_limb_status, heal_limb, change_icon_to_default, no_update = FALSE)
|
||||
var/old_status = status
|
||||
status = new_limb_status
|
||||
if(heal_limb)
|
||||
burn_dam = 0
|
||||
@@ -553,20 +559,48 @@
|
||||
brutestate = 0
|
||||
burnstate = 0
|
||||
|
||||
if(status == BODYPART_HYBRID)
|
||||
easy_heal_threshhold = HYBRID_BODYPART_DAMAGE_THRESHHOLD
|
||||
threshhold_passed_mindamage = HYBRID_BODYPART_THESHHOLD_MINDAMAGE
|
||||
else if(old_status == BODYPART_HYBRID)
|
||||
easy_heal_threshhold = initial(easy_heal_threshhold)
|
||||
threshhold_passed_mindamage = initial(threshhold_passed_mindamage)
|
||||
|
||||
update_threshhold_state()
|
||||
|
||||
if(change_icon_to_default)
|
||||
if(status == BODYPART_ORGANIC)
|
||||
if(is_organic_limb(FALSE))
|
||||
icon = base_bp_icon || DEFAULT_BODYPART_ICON_ORGANIC
|
||||
else if(status == BODYPART_ROBOTIC)
|
||||
else if(is_robotic_limb())
|
||||
icon = base_bp_icon || DEFAULT_BODYPART_ICON_ROBOTIC
|
||||
|
||||
if(owner)
|
||||
if(owner && !no_update) //Only use no_update if you are sure the bodypart will get updated from other sources anyways, to prevent unneccessary processing use.
|
||||
owner.updatehealth()
|
||||
owner.update_body() //if our head becomes robotic, we remove the lizard horns and human hair.
|
||||
owner.update_hair()
|
||||
owner.update_damage_overlays()
|
||||
|
||||
/obj/item/bodypart/proc/is_organic_limb()
|
||||
return (status == BODYPART_ORGANIC)
|
||||
/obj/item/bodypart/proc/is_organic_limb(hybrid_allowed = TRUE)
|
||||
if(!hybrid_allowed)
|
||||
return (status == BODYPART_ORGANIC)
|
||||
return ((status == BODYPART_ORGANIC) || (status == BODYPART_HYBRID)) //Goodbye if(B.status == BODYPART_ORGANIC || B.status == BODYPART_HYBRID)
|
||||
|
||||
/obj/item/bodypart/proc/is_robotic_limb(hybrid_allowed = TRUE)
|
||||
if(!hybrid_allowed)
|
||||
return (status == BODYPART_ROBOTIC)
|
||||
return ((status == BODYPART_ROBOTIC) || (status == BODYPART_HYBRID))
|
||||
|
||||
/obj/item/bodypart/proc/update_threshhold_state(brute = TRUE, burn = TRUE)
|
||||
if(brute)
|
||||
if(brute_dam < threshhold_passed_mindamage || easy_heal_threshhold < 0)
|
||||
threshhold_brute_passed = FALSE
|
||||
else if(brute_dam >= easy_heal_threshhold)
|
||||
threshhold_brute_passed = TRUE
|
||||
if(burn)
|
||||
if(burn_dam < threshhold_passed_mindamage || easy_heal_threshhold < 0)
|
||||
threshhold_burn_passed = FALSE
|
||||
else if(burn_dam >= easy_heal_threshhold)
|
||||
threshhold_burn_passed = TRUE
|
||||
|
||||
//we inform the bodypart of the changes that happened to the owner, or give it the informations from a source mob.
|
||||
/obj/item/bodypart/proc/update_limb(dropping_limb, mob/living/carbon/source)
|
||||
@@ -581,7 +615,7 @@
|
||||
C = owner
|
||||
no_update = FALSE
|
||||
|
||||
if(HAS_TRAIT(C, TRAIT_HUSK) && (is_organic_limb() || render_like_organic))
|
||||
if(HAS_TRAIT(C, TRAIT_HUSK) && is_organic_limb())
|
||||
species_id = "husk" //overrides species_id
|
||||
dmg_overlay_type = "" //no damage overlay shown when husked
|
||||
should_draw_gender = FALSE
|
||||
@@ -675,9 +709,9 @@
|
||||
else if(animal_origin == MONKEY_BODYPART) //currently monkeys are the only non human mob to have damage overlays.
|
||||
dmg_overlay_type = animal_origin
|
||||
|
||||
if(status == BODYPART_ROBOTIC)
|
||||
if(is_robotic_limb())
|
||||
dmg_overlay_type = "robotic"
|
||||
if(!render_like_organic)
|
||||
if(is_robotic_limb(FALSE))
|
||||
body_markings = null
|
||||
aux_marking = null
|
||||
|
||||
@@ -714,7 +748,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)
|
||||
@@ -731,7 +765,7 @@
|
||||
. += limb
|
||||
|
||||
if(animal_origin)
|
||||
if(is_organic_limb())
|
||||
if(is_organic_limb(FALSE))
|
||||
limb.icon = 'icons/mob/animal_parts.dmi'
|
||||
if(species_id == "husk")
|
||||
limb.icon_state = "[animal_origin]_husk_[body_zone]"
|
||||
@@ -745,7 +779,7 @@
|
||||
if((body_zone != BODY_ZONE_HEAD && body_zone != BODY_ZONE_CHEST))
|
||||
should_draw_gender = FALSE
|
||||
|
||||
if(is_organic_limb() || render_like_organic)
|
||||
if(is_organic_limb())
|
||||
limb.icon = base_bp_icon || 'icons/mob/human_parts.dmi'
|
||||
if(should_draw_gender)
|
||||
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
|
||||
@@ -891,7 +925,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)
|
||||
|
||||
@@ -436,6 +436,5 @@
|
||||
scaries.generate(L, phantom_loss)
|
||||
L.attach_limb(src, 1)
|
||||
if(ROBOTIC_LIMBS in dna.species.species_traits) //Snowflake trait moment, but needed.
|
||||
L.render_like_organic = TRUE
|
||||
L.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE) //Haha what if IPC-lings actually regenerated the right limbs instead of organic ones? That'd be pretty cool, right?
|
||||
L.change_bodypart_status(BODYPART_HYBRID, FALSE, TRUE) //Haha what if IPC-lings actually regenerated the right limbs instead of organic ones? That'd be pretty cool, right?
|
||||
return TRUE
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
/obj/item/bodypart/head/drop_organs(mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(status != BODYPART_ROBOTIC)
|
||||
if(!is_robotic_limb())
|
||||
playsound(T, 'sound/misc/splort.ogg', 50, 1, -1)
|
||||
for(var/obj/item/I in src)
|
||||
if(I == brain)
|
||||
@@ -141,7 +141,7 @@
|
||||
. = ..()
|
||||
if(dropped) //certain overlays only appear when the limb is being detached from its owner.
|
||||
|
||||
if(status != BODYPART_ROBOTIC) //having a robotic head hides certain features.
|
||||
if(!is_robotic_limb(FALSE)) //having a robotic head hides certain features.
|
||||
//facial hair
|
||||
if(facial_hair_style)
|
||||
var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facial_hair_style]
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
brute_reduction = 2
|
||||
burn_reduction = 1
|
||||
easy_heal_threshhold = 35 //Resistant against damage, but high mindamage once the threshhold is passed
|
||||
threshhold_passed_mindamage = 25
|
||||
|
||||
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
|
||||
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
|
||||
@@ -43,6 +45,8 @@
|
||||
|
||||
brute_reduction = 2
|
||||
burn_reduction = 1
|
||||
easy_heal_threshhold = 35 //Resistant against damage, but high mindamage once the threshhold is passed
|
||||
threshhold_passed_mindamage = 25
|
||||
|
||||
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
|
||||
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
|
||||
@@ -64,6 +68,8 @@
|
||||
|
||||
brute_reduction = 2
|
||||
burn_reduction = 1
|
||||
easy_heal_threshhold = 35 //Resistant against damage, but high mindamage once the threshhold is passed
|
||||
threshhold_passed_mindamage = 25
|
||||
|
||||
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
|
||||
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
|
||||
@@ -85,6 +91,8 @@
|
||||
|
||||
brute_reduction = 2
|
||||
burn_reduction = 1
|
||||
easy_heal_threshhold = 35 //Resistant against damage, but high mindamage once the threshhold is passed
|
||||
threshhold_passed_mindamage = 25
|
||||
|
||||
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
|
||||
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
|
||||
@@ -105,6 +113,8 @@
|
||||
|
||||
brute_reduction = 2
|
||||
burn_reduction = 1
|
||||
easy_heal_threshhold = 40 //Resistant against damage, but high mindamage once the threshhold is passed
|
||||
threshhold_passed_mindamage = 25
|
||||
|
||||
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
|
||||
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
|
||||
@@ -166,6 +176,8 @@
|
||||
|
||||
brute_reduction = 5
|
||||
burn_reduction = 4
|
||||
easy_heal_threshhold = 40 //Resistant against damage, but high mindamage once the threshhold is passed
|
||||
threshhold_passed_mindamage = 20
|
||||
|
||||
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
|
||||
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
|
||||
@@ -242,6 +254,8 @@
|
||||
brute_reduction = 0
|
||||
burn_reduction = 0
|
||||
max_damage = 20
|
||||
easy_heal_threshhold = 15 //Weak. Low threshhold, but also relatively low mindamage
|
||||
threshhold_passed_mindamage = 10
|
||||
|
||||
/obj/item/bodypart/r_arm/robot/surplus
|
||||
name = "surplus prosthetic right arm"
|
||||
@@ -250,6 +264,8 @@
|
||||
brute_reduction = 0
|
||||
burn_reduction = 0
|
||||
max_damage = 20
|
||||
easy_heal_threshhold = 15 //Weak. Low threshhold, but also relatively low mindamage
|
||||
threshhold_passed_mindamage = 10
|
||||
|
||||
/obj/item/bodypart/l_leg/robot/surplus
|
||||
name = "surplus prosthetic left leg"
|
||||
@@ -258,6 +274,8 @@
|
||||
brute_reduction = 0
|
||||
burn_reduction = 0
|
||||
max_damage = 20
|
||||
easy_heal_threshhold = 15 //Weak. Low threshhold, but also relatively low mindamage
|
||||
threshhold_passed_mindamage = 10
|
||||
|
||||
/obj/item/bodypart/r_leg/robot/surplus
|
||||
name = "surplus prosthetic right leg"
|
||||
@@ -266,39 +284,49 @@
|
||||
brute_reduction = 0
|
||||
burn_reduction = 0
|
||||
max_damage = 20
|
||||
easy_heal_threshhold = 15 //Weak. Low threshhold, but also relatively low mindamage
|
||||
threshhold_passed_mindamage = 10
|
||||
|
||||
// Upgraded Surplus lims - Better then robotic lims
|
||||
// Upgraded Surplus lims - Better then robotic limbs
|
||||
/obj/item/bodypart/l_arm/robot/surplus_upgraded
|
||||
name = "reinforced surplus prosthetic left arm"
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of parts with more fallbacks against internal damage."
|
||||
icon = 'icons/mob/augmentation/surplus_augments.dmi'
|
||||
brute_reduction = 3
|
||||
burn_reduction = 2
|
||||
max_damage = 55
|
||||
easy_heal_threshhold = 20 //Lower threshhold than true robotic limbs, but very low mindamage too.
|
||||
threshhold_passed_mindamage = 5
|
||||
|
||||
/obj/item/bodypart/r_arm/robot/surplus_upgraded
|
||||
name = "reinforced surplus prosthetic right arm"
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of parts with more fallbacks against internal damage."
|
||||
icon = 'icons/mob/augmentation/surplus_augments.dmi'
|
||||
brute_reduction = 3
|
||||
burn_reduction = 2
|
||||
max_damage = 55
|
||||
easy_heal_threshhold = 20 //Lower threshhold than true robotic limbs, but very low mindamage too.
|
||||
threshhold_passed_mindamage = 5
|
||||
|
||||
/obj/item/bodypart/l_leg/robot/surplus_upgraded
|
||||
name = "reinforced surplus prosthetic left leg"
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of parts with more fallbacks against internal damage."
|
||||
icon = 'icons/mob/augmentation/surplus_augments.dmi'
|
||||
brute_reduction = 3
|
||||
burn_reduction = 2
|
||||
max_damage = 55
|
||||
easy_heal_threshhold = 20 //Lower threshhold than true robotic limbs, but very low mindamage too.
|
||||
threshhold_passed_mindamage = 5
|
||||
|
||||
/obj/item/bodypart/r_leg/robot/surplus_upgraded
|
||||
name = "reinforced surplus prosthetic right leg"
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
|
||||
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of parts with more fallbacks against internal damage."
|
||||
icon = 'icons/mob/augmentation/surplus_augments.dmi'
|
||||
brute_reduction = 3
|
||||
burn_reduction = 2
|
||||
max_damage = 55
|
||||
easy_heal_threshhold = 20 //Lower threshhold than true robotic limbs, but very low mindamage too.
|
||||
threshhold_passed_mindamage = 5
|
||||
|
||||
#undef ROBOTIC_LIGHT_BRUTE_MSG
|
||||
#undef ROBOTIC_MEDIUM_BRUTE_MSG
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -26,8 +26,17 @@
|
||||
if(affecting)
|
||||
if(!S.requires_bodypart)
|
||||
continue
|
||||
if(S.requires_bodypart_type && affecting.status != S.requires_bodypart_type)
|
||||
continue
|
||||
if(S.requires_bodypart_type) //ugly but it'll do.
|
||||
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
|
||||
@@ -58,8 +67,17 @@
|
||||
if(affecting)
|
||||
if(!S.requires_bodypart)
|
||||
return
|
||||
if(S.requires_bodypart_type && affecting.status != S.requires_bodypart_type)
|
||||
return
|
||||
if(S.requires_bodypart_type) //*scream
|
||||
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))
|
||||
@@ -91,7 +109,7 @@
|
||||
else if(S.can_cancel)
|
||||
var/required_tool_type = TOOL_CAUTERY
|
||||
var/obj/item/close_tool = user.get_inactive_held_item()
|
||||
var/is_robotic = S.requires_bodypart_type == BODYPART_ROBOTIC
|
||||
var/is_robotic = (S.requires_bodypart_type == BODYPART_ROBOTIC || S.requires_bodypart_type == BODYPART_HYBRID)
|
||||
if(is_robotic)
|
||||
required_tool_type = TOOL_SCREWDRIVER
|
||||
if(iscyborg(user))
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(istype(tool, /obj/item/organ_storage) && istype(tool.contents[1], /obj/item/bodypart))
|
||||
tool = tool.contents[1]
|
||||
var/obj/item/bodypart/aug = tool
|
||||
if(aug.status != BODYPART_ROBOTIC)
|
||||
if(!aug.is_robotic_limb())
|
||||
to_chat(user, "<span class='warning'>That's not an augment, silly!</span>")
|
||||
return -1
|
||||
if(aug.body_zone != target_zone)
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
if(istype(tool, /obj/item/bodypart))
|
||||
var/obj/item/bodypart/BP = tool
|
||||
if(ismonkey(target))// monkey patient only accept organic monkey limbs
|
||||
if(BP.status == BODYPART_ROBOTIC || BP.animal_origin != MONKEY_BODYPART)
|
||||
if(BP.is_robotic_limb() || BP.animal_origin != MONKEY_BODYPART)
|
||||
to_chat(user, "<span class='warning'>[BP] doesn't match the patient's morphology.</span>")
|
||||
return -1
|
||||
if(BP.status != BODYPART_ROBOTIC)
|
||||
if(!BP.is_robotic_limb())
|
||||
organ_rejection_dam = 10
|
||||
if(ishuman(target))
|
||||
if(BP.animal_origin)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list(BODY_ZONE_HEAD)
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
requires_bodypart_type = 0
|
||||
desc = "A surgical procedure that restores the default behavior logic and personality matrix of an IPC posibrain."
|
||||
|
||||
/datum/surgery_step/fix_robot_brain
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/datum/surgery/robot_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)) //No cheating!
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
requires_bodypart_type = 0 //You can do this on anyone, but it won't really be useful on people without augments.
|
||||
ignore_clothes = TRUE
|
||||
var/antispam = FALSE
|
||||
var/healing_step_type = /datum/surgery_step/robot_heal/basic
|
||||
@@ -42,6 +42,16 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/surgery/robot_healing/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
var/possible = FALSE
|
||||
for(var/obj/item/bodypart/B in target.bodyparts)
|
||||
if(B.is_robotic_limb())
|
||||
possible = TRUE
|
||||
break
|
||||
if(!possible)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/robot_heal/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/woundtype
|
||||
if(implement_type == TOOL_WELDER)
|
||||
|
||||
@@ -529,7 +529,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
if(5) // limb squish!
|
||||
for(var/i in C.bodyparts)
|
||||
var/obj/item/bodypart/squish_part = i
|
||||
if(squish_part.is_organic_limb() || squish_part.render_like_organic)
|
||||
if(squish_part.is_organic_limb())
|
||||
var/type_wound = pick(list(/datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/moderate))
|
||||
squish_part.force_wound_upwards(type_wound)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user