diff --git a/modular_skyrat/master_files/icons/mob/inhands/pets_held_lh.dmi b/modular_skyrat/master_files/icons/mob/inhands/pets_held_lh.dmi new file mode 100644 index 00000000000..a144c1439dd Binary files /dev/null and b/modular_skyrat/master_files/icons/mob/inhands/pets_held_lh.dmi differ diff --git a/modular_skyrat/master_files/icons/mob/inhands/pets_held_rh.dmi b/modular_skyrat/master_files/icons/mob/inhands/pets_held_rh.dmi new file mode 100644 index 00000000000..1686efd5abd Binary files /dev/null and b/modular_skyrat/master_files/icons/mob/inhands/pets_held_rh.dmi differ diff --git a/modular_skyrat/master_files/icons/mob/newmobs.dmi b/modular_skyrat/master_files/icons/mob/newmobs.dmi index d8004195616..0adcb392ec8 100644 Binary files a/modular_skyrat/master_files/icons/mob/newmobs.dmi and b/modular_skyrat/master_files/icons/mob/newmobs.dmi differ diff --git a/modular_skyrat/modules/basic_mobs/code/chinchilla.dm b/modular_skyrat/modules/basic_mobs/code/chinchilla.dm new file mode 100644 index 00000000000..c52fd3cb1dd --- /dev/null +++ b/modular_skyrat/modules/basic_mobs/code/chinchilla.dm @@ -0,0 +1,105 @@ +/mob/living/basic/pet/chinchilla + name = "chinchilla" + desc = "They're like a mouse, but Australian." + + icon = 'modular_skyrat/master_files/icons/mob/newmobs.dmi' + held_lh = 'modular_skyrat/master_files/icons/mob/inhands/pets_held_lh.dmi' + held_rh = 'modular_skyrat/master_files/icons/mob/inhands/pets_held_rh.dmi' + icon_state = "chinchilla_white" + icon_living = "chinchilla_white" + icon_dead = "chinchilla_white_dead" + + maxHealth = 10 + health = 10 + mob_size = MOB_SIZE_TINY + + speed = 1.25 //speedy little fuckers + see_in_dark = 6 + + butcher_results = list(/obj/item/food/meat/slab = 1) + + response_help_continuous = "pets" + response_help_simple = "pet" + response_disarm_continuous = "gently pushes aside" + response_disarm_simple = "gently push aside" + response_harm_continuous = "kick" + response_harm_simple = "kicks" + + gold_core_spawnable = FRIENDLY_SPAWN + + can_be_held = TRUE + held_w_class = WEIGHT_CLASS_TINY + held_state = "chinchilla_white" + + ///In the case 'melee_damage_upper' is somehow raised above 0 + attack_verb_continuous = "bites" + attack_verb_simple = "bite" + attack_sound = 'sound/weapons/bite.ogg' + attack_vis_effect = ATTACK_EFFECT_BITE + + ai_controller = /datum/ai_controller/basic_controller/chinchilla + + /// The color (i.e. "black" or "white") of this chinchilla, to determine the `icon_state`s to use for + /// this specific instance. `null` by default, which makes it pick a valid value at random in + /// Initialize()`. + var/body_color + +/mob/living/basic/pet/chinchilla/Initialize(mapload) + . = ..() + AddElement(/datum/element/pet_bonus, "squeaks happily!") + + if(isnull(body_color)) + body_color = pick("black", "white") + + held_state = "chinchilla_[body_color]" // not handled by variety element + AddElement(/datum/element/animal_variety, "chinchilla", body_color, FALSE) + +//ai behavior + +/datum/ai_controller/basic_controller/chinchilla + blackboard = list( + BB_CURRENT_HUNTING_TARGET = null, // dust to take dust baths + ) + + ai_traits = STOP_MOVING_WHEN_PULLED + ai_movement = /datum/ai_movement/basic_avoidance + idle_behavior = /datum/idle_behavior/idle_random_walk + planning_subtrees = list( + // chinchillas will try to look for dust to roll around in + /datum/ai_planning_subtree/find_and_hunt_target/look_for_dust, + // randomly squeak and shit + /datum/ai_planning_subtree/random_speech/chinchilla, + ) + +/datum/ai_planning_subtree/find_and_hunt_target/look_for_dust + hunting_behavior = /datum/ai_behavior/hunt_target/dust_roll + hunt_targets = list(/obj/effect/decal/cleanable/ash, /obj/effect/decal/cleanable/food/flour) + hunt_range = 0 //need to be on top of anything dusty + hunt_chance = 50 + +/datum/ai_behavior/hunt_target/dust_roll + hunt_cooldown = 20 SECONDS + +/datum/ai_behavior/hunt_target/dust_roll/target_caught(mob/living/basic/pet/hunter, obj/effect/decal/cleanable/dust) + hunter.visible_message(span_notice("[hunter] starts taking a dust bath in [dust].")) + hunter.spin(10, 1) + qdel(dust) + +/datum/ai_planning_subtree/random_speech/chinchilla + speech_chance = 5 + emote_hear = list( + "squeaks.", + "chirps.", + ) + emote_see = list( + "sniffs around.", + "jumps around.", + ) + +//subtypes + +/mob/living/basic/pet/chinchilla/white + body_color = "white" + +/mob/living/basic/pet/chinchilla/black + body_color = "black" diff --git a/modular_skyrat/modules/cargo/code/packs.dm b/modular_skyrat/modules/cargo/code/packs.dm index ebed146c6e6..416342cea9c 100644 --- a/modular_skyrat/modules/cargo/code/packs.dm +++ b/modular_skyrat/modules/cargo/code/packs.dm @@ -28,6 +28,20 @@ for(var/i in 1 to 5) new /mob/living/basic/mouse(.) +/datum/supply_pack/critter/chinchilla + name = "Chinchilla Crate" + desc = "Contains four chinchillas. Dust not included." + cost = CARGO_CRATE_VALUE * 7 + contains = list( + /mob/living/basic/pet/chinchilla, + ) + crate_name = "chinchilla crate" + +/datum/supply_pack/critter/chinchilla/generate() + . = ..() + for(var/i in 1 to 3) + new /mob/living/basic/pet/chinchilla(.) + /* * MEDICAL */ diff --git a/tgstation.dme b/tgstation.dme index 8d2e987c979..426b919674b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5602,6 +5602,7 @@ #include "modular_skyrat\modules\barricades\code\barricade.dm" #include "modular_skyrat\modules\barsigns\code\barsigns.dm" #include "modular_skyrat\modules\basic_mobs\code\bananaspider.dm" +#include "modular_skyrat\modules\basic_mobs\code\chinchilla.dm" #include "modular_skyrat\modules\basic_mobs\code\kiwi.dm" #include "modular_skyrat\modules\better_vox\code\vox_bodycolor.dm" #include "modular_skyrat\modules\better_vox\code\vox_bodyparts.dm"