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

[TM] Softcrit Re-Return #1433

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions modular_ss220/crit_rework/code/crit_rework_component.dm
AyIong marked this conversation as resolved.
Show resolved Hide resolved
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,7 +19,6 @@
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)

Expand All @@ -29,13 +27,12 @@
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
Loading