Replace ResourcePath with ResPath (#15308)
This commit is contained in:
@@ -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>();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user