From 2737497d9f0b3cfa38f6e2dd0bb218e3ff8951c8 Mon Sep 17 00:00:00 2001 From: Geeves Date: Tue, 11 Feb 2020 21:56:38 +0200 Subject: [PATCH] Xenobio Requested Things (and more) (#8108) Slimes are now content after growing into adults or reproducing, meaning they won't attack humanoids for a while afterwards. The slime scanner has been tweaked to be a bit nicer. Slightly reduced the damage slimes do. Clicking a delivery chute with a held animal, such as a monkey, will now automatically deposit them into it. --- aurorastation.dme | 25 ++++----- code/_onclick/other_mobs.dm | 27 ++++++---- code/game/objects/items/devices/scanners.dm | 53 ++++++++++--------- code/modules/mob/living/carbon/slime/_mood.dm | 5 ++ .../living/carbon/{metroid => slime}/death.dm | 0 .../living/carbon/{metroid => slime}/emote.dm | 10 ++-- .../carbon/{metroid => slime}/examine.dm | 0 .../living/carbon/{metroid => slime}/hud.dm | 0 .../living/carbon/{metroid => slime}/items.dm | 0 .../living/carbon/{metroid => slime}/life.dm | 16 +++--- .../living/carbon/{metroid => slime}/login.dm | 0 .../carbon/{metroid => slime}/powers.dm | 11 ++-- .../living/carbon/{metroid => slime}/say.dm | 2 +- .../{metroid/metroid.dm => slime/slime.dm} | 10 +++- .../carbon/{metroid => slime}/subtypes.dm | 0 .../carbon/{metroid => slime}/update_icons.dm | 0 code/modules/recycling/sortingmachinery.dm | 6 ++- html/changelogs/geeves-xenobio_requests.yml | 9 ++++ 18 files changed, 111 insertions(+), 63 deletions(-) create mode 100644 code/modules/mob/living/carbon/slime/_mood.dm rename code/modules/mob/living/carbon/{metroid => slime}/death.dm (100%) rename code/modules/mob/living/carbon/{metroid => slime}/emote.dm (95%) rename code/modules/mob/living/carbon/{metroid => slime}/examine.dm (100%) rename code/modules/mob/living/carbon/{metroid => slime}/hud.dm (100%) rename code/modules/mob/living/carbon/{metroid => slime}/items.dm (100%) rename code/modules/mob/living/carbon/{metroid => slime}/life.dm (98%) rename code/modules/mob/living/carbon/{metroid => slime}/login.dm (100%) rename code/modules/mob/living/carbon/{metroid => slime}/powers.dm (92%) rename code/modules/mob/living/carbon/{metroid => slime}/say.dm (99%) rename code/modules/mob/living/carbon/{metroid/metroid.dm => slime/slime.dm} (97%) rename code/modules/mob/living/carbon/{metroid => slime}/subtypes.dm (100%) rename code/modules/mob/living/carbon/{metroid => slime}/update_icons.dm (100%) create mode 100644 html/changelogs/geeves-xenobio_requests.yml diff --git a/aurorastation.dme b/aurorastation.dme index 9dcacec8787..b353758e1f3 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1880,18 +1880,19 @@ #include "code\modules\mob\living\carbon\human\species\station\unathi\unathi_subspecies.dm" #include "code\modules\mob\living\carbon\human\species\station\vaurca\vaurca.dm" #include "code\modules\mob\living\carbon\human\species\station\vaurca\vaurca_subspecies.dm" -#include "code\modules\mob\living\carbon\metroid\death.dm" -#include "code\modules\mob\living\carbon\metroid\emote.dm" -#include "code\modules\mob\living\carbon\metroid\examine.dm" -#include "code\modules\mob\living\carbon\metroid\hud.dm" -#include "code\modules\mob\living\carbon\metroid\items.dm" -#include "code\modules\mob\living\carbon\metroid\life.dm" -#include "code\modules\mob\living\carbon\metroid\login.dm" -#include "code\modules\mob\living\carbon\metroid\metroid.dm" -#include "code\modules\mob\living\carbon\metroid\powers.dm" -#include "code\modules\mob\living\carbon\metroid\say.dm" -#include "code\modules\mob\living\carbon\metroid\subtypes.dm" -#include "code\modules\mob\living\carbon\metroid\update_icons.dm" +#include "code\modules\mob\living\carbon\slime\_mood.dm" +#include "code\modules\mob\living\carbon\slime\death.dm" +#include "code\modules\mob\living\carbon\slime\emote.dm" +#include "code\modules\mob\living\carbon\slime\examine.dm" +#include "code\modules\mob\living\carbon\slime\hud.dm" +#include "code\modules\mob\living\carbon\slime\items.dm" +#include "code\modules\mob\living\carbon\slime\life.dm" +#include "code\modules\mob\living\carbon\slime\login.dm" +#include "code\modules\mob\living\carbon\slime\powers.dm" +#include "code\modules\mob\living\carbon\slime\say.dm" +#include "code\modules\mob\living\carbon\slime\slime.dm" +#include "code\modules\mob\living\carbon\slime\subtypes.dm" +#include "code\modules\mob\living\carbon\slime\update_icons.dm" #include "code\modules\mob\living\parasite\meme.dm" #include "code\modules\mob\living\parasite\meme_captive.dm" #include "code\modules\mob\living\silicon\computer.dm" diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 7b521498c28..07788621a5c 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -87,8 +87,9 @@ setClickCooldown(DEFAULT_ATTACK_COOLDOWN) var/mob/living/M = A - if (istype(M)) - + if(ishuman(M) && !istype(M, /mob/living/carbon/human/monkey) && content) + return + if(istype(M)) switch(src.a_intent) if (I_HELP) // We just poke the other M.visible_message("[src] gently pokes [M]!", "[src] gently pokes you!") @@ -100,15 +101,21 @@ var/mob/living/carbon/human/H = M stunprob *= H.species.siemens_coefficient - switch(power * 10) - if(0) stunprob *= 10 - if(1 to 2) stunprob *= 20 - if(3 to 4) stunprob *= 30 - if(5 to 6) stunprob *= 40 - if(7 to 8) stunprob *= 60 - if(9) stunprob *= 70 - if(10) stunprob *= 95 + if(0) + stunprob *= 10 + if(1 to 2) + stunprob *= 20 + if(3 to 4) + stunprob *= 30 + if(5 to 6) + stunprob *= 40 + if(7 to 8) + stunprob *= 60 + if(9) + stunprob *= 70 + if(10) + stunprob *= 95 if(prob(stunprob)) powerlevel = max(0, powerlevel-3) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 774eaed7eba..f64755c064e 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -464,36 +464,41 @@ BREATH ANALYZER throw_range = 7 matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20) -/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob) - if (!isslime(M)) - to_chat(user, "This device can only scan slimes!") +/obj/item/device/slime_scanner/attack(mob/living/M, mob/living/user) + if(!isslime(M)) + to_chat(user, span("warning", "This device can only scan slimes!")) return var/mob/living/carbon/slime/T = M - user.show_message("Slime scan results:") - user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby")) - user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition())) - if (T.nutrition < T.get_starve_nutrition()) - user.show_message("Warning: slime is starving!") + to_chat(user, span("notice", "**************************")) + to_chat(user, span("notice", "Slime scan results:")) + to_chat(user, span("notice", capitalize_first_letters("[T.colour] [T.is_adult ? "adult" : "baby"] slime"))) + to_chat(user, span("notice", "Health: [T.health]")) + to_chat(user, span("notice", "Nutrition: [T.nutrition]/[T.get_max_nutrition()]")) + if(T.nutrition < T.get_starve_nutrition()) + to_chat(user, span("alert", "Warning: slime is starving!")) else if (T.nutrition < T.get_hunger_nutrition()) - user.show_message("Warning: slime is hungry") - user.show_message("Electric change strength: [T.powerlevel]") - user.show_message("Health: [T.health]") - if (T.slime_mutation[4] == T.colour) - user.show_message("This slime does not evolve any further") + to_chat(user, span("warning", "Warning: slime is hungry!")) + to_chat(user, span("notice", "Electric charge strength: [T.powerlevel]")) + to_chat(user, span("notice", "Growth progress: [T.amount_grown]/10")) + if(T.cores > 1) + to_chat(user, span("warning", "Anomalous number of slime cores detected.")) + else if(!T.cores) + to_chat(user, span("warning", "No slime cores detected.")) + to_chat(user, span("notice", "Genetic Information:")) + if(T.slime_mutation[4] == T.colour) + to_chat(user, span("warning", "This slime cannot evolve any further.")) else - if (T.slime_mutation[3] == T.slime_mutation[4]) - if (T.slime_mutation[2] == T.slime_mutation[1]) - user.show_message(text("Possible mutation: []", T.slime_mutation[3])) - user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting") + if(T.slime_mutation[3] == T.slime_mutation[4]) + if(T.slime_mutation[2] == T.slime_mutation[1]) + to_chat(user, span("notice", "Possible mutation: [T.slime_mutation[3]]")) + to_chat(user, span("notice", "Instability: [T.mutation_chance/2]% chance of mutation upon reproduction.")) else - user.show_message(text("Possible mutations: [], [], [] (x2)", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3])) - user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting") + to_chat(user, span("notice", "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)")) + to_chat(user, span("notice", "Instability: [T.mutation_chance]% chance of mutation upon reproduction.")) else - user.show_message(text("Possible mutations: [], [], [], []", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3], T.slime_mutation[4])) - user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting") - if (T.cores > 1) - user.show_message("Anomalious slime core amount detected") - user.show_message("Growth progress: [T.amount_grown]/10") + to_chat(user, span("notice", "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]")) + to_chat(user, span("notice", "Instability: [T.mutation_chance]% chance of mutation upon reproduction.")) + to_chat(user, span("notice", "**************************")) /obj/item/device/price_scanner diff --git a/code/modules/mob/living/carbon/slime/_mood.dm b/code/modules/mob/living/carbon/slime/_mood.dm new file mode 100644 index 00000000000..4597597bcce --- /dev/null +++ b/code/modules/mob/living/carbon/slime/_mood.dm @@ -0,0 +1,5 @@ +#define POUT "pout" +#define SAD "sad" +#define ANGRY "angry" +#define MISCHIEVOUS "mischevous" +#define HAPPY ":3" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/metroid/death.dm b/code/modules/mob/living/carbon/slime/death.dm similarity index 100% rename from code/modules/mob/living/carbon/metroid/death.dm rename to code/modules/mob/living/carbon/slime/death.dm diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/slime/emote.dm similarity index 95% rename from code/modules/mob/living/carbon/metroid/emote.dm rename to code/modules/mob/living/carbon/slime/emote.dm index abe7ea9710a..0381e91f9b0 100644 --- a/code/modules/mob/living/carbon/metroid/emote.dm +++ b/code/modules/mob/living/carbon/slime/emote.dm @@ -60,23 +60,23 @@ updateicon = 1 if("pout") - mood = "pout" + mood = POUT updateicon = 1 if("sad") - mood = "sad" + mood = SAD updateicon = 1 if("angry") - mood = "angry" + mood = ANGRY updateicon = 1 if("frown") - mood = "mischevous" + mood = MISCHIEVOUS updateicon = 1 if("smile") - mood = ":3" + mood = HAPPY updateicon = 1 if("help") //This is an exception diff --git a/code/modules/mob/living/carbon/metroid/examine.dm b/code/modules/mob/living/carbon/slime/examine.dm similarity index 100% rename from code/modules/mob/living/carbon/metroid/examine.dm rename to code/modules/mob/living/carbon/slime/examine.dm diff --git a/code/modules/mob/living/carbon/metroid/hud.dm b/code/modules/mob/living/carbon/slime/hud.dm similarity index 100% rename from code/modules/mob/living/carbon/metroid/hud.dm rename to code/modules/mob/living/carbon/slime/hud.dm diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/slime/items.dm similarity index 100% rename from code/modules/mob/living/carbon/metroid/items.dm rename to code/modules/mob/living/carbon/slime/items.dm diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/slime/life.dm similarity index 98% rename from code/modules/mob/living/carbon/metroid/life.dm rename to code/modules/mob/living/carbon/slime/life.dm index f26e9baad54..09e51093be7 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -366,21 +366,25 @@ var/newmood = "" a_intent = I_HELP if(rabid || attacked) - newmood = "angry" + set_content(FALSE) + newmood = ANGRY a_intent = I_HURT else if(target) - newmood = "mischevous" + newmood = MISCHIEVOUS if(!newmood) if(discipline && prob(25)) - newmood = "pout" + newmood = POUT else if(prob(1)) - newmood = pick("sad", ":3", "pout") + newmood = pick(SAD, HAPPY, POUT) - if((mood == "sad" || mood == ":3" || mood == "pout") && !newmood) + if((mood == SAD || mood == HAPPY || mood == POUT) && !newmood) if(prob(75)) newmood = mood + if(!newmood && !mood && content) + mood = HAPPY + if(newmood != mood) // This is so we don't redraw them every time mood = newmood regenerate_icons() @@ -496,7 +500,7 @@ phrases += "Hrr..." phrases += "Nhuu..." phrases += "Unn..." - if(mood == ":3") + if(mood == HAPPY) phrases += "Purr..." if(attacked) phrases += "Grrr..." diff --git a/code/modules/mob/living/carbon/metroid/login.dm b/code/modules/mob/living/carbon/slime/login.dm similarity index 100% rename from code/modules/mob/living/carbon/metroid/login.dm rename to code/modules/mob/living/carbon/slime/login.dm diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/slime/powers.dm similarity index 92% rename from code/modules/mob/living/carbon/metroid/powers.dm rename to code/modules/mob/living/carbon/slime/powers.dm index ec3eec3aa61..40c3e49e563 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/slime/powers.dm @@ -21,8 +21,10 @@ return "I cannot feed on other slimes..." if(!Adjacent(M)) return "This subject is too far away..." + if(ishuman(M) && !istype(M, /mob/living/carbon/human/monkey) && content) // don't eat humans while content + return "I'm already content..." if(istype(M, /mob/living/carbon) && M.getCloneLoss() >= M.maxHealth * 2 || istype(M, /mob/living/simple_animal) && M.stat == DEAD) - return "This subject does not have an edible life energy..." + return "This subject does not have any edible life energy..." if(istype(M, /mob/living/carbon)) var/mob/living/carbon/human/H = M if(istype(H) && (H.species.flags & NO_SCAN)) @@ -49,9 +51,8 @@ if(istype(M, /mob/living/carbon)) victim.adjustCloneLoss(rand(5,6)) - victim.adjustToxLoss(rand(5,8)) + victim.adjustToxLoss(rand(3,6)) victim.adjustBruteLoss(is_adult ? rand(2, 4) : rand(1, 3)) - victim.reagents.add_reagent("toxin", 2) if(victim.health <= 0) victim.adjustToxLoss(rand(6,9)) if(prob(20) && !isSynthetic(victim)) @@ -140,6 +141,8 @@ regenerate_icons() name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])") real_name = name + set_content(TRUE) + addtimer(CALLBACK(src, .proc/set_content, FALSE), 1200) // You get two minutes of safety else to_chat(src, span("notice", "I am not ready to evolve yet...")) else @@ -174,6 +177,8 @@ step_away(M, src) M.friends = friends.Copy() babies += M + M.set_content(TRUE) + addtimer(CALLBACK(M, .proc/set_content, FALSE), 1200) // You get two minutes of safety feedback_add_details("slime_babies_born", "slimebirth_[replacetext(M.colour," ","_")]") var/mob/living/carbon/slime/new_slime = pick(babies) diff --git a/code/modules/mob/living/carbon/metroid/say.dm b/code/modules/mob/living/carbon/slime/say.dm similarity index 99% rename from code/modules/mob/living/carbon/metroid/say.dm rename to code/modules/mob/living/carbon/slime/say.dm index af1a7729bd0..058c3bccc39 100644 --- a/code/modules/mob/living/carbon/metroid/say.dm +++ b/code/modules/mob/living/carbon/slime/say.dm @@ -36,4 +36,4 @@ speech_buffer = list() speech_buffer.Add(speaker) speech_buffer.Add(lowertext(html_decode(message))) - ..() + ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/slime/slime.dm similarity index 97% rename from code/modules/mob/living/carbon/metroid/metroid.dm rename to code/modules/mob/living/carbon/slime/slime.dm index e460c757b21..0c8a8f60143 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -35,6 +35,7 @@ var/mob/living/target = null // AI variable - tells the slime to hunt this down var/mob/living/leader = null // AI variable - tells the slime to follow this person + var/content = FALSE // Don't attack humanoids while content, this gives xenobiologists the time to move slimes post-splitting var/attacked = 0 // Determines if it's been attacked recently. Can be any number, is a cooloff-ish variable var/rabid = 0 // If set to 1, the slime will attack and eat anything it comes in contact with var/holding_still = 0 // AI variable, cooloff-ish for how long it's going to stay in one place @@ -446,4 +447,11 @@ powerlevel = 10 adjustToxLoss(-10) nutrition += amount - nutrition = min(nutrition, get_max_nutrition()) \ No newline at end of file + nutrition = min(nutrition, get_max_nutrition()) + +/mob/living/carbon/slime/proc/set_content(var/do_content) + if(do_content) + content = TRUE + mood = HAPPY + else + content = FALSE \ No newline at end of file diff --git a/code/modules/mob/living/carbon/metroid/subtypes.dm b/code/modules/mob/living/carbon/slime/subtypes.dm similarity index 100% rename from code/modules/mob/living/carbon/metroid/subtypes.dm rename to code/modules/mob/living/carbon/slime/subtypes.dm diff --git a/code/modules/mob/living/carbon/metroid/update_icons.dm b/code/modules/mob/living/carbon/slime/update_icons.dm similarity index 100% rename from code/modules/mob/living/carbon/metroid/update_icons.dm rename to code/modules/mob/living/carbon/slime/update_icons.dm diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 60472f35311..2653618a19a 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -274,7 +274,7 @@ openwindow(usr) /obj/machinery/disposal/deliveryChute - name = "Delivery chute" + name = "delivery chute" desc = "A chute for big and small packages alike!" density = 1 icon_state = "intake" @@ -339,6 +339,10 @@ if(!I || !user) return + if(istype(I, /obj/item/holder)) + user.drop_item(I) + CollidedWith(I) + if(I.isscrewdriver()) if(c_mode==0) c_mode=1 diff --git a/html/changelogs/geeves-xenobio_requests.yml b/html/changelogs/geeves-xenobio_requests.yml new file mode 100644 index 00000000000..e25981a0606 --- /dev/null +++ b/html/changelogs/geeves-xenobio_requests.yml @@ -0,0 +1,9 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Slimes are now content after growing into adults or reproducing, meaning they won't attack humanoids for a while afterwards." + - tweak: "The slime scanner has been tweaked to be a bit nicer." + - tweak: "Slightly reduced the damage slimes do." + - rscadd: "Clicking a delivery chute with a held animal, such as a monkey, will now automatically deposit them into it." \ No newline at end of file