diff --git a/Content.Client/_Sunrise/Medical/Surgery/SurgeryBui.cs b/Content.Client/_Sunrise/Medical/Surgery/SurgeryBui.cs index 40b8e90d24..f16a50bdfa 100644 --- a/Content.Client/_Sunrise/Medical/Surgery/SurgeryBui.cs +++ b/Content.Client/_Sunrise/Medical/Surgery/SurgeryBui.cs @@ -40,12 +40,18 @@ public sealed class SurgeryBui : BoundUserInterface _system.OnRefresh += UpdateDisabledPanel; _hands.OnPlayerItemAdded += OnPlayerItemAdded; + _hands.OnPlayerSetActiveHand += OnPlayerSetHand; } private void OnPlayerItemAdded(string k1, EntityUid k2) { if (!_game.IsFirstTimePredicted) return; RefreshUI(); } + private void OnPlayerSetHand(string? k1) + { + if (!_game.IsFirstTimePredicted) return; + RefreshUI(); + } protected override void Open() { base.Open(); @@ -364,6 +370,9 @@ public sealed class SurgeryBui : BoundUserInterface case StepInvalidReason.MissingTool: stepName.AddMarkupOrThrow(Loc.GetString("surgery-window-reguires-tool")); break; + case StepInvalidReason.NeedToolInhand: + stepName.AddMarkupOrThrow(Loc.GetString("surgery-window-reguires-tool-inhand")); + break; case StepInvalidReason.DisabledTool: stepName.AddMarkupOrThrow(Loc.GetString("surgery-window-reguires-enable")); break; diff --git a/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs b/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs index fd0a9cdafe..da7d96788d 100644 --- a/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs +++ b/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs @@ -35,7 +35,7 @@ public sealed partial class SurgerySystem : SharedSurgerySystem { SubscribeLocalEvent(OnStepBleedComplete); SubscribeLocalEvent(OnStepClampBleedComplete); - SubscribeLocalEvent(OnStepEmoteEffectComplete); + // SubscribeLocalEvent(OnStepEmoteEffectComplete); SubscribeLocalEvent(OnStepSpawnComplete); SubscribeLocalEvent(OnStepOrganExtractComplete); @@ -135,8 +135,8 @@ public sealed partial class SurgerySystem : SharedSurgerySystem RemCompDeferred(args.Body, accent); } - private void OnStepEmoteEffectComplete(Entity ent, ref SurgeryStepEvent args) - => _chat.TryEmoteWithChat(args.Body, ent.Comp.Emote); + // private void OnStepEmoteEffectComplete(Entity ent, ref SurgeryStepEvent args) + // => _chat.TryEmoteWithChat(args.Body, ent.Comp.Emote); private void OnStepSpawnComplete(Entity ent, ref SurgeryStepEvent args) { if (TryComp(args.Body, out TransformComponent? xform)) diff --git a/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs b/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs index 37b4d35aac..0f55c99e72 100644 --- a/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs +++ b/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs @@ -41,6 +41,7 @@ namespace Content.Shared.Movement.Pulling.Systems; public sealed class PullingSystem : EntitySystem { [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly MobStateSystem _mobState = default!; // Sunrise-edit [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; [Dependency] private readonly ActionBlockerSystem _blocker = default!; [Dependency] private readonly AlertsSystem _alertsSystem = default!; @@ -279,11 +280,8 @@ public sealed class PullingSystem : EntitySystem return; } // Sunrise-start - if (TryComp(component.Pulling, out var carriable)) - { + if (TryComp(component.Pulling, out var carriable) && !_mobState.IsAlive(component.Pulling.Value)) args.ModifySpeed(carriable.WalkSpeedModifier, carriable.SprintSpeedModifier); - _popup.PopupPredicted(Loc.GetString("can-carry"), uid, uid, PopupType.SmallCaution); - } // Sunrise-end args.ModifySpeed(component.WalkSpeedModifier, component.SprintSpeedModifier); diff --git a/Content.Shared/_Sunrise/Carrying/SharedCarryingSystem.cs b/Content.Shared/_Sunrise/Carrying/SharedCarryingSystem.cs index 2a77d79604..72ebb7fad5 100644 --- a/Content.Shared/_Sunrise/Carrying/SharedCarryingSystem.cs +++ b/Content.Shared/_Sunrise/Carrying/SharedCarryingSystem.cs @@ -64,7 +64,6 @@ public sealed class SharedCarryingSystem : EntitySystem SubscribeLocalEvent(OnVirtualItemDeleted); SubscribeLocalEvent(OnParentChanged); SubscribeLocalEvent(OnMobStateChanged); - SubscribeLocalEvent(OnDownAttempt); SubscribeLocalEvent(OnMoveAttempt); SubscribeLocalEvent(OnStandAttempt); @@ -226,13 +225,6 @@ public sealed class SharedCarryingSystem : EntitySystem DropCarried(uid, component.Carried); } - - private void OnDownAttempt(EntityUid uid, CarryingComponent comp, DownAttemptEvent args) - { - args.Cancel(); - } - - private void OnMoveAttempt(EntityUid uid, BeingCarriedComponent component, UpdateCanMoveEvent args) { args.Cancel(); diff --git a/Content.Shared/_Sunrise/Medical/Surgery/SharedSurgerySystem.BaseSteps.cs b/Content.Shared/_Sunrise/Medical/Surgery/SharedSurgerySystem.BaseSteps.cs index 421cadb327..753e066a26 100644 --- a/Content.Shared/_Sunrise/Medical/Surgery/SharedSurgerySystem.BaseSteps.cs +++ b/Content.Shared/_Sunrise/Medical/Surgery/SharedSurgerySystem.BaseSteps.cs @@ -11,6 +11,7 @@ using Content.Shared._Sunrise.Medical.Surgery.Steps; using Robust.Shared.Prototypes; using Robust.Shared.Random; using System.Linq; +using Content.Shared.Hands.Components; namespace Content.Shared._Sunrise.Medical.Surgery; // Based on the RMC14. @@ -179,6 +180,16 @@ public abstract partial class SharedSurgerySystem foreach (var reg in ent.Comp.Tools.Values) { var tool = args.Tools.FirstOrDefault(x => HasComp(x, reg.Component.GetType())); + + if (!TryComp(args.User, out var hands)) + return; + + if (!_hands.TryGetActiveItem(args.User, out var inhandItem) || inhandItem != tool) + { + args.Invalid = StepInvalidReason.NeedToolInhand; + return; + } + if (tool == default) { args.Invalid = StepInvalidReason.MissingTool; diff --git a/Content.Shared/_Sunrise/Medical/Surgery/StepInvalidReason.cs b/Content.Shared/_Sunrise/Medical/Surgery/StepInvalidReason.cs index f2c65291ea..cfc8e4dc98 100644 --- a/Content.Shared/_Sunrise/Medical/Surgery/StepInvalidReason.cs +++ b/Content.Shared/_Sunrise/Medical/Surgery/StepInvalidReason.cs @@ -9,4 +9,5 @@ public enum StepInvalidReason MissingTool, DisabledTool, TooHigh, + NeedToolInhand, } diff --git a/Resources/Locale/en-US/_strings/_sunrise/carrying/carry.ftl b/Resources/Locale/en-US/_strings/_sunrise/carrying/carry.ftl index a12f55070d..4626de9c32 100644 --- a/Resources/Locale/en-US/_strings/_sunrise/carrying/carry.ftl +++ b/Resources/Locale/en-US/_strings/_sunrise/carrying/carry.ftl @@ -1,5 +1,4 @@ carry-verb = Нести на руках -can-carry = Тяжело! Попробуйте отнести на руках (alt + ЛКМ). carry-lying-cancel = Попробуйте встать! carry-too-heavy = Вы недостаточно сильны. carry-started = { $carrier } начинает поднимать вас diff --git a/Resources/Locale/ru-RU/_strings/_sunrise/surgery/window.ftl b/Resources/Locale/ru-RU/_strings/_sunrise/surgery/window.ftl index 07f5a7f403..8df928abcd 100644 --- a/Resources/Locale/ru-RU/_strings/_sunrise/surgery/window.ftl +++ b/Resources/Locale/ru-RU/_strings/_sunrise/surgery/window.ftl @@ -6,6 +6,7 @@ surgery-window-reguires = [bold]Требует: { $surgeryname }[/bold] surgery-window-reguires-table = [color=red](Требует операционный стол)[/color] surgery-window-reguires-undress = [color=red](Снимите с него броню!)[/color] surgery-window-reguires-tool = [color=red](Отсутствует инструмент)[/color] +surgery-window-reguires-tool-inhand = [color=red](Отсутствует инструмент в активной руке!)[/color] surgery-window-reguires-laydown = [color=red][font size=16]Он должен лежать![/font][/color] surgery-window-reguires-enable = [color=red](Предмет выключен)[/color] surgery-window-too-high = [color=red](Слишком высокий)[/color] diff --git a/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml b/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml index f1d840551d..678ffc08bb 100644 --- a/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/glasses.yml @@ -296,7 +296,7 @@ startingItem: PowerCellSmall - type: ToggleCellDraw - type: PowerCellDraw - drawRate: 0 + drawRate: 3.5 useRate: 20 # Sunrise-End diff --git a/Resources/Prototypes/_Sunrise/Body/Prototypes/vulpkanin.yml b/Resources/Prototypes/_Sunrise/Body/Prototypes/vulpkanin.yml index 2340fc4412..fd4d59b5a4 100644 --- a/Resources/Prototypes/_Sunrise/Body/Prototypes/vulpkanin.yml +++ b/Resources/Prototypes/_Sunrise/Body/Prototypes/vulpkanin.yml @@ -1,6 +1,6 @@ - type: body - name: Vulpkanin id: Vulpkanin + name: "vulpkanin" root: torso slots: head: @@ -10,8 +10,15 @@ organs: brain: OrganHumanBrain eyes: OrganHumanEyes + tongue: OrganHumanTongue + eye_implant: null torso: part: TorsoVulpkanin + connections: + - right arm + - left arm + - right leg + - left leg organs: heart: OrganAnimalHeart lungs: OrganHumanLungs @@ -19,32 +26,27 @@ liver: OrganAnimalLiver kidneys: OrganHumanKidneys cavity: null - connections: - - right_arm - - left_arm - - right_leg - - left_leg - right_arm: + right arm: part: RightArmVulpkanin connections: - - right_hand - left_arm: + - right hand + left arm: part: LeftArmVulpkanin connections: - - left_hand - right_hand: + - left hand + right hand: part: RightHandVulpkanin - left_hand: + left hand: part: LeftHandVulpkanin - right_leg: + right leg: part: RightLegVulpkanin connections: - - right_foot - left_leg: + - right foot + left leg: part: LeftLegVulpkanin connections: - - left_foot - right_foot: + - left foot + right foot: part: RightFootVulpkanin - left_foot: + left foot: part: LeftFootVulpkanin diff --git a/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/glasses.yml b/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/glasses.yml index ab4f83e598..1c0872ccac 100644 --- a/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/glasses.yml +++ b/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/glasses.yml @@ -102,7 +102,7 @@ startingItem: PowerCellSmall - type: ToggleCellDraw - type: PowerCellDraw - drawRate: 0 + drawRate: 3.5 useRate: 20 - type: ComponentToggler parent: true diff --git a/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml b/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml index 33cbb9b407..83144f2605 100644 --- a/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml +++ b/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml @@ -40,7 +40,7 @@ quickEquip: true slots: [ Eyes ] - type: PowerCellDraw - drawRate: 0 + drawRate: 3.5 useRate: 20 - type: ItemToggle predictable: false # issues between ToggleCellDraw and ItemToggleActiveSound @@ -149,7 +149,7 @@ shader: unshaded map: [ "light" ] - type: PowerCellDraw - drawRate: 0 + drawRate: 5 useRate: 50 - type: ComponentToggler parent: true diff --git a/Resources/Prototypes/_Sunrise/Traits/quirks.yml b/Resources/Prototypes/_Sunrise/Traits/quirks.yml index e2193cc350..e69f4016c5 100644 --- a/Resources/Prototypes/_Sunrise/Traits/quirks.yml +++ b/Resources/Prototypes/_Sunrise/Traits/quirks.yml @@ -14,7 +14,7 @@ cost: 1 components: - type: RescaleSprite - scale: 1,1.1 + scale: 1.1,1.1 - type: trait id: ShortQuirk @@ -24,7 +24,7 @@ cost: 1 components: - type: RescaleSprite - scale: 1,0.9 + scale: 0.9,0.9 - type: trait id: FelinidVocal @@ -37,4 +37,4 @@ vocal: Male: MaleFelinid Female: FemaleFelinid - Unsexed: MaleFelinid + Unsexed: MaleFelinid \ No newline at end of file diff --git a/Resources/Textures/_Sunrise/Objects/Devices/handheld_wires_console.rsi/scanner.png b/Resources/Textures/_Sunrise/Objects/Devices/handheld_wires_console.rsi/scanner.png index 23b6c4a804..376855927c 100644 Binary files a/Resources/Textures/_Sunrise/Objects/Devices/handheld_wires_console.rsi/scanner.png and b/Resources/Textures/_Sunrise/Objects/Devices/handheld_wires_console.rsi/scanner.png differ