Фиксы апстрима (#2596)
Co-authored-by: Vigers Ray <60344369+VigersRay@users.noreply.github.com>
This commit is contained in:
parent
3d83063b52
commit
562e73b2c2
14 changed files with 54 additions and 41 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public sealed partial class SurgerySystem : SharedSurgerySystem
|
|||
{
|
||||
SubscribeLocalEvent<SurgeryStepBleedEffectComponent, SurgeryStepEvent>(OnStepBleedComplete);
|
||||
SubscribeLocalEvent<SurgeryClampBleedEffectComponent, SurgeryStepEvent>(OnStepClampBleedComplete);
|
||||
SubscribeLocalEvent<SurgeryStepEmoteEffectComponent, SurgeryStepEvent>(OnStepEmoteEffectComplete);
|
||||
// SubscribeLocalEvent<SurgeryStepEmoteEffectComponent, SurgeryStepEvent>(OnStepEmoteEffectComplete);
|
||||
SubscribeLocalEvent<SurgeryStepSpawnEffectComponent, SurgeryStepEvent>(OnStepSpawnComplete);
|
||||
|
||||
SubscribeLocalEvent<SurgeryStepOrganExtractComponent, SurgeryStepEvent>(OnStepOrganExtractComplete);
|
||||
|
|
@ -135,8 +135,8 @@ public sealed partial class SurgerySystem : SharedSurgerySystem
|
|||
RemCompDeferred(args.Body, accent);
|
||||
}
|
||||
|
||||
private void OnStepEmoteEffectComplete(Entity<SurgeryStepEmoteEffectComponent> ent, ref SurgeryStepEvent args)
|
||||
=> _chat.TryEmoteWithChat(args.Body, ent.Comp.Emote);
|
||||
// private void OnStepEmoteEffectComplete(Entity<SurgeryStepEmoteEffectComponent> ent, ref SurgeryStepEvent args)
|
||||
// => _chat.TryEmoteWithChat(args.Body, ent.Comp.Emote);
|
||||
private void OnStepSpawnComplete(Entity<SurgeryStepSpawnEffectComponent> ent, ref SurgeryStepEvent args)
|
||||
{
|
||||
if (TryComp(args.Body, out TransformComponent? xform))
|
||||
|
|
|
|||
|
|
@ -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<CarriableComponent>(component.Pulling, out var carriable))
|
||||
{
|
||||
if (TryComp<CarriableComponent>(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);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ public sealed class SharedCarryingSystem : EntitySystem
|
|||
SubscribeLocalEvent<CarryingComponent, VirtualItemDeletedEvent>(OnVirtualItemDeleted);
|
||||
SubscribeLocalEvent<CarryingComponent, EntParentChangedMessage>(OnParentChanged);
|
||||
SubscribeLocalEvent<CarryingComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||
SubscribeLocalEvent<CarryingComponent, DownAttemptEvent>(OnDownAttempt);
|
||||
|
||||
SubscribeLocalEvent<BeingCarriedComponent, UpdateCanMoveEvent>(OnMoveAttempt);
|
||||
SubscribeLocalEvent<BeingCarriedComponent, StandAttemptEvent>(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();
|
||||
|
|
|
|||
|
|
@ -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<HandsComponent>(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;
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@ public enum StepInvalidReason
|
|||
MissingTool,
|
||||
DisabledTool,
|
||||
TooHigh,
|
||||
NeedToolInhand,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
carry-verb = Нести на руках
|
||||
can-carry = Тяжело! Попробуйте отнести на руках (alt + ЛКМ).
|
||||
carry-lying-cancel = Попробуйте встать!
|
||||
carry-too-heavy = Вы недостаточно сильны.
|
||||
carry-started = { $carrier } начинает поднимать вас
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@
|
|||
startingItem: PowerCellSmall
|
||||
- type: ToggleCellDraw
|
||||
- type: PowerCellDraw
|
||||
drawRate: 0
|
||||
drawRate: 3.5
|
||||
useRate: 20
|
||||
# Sunrise-End
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
startingItem: PowerCellSmall
|
||||
- type: ToggleCellDraw
|
||||
- type: PowerCellDraw
|
||||
drawRate: 0
|
||||
drawRate: 3.5
|
||||
useRate: 20
|
||||
- type: ComponentToggler
|
||||
parent: true
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 178 B |
Loading…
Add table
Reference in a new issue