Localizable craftmenu (#32339)
* Now the name of the target craft items is taken directly from the prototypes * Deleting unnecessary fields * Deleting unnecessary fields * Added suffix field * Added override via localization keys * My favorite ItemList and TextureRect have been replaced with ListContainer and EntityPrototypeView * Fix suffix * Fix construction ghosts... maybe * Remove suffix from UI * Suffixes have been removed from prototypes * Added a description for the secret door * Fix search..? * The Icon field of ConstructionPrototype has been removed * StackPrototypes used in the construction menu have been localized * TagConstructionGraphStep used in the construction menu have been localized * The search bar has been localized * Fix localization and prototypes * Recipes are now only loaded when the crafting window is opened. * Fix crooked merge grid of the crafting menu. * Localization update * Fix cyborg graph * Revert "Recipes are now only loaded when the crafting window is opened." This reverts commit 97749483542c2d6272bda16edf49612c69a0761a. * Fix loc * fix merge * Fix upstream * Some of the logic has been moved to Shared * fix * Small adjustments * Very small change --------- Co-authored-by: EmoGarbage404 <retron404@gmail.com>
This commit is contained in:
@@ -5,24 +5,26 @@ namespace Content.Shared.Construction.Steps
|
||||
{
|
||||
public abstract partial class ArbitraryInsertConstructionGraphStep : EntityInsertConstructionGraphStep
|
||||
{
|
||||
[DataField("name")] public string Name { get; private set; } = string.Empty;
|
||||
[DataField] public LocId Name { get; private set; } = string.Empty;
|
||||
|
||||
[DataField("icon")] public SpriteSpecifier? Icon { get; private set; }
|
||||
[DataField] public SpriteSpecifier? Icon { get; private set; }
|
||||
|
||||
public override void DoExamine(ExaminedEvent examinedEvent)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Name))
|
||||
return;
|
||||
|
||||
examinedEvent.PushMarkup(Loc.GetString("construction-insert-arbitrary-entity", ("stepName", Name)));
|
||||
var stepName = Loc.GetString(Name);
|
||||
examinedEvent.PushMarkup(Loc.GetString("construction-insert-arbitrary-entity", ("stepName", stepName)));
|
||||
}
|
||||
|
||||
public override ConstructionGuideEntry GenerateGuideEntry()
|
||||
{
|
||||
var stepName = Loc.GetString(Name);
|
||||
return new ConstructionGuideEntry
|
||||
{
|
||||
Localization = "construction-presenter-arbitrary-step",
|
||||
Arguments = new (string, object)[]{("name", Name)},
|
||||
Arguments = new (string, object)[]{("name", stepName)},
|
||||
Icon = Icon,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user