Lets mobs who can smash walls also smash some other relatively fragile structures (#21209)

* Makes grilles and windows easier to smash

* Some cleanups, windoors too

* Adds tables, also holy shit these things are robust

* Update code/game/objects/structures/window.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Make some reinforced windows stronger, too

* Sean review, addresses a bug I noticed

* Hanging return

* re-adds take_damage

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Luc
2023-06-26 22:40:26 -05:00
committed by GitHub
co-authored by Contrabang
parent e8a6932067
commit 09aec4da53
6 changed files with 54 additions and 5 deletions
+10 -4
View File
@@ -78,10 +78,16 @@
shock(user, 70)
shockcooldown = world.time + my_shockcooldown
/obj/structure/grille/attack_animal(mob/user)
. = ..()
if(. && !QDELETED(src) && !shock(user, 70))
take_damage(rand(5,10), BRUTE, MELEE, 1)
/obj/structure/grille/attack_animal(mob/living/simple_animal/user)
if(QDELETED(src) || shock(user, 70))
return
if(user.environment_smash >= ENVIRONMENT_SMASH_STRUCTURES)
playsound(src, 'sound/effects/grillehit.ogg', 80, TRUE)
obj_break()
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>", "<span class='notice'>You smash through [src].</span>")
else
take_damage(rand(5, 10), BRUTE, MELEE, 1)
return ..()
/obj/structure/grille/hulk_damage()
return 60