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.
This commit is contained in:
Geeves
2020-02-11 20:56:38 +01:00
committed by GitHub
parent fe5b4184c1
commit 2737497d9f
18 changed files with 111 additions and 63 deletions
+13 -12
View File
@@ -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"
+17 -10
View File
@@ -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("<span class='notice'>[src] gently pokes [M]!</span>", "<span class='notice'>[src] gently pokes you!</span>")
@@ -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)
+29 -24
View File
@@ -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, "<B>This device can only scan slimes!</B>")
/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("<span class='alert'>Warning: slime is starving!</span>")
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("<span class='warning'>Warning: slime is hungry</span>")
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
@@ -0,0 +1,5 @@
#define POUT "pout"
#define SAD "sad"
#define ANGRY "angry"
#define MISCHIEVOUS "mischevous"
#define HAPPY ":3"
@@ -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
@@ -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..."
@@ -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)
@@ -36,4 +36,4 @@
speech_buffer = list()
speech_buffer.Add(speaker)
speech_buffer.Add(lowertext(html_decode(message)))
..()
..()
@@ -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())
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
+5 -1
View File
@@ -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
@@ -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."