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 6052a1d7aa2..fa6f10f3905 100644 --- a/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm +++ b/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm @@ -158,6 +158,15 @@ emote_hear = list("snorts.") emote_see = list("sniffs around.") +/datum/ai_planning_subtree/random_speech/pony + speech_chance = 3 + emote_hear = list("whinnies!") + emote_see = list("horses around.") + +/datum/ai_planning_subtree/random_speech/pony/tamed + speech_chance = 3 + emote_see = list("snorts.") + /datum/ai_planning_subtree/random_speech/killer_tomato speech_chance = 3 speak = list("gnashes.", "growls lowly.", "snarls.") diff --git a/code/datums/components/riding/riding_mob.dm b/code/datums/components/riding/riding_mob.dm index 4ce7bcb3bef..c6e73d3bc0f 100644 --- a/code/datums/components/riding/riding_mob.dm +++ b/code/datums/components/riding/riding_mob.dm @@ -330,6 +330,31 @@ set_vehicle_dir_layer(EAST, OBJ_LAYER) set_vehicle_dir_layer(WEST, OBJ_LAYER) +/datum/component/riding/creature/pony/handle_specials() + . = ..() + vehicle_move_delay = 1.5 + set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 9), TEXT_SOUTH = list(0, 9), TEXT_EAST = list(-2, 9), TEXT_WEST = list(2, 9))) + set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER) + set_vehicle_dir_layer(NORTH, OBJ_LAYER) + set_vehicle_dir_layer(EAST, OBJ_LAYER) + set_vehicle_dir_layer(WEST, OBJ_LAYER) + +/datum/component/riding/creature/pony + COOLDOWN_DECLARE(pony_trot_cooldown) + +/datum/component/riding/creature/pony/driver_move(atom/movable/movable_parent, mob/living/user, direction) + . = ..() + + if (. == COMPONENT_DRIVER_BLOCK_MOVE || !COOLDOWN_FINISHED(src, pony_trot_cooldown)) + return + + var/mob/living/carbon/human/human_user = user + + if(human_user && is_clown_job(human_user.mind?.assigned_role)) + // there's a new sheriff in town + playsound(movable_parent, 'sound/creatures/pony/clown_gallup.ogg', 50) + COOLDOWN_START(src, pony_trot_cooldown, 500 MILLISECONDS) + /datum/component/riding/creature/bear/handle_specials() . = ..() set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(1, 8), TEXT_SOUTH = list(1, 8), TEXT_EAST = list(-3, 6), TEXT_WEST = list(3, 6))) diff --git a/code/modules/cargo/packs/livestock.dm b/code/modules/cargo/packs/livestock.dm index c624f05df61..bf7ca95e216 100644 --- a/code/modules/cargo/packs/livestock.dm +++ b/code/modules/cargo/packs/livestock.dm @@ -98,6 +98,14 @@ contains = list(/mob/living/basic/pig) crate_name = "pig crate" +/datum/supply_pack/critter/pony + name = "Pony Crate" + desc = "Ponies, yay! (Just the one.)" + cost = CARGO_CRATE_VALUE * 6 + access_view = ACCESS_SERVICE + contains = list(/mob/living/basic/pony) + crate_name = "pony crate" + /datum/supply_pack/critter/crab name = "Crab Rocket" desc = "CRAAAAAAB ROCKET. CRAB ROCKET. CRAB ROCKET. CRAB CRAB CRAB CRAB CRAB CRAB CRAB \ diff --git a/code/modules/mob/living/basic/farm_animals/pony.dm b/code/modules/mob/living/basic/farm_animals/pony.dm new file mode 100644 index 00000000000..434caa5ef51 --- /dev/null +++ b/code/modules/mob/living/basic/farm_animals/pony.dm @@ -0,0 +1,88 @@ +/mob/living/basic/pony + name = "pony" + desc = "Look at my horse, my horse is amazing!" + icon_state = "pony" + icon_living = "pony" + icon_dead = "pony_dead" + gender = MALE + mob_biotypes = MOB_ORGANIC | MOB_BEAST + speak_emote = list("neighs", "winnies") + 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" + attack_sound = 'sound/weapons/punch1.ogg' + attack_vis_effect = ATTACK_EFFECT_KICK + melee_damage_lower = 5 + melee_damage_upper = 10 + health = 50 + maxHealth = 50 + gold_core_spawnable = FRIENDLY_SPAWN + blood_volume = BLOOD_VOLUME_NORMAL + ai_controller = /datum/ai_controller/basic_controller/pony + +/mob/living/basic/pony/Initialize(mapload) + . = ..() + + AddElement(/datum/element/pet_bonus, "whickers.") + AddElement(/datum/element/ai_retaliate) + AddElement(/datum/element/ai_flee_while_injured) + AddElement(/datum/element/waddling) + AddComponent(/datum/component/tameable, food_types = list(/obj/item/food/grown/apple), tame_chance = 25, bonus_tame_chance = 15, after_tame = CALLBACK(src, PROC_REF(tamed))) + +/mob/living/basic/pony/proc/tamed(mob/living/tamer) + can_buckle = TRUE + buckle_lying = 0 + playsound(src, 'sound/creatures/pony/snort.ogg', 50) + AddElement(/datum/element/ridable, /datum/component/riding/creature/pony) + visible_message(span_notice("[src] snorts happily.")) + + ai_controller.replace_planning_subtrees(list( + /datum/ai_planning_subtree/find_nearest_thing_which_attacked_me_to_flee, + /datum/ai_planning_subtree/flee_target, + /datum/ai_planning_subtree/random_speech/pony/tamed + )) + +/mob/living/basic/pony/proc/whinny_angrily() + manual_emote("whinnies ANGRILY!") + + playsound(src, pick(list( + 'sound/creatures/pony/whinny01.ogg', + 'sound/creatures/pony/whinny02.ogg', + 'sound/creatures/pony/whinny03.ogg' + )), 50) + +/mob/living/basic/pony/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration) + . = ..() + + if (prob(33)) + whinny_angrily() + +/mob/living/basic/pony/melee_attack(atom/target, list/modifiers) + . = ..() + + if (!.) + return + + whinny_angrily() + +/datum/ai_controller/basic_controller/pony + blackboard = list( + BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/ignore_faction, + ) + + 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/find_nearest_thing_which_attacked_me_to_flee, + /datum/ai_planning_subtree/flee_target, + /datum/ai_planning_subtree/target_retaliate, + /datum/ai_planning_subtree/basic_melee_attack_subtree, + /datum/ai_planning_subtree/random_speech/pony + ) diff --git a/icons/mob/simple/animal.dmi b/icons/mob/simple/animal.dmi index 4cce5c460dc..8e3affff4a9 100644 Binary files a/icons/mob/simple/animal.dmi and b/icons/mob/simple/animal.dmi differ diff --git a/sound/creatures/pony/clown_gallup.ogg b/sound/creatures/pony/clown_gallup.ogg new file mode 100644 index 00000000000..61f7eaf5162 Binary files /dev/null and b/sound/creatures/pony/clown_gallup.ogg differ diff --git a/sound/creatures/pony/snort.ogg b/sound/creatures/pony/snort.ogg new file mode 100644 index 00000000000..b023ddcf47c Binary files /dev/null and b/sound/creatures/pony/snort.ogg differ diff --git a/sound/creatures/pony/whinny01.ogg b/sound/creatures/pony/whinny01.ogg new file mode 100644 index 00000000000..485ca3a5297 Binary files /dev/null and b/sound/creatures/pony/whinny01.ogg differ diff --git a/sound/creatures/pony/whinny02.ogg b/sound/creatures/pony/whinny02.ogg new file mode 100644 index 00000000000..2d48a0cacda Binary files /dev/null and b/sound/creatures/pony/whinny02.ogg differ diff --git a/sound/creatures/pony/whinny03.ogg b/sound/creatures/pony/whinny03.ogg new file mode 100644 index 00000000000..7a288d70aa7 Binary files /dev/null and b/sound/creatures/pony/whinny03.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 46fe8b0a221..530c14992ea 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4035,6 +4035,7 @@ #include "code\modules\mob\living\basic\tree.dm" #include "code\modules\mob\living\basic\farm_animals\deer.dm" #include "code\modules\mob\living\basic\farm_animals\pig.dm" +#include "code\modules\mob\living\basic\farm_animals\pony.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\chicken\chick.dm"