diff --git a/_maps/map_files/VoidRaptor/VoidRaptor.dmm b/_maps/map_files/VoidRaptor/VoidRaptor.dmm index 0f642dd140a..e9c29044e0b 100644 --- a/_maps/map_files/VoidRaptor/VoidRaptor.dmm +++ b/_maps/map_files/VoidRaptor/VoidRaptor.dmm @@ -74447,7 +74447,7 @@ anchored = 1; name = "Daisy's bed" }, -/mob/living/simple_animal/rabbit/daisy, +/mob/living/basic/rabbit/daisy, /turf/open/floor/carpet, /area/station/service/library) "uXM" = ( diff --git a/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm b/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm index ba1be6b784a..c0aaacfce3e 100644 --- a/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm +++ b/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm @@ -54,6 +54,28 @@ emote_hear = list("bleats.") emote_see = list("shakes her head.", "stares into the distance.") +/datum/ai_planning_subtree/random_speech/rabbit + speech_chance = 10 + speak = list("Mrrp.", "CHIRP!", "Mrrp?") // rabbits make some weird noises dude i don't know what to tell you + emote_hear = list("hops.") + emote_see = list("hops around.", "bounces up and down.") + +/// For the easter subvariant of rabbits, these ones actually speak catchphrases. +/datum/ai_planning_subtree/random_speech/rabbit/easter + speak = list( + "Hop into Easter!", + "Come get your eggs!", + "Prizes for everyone!", + ) + +/// These ones have a space mask on, so their catchphrases are muffled. +/datum/ai_planning_subtree/random_speech/rabbit/easter/space + speak = list( + "Hmph mmph mmmph!", + "Mmphe mmphe mmphe!", + "Hmm mmm mmm!", + ) + /datum/ai_planning_subtree/random_speech/cow speech_chance = 1 speak = list("moo?","moo","MOOOOOO") diff --git a/code/datums/elements/basic_body_temp_sensitive.dm b/code/datums/elements/basic_body_temp_sensitive.dm index 9781a2adb18..36755252de0 100644 --- a/code/datums/elements/basic_body_temp_sensitive.dm +++ b/code/datums/elements/basic_body_temp_sensitive.dm @@ -19,14 +19,18 @@ if(!isbasicmob(target)) return ELEMENT_INCOMPATIBLE - if(min_body_temp) + if(isnum(min_body_temp)) src.min_body_temp = min_body_temp - if(max_body_temp) + + if(isnum(max_body_temp)) src.max_body_temp = max_body_temp - if(cold_damage) + + if(isnum(cold_damage)) src.cold_damage = cold_damage - if(heat_damage) + + if(isnum(heat_damage)) src.heat_damage = heat_damage + RegisterSignal(target, COMSIG_LIVING_LIFE, PROC_REF(on_life)) /datum/element/basic_body_temp_sensitive/Detach(datum/source) diff --git a/code/modules/awaymissions/mission_code/Cabin.dm b/code/modules/awaymissions/mission_code/Cabin.dm index 02e251849b9..f2c55228fcf 100644 --- a/code/modules/awaymissions/mission_code/Cabin.dm +++ b/code/modules/awaymissions/mission_code/Cabin.dm @@ -159,7 +159,7 @@ spawnableAtoms = list(/obj/structure/flora/bush/snow/style_random = 1) /datum/map_generator_module/snow/bunnies - spawnableAtoms = list(/mob/living/simple_animal/rabbit = 0.5) + spawnableAtoms = list(/mob/living/basic/rabbit = 0.5) /datum/map_generator_module/snow/rand_ice_rocks spawnableAtoms = list(/obj/structure/flora/rock/icy/style_random = 5, /obj/structure/flora/rock/pile/icy/style_random = 5) diff --git a/code/modules/clothing/head/tophat.dm b/code/modules/clothing/head/tophat.dm index affb5ffc98b..f34e41a93b7 100644 --- a/code/modules/clothing/head/tophat.dm +++ b/code/modules/clothing/head/tophat.dm @@ -34,7 +34,7 @@ barry.say(pick("BUZZ BUZZ", "PULLING A RABBIT OUT OF A HAT IS A TIRED TROPE", "I DIDN'T ASK TO BEE HERE"), forced = "bee hat") else magician.visible_message(span_notice("[magician] taps [src] with [hitby_wand], then reaches in and pulls out a bunny! Cute!"), span_notice("You tap [src] with your [hitby_wand.name] and pull out a cute bunny!")) - var/mob/living/simple_animal/rabbit/bunbun = new(get_turf(magician)) + var/mob/living/basic/rabbit/bunbun = new(get_turf(magician)) bunbun.mob_try_pickup(magician, instant=TRUE) #undef RABBIT_CD_TIME diff --git a/code/modules/events/holiday/easter.dm b/code/modules/events/holiday/easter.dm index 448c0c3306c..01cdd004797 100644 --- a/code/modules/events/holiday/easter.dm +++ b/code/modules/events/holiday/easter.dm @@ -30,9 +30,9 @@ if(R.name != "blobspawn") if(prob(35)) if(isspaceturf(R.loc)) - new /mob/living/simple_animal/rabbit/easter/space(R.loc) + new /mob/living/basic/rabbit/easter/space(R.loc) else - new /mob/living/simple_animal/rabbit/easter(R.loc) + new /mob/living/basic/rabbit/easter(R.loc) //Easter Baskets /obj/item/storage/basket/easter diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm index 258aeba52d5..f8deccea4f3 100644 --- a/code/modules/holodeck/holo_effect.dm +++ b/code/modules/holodeck/holo_effect.dm @@ -85,7 +85,7 @@ /mob/living/simple_animal/butterfly, /mob/living/simple_animal/chick/holo, /mob/living/simple_animal/pet/fox, - /mob/living/simple_animal/rabbit, + /mob/living/basic/rabbit, ) mobtype += pick( /mob/living/simple_animal/pet/dog/corgi, diff --git a/code/modules/mob/living/basic/farm_animals/rabbit.dm b/code/modules/mob/living/basic/farm_animals/rabbit.dm new file mode 100644 index 00000000000..78095d6f585 --- /dev/null +++ b/code/modules/mob/living/basic/farm_animals/rabbit.dm @@ -0,0 +1,111 @@ +/** + * ## Rabbit + * + * A creature that hops around with small tails and long ears. + * + * This contains the code for both your standard rabbit as well as the subtypes commonly found during Easter. + * + */ +/mob/living/basic/rabbit + name = "rabbit" + desc = "The hippiest hop around." + icon = 'icons/mob/simple/rabbit.dmi' + icon_state = "rabbit_white" + icon_living = "rabbit_white" + icon_dead = "rabbit_white_dead" + gender = PLURAL + mob_biotypes = MOB_ORGANIC | MOB_BEAST + health = 15 + maxHealth = 15 + density = FALSE + gold_core_spawnable = FRIENDLY_SPAWN + speak_emote = list("sniffles", "twitches") + response_help_continuous = "pets" + response_help_simple = "pet" + response_disarm_continuous = "gently pushes aside" + response_disarm_simple = "gently push aside" + attack_sound = 'sound/weapons/punch1.ogg' + attack_vis_effect = ATTACK_EFFECT_KICK + response_harm_continuous = "kicks" + response_harm_simple = "kick" + attack_verb_continuous = "kicks" + attack_verb_simple = "kick" + butcher_results = list(/obj/item/food/meat/slab = 1) + ai_controller = /datum/ai_controller/basic_controller/rabbit + /// passed to animal_varity as the prefix icon. + var/icon_prefix = "rabbit" + +/mob/living/basic/rabbit/Initialize(mapload) + . = ..() + AddElement(/datum/element/pet_bonus, "hops around happily!") + AddElement(/datum/element/animal_variety, icon_prefix, pick("brown", "black", "white"), TRUE) + if(prob(20)) // bunny + name = "bunny" + +/datum/ai_controller/basic_controller/rabbit + ai_traits = STOP_MOVING_WHEN_PULLED + ai_movement = /datum/ai_movement/basic_avoidance + idle_behavior = /datum/idle_behavior/idle_random_walk + planning_subtrees = list(/datum/ai_planning_subtree/random_speech/rabbit) + +/// The easter subtype of rabbits, will lay eggs and say Eastery catchphrases. +/mob/living/basic/rabbit/easter + icon_state = "easter_rabbit_white" + icon_living = "easter_rabbit_white" + icon_dead = "easter_rabbit_white_dead" + icon_prefix = "easter_rabbit" + ai_controller = /datum/ai_controller/basic_controller/rabbit/easter + ///passed to the egg_layer component as how many eggs it starts out as able to lay. + var/initial_egg_amount = 10 + ///passed to the egg_layer component as how many eggs it's allowed to hold at most. + var/max_eggs_held = 8 + +/mob/living/basic/rabbit/easter/Initialize(mapload) + . = ..() + //passed to the egg_layer component as how many eggs it gets when it eats something. + var/eggs_added_from_eating = rand(1, 4) + var/list/feed_messages = list("[p_they()] nibbles happily.", "[p_they()] noms happily.") + AddComponent(/datum/component/egg_layer,\ + /obj/item/surprise_egg,\ + list(/obj/item/food/grown/carrot),\ + feed_messages,\ + list("hides an egg.","scampers around suspiciously.","begins making a huge racket.","begins shuffling."),\ + initial_egg_amount,\ + eggs_added_from_eating,\ + max_eggs_held,\ + ) + +/datum/ai_controller/basic_controller/rabbit/easter + planning_subtrees = list(/datum/ai_planning_subtree/random_speech/rabbit/easter) + +/// Same deal as the standard easter subtype, but these ones are able to brave the cold of space with their handy gas mask. +/mob/living/basic/rabbit/easter/space + icon_state = "space_rabbit_white" + icon_living = "space_rabbit_white" + icon_dead = "space_rabbit_white_dead" + icon_prefix = "space_rabbit" + ai_controller = /datum/ai_controller/basic_controller/rabbit/easter/space + // Minimum Allowable Body Temp, zero because we are meant to survive in space and we have a fucking RABBIT SPACE MASK. + var/minimum_survivable_temperature = 0 + // Maximum Allowable Body Temp, 1500 because we might overheat and die in said RABBIT SPACE MASK. + var/maximum_survivable_temperature = 1500 + +/mob/living/basic/rabbit/easter/space/Initialize(mapload) + . = ..() + // string_assoc_list returns a cached list, which we then use as a static list to pass into the below AddElement + var/list/habitable_atmos = string_assoc_list(list( + "min_oxy" = 0, + "max_oxy" = 0, + "min_plas" = 0, + "max_plas" = 0, + "min_co2" = 0, + "max_co2" = 0, + "min_n2" = 0, + "max_n2" = 0, + )) + AddElement(/datum/element/atmos_requirements, atmos_requirements = habitable_atmos, unsuitable_atmos_damage = 0) + // heat_damage is 0.5 here to account for low health on the rabbit. + AddElement(/datum/element/basic_body_temp_sensitive, min_body_temp = minimum_survivable_temperature, max_body_temp = maximum_survivable_temperature, cold_damage = 0, heat_damage = 0.5) + +/datum/ai_controller/basic_controller/rabbit/easter/space + planning_subtrees = list(/datum/ai_planning_subtree/random_speech/rabbit/easter/space) diff --git a/code/modules/mob/living/simple_animal/friendly/rabbit.dm b/code/modules/mob/living/simple_animal/friendly/rabbit.dm deleted file mode 100644 index 7ece0ea7c5c..00000000000 --- a/code/modules/mob/living/simple_animal/friendly/rabbit.dm +++ /dev/null @@ -1,87 +0,0 @@ -/** - * ## Rabbit - * - * A creature that hops around with small tails and long ears. - * - * This contains the code for both your standard rabbit as well as the subtypes commonly found during Easter. - * - */ -/mob/living/simple_animal/rabbit - name = "\improper rabbit" - desc = "The hippiest hop around." - gender = PLURAL - mob_biotypes = MOB_ORGANIC|MOB_BEAST - health = 15 - maxHealth = 15 - icon = 'icons/mob/simple/rabbit.dmi' - icon_state = "rabbit_white" - icon_living = "rabbit_white" - icon_dead = "rabbit_white_dead" - speak_emote = list("sniffles","twitches") - emote_hear = list("hops.") - emote_see = list("hops around","bounces up and down") - butcher_results = list(/obj/item/food/meat/slab = 1) - can_be_held = TRUE - density = FALSE - speak_chance = 2 - turns_per_move = 3 - response_help_continuous = "pets" - response_help_simple = "pet" - response_disarm_continuous = "gently pushes aside" - response_disarm_simple = "gently push aside" - response_harm_continuous = "kicks" - response_harm_simple = "kick" - attack_verb_continuous = "kicks" - attack_verb_simple = "kick" - pass_flags = PASSTABLE | PASSMOB - mob_size = MOB_SIZE_SMALL - gold_core_spawnable = FRIENDLY_SPAWN - //passed to animal_varity as the prefix icon. - var/icon_prefix = "rabbit" - -/mob/living/simple_animal/rabbit/Initialize(mapload) - . = ..() - AddElement(/datum/element/pet_bonus, "hops around happily!") - AddElement(/datum/element/animal_variety, icon_prefix, pick("brown","black","white"), TRUE) - -/mob/living/simple_animal/rabbit/easter - icon_state = "e_rabbit_white" - icon_living = "e_rabbit_white" - icon_dead = "e_rabbit_white_dead" - icon_prefix = "e_rabbit" - speak = list( - "Hop into Easter!", - "Come get your eggs!", - "Prizes for everyone!", - ) - icon_prefix = "e_rabbit" - ///passed to the egg_layer component as how many eggs it starts out as able to lay. - var/initial_egg_amount = 10 - ///passed to the egg_layer component as how many eggs it's allowed to hold at most. - var/max_eggs_held = 8 - -/mob/living/simple_animal/rabbit/easter/space - icon_state = "s_rabbit_white" - icon_living = "s_rabbit_white" - icon_dead = "s_rabbit_white_dead" - icon_prefix = "s_rabbit" - atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) - minbodytemp = 0 - maxbodytemp = 1500 - unsuitable_atmos_damage = 0 - -/mob/living/simple_animal/rabbit/easter/Initialize(mapload) - . = ..() - //passed to the egg_layer component as how many eggs it gets when it eats something. - var/eggs_added_from_eating = rand(1, 4) - var/list/feed_messages = list("[p_they()] nibbles happily.", "[p_they()] noms happily.") - AddElement(/datum/element/animal_variety, icon_prefix, pick("brown","black","white"), TRUE) - AddComponent(/datum/component/egg_layer,\ - /obj/item/surprise_egg,\ - list(/obj/item/food/grown/carrot),\ - feed_messages,\ - list("hides an egg.","scampers around suspiciously.","begins making a huge racket.","begins shuffling."),\ - initial_egg_amount,\ - eggs_added_from_eating,\ - max_eggs_held,\ - ) diff --git a/code/modules/unit_tests/simple_animal_freeze.dm b/code/modules/unit_tests/simple_animal_freeze.dm index 24f9d2f3b7f..ed64c3b1672 100644 --- a/code/modules/unit_tests/simple_animal_freeze.dm +++ b/code/modules/unit_tests/simple_animal_freeze.dm @@ -379,9 +379,6 @@ /mob/living/simple_animal/pet/penguin/baby, /mob/living/simple_animal/pet/penguin/emperor, /mob/living/simple_animal/pet/penguin/emperor/shamebrero, - /mob/living/simple_animal/rabbit, - /mob/living/simple_animal/rabbit/easter, - /mob/living/simple_animal/rabbit/easter/space, /mob/living/simple_animal/revenant, /mob/living/simple_animal/robot_customer, /mob/living/simple_animal/shade, @@ -507,7 +504,6 @@ /mob/living/simple_animal/pet/dog/markus, /mob/living/simple_animal/pet/gondola/funky, /mob/living/simple_animal/pet/poppy, - /mob/living/simple_animal/rabbit/daisy, // DO NOT ADD NEW ENTRIES TO THIS LIST // READ THE COMMENT ABOVE diff --git a/icons/mob/simple/rabbit.dmi b/icons/mob/simple/rabbit.dmi index bc9652bbb01..b6fa545871d 100644 Binary files a/icons/mob/simple/rabbit.dmi and b/icons/mob/simple/rabbit.dmi differ diff --git a/modular_skyrat/modules/mapping/voidraptor/code/mob.dm b/modular_skyrat/modules/mapping/voidraptor/code/mob.dm index c75e27cef4d..b6e19c200bd 100644 --- a/modular_skyrat/modules/mapping/voidraptor/code/mob.dm +++ b/modular_skyrat/modules/mapping/voidraptor/code/mob.dm @@ -76,7 +76,7 @@ real_name = "Walter" desc = "It's Walter, he bites criminals just as well as he bites toddlers." -/mob/living/simple_animal/rabbit/daisy +/mob/living/basic/rabbit/daisy name = "Daisy" real_name = "Daisy" desc = "The Curator's pet bnuuy." diff --git a/tgstation.dme b/tgstation.dme index 9b31be5f9b9..1b098e9a2b5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3603,6 +3603,7 @@ #include "code\modules\mob\living\basic\basic_defense.dm" #include "code\modules\mob\living\basic\health_adjustment.dm" #include "code\modules\mob\living\basic\farm_animals\pig.dm" +#include "code\modules\mob\living\basic\farm_animals\rabbit.dm" #include "code\modules\mob\living\basic\farm_animals\sheep.dm" #include "code\modules\mob\living\basic\farm_animals\cow\_cow.dm" #include "code\modules\mob\living\basic\farm_animals\cow\cow_ai.dm" @@ -3793,7 +3794,6 @@ #include "code\modules\mob\living\simple_animal\friendly\lizard.dm" #include "code\modules\mob\living\simple_animal\friendly\penguin.dm" #include "code\modules\mob\living\simple_animal\friendly\pet.dm" -#include "code\modules\mob\living\simple_animal\friendly\rabbit.dm" #include "code\modules\mob\living\simple_animal\friendly\robot_customer.dm" #include "code\modules\mob\living\simple_animal\friendly\sloth.dm" #include "code\modules\mob\living\simple_animal\friendly\snake.dm" diff --git a/tools/UpdatePaths/Scripts/71205_simple_rabbit_to_basic.txt b/tools/UpdatePaths/Scripts/71205_simple_rabbit_to_basic.txt new file mode 100644 index 00000000000..81ae7fc8f36 --- /dev/null +++ b/tools/UpdatePaths/Scripts/71205_simple_rabbit_to_basic.txt @@ -0,0 +1,3 @@ +# transforms simple rabbit animals to the new basic animal subtype + +/mob/living/simple_animal/rabbit/@SUBTYPES : /mob/living/basic/rabbit/@SUBTYPES{@OLD}