mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Configuration Controller (#7857)
This commit is contained in:
@@ -290,7 +290,7 @@
|
||||
if(confirm == "No")
|
||||
return
|
||||
|
||||
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
|
||||
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1) // CHOMPEdit
|
||||
to_chat(src, "<span class='danger'>You have used the antagHUD and cannot respawn or use communicators!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -297,10 +297,10 @@
|
||||
H.updatehealth()
|
||||
|
||||
if(H.isSynthetic())
|
||||
if(H.health + H.getOxyLoss() + H.getToxLoss() <= config.health_threshold_dead)
|
||||
if(H.health + H.getOxyLoss() + H.getToxLoss() <= CONFIG_GET(number/health_threshold_dead)) // CHOMPEdit
|
||||
return "buzzes, \"Resuscitation failed - Severe damage detected. Begin manual repair before further attempts futile.\""
|
||||
|
||||
else if(H.health + H.getOxyLoss() <= config.health_threshold_dead || (HUSK in H.mutations) || !H.can_defib)
|
||||
else if(H.health + H.getOxyLoss() <= CONFIG_GET(number/health_threshold_dead) || (HUSK in H.mutations) || !H.can_defib) // CHOMPEdit
|
||||
return "buzzes, \"Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.\""
|
||||
|
||||
var/bad_vital_organ = check_vital_organs(H)
|
||||
@@ -433,7 +433,7 @@
|
||||
H.apply_damage(burn_damage_amt, BURN, BP_TORSO)
|
||||
|
||||
//set oxyloss so that the patient is just barely in crit, if possible
|
||||
var/barely_in_crit = config.health_threshold_crit - 1
|
||||
var/barely_in_crit = CONFIG_GET(number/health_threshold_crit) - 1 // CHOMPEdit
|
||||
var/adjust_health = barely_in_crit - H.health //need to increase health by this much
|
||||
H.adjustOxyLoss(-adjust_health)
|
||||
|
||||
@@ -519,7 +519,7 @@
|
||||
|
||||
// If the brain'd `defib_timer` var gets below this number, brain damage will happen at a linear rate.
|
||||
// This is measures in `Life()` ticks. E.g. 10 minute defib timer = 6000 world.time units = 3000 `Life()` ticks.
|
||||
var/brain_damage_timer = ((config.defib_timer MINUTES) / 2) - ((config.defib_braindamage_timer MINUTES) / 2)
|
||||
var/brain_damage_timer = ((CONFIG_GET(number/defib_timer) MINUTES) / 2) - ((CONFIG_GET(number/defib_braindamage_timer) MINUTES) / 2) // CHOMPEdit
|
||||
|
||||
if(brain.defib_timer > brain_damage_timer)
|
||||
return // They got revived before brain damage got a chance to set in.
|
||||
|
||||
Reference in New Issue
Block a user