mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-18 03:21:13 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user