From a66482de75606771f7ab47a15910c1ca1e4f23cf Mon Sep 17 00:00:00 2001 From: Neerti Date: Tue, 28 Nov 2017 02:03:21 -0500 Subject: [PATCH] Adds a Wild Slime type for future surface-things. --- .../mob/living/simple_animal/slime/death.dm | 5 ++++- .../mob/living/simple_animal/slime/slime.dm | 9 ++++++--- .../living/simple_animal/slime/subtypes.dm | 20 +++++++++++++++++++ code/modules/mob/mob.dm | 1 + 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/simple_animal/slime/death.dm b/code/modules/mob/living/simple_animal/slime/death.dm index 01500db42e..622b12a859 100644 --- a/code/modules/mob/living/simple_animal/slime/death.dm +++ b/code/modules/mob/living/simple_animal/slime/death.dm @@ -4,7 +4,10 @@ return if(!gibbed && is_adult) - var/mob/living/simple_animal/slime/S = make_new_slime() + var/death_type = type_on_death + if(!death_type) + death_type = src.type + var/mob/living/simple_animal/slime/S = make_new_slime(death_type) S.rabid = TRUE step_away(S, src) is_adult = FALSE diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 7a213ac97f..4148856d72 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -1,5 +1,5 @@ /mob/living/simple_animal/slime - name = "baby slime" + name = "slime" desc = "The most basic of slimes. The grey slime has no remarkable qualities, however it remains one of the most useful colors for scientists." icon = 'icons/mob/slime2.dmi' icon_state = "grey baby slime" @@ -84,6 +84,7 @@ /mob/living/simple_animal/slime/blue, /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/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. @@ -123,7 +124,7 @@ /mob/living/simple_animal/slime/proc/update_name() if(docile) // Docile slimes are generally named, so we shouldn't mess with it. return - name = "[slime_color] [is_adult ? "adult" : "baby"] slime ([number])" + name = "[slime_color] [is_adult ? "adult" : "baby"] [initial(name)] ([number])" real_name = name /mob/living/simple_animal/slime/update_icon() @@ -338,8 +339,10 @@ to_chat(src, "I am not old enough to reproduce yet...") // Used for reproducing and dying. -/mob/living/simple_animal/slime/proc/make_new_slime() +/mob/living/simple_animal/slime/proc/make_new_slime(var/desired_type) var/t = src.type + if(desired_type) + t = desired_type if(prob(mutation_chance / 10)) t = /mob/living/simple_animal/slime/rainbow diff --git a/code/modules/mob/living/simple_animal/slime/subtypes.dm b/code/modules/mob/living/simple_animal/slime/subtypes.dm index 5b53041175..c064048945 100644 --- a/code/modules/mob/living/simple_animal/slime/subtypes.dm +++ b/code/modules/mob/living/simple_animal/slime/subtypes.dm @@ -209,6 +209,26 @@ /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" + 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." + description_info = "This slime makes other entities near it feel much colder, and is more resilient to the cold. It also has learned advanced combat tactics from \ + having to endure the harsh world outside its lab. Note that processing this large slime will give six cores." + icon_scale = 2 + optimal_combat = TRUE // Gotta be sharp to survive out there. + rabid = TRUE + cores = 6 + maxHealth = 150 // Base health + 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() + ..() + make_adult() /mob/living/simple_animal/slime/silver desc = "This slime is shiny, and can deflect lasers or other energy weapons directed at it." diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6063526c89..744addd6e3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -44,6 +44,7 @@ dead_mob_list += src else living_mob_list += src + update_transform() // Some mobs may start bigger or smaller than normal. ..() /mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)