From 1f9a14ffd795f657bd18376fcad8b5be146d71d0 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Fri, 6 Oct 2017 16:50:33 -0500 Subject: [PATCH] Adds Skeletons for background use --- code/__defines/species_languages.dm | 2 + .../objects/items/weapons/material/shards.dm | 5 +- code/modules/mob/living/carbon/human/death.dm | 2 +- .../carbon/human/species/outsider/skeleton.dm | 53 ++++++++++++++++++ code/modules/mob/living/living.dm | 35 +++++++++--- code/modules/organs/blood.dm | 3 + code/modules/organs/organ_external.dm | 8 +-- icons/mob/human_races/r_skeleton.dmi | Bin 987 -> 802 bytes polaris.dme | 1 + 9 files changed, 95 insertions(+), 14 deletions(-) create mode 100644 code/modules/mob/living/carbon/human/species/outsider/skeleton.dm diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index 88f4309e360..9082482ebea 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -7,6 +7,8 @@ #define NO_POISON 0x20 // Cannot not suffer toxloss. #define NO_EMBED 0x40 // Can step on broken glass with no ill-effects and cannot have shrapnel embedded in it. #define NO_HALLUCINATION 0x80 // Don't hallucinate, ever +#define NO_BLOOD 0x100 // Never bleed, never show blood amount +#define UNDEAD 0x200 // Various things that living things don't do, mostly for skeletons // unused: 0x8000 - higher than this will overflow // Species spawn flags diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index 92cb782e8a2..4fb71725635 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -78,7 +78,10 @@ if( H.shoes || ( H.wear_suit && (H.wear_suit.body_parts_covered & FEET) ) ) return - M << "You step on \the [src]!" + if(H.species.flags & NO_MINOR_CUT) + return + + to_chat(H, "You step on \the [src]!") var/list/check = list("l_foot", "r_foot") while(check.len) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index b4a47d2e47f..ffac791a1fd 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -112,5 +112,5 @@ mutations.Add(SKELETON) status_flags |= DISFIGURED - update_body(0) + update_body(1) return diff --git a/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm b/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm new file mode 100644 index 00000000000..d6c5d030a5e --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm @@ -0,0 +1,53 @@ +/datum/species/skeleton + name = "Skeleton" + name_plural = "Skeletons" + icobase = 'icons/mob/human_races/r_skeleton.dmi' + primitive_form = "Monkey" + language = "Sol Common" + unarmed_types = list(/datum/unarmed_attack/claws/strong, /datum/unarmed_attack/bite/sharp) //Bones are pointy, fight me. + blurb = "Spooky Scary Skeletons!" + name_language = null // Use the first-name last-name generator rather than a language scrambler + min_age = 17 + max_age = 110 + health_hud_intensity = 1.5 + + flags = NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_BLOOD | UNDEAD + spawn_flags = SPECIES_IS_RESTRICTED + appearance_flags = null + + show_ssd = null + + blood_volume = null + taste_sensitivity = TASTE_DULL + hunger_factor = 0 + metabolic_rate = 0 + + virus_immune = 1 + + brute_mod = 1 + burn_mod = 0 + oxy_mod = 0 + toxins_mod = 0 + radiation_mod = 0 + flash_mod = 0 + chemOD_mod = 0 + + siemens_coefficient = 0 + + death_message = "falls over and stops moving!" + knockout_message = "falls over and stops moving!" + + has_organ = list() + + warning_low_pressure = 50 + hazard_low_pressure = -1 + + cold_level_1 = 50 + cold_level_2 = -1 + cold_level_3 = -1 + + heat_level_1 = 2000 + heat_level_2 = 3000 + heat_level_3 = 4000 + + body_temperature = T20C \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3f4e37f1a0f..6f7fb44e1d4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -695,9 +695,21 @@ default behaviour is: if(A.has_gravity) //this is the gay blood on floor shit -- Added back -- Skie if (M.lying && (prob(M.getBruteLoss() / 6))) - var/turf/location = M.loc - if (istype(location, /turf/simulated)) - location.add_blood(M) + var/bloodtrail = 1 //Checks if it's possible to even spill blood + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.flags & NO_BLOOD) + bloodtrail = 0 + else + var/blood_volume = round((H.vessel.get_reagent_amount("blood")/H.species.blood_volume)*100) + if(blood_volume < BLOOD_VOLUME_SURVIVE) + bloodtrail = 0 //Most of it's gone already, just leave it be + else + H.vessel.remove_reagent("blood", 1) + if(bloodtrail) + var/turf/location = M.loc + if(istype(location, /turf/simulated)) + location.add_blood(M) //pull damage with injured people if(prob(25)) M.adjustBruteLoss(1) @@ -708,13 +720,20 @@ default behaviour is: visible_message("\The [M]'s [M.isSynthetic() ? "state" : "wounds"] worsen terribly from being dragged!") var/turf/location = M.loc if (istype(location, /turf/simulated)) - location.add_blood(M) + var/bloodtrail = 1 //Checks if it's possible to even spill blood if(ishuman(M)) var/mob/living/carbon/human/H = M - var/blood_volume = round(H.vessel.get_reagent_amount("blood")) - if(blood_volume > 0) - H.vessel.remove_reagent("blood", 1) - + if(H.species.flags & NO_BLOOD) + bloodtrail = 0 + else + var/blood_volume = round((H.vessel.get_reagent_amount("blood")/H.species.blood_volume)*100) + if(blood_volume < BLOOD_VOLUME_SURVIVE) + bloodtrail = 0 //Most of it's gone already, just leave it be + else + H.vessel.remove_reagent("blood", 1) + if(bloodtrail) + if(istype(location, /turf/simulated)) + location.add_blood(M) step(pulling, get_dir(pulling.loc, T)) if(t) diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index dff2a9b2255..5ce463e3092 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -17,6 +17,9 @@ var/const/CE_STABLE_THRESHOLD = 0.5 if(vessel) return + if(species.flags & NO_BLOOD) + return + vessel = new/datum/reagents(species.blood_volume) vessel.my_atom = src diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 20390a35553..aef7502354c 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -485,13 +485,13 @@ This function completely restores a damaged organ to perfect condition. //moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage (because of the return) //Possibly trigger an internal wound, too. var/local_damage = brute_dam + burn_dam + damage - if((damage > 15) && (type != BURN) && (local_damage > 30) && prob(damage) && (robotic < ORGAN_ROBOT)) + if((damage > 15) && (type != BURN) && (local_damage > 30) && prob(damage) && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD)) var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15)) wounds += I owner.custom_pain("You feel something rip in your [name]!", 50) //Burn damage can cause fluid loss due to blistering and cook-off - if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT)) + if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD)) var/fluid_loss = 0.75 * (damage/(owner.getMaxHealth() - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100) owner.remove_blood(fluid_loss) @@ -679,7 +679,7 @@ Note that amputating the affected organ does in fact remove the infection from t //Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections /obj/item/organ/external/proc/update_wounds() - if((robotic >= ORGAN_ROBOT)) //Robotic limbs don't heal or get worse. + if((robotic >= ORGAN_ROBOT) || (species.flags & UNDEAD)) //Robotic and dead limbs don't heal or get worse. for(var/datum/wound/W in wounds) //Repaired wounds disappear though if(W.damage <= 0) //and they disappear right away wounds -= W //TODO: robot wounds for robot limbs @@ -754,7 +754,7 @@ Note that amputating the affected organ does in fact remove the infection from t else brute_dam += W.damage - if(!(robotic >= ORGAN_ROBOT) && W.bleeding() && (H && H.should_have_organ(O_HEART))) + if(!(robotic >= ORGAN_ROBOT) && W.bleeding() && (H && H.should_have_organ(O_HEART)) && !(H.species.flags & NO_BLOOD)) W.bleed_timer-- status |= ORGAN_BLEEDING diff --git a/icons/mob/human_races/r_skeleton.dmi b/icons/mob/human_races/r_skeleton.dmi index c30eb60fde5b4df8b8a7704e2e427733850ba553..30c368b1fc3a754c6acbfa74ef3293283f9ab9b5 100644 GIT binary patch literal 802 zcmV+-1Ks?IP)%0000FP)t-sz`(%u z_4Tc-t=!z)z`(#j6+6fP0004WQchCV=-0C=2@ zlD!JUFbsre`zcJam;S9?NZ00Ih0L_t(|obB9OcB3#1fMMHgAfg*EFbgPTR?zN$PfcG2OExwfcP3}r|9gtC zq}rqxLY+7V0KlhP>tHBm9Oj?M_Aw2L1(H0TPPE+f%l*s*#xy9Wq!Va&O!CY9jPc;{ zE zvE0mXUwwWci*18O!>jcG00000ps+*Z>Ki<6hrt>78*|LA5xdF4$7+7oFWZDNRzoJh z1b*NI00000005qSgF*@u&^v)9yHP2dK$@TTGwn)W5diRH*)CTTXa9w=+iLsjy@=Xn z8fF>Qdw2b0H>Hkg%iek?vk&Pf0NU93sMp~2-`C!HH_Yp{q~nhjs4IZR3VQ1wvDY7J zc=yArYS36gZ~frb*FlZTO?{WN&Om4VsTCNP&p@@l`D4^<&|Ba9InFNO%vEY{{qrZ# z(%YbW0{Y}UAIhwckH2l5j&zHq)$07*qoM6N<$f{tZ>Z~y=R literal 987 zcmV<110?*3P)V=-0C=2@ z(#;CPAPfNDvp$8i_p!h0E~BONu)cx_{z7XY%J%xJ^{~@0w*)>D6Ya%woaRLgubICM zrT|eq#Qk*U>=ShMdvd#S=1p)u*Cb_?%^r3r6>c48I$$b?IJ2lWQ{u}{tt5rgtEdUZ zNX#LGNK>+Xx9TimhSfO22o#0V0%Srl63c)IXo|3p>e~D8Mzx=+AVSZB{cYKcaT$(3 z`~}vr%8vpZQR)By0=!8?K~#90?cH5^n=lZCVT8K?0 zSjFe(6QzRk+tzQ>mV%z~rL{H{^x_Ct7W9nY@Q!`Cg7)R@kYnA$*%gRQzYqWb00000 zjn=KoEnU}V{FeTX3$^tO!zyKr`&(l!eEt`oUn_of4!M}3G30-?W0H58( zzV$foul29MesSZLCkh?rw!HuPd3F&I@3uTd={UFH{q1&k5s|AMq04>jDF^^QpQ|;f ze5Rndl|Ji*kx4=8_;fy*F1I2808Ol$2$I_n_RSv`e~+G(;by(a|Gr*A`#Ih7lm3hg z@jklv{6XXU=RYcp&UlPH)P7F){NcB|y+sq2_b};Jbk86B6#ZIRdno;!?)kYr6xBzl zDL?&G8WUO{+t&Q_h2)f1&ho7ZTl241kg_J+J3nFl>EAma004Y@diVDd;_