diff --git a/modular_ss220/species/_components/organs/heart_defib_chemical.dm b/modular_ss220/species/_components/organs/heart_defib_chemical.dm deleted file mode 100644 index adf1737b9ed1..000000000000 --- a/modular_ss220/species/_components/organs/heart_defib_chemical.dm +++ /dev/null @@ -1,43 +0,0 @@ -/* -=== Компонент запуска сердца === -Отслеживает смерть носителя, и в случае чего - запускает сердце с неким шансом -*/ -#define AUTO_DEFIBRILATION_THRESHOLD 100 -/datum/component/defib_heart_chemical - var/chemical_id = "" - var/obj/item/organ/internal/organ - -/datum/component/defib_heart_chemical/Initialize(income_chemical_id = "") - chemical_id = income_chemical_id - organ = parent - START_PROCESSING(SSdcs, src) - -/datum/component/defib_heart_chemical/Destroy(force, silent) - STOP_PROCESSING(SSdcs, src) - . = ..() - -/datum/component/defib_heart_chemical/process() - var/mob/living/carbon/human/owner = organ.owner - if(!owner) - var/obj/item/organ/internal/limb = parent - owner = limb.owner - if(!owner) - qdel(src) - if(owner?.get_chemical_value(chemical_id) < 0 || owner.stat != DEAD || owner.get_damage_amount() > AUTO_DEFIBRILATION_THRESHOLD) - return - var/defib_chance = owner?.get_chemical_value(chemical_id) - var/datum/reagent/chem = owner?.get_chemical_path(chemical_id) - if(chem) - chem.holder.remove_reagent(chemical_id, owner?.get_chemical_value(chemical_id)) - if(prob(defib_chance)) - owner.setOxyLoss(0) - owner.set_heartattack(FALSE) - owner.update_revive() - owner.KnockOut() - owner.Paralyse(10 SECONDS) - owner.emote("gasp") - SEND_SIGNAL(owner, COMSIG_LIVING_MINOR_SHOCK, 100) - owner.med_hud_set_health() - owner.med_hud_set_status() - add_attack_logs(owner, owner, "Revived by heart") - SSblackbox.record_feedback("tally", "players_revived", 1, "self_revived") diff --git a/modular_ss220/species/_components/organs/heart_defib_hunger.dm b/modular_ss220/species/_components/organs/heart_defib_hunger.dm index a2715eb100b5..9bdd6d805ef9 100644 --- a/modular_ss220/species/_components/organs/heart_defib_hunger.dm +++ b/modular_ss220/species/_components/organs/heart_defib_hunger.dm @@ -2,6 +2,8 @@ === Компонент запуска сердца === Отслеживает смерть носителя, и в случае чего - запускает сердце с неким шансом */ +#define AUTO_DEFIBRILATION_THRESHOLD 100 + /datum/component/defib_heart_hunger var/obj/item/organ/internal/organ @@ -36,3 +38,5 @@ owner.med_hud_set_status() add_attack_logs(owner, owner, "Revived by heart") SSblackbox.record_feedback("tally", "players_revived", 1, "self_revived") + +#undef AUTO_DEFIBRILATION_THRESHOLD diff --git a/modular_ss220/species/_components/organs/organ_chemistry.dm b/modular_ss220/species/_components/organs/organ_chemistry.dm deleted file mode 100644 index 8d9d4813342d..000000000000 --- a/modular_ss220/species/_components/organs/organ_chemistry.dm +++ /dev/null @@ -1,42 +0,0 @@ -/* -Компонент на органы для работы с запасами химикатов -*/ - -/datum/component/chemistry_organ - var/obj/item/organ/internal/organ - var/chemical_id = "" - var/consuption_count = 0 - -/datum/component/chemistry_organ/Initialize(reagent_id) - organ = parent - chemical_id = reagent_id - -/datum/component/chemistry_organ/RegisterWithParent() - RegisterSignal(parent, COMSIG_ORGAN_ON_LIFE, PROC_REF(chems_process)) - RegisterSignal(parent, COMSIG_ORGAN_CHANGE_CHEM_CONSUPTION, PROC_REF(chems_change_consuption)) - -/datum/component/chemistry_organ/UnregisterFromParent() - UnregisterSignal(parent, COMSIG_ORGAN_ON_LIFE) - UnregisterSignal(parent, COMSIG_ORGAN_CHANGE_CHEM_CONSUPTION) - -/datum/component/chemistry_organ/proc/chems_process(holder) - SIGNAL_HANDLER - if(isnull(organ.owner)) - return TRUE - var/chemical_volume = organ.owner?.get_chemical_value(chemical_id) - var/datum/reagent/chemical = organ.owner?.get_chemical_path(chemical_id) - if(chemical_volume < consuption_count || chemical_volume == 0) - //Если количества недостаточно - выключить режим - organ.switch_mode(force_off = TRUE) - else - if(!isnull(chemical) && consuption_count > 0) - chemical.holder.remove_reagent(chemical_id, consuption_count) - -/datum/component/chemistry_organ/proc/chems_change_consuption(holder, new_consuption_count) - SIGNAL_HANDLER - consuption_count = new_consuption_count - -//Переписываемый прок, который вызывается когда заканчивается запас химического препарата -/obj/item/organ/internal/proc/switch_mode(force_off = FALSE) - return - diff --git a/modular_ss220/species/_species.dme b/modular_ss220/species/_species.dme index 14c775fd7cda..dbbcc072bf28 100644 --- a/modular_ss220/species/_species.dme +++ b/modular_ss220/species/_species.dme @@ -14,10 +14,8 @@ #include "_components/carrying/grab_and_drag_on_mob_mobs.dm" #include "_components/carrying/grab_and_drag_on_mob_crates.dm" #include "_components/organs/organ_decay.dm" -//#include "_components/organs/organ_chemistry.dm" #include "_components/organs/organ_hunger.dm" #include "_components/organs/organ_toxins.dm" -#include "_components/organs/heart_defib_chemical.dm" #include "_components/organs/heart_defib_hunger.dm" #include "_components/organs/organ_actions_component.dm" #include "_components/implants/paired_implants.dm" diff --git a/modular_ss220/species/serpentids/code/organs/internal/implants/serpentid_mantis_chest.dm b/modular_ss220/species/serpentids/code/organs/internal/implants/serpentid_mantis_chest.dm index fac9fcc368bf..d8a7af0933d2 100644 --- a/modular_ss220/species/serpentids/code/organs/internal/implants/serpentid_mantis_chest.dm +++ b/modular_ss220/species/serpentids/code/organs/internal/implants/serpentid_mantis_chest.dm @@ -15,6 +15,7 @@ var/mutable_appearance/new_overlay var/overlay_color var/blades_active = FALSE + var/activation_in_progress = FALSE unremovable = TRUE emp_proof = TRUE @@ -37,18 +38,19 @@ return our_MA /obj/item/organ/internal/cyberimp/chest/serpentid_blades/ui_action_click() + if(activation_in_progress) + return if(crit_fail || (!holder_l && !length(contents))) to_chat(owner, "The implant doesn't respond. It seems to be broken...") return var/extended = holder_l && !(holder_l in src) - var/activation_in_progress = FALSE if(extended) if(!activation_in_progress) activation_in_progress = TRUE Retract() - else if(do_after(owner, 20*(owner.dna.species.action_mult), FALSE, owner)) - if(!activation_in_progress) - activation_in_progress = TRUE + else if(!activation_in_progress) + activation_in_progress = TRUE + if(do_after(owner, 20*(owner.dna.species.action_mult), FALSE, owner)) holder_l = null Extend() activation_in_progress = FALSE