mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user