Files
Aurora.3/code/game/objects/structures/gore/wall.dm
T
d5931c5ffe 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>
2026-04-16 23:22:08 +00:00

40 lines
1.2 KiB
Plaintext

/obj/structure/gore/floor
name = "flesh floor"
desc = "Looks like the floor was covered by some fleshlike growth."
icon_state = "flesh_floor"
maxhealth = OBJECT_HEALTH_LOW
/obj/structure/gore/wall
name = "flesh wall"
desc = "Chunks of flesh sculpted to form an impassable wall."
icon_state = "flesh_wall"
opacity = TRUE
maxhealth = OBJECT_HEALTH_HIGH
/obj/structure/gore/wall/membrane
name = "flesh membrane"
desc = "Skin and muscle stretched just thin enough to let light pass through."
icon_state = "flesh_membrane"
opacity = FALSE
maxhealth = 120
/obj/structure/gore/wall/Initialize()
. = ..()
var/turf/T = get_turf(src)
T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
/obj/structure/gore/wall/Destroy()
var/turf/T = get_turf(src)
T.thermal_conductivity = initial(T.thermal_conductivity)
return ..()
/obj/structure/gore/resin/attack_hand(var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(src, FIST_ATTACK_ANIMATION)
if((user.mutations & HULK))
visible_message(SPAN_DANGER("\The [user] destroys \the [src]!"))
add_damage(maxhealth)
else
visible_message(SPAN_DANGER("\The [user] claws at \the [src]!"))
add_damage(rand(5, 10))