From f06bfc22ce6a0569080c00ad34e6e69f6a4d15eb Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Fri, 3 Dec 2021 11:15:12 +0100 Subject: [PATCH] Inline Description --- Content.Server/Atmos/Components/AtmosPlaqueComponent.cs | 3 ++- Content.Server/BarSign/Systems/BarSignSystem.cs | 2 +- Content.Server/Botany/Seed.cs | 3 ++- .../Chemistry/Components/TransformableContainerComponent.cs | 3 ++- .../Chemistry/EntitySystems/TransformableContainerSystem.cs | 4 ++-- Content.Server/Cuffs/Components/CuffableComponent.cs | 2 +- Content.Server/Light/Components/ExpendableLightComponent.cs | 3 ++- Content.Server/Paper/PaperComponent.cs | 3 ++- Content.Shared/Examine/ExamineSystemShared.cs | 4 ++-- 9 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Content.Server/Atmos/Components/AtmosPlaqueComponent.cs b/Content.Server/Atmos/Components/AtmosPlaqueComponent.cs index 4709f9712b..7723ed90cb 100644 --- a/Content.Server/Atmos/Components/AtmosPlaqueComponent.cs +++ b/Content.Server/Atmos/Components/AtmosPlaqueComponent.cs @@ -55,7 +55,7 @@ namespace Content.Server.Atmos.Components return; } - Owner.Description = _type switch + var val = _type switch { PlaqueType.Zumos => "This plaque commemorates the rise of the Atmos ZUM division. May they carry the torch that the Atmos ZAS, LINDA and FEA divisions left behind.", @@ -68,6 +68,7 @@ namespace Content.Server.Atmos.Components PlaqueType.Unset => "Uhm", _ => "Uhm", }; + IoCManager.Resolve().GetComponent(Owner.Uid).EntityDescription = val; Owner.Name = _type switch { diff --git a/Content.Server/BarSign/Systems/BarSignSystem.cs b/Content.Server/BarSign/Systems/BarSignSystem.cs index b46ed9d23f..99365b5d33 100644 --- a/Content.Server/BarSign/Systems/BarSignSystem.cs +++ b/Content.Server/BarSign/Systems/BarSignSystem.cs @@ -90,7 +90,7 @@ namespace Content.Server.BarSign.Systems component.Owner.Name = Loc.GetString("barsign-component-name"); } - component.Owner.Description = prototype.Description; + IoCManager.Resolve().GetComponent(component.Owner.Uid).EntityDescription = prototype.Description; } } } diff --git a/Content.Server/Botany/Seed.cs b/Content.Server/Botany/Seed.cs index 5e0545772d..b16ee1112e 100644 --- a/Content.Server/Botany/Seed.cs +++ b/Content.Server/Botany/Seed.cs @@ -342,7 +342,8 @@ namespace Content.Server.Botany if (Mysterious) { entity.Name += "?"; - entity.Description += " " + Loc.GetString("botany-mysterious-description-addon"); + string val = IoCManager.Resolve().GetComponent(entity.Uid).EntityDescription + (" " + Loc.GetString("botany-mysterious-description-addon")); + IoCManager.Resolve().GetComponent(entity.Uid).EntityDescription = val; } } diff --git a/Content.Server/Chemistry/Components/TransformableContainerComponent.cs b/Content.Server/Chemistry/Components/TransformableContainerComponent.cs index f4b506ed15..ecdc0c0ca2 100644 --- a/Content.Server/Chemistry/Components/TransformableContainerComponent.cs +++ b/Content.Server/Chemistry/Components/TransformableContainerComponent.cs @@ -2,6 +2,7 @@ using Content.Server.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.Reagent; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.IoC; using Robust.Shared.Utility; namespace Content.Server.Chemistry.Components @@ -29,7 +30,7 @@ namespace Content.Server.Chemistry.Components } InitialName = Owner.Name; - InitialDescription = Owner.Description; + InitialDescription = IoCManager.Resolve().GetComponent(Owner.Uid).EntityDescription; } protected override void Startup() diff --git a/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs b/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs index 6a277cb3fe..0c91156f24 100644 --- a/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs @@ -57,7 +57,7 @@ namespace Content.Server.Chemistry.EntitySystems } ownerEntity.Name = proto.Name + " glass"; - ownerEntity.Description = proto.Description; + IoCManager.Resolve().GetComponent(ownerEntity.Uid).EntityDescription = proto.Description; component.CurrentReagent = proto; component.Transformed = true; } @@ -75,7 +75,7 @@ namespace Content.Server.Chemistry.EntitySystems } component.Owner.Name = component.InitialName; - component.Owner.Description = component.InitialDescription; + IoCManager.Resolve().GetComponent(component.Owner.Uid).EntityDescription = component.InitialDescription; } } } diff --git a/Content.Server/Cuffs/Components/CuffableComponent.cs b/Content.Server/Cuffs/Components/CuffableComponent.cs index e84f169955..a8b7b95e7a 100644 --- a/Content.Server/Cuffs/Components/CuffableComponent.cs +++ b/Content.Server/Cuffs/Components/CuffableComponent.cs @@ -268,7 +268,7 @@ namespace Content.Server.Cuffs.Components cuff.Broken = true; cuffsToRemove.Name = cuff.BrokenName; - cuffsToRemove.Description = cuff.BrokenDesc; + IoCManager.Resolve().GetComponent(cuffsToRemove.Uid).EntityDescription = cuff.BrokenDesc; if (cuffsToRemove.TryGetComponent(out var sprite) && cuff.BrokenState != null) { diff --git a/Content.Server/Light/Components/ExpendableLightComponent.cs b/Content.Server/Light/Components/ExpendableLightComponent.cs index 7fbe58c860..70c1c60805 100644 --- a/Content.Server/Light/Components/ExpendableLightComponent.cs +++ b/Content.Server/Light/Components/ExpendableLightComponent.cs @@ -5,6 +5,7 @@ using Content.Shared.Light.Component; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.GameObjects; +using Robust.Shared.IoC; using Robust.Shared.Player; using Robust.Shared.ViewVariables; @@ -155,7 +156,7 @@ namespace Content.Server.Light.Components CurrentState = ExpendableLightState.Dead; Owner.Name = SpentName; - Owner.Description = SpentDesc; + IoCManager.Resolve().GetComponent(Owner.Uid).EntityDescription = SpentDesc; UpdateSpriteAndSounds(Activated); UpdateVisualizer(); diff --git a/Content.Server/Paper/PaperComponent.cs b/Content.Server/Paper/PaperComponent.cs index 35729d9c9b..cb62eb9497 100644 --- a/Content.Server/Paper/PaperComponent.cs +++ b/Content.Server/Paper/PaperComponent.cs @@ -6,6 +6,7 @@ using Content.Shared.Paper; using Content.Shared.Tag; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Utility; @@ -95,7 +96,7 @@ namespace Content.Server.Paper appearance.SetData(PaperVisuals.Status, PaperStatus.Written); } - Owner.Description = ""; + IoCManager.Resolve().GetComponent(Owner.Uid).EntityDescription = ""; UpdateUserInterface(); } diff --git a/Content.Shared/Examine/ExamineSystemShared.cs b/Content.Shared/Examine/ExamineSystemShared.cs index 436457623c..5298ddab19 100644 --- a/Content.Shared/Examine/ExamineSystemShared.cs +++ b/Content.Shared/Examine/ExamineSystemShared.cs @@ -212,9 +212,9 @@ namespace Content.Shared.Examine var doNewline = false; //Add an entity description if one is declared - if (!string.IsNullOrEmpty(entity.Description)) + if (!string.IsNullOrEmpty(IoCManager.Resolve().GetComponent(entity.Uid).EntityDescription)) { - message.AddText(entity.Description); + message.AddText(IoCManager.Resolve().GetComponent(entity.Uid).EntityDescription); doNewline = true; }