Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Softcrit re-return #1480

Closed
wants to merge 15 commits into from
5 changes: 4 additions & 1 deletion code/modules/reagents/chemistry/reagents/medicine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -904,10 +904,13 @@
M.AdjustLoseBreath(-2 SECONDS, bound_lower = 6 SECONDS)
if(M.getOxyLoss() > 35)
update_flags |= M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER, FALSE)
if(M.health < -10 && M.health > -65)
// SS220 EDIT START - Softcrit
if(M.health <= HEALTH_THRESHOLD_CRIT)
update_flags |= M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
update_flags |= M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
update_flags |= M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
update_flags |= M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
// SS220 EDIT END
return ..() | update_flags

/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M, severity)
Expand Down
10 changes: 3 additions & 7 deletions modular_ss220/crit_rework/code/crit_rework_component.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#define OLD_CRIT_TRAIT "old-crit"
#define OLD_CRIT_TRAIT "softcrit"

/datum/component/softcrit
dupe_mode = COMPONENT_DUPE_UNIQUE

/datum/component/softcrit/Initialize(...)
. = ..()
if(!ishuman(parent))
return COMPONENT_INCOMPATIBLE
softcrit_entered()
Expand All @@ -20,22 +19,19 @@
UnregisterSignal(parent, COMSIG_LIVING_HANDLE_MESSAGE_MODE)

/datum/component/softcrit/proc/softcrit_entered()
SIGNAL_HANDLER
ADD_TRAIT(parent, TRAIT_FLOORED, OLD_CRIT_TRAIT)
ADD_TRAIT(parent, TRAIT_HANDS_BLOCKED, OLD_CRIT_TRAIT)

/datum/component/softcrit/proc/softcrit_removed()
SIGNAL_HANDLER
REMOVE_TRAIT(parent, TRAIT_FLOORED, OLD_CRIT_TRAIT)
REMOVE_TRAIT(parent, TRAIT_HANDS_BLOCKED, OLD_CRIT_TRAIT)
qdel(src)
return

/datum/component/softcrit/proc/on_examine(atom/A, mob/user, list/examine_list)
SIGNAL_HANDLER
var/mob/living/carbon/human/owner = parent
if(owner.stat == CONSCIOUS)
examine_list += span_warning("<B>[owner] с трудом держится в сознании.\n</B>")
if(owner.stat != DEAD)
examine_list += span_warning("<B>[owner] на грани потери сознания!\n</B>")

/datum/component/softcrit/proc/check_health()
SIGNAL_HANDLER
Expand Down
21 changes: 12 additions & 9 deletions modular_ss220/modular_ss220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,22 @@
#include "redis220/_redis220.dme"
#include "robolimbs/_robolimbs.dme"

// --- PRIME --- //
// #define MODPACK_MAIN_ONLY
// Чтобы отключить модпаки прайма, нужно добавиту строку выше в code/__DEFINES/_ss220.dm.
// Изначально они включены. Сделано так, по двум причинам.
// 1. Добавить новый дефайн на мейне на хосте куда проще, чем на прайме.
// 2. Так модпаки прайма будут включены в тестах и линтере.
#ifndef MODPACK_MAIN_ONLY
// --- PRIME ONLY --- //
// #define MODPACK_EXCLUDE_PRIME_ONLY
// Чтобы отключить модпаки прайма, нужно добавить строку выше в code/__DEFINES/_ss220.dm.
// Изначально они включены для тестов и линтера.
#ifndef MODPACK_EXCLUDE_PRIME_ONLY
#include "security_redalert_accesses/_security_redalert_accesses.dme"
#include "prime_only/_prime.dme"
#endif

// --- MAIN ONLY --- //
// #define MODPACK_EXCLUDE_MAIN_ONLY
// Аналогично с блоком выше.
#ifndef MODPACK_EXCLUDE_MAIN_ONLY
#include "crit_rework/_crit_rework.dme"
#endif

// --- UNUSED MODS --- //

/*------------------------------------------------------------------
Expand All @@ -110,8 +115,6 @@
если так вообще можно выразиться.
---------------------------------------------------------------------*/

// #include "crit_rework/_crit_rework.dme"

// --- TESTING --- //
#ifdef UNIT_TESTS
#include "unit_tests/_unit_tests.dme"
Expand Down
Loading