Ports over configuration controller (#16484)

* Ports over configuration controller

* Fixes

* Manual path fix

* patch (#16490)

* patch

* .

* SQL Fix

* Post-rebase fix

* Added missing examples

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2024-10-22 19:26:44 +02:00
committed by GitHub
co-authored by Kashargul
parent 25d323e8a8
commit 242fa3a66b
242 changed files with 3275 additions and 1257 deletions
@@ -290,7 +290,7 @@
if(confirm != "Yes")
return
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1)
to_chat(src, span_danger("You have used the antagHUD and cannot respawn or use communicators!"))
return
+4 -4
View File
@@ -295,10 +295,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))
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)
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)
@@ -431,7 +431,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
var/adjust_health = barely_in_crit - H.health //need to increase health by this much
H.adjustOxyLoss(-adjust_health)
@@ -516,7 +516,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 = 300 `Life()` ticks. // Original math was VERY off. Life() tick occurs every ~2 seconds, not every 2 world.time ticks.
var/brain_damage_timer = ((config.defib_timer MINUTES) / 20) - ((config.defib_braindamage_timer MINUTES) / 20)
var/brain_damage_timer = ((CONFIG_GET(number/defib_timer) MINUTES) / 20) - ((CONFIG_GET(number/defib_braindamage_timer) MINUTES) / 20)
if(brain.defib_timer > brain_damage_timer)
return // They got revived before brain damage got a chance to set in.