mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user