From 00cdc5820735dbe4c8fc91777be1c4465bc0b2b2 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Mon, 21 Oct 2024 18:00:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D1=80=D0=B5=D0=B2=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/species/_code/chat_offset.dm | 1 + modular_ss220/species/_code/update_icons.dm | 11 +-- .../appearance/mob_overlay_shift.dm | 83 +++++++++++-------- .../_components/attacking/double_attack.dm | 7 +- .../_components/attacking/pair_attack.dm | 12 ++- .../species/_components/carapace/carapace.dm | 15 ++-- .../_components/carapace/carapace_shell.dm | 37 +++++---- .../carrying/grab_and_drag_on_mob_crates.dm | 8 +- 8 files changed, 102 insertions(+), 72 deletions(-) diff --git a/modular_ss220/species/_code/chat_offset.dm b/modular_ss220/species/_code/chat_offset.dm index a9019eba8e39..b38fdd69ea1a 100644 --- a/modular_ss220/species/_code/chat_offset.dm +++ b/modular_ss220/species/_code/chat_offset.dm @@ -8,6 +8,7 @@ #define CHAT_MESSAGE_WIDTH 96 #define CHAT_MESSAGE_GRACE_PERIOD (0.2 SECONDS) +//Отрпавить на оффы - так можно кастомно выводить рунчат сообщения (выше/ниже верхней границы спрайта) /mob var/chat_message_y_offset = 0 diff --git a/modular_ss220/species/_code/update_icons.dm b/modular_ss220/species/_code/update_icons.dm index 820de24dd996..d8629f9c7b5b 100644 --- a/modular_ss220/species/_code/update_icons.dm +++ b/modular_ss220/species/_code/update_icons.dm @@ -10,14 +10,15 @@ qdel(preview_icon_side) qdel(preview_icon) - var/g = "m" + //Переменные взяты с оффов, обновил + var/gender = "m" if(body_type == FEMALE) - g = "f" + gender = "f" var/icon/icobase = selected_specie.icobase - preview_icon = new /icon(icobase, "torso_[g]") - preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY) - preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY) + preview_icon = new /icon(icobase, "torso_[gender]") + preview_icon.Blend(new /icon(icobase, "groin_[gender]"), ICON_OVERLAY) + preview_icon.Blend(new /icon(icobase, "head_[gender]"), ICON_OVERLAY) for(var/name in list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand")) if(organ_data[name] == "amputated") continue if(organ_data[name] == "cyborg") diff --git a/modular_ss220/species/_components/appearance/mob_overlay_shift.dm b/modular_ss220/species/_components/appearance/mob_overlay_shift.dm index 439f195eb4fe..82e7d67b0194 100644 --- a/modular_ss220/species/_components/appearance/mob_overlay_shift.dm +++ b/modular_ss220/species/_components/appearance/mob_overlay_shift.dm @@ -3,14 +3,26 @@ Компонент должен цепляться на моба. При инициализации предаются сдвиги. */ +#define MOB_OVERLAY_SHIFT_HAND "inhand" +#define MOB_OVERLAY_SHIFT_BELT "belt" +#define MOB_OVERLAY_SHIFT_BACK "back" +#define MOB_OVERLAY_SHIFT_HEAD "head" +#define MOB_OVERLAY_SHIFT_SIDE "side" +#define MOB_OVERLAY_SHIFT_FRONT "front" +#define MOB_OVERLAY_SHIFT_CENTER "center" + +#define COMSIG_MOB_OVERLAY_SHIFT_ON_EQUIP "on_equip" +#define COMSIG_MOB_OVERLAY_SHIFT_ON_CLICK "on_click" + + /datum/component/mob_overlay_shift var/dir = NORTH var/list/shift_data = list() /datum/component/mob_overlay_shift/Initialize(list/shift_list) // Define body parts and positions - var/list/body_parts = list("inhand", "belt", "back", "head") - var/list/positions = list("center", "side", "front") + var/list/body_parts = list(MOB_OVERLAY_SHIFT_HAND, MOB_OVERLAY_SHIFT_BELT, MOB_OVERLAY_SHIFT_BACK, MOB_OVERLAY_SHIFT_HEAD) + var/list/positions = list(MOB_OVERLAY_SHIFT_CENTER, MOB_OVERLAY_SHIFT_SIDE, MOB_OVERLAY_SHIFT_FRONT) // Initialize shifts using the provided shift_data list or default to zero for(var/body_part in body_parts) // Create a nested list for each body part if it doesn't exist @@ -21,35 +33,36 @@ shift_data[body_part][position] = shift_list[body_part][position] ? shift_list[body_part][position] : list() // Set default values for x and y shifts if not provided - shift_data[body_part][position]["x"] = shift_list[body_part][position]["x"] ? shift_list[body_part][position]["x"] : 0 - shift_data[body_part][position]["y"] = shift_list[body_part][position]["y"] ? shift_list[body_part][position]["y"] : 0 + shift_data[body_part][position]["x"] = shift_list[body_part][position]["x"] || 0 + shift_data[body_part][position]["y"] = shift_list[body_part][position]["y"] || 0 + shift_call(parent) /datum/component/mob_overlay_shift/RegisterWithParent() RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, PROC_REF(shift_call)) RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(shift_call)) + RegisterSignal(parent, COMSIG_MOB_OVERLAY_SHIFT_ON_EQUIP, PROC_REF(shift_call)) + RegisterSignal(parent, COMSIG_MOB_OVERLAY_SHIFT_ON_CLICK, PROC_REF(shift_call)) -/datum/component/mob_overlay_shift/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT)) -//datum/component/mob_overlay_shift/process() - //shift_call(parent) +/datum/component/mob_overlay_shift/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_MOB_OVERLAY_SHIFT_ON_EQUIP, COMSIG_MOB_OVERLAY_SHIFT_ON_CLICK)) /datum/component/mob_overlay_shift/proc/shift_call(mob/living/carbon/human/mob) if(mob.dir) dir = mob.dir - var/list/body_parts = list("inhand", "belt", "back", "head") + 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) if(EAST) - position = "side" + position = MOB_OVERLAY_SHIFT_SIDE if(SOUTH) - position = "front" + position = MOB_OVERLAY_SHIFT_FRONT if(WEST) - position = "side" + position = MOB_OVERLAY_SHIFT_SIDE if(NORTH) - position = "front" + position = MOB_OVERLAY_SHIFT_FRONT var/flip = (dir == WEST || dir == SOUTH) ? -1 : 1 @@ -60,8 +73,8 @@ var/x_shift_value = shift_data[body_part][position]["x"] var/y_shift_value = shift_data[body_part][position]["y"] - var/x_central_value = shift_data[body_part]["center"]["x"] - var/y_central_value = shift_data[body_part]["center"]["y"] + 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 @@ -118,8 +131,8 @@ standing = mutable_appearance(mob.belt.sprite_sheets[mob.dna.species.sprite_sheet_name], "[t_state]", layer = -overlay_layer) else standing = mutable_appearance('icons/mob/clothing/belt.dmi', "[t_state]", layer = -overlay_layer) - standing.pixel_x = shift_data["belt"]["shift_y"] - standing.pixel_y = shift_data["belt"]["shift_y"] + standing.pixel_x = shift_data[MOB_OVERLAY_SHIFT_BELT]["shift_y"] + standing.pixel_y = shift_data[MOB_OVERLAY_SHIFT_BELT]["shift_y"] mob.overlays_standing[overlay_layer] = standing mob.apply_overlay(BELT_LAYER) mob.apply_overlay(SPECIAL_BELT_LAYER) @@ -143,8 +156,8 @@ //create the image standing.alpha = mob.back.alpha standing.color = mob.back.color - standing.pixel_x = shift_data["back"]["shift_x"] - standing.pixel_y = shift_data["back"]["shift_y"] + standing.pixel_x = shift_data[MOB_OVERLAY_SHIFT_BACK]["shift_x"] + standing.pixel_y = shift_data[MOB_OVERLAY_SHIFT_BACK]["shift_y"] mob.overlays_standing[BACK_LAYER] = standing mob.apply_overlay(BACK_LAYER) @@ -163,8 +176,8 @@ else standing = mutable_appearance(mob.r_hand.righthand_file, "[t_state]", layer = -R_HAND_LAYER, color = mob.r_hand.color) standing = center_image(standing, (mob.r_hand.inhand_x_dimension), (mob.r_hand.inhand_y_dimension)) - standing.pixel_x = shift_data["inhand"]["shift_x"] - standing.pixel_y = shift_data["inhand"]["shift_y"] + standing.pixel_x = shift_data[MOB_OVERLAY_SHIFT_HAND]["shift_x"] + standing.pixel_y = shift_data[MOB_OVERLAY_SHIFT_HAND]["shift_y"] mob.overlays_standing[R_HAND_LAYER] = standing mob.apply_overlay(R_HAND_LAYER) @@ -184,8 +197,8 @@ else standing = mutable_appearance(mob.l_hand.lefthand_file, "[t_state]", layer = -L_HAND_LAYER, color = mob.l_hand.color) standing = center_image(standing, mob.l_hand.inhand_x_dimension, mob.l_hand.inhand_y_dimension) - standing.pixel_x = shift_data["inhand"]["shift_x"] - standing.pixel_y = shift_data["inhand"]["shift_y"] + standing.pixel_x = shift_data[MOB_OVERLAY_SHIFT_HAND]["shift_x"] + standing.pixel_y = shift_data[MOB_OVERLAY_SHIFT_HAND]["shift_y"] mob.overlays_standing[L_HAND_LAYER] = standing mob.apply_overlay(L_HAND_LAYER) @@ -216,8 +229,8 @@ standing.overlays += bloodsies standing.alpha = mob.head.alpha standing.color = mob.head.color - standing.pixel_x = shift_data["head"]["shift_x"] - standing.pixel_y = shift_data["head"]["shift_y"] + standing.pixel_x = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_x"] + standing.pixel_y = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_y"] mob.overlays_standing[HEAD_LAYER] = standing mob.apply_overlay(HEAD_LAYER) @@ -233,7 +246,7 @@ if(mob.glasses) var/mutable_appearance/new_glasses - var/obj/item/organ/external/head/head_organ = mob.get_organ("head") + var/obj/item/organ/external/head/head_organ = mob.get_organ(MOB_OVERLAY_SHIFT_HEAD) mob.update_hud_glasses(mob.glasses) if(mob.glasses.icon_override) @@ -243,8 +256,8 @@ else new_glasses = mutable_appearance('icons/mob/clothing/eyes.dmi', "[mob.glasses.icon_state]", layer = -GLASSES_LAYER) - new_glasses.pixel_x = shift_data["head"]["shift_x"] - new_glasses.pixel_y = shift_data["head"]["shift_y"] + new_glasses.pixel_x = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_x"] + new_glasses.pixel_y = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_y"] var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style] var/obj/item/clothing/glasses/G = mob.glasses @@ -286,8 +299,8 @@ left_ear_icon = mob.l_ear.icon_override var/mutable_appearance/standing = mutable_appearance(left_ear_icon, left_ear_item_state, layer = -LEFT_EAR_LAYER) - standing.pixel_x = shift_data["head"]["shift_x"] - standing.pixel_y = shift_data["head"]["shift_y"] + standing.pixel_x = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_x"] + standing.pixel_y = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_y"] mob.overlays_standing[LEFT_EAR_LAYER] = standing if(mob.r_ear) @@ -302,8 +315,8 @@ right_ear_icon = mob.r_ear.icon_override var/mutable_appearance/standing = mutable_appearance(right_ear_icon, right_ear_item_state, layer = -RIGHT_EAR_LAYER) - standing.pixel_x = shift_data["head"]["shift_x"] - standing.pixel_y = shift_data["head"]["shift_y"] + standing.pixel_x = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_x"] + standing.pixel_y = shift_data[MOB_OVERLAY_SHIFT_HEAD]["shift_y"] mob.overlays_standing[RIGHT_EAR_LAYER] = standing mob.apply_overlay(LEFT_EAR_LAYER) @@ -311,12 +324,14 @@ /mob/equip_to_slot(obj/item/W, slot, initial = FALSE) . = .. () - SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE) + SEND_SIGNAL(src, COMSIG_MOB_OVERLAY_SHIFT_ON_EQUIP) +//Вызов сигнала при повоторе через ctrl+wasd /mob/facedir(ndir) . = .. () SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE) +//Вызов сигнала при повороте через ЛКМы /mob/ClickOn(atom/A, params) . = .. () - SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE) + SEND_SIGNAL(src, COMSIG_MOB_OVERLAY_SHIFT_ON_CLICK) diff --git a/modular_ss220/species/_components/attacking/double_attack.dm b/modular_ss220/species/_components/attacking/double_attack.dm index 347177ef7bbd..9681e503fad3 100644 --- a/modular_ss220/species/_components/attacking/double_attack.dm +++ b/modular_ss220/species/_components/attacking/double_attack.dm @@ -7,6 +7,10 @@ /datum/component/double_attack var/state_attack = FALSE + var/attack_CD = 0 + +/datum/component/double_attack/Initialize(attack_CD_OVR = 0) + attack_CD = attack_CD_OVR /datum/component/double_attack/RegisterWithParent() RegisterSignal(parent, COMSIG_MOB_ITEM_ATTACK, PROC_REF(hand_pre_attack)) @@ -19,7 +23,8 @@ var/hand_item = user.get_active_hand() if(hand_item && !state_attack) state_attack = TRUE - addtimer(CALLBACK(src, PROC_REF(hand_attack), target, user, def_zone, hand_item), (user.next_move_modifier / 5) SECONDS) + var/attack_haste = attack_CD ? attack_CD : user.next_move_modifier / 5 + addtimer(CALLBACK(src, PROC_REF(hand_attack), target, user, def_zone, hand_item), attack_haste SECONDS) /datum/component/double_attack/proc/hand_attack(mob/living/target, mob/living/user, def_zone, obj/item/hand_item) if(QDELETED(src) || QDELETED(target) || user != hand_item.loc || !user.Adjacent(target)) diff --git a/modular_ss220/species/_components/attacking/pair_attack.dm b/modular_ss220/species/_components/attacking/pair_attack.dm index b1791fa468ab..23e7dd6754ad 100644 --- a/modular_ss220/species/_components/attacking/pair_attack.dm +++ b/modular_ss220/species/_components/attacking/pair_attack.dm @@ -5,6 +5,8 @@ Срабатывает только, если оружие одинаковое. */ +#define PAIRATTACK_RECOIL_MULT 2.5 + #define COMSIG_ITEM_ATTACK_PROCESS "offhand_pre_attack" #define COMSIG_PAIRATTACK_SYNC "sync_states" #define COMSIG_PAIRATTACK_CHECK "check_state" @@ -13,6 +15,10 @@ /datum/component/pair_attack var/obj/item/offhand_item = null var/state_attack = FALSE + var/attack_CD = 0 + +/datum/component/pair_attack/Initialize(attack_CD_OVR = 0) + attack_CD = attack_CD_OVR /datum/component/pair_attack/RegisterWithParent() RegisterSignal(parent, COMSIG_ITEM_ATTACK_PROCESS, PROC_REF(offhand_pre_attack)) @@ -44,8 +50,10 @@ state_attack = TRUE SEND_SIGNAL(offhand_item, COMSIG_PAIRATTACK_SYNC, state_attack) if(offhand_item) - addtimer(CALLBACK(src, PROC_REF(offhand_attack), target, user, def_zone), (user.next_move_modifier / 5) SECONDS) - addtimer(CALLBACK(src, PROC_REF(offhand_post_attack)), (user.next_move_modifier / 2) SECONDS) + var/attack_haste = attack_CD ? attack_CD : user.next_move_modifier / 5 + var/attack_recoil = attack_haste * PAIRATTACK_RECOIL_MULT + addtimer(CALLBACK(src, PROC_REF(offhand_attack), target, user, def_zone), attack_haste SECONDS) + addtimer(CALLBACK(src, PROC_REF(offhand_post_attack)), attack_recoil SECONDS) /datum/component/pair_attack/proc/offhand_attack(mob/living/target, mob/living/user, def_zone) if(QDELETED(src) || QDELETED(target) || user != offhand_item.loc || !user.Adjacent(target)) diff --git a/modular_ss220/species/_components/carapace/carapace.dm b/modular_ss220/species/_components/carapace/carapace.dm index 251d4cf197c9..6bab0c6540a8 100644 --- a/modular_ss220/species/_components/carapace/carapace.dm +++ b/modular_ss220/species/_components/carapace/carapace.dm @@ -28,11 +28,11 @@ #define COMSIG_LIMB_HEAL_DAMAGE "heal_damage" /datum/component/carapace - var/self_medning = FALSE + var/self_mending = FALSE var/broken_treshold = CARAPACE_BROKEN_STATE -/datum/component/carapace/Initialize(allow_self_medning, break_threshold, control_node = FALSE) - self_medning = allow_self_medning +/datum/component/carapace/Initialize(allow_self_mending, break_threshold, control_node = FALSE) + src.self_mending = allow_self_mending broken_treshold = break_threshold var/obj/item/organ/external/affected_limb = parent affected_limb.encased = CARAPACE_ENCASE_WORD @@ -49,25 +49,23 @@ /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) if(affected_limb.get_damage() > broken_treshold) affected_limb.fracture() - if(length(affected_limb.internal_organs) > 0) + 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) /datum/component/carapace/proc/heal_damage(obj/item/organ/external/affected_limb, brute, burn, internal = 0, robo_repair = 0, updating_health = TRUE) if((affected_limb.status & ORGAN_BROKEN) && affected_limb.get_damage() == 0) - if(self_medning || prob(CARAPACE_HEAL_BROKEN_PROB)) + if(self_mending || prob(CARAPACE_HEAL_BROKEN_PROB)) affected_limb.mend_fracture() //Расширение проков урона и лечения для обращения к компоненту /obj/item/organ/external/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE) . = ..() SEND_SIGNAL(src, COMSIG_LIMB_RECIEVE_DAMAGE, brute, burn, sharp, used_weapon, forbidden_limbs, ignore_resists, updating_health) - return /obj/item/organ/external/heal_damage(brute, burn, internal = 0, robo_repair = 0, updating_health = TRUE) . = ..() SEND_SIGNAL(src, COMSIG_LIMB_HEAL_DAMAGE, brute, burn, internal, robo_repair, updating_health) - return ////////////////////////////////////////////////////////////////// // Хирургия для панциря // @@ -106,6 +104,7 @@ requires_organic_bodypart = TRUE //Оверрайды для операций, которые могут применяться для панциря. +//Возможный рефактор - отослать сигнал в компоненнт с параметрами "операция, зона операции" и вернуть значение оттуда? /datum/surgery/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/external/affected = target.get_organ(user.zone_selected) if(affected?.encased == CARAPACE_ENCASE_WORD) @@ -145,7 +144,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)) - user.visible_message("Эта конечность [target] покрыта крепким хитином. Сломайте его, прежде чем начать операцию .") + to_chat(user, span_notice("Эта конечность [target] покрыта крепким хитином. Сломайте его, прежде чем начать операцию.")) return SURGERY_BEGINSTEP_ABORT . = .. () diff --git a/modular_ss220/species/_components/carapace/carapace_shell.dm b/modular_ss220/species/_components/carapace/carapace_shell.dm index fd95b431dde4..5e476085332a 100644 --- a/modular_ss220/species/_components/carapace/carapace_shell.dm +++ b/modular_ss220/species/_components/carapace/carapace_shell.dm @@ -3,6 +3,13 @@ Цепляется на конечность (в идеале торс).area Опреедляет возможности тела серпентида, которые зависят от общего состояния хитина всех конечностей */ + + +#define CARAPACE_SHELL_ARMORED_BRUTE 0.6 +#define CARAPACE_SHELL_ARMORED_BURN 0.8 +#define CARAPACE_SHELL_BROKEN_BRUTE 1 +#define CARAPACE_SHELL_BROKEN_BURN 1 + /datum/component/carapace_shell var/mob/living/carbon/human/H var/state_1_threshold = 0 @@ -12,7 +19,9 @@ var/armored_heat_threshold = 0 var/armored_temp_progression = 0 -/datum/component/carapace_shell/Initialize(caller, treshold_1, treshold_2, treshold_3, threshold_cold, threshold_heat, temp_progression) +/datum/component/carapace_shell/Initialize(mob/living/carbon/human/caller, treshold_1, treshold_2, treshold_3, threshold_cold, threshold_heat, temp_progression) + if(!istype(caller)) + return H = caller state_1_threshold = treshold_1 @@ -35,24 +44,21 @@ //Потеря брони при первом трешхолде if(character_damage <= state_1_threshold) - specie.brute_mod = 0.6 - specie.burn_mod = 1.1 + specie.brute_mod = CARAPACE_SHELL_ARMORED_BRUTE + specie.burn_mod = CARAPACE_SHELL_ARMORED_BURN ADD_TRAIT(H, TRAIT_PIERCEIMMUNE, "carapace_state") - H.clear_alert("carapace_break_armor") + H.clear_alert("carapace_break") else - specie.brute_mod = 1.3 - specie.burn_mod = 1.5 + specie.brute_mod = CARAPACE_SHELL_BROKEN_BRUTE + specie.burn_mod = CARAPACE_SHELL_BROKEN_BURN REMOVE_TRAIT(H, TRAIT_PIERCEIMMUNE, "carapace_state") - H.throw_alert("carapace_break_armor", /atom/movable/screen/alert/carapace/break_armor) + H.throw_alert("carapace_break", /atom/movable/screen/alert/carapace/break_armor) //Потеря стелса при втором трешхолде var/obj/item/organ/internal/kidneys/serpentid/organ = H.get_int_organ("kidneys") - if(character_damage <= state_2_threshold) - H.clear_alert("carapace_break_cloak") - else - H.throw_alert("carapace_break_cloak", /atom/movable/screen/alert/carapace/break_cloak) - H.clear_alert("carapace_break_armor") - if(istype(organ, /obj/item/organ/internal/kidneys/serpentid)) + if(character_damage > state_2_threshold) + H.throw_alert("carapace_break", /atom/movable/screen/alert/carapace/break_cloak) + if(istype(organ)) organ.switch_mode(force_off = TRUE) //Потеря рига при третьем трешхолде @@ -64,15 +70,12 @@ specie.warning_high_pressure = INFINITY specie.warning_low_pressure = -INFINITY specie.hazard_low_pressure = -INFINITY - H.clear_alert("carapace_break_rig") else specie.hazard_high_pressure = HAZARD_HIGH_PRESSURE specie.warning_high_pressure = WARNING_HIGH_PRESSURE specie.warning_low_pressure = WARNING_LOW_PRESSURE specie.hazard_low_pressure = HAZARD_LOW_PRESSURE - H.throw_alert("carapace_break_rig", /atom/movable/screen/alert/carapace/break_rig) - H.clear_alert("carapace_break_armor") - H.clear_alert("carapace_break_cloak") + H.throw_alert("carapace_break", /atom/movable/screen/alert/carapace/break_rig) cold = initial(specie.cold_level_1) heat = initial(specie.heat_level_2) diff --git a/modular_ss220/species/_components/carrying/grab_and_drag_on_mob_crates.dm b/modular_ss220/species/_components/carrying/grab_and_drag_on_mob_crates.dm index d4a1cf0e6807..dd09299824e2 100644 --- a/modular_ss220/species/_components/carrying/grab_and_drag_on_mob_crates.dm +++ b/modular_ss220/species/_components/carrying/grab_and_drag_on_mob_crates.dm @@ -14,18 +14,16 @@ var/mob/living/carbon/human/crate_carrying_person = null //Для расширения движения (иначе возникает графический глич и ящик пропадает при движении) -/atom/movable/Move(atom/newloc, direct = 0, movetime) +/mob/living/carbon/human/Move(NewLoc, direct) . = .. () var/mob/living/carbon/human/puppet = src - if(ishuman(puppet)) - if(!isnull(puppet.loaded)) - puppet.loaded.forceMoveCrate(puppet) + if(puppet.loaded) + puppet.loaded.forceMoveCrate(puppet) //Клонированый и изменны прок движения, чтобы не трогать основной /atom/movable/proc/forceMoveCrate(atom/destination) var/turf/old_loc = loc loc = destination.loc //изменение здесь (добавлено .loc) - moving_diagonally = 0 if(old_loc) old_loc.Exited(src, destination)