diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 4b10bee2a2b..1585bebe530 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -574,6 +574,8 @@ #define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" ///Whenever EquipRanked is called, called after job is set #define COMSIG_JOB_RECEIVED "job_received" +// called after DNA is updated +#define COMSIG_HUMAN_UPDATE_DNA "human_update_dna" // /datum/species signals diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 5fd85513501..5124d27e9f5 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -149,3 +149,4 @@ #define NO_DECAY "no_decay" #define PIERCEIMMUNE "pierce_immunity" #define NO_HUNGER "no_hunger" +#define EXOTIC_COLOR "exotic_blood_colour" diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index fd6c85de9c4..3d07e7a4b22 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1226,7 +1226,7 @@ /obj/item/reagent_containers/syringe/insulin = 6, /obj/item/reagent_containers/syringe/calomel = 10, /obj/item/reagent_containers/syringe/heparin = 4, /obj/item/reagent_containers/hypospray/autoinjector = 5, /obj/item/reagent_containers/food/pill/salbutamol = 10, /obj/item/reagent_containers/food/pill/mannitol = 10, /obj/item/reagent_containers/food/pill/mutadone = 5, /obj/item/stack/medical/bruise_pack/advanced = 4, /obj/item/stack/medical/ointment/advanced = 4, /obj/item/stack/medical/bruise_pack = 4, /obj/item/stack/medical/splint = 4, /obj/item/reagent_containers/glass/beaker = 4, /obj/item/reagent_containers/dropper = 4, /obj/item/healthanalyzer = 4, - /obj/item/healthupgrade = 4, /obj/item/reagent_containers/hypospray/safety = 2, /obj/item/sensor_device = 2, /obj/item/pinpointer/crew = 2) + /obj/item/healthupgrade = 4, /obj/item/reagent_containers/hypospray/safety = 2, /obj/item/sensor_device = 2, /obj/item/pinpointer/crew = 2, /obj/item/reagent_containers/iv_bag/slime = 1) contraband = list(/obj/item/reagent_containers/glass/bottle/sulfonal = 1, /obj/item/reagent_containers/glass/bottle/pancuronium = 1) armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) resistance_flags = FIRE_PROOF diff --git a/code/game/objects/effects/decals/Cleanable/aliens.dm b/code/game/objects/effects/decals/Cleanable/aliens.dm index f4ca5cf613a..1e758352fd0 100644 --- a/code/game/objects/effects/decals/Cleanable/aliens.dm +++ b/code/game/objects/effects/decals/Cleanable/aliens.dm @@ -37,3 +37,19 @@ /obj/effect/decal/cleanable/blood/xtracks basecolor = "#05EE05" + +/obj/effect/decal/cleanable/blood/slime // this is the alien blood file, slimes are aliens. + name = "slime jelly" + desc = "It's a transparent semi-liquid from a slime or slime person. Don't lick it." + basecolor = "#0b8f70" + bloodiness = MAX_SHOE_BLOODINESS + +/obj/effect/decal/cleanable/blood/slime/can_bloodcrawl_in() + return FALSE + +/obj/effect/decal/cleanable/blood/slime/dry() + return + +/obj/effect/decal/cleanable/blood/slime/streak + random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5") + amount = 2 diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index ccb0c29a4ca..bd1e0339068 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -307,6 +307,7 @@ /mob/living/carbon/human/proc/update_dna() check_dna() dna.ready_dna(src) + SEND_SIGNAL(src, COMSIG_HUMAN_UPDATE_DNA) /mob/living/carbon/human/proc/generate_valid_species(var/check_whitelist = 1, var/list/whitelist = list(), var/list/blacklist = list()) var/list/valid_species = new() diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm index 60f972b69a4..e22d767eeb0 100644 --- a/code/modules/mob/living/carbon/human/species/slime.dm +++ b/code/modules/mob/living/carbon/human/species/slime.dm @@ -26,7 +26,7 @@ male_cough_sounds = list('sound/effects/slime_squish.ogg') female_cough_sounds = list('sound/effects/slime_squish.ogg') - species_traits = list(LIPS, IS_WHITELISTED, NO_SCAN) + species_traits = list(LIPS, IS_WHITELISTED, NO_SCAN, EXOTIC_COLOR) clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_SKIN_COLOR | NO_EYES dietflags = DIET_CARN @@ -34,7 +34,7 @@ flesh_color = "#5fe8b1" blood_color = "#0064C8" - exotic_blood = "water" + exotic_blood = "slimejelly" butt_sprite = "slime" //Has default darksight of 2. @@ -74,6 +74,9 @@ recolor = new() recolor.Grant(H) ADD_TRAIT(H, TRAIT_WATERBREATH, "species") + RegisterSignal(H, COMSIG_HUMAN_UPDATE_DNA, /datum/species/slime/./proc/blend) + blend(H) + /datum/species/slime/on_species_loss(mob/living/carbon/human/H) ..() @@ -82,6 +85,13 @@ if(recolor) recolor.Remove(H) REMOVE_TRAIT(H, TRAIT_WATERBREATH, "species") + UnregisterSignal(H, COMSIG_HUMAN_UPDATE_DNA) + +/datum/species/slime/proc/blend(mob/living/carbon/human/H) + var/new_color = BlendRGB(H.skin_colour, "#acacac", 0.5) // Blends this to make it work better + if(H.blood_color != new_color) // Put here, so if it's a roundstart, dyed, or CMA'd slime, their blood changes to match skin + H.blood_color = new_color + H.dna.species.blood_color = H.blood_color /datum/species/slime/handle_life(mob/living/carbon/human/H) // Slowly shifting to the color of the reagents @@ -97,8 +107,11 @@ E.sync_colour_to_human(H) H.update_hair() H.update_body() + blend(H) ..() + + /datum/species/slime/can_hear() // fucking snowflakes . = TRUE diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index a800c18c57b..d478eb4fcbe 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -579,7 +579,7 @@ continue R.reaction_mob(A, method, R.volume * volume_modifier, show_message) if("TURF") - R.reaction_turf(A, R.volume * volume_modifier) + R.reaction_turf(A, R.volume * volume_modifier, R.color) if("OBJ") R.reaction_obj(A, R.volume * volume_modifier) diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index c5ef03040b4..7073fdf3902 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -62,7 +62,7 @@ /datum/reagent/proc/reaction_obj(obj/O, volume) return -/datum/reagent/proc/reaction_turf(turf/T, volume) +/datum/reagent/proc/reaction_turf(turf/T, volume, color) return /datum/reagent/proc/on_mob_life(mob/living/M) diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index 2b65054f21f..f7cdfa11404 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -164,7 +164,7 @@ /datum/reagent/iron/on_mob_life(mob/living/M) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.dna.species.exotic_blood && !(NO_BLOOD in H.dna.species.species_traits)) + if(!(NO_BLOOD in H.dna.species.species_traits)) if(H.blood_volume < BLOOD_VOLUME_NORMAL) H.blood_volume += 0.8 return ..() diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index 7156eff6482..ed719a9f605 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -43,7 +43,7 @@ id = "slimejelly" description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." reagent_state = LIQUID - color = "#801E28" // rgb: 128, 30, 40 + color = "#0b8f70" // rgb: 11, 143, 112 taste_description = "slimes" taste_mult = 1.3 @@ -51,11 +51,23 @@ var/update_flags = STATUS_UPDATE_NONE if(prob(10)) to_chat(M, "Your insides are burning!") - update_flags |= M.adjustToxLoss(rand(20,60)*REAGENTS_EFFECT_MULTIPLIER, FALSE) + update_flags |= M.adjustToxLoss(rand(2, 6) * REAGENTS_EFFECT_MULTIPLIER, FALSE) // avg 0.4 toxin per cycle, not unreasonable else if(prob(40)) - update_flags |= M.adjustBruteLoss(-5*REAGENTS_EFFECT_MULTIPLIER, FALSE) + update_flags |= M.adjustBruteLoss(-0.5 * REAGENTS_EFFECT_MULTIPLIER, FALSE) return ..() | update_flags +/datum/reagent/slimejelly/on_merge(list/mix_data) + if(data && mix_data) + if(mix_data["colour"]) + color = mix_data["colour"] + +/datum/reagent/slimejelly/reaction_turf(turf/T, volume, color) + if(volume >= 3 && !isspaceturf(T) && !locate(/obj/effect/decal/cleanable/blood/slime) in T) + var/obj/effect/decal/cleanable/blood/slime/B = new(T) + B.basecolor = color + B.update_icon() + + /datum/reagent/slimetoxin name = "Mutation Toxin" id = "mutationtoxin" diff --git a/code/modules/reagents/reagent_containers/iv_bag.dm b/code/modules/reagents/reagent_containers/iv_bag.dm index 0f0168a8db0..bd5447bb112 100644 --- a/code/modules/reagents/reagent_containers/iv_bag.dm +++ b/code/modules/reagents/reagent_containers/iv_bag.dm @@ -200,3 +200,7 @@ /obj/item/reagent_containers/iv_bag/blood/OMinus blood_type = "O-" + +/obj/item/reagent_containers/iv_bag/slime + name = "\improper IV Bag (Slime Jelly)" + list_reagents = list("slimejelly" = 200) diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index 837c6e0d056..06ab3db4f89 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -96,7 +96,10 @@ if(dna.species.exotic_blood) var/datum/reagent/R = GLOB.chemical_reagents_list[get_blood_id()] if(istype(R) && isturf(loc)) - R.reaction_turf(get_turf(src), amt * EXOTIC_BLEED_MULTIPLIER) + if(EXOTIC_COLOR in dna.species.species_traits) + R.reaction_turf(get_turf(src), amt * EXOTIC_BLEED_MULTIPLIER, dna.species.blood_color) + else + R.reaction_turf(get_turf(src), amt * EXOTIC_BLEED_MULTIPLIER) /mob/living/carbon/proc/bleed_internal(amt) // Return 1 if we've coughed blood up, 2 if we're vomited it. if(blood_volume) @@ -116,7 +119,10 @@ if(dna.species.exotic_blood && .) // Do we have exotic blood, and have we left any on the ground? var/datum/reagent/R = GLOB.chemical_reagents_list[get_blood_id()] if(istype(R) && isturf(loc)) - R.reaction_turf(get_turf(src), amt * EXOTIC_BLEED_MULTIPLIER) + if(EXOTIC_COLOR in dna.species.species_traits) + R.reaction_turf(get_turf(src), amt * EXOTIC_BLEED_MULTIPLIER, dna.species.blood_color) + else + R.reaction_turf(get_turf(src), amt * EXOTIC_BLEED_MULTIPLIER) /mob/living/proc/restore_blood() blood_volume = initial(blood_volume) @@ -202,6 +208,10 @@ blood_data["factions"] = faction blood_data["dna"] = dna.Clone() return blood_data + if(blood_id == "slimejelly") + var/blood_data = list() + blood_data["colour"] = dna.species.blood_color + return blood_data //get the id of the substance this mob use as blood. /mob/proc/get_blood_id()