From be8f5a39fd347bdf9185baddebb788fc129ad084 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 25 May 2023 23:15:06 +0100 Subject: [PATCH] [MIRROR] Turns Cat Butcher/Surgeon/Whatever into a Basic Mob [MDB IGNORE] (#21415) * Turns Cat Butcher/Surgeon/Whatever into a Basic Mob (#75599) ## About The Pull Request On the tin, I keep trying to tackle the larger basic mob projects but burn out, so just enjoy these small ones to just keep that list looking lighter and less insurmountable. No big complex AI either, it choppa the tail off. That's all you really need to be honest. ## Why It's Good For The Game The cat surgeon will be just that slightly smarter. I suppose they're still a doctor, just simply infatuated with the thought of cat tails... ![image](https://github.com/tgstation/tgstation/assets/34697715/a1b4d7f6-f591-4412-91e4-6d6c8f320deb) noooooo my tail!!! ## Changelog :cl: code: Cat Surgeons are a bit more smarter about attacking threats to the world around them on their endless pursuit for those felinid tails. /:cl: --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com> * Turns Cat Butcher/Surgeon/Whatever into a Basic Mob --------- Co-authored-by: san7890 Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com> --- .../SpaceRuins/mrow_thats_right.dmm | 2 +- .../living/basic/space_fauna/cat_surgeon.dm | 78 +++++++++++++++++++ .../simple_animal/hostile/cat_butcher.dm | 47 ----------- .../unit_tests/simple_animal_freeze.dm | 1 - tgstation.dme | 2 +- .../75599_simple_to_basic_cat_surgeon.txt | 1 + 6 files changed, 81 insertions(+), 50 deletions(-) create mode 100644 code/modules/mob/living/basic/space_fauna/cat_surgeon.dm delete mode 100644 code/modules/mob/living/simple_animal/hostile/cat_butcher.dm create mode 100644 tools/UpdatePaths/Scripts/75599_simple_to_basic_cat_surgeon.txt diff --git a/_maps/RandomRuins/SpaceRuins/mrow_thats_right.dmm b/_maps/RandomRuins/SpaceRuins/mrow_thats_right.dmm index 37dcd97bb41..e1f35d27fd2 100644 --- a/_maps/RandomRuins/SpaceRuins/mrow_thats_right.dmm +++ b/_maps/RandomRuins/SpaceRuins/mrow_thats_right.dmm @@ -410,7 +410,7 @@ /turf/open/floor/iron, /area/ruin/space/has_grav/powered/cat_man) "bs" = ( -/mob/living/simple_animal/hostile/cat_butcherer, +/mob/living/basic/cat_butcherer, /turf/open/floor/iron/white/side{ dir = 4 }, diff --git a/code/modules/mob/living/basic/space_fauna/cat_surgeon.dm b/code/modules/mob/living/basic/space_fauna/cat_surgeon.dm new file mode 100644 index 00000000000..ba5a627d62c --- /dev/null +++ b/code/modules/mob/living/basic/space_fauna/cat_surgeon.dm @@ -0,0 +1,78 @@ +/** + * ## Cat Surgeon + * + * A mean motherfucker who wants to steal them cat tails... be warned should you see it, as it doesn't really speak much either. + */ + +/mob/living/basic/cat_butcherer + name = "Cat Surgeon" + desc = "A man with the quest of chasing endless feline tail." + icon = 'icons/mob/simple/simple_human.dmi' + icon_state = "cat_butcher" + icon_living = "cat_butcher" + icon_dead = "syndicate_dead" + icon_gib = "syndicate_gib" + speed = 0.8 + maxHealth = 100 + health = 100 + melee_damage_lower = 15 + melee_damage_upper = 15 + attack_verb_continuous = "slashes at" + attack_verb_simple = "slash at" + attack_sound = 'sound/weapons/circsawhit.ogg' + combat_mode = TRUE + mob_biotypes = MOB_ORGANIC|MOB_HUMANOID + sentience_type = SENTIENCE_HUMANOID + habitable_atmos = list("min_oxy" = 5, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) + unsuitable_atmos_damage = 7.5 + faction = list(FACTION_HOSTILE) + status_flags = CANPUSH + basic_mob_flags = DEL_ON_DEATH + + ai_controller = /datum/ai_controller/basic_controller/cat_butcherer + + /// The stuff we drop on death. + var/static/list/drop_on_death = list( + /obj/effect/mob_spawn/corpse/human/cat_butcher, + /obj/item/circular_saw, + ) + +/mob/living/basic/cat_butcherer/Initialize(mapload) + . = ..() + apply_dynamic_human_appearance(src, mob_spawn_path = /obj/effect/mob_spawn/corpse/human/cat_butcher, l_hand = /obj/item/circular_saw, bloody_slots = ITEM_SLOT_GLOVES|ITEM_SLOT_OCLOTHING) + AddElement(/datum/element/death_drops, drop_on_death) + RegisterSignal(src, COMSIG_HOSTILE_POST_ATTACKINGTARGET, PROC_REF(after_attack)) + +/mob/living/basic/cat_butcherer/proc/after_attack(mob/living/basic/attacker, atom/target) + SIGNAL_HANDLER + + if(!iscarbon(target) || !prob(35)) + return + + var/mob/living/carbon/human/attacked = target + var/obj/item/organ/external/tail/cat/tail = attacked.get_organ_by_type(/obj/item/organ/external/tail/cat) + if(QDELETED(tail)) + return + + visible_message( + span_warning("[src] severs [attacked]'s tail off in one swift swipe!"), + span_warning("You sever [attacked]'s tail off."), + ) + tail.Remove(attacked) + tail.forceMove(drop_location()) + tail.color = attacked.hair_color + +/datum/ai_controller/basic_controller/cat_butcherer + blackboard = list( + BB_TARGETTING_DATUM = new /datum/targetting_datum/basic, + ) + + ai_movement = /datum/ai_movement/basic_avoidance + idle_behavior = /datum/idle_behavior/idle_random_walk + + planning_subtrees = list( + /datum/ai_planning_subtree/target_retaliate, + /datum/ai_planning_subtree/simple_find_target, + /datum/ai_planning_subtree/attack_obstacle_in_path, + /datum/ai_planning_subtree/basic_melee_attack_subtree, + ) diff --git a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm deleted file mode 100644 index e5fcc922d9a..00000000000 --- a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm +++ /dev/null @@ -1,47 +0,0 @@ -/mob/living/simple_animal/hostile/cat_butcherer - name = "Cat Surgeon" - desc = "A man with the quest of chasing endless feline tail." - icon = 'icons/mob/simple/simple_human.dmi' - icon_state = "cat_butcher" - icon_living = "cat_butcher" - icon_dead = "syndicate_dead" - icon_gib = "syndicate_gib" - speak_chance = 0 - turns_per_move = 5 - speed = 0 - stat_attack = HARD_CRIT - robust_searching = 1 - maxHealth = 100 - health = 100 - harm_intent_damage = 5 - melee_damage_lower = 15 - melee_damage_upper = 15 - attack_verb_continuous = "slashes at" - attack_verb_simple = "slash at" - attack_sound = 'sound/weapons/circsawhit.ogg' - combat_mode = TRUE - mob_biotypes = MOB_ORGANIC|MOB_HUMANOID - sentience_type = SENTIENCE_HUMANOID - loot = list(/obj/effect/mob_spawn/corpse/human/cat_butcher, /obj/item/circular_saw) - atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) - unsuitable_atmos_damage = 7.5 - faction = list(FACTION_HOSTILE) - check_friendly_fire = 1 - status_flags = CANPUSH - del_on_death = TRUE - -/mob/living/simple_animal/hostile/cat_butcherer/Initialize(mapload) - . = ..() - apply_dynamic_human_appearance(src, mob_spawn_path = /obj/effect/mob_spawn/corpse/human/cat_butcher, l_hand = /obj/item/circular_saw, bloody_slots = ITEM_SLOT_GLOVES|ITEM_SLOT_OCLOTHING) - -/mob/living/simple_animal/hostile/cat_butcherer/AttackingTarget() - . = ..() - if(. && prob(35) && iscarbon(target)) - var/mob/living/carbon/human/L = target - var/obj/item/organ/external/tail/cat/tail = L.get_organ_by_type(/obj/item/organ/external/tail/cat) - if(!QDELETED(tail)) - visible_message(span_notice("[src] severs [L]'s tail in one swift swipe!"), span_notice("You sever [L]'s tail in one swift swipe.")) - tail.Remove(L) - var/obj/item/organ/external/tail/cat/dropped_tail = new(target.drop_location()) - dropped_tail.color = L.hair_color - return 1 diff --git a/code/modules/unit_tests/simple_animal_freeze.dm b/code/modules/unit_tests/simple_animal_freeze.dm index da24f035e4b..7d7df334e43 100644 --- a/code/modules/unit_tests/simple_animal_freeze.dm +++ b/code/modules/unit_tests/simple_animal_freeze.dm @@ -124,7 +124,6 @@ /mob/living/simple_animal/hostile/boss, /mob/living/simple_animal/hostile/boss/paper_wizard, /mob/living/simple_animal/hostile/boss/paper_wizard/copy, - /mob/living/simple_animal/hostile/cat_butcherer, /mob/living/simple_animal/hostile/construct, /mob/living/simple_animal/hostile/construct/artificer, /mob/living/simple_animal/hostile/construct/artificer/angelic, diff --git a/tgstation.dme b/tgstation.dme index c6b892e4177..c1b8b593067 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4028,6 +4028,7 @@ #include "code\modules\mob\living\basic\pets\dog.dm" #include "code\modules\mob\living\basic\pets\pet.dm" #include "code\modules\mob\living\basic\ruin_defender\stickman.dm" +#include "code\modules\mob\living\basic\space_fauna\cat_surgeon.dm" #include "code\modules\mob\living\basic\space_fauna\faithless.dm" #include "code\modules\mob\living\basic\space_fauna\garden_gnome.dm" #include "code\modules\mob\living\basic\space_fauna\ghost.dm" @@ -4273,7 +4274,6 @@ #include "code\modules\mob\living\simple_animal\hostile\blob.dm" #include "code\modules\mob\living\simple_animal\hostile\blobbernaut.dm" #include "code\modules\mob\living\simple_animal\hostile\blobspore.dm" -#include "code\modules\mob\living\simple_animal\hostile\cat_butcher.dm" #include "code\modules\mob\living\simple_animal\hostile\dark_wizard.dm" #include "code\modules\mob\living\simple_animal\hostile\eyeballs.dm" #include "code\modules\mob\living\simple_animal\hostile\headcrab.dm" diff --git a/tools/UpdatePaths/Scripts/75599_simple_to_basic_cat_surgeon.txt b/tools/UpdatePaths/Scripts/75599_simple_to_basic_cat_surgeon.txt new file mode 100644 index 00000000000..8bd8aceeebe --- /dev/null +++ b/tools/UpdatePaths/Scripts/75599_simple_to_basic_cat_surgeon.txt @@ -0,0 +1 @@ +/mob/living/simple_animal/hostile/cat_butcherer : /mob/living/basic/cat_butcherer{@OLD}