From e1cf251e4838158fe013e500bcb516c82e20e30c Mon Sep 17 00:00:00 2001 From: foxep <165693904+foxep@users.noreply.github.com> Date: Tue, 2 Apr 2024 03:15:18 +0800 Subject: [PATCH] Add files via upload --- GainStation13/code/mobs/slucat.dm | 104 ++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 GainStation13/code/mobs/slucat.dm diff --git a/GainStation13/code/mobs/slucat.dm b/GainStation13/code/mobs/slucat.dm new file mode 100644 index 00000000..66a3f0f3 --- /dev/null +++ b/GainStation13/code/mobs/slucat.dm @@ -0,0 +1,104 @@ +/mob/living/simple_animal/pet/slugcat + name = "slugcat" + desc = "It's a cat . . . Thing from another planet, maybe from another world. You think it's not dangerous, but you can't be sure. " + icon = 'GainStation13/icons/mobs/pets.dmi' + icon_state = "slugcat" + icon_living = "slugcat" + icon_dead = "slugcat_dead" + emote_see = list("stares at the ceiling.", "shivers.") + speak_chance = 1 + turns_per_move = 20 + can_be_held = TRUE + see_in_dark = 6 + ventcrawler = VENTCRAWLER_ALWAYS + pass_flags = PASSTABLE + mob_size = MOB_SIZE_SMALL + mob_biotypes = MOB_ORGANIC|MOB_BEAST + minbodytemp = 200 + maxbodytemp = 400 + butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 2) + unsuitable_atmos_damage = 0.1 + animal_species = /mob/living/simple_animal/pet/slugcat + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "kicks" + gold_core_spawnable = FRIENDLY_SPAWN + attack_sound = 'sound/effects/attackblob.ogg' + do_footstep = TRUE + gold_core_spawnable = FRIENDLY_SPAWN + size_multiplier = 0.5 + obj_damage = 0 + melee_damage_lower = 0 + melee_damage_upper = 0 + var/held_icon = "slugcat" + do_footstep = TRUE + //lizard food + devourable = 1 + digestable = 1 + feeding = 1 + var/obj/item/twohanded/spear/weapon + +/mob/living/simple_animal/pet/slugcat/Initialize() + . = ..() + add_verb(src, /mob/living/proc/lay_down) + +/mob/living/simple_animal/pet/slugcat/ComponentInitialize() + . = ..() + AddElement(/datum/element/wuv, "purrs!", EMOTE_AUDIBLE, /datum/mood_event/pet_animal, "hisses!", EMOTE_AUDIBLE) + AddElement(/datum/element/mob_holder, held_icon) + +/mob/living/simple_animal/pet/slugcat/update_canmove() + ..() + if(client && stat != DEAD) + if (resting) + icon_state = "[icon_living]_rest" + else + icon_state = "[icon_living]" + regenerate_icons() + +/mob/living/simple_animal/pet/slugcat/UnarmedAttack(atom/A) + . = ..() + if(!isitem(A)) + return + + if(!weapon && istype(A, /obj/item/twohanded/spear)) + visible_message("[src] pick up the [A].", "You pick up the [A].") + weapon = A + weapon.forceMove(src) + melee_damage_lower = weapon.force + weapon.force_wielded + melee_damage_upper = weapon.force + weapon.force_wielded + armour_penetration = weapon.armour_penetration + melee_damage_type = weapon.damtype + attack_sound = weapon.hitsound + update_icons() + else if(!weapon && !istype(A, /obj/item/twohanded/spear ||)) + to_chat(src, "You do not know how to wield the [A]!") + +/mob/living/simple_animal/pet/slugcat/RangedAttack(atom/A, params) + . = ..() + if(!weapon) + return + visible_message("[src] throws the [weapon] at [A]!","You throw the [weapon] at [A]!") + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) + armour_penetration = initial(armour_penetration) + melee_damage_type = initial(melee_damage_type) + attack_sound = initial(attack_sound) + weapon.forceMove(get_turf(src)) + weapon.throw_at(A, weapon.throw_range, weapon.throw_speed, src) + weapon = null + update_icons() + +/mob/living/simple_animal/pet/slugcat/update_icons() + . = ..() + if(stat == DEAD || resting) + return + icon_state = weapon ? initial(icon_state) + "_spear" : initial(icon_state) + +/mob/living/simple_animal/pet/slugcat/death(gibbed) + if(weapon) + weapon.forceMove(get_turf(src)) + weapon = null + update_icons() + . = ..() +