mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +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:
co-authored by
Matt Atlas
SleepyGemmy
parent
1d2871729f
commit
d5931c5ffe
@@ -3,6 +3,8 @@
|
||||
/obj/item/modular_computer
|
||||
name = "Modular Computer"
|
||||
desc = DESC_PARENT
|
||||
maxhealth = OBJECT_HEALTH_MEDIUM
|
||||
should_use_health = TRUE
|
||||
|
||||
var/lexical_name = "computer"
|
||||
/// Whether the computer is turned on.
|
||||
@@ -94,13 +96,8 @@
|
||||
var/power_has_failed = FALSE
|
||||
var/is_holographic = FALSE
|
||||
|
||||
/// Damage of the chassis. If the chassis takes too much damage it will break apart.
|
||||
/// Current damage level
|
||||
var/damage = 0
|
||||
/// Damage level at which the computer ceases to operate
|
||||
var/broken_damage = 50
|
||||
/// Damage level at which the computer breaks apart.
|
||||
var/max_damage = 100
|
||||
|
||||
/// Important hardware (must be installed for computer to work)
|
||||
/// CPU. Without it the computer won't run. Better CPUs can run more programs at once.
|
||||
|
||||
Reference in New Issue
Block a user