From 3cf07dd8a462fed092147fe1a0b672af412f7ead Mon Sep 17 00:00:00 2001 From: Aviu00 Date: Fri, 19 Jan 2024 13:14:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=AF=20=D0=B5=D0=B1=D0=B0=D0=BB=20NetEntity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/HumanoidProfileEditor.xaml.cs | 1 - Content.Client/White/Radials/RadialSystem.cs | 8 ++-- .../White/Radials/RadialUIController.cs | 3 +- .../Controls/RadialButton.xaml.cs | 1 + .../Controls/RadialContainer.xaml.cs | 1 + .../Managers/ServerPreferencesManager.cs | 1 + .../CriminalRecordsServerSystem.cs | 4 +- Content.Server/White/Radials/RadialSystem.cs | 9 ++--- Content.Shared/White/Radials/Radial.cs | 2 +- Content.Shared/White/Radials/RadialEvents.cs | 14 +++---- .../Radials/Systems/SharedRadialSystem.cs | 6 +-- .../Entities/Mobs/Player/admin_ghost.yml | 2 + .../Entities/Objects/Misc/paper.yml | 39 ------------------- .../Entities/Objects/Misc/rubber_stamp.yml | 15 +++++++ .../Reagents/Consumable/Drink/drinks.yml | 12 ------ Resources/Prototypes/White/Actions/emotes.yml | 6 +-- .../Prototypes/White/Species/actions.yml | 4 +- 17 files changed, 48 insertions(+), 80 deletions(-) diff --git a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs index 60be5c84fe..0e327cd5ad 100644 --- a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs @@ -35,7 +35,6 @@ using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; using Robust.Shared.Utility; -using TerraFX.Interop.Windows; using static Robust.Client.UserInterface.Controls.BoxContainer; using Direction = Robust.Shared.Maths.Direction; diff --git a/Content.Client/White/Radials/RadialSystem.cs b/Content.Client/White/Radials/RadialSystem.cs index ed93b355c9..1886ef4a51 100644 --- a/Content.Client/White/Radials/RadialSystem.cs +++ b/Content.Client/White/Radials/RadialSystem.cs @@ -182,9 +182,9 @@ namespace Content.Client.White.Radials; public SortedSet GetRadials(EntityUid target, EntityUid user, List verbTypes, bool force = false) { - if (!target.IsClientSide()) + if (!IsClientSide(target)) { - RaiseNetworkEvent(new RequestServerRadialsEvent(target, verbTypes, adminRequest: force)); + RaiseNetworkEvent(new RequestServerRadialsEvent(GetNetEntity(target), verbTypes, adminRequest: force)); } // Some admin menu interactions will try get verbs for entities that have not yet been sent to the player. @@ -216,10 +216,10 @@ namespace Content.Client.White.Radials; return; } - if (radial.ClientExclusive || target.IsClientSide()) + if (radial.ClientExclusive || IsClientSide(target)) ExecuteRadial(radial, user.Value, target); else - EntityManager.RaisePredictiveEvent(new ExecuteRadialEvent(target, radial)); + EntityManager.RaisePredictiveEvent(new ExecuteRadialEvent(GetNetEntity(target), radial)); } private void HandleRadialsResponse(RadialsResponseEvent msg) diff --git a/Content.Client/White/Radials/RadialUIController.cs b/Content.Client/White/Radials/RadialUIController.cs index 21d2845535..2f76b4c7d0 100644 --- a/Content.Client/White/Radials/RadialUIController.cs +++ b/Content.Client/White/Radials/RadialUIController.cs @@ -22,6 +22,7 @@ public sealed class RadialUIController : UIController, IOnStateEntered radialsTypes = new(); foreach (var key in args.RadialTypes) @@ -59,7 +58,7 @@ public sealed class RadialSystem : SharedRadialSystem } var response = - new RadialsResponseEvent(args.EntityUid, GetLocalRadials(args.EntityUid, attached, radialsTypes, force)); + new RadialsResponseEvent(args.EntityUid, GetLocalRadials(GetEntity(args.EntityUid), attached, radialsTypes, force)); RaiseNetworkEvent(response, player.ConnectedClient); } diff --git a/Content.Shared/White/Radials/Radial.cs b/Content.Shared/White/Radials/Radial.cs index 9490dcb81c..8b17ac66f8 100644 --- a/Content.Shared/White/Radials/Radial.cs +++ b/Content.Shared/White/Radials/Radial.cs @@ -40,7 +40,7 @@ namespace Content.Shared.White.Radials; public int Priority; - public EntityUid? IconEntity; + public NetEntity? IconEntity; public bool? CloseMenu; diff --git a/Content.Shared/White/Radials/RadialEvents.cs b/Content.Shared/White/Radials/RadialEvents.cs index 1501b4b220..1212d248a9 100644 --- a/Content.Shared/White/Radials/RadialEvents.cs +++ b/Content.Shared/White/Radials/RadialEvents.cs @@ -11,15 +11,15 @@ namespace Content.Shared.White.Radials; [Serializable, NetSerializable] public sealed class RequestServerRadialsEvent : EntityEventArgs { - public readonly EntityUid EntityUid; + public readonly NetEntity EntityUid; public readonly List RadialTypes = new(); - public readonly EntityUid? SlotOwner; + public readonly NetEntity? SlotOwner; public readonly bool AdminRequest; - public RequestServerRadialsEvent(EntityUid entityUid, IEnumerable radialTypes, EntityUid? slotOwner = null, bool adminRequest = false) + public RequestServerRadialsEvent(NetEntity entityUid, IEnumerable radialTypes, NetEntity? slotOwner = null, bool adminRequest = false) { EntityUid = entityUid; SlotOwner = slotOwner; @@ -37,9 +37,9 @@ namespace Content.Shared.White.Radials; public sealed class RadialsResponseEvent : EntityEventArgs { public readonly List? Radials; - public readonly EntityUid Entity; + public readonly NetEntity Entity; - public RadialsResponseEvent(EntityUid entity, SortedSet? radials) + public RadialsResponseEvent(NetEntity entity, SortedSet? radials) { Entity = entity; @@ -53,10 +53,10 @@ namespace Content.Shared.White.Radials; [Serializable, NetSerializable] public sealed class ExecuteRadialEvent : EntityEventArgs { - public readonly EntityUid Target; + public readonly NetEntity Target; public readonly Radial RequestedRadial; - public ExecuteRadialEvent(EntityUid target, Radial requestedRadial) + public ExecuteRadialEvent(NetEntity target, Radial requestedRadial) { Target = target; RequestedRadial = requestedRadial; diff --git a/Content.Shared/White/Radials/Systems/SharedRadialSystem.cs b/Content.Shared/White/Radials/Systems/SharedRadialSystem.cs index 3067ee79b8..db7d5726eb 100644 --- a/Content.Shared/White/Radials/Systems/SharedRadialSystem.cs +++ b/Content.Shared/White/Radials/Systems/SharedRadialSystem.cs @@ -25,13 +25,13 @@ public abstract class SharedRadialSystem : EntitySystem if (user == null) return; - if (Deleted(args.Target) || Deleted(user)) + if (Deleted(GetEntity(args.Target)) || Deleted(user)) return; - var radials = GetLocalRadials(args.Target, user.Value, args.RequestedRadial.GetType()); + var radials = GetLocalRadials(GetEntity(args.Target), user.Value, args.RequestedRadial.GetType()); if (radials.TryGetValue(args.RequestedRadial, out var radial)) - ExecuteRadial(radial, user.Value, args.Target); + ExecuteRadial(radial, user.Value, GetEntity(args.Target)); } /// diff --git a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml index 12e64c6d0c..c80d804d38 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml @@ -85,6 +85,8 @@ - type: IgnoreUIRange - type: ShowSecurityIcons - type: ShowHealthIcons + damageContainers: + - Biological - type: ShowWhiteHealthBars - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/Entities/Objects/Misc/paper.yml index 0f6b0df5dd..1b5fc024b4 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/paper.yml @@ -557,45 +557,6 @@ name: centcom clipboard description: A luxurious clipboard upholstered with green velvet. Often seen carried by CentCom officials, seldom seen actually used. -- type: entity - name: lawyer's rubber stamp - parent: BaseItem - id: RubberStampLawyer - description: A rubber stamp for stamping important documents. - components: - - type: Stamp - stampedName: stamp-component-stamped-name-lawyer - stampState: "paper_stamp-lawyer" - - type: Sprite - sprite: Objects/Misc/bureaucracy.rsi - state: stamp-lawyer - - type: Item - size: Small - -- type: entity - name: captain's rubber stamp - parent: RubberStampMime - id: RubberStampCaptain - components: - - type: Sprite - sprite: Objects/Misc/cc-clipboard.rsi - layers: - - state: clipboard - - state: clipboard_paper - map: ["clipboard_paper"] - visible: false - - state: clipboard_pen - map: ["clipboard_pen"] - visible: false - - state: clipboard_over - - type: Item - sprite: Objects/Misc/cc-clipboard.rsi - size: Small - - type: Clothing - slots: [belt] - quickEquip: false - sprite: Objects/Misc/cc-clipboard.rsi - - type: entity id: BoxFolderQmClipboard parent: BoxFolderBase diff --git a/Resources/Prototypes/Entities/Objects/Misc/rubber_stamp.yml b/Resources/Prototypes/Entities/Objects/Misc/rubber_stamp.yml index 662b0dd629..acdd41adbb 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/rubber_stamp.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/rubber_stamp.yml @@ -245,3 +245,18 @@ stampState: "paper_stamp-deny" - type: Sprite state: stamp-deny + +- type: entity + name: lawyer's rubber stamp + parent: RubberStampBase + id: RubberStampLawyer + suffix: DO NOT MAP + description: A rubber stamp for stamping important documents. + components: + - type: Stamp + stampedName: stamp-component-stamped-name-lawyer + stampedColor: "#a23e3e" + stampState: "paper_stamp-lawyer" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-lawyer diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml index 463c9e489f..0e3d1ff26d 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml @@ -425,18 +425,6 @@ sprite: Objects/Consumable/Drinks/rewriter.rsi state: icon -- type: reagent - id: TheMartinez - name: reagent-name-the-martinez - parent: BaseDrink - desc: reagent-desc-the-martinez - physicalDesc: reagent-physical-desc-vibrant - flavor: themartinez - color: "#75b1f0" - metamorphicSprite: - sprite: Objects/Consumable/Drinks/the_martinez.rsi - state: icon - - type: reagent id: Kvass name: reagent-name-kvass diff --git a/Resources/Prototypes/White/Actions/emotes.yml b/Resources/Prototypes/White/Actions/emotes.yml index ddcfb3760f..9ab52fc333 100644 --- a/Resources/Prototypes/White/Actions/emotes.yml +++ b/Resources/Prototypes/White/Actions/emotes.yml @@ -3,7 +3,7 @@ id: EmoteActionFlip name: emote-flip-action-name description: emote-flip-action-description - nospawn: true + noSpawn: true components: - type: InstantAction icon: White/Actions/EmoteFlip.png @@ -15,7 +15,7 @@ id: EmoteActionJump name: emote-jump-action-name description: emote-jump-action-description - nospawn: true + noSpawn: true components: - type: InstantAction icon: White/Actions/EmoteJump.png @@ -27,7 +27,7 @@ id: EmoteActionTurn name: emote-turn-action-name description: emote-turn-action-description - nospawn: true + noSpawn: true components: - type: InstantAction icon: White/Actions/EmoteTurn.png diff --git a/Resources/Prototypes/White/Species/actions.yml b/Resources/Prototypes/White/Species/actions.yml index 28ef9d91b7..8a305c922e 100644 --- a/Resources/Prototypes/White/Species/actions.yml +++ b/Resources/Prototypes/White/Species/actions.yml @@ -2,7 +2,7 @@ id: EatMouse name: Eat mouse description: Eat the mouse in your hand, receiving nutrients and a hairball charge. - nospawn: true + noSpawn: true components: - type: InstantAction icon: White/Icons/verbiconfangs.png @@ -12,7 +12,7 @@ id: HairballAction name: Cough up a hairball. description: People don't like that. - nospawn: true + noSpawn: true components: - type: InstantAction icon: