From d8809e3cbaa44ea456498b5d86fc657603d55e95 Mon Sep 17 00:00:00 2001 From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com> Date: Thu, 13 Jul 2023 00:23:32 -0400 Subject: [PATCH] Simple mobs no longer one-shot structures (#16709) --- code/game/objects/structures/crates_lockers/closets.dm | 9 ++++----- code/modules/mob/living/simple_animal/hostile/alien.dm | 5 ++++- code/modules/mob/living/simple_animal/hostile/bat.dm | 1 + .../mob/living/simple_animal/hostile/retaliate/cavern.dm | 4 ++-- .../mob/living/simple_animal/hostile/space_fauna.dm | 1 + .../modules/mob/living/simple_animal/hostile/toy/mech.dm | 1 + code/modules/tables/tables.dm | 7 +++++++ html/changelogs/doxxmedearly-mob_breaking_fixes.yml | 6 ++++++ 8 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 html/changelogs/doxxmedearly-mob_breaking_fixes.yml diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index cf13c2b4559..73b64b1c76f 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -653,14 +653,13 @@ var/obj/O = A O.hear_talk(M, text, verb, speaking) -/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker) +/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "attacks", var/wallbreaker) if(!damage || !wallbreaker) return user.do_attack_animation(src) - visible_message(SPAN_DANGER("[user] [attack_message] the [src]!")) - dump_contents() - QDEL_IN(src, 1) - return 1 + visible_message(SPAN_DANGER("[user] [attack_message] \the [src]!")) + damage(damage) + return TRUE /obj/structure/closet/proc/req_breakout() if(!opened) //Door's open... wait, why are you in it's contents then? diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index b7a5aacaf37..7d0ef52ad09 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -44,6 +44,8 @@ pass_flags = PASSTABLE density = 0 mob_size = 3 + destroy_surroundings = FALSE + /mob/living/simple_animal/hostile/retaliate/shantak name = "shantak" @@ -65,6 +67,7 @@ speak = list("Shuhn","Shrunnph?","Shunpf") emote_see = list("scratches the ground","shakes out it's mane","tinkles gently") mob_size = 5 + break_stuff_probability = 1 /mob/living/simple_animal/yithian name = "yithian" @@ -90,4 +93,4 @@ density = 0 mob_size = 1.5 canbrush = TRUE - brush = /obj/item/reagent_containers/glass/rag \ No newline at end of file + brush = /obj/item/reagent_containers/glass/rag diff --git a/code/modules/mob/living/simple_animal/hostile/bat.dm b/code/modules/mob/living/simple_animal/hostile/bat.dm index d5e4399abd5..37a5657e059 100644 --- a/code/modules/mob/living/simple_animal/hostile/bat.dm +++ b/code/modules/mob/living/simple_animal/hostile/bat.dm @@ -38,6 +38,7 @@ minbodytemp = 0 environment_smash = 1 + destroy_surroundings = FALSE faction = "scarybat" flying = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm index 2fa3d211a8f..766efda93cf 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/cavern.dm @@ -28,7 +28,7 @@ speed = 4 projectiletype = /obj/item/projectile/beam/cavern projectilesound = 'sound/magic/lightningbolt.ogg' - destroy_surroundings = 1 + break_stuff_probability = 2 emote_see = list("stares","hovers ominously","blinks") @@ -98,7 +98,7 @@ emote_hear = list("chirps cheerfully","buzzes","whirrs","hums placidly","chirps","hums") projectiletype = /obj/item/projectile/beam/plasmacutter projectilesound = 'sound/weapons/plasma_cutter.ogg' - destroy_surroundings = 1 + destroy_surroundings = FALSE min_oxy = 0 max_oxy = 0 min_tox = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm index c0765b057aa..4eb9e70332a 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm @@ -255,6 +255,7 @@ health = 5 mob_size = 2 density = FALSE + destroy_surroundings = FALSE blood_overlay_icon = 'icons/mob/npc/blood_overlay_carp.dmi' harm_intent_damage = 5 diff --git a/code/modules/mob/living/simple_animal/hostile/toy/mech.dm b/code/modules/mob/living/simple_animal/hostile/toy/mech.dm index 910939adbfa..f9c98cd53f0 100644 --- a/code/modules/mob/living/simple_animal/hostile/toy/mech.dm +++ b/code/modules/mob/living/simple_animal/hostile/toy/mech.dm @@ -19,6 +19,7 @@ speed = 2 mob_size = MOB_MINISCULE tameable = FALSE + destroy_surroundings = FALSE blood_overlay_icon = null diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index b7ea5590b86..277dad737f0 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -52,6 +52,13 @@ visible_message(SPAN_WARNING("\The [src] breaks down!"), intent_message = THUNK_SOUND) return break_to_parts() // if we break and form shards, return them to the caller to do !FUN! things with +/obj/structure/table/attack_generic(var/mob/user, var/damage, var/attack_message = "attacks", var/wallbreaker) + if(!damage || !wallbreaker) + return + user.do_attack_animation(src) + visible_message(SPAN_DANGER("[user] [attack_message] \the [src]!")) + take_damage(damage) + return TRUE /obj/structure/table/ex_act(severity) switch(severity) diff --git a/html/changelogs/doxxmedearly-mob_breaking_fixes.yml b/html/changelogs/doxxmedearly-mob_breaking_fixes.yml new file mode 100644 index 00000000000..2ff468d66d9 --- /dev/null +++ b/html/changelogs/doxxmedearly-mob_breaking_fixes.yml @@ -0,0 +1,6 @@ +author: Doxxmedearly +delete-after: True +changes: + - bugfix: "Simple mobs should no longer destroy closets and tables in one hit. They'll damage them as usual." + - tweak: "Some animals, like diyaabs and toy mechs, no longer randomly destroy their surroundings." + - tweak: "Some animals, like cavern dwellers and shantaks, are less likely to randomly damage their surroundings."