Adds an universal object health system. (#21266)

https://www.youtube.com/watch?v=ZpUYjpKg9KY

As per title. The goal is to add health to most objects in the game and
thus allow them to be dynamically destructible, while also avoiding
shitcode like each structure having its own snowflake health update
proc.

---------

Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it>
Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
Matt Atlas
2026-04-17 01:22:08 +02:00
committed by GitHub
parent 1d2871729f
commit d5931c5ffe
213 changed files with 1448 additions and 1424 deletions
+1 -6
View File
@@ -13,14 +13,9 @@
density = TRUE
opacity = FALSE
layer = ABOVE_TILE_LAYER
var/max_health = 50
var/health
maxhealth = OBJECT_HEALTH_VERY_LOW
var/destroy_spawntype = /mob/living/carbon/alien/diona
/obj/structure/diona/Initialize(mapload)
. = ..()
health = max_health
/obj/structure/diona/attackby(obj/item/attacking_item, mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(attacking_item.tool_behaviour == TOOL_WELDER)