ConstructionGL2 Part 2: Better guided steps and recipes. (#5103)

This commit is contained in:
Vera Aguilera Puerto
2021-11-02 11:24:32 +01:00
committed by GitHub
parent 5be8271907
commit 5a5006e4cf
45 changed files with 725 additions and 210 deletions

View File

@@ -1,10 +1,13 @@
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Threading.Tasks;
using Content.Shared.Construction;
using Content.Shared.Examine;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Physics;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Utility;
namespace Content.Server.Construction.Conditions
{
@@ -27,14 +30,25 @@ namespace Content.Server.Construction.Conditions
switch (Anchored)
{
case true when !entity.Transform.Anchored:
args.PushMarkup("First, anchor it.");
args.PushMarkup(Loc.GetString("construction-examine-condition-entity-anchored"));
return true;
case false when entity.Transform.Anchored:
args.PushMarkup("First, unanchor it.");
args.PushMarkup(Loc.GetString("construction-examine-condition-entity-unanchored"));
return true;
}
return false;
}
public IEnumerable<ConstructionGuideEntry> GenerateGuideEntry()
{
yield return new ConstructionGuideEntry()
{
Localization = Anchored
? "construction-step-condition-entity-anchored"
: "construction-step-condition-entity-unanchored",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Tools/wrench.rsi"), "icon"),
};
}
}
}