Revert "Revert "Replace ResourcePath with ResPath (#15308)" (#155… (#15566)

This commit is contained in:
metalgearsloth
2023-04-20 20:16:01 +10:00
committed by GitHub
parent 0c38a6db8d
commit ae01618874
125 changed files with 279 additions and 276 deletions

View File

@@ -272,7 +272,7 @@ namespace Content.Client.Actions
if (PlayerActions == null)
return;
var file = new ResourcePath(path).ToRootedPath();
var file = new ResPath(path).ToRootedPath();
TextReader reader = userData
? _resources.UserData.OpenText(file)
: _resources.ContentFileReadText(file);

View File

@@ -30,7 +30,7 @@ public sealed class UploadFile : IConsoleCommand
return;
}
var path = new ResourcePath(args[0]).ToRelativePath();
var path = new ResPath(args[0]).ToRelativePath();
var dialog = IoCManager.Resolve<IFileDialogManager>();

View File

@@ -15,7 +15,7 @@ public sealed class UploadFolder : IConsoleCommand
public string Description => Loc.GetString("uploadfolder-command-description");
public string Help => Loc.GetString("uploadfolder-command-help");
private static readonly ResourcePath BaseUploadFolderPath = new("/UploadFolder");
private static readonly ResPath BaseUploadFolderPath = new("/UploadFolder");
[Dependency] private IResourceManager _resourceManager = default!;
[Dependency] private IConfigurationManager _configManager = default!;
@@ -37,7 +37,7 @@ public sealed class UploadFolder : IConsoleCommand
shell.WriteLine( Loc.GetString("uploadfolder-command-help"));
return;
}
var folderPath = new ResourcePath(BaseUploadFolderPath + $"/{args[0]}");
var folderPath = new ResPath(BaseUploadFolderPath + $"/{args[0]}");
if (!_resourceManager.UserData.Exists(folderPath.ToRootedPath()))
{
@@ -63,7 +63,7 @@ public sealed class UploadFolder : IConsoleCommand
var netManager = IoCManager.Resolve<INetManager>();
var msg = netManager.CreateNetMessage<NetworkResourceUploadMessage>();
msg.RelativePath = new ResourcePath($"{filepath.ToString().Remove(0,14)}"); //removes /UploadFolder/ from path
msg.RelativePath = new ResPath($"{filepath.ToString().Remove(0,14)}"); //removes /UploadFolder/ from path
msg.Data = data;
netManager.ClientSendMessage(msg);

View File

@@ -72,7 +72,7 @@ namespace Content.Client.Administration.Managers
_netMgr.RegisterNetMessage<MsgUpdateAdminStatus>(UpdateMessageRx);
// Load flags for engine commands, since those don't have the attributes.
if (_res.TryContentFileRead(new ResourcePath("/clientCommandPerms.yml"), out var efs))
if (_res.TryContentFileRead(new ResPath("/clientCommandPerms.yml"), out var efs))
{
_localCommandPermissions.LoadPermissionsFromStream(efs);
}

View File

@@ -27,7 +27,7 @@ namespace Content.Client.Administration.Systems
Verb verb = new();
verb.Category = VerbCategory.Debug;
verb.Text = "View Variables";
verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/vv.svg.192dpi.png"));
verb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/vv.svg.192dpi.png"));
verb.Act = () => _clientConsoleHost.ExecuteCommand($"vv {args.Target}");
verb.ClientExclusive = true; // opening VV window is client-side. Don't ask server to run this verb.
args.Verbs.Add(verb);

View File

@@ -33,7 +33,7 @@ public sealed class KillSignSystem : EntitySystem
var adj = sprite.Bounds.Height / 2 + ((1.0f/32) * 6.0f);
var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/killsign.rsi"), "sign"));
var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResPath("Objects/Misc/killsign.rsi"), "sign"));
sprite.LayerMapSet(KillSignKey.Key, layer);
sprite.LayerSetOffset(layer, new Vector2(0.0f, adj));

View File

@@ -28,7 +28,7 @@ namespace Content.Client.AirlockPainter
continue;
}
RSIResource doorRsi = _resourceCache.GetResource<RSIResource>(TextureRoot / new ResourcePath(iconPath));
RSIResource doorRsi = _resourceCache.GetResource<RSIResource>(TextureRoot / new ResPath(iconPath));
if (!doorRsi.RSI.TryGetState("closed", out var icon))
{
Entries.Add(new AirlockPainterEntry(style, null));

View File

@@ -30,7 +30,7 @@ public sealed class FliesSystem : EntitySystem
if (sprite.LayerMapTryGet(FliesKey.Key, out var _))
return;
var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/flies.rsi"), "flies"));
var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ("Objects/Misc/flies.rsi"), "flies"));
sprite.LayerMapSet(FliesKey.Key, layer);
}

View File

@@ -62,9 +62,9 @@ namespace Content.Client.Atmos.Overlays
SpriteSpecifier overlay;
if (!string.IsNullOrEmpty(gasPrototype.GasOverlaySprite) && !string.IsNullOrEmpty(gasPrototype.GasOverlayState))
overlay = new SpriteSpecifier.Rsi(new ResourcePath(gasPrototype.GasOverlaySprite), gasPrototype.GasOverlayState);
overlay = new SpriteSpecifier.Rsi(new (gasPrototype.GasOverlaySprite), gasPrototype.GasOverlayState);
else if (!string.IsNullOrEmpty(gasPrototype.GasOverlayTexture))
overlay = new SpriteSpecifier.Texture(new ResourcePath(gasPrototype.GasOverlayTexture));
overlay = new SpriteSpecifier.Texture(new (gasPrototype.GasOverlayTexture));
else
continue;

View File

@@ -205,7 +205,7 @@ namespace Content.Client.Audio
string key;
if (ambientComp.Sound is SoundPathSpecifier path)
key = path.Path?.ToString() ?? string.Empty;
key = path.Path.ToString();
else
key = ((SoundCollectionSpecifier) ambientComp.Sound).Collection ?? string.Empty;

View File

@@ -43,7 +43,7 @@ namespace Content.Client.Changelog
NewChangelogEntries = false;
NewChangelogEntriesChanged?.Invoke();
using var sw = _resource.UserData.OpenWriteText(new ResourcePath($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}"));
using var sw = _resource.UserData.OpenWriteText(new ($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}"));
sw.Write(MaxId.ToString());
}
@@ -60,7 +60,7 @@ namespace Content.Client.Changelog
MaxId = changelog.Max(c => c.Id);
var path = new ResourcePath($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}");
var path = new ResPath($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}");
if(_resource.UserData.TryReadAllText(path, out var lastReadIdText))
{
LastReadId = int.Parse(lastReadIdText);
@@ -75,7 +75,7 @@ namespace Content.Client.Changelog
{
return Task.Run(() =>
{
var yamlData = _resource.ContentFileReadYaml(new ResourcePath("/Changelog/Changelog.yml"));
var yamlData = _resource.ContentFileReadYaml(new ("/Changelog/Changelog.yml"));
if (yamlData.Documents.Count == 0)
return new List<ChangelogEntry>();

View File

@@ -182,7 +182,7 @@ namespace Content.Client.Changelog
return new TextureRect
{
Texture = _resourceCache.GetTexture(new ResourcePath($"/Textures/Interface/Changelog/{file}")),
Texture = _resourceCache.GetTexture(new ResPath($"/Textures/Interface/Changelog/{file}")),
VerticalAlignment = VAlignment.Top,
TextureScale = (0.5f, 0.5f),
Margin = new Thickness(2, 4, 6, 2),

View File

@@ -38,7 +38,7 @@ namespace Content.Client.Chemistry.UI
// Pill type selection buttons, in total there are 20 pills.
// Pill rsi file should have states named as pill1, pill2, and so on.
var resourcePath = new ResourcePath(PillsRsiPath);
var resourcePath = new ResPath(PillsRsiPath);
var pillTypeGroup = new ButtonGroup();
PillTypeButtons = new Button[20];
for (uint i = 0; i < PillTypeButtons.Length; i++)

View File

@@ -103,7 +103,7 @@ namespace Content.Client.Credits
private IEnumerable<PatronEntry> LoadPatrons()
{
var yamlStream = _resourceManager.ContentFileReadYaml(new ResourcePath("/Credits/Patrons.yml"));
var yamlStream = _resourceManager.ContentFileReadYaml(new ("/Credits/Patrons.yml"));
var sequence = (YamlSequenceNode) yamlStream.Documents[0].RootNode;
return sequence

View File

@@ -121,7 +121,7 @@ public sealed partial class CrewManifestUi : DefaultWindow
AddChild(gridContainer);
var path = new ResourcePath("/Textures/Interface/Misc/job_icons.rsi");
var path = new ResPath("/Textures/Interface/Misc/job_icons.rsi");
cache.TryGetResource(path, out RSIResource? rsi);
foreach (var entry in entries)

View File

@@ -328,7 +328,7 @@ public sealed class DamageVisualsSystem : VisualizerSystem<DamageVisualsComponen
{
var newLayer = spriteComponent.AddLayer(
new SpriteSpecifier.Rsi(
new ResourcePath(sprite.Sprite), state
new (sprite.Sprite), state
), index);
spriteComponent.LayerMapSet(mapKey, newLayer);
if (sprite.Color != null)
@@ -461,7 +461,7 @@ public sealed class DamageVisualsSystem : VisualizerSystem<DamageVisualsComponen
threshold = damageVisComp.Thresholds[1];
spriteLayer = spriteComponent.AddLayer(
new SpriteSpecifier.Rsi(
new ResourcePath(sprite.Sprite),
new (sprite.Sprite),
$"{statePrefix}_{threshold}"
),
spriteLayer);

View File

@@ -35,7 +35,7 @@ public sealed class DoAfterOverlay : Overlay
_timing = timing;
_transform = _entManager.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
_meta = _entManager.EntitySysManager.GetEntitySystem<MetaDataSystem>();
var sprite = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/progress_bar.rsi"), "icon");
var sprite = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/progress_bar.rsi"), "icon");
_barTexture = _entManager.EntitySysManager.GetEntitySystem<SpriteSystem>().Frame0(sprite);
_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();

View File

@@ -117,7 +117,7 @@ namespace Content.Client.Examine
// Center it on the entity if they use the verb instead.
verb.Act = () => DoExamine(args.Target, false);
verb.Text = Loc.GetString("examine-verb-name");
verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png"));
verb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/examine.svg.192dpi.png"));
verb.ShowOnExamineTooltip = false;
verb.ClientExclusive = true;
args.Verbs.Add(verb);

View File

@@ -13,7 +13,7 @@ namespace Content.Client.Ghost
public InstantAction ToggleLightingAction = new()
{
Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/VerbIcons/light.svg.192dpi.png")),
Icon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/light.svg.192dpi.png")),
DisplayName = "ghost-gui-toggle-lighting-manager-name",
Description = "ghost-gui-toggle-lighting-manager-desc",
UserPopup = "ghost-gui-toggle-lighting-manager-popup",
@@ -24,7 +24,7 @@ namespace Content.Client.Ghost
public InstantAction ToggleFoVAction = new()
{
Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/VerbIcons/vv.svg.192dpi.png")),
Icon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/vv.svg.192dpi.png")),
DisplayName = "ghost-gui-toggle-fov-name",
Description = "ghost-gui-toggle-fov-desc",
UserPopup = "ghost-gui-toggle-fov-popup",
@@ -35,7 +35,7 @@ namespace Content.Client.Ghost
public InstantAction ToggleGhostsAction = new()
{
Icon = new SpriteSpecifier.Rsi(new ResourcePath("Mobs/Ghosts/ghost_human.rsi"), "icon"),
Icon = new SpriteSpecifier.Rsi(new ("Mobs/Ghosts/ghost_human.rsi"), "icon"),
DisplayName = "ghost-gui-toggle-ghost-visibility-name",
Description = "ghost-gui-toggle-ghost-visibility-desc",
UserPopup = "ghost-gui-toggle-ghost-visibility-popup",

View File

@@ -10,7 +10,7 @@ public class GuideEntry
/// <summary>
/// The file containing the contents of this guide.
/// </summary>
[DataField("text", required: true)] public ResourcePath Text = default!;
[DataField("text", required: true)] public ResPath Text = default!;
/// <summary>
/// The unique id for this guide.

View File

@@ -49,7 +49,7 @@ public sealed class GuidebookSystem : EntitySystem
args.Verbs.Add(new()
{
Text = Loc.GetString("guide-help-verb"),
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
Act = () => OnGuidebookOpen?.Invoke(component.Guides, null, null, component.IncludeChildren, component.Guides[0]),
ClientExclusive = true,
CloseMenu = true

View File

@@ -231,7 +231,7 @@ namespace Content.Client.LateJoin
Stretch = TextureRect.StretchMode.KeepCentered
};
var specifier = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/job_icons.rsi"), prototype.Icon);
var specifier = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/job_icons.rsi"), prototype.Icon);
icon.Texture = _sprites.Frame0(specifier);
jobSelector.AddChild(icon);
@@ -262,7 +262,7 @@ namespace Content.Client.LateJoin
{
TextureScale = (0.4f, 0.4f),
Stretch = TextureRect.StretchMode.KeepCentered,
Texture = _sprites.Frame0(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Nano/lock.svg.192dpi.png"))),
Texture = _sprites.Frame0(new SpriteSpecifier.Texture(new ("/Textures/Interface/Nano/lock.svg.192dpi.png"))),
HorizontalExpand = true,
HorizontalAlignment = HAlignment.Right,
});

View File

@@ -17,12 +17,12 @@ public sealed partial class MappingSystem : EntitySystem
/// <summary>
/// The icon to use for space tiles.
/// </summary>
private readonly SpriteSpecifier _spaceIcon = new SpriteSpecifier.Texture(new ResourcePath("Tiles/cropped_parallax.png"));
private readonly SpriteSpecifier _spaceIcon = new SpriteSpecifier.Texture(new ("Tiles/cropped_parallax.png"));
/// <summary>
/// The icon to use for entity-eraser.
/// </summary>
private readonly SpriteSpecifier _deleteIcon = new SpriteSpecifier.Texture(new ResourcePath("Interface/VerbIcons/delete.svg.192dpi.png"));
private readonly SpriteSpecifier _deleteIcon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/delete.svg.192dpi.png"));
public string DefaultMappingActions = "/mapping_actions.yml";
@@ -80,7 +80,7 @@ public sealed partial class MappingSystem : EntitySystem
var tileIcon = contentTileDef.IsSpace
? _spaceIcon
: new SpriteSpecifier.Texture(contentTileDef.Sprite!);
: new SpriteSpecifier.Texture(contentTileDef.Sprite!.Value);
ev.Action = new InstantAction()
{

View File

@@ -28,11 +28,11 @@ namespace Content.Client.PDA
ViewContainer.OnChildAdded += control => control.Visible = false;
HomeButton.IconTexture = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/home.png"));
FlashLightToggleButton.IconTexture = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/light.png"));
EjectPenButton.IconTexture = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/pencil.png"));
EjectIdButton.IconTexture = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/eject.png"));
ProgramCloseButton.IconTexture = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Nano/cross.svg.png"));
HomeButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/home.png"));
FlashLightToggleButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/light.png"));
EjectPenButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/pencil.png"));
EjectIdButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/eject.png"));
ProgramCloseButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/Nano/cross.svg.png"));
HomeButton.OnPressed += _ => ToHomeScreen();

View File

@@ -23,7 +23,7 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource
/// In client resources.
/// </summary>
[DataField("configPath")]
public ResourcePath ParallaxConfigPath { get; } = new("/parallax_config.toml");
public ResPath ParallaxConfigPath { get; } = new("/parallax_config.toml");
/// <summary>
/// ID for debugging, caching, and so forth.
@@ -37,13 +37,13 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource
/// Cached path.
/// In user directory.
/// </summary>
private ResourcePath ParallaxCachedImagePath => new($"/parallax_{Identifier}cache.png");
private ResPath ParallaxCachedImagePath => new($"/parallax_{Identifier}cache.png");
/// <summary>
/// Old parallax config path (for checking for parallax updates).
/// In user directory.
/// </summary>
private ResourcePath PreviousParallaxConfigPath => new($"/parallax_{Identifier}config_old");
private ResPath PreviousParallaxConfigPath => new($"/parallax_{Identifier}config_old");
async Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel)
{
@@ -113,7 +113,7 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource
for (var i = 0; i < debugImages!.Count; i++)
{
var debugImage = debugImages[i];
using var debugImageStream = StaticIoC.ResC.UserData.OpenWrite(new ResourcePath($"/parallax_{Identifier}debug_{i}.png"));
using var debugImageStream = StaticIoC.ResC.UserData.OpenWrite(new ResPath($"/parallax_{Identifier}debug_{i}.png"));
debugImage.SaveAsPng(debugImageStream);
}
}

View File

@@ -16,7 +16,7 @@ public sealed class ImageParallaxTextureSource : IParallaxTextureSource
/// Texture path.
/// </summary>
[DataField("path", required: true)]
public ResourcePath Path { get; } = default!;
public ResPath Path { get; } = default!;
Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel)
{

View File

@@ -55,7 +55,7 @@ public sealed class PointingSystem : SharedPointingSystem
Verb verb = new()
{
Text = Loc.GetString("pointing-verb-get-data-text"),
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/point.svg.192dpi.png")),
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/point.svg.192dpi.png")),
ClientExclusive = true,
Act = () => RaiseNetworkEvent(new PointingAttemptEvent(args.Target))
};

View File

@@ -53,7 +53,7 @@ namespace Content.Client.Preferences.UI
private readonly IEntityManager _entMan;
private readonly IConfigurationManager _configurationManager;
private readonly MarkingManager _markingManager;
private LineEdit _ageEdit => CAgeEdit;
private LineEdit _nameEdit => CNameEdit;
private LineEdit _flavorTextEdit = null!;
@@ -1060,7 +1060,7 @@ namespace Content.Client.Preferences.UI
{
return;
}
// facial hair color
Color? facialHairColor = null;
if ( Profile.Appearance.FacialHairStyleId != HairStyles.DefaultFacialHairStyle &&
@@ -1213,7 +1213,7 @@ namespace Content.Client.Preferences.UI
if (job.Icon != null)
{
var specifier = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/job_icons.rsi"),
var specifier = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/job_icons.rsi"),
job.Icon);
icon.Texture = specifier.Frame0();
}

View File

@@ -8,27 +8,27 @@ namespace Content.Client.Resources
[PublicAPI]
public static class ResourceCacheExtensions
{
public static Texture GetTexture(this IResourceCache cache, ResourcePath path)
public static Texture GetTexture(this IResourceCache cache, ResPath path)
{
return cache.GetResource<TextureResource>(path);
}
public static Texture GetTexture(this IResourceCache cache, string path)
{
return GetTexture(cache, new ResourcePath(path));
return GetTexture(cache, new ResPath(path));
}
public static Font GetFont(this IResourceCache cache, ResourcePath path, int size)
public static Font GetFont(this IResourceCache cache, ResPath path, int size)
{
return new VectorFont(cache.GetResource<FontResource>(path), size);
}
public static Font GetFont(this IResourceCache cache, string path, int size)
{
return cache.GetFont(new ResourcePath(path), size);
return cache.GetFont(new ResPath(path), size);
}
public static Font GetFont(this IResourceCache cache, ResourcePath[] path, int size)
public static Font GetFont(this IResourceCache cache, ResPath[] path, int size)
{
var fs = new Font[path.Length];
for (var i = 0; i < path.Length; i++)
@@ -39,9 +39,9 @@ namespace Content.Client.Resources
public static Font GetFont(this IResourceCache cache, string[] path, int size)
{
var rp = new ResourcePath[path.Length];
var rp = new ResPath[path.Length];
for (var i = 0; i < path.Length; i++)
rp[i] = new ResourcePath(path[i]);
rp[i] = new ResPath(path[i]);
return cache.GetFont(rp, size);
}

View File

@@ -18,7 +18,7 @@ namespace Content.Client.Screenshot
{
internal sealed class ScreenshotHook : IScreenshotHook
{
private static readonly ResourcePath BaseScreenshotPath = new("/Screenshots");
private static readonly ResPath BaseScreenshotPath = new("/Screenshots");
[Dependency] private readonly IInputManager _inputManager = default!;
[Dependency] private readonly IClyde _clyde = default!;

View File

@@ -76,7 +76,7 @@ namespace Content.Client.Stack
/// </summary>
[DataField("composite")] private bool _isComposite;
[DataField("sprite")] private ResourcePath? _spritePath;
[DataField("sprite")] private ResPath? _spritePath;
[Obsolete("Subscribe to your component being initialised instead.")]
public override void InitializeEntity(EntityUid entity)

View File

@@ -48,7 +48,7 @@ public sealed class ItemMapperSystem : SharedItemMapperSystem
foreach (var sprite in component.SpriteLayers)
{
spriteComponent.LayerMapReserveBlank(sprite);
spriteComponent.LayerSetSprite(sprite, new SpriteSpecifier.Rsi(component.RSIPath!, sprite));
spriteComponent.LayerSetSprite(sprite, new SpriteSpecifier.Rsi(component.RSIPath!.Value, sprite));
spriteComponent.LayerSetVisible(sprite, false);
}
}

View File

@@ -88,7 +88,7 @@ public sealed class TextScreenSystem : VisualizerSystem<TextScreenVisualsCompone
{
sprite.LayerMapReserveBlank(TextScreenLayerMapKey + i);
component.LayerStatesToDraw.Add(TextScreenLayerMapKey + i, null);
sprite.LayerSetRSI(TextScreenLayerMapKey + i, new ResourcePath("Effects/text.rsi"));
sprite.LayerSetRSI(TextScreenLayerMapKey + i, new ResPath("Effects/text.rsi"));
sprite.LayerSetColor(TextScreenLayerMapKey + i, component.Color);
sprite.LayerSetState(TextScreenLayerMapKey + i, DefaultState);
}

View File

@@ -29,7 +29,7 @@ public sealed class MeleeWindupOverlay : Overlay
_player = playerManager;
_melee = _entManager.EntitySysManager.GetEntitySystem<SharedMeleeWeaponSystem>();
_transform = _entManager.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
var sprite = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/progress_bar.rsi"), "icon");
var sprite = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/progress_bar.rsi"), "icon");
_texture = _entManager.EntitySysManager.GetEntitySystem<SpriteSystem>().Frame0(sprite);
_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
}