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
@@ -36,6 +36,8 @@
var/framestackamount = 2
var/deconstruction_ready = TRUE
var/flipped = FALSE
/// The minimum level of environment_smash required for simple animals to be able to one-shot this.
var/minimum_env_smash = ENVIRONMENT_SMASH_WALLS
/obj/structure/table/Initialize(mapload)
. = ..()
@@ -237,6 +239,12 @@
else
return ..()
/obj/structure/table/attack_animal(mob/living/simple_animal/M)
. = ..()
if(M.environment_smash >= minimum_env_smash)
deconstruct(FALSE)
M.visible_message("<span class='danger'>[M] smashes [src]!</span>", "<span class='notice'>You smash [src].</span>")
/obj/structure/table/shove_impact(mob/living/target, mob/living/attacker)
if(locate(/obj/structure/table) in get_turf(target))
return FALSE
@@ -410,6 +418,7 @@
max_integrity = 70
resistance_flags = ACID_PROOF
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 80, ACID = 100)
minimum_env_smash = ENVIRONMENT_SMASH_STRUCTURES
var/list/debris = list()
var/shardtype = /obj/item/shard
@@ -502,6 +511,7 @@
buildstack = /obj/item/stack/sheet/plasmaglass
max_integrity = 140
shardtype = /obj/item/shard/plasma
minimum_env_smash = ENVIRONMENT_SMASH_RWALLS
/obj/structure/table/glass/reinforced
name = "reinforced glass table"
@@ -515,6 +525,7 @@
deconstruction_ready = FALSE
armor = list(MELEE = 10, BULLET = 30, LASER = 30, ENERGY = 100, BOMB = 20, RAD = 0, FIRE = 80, ACID = 70)
smoothing_groups = list(SMOOTH_GROUP_REINFORCED_TABLES)
minimum_env_smash = ENVIRONMENT_SMASH_RWALLS
canSmoothWith = list(SMOOTH_GROUP_REINFORCED_TABLES)
/obj/structure/table/glass/reinforced/deconstruction_hints(mob/user) //look, it was either copy paste these 4 procs, or copy paste all of the glass stuff