diff --git a/code/modules/mob/living/simple_animal/friendly/adhomai.dm b/code/modules/mob/living/simple_animal/friendly/adhomai.dm index b17420236fd..117b315a8f0 100644 --- a/code/modules/mob/living/simple_animal/friendly/adhomai.dm +++ b/code/modules/mob/living/simple_animal/friendly/adhomai.dm @@ -88,7 +88,7 @@ mob_size = 15 canbrush = TRUE - has_udder = TRUE + can_be_milked = TRUE milk_type = /singleton/reagent/drink/milk/adhomai meat_type = /obj/item/reagent_containers/food/snacks/meat/adhomai @@ -102,7 +102,7 @@ icon_living = "fatshouter_m" icon_dead = "fatshouter_m_dead" gender = MALE - has_udder = FALSE + can_be_milked = FALSE /mob/living/simple_animal/hostile/retaliate/rafama name = "steed of Mata'ke" diff --git a/code/modules/mob/living/simple_animal/friendly/carp.dm b/code/modules/mob/living/simple_animal/friendly/carp.dm index 4f43947fb82..10b7003b861 100644 --- a/code/modules/mob/living/simple_animal/friendly/carp.dm +++ b/code/modules/mob/living/simple_animal/friendly/carp.dm @@ -1,5 +1,5 @@ /mob/living/simple_animal/carp - name = "space carp" + name = "tame space carp" desc = "A domesticated, floating space carp. Careful around the teeth." icon = 'icons/mob/npc/animal.dmi' icon_state = "carp" @@ -9,10 +9,10 @@ icon_gib = "carp_gib" icon_rest = "carp_rest" can_nap = TRUE - speak = list("Glub!") + speak = list("Glub!", "Glub?", "Glub.") speak_emote = list("glubs", "glibs") emote_hear = list("glubs","glibs") - emote_see = list("floats steadily", "inflates its gills") + emote_see = list("floats steadily", "inflates its gills", "flaps its flippers", "wiggles", "waggles") speak_chance = 1 turns_per_move = 5 meat_type = /obj/item/reagent_containers/food/snacks/fish/carpmeat @@ -25,6 +25,11 @@ faction = "carp" flying = TRUE + can_be_milked = TRUE + udder_size = 3 + milk_type = /singleton/reagent/toxin/carpotoxin + milk_regeneration = list(1, 2) + //Space carp aren't affected by atmos. min_oxy = 0 max_oxy = 0 @@ -138,11 +143,17 @@ gender = FEMALE - emote_see = list("floats steadily", "inflates her gills") + emote_see = list("floats steadily", "inflates her gills", "flaps her flippers", "wiggles", "waggles") can_nap = TRUE mob_size = 3.5 + // Actually cannot be milked, but this way we get the error message. + can_be_milked = TRUE + udder_size = 2 + milk_type = /singleton/reagent/toxin/carpotoxin + milk_regeneration = list(1, 1) + befriend_job = "Chief Engineer" holder_type = /obj/item/holder/carp/baby @@ -150,6 +161,10 @@ .=..() desc = "WHO KILLED GINNY?!" +/mob/living/simple_animal/carp/fluff/ginny/handle_milking(mob/user, obj/item/reagent_containers/container) + //user.visible_message("[SPAN_BOLD("Ginny")] shies away from the [container] and stares at [SPAN_BOLD("[user]")] judgementally.") + user.visible_message("[pick("[SPAN_BOLD("Ginny")] shies away from the [container] and stares at [SPAN_BOLD("[user]")] judgementally.", "[SPAN_BOLD("Ginny")] recoils from [SPAN_BOLD("[user]")] with an indignant glub.", "[SPAN_BOLD("Ginny")] bares her tiny fangs and evades the [container].", "[SPAN_BOLD("Ginny")] stretches a flipper out and pushes the [container] away.")]") + /mob/living/simple_animal/carp/baby name = "baby space carp" desc = "Awfully cute! Looks friendly!" diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index ffe3b7139d9..d68461397d8 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -27,7 +27,7 @@ udder = null canbrush = TRUE emote_sounds = list('sound/effects/creatures/goat.ogg') - has_udder = TRUE + can_be_milked = TRUE hostile_nameable = TRUE butchering_products = list(/obj/item/stack/material/animalhide = 3) @@ -99,7 +99,7 @@ mob_size = 20//based on mass of holstein fresian dairy cattle, what the sprite is based on emote_sounds = list('sound/effects/creatures/cow.ogg') canbrush = TRUE - has_udder = TRUE + can_be_milked = TRUE butchering_products = list(/obj/item/stack/material/animalhide = 8) forbidden_foods = list(/obj/item/reagent_containers/food/snacks/egg) diff --git a/code/modules/mob/living/simple_animal/friendly/hakhma.dm b/code/modules/mob/living/simple_animal/friendly/hakhma.dm index d0886722f2a..f1c8cc5de46 100644 --- a/code/modules/mob/living/simple_animal/friendly/hakhma.dm +++ b/code/modules/mob/living/simple_animal/friendly/hakhma.dm @@ -25,5 +25,5 @@ mob_size = 15 - has_udder = TRUE + can_be_milked = TRUE milk_type = /singleton/reagent/drink/milk/beetle diff --git a/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm b/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm index ad3c0177126..b61e41d08b0 100644 --- a/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm +++ b/code/modules/mob/living/simple_animal/friendly/schlorrgo.dm @@ -26,7 +26,7 @@ maxHealth = 30 health = 30 - has_udder = TRUE + can_be_milked = TRUE milk_type = /singleton/reagent/drink/milk/schlorrgo friendly = "bumped" @@ -235,7 +235,7 @@ maxHealth = 80 health = 80 - has_udder = FALSE + can_be_milked = FALSE organ_names = list("head", "chest", "augmented core", "augmented torso", "robotic centre", "left leg", "right leg") butchering_products = list(/obj/item/reagent_containers/food/snacks/spreads/lard = 1) diff --git a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm index 882cb45ef22..81a7420af89 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm @@ -22,6 +22,11 @@ health = 25 mob_size = 10 + can_be_milked = TRUE + udder_size = 3 + milk_type = /singleton/reagent/toxin/carpotoxin + milk_regeneration = list(1, 2) + blood_overlay_icon = 'icons/mob/npc/blood_overlay_carp.dmi' harm_intent_damage = 4 melee_damage_lower = 15 diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index fabd61c6f8c..4819452a744 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -139,8 +139,16 @@ var/flying = FALSE //if they can fly, which stops them from falling down and allows z-space travel - var/has_udder = FALSE + /// Whether this animal can be milked or not. + var/can_be_milked = FALSE + /// The reagent storage for the animal's milking product. var/datum/reagents/udder = null + /// The size of the udder's reagent storage. + var/udder_size = 50 + /// The minimum and upper floor of the per-tick milk regeneration to feed into rand(). This list should always have both minimum and upper floor. + /// This is also how much milk is taken from the animal at once. + var/list/milk_regeneration = list(5, 10) + /// What the animal's milking product is. var/milk_type = /singleton/reagent/drink/milk var/list/butchering_products //if anything else is created when butchering this creature, like bones and leather @@ -181,8 +189,8 @@ reagents = new/datum/reagents(20, src) nutrition = max_nutrition - if(has_udder) - udder = new(50) + if(can_be_milked) + udder = new(udder_size) udder.my_atom = src if(LAZYLEN(natural_armor)) @@ -311,10 +319,10 @@ if(!atmos_suitable) apply_damage(unsuitable_atoms_damage, DAMAGE_OXY, used_weapon = "Atmosphere") - if(has_udder) + if(can_be_milked) if(stat == CONSCIOUS) if(udder && prob(5)) - udder.add_reagent(milk_type, rand(5, 10)) + udder.add_reagent(milk_type, rand(milk_regeneration[1], milk_regeneration[2])) return 1 @@ -577,21 +585,13 @@ qdel(attacking_item) qdel(src) - if(istype(attacking_item, /obj/item/reagent_containers/glass/rag)) //You can't milk an udder with a rag. - attacked_with_item(attacking_item, user) - return - if(has_udder) + if(can_be_milked) var/obj/item/reagent_containers/glass/G = attacking_item - if(stat == CONSCIOUS && istype(G) && G.is_open_container()) - if(udder.total_volume <= 0) - to_chat(user, SPAN_WARNING("The udder is dry.")) - return - if(G.reagents.total_volume >= G.volume) - to_chat(user, SPAN_WARNING("The [attacking_item] is full.")) - return - user.visible_message("\The [user] milks \the [src] using \the [attacking_item].") - udder.trans_type_to(G, milk_type, rand(5, 10)) + if(istype(G, /obj/item/reagent_containers/glass/rag)) //You can't milk an udder with a rag. + attacked_with_item(attacking_item, user) return + if(stat == CONSCIOUS && istype(G) && G.is_open_container()) + handle_milking(user, G) if(istype(attacking_item, /obj/item/reagent_containers) || istype(attacking_item, /obj/item/stack/medical) || istype(attacking_item,/obj/item/gripper/)) ..() @@ -1018,6 +1018,16 @@ /mob/living/simple_animal/InStasis() return in_stasis +/mob/living/simple_animal/proc/handle_milking(mob/user, obj/item/reagent_containers/container) + if(udder.total_volume <= 0) + to_chat(user, SPAN_WARNING("There is nothing left to collect.")) + return + if(container.reagents.total_volume >= container.volume) + to_chat(user, SPAN_WARNING("The [container] is full.")) + return + user.visible_message("\The [user] milks \the [src] using \the [container].") + udder.trans_type_to(container, milk_type, rand(milk_regeneration[1], milk_regeneration[2])) + #undef BLOOD_NONE #undef BLOOD_LIGHT #undef BLOOD_MEDIUM diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 78d8550250c..5a9ae0b83e2 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -262,7 +262,7 @@ if(isanimal(target)) var/mob/living/simple_animal/C = target - if(C.has_udder) + if(C.can_be_milked) return other_feed_message_start(user, target) diff --git a/html/changelogs/ASmallCuteCat - carp-diem.yml b/html/changelogs/ASmallCuteCat - carp-diem.yml new file mode 100644 index 00000000000..8e2221774a5 --- /dev/null +++ b/html/changelogs/ASmallCuteCat - carp-diem.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: ASmallCuteCat + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added the ability to harmlessly harvest small quantities of carpotoxin from space carps." + - qol: "Non-hostile space carps are now identified as tame, to avoid confusion. Added several new idle emotes to space carps." +