Skip to content

Commit

Permalink
Перестройка сигналов, сокрытие нейроузла, ремонт сьезжающего оверлея …
Browse files Browse the repository at this point in the history
…одежды
  • Loading branch information
msw7007 committed Jan 24, 2025
1 parent c0a7146 commit 1f83b6e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/dcs/mob_signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
//sent from living mobs when they are ahealed
#define COMSIG_LIVING_AHEAL "living_aheal"
//sent from base of /datum/surgery_step/set_bone/end_step: ()
#define COMSIG_SURGERY_GET_CARAPACE "surgery_get_carapace"
#define CARAPACE_SHELL_NOT_BROKEN (1<<0)
#define COMSIG_SHELL_GET_CARAPACE "surgery_get_carapace"
#define CARAPACE_SHELL_BROKEN (1<<0)
//sent from mobs when they exit their body as a ghost
#define COMSIG_LIVING_GHOSTIZED "ghostized"
//sent from mobs when they re-enter their body as a ghost
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,12 @@ SLIME SCANNER
if(H.radiation > RAD_MOB_SAFE)
msgs += "<span class='danger'>Subject is irradiated.</span>"

//SS220 ADDITION START - SERPENTIDS
if(SEND_SIGNAL(H, COMSIG_SHELL_GET_CARAPACE) & CARAPACE_SHELL_BROKEN)
msgs += "<span class='danger'>Subject's carapace integrity is compromised.</span>"
//SS220 ADDITION END - SERPENTIDS


to_chat(user, chat_box_healthscan(msgs.Join("<br>")))

/obj/item/healthanalyzer/attackby__legacy__attackchain(obj/item/I, mob/user, params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,26 @@
shift_call(parent)

/datum/component/mob_overlay_shift/RegisterWithParent()
RegisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_MOB_ON_EQUIP, COMSIG_MOB_ON_CLICK, COMSIG_CHANGELING_FINISHED_TRANSFORM), PROC_REF(shift_call))
RegisterSignal(parent, list(COMSIG_COMPONENT_CLEAN_ACT, COMSIG_MOB_ON_EQUIP, COMSIG_MOB_ON_CLICK, COMSIG_CHANGELING_FINISHED_TRANSFORM), PROC_REF(shift_call))
RegisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE), PROC_REF(update_dir))
RegisterSignal(parent, list(COMSIG_MOB_GET_OVERLAY_SHIFTS_LIST), PROC_REF(get_list))

/datum/component/mob_overlay_shift/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_MOB_ON_EQUIP, COMSIG_MOB_ON_CLICK, COMSIG_MOB_GET_OVERLAY_SHIFTS_LIST, COMSIG_CHANGELING_FINISHED_TRANSFORM))

/datum/component/mob_overlay_shift/proc/update_dir(mob/living/carbon/human/mob, olddir, newdir)
SIGNAL_HANDLER
if(newdir)
dir = newdir
update_apperance(mob)

/datum/component/mob_overlay_shift/proc/shift_call(mob/living/carbon/human/mob)
SIGNAL_HANDLER
if(mob.dir)
dir = mob.dir
update_apperance(mob)

/datum/component/mob_overlay_shift/proc/update_apperance(mob/living/carbon/human/mob)
var/list/body_parts = list(MOB_OVERLAY_SHIFT_HAND, MOB_OVERLAY_SHIFT_BELT, MOB_OVERLAY_SHIFT_BACK, MOB_OVERLAY_SHIFT_HEAD)
var/position
switch(dir)
Expand Down
5 changes: 3 additions & 2 deletions modular_ss220/species/_components/carapace/carapace.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@
var/obj/item/organ/external/affected = target.get_organ(user.zone_selected)
if((affected?.encased == CARAPACE_ENCASE_WORD) && (affected.status & ORGAN_BROKEN))
affected.mend_fracture()
if(SEND_SIGNAL(target, COMSIG_SURGERY_GET_CARAPACE) & CARAPACE_SHELL_NOT_BROKEN)
ADD_TRAIT(target, TRAIT_PIERCEIMMUNE, "carapace_state")
if(isserpentid(target))
if(!(SEND_SIGNAL(target, COMSIG_SHELL_GET_CARAPACE) & CARAPACE_SHELL_BROKEN))
ADD_TRAIT(target, TRAIT_PIERCEIMMUNE, "carapace_state")
SEND_SIGNAL(affected, COMSIG_LIMB_SHELL_OPERATION, FALSE)
. = .. ()

Expand Down
6 changes: 3 additions & 3 deletions modular_ss220/species/_components/carapace/carapace_shell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
RegisterSignal(H, COMSIG_SURGERY_REPAIR, PROC_REF(surgery_carapace_shell_repair))
RegisterSignal(H, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(update_attacked_time))
RegisterSignal(H, COMSIG_LIVING_AHEAL, PROC_REF(clear_state))
RegisterSignal(H, COMSIG_SURGERY_GET_CARAPACE, PROC_REF(is_armor_piercied))
RegisterSignal(H, COMSIG_SHELL_GET_CARAPACE, PROC_REF(is_armor_piercied))

/datum/component/carapace_shell/UnregisterFromParent()
UnregisterSignal(H, COMSIG_LIVING_LIFE)
UnregisterSignal(H, COMSIG_SURGERY_STOP)
UnregisterSignal(H, COMSIG_SURGERY_REPAIR)
UnregisterSignal(H, COMSIG_MOB_APPLY_DAMAGE)
UnregisterSignal(H, COMSIG_LIVING_AHEAL)
UnregisterSignal(H, COMSIG_SURGERY_GET_CARAPACE)
UnregisterSignal(H, COMSIG_SHELL_GET_CARAPACE)

/datum/component/carapace_shell/proc/is_armor_piercied()
SIGNAL_HANDLER
return broken_stage < 1 ? CARAPACE_SHELL_NOT_BROKEN : FALSE
return broken_stage > 0 ? CARAPACE_SHELL_BROKEN : FALSE

/datum/component/carapace_shell/proc/stage_1_break()
H.dna.species.brute_mod = CARAPACE_SHELL_BROKEN_BRUTE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
emp_proof = TRUE
var/first_recollor = TRUE
destroy_on_removal = TRUE
stealth_level = 5

/obj/item/organ/internal/cyberimp/chest/serpentid_blades/Initialize(mapload)
. = ..()
Expand Down

0 comments on commit 1f83b6e

Please sign in to comment.