Inline Description
This commit is contained in:
@@ -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<IEntityManager>().GetComponent<MetaDataComponent>(Owner.Uid).EntityDescription = val;
|
||||
|
||||
Owner.Name = _type switch
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.BarSign.Systems
|
||||
component.Owner.Name = Loc.GetString("barsign-component-name");
|
||||
}
|
||||
|
||||
component.Owner.Description = prototype.Description;
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(component.Owner.Uid).EntityDescription = prototype.Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,8 @@ namespace Content.Server.Botany
|
||||
if (Mysterious)
|
||||
{
|
||||
entity.Name += "?";
|
||||
entity.Description += " " + Loc.GetString("botany-mysterious-description-addon");
|
||||
string val = IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityDescription + (" " + Loc.GetString("botany-mysterious-description-addon"));
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityDescription = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<IEntityManager>().GetComponent<MetaDataComponent>(Owner.Uid).EntityDescription;
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
}
|
||||
|
||||
ownerEntity.Name = proto.Name + " glass";
|
||||
ownerEntity.Description = proto.Description;
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(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<IEntityManager>().GetComponent<MetaDataComponent>(component.Owner.Uid).EntityDescription = component.InitialDescription;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace Content.Server.Cuffs.Components
|
||||
cuff.Broken = true;
|
||||
|
||||
cuffsToRemove.Name = cuff.BrokenName;
|
||||
cuffsToRemove.Description = cuff.BrokenDesc;
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(cuffsToRemove.Uid).EntityDescription = cuff.BrokenDesc;
|
||||
|
||||
if (cuffsToRemove.TryGetComponent<SpriteComponent>(out var sprite) && cuff.BrokenState != null)
|
||||
{
|
||||
|
||||
@@ -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<IEntityManager>().GetComponent<MetaDataComponent>(Owner.Uid).EntityDescription = SpentDesc;
|
||||
|
||||
UpdateSpriteAndSounds(Activated);
|
||||
UpdateVisualizer();
|
||||
|
||||
@@ -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<IEntityManager>().GetComponent<MetaDataComponent>(Owner.Uid).EntityDescription = "";
|
||||
UpdateUserInterface();
|
||||
}
|
||||
|
||||
|
||||
@@ -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<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityDescription))
|
||||
{
|
||||
message.AddText(entity.Description);
|
||||
message.AddText(IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityDescription);
|
||||
doNewline = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user