mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
add pony (#76955)
This commit is contained in:
@@ -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.")
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 202 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user