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
+2 -1
View File
@@ -111,12 +111,13 @@
var/play_soundeffect = 1
if(M.environment_smash)
play_soundeffect = 0
var/obj_turf = get_turf(src) // play from the turf in case the object gets deleted mid attack
if(M.obj_damage)
. = attack_generic(M, M.obj_damage, M.melee_damage_type, MELEE, play_soundeffect, M.armour_penetration_flat, M.armour_penetration_percentage)
else
. = attack_generic(M, rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, MELEE, play_soundeffect, M.armour_penetration_flat, M.armour_penetration_percentage)
if(. && !play_soundeffect)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
playsound(QDELETED(src) ? obj_turf : src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
/obj/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
return TRUE