From 41137eeedbf660f4a0529117694ece3d6b34a892 Mon Sep 17 00:00:00 2001 From: Neerti Date: Mon, 1 Jan 2018 08:20:55 -0500 Subject: [PATCH] Rainbow Slime Extracts No Longer Make Wild Slimes Also renames wild slime to feral slime. --- .../mob/living/simple_animal/slime/slime.dm | 2 ++ .../living/simple_animal/slime/subtypes.dm | 12 +++++----- code/modules/xenobio/items/extracts.dm | 22 ++++++++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 4148856d72a..93b1f0e9c68 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -85,10 +85,12 @@ /mob/living/simple_animal/slime/purple ) var/type_on_death = null // Set this if you want dying slimes to split into a specific type and not their type. + var/rainbow_core_candidate = TRUE // If false, rainbow cores cannot make this type randomly. var/reagent_injected = null // Some slimes inject reagents on attack. This tells the game what reagent to use. var/injection_amount = 5 // This determines how much. + can_enter_vent_with = list( /obj/item/clothing/head, ) diff --git a/code/modules/mob/living/simple_animal/slime/subtypes.dm b/code/modules/mob/living/simple_animal/slime/subtypes.dm index c0640489459..b7610d466b2 100644 --- a/code/modules/mob/living/simple_animal/slime/subtypes.dm +++ b/code/modules/mob/living/simple_animal/slime/subtypes.dm @@ -209,9 +209,9 @@ /mob/living/simple_animal/slime/dark_blue/get_cold_protection() return 1 // This slime is immune to cold. -// Surfave variant -/mob/living/simple_animal/slime/dark_blue/wild - name = "wild slime" +// Surface variant +/mob/living/simple_animal/slime/dark_blue/feral + name = "feral slime" desc = "The result of slimes escaping containment from some xenobiology lab. The slime makes other entities near it feel much colder, \ and it is more resilient to the cold. These qualities have made this color of slime able to thrive on a harsh, cold world and is able to rival \ the ferocity of other apex predators in this region of Sif. As such, it is a very invasive species." @@ -220,13 +220,14 @@ icon_scale = 2 optimal_combat = TRUE // Gotta be sharp to survive out there. rabid = TRUE + rainbow_core_candidate = FALSE cores = 6 - maxHealth = 150 // Base health + maxHealth = 150 maxHealth_adult = 250 type_on_death = /mob/living/simple_animal/slime/dark_blue // Otherwise infinite slimes might occur. pixel_y = -10 // Since the base sprite isn't centered properly, the pixel auto-adjustment needs some help. -/mob/living/simple_animal/slime/dark_blue/wild/New() +/mob/living/simple_animal/slime/dark_blue/feral/New() ..() make_adult() @@ -735,6 +736,7 @@ /mob/living/simple_animal/slime/rainbow/kendrick name = "Kendrick" desc = "The Research Director's pet slime. It shifts colors constantly." + rainbow_core_candidate = FALSE /mob/living/simple_animal/slime/rainbow/kendrick/New() pacify() diff --git a/code/modules/xenobio/items/extracts.dm b/code/modules/xenobio/items/extracts.dm index 42ca3657730..be22c328511 100644 --- a/code/modules/xenobio/items/extracts.dm +++ b/code/modules/xenobio/items/extracts.dm @@ -956,15 +956,21 @@ result_amount = 1 required = /obj/item/slime_extract/rainbow -/datum/chemical_reaction/slime/rainbow_random_slime/on_reaction(var/datum/reagents/holder) - var/list/forbidden_types = list( - /mob/living/simple_animal/slime/rainbow/kendrick - ) - var/list/potential_types = typesof(/mob/living/simple_animal/slime) - forbidden_types - var/slime_type = pick(potential_types) - new slime_type(get_turf(holder.my_atom)) - ..() +/datum/chemical_reaction/slime/rainbow_random_slime/on_reaction(var/datum/reagents/holder) + var/mob/living/simple_animal/slime/S + var/list/slime_types = typesof(/mob/living/simple_animal/slime) + + while(slime_types.len) + S = pick(slime_types) + if(initial(S.rainbow_core_candidate) == TRUE) + break + else + slime_types -= S + S = null + + if(S) + new S(get_turf(holder.my_atom)) /datum/chemical_reaction/slime/rainbow_unity name = "Slime Unity"