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] GAS fixes #1757

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
413c33e
Фиксы ГБС + Ребаланс
msw7007 Jan 20, 2025
870917f
Ненмого лекарств от бойни
msw7007 Jan 21, 2025
5e35a44
Перевод ключа языка
msw7007 Jan 21, 2025
24057f2
Органы и операции
msw7007 Jan 21, 2025
3fa9d93
Фиксы логики и внутрянки
msw7007 Jan 22, 2025
00de668
Фикс бага невидимости при взаимодейстии
msw7007 Jan 22, 2025
cd4f859
Merge branch 'master' into gbs_fixes_1
msw7007 Jan 22, 2025
5803127
Фиксы операции
msw7007 Jan 22, 2025
a620c8b
Merge branch 'gbs_fixes_1' of https://github.com/msw7007/Paradise-SS2…
msw7007 Jan 22, 2025
b4745bb
Фикс отображения на карте и консолях
msw7007 Jan 22, 2025
c46e477
Чистка
msw7007 Jan 23, 2025
6a46969
Легкий баланс клинка зависти
msw7007 Jan 23, 2025
6708a73
Линтер
msw7007 Jan 23, 2025
ddd2280
Культ и рантайм
msw7007 Jan 23, 2025
04c965c
Фикс Фикса
msw7007 Jan 23, 2025
51777c9
Новая логика обработки спрайтов
msw7007 Jan 23, 2025
0503edf
Легкий ребаланс брони, изменение названий операций, возможность восст…
msw7007 Jan 23, 2025
b2bcb19
Merge branch 'master' into gbs_fixes_1
msw7007 Jan 23, 2025
876bf87
Правки БИ
msw7007 Jan 23, 2025
b1fdb25
Фикс поведений глаз
msw7007 Jan 23, 2025
685d597
Merge branch 'master' into gbs_fixes_1
msw7007 Jan 23, 2025
4617e80
Опять меняем ключ языка
msw7007 Jan 24, 2025
572dc77
Merge branch 'gbs_fixes_1' of https://github.com/msw7007/Paradise-SS2…
msw7007 Jan 24, 2025
c0a7146
Небольшое усиление ПНВ ГБС
msw7007 Jan 24, 2025
1f83b6e
Перестройка сигналов, сокрытие нейроузла, ремонт сьезжающего оверлея …
msw7007 Jan 24, 2025
2d08735
Реадаптация движения, восстановление компонента пилы на конечности
msw7007 Jan 24, 2025
79f9b76
Восстановление клинкам возможности открывать двери
msw7007 Jan 24, 2025
1f8f8d0
Дополнение вскрытия
msw7007 Jan 24, 2025
194238f
Правки ошибок и легкий ребаланс
msw7007 Jan 25, 2025
033ea5e
Линтер и ошибки
msw7007 Jan 25, 2025
4155496
Правка кода для блокировки братьев
msw7007 Jan 25, 2025
e64d7e7
Фикс ошибок связанных с имплантом клинков
msw7007 Jan 25, 2025
637e5d2
Изменение логики поведения клинков ГБС, исправление рантайма
msw7007 Jan 25, 2025
928c8ce
Более наглядное отображение повреждений панциря
msw7007 Jan 26, 2025
dd834bf
Merge branch 'master' into gbs_fixes_1
msw7007 Jan 27, 2025
529108c
Нерф взаимодействий общих (без поднятых клинков) взаимодействий
msw7007 Jan 27, 2025
dc6a0df
Линтер
msw7007 Jan 27, 2025
ef1c437
Щит линга
msw7007 Jan 27, 2025
dd4221c
Небольшая перестройка кода
msw7007 Jan 27, 2025
e17c5df
Более наглядное меню способностей ГБС
msw7007 Jan 27, 2025
62895fc
Блокировка Пиксель шифта при переноске вещей или сотрудников станции,…
msw7007 Jan 27, 2025
83fcc52
Разгрузка ГБС в случае смены форма генокрада
msw7007 Jan 27, 2025
c582ffc
Упс
msw7007 Jan 27, 2025
6cbc1a9
Изменение логики работы мешка
msw7007 Jan 28, 2025
644ff88
Merge branch 'master' into gbs_fixes_1
msw7007 Jan 29, 2025
82d2cfd
Новые эмоуты, легкое обновление клинков (звуковое), бафф зрения, фикс…
msw7007 Jan 29, 2025
a829cad
Улетели лишние эмоуты
msw7007 Jan 29, 2025
595c86b
Блокировка возможности забираться на ГБС, добавление сброса с тела те…
msw7007 Jan 29, 2025
4b9a4a2
Корректировка звуков, эмоутов
msw7007 Jan 29, 2025
512c193
Фикс проблемы крови, изменение описания компонента двойной атаки
msw7007 Jan 29, 2025
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
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/mob_signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@
#define COMSIG_LIVING_FIRE_TICK "living_fire_tick"
//sent from living mobs when they are ahealed
#define COMSIG_LIVING_AHEAL "living_aheal"
//sent from base of /obj/item/healthanalyzer/get_carapace_damage_level: ()
#define COMSIG_SHELL_GET_CARAPACE_LEVEL "surgery_get_carapace_level"
//sent from base of /datum/surgery_step/set_bone/end_step: ()
#define COMSIG_SHELL_GET_CARAPACE_STATE "surgery_get_carapace_state"
#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
10 changes: 10 additions & 0 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
temp = new /icon(icobase, "[head]_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)

// SS220 EDIT START - SERPENTIDS
if(is_species(H, /datum/species/serpentid))
temp = new/icon("icon" = 'modular_ss220/species/serpentids/icons/mob/r_serpentid.dmi', "icon_state" = "preview")
preview_icon.Blend(temp, ICON_OVERLAY)
// SS220 EDIT END - SERPENTIDS

//Tail
if(H.body_accessory && (istype(H.body_accessory, /datum/body_accessory/tail) || istype(H.body_accessory, /datum/body_accessory/wing)))
temp = new/icon("icon" = H.body_accessory.icon, "icon_state" = H.body_accessory.icon_state)
Expand Down Expand Up @@ -395,6 +401,10 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
job_clothes = custom_job
else if(H.mind)
job_clothes = H.mind.assigned_role
//SS220 EDIT START - SERPENTIDS
if(is_species(H, /datum/species/serpentid))
job_clothes = "Naked"
//SS220 EDIT END - SERPENTIDS
switch(job_clothes)
if("Head of Personnel")
clothes_s = new /icon('icons/mob/clothing/under/civilian.dmi', "hop_s")
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/cult_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
restricted_jobs += protected_jobs

var/list/cultists_possible = get_players_for_role(ROLE_CULTIST)
var/list/cultists_possible = get_players_for_role(ROLE_CULTIST, species_exclude = list("Serpentids")) // SS220 EDIT - SERPENTIDS
for(var/cultists_number = 1 to max_cultists_to_start)
if(!length(cultists_possible))
break
Expand Down
8 changes: 8 additions & 0 deletions code/game/gamemodes/cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@ structure_check() searches for nearby cultist structures required for the invoca
if(!IS_CULTIST(M) || (M.mind && IS_SACRIFICE_TARGET(M.mind)))
if(isconstruct(M)) // No offering constructs please
continue
// SS220 EDIT START - SERPENTIDS
if(is_species(M, /datum/species/serpentid))
M.Paralyse(15 SECONDS)
M.AdjustSleeping(60 SECONDS, bound_lower = 60 SECONDS, bound_upper = 100 SECONDS)
for(var/I in invokers)
to_chat(I, "<span class='warning'>Предложенная кровь недостаточно хороша для подношения, найдите другую жертву!</span>")
continue
// SS220 EDIT END - SERPENTIDS
offer_targets += M

// Offering a head/brain
Expand Down
6 changes: 5 additions & 1 deletion code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
if(rev_team)
rev_team.check_all_victory()

/datum/game_mode/proc/get_players_for_role(role, override_jobbans = FALSE, species_exclusive = null)
/datum/game_mode/proc/get_players_for_role(role, override_jobbans = FALSE, species_exclusive = null, list/species_exclude = null)
var/list/players = list()
var/list/candidates = list()

Expand All @@ -302,6 +302,10 @@
if(!eligible_player.client.skip_antag)
if(species_exclusive && (eligible_player.client.prefs.active_character.species != species_exclusive))
continue
// SS220 ADDITION START - SERPENTIDS
if(species_exclude && (eligible_player.client.prefs.active_character.species in species_exclude))
continue
// SS220 ADDITION END - SERPENTIDS
if(role in eligible_player.client.prefs.be_special)
player_draft_log += "[eligible_player.key] had [roletext] enabled, so we are drafting them."
candidates += eligible_player.mind
Expand Down
4 changes: 4 additions & 0 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
/datum/objective/escape/escape_with_identity/is_invalid_target(datum/mind/possible_target)
if(..() || !possible_target.current.client)
return TRUE
// SS220 EDIT START - GAS FIXES AND REBALANCE
if(is_species(possible_target, /datum/species/serpentid))
return TRUE
// SS220 EDIT END - GAS FIXES AND REBALANCE
// If the target is geneless, then it's an invalid target.
return HAS_TRAIT(possible_target.current, TRAIT_GENELESS)

Expand Down
5 changes: 5 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,11 @@ 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_STATE) & CARAPACE_SHELL_BROKEN)
msgs = get_carapace_damage_level(H, msgs)
//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
5 changes: 5 additions & 0 deletions code/modules/antagonists/changeling/powers/tiny_prick.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
if(ismachineperson(target))
to_chat(user, "<span class='warning'>This won't work on synthetics.</span>")
return FALSE
// SS220 EDIT START - GAS FIXES AND REBALANCE
if(is_species(target, /datum/species/serpentid))
to_chat(user, "<span class='warning'>This won't work on serpentids armor.</span>")
return FALSE
// SS220 EDIT START - GAS FIXES AND REBALANCE
if(IS_CHANGELING(target))
sting_feedback(user, target)
take_chemical_cost()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/ruins/lavalandruin_code/sin_ruins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
return
if(!istype(user))
return
if(ishuman(AM))
if(ishuman(AM) && !is_species(AM, /datum/species/serpentid)) // SS220 EDIT - SERPENTIDS
var/mob/living/carbon/human/H = AM
if(user.real_name != H.dna.real_name)
user.real_name = H.dna.real_name
Expand Down
16 changes: 16 additions & 0 deletions config/names/serpentids_names.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Бламг
Брэцк
Вшиси
Вхус
Клатси
Клух
Звин
Зцохи
Рари
Ристи
Скрик
Скрум
Щерс
Шухса
Цвальк
Цвун
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Signals for /mob/living/carbon
/// called by /mob/equip_to_slot() : (/datum/component/mob_overlay_shift)
#define COMSIG_MOB_ON_EQUIP "mob_on_equip"

/// called by /datum/action/changeling/transform/sting_action() : (/datum/component/mob_overlay_shift)
#define COMSIG_CHANGELING_FINISHED_TRANSFORM "changeling_finished_transform"
/// called by /mob/ClickOn() : (/datum/component/mob_overlay_shift)
#define COMSIG_MOB_ON_CLICK "mob_on_click"

Expand Down
2 changes: 2 additions & 0 deletions modular_ss220/_defines220/code/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#define COMSIG_LIMB_RECEIVE_DAMAGE "limb_receive_damage"
/// called by /obj/item/organ/external/heal_damage() : (/datum/component/carapace)
#define COMSIG_LIMB_HEAL_DAMAGE "limb_heal_damage"
/// called by /datum/surgery_step/set_bone/end_step(), /datum/surgery_step/retract_carapace/end_step : (/datum/component/carapace)
#define COMSIG_LIMB_SHELL_OPERATION "limb_shell_operation"
/// called by /obj/item/organ/internal/cyberimp/arm/Extend() /obj/item/organ/internal/cyberimp/arm/Retract() : (/datum/element/paired_implants)
#define COMSIG_DOUBLEIMP_SYNCHONIZE "doubleimp_synchonize"
/// called by /obj/item/organ/internal/remove() /obj/item/organ/internal/insert() : (/datum/element/paired_implants)
Expand Down
4 changes: 4 additions & 0 deletions modular_ss220/_defines220/code/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@
/mob/living/carbon/human
var/atom/movable/loaded = null
var/mob/living/passenger = null

/mob/living/proc/isCarrying()
var/mob/living/carbon/human/check_one = src
return check_one?.loaded || check_one?.passenger
2 changes: 1 addition & 1 deletion modular_ss220/pixel_shift/code/pixel_shift_component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

/datum/component/pixel_shift/proc/pixel_shift(mob/target, direction)
var/mob/living/owner = parent
if(HAS_TRAIT(owner, TRAIT_RESTRAINED) || HAS_TRAIT(owner, TRAIT_IMMOBILIZED) || length(owner.grabbed_by) || owner.stat != CONSCIOUS)
if(HAS_TRAIT(owner, TRAIT_RESTRAINED) || HAS_TRAIT(owner, TRAIT_IMMOBILIZED) || length(owner.grabbed_by) || owner.stat != CONSCIOUS || owner.isCarrying())
return
passthroughable = NONE
switch(direction)
Expand Down
27 changes: 22 additions & 5 deletions modular_ss220/species/_components/appearance/mob_overlay_shift.dm
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), PROC_REF(shift_call))
RegisterSignal(parent, list(COMSIG_COMPONENT_CLEAN_ACT, COMSIG_MOVABLE_MOVED, 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))
UnregisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_MOVABLE_MOVED, 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 All @@ -59,7 +68,8 @@
position = MOB_OVERLAY_SHIFT_FRONT

var/flip = (dir == WEST || dir == SOUTH) ? -1 : 1

if(!position)
position = MOB_OVERLAY_SHIFT_SIDE //ГБС лежит
// Update shift values based on direction
for(var/body_part in body_parts)
var/x_shift_key = "shift_x"
Expand All @@ -70,8 +80,11 @@
var/x_central_value = shift_data[body_part][MOB_OVERLAY_SHIFT_CENTER]["x"]
var/y_central_value = shift_data[body_part][MOB_OVERLAY_SHIFT_CENTER]["y"]

shift_data[body_part][x_shift_key] = flip * x_shift_value + x_central_value
shift_data[body_part][y_shift_key] = flip * y_shift_value + y_central_value
shift_data[body_part][y_shift_key] = 0
shift_data[body_part][x_shift_key] = 0
if(isserpentid(mob))
shift_data[body_part][x_shift_key] = flip * x_shift_value + x_central_value
shift_data[body_part][y_shift_key] = flip * y_shift_value + y_central_value

update_call(mob)

Expand All @@ -97,3 +110,7 @@
#undef MOB_OVERLAY_SHIFT_SIDE
#undef MOB_OVERLAY_SHIFT_FRONT
#undef MOB_OVERLAY_SHIFT_CENTER

/atom/movable/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change)
. = ..()
l_move_time = world.time
4 changes: 1 addition & 3 deletions modular_ss220/species/_components/attacking/double_attack.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
===Компонент на атаку парного оружия
Срабатывает при атаке оружием. Второе оружие через паузу в 0.2 секунды запускает атаку.

Срабатывает только, если оружие одинаковое.
Срабатывает при атаке оружием. Второе оружие через паузу в N секунд запускает атаку.
*/

/datum/component/double_attack
Expand Down
25 changes: 19 additions & 6 deletions modular_ss220/species/_components/carapace/carapace.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/datum/component/carapace
var/self_mending = FALSE
var/broken_treshold = CARAPACE_BROKEN_STATE
var/operation_in_process = FALSE

/datum/component/carapace/Initialize(allow_self_mending, break_threshold)
src.self_mending = allow_self_mending
Expand All @@ -37,10 +38,16 @@
/datum/component/carapace/RegisterWithParent()
RegisterSignal(parent, COMSIG_LIMB_RECEIVE_DAMAGE, PROC_REF(receive_damage))
RegisterSignal(parent, COMSIG_LIMB_HEAL_DAMAGE, PROC_REF(heal_damage))
RegisterSignal(parent, COMSIG_LIMB_SHELL_OPERATION, PROC_REF(handle_operation_status))

/datum/component/carapace/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_LIMB_RECEIVE_DAMAGE)
UnregisterSignal(parent, COMSIG_LIMB_HEAL_DAMAGE)
UnregisterSignal(parent, COMSIG_LIMB_SHELL_OPERATION)

/datum/component/carapace/proc/handle_operation_status(obj/item/organ/external/affected_limb, state_to_apply)
SIGNAL_HANDLER
operation_in_process = state_to_apply

//Проки, срабатываемые при получении или исцелении урона
/datum/component/carapace/proc/receive_damage(obj/item/organ/external/affected_limb, brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE)
Expand All @@ -49,20 +56,20 @@
affected_limb.fracture()
if(length(affected_limb.internal_organs))
var/obj/item/organ/internal/O = pick(affected_limb.internal_organs)
O.receive_damage(burn * affected_limb.burn_dam)
O.receive_damage(burn)

/datum/component/carapace/proc/heal_damage(obj/item/organ/external/affected_limb, brute, burn, internal = 0, robo_repair = 0, updating_health = TRUE)
SIGNAL_HANDLER
if((affected_limb.status & ORGAN_BROKEN) && affected_limb.get_damage() == 0)
if(self_mending || prob(CARAPACE_HEAL_BROKEN_PROB))
if((self_mending || prob(CARAPACE_HEAL_BROKEN_PROB)) && !operation_in_process)
affected_limb.mend_fracture()

//////////////////////////////////////////////////////////////////
// Хирургия для панциря //
//////////////////////////////////////////////////////////////////
///Датумы для операций
/datum/surgery/carapace_break
name = "Break carapace"
name = "Break chitin"
steps = list(
/datum/surgery_step/saw_carapace,
/datum/surgery_step/cut_carapace,
Expand All @@ -83,7 +90,7 @@
requires_organic_bodypart = TRUE

/datum/surgery/bone_repair/carapace
name = "Carapace Repair"
name = "Chitin Repair"
steps = list(
/datum/surgery_step/glue_bone,
/datum/surgery_step/set_bone,
Expand Down Expand Up @@ -133,7 +140,7 @@
//Блокировка простого скальпеля (базовый начальный шаг любой операции), если карапас не был сломан, но появилась какая-то операция, которая не должна быть
/datum/surgery_step/generic/cut_open/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if((affected?.encased == CARAPACE_ENCASE_WORD) && !(affected.status & ORGAN_BROKEN))
if((affected?.encased == CARAPACE_ENCASE_WORD) && !(affected.status & ORGAN_BROKEN) && !istype(surgery, /datum/surgery/carapace_shell_repair))
to_chat(user, span_notice("[capitalize(target.declent_ru(NOMINATIVE))] покрыта крепким хитином. Сломайте его, прежде чем начать операцию."))
return SURGERY_BEGINSTEP_ABORT
. = .. ()
Expand All @@ -142,12 +149,18 @@
var/obj/item/organ/external/affected = target.get_organ(user.zone_selected)
if((affected?.encased == CARAPACE_ENCASE_WORD) && !(affected.status & ORGAN_BROKEN))
affected.fracture()
REMOVE_TRAIT(target, TRAIT_PIERCEIMMUNE, "carapace_state")
SEND_SIGNAL(affected, COMSIG_LIMB_SHELL_OPERATION, TRUE)
. = .. ()

/datum/surgery_step/set_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(user.zone_selected)
if((affected?.encased == CARAPACE_ENCASE_WORD) && !(affected.status & ORGAN_BROKEN))
if((affected?.encased == CARAPACE_ENCASE_WORD) && (affected.status & ORGAN_BROKEN))
affected.mend_fracture()
if(isserpentid(target))
if(!(SEND_SIGNAL(target, COMSIG_SHELL_GET_CARAPACE_STATE) & CARAPACE_SHELL_BROKEN))
ADD_TRAIT(target, TRAIT_PIERCEIMMUNE, "carapace_state")
SEND_SIGNAL(affected, COMSIG_LIMB_SHELL_OPERATION, FALSE)
. = .. ()

#undef CARAPACE_BROKEN_STATE
Expand Down
Loading