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);
return;
}
- var path = new ResourcePath(args[0]).ToRelativePath();
+ var path = new ResPath(args[0]).ToRelativePath();
var dialog = IoCManager.Resolve<IFileDialogManager>();
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!;
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()))
{
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);
_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);
}
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);
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));
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));
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);
}
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;
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;
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());
}
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);
{
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>();
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),
// 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++)
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
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)
{
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)
threshold = damageVisComp.Thresholds[1];
spriteLayer = spriteComponent.AddLayer(
new SpriteSpecifier.Rsi(
- new ResourcePath(sprite.Sprite),
+ new (sprite.Sprite),
$"{statePrefix}_{threshold}"
),
spriteLayer);
_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();
// 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);
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",
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",
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",
/// <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.
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
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);
{
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,
});
/// <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";
var tileIcon = contentTileDef.IsSpace
? _spaceIcon
- : new SpriteSpecifier.Texture(contentTileDef.Sprite!);
+ : new SpriteSpecifier.Texture(contentTileDef.Sprite!.Value);
ev.Action = new InstantAction()
{
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();
/// 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.
/// 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)
{
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);
}
}
/// Texture path.
/// </summary>
[DataField("path", required: true)]
- public ResourcePath Path { get; } = default!;
+ public ResPath Path { get; } = default!;
Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel)
{
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))
};
private readonly IEntityManager _entMan;
private readonly IConfigurationManager _configurationManager;
private readonly MarkingManager _markingManager;
-
+
private LineEdit _ageEdit => CAgeEdit;
private LineEdit _nameEdit => CNameEdit;
private LineEdit _flavorTextEdit = null!;
{
return;
}
-
+
// facial hair color
Color? facialHairColor = null;
if ( Profile.Appearance.FacialHairStyleId != HairStyles.DefaultFacialHairStyle &&
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();
}
[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++)
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);
}
{
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!;
/// </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)
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);
}
}
{
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);
}
_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();
}
var client = pairTracker.Pair.Client;
var sResourceManager = server.ResolveDependency<IResourceManager>();
- var prototypePath = new ResourcePath("/Prototypes/");
+ var prototypePath = new ResPath("/Prototypes/");
var paths = sResourceManager.ContentFindFiles(prototypePath)
.ToList()
.AsParallel()
var server = pairTracker.Pair.Server;
var resourceManager = server.ResolveDependency<IResourceManager>();
- var mapFolder = new ResourcePath("/Maps");
+ var mapFolder = new ResPath("/Maps");
var maps = resourceManager
.ContentFindFiles(mapFolder)
.Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith(".", StringComparison.Ordinal))
var gameMaps = protoManager.EnumeratePrototypes<GameMapPrototype>().Select(o => o.MapPath).ToHashSet();
- var mapFolder = new ResourcePath("/Maps");
+ var mapFolder = new ResPath("/Maps");
var maps = resourceManager
.ContentFindFiles(mapFolder)
.Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith(".", StringComparison.Ordinal))
var xformSystem = sEntities.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
var resManager = server.ResolveDependency<IResourceManager>();
- await server.WaitPost(() =>
+ await server.WaitAssertion(() =>
{
- var dir = new ResourcePath(mapPath).Directory;
+ var dir = new ResPath(mapPath).Directory;
resManager.UserData.CreateDir(dir);
var mapId = mapManager.CreateMap();
Assert.Multiple(() => mapLoader.SaveMap(mapId, mapPath));
Assert.Multiple(() => mapManager.DeleteMap(mapId));
});
+
await server.WaitIdleAsync();
- await server.WaitPost(() =>
+ await server.WaitAssertion(() =>
{
Assert.Multiple(() => mapLoader.LoadMap(new MapId(10), mapPath));
});
+
await server.WaitIdleAsync();
+
await server.WaitAssertion(() =>
{
{
Assert.That(mapGrid.GetTileRef(new Vector2i(0, 0)).Tile, Is.EqualTo(new Tile(2, (TileRenderFlag)1, 254)));
}
});
+
await pairTracker.CleanReturnAsync();
}
}
string one;
string two;
- var rp1 = new ResourcePath("/save load save 1.yml");
+ var rp1 = new ResPath("/save load save 1.yml");
await using (var stream = userData.Open(rp1, FileMode.Open))
using (var reader = new StreamReader(stream))
{
one = await reader.ReadToEndAsync();
}
- var rp2 = new ResourcePath("/save load save 2.yml");
+ var rp2 = new ResPath("/save load save 2.yml");
await using (var stream = userData.Open(rp2, FileMode.Open))
using (var reader = new StreamReader(stream))
{
string one;
string two;
- await using (var stream = userData.Open(new ResourcePath("/load save ticks save 1.yml"), FileMode.Open))
+ await using (var stream = userData.Open(new ResPath("/load save ticks save 1.yml"), FileMode.Open))
using (var reader = new StreamReader(stream))
{
one = await reader.ReadToEndAsync();
}
- await using (var stream = userData.Open(new ResourcePath("/load save ticks save 2.yml"), FileMode.Open))
+ await using (var stream = userData.Open(new ResPath("/load save ticks save 2.yml"), FileMode.Open))
using (var reader = new StreamReader(stream))
{
two = await reader.ReadToEndAsync();
});
await server.WaitIdleAsync();
- await using (var stream = userData.Open(new ResourcePath(fileA), FileMode.Open))
+ await using (var stream = userData.Open(new ResPath(fileA), FileMode.Open))
using (var reader = new StreamReader(stream))
{
yamlA = await reader.ReadToEndAsync();
await server.WaitIdleAsync();
- await using (var stream = userData.Open(new ResourcePath(fileB), FileMode.Open))
+ await using (var stream = userData.Open(new ResPath(fileB), FileMode.Open))
using (var reader = new StreamReader(stream))
{
yamlB = await reader.ReadToEndAsync();
public InstantAction InvisibleWallAction = new()
{
UseDelay = TimeSpan.FromSeconds(30),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("Structures/Walls/solid.rsi/full.png")),
+ Icon = new SpriteSpecifier.Texture(new("Structures/Walls/solid.rsi/full.png")),
DisplayName = "mime-invisible-wall",
Description = "mime-invisible-wall-desc",
Priority = -1,
Category = VerbCategory.Examine,
Disabled = !detailsRange,
Message = Loc.GetString("id-examinable-component-verb-disabled"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/character.svg.192dpi.png"))
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/character.svg.192dpi.png"))
};
args.Verbs.Add(verb);
}
// Load flags for engine commands, since those don't have the attributes.
- if (_res.TryContentFileRead(new ResourcePath("/engineCommandPerms.yml"), out var efs))
+ if (_res.TryContentFileRead(new ResPath("/engineCommandPerms.yml"), out var efs))
{
_commandPermissions.LoadPermissionsFromStream(efs);
}
{
Text = Loc.GetString("admin-notes-verb-text"),
Category = VerbCategory.Admin,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")),
Act = () => _console.RemoteExecuteCommand(user, $"{OpenAdminNotesCommand.CommandName} \"{target.UserId}\""),
Impact = LogImpact.Low
};
{
Text = "Make Traitor",
Category = VerbCategory.Antag,
- Icon = new SpriteSpecifier.Rsi((new ResourcePath("/Textures/Structures/Wallmounts/posters.rsi")), "poster5_contraband"),
+ Icon = new SpriteSpecifier.Rsi(new ResPath("/Textures/Structures/Wallmounts/posters.rsi"), "poster5_contraband"),
Act = () =>
{
if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null)
{
Text = "Make Zombie",
Category = VerbCategory.Antag,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Wallmounts/signs.rsi"), "bio"),
+ Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Wallmounts/signs.rsi"), "bio"),
Act = () =>
{
TryComp(args.Target, out MindComponent? mindComp);
{
Text = "Make nuclear operative",
Category = VerbCategory.Antag,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Wallmounts/signs.rsi"), "radiation"),
+ Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Wallmounts/signs.rsi"), "radiation"),
Act = () =>
{
if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null)
{
Text = "Make Pirate",
Category = VerbCategory.Antag,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Hats/pirate.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new("/Textures/Clothing/Head/Hats/pirate.rsi"), "icon"),
Act = () =>
{
if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null)
{
Text = "Explode",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
Act = () =>
{
var coords = Transform(args.Target).MapPosition;
{
Text = "Chess Dimension",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"),
Act = () =>
{
_godmodeSystem.EnableGodmode(args.Target); // So they don't suffocate.
{
Text = "Set Alight",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Fire/fire.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Fire/fire.png")),
Act = () =>
{
// Fuck you. Burn Forever.
{
Text = "Monkeyify",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Animals/monkey.rsi"), "dead"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/monkey.rsi"), "dead"),
Act = () =>
{
_polymorphSystem.PolymorphEntity(args.Target, "AdminMonkeySmite");
{
Text = "Garbage Can",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Piping/disposal.rsi"), "disposal"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Piping/disposal.rsi"), "disposal"),
Act = () =>
{
_polymorphSystem.PolymorphEntity(args.Target, "AdminDisposalsSmite");
{
Text = "Lung Cancer",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "lung-l"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-l"),
Act = () =>
{
_diseaseSystem.TryInfect(carrier, _prototypeManager.Index<DiseasePrototype>("StageIIIALungCancer"),
{
Text = "Electrocute",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"),
Act = () =>
{
int damageToDeal;
{
Text = "Creampie",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"),
Act = () =>
{
_creamPieSystem.SetCreamPied(args.Target, creamPied, true);
{
Text = "Remove blood",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"),
Act = () =>
{
_bloodstreamSystem.SpillAllSolutions(args.Target, bloodstream);
{
Text = "Vomit organs",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Fluids/vomit_toxin.rsi"), "vomit_toxin-1"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Fluids/vomit_toxin.rsi"), "vomit_toxin-1"),
Act = () =>
{
_vomitSystem.Vomit(args.Target, -1000, -1000); // You feel hollow!
{
Text = "Remove hands",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/remove-hands.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hands.png")),
Act = () =>
{
var baseXform = Transform(args.Target);
{
Text = "Remove hands",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/remove-hand.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hand.png")),
Act = () =>
{
var baseXform = Transform(args.Target);
{
Text = "Stomach Removal",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
Act = () =>
{
foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<StomachComponent>(args.Target, body))
{
Text = "Lungs Removal",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
Act = () =>
{
foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<LungComponent>(args.Target, body))
{
Text = "Pinball",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/toys.rsi"), "basketball"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/toys.rsi"), "basketball"),
Act = () =>
{
var xform = Transform(args.Target);
{
Text = "Yeet",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
Act = () =>
{
var xform = Transform(args.Target);
{
Text = "Become Bread",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"),
Act = () =>
{
_polymorphSystem.PolymorphEntity(args.Target, "AdminBreadSmite");
{
Text = "Become Mouse",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"),
Act = () =>
{
_polymorphSystem.PolymorphEntity(args.Target, "AdminMouseSmite");
{
Text = "Ghostkick",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/gavel.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/gavel.svg.192dpi.png")),
Act = () =>
{
_ghostKickManager.DoDisconnect(actorComponent.PlayerSession.ConnectedClient, "Smitten.");
{
Text = "Nyanify",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"),
Act = () =>
{
var ears = Spawn("ClothingHeadHatCatEars", Transform(args.Target).Coordinates);
{
Text = "Kill sign",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/killsign.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/killsign.rsi"), "icon"),
Act = () =>
{
EnsureComp<KillSignComponent>(args.Target);
Text = "Cluwne",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Mask/cluwne.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Mask/cluwne.rsi"), "icon"),
Act = () =>
{
{
Text = "Maid",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"),
Act = () =>
{
SetOutfitCommand.SetOutfit(args.Target, "JanitorMaidGear", EntityManager, (_, clothing) =>
{
Text = "Anger Pointing Arrows",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/pointing.rsi"), "pointing"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/pointing.rsi"), "pointing"),
Act = () =>
{
EnsureComp<PointingArrowAngeringComponent>(args.Target);
{
Text = "Dust",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Materials/materials.rsi"), "ash"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Materials/materials.rsi"), "ash"),
Act = () =>
{
EntityManager.QueueDeleteEntity(args.Target);
{
Text = "Buffering",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Misc/buffering_smite_icon.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Misc/buffering_smite_icon.png")),
Act = () =>
{
EnsureComp<BufferingComponent>(args.Target);
{
Text = "Become Instrument",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "icon"),
Act = () =>
{
_polymorphSystem.PolymorphEntity(args.Target, "AdminInstrumentSmite");
{
Text = "Remove gravity",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Machines/gravity_generator.rsi"), "off"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Machines/gravity_generator.rsi"), "off"),
Act = () =>
{
var grav = EnsureComp<MovementIgnoreGravityComponent>(args.Target);
{
Text = "Reptilian Species Swap",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/toys.rsi"), "plushie_lizard"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/toys.rsi"), "plushie_lizard"),
Act = () =>
{
_polymorphSystem.PolymorphEntity(args.Target, "AdminLizardSmite");
{
Text = "Locker stuff",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Storage/closet.rsi"), "generic"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Storage/closet.rsi"), "generic"),
Act = () =>
{
var xform = Transform(args.Target);
{
Text = "Headstand",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
Act = () =>
{
EnsureComp<HeadstandComponent>(args.Target);
{
Text = "Zoom in",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/zoom.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/zoom.png")),
Act = () =>
{
var eye = EnsureComp<EyeComponent>(args.Target);
{
Text = "Flip eye",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/flip.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/flip.png")),
Act = () =>
{
var eye = EnsureComp<EyeComponent>(args.Target);
{
Text = "Run Walk Swap",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/run-walk-swap.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/run-walk-swap.png")),
Act = () =>
{
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
{
Text = "Speak Backwards",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/help-backwards.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/help-backwards.png")),
Act = () =>
{
EnsureComp<BackwardsAccentComponent>(args.Target);
{
Text = "Disarm Prone",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Actions/disarm.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Actions/disarm.png")),
Act = () =>
{
EnsureComp<DisarmProneComponent>(args.Target);
{
Text = "Super speed",
Category = VerbCategory.Smite,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/super_speed.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/super_speed.png")),
Act = () =>
{
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
Text = airlock.BoltsDown ? "Unbolt" : "Bolt",
Category = VerbCategory.Tricks,
Icon = airlock.BoltsDown
- ? new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/unbolt.png"))
- : new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/bolt.png")),
+ ? new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/unbolt.png"))
+ : new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/bolt.png")),
Act = () =>
{
_airlockSystem.SetBoltsWithAudio(args.Target, airlock, !airlock.BoltsDown);
{
Text = airlock.EmergencyAccess ? "Emergency Access Off" : "Emergency Access On",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/emergency_access.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/emergency_access.png")),
Act = () =>
{
_airlockSystem.ToggleEmergencyAccess(args.Target, airlock);
{
Text = "Rejuvenate",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rejuvenate.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/rejuvenate.png")),
Act = () =>
{
RejuvenateCommand.PerformRejuvenate(args.Target);
{
Text = "Make Indestructible",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
Act = () =>
{
_godmodeSystem.EnableGodmode(args.Target);
{
Text = "Make Vulnerable",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
Act = () =>
{
_godmodeSystem.DisableGodmode(args.Target);
{
Text = "Refill Battery",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill_battery.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/fill_battery.png")),
Act = () =>
{
battery.CurrentCharge = battery.MaxCharge;
{
Text = "Drain Battery",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/drain_battery.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/drain_battery.png")),
Act = () =>
{
battery.CurrentCharge = 0;
{
Text = "Infinite Battery",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/infinite_battery.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/infinite_battery.png")),
Act = () =>
{
var recharger = EnsureComp<BatterySelfRechargerComponent>(args.Target);
{
Text = "Block Unanchoring",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/anchor.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/anchor.svg.192dpi.png")),
Act = () =>
{
RemComp(args.Target, anchor);
{
Text = "Refill Internals Oxygen",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/oxygen.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/oxygen.rsi"), "icon"),
Act = () =>
{
RefillGasTank(args.Target, Gas.Oxygen, tank);
{
Text = "Refill Internals Nitrogen",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/red.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/red.rsi"), "icon"),
Act = () =>
{
RefillGasTank(args.Target, Gas.Nitrogen, tank);
{
Text = "Refill Internals Plasma",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
Act = () =>
{
RefillGasTank(args.Target, Gas.Plasma, tank);
{
Text = "Refill Internals Oxygen",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/oxygen.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/oxygen.rsi"), "icon"),
Act = () =>
{
foreach (var slot in _inventorySystem.GetSlots(args.Target))
{
Text = "Refill Internals Nitrogen",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/red.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/red.rsi"), "icon"),
Act = () =>
{
foreach (var slot in _inventorySystem.GetSlots(args.Target))
{
Text = "Refill Internals Plasma",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
Act = () =>
{
foreach (var slot in _inventorySystem.GetSlots(args.Target))
{
Text = "Send to test arena",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
Act = () =>
{
{
Text = "Grant All Access",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "centcom"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "centcom"),
Act = () =>
{
GiveAllAccess(activeId.Value);
{
Text = "Revoke All Access",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "default"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "default"),
Act = () =>
{
RevokeAllAccess(activeId.Value);
{
Text = "Grant All Access",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "centcom"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "centcom"),
Act = () =>
{
GiveAllAccess(args.Target);
{
Text = "Revoke All Access",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "default"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "default"),
Act = () =>
{
RevokeAllAccess(args.Target);
{
Text = "Adjust Stack",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/adjust-stack.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/adjust-stack.png")),
Act = () =>
{
// Unbounded intentionally.
{
Text = "Fill Stack",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill-stack.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/fill-stack.png")),
Act = () =>
{
_stackSystem.SetCount(args.Target, _stackSystem.GetMaxCount(stack), stack);
{
Text = "Rename",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rename.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/rename.png")),
Act = () =>
{
_quickDialog.OpenDialog(player, "Rename", "Name", (string newName) =>
{
Text = "Redescribe",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/redescribe.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/redescribe.png")),
Act = () =>
{
_quickDialog.OpenDialog(player, "Redescribe", "Description", (LongString newDescription) =>
{
Text = "Redescribe",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rename_and_redescribe.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/rename_and_redescribe.png")),
Act = () =>
{
_quickDialog.OpenDialog(player, "Rename & Redescribe", "Name", "Description",
{
Text = "Bar job slots",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/bar_jobslots.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/bar_jobslots.png")),
Act = () =>
{
foreach (var (job, _) in _stationJobsSystem.GetJobs(args.Target))
{
Text = "Locate Cargo Shuttle",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Soft/cargosoft.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Head/Soft/cargosoft.rsi"), "icon"),
Act = () =>
{
var shuttle = Comp<StationCargoOrderDatabaseComponent>(args.Target).Shuttle;
{
Text = "Refill Battery",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill_battery.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/fill_battery.png")),
Act = () =>
{
foreach (var ent in childEnum)
{
Text = "Drain Battery",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/drain_battery.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/drain_battery.png")),
Act = () =>
{
foreach (var ent in childEnum)
{
Text = "Infinite Battery",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/infinite_battery.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/infinite_battery.png")),
Act = () =>
{
// this kills the sloth
{
Text = "Halt Movement",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/halt.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/halt.png")),
Act = () =>
{
_physics.SetLinearVelocity(args.Target, Vector2.Zero, body: physics);
{
Text = "Unpause Map",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/play.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/play.png")),
Act = () =>
{
_mapManager.SetMapPaused(map.MapId, false);
{
Text = "Pause Map",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/pause.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/pause.png")),
Act = () =>
{
_mapManager.SetMapPaused(map.MapId, true);
{
Text = "Snap Joints",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/snap_joints.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/snap_joints.png")),
Act = () =>
{
_jointSystem.ClearJoints(joints);
{
Text = "Make Minigun",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Weapons/Guns/HMGs/minigun.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Weapons/Guns/HMGs/minigun.rsi"), "icon"),
Act = () =>
{
gun.FireRate = 15;
{
Text = "Set Bullet Amount",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/caps.rsi"), "mag-6"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/caps.rsi"), "mag-6"),
Act = () =>
{
_quickDialog.OpenDialog(player, "Set Bullet Amount", $"Amount (max {ballisticAmmo.Capacity}):", (int amount) =>
Verb verb = new();
verb.Text = Loc.GetString("ahelp-verb-get-data-text");
verb.Category = VerbCategory.Admin;
- verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/gavel.svg.192dpi.png"));
+ verb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/gavel.svg.192dpi.png"));
verb.Act = () =>
_console.RemoteExecuteCommand(player, $"openahelp \"{targetActor.PlayerSession.UserId}\"");
verb.Impact = LogImpact.Low;
Verb prayerVerb = new();
prayerVerb.Text = Loc.GetString("prayer-verbs-subtle-message");
prayerVerb.Category = VerbCategory.Admin;
- prayerVerb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/pray.svg.png"));
+ prayerVerb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/pray.svg.png"));
prayerVerb.Act = () =>
{
_quickDialog.OpenDialog(player, "Subtle Message", "Message", "Popup Message", (string message, string popupMessage) =>
? Loc.GetString("admin-verbs-unfreeze")
: Loc.GetString("admin-verbs-freeze"),
Category = VerbCategory.Admin,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/snow.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/snow.svg.192dpi.png")),
Act = () =>
{
if (frozen)
{
Text = Loc.GetString("admin-verbs-teleport-to"),
Category = VerbCategory.Admin,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/open.svg.192dpi.png")),
Act = () => _console.ExecuteCommand(player, $"tpto {args.Target}"),
Impact = LogImpact.Low
});
{
Text = Loc.GetString("admin-verbs-teleport-here"),
Category = VerbCategory.Admin,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/close.svg.192dpi.png")),
Act = () => _console.ExecuteCommand(player, $"tpto {args.Target} {args.User}"),
Impact = LogImpact.Low
});
{
Text = Loc.GetString("delete-verb-get-data-text"),
Category = VerbCategory.Debug,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
Act = () => EntityManager.DeleteEntity(args.Target),
Impact = LogImpact.Medium,
ConfirmationPopup = true
{
Text = Loc.GetString("rejuvenate-verb-get-data-text"),
Category = VerbCategory.Debug,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")),
Act = () => RejuvenateCommand.PerformRejuvenate(args.Target),
Impact = LogImpact.Medium
};
{
Text = Loc.GetString("make-sentient-verb-get-data-text"),
Category = VerbCategory.Debug,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")),
Act = () => MakeSentientCommand.MakeSentient(args.Target, EntityManager),
Impact = LogImpact.Medium
};
{
Text = Loc.GetString("set-outfit-verb-get-data-text"),
Category = VerbCategory.Debug,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
Act = () => _euiManager.OpenEui(new SetOutfitEui(args.Target), player),
Impact = LogImpact.Medium
};
{
Text = Loc.GetString("in-range-unoccluded-verb-get-data-text"),
Category = VerbCategory.Debug,
- 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 = () =>
{
var message = args.User.InRangeUnOccluded(args.Target)
{
Text = Loc.GetString("tube-direction-verb-get-data-text"),
Category = VerbCategory.Debug,
- 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 = () => _disposalTubes.PopupDirections(args.Target, tube, args.User)
};
args.Verbs.Add(verb);
Verb verb = new()
{
Text = Loc.GetString("configure-verb-get-data-text"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")),
Category = VerbCategory.Debug,
Act = () => _uiSystem.TryOpen(args.Target, ConfigurationUiKey.Key, actor.PlayerSession)
};
{
Text = Loc.GetString("edit-solutions-verb-get-data-text"),
Category = VerbCategory.Debug,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/spill.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/spill.svg.192dpi.png")),
Act = () => OpenEditSolutionsEui(player, args.Target),
Impact = LogImpact.Medium // maybe high depending on WHAT reagents they add...
};
[DataField("summonAction")]
public InstantAction SummonAction = new()
{
- Icon = new SpriteSpecifier.Texture(new ResourcePath("Clothing/Head/Hats/witch.rsi/icon.png")),
+ Icon = new SpriteSpecifier.Texture(new ("Clothing/Head/Hats/witch.rsi/icon.png")),
DisplayName = "bible-summon-verb",
Description = "bible-summon-verb-desc",
Event = new SummonActionEvent(),
ToggleInternals(uid, args.User, false, component);
},
Message = Loc.GetString("action-description-internals-toggle"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/dot.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/dot.svg.192dpi.png")),
Text = Loc.GetString("action-name-internals-toggle"),
};
#region Cosmetics
[DataField("plantRsi", required: true)]
- public ResourcePath PlantRsi { get; set; } = default!;
+ public ResPath PlantRsi { get; set; } = default!;
[DataField("plantIconState")] public string PlantIconState { get; set; } = "produce";
{
Act = () => TryUnbuckle(uid, args.User, buckle: component),
Text = Loc.GetString("verb-categories-unbuckle"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/unbuckle.svg.192dpi.png"))
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/unbuckle.svg.192dpi.png"))
};
if (args.Target == args.User && args.Using == null)
args.Verbs.Add(new InteractionVerb()
{
Text = Loc.GetString("chameleon-component-verb-text"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")),
Act = () => TryOpenUi(uid, args.User, component)
});
}
Localization = Anchored
? "construction-step-condition-entity-anchored"
: "construction-step-condition-entity-unanchored",
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Tools/wrench.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("Objects/Tools/wrench.rsi"), "icon"),
};
}
}
//TODO VERBS add more construction verbs? Until then, removing construction category
verb.Text = Loc.GetString("deconstructible-verb-begin-deconstruct");
verb.Icon = new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/hammer_scaled.svg.192dpi.png"));
+ new ("/Textures/Interface/hammer_scaled.svg.192dpi.png"));
verb.Act = () =>
{
Text = Loc.GetString("machine-upgrade-examinable-verb-text"),
Message = Loc.GetString("machine-upgrade-examinable-verb-message"),
Category = VerbCategory.Examine,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/pickup.svg.192dpi.png"))
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/pickup.svg.192dpi.png"))
};
args.Verbs.Add(verb);
Category = VerbCategory.Examine,
Disabled = !detailsRange,
Message = Loc.GetString("detail-examinable-verb-disabled"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png"))
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/examine.svg.192dpi.png"))
};
args.Verbs.Add(verb);
{
Text = Loc.GetString(isDeviceList ? "network-configurator-configure" : "network-configurator-save-device"),
Icon = isDeviceList ?
- new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")) :
- new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/in.svg.192dpi.png")),
+ new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")) :
+ new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/in.svg.192dpi.png")),
Act = () => OnUsed(uid, component, args.Target, args.User),
Impact = LogImpact.Low
};
AlternativeVerb verb = new()
{
Text = Loc.GetString("network-configurator-save-device"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/in.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/in.svg.192dpi.png")),
Act = () => TryAddNetworkDevice(args.Target, args.Using.Value, args.User),
Impact = LogImpact.Low
};
AlternativeVerb flushVerb = new();
flushVerb.Act = () => Engage(uid, component);
flushVerb.Text = Loc.GetString("disposal-flush-verb-get-data-text");
- flushVerb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png"));
+ flushVerb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png"));
flushVerb.Priority = 1;
args.Verbs.Add(flushVerb);
var dest = configManager.GetCVar(CCVars.DestinationFile);
if (!string.IsNullOrEmpty(dest))
{
- var resPath = new ResourcePath(dest).ToRootedPath();
+ var resPath = new ResPath(dest).ToRootedPath();
var file = resourceManager.UserData.OpenWriteText(resPath.WithName("chem_" + dest));
ChemistryJsonGenerator.PublishJson(file);
file.Flush();
{
Act = () => TryToggleFold(uid, component),
Text = component.IsFolded ? Loc.GetString("unfold-verb") : Loc.GetString("fold-verb"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/fold.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/fold.svg.192dpi.png")),
// If the object is unfolded and they click it, they want to fold it, if it's folded, they want to pick it up
Priority = component.IsFolded ? 0 : 2,
public string? LobbyBackground { get; private set; }
[ViewVariables]
- private List<ResourcePath>? _lobbyBackgrounds;
+ private List<ResPath>? _lobbyBackgrounds;
private static readonly string[] WhitelistedBackgroundExtensions = new string[] {"png", "jpg", "jpeg"};
/// The sprite to use as the background. This should ideally be 1920x1080.
/// </summary>
[DataField("background", required: true)]
- public ResourcePath Background = default!;
+ public ResPath Background = default!;
}
[DataField("normalNames", customTypeSerializer: typeof(PrototypeIdSerializer<DatasetPrototype>))]
public string NormalNames = "SyndicateNamesNormal";
- [DataField("outpostMap", customTypeSerializer: typeof(ResourcePathSerializer))]
- public ResourcePath? NukieOutpostMap = new("/Maps/nukieplanet.yml");
+ [DataField("outpostMap", customTypeSerializer: typeof(ResPathSerializer))]
+ public ResPath NukieOutpostMap = new("/Maps/nukieplanet.yml");
- [DataField("shuttleMap", customTypeSerializer: typeof(ResourcePathSerializer))]
- public ResourcePath? NukieShuttleMap = new("/Maps/infiltrator.yml");
+ [DataField("shuttleMap", customTypeSerializer: typeof(ResPathSerializer))]
+ public ResPath NukieShuttleMap = new("/Maps/infiltrator.yml");
[DataField("greetingSound", customTypeSerializer: typeof(SoundSpecifierTypeSerializer))]
public SoundSpecifier? GreetSound = new SoundPathSpecifier("/Audio/Misc/nukeops.ogg");
public InstantAction Action = new()
{
UseDelay = TimeSpan.FromSeconds(120),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/scream.png")),
+ Icon = new SpriteSpecifier.Texture(new ("Interface/Actions/scream.png")),
DisplayName = "action-name-boo",
Description = "action-description-boo",
CheckCanInteract = false,
{
DisplayName = "action-name-guardian",
Description = "action-description-guardian",
- Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/manifest.png")),
+ Icon = new SpriteSpecifier.Texture(new ("Interface/Actions/manifest.png")),
UseDelay = TimeSpan.FromSeconds(2),
CheckCanInteract = false, // allow use while stunned, etc. Gets removed on death anyways.
Event = new GuardianToggleActionEvent(),
Category = VerbCategory.Examine,
Disabled = !detailsRange,
Message = Loc.GetString("health-examinable-verb-disabled"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png"))
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png"))
};
args.Verbs.Add(verb);
{
Text = "Modify markings",
Category = VerbCategory.Tricks,
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Customization/reptilian_parts.rsi"), "tail_smooth"),
+ Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Customization/reptilian_parts.rsi"), "tail_smooth"),
Act = () =>
{
_uiSystem.TryOpen(uid, HumanoidMarkingModifierKey.Key, actor.PlayerSession);
},
Message = message,
Disabled = disabled,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")),
Text = Loc.GetString("butcherable-verb-name"),
};
ActivationVerb verb = new()
{
Text = Loc.GetString("expendable-light-start-verb"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/light.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")),
Act = () => TryActivate(component)
};
args.Verbs.Add(verb);
ActivationVerb verb = new()
{
Text = Loc.GetString("verb-common-toggle-light"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/light.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")),
Act = component.Activated
? () => TurnOff(uid, component)
: () => TurnOn(args.User, uid, component)
ActivationVerb verb = new();
verb.Text = Loc.GetString("toggle-flashlight-verb-get-data-text");
- verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/light.svg.192dpi.png"));
+ verb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png"));
verb.Act = () => ToggleLight(uid, component);
verb.Priority = -1; // For things like PDA's, Open-UI and other verbs that should be higher priority.
Category = VerbCategory.Lever,
Message = Loc.GetString("two-way-lever-cant"),
Disabled = component.State == TwoWayLeverState.Left,
- Icon = new SpriteSpecifier.Texture(new ResourcePath($"/Textures/Interface/VerbIcons/{_leftToggleImage}")),
+ Icon = new SpriteSpecifier.Texture(new ($"/Textures/Interface/VerbIcons/{_leftToggleImage}")),
Text = Loc.GetString("two-way-lever-left"),
};
Category = VerbCategory.Lever,
Message = Loc.GetString("two-way-lever-cant"),
Disabled = component.State == TwoWayLeverState.Right,
- Icon = new SpriteSpecifier.Texture(new ResourcePath($"/Textures/Interface/VerbIcons/{_rightToggleImage}")),
+ Icon = new SpriteSpecifier.Texture(new ($"/Textures/Interface/VerbIcons/{_rightToggleImage}")),
Text = Loc.GetString("two-way-lever-right"),
};
}
var saveDir = Path.Combine(_cfg.GetCVar(CCVars.AutosaveDirectory), name);
- _resMan.UserData.CreateDir(new ResourcePath(saveDir).ToRootedPath());
+ _resMan.UserData.CreateDir(new ResPath(saveDir).ToRootedPath());
var path = Path.Combine(saveDir, $"{DateTime.Now.ToString("yyyy-M-dd_HH.mm.ss")}-AUTO.yml");
_currentlyAutosaving[map] = (CalculateNextTime(), name);
/// Relative directory path to the given map, i.e. `/Maps/saltern.yml`
/// </summary>
[DataField("mapPath", required: true)]
- public ResourcePath MapPath { get; } = default!;
+ public ResPath MapPath { get; } = default!;
[DataField("stations", required: true)]
private Dictionary<string, StationConfig> _stations = new();
public EntityTargetAction Action = new()
{
- Icon = new SpriteSpecifier.Texture(new ResourcePath("Clothing/Neck/Misc/stethoscope.rsi/icon.png")),
+ Icon = new SpriteSpecifier.Texture(new ("Clothing/Neck/Misc/stethoscope.rsi/icon.png")),
DisplayName = "stethoscope-verb",
Priority = -1,
Event = new StethoscopeActionEvent(),
StartListening(component.Stethoscope, uid, args.Target, stetho); // start doafter
},
Text = Loc.GetString("stethoscope-verb"),
- Icon = new SpriteSpecifier.Rsi(new ResourcePath("Clothing/Neck/Misc/stethoscope.rsi"), "icon"),
+ Icon = new SpriteSpecifier.Rsi(new ("Clothing/Neck/Misc/stethoscope.rsi"), "icon"),
Priority = 2
};
args.Verbs.Add(verb);
{
TryDrink(ev.User, ev.User, component, uid);
},
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/drink.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/drink.svg.192dpi.png")),
Text = Loc.GetString("drink-system-verb-drink"),
Priority = 2
};
{
TryFeed(ev.User, ev.User, uid, component);
},
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")),
Text = Loc.GetString("food-system-verb-eat"),
Priority = -1
};
public string Description => Loc.GetString("objective-condition-die-description");
- public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Mobs/Ghosts/ghost_human.rsi"), "icon");
+ public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Mobs/Ghosts/ghost_human.rsi"), "icon");
public float Progress => (_mind?.CharacterDeadIC ?? true) ? 1f : 0f;
public string Description => Loc.GetString("objective-condition-escape-shuttle-description");
- public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Structures/Furniture/chairs.rsi"), "shuttle");
+ public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Structures/Furniture/chairs.rsi"), "shuttle");
private bool IsAgentOnShuttle(TransformComponent agentXform, EntityUid? shuttle)
{
public string Description => Loc.GetString("objective-condition-kill-person-description");
- public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Weapons/Guns/Pistols/viper.rsi"), "icon");
+ public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Objects/Weapons/Guns/Pistols/viper.rsi"), "icon");
public float Progress => (Target?.CharacterDeadIC ?? true) ? 1f : 0f;
public string Description => Loc.GetString("objective-condition-other-traitor-alive-description");
- public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/bureaucracy.rsi"), "folder-white");
+ public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Objects/Misc/bureaucracy.rsi"), "folder-white");
public float Progress => (!_target?.CharacterDeadIC ?? true) ? 1f : 0f;
public string Description => Loc.GetString("objective-condition-other-traitor-progress-description");
- public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/bureaucracy.rsi"), "folder-white");
+ public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Objects/Misc/bureaucracy.rsi"), "folder-white");
public float Progress
{
private string GetSound(Note note)
{
- return new ResourcePath("/Audio/Effects/RingtoneNotes/" + note.ToString().ToLower()) + ".ogg";
+ return new ResPath("/Audio/Effects/RingtoneNotes/" + note.ToString().ToLower()) + ".ogg";
}
}
}
Message = Loc.GetString("cable-multitool-system-verb-tooltip"),
Text = Loc.GetString("cable-multitool-system-verb-name"),
Category = VerbCategory.Examine,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/zap.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/zap.svg.192dpi.png")),
Act = () =>
{
var markup = FormattedMessage.FromMarkup(GenerateCableMarkup(uid));
{
Text = Loc.GetString("verb-debug-toggle-need-power"),
Category = VerbCategory.Debug,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), // "smite" is a lightning bolt
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), // "smite" is a lightning bolt
Act = () => component.NeedsPower = !component.NeedsPower
});
}
{
TogglePower(uid, user: args.User);
},
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/Spare/poweronoff.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/Spare/poweronoff.svg.192dpi.png")),
Text = Loc.GetString("power-switch-component-toggle-verb"),
Priority = -3
};
/// </summary>
[DataField("verbImage")]
[ViewVariables(VVAccess.ReadOnly)]
- public SpriteSpecifier? VerbImage = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/pray.svg.png"));
+ public SpriteSpecifier? VerbImage = new SpriteSpecifier.Texture(new ("/Textures/Interface/pray.svg.png"));
}
}
public sealed class DungeonAtlasTemplateComponent : Component
{
[DataField("path", required: true)]
- public ResourcePath? Path;
+ public ResPath Path;
}
while (query.MoveNext(out var uid, out comp))
{
// Exists
- if (comp.Path?.Equals(proto.AtlasPath) == true)
+ if (comp.Path.Equals(proto.AtlasPath))
return Transform(uid).MapID;
}
Act = () => TryFlip(uid, component, args.User),
Text = Loc.GetString("flippable-verb-get-data-text"),
Category = VerbCategory.Rotate,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/flip.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/flip.svg.192dpi.png")),
Priority = -3, // show flip last
DoContactInteraction = true
};
DoContactInteraction = true,
Act = () => EntityManager.GetComponent<TransformComponent>(uid).LocalRotation = Angle.Zero,
Category = VerbCategory.Rotate,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
Text = "Reset",
Priority = -2, // show CCW, then CW, then reset
CloseMenu = false,
{
Act = () => EntityManager.GetComponent<TransformComponent>(uid).LocalRotation -= component.Increment,
Category = VerbCategory.Rotate,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rotate_cw.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rotate_cw.svg.192dpi.png")),
Priority = -1,
CloseMenu = false, // allow for easy double rotations.
};
{
Act = () => EntityManager.GetComponent<TransformComponent>(uid).LocalRotation += component.Increment,
Category = VerbCategory.Rotate,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rotate_ccw.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rotate_ccw.svg.192dpi.png")),
Priority = 0,
CloseMenu = false, // allow for easy double rotations.
};
/// Relative directory path to the given map, i.e. `Maps/Salvage/template.yml`
/// </summary>
[DataField("mapPath", required: true)]
- public ResourcePath MapPath { get; } = default!;
+ public ResPath MapPath { get; } = default!;
/// <summary>
/// Map rectangle in world coordinates (to check if it fits)
[RegisterComponent, Access(typeof(ShuttleSystem))]
public sealed class GridFillComponent : Component
{
- [DataField("path")] public ResourcePath Path = new("/Maps/Shuttles/escape_pod_small.yml");
+ [DataField("path")] public ResPath Path = new("/Maps/Shuttles/escape_pod_small.yml");
}
[DataField("shuttle")]
public EntityUid Shuttle;
- [DataField("shuttlePath")] public ResourcePath ShuttlePath = new("/Maps/Shuttles/arrivals.yml");
+ [DataField("shuttlePath")] public ResPath ShuttlePath = new("/Maps/Shuttles/arrivals.yml");
}
/// <summary>
/// Emergency shuttle map path for this station.
/// </summary>
- [DataField("emergencyShuttlePath", customTypeSerializer: typeof(ResourcePathSerializer))]
- public ResourcePath EmergencyShuttlePath { get; set; } = new("/Maps/Shuttles/emergency.yml");
+ [DataField("emergencyShuttlePath", customTypeSerializer: typeof(ResPathSerializer))]
+ public ResPath EmergencyShuttlePath { get; set; } = new("/Maps/Shuttles/emergency.yml");
}
{
DoContactInteraction = true,
Text = Loc.GetString("comp-sticky-unstick-verb-text"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
Act = () => StartUnsticking(uid, args.User, component)
});
}
StartDoAfter(uid, args.Target, args.User, dumpable);//Had multiplier of 0.6f
},
Text = Loc.GetString("dump-verb-name"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")),
};
args.Verbs.Add(verb);
}
{
verb.Text = Loc.GetString("verb-common-close-ui");
verb.Icon = new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
+ new ("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
}
else
{
verb.Text = Loc.GetString("verb-common-open-ui");
verb.Icon = new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
+ new ("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
}
args.Verbs.Add(verb);
}
Verb verb = new()
{
Text = Loc.GetString("strip-verb-get-data-text"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
Act = () => StartOpeningStripper(args.User, component, true),
};
args.Verbs.Add(verb);
ExamineVerb verb = new()
{
Text = Loc.GetString("strip-verb-get-data-text"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
Act = () => StartOpeningStripper(args.User, component, true),
Category = VerbCategory.Examine,
};
ActivationVerb verb = new();
verb.Text = Loc.GetString("tabletop-verb-play-game");
- verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/die.svg.192dpi.png"));
+ verb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/die.svg.192dpi.png"));
verb.Act = () => OpenSessionFor(actor.PlayerSession, uid);
args.Verbs.Add(verb);
}
Text = Loc.GetString("damage-examinable-verb-text"),
Message = Loc.GetString("damage-examinable-verb-message"),
Category = VerbCategory.Examine,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
};
args.Verbs.Add(verb);
Text = Loc.GetString("damage-examinable-verb-text"),
Message = Loc.GetString("damage-examinable-verb-message"),
Category = VerbCategory.Examine,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
};
args.Verbs.Add(verb);
Text = Loc.GetString("damage-examinable-verb-text"),
Message = Loc.GetString("damage-examinable-verb-message"),
Category = VerbCategory.Examine,
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
};
args.Verbs.Add(verb);
public override MsgGroups MsgGroup => MsgGroups.Command;
public byte[] Data { get; set; } = Array.Empty<byte>();
- public ResourcePath RelativePath { get; set; } = ResourcePath.Self;
+ public ResPath RelativePath { get; set; } = ResPath.Self;
public NetworkResourceUploadMessage()
{
}
- public NetworkResourceUploadMessage(byte[] data, ResourcePath relativePath)
+ public NetworkResourceUploadMessage(byte[] data, ResPath relativePath)
{
Data = data;
RelativePath = relativePath;
{
var dataLength = buffer.ReadVariableInt32();
Data = buffer.ReadBytes(dataLength);
- RelativePath = new ResourcePath(buffer.ReadString(), buffer.ReadString());
+ // What is the second argument here?
+ RelativePath = new ResPath(buffer.ReadString());
}
public override void WriteToBuffer(NetOutgoingMessage buffer, IRobustSerializer serializer)
buffer.WriteVariableInt32(Data.Length);
buffer.Write(Data);
buffer.Write(RelativePath.ToString());
- buffer.Write(RelativePath.Separator);
+ buffer.Write(ResPath.Separator);
}
}
/// <summary>
/// The prefix for any and all downloaded network resources.
/// </summary>
- private static readonly ResourcePath Prefix = ResourcePath.Root / "Uploaded";
+ private static readonly ResPath Prefix = ResPath.Root / "Uploaded";
protected readonly MemoryContentRoot ContentRoot = new();
public sealed class ReplayResourceUploadMsg
{
public byte[] Data = default!;
- public ResourcePath RelativePath = default!;
+ public ResPath RelativePath = default!;
}
}
{
toggleVerb.Text = Loc.GetString("verb-common-close");
toggleVerb.Icon =
- new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
+ new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
}
else
{
toggleVerb.Text = Loc.GetString("verb-common-open");
toggleVerb.Icon =
- new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
+ new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
}
args.Verbs.Add(toggleVerb);
}
public string ID { get; } = default!;
[DataField("path")]
- public ResourcePath Path = default!;
+ public ResPath Path = default!;
[DataField("nameDataset", customTypeSerializer:typeof(PrototypeIdSerializer<DatasetPrototype>))]
public string NameDataset = "CargoShuttleNames";
public string ID { get; } = default!;
[DataField("spritePath")]
- public ResourcePath SpritePath = new("/Textures/Effects/speech.rsi");
+ public ResPath SpritePath = new("/Textures/Effects/speech.rsi");
[DataField("typingState", required: true)]
public string TypingState = default!;
var verb = new EquipmentVerb()
{
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
Text = Loc.GetString(text),
};
{
verb.Text = Loc.GetString(slot.InsertVerbText);
verb.Icon = new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/VerbIcons/insert.svg.192dpi.png"));
+ new("/Textures/Interface/VerbIcons/insert.svg.192dpi.png"));
}
else if (slot.EjectOnInteract)
{
// category, we will use a single "Place <item>" verb.
verb.Text = Loc.GetString("place-item-verb-text", ("subject", verbSubject));
verb.Icon = new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png"));
+ new("/Textures/Interface/VerbIcons/drop.svg.192dpi.png"));
}
else
{
insertVerb.Text = Loc.GetString(slot.InsertVerbText);
insertVerb.Icon =
new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/VerbIcons/insert.svg.192dpi.png"));
+ new("/Textures/Interface/VerbIcons/insert.svg.192dpi.png"));
}
else if(slot.EjectOnInteract)
{
insertVerb.Text = Loc.GetString("place-item-verb-text", ("subject", verbSubject));
insertVerb.Icon =
new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png"));
+ new("/Textures/Interface/VerbIcons/drop.svg.192dpi.png"));
}
else
{
Text = verbText,
Message = hoverMessage,
Category = VerbCategory.Examine,
- Icon = new SpriteSpecifier.Texture(new ResourcePath(iconTexture)),
+ Icon = new SpriteSpecifier.Texture(new(iconTexture)),
};
verbsEvent.Verbs.Add(examineVerb);
/// The icon path for the Examine Group.
/// </summary>
[DataField("icon")]
- public SpriteSpecifier Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/examine-star.png"));
+ public SpriteSpecifier Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/examine-star.png"));
/// <summary>
/// The text shown in the context verb menu.
public readonly SoundSpecifier Sound = new SoundCollectionSpecifier("explosion");
[DataField("texturePath")]
- public readonly ResourcePath TexturePath = new("/Textures/Effects/fire.rsi");
+ public readonly ResPath TexturePath = new("/Textures/Effects/fire.rsi");
/// <summary>
/// How intense does the explosion have to be at a tile to advance to the next fire texture state?
}),
Impact = LogImpact.Low,
Text = Loc.GetString("verb-follow-text"),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/open.svg.192dpi.png")),
};
ev.Verbs.Add(verb);
InteractionVerb verb = new();
verb.Act = () => _handsSystem.TryPickupAnyHand(args.User, args.Target, checkActionBlocker: false,
handsComp: args.Hands, item: component);
- verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/pickup.svg.192dpi.png"));
+ verb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/pickup.svg.192dpi.png"));
// if the item already in a container (that is not the same as the user's), then change the text.
// this occurs when the item is in their inventory or in an open backpack
() => TryLock(uid, args.User, component),
Text = Loc.GetString(component.Locked ? "toggle-lock-verb-unlock" : "toggle-lock-verb-lock"),
Icon = component.Locked ?
- new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/unlock.svg.192dpi.png")) :
- new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/lock.svg.192dpi.png")),
+ new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/unlock.svg.192dpi.png")) :
+ new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/lock.svg.192dpi.png")),
};
args.Verbs.Add(verb);
}
[DataField("name")]
public string Name { get; private set; } = "";
- [DataField("sprite")] public ResourcePath? Sprite { get; }
+ [DataField("sprite")] public ResPath? Sprite { get; }
- [DataField("edgeSprites")] public Dictionary<Direction, ResourcePath> EdgeSprites { get; } = new();
+ [DataField("edgeSprites")] public Dictionary<Direction, ResPath> EdgeSprites { get; } = new();
[DataField("isSubfloor")] public bool IsSubFloor { get; private set; }
/// <summary>
/// Path to the file to use for the room.
/// </summary>
- [DataField("atlas", required: true)] public ResourcePath AtlasPath = default!;
+ [DataField("atlas", required: true)] public ResPath AtlasPath;
/// <summary>
/// Tile offset into the atlas to use for the room.
{
[DataField("mapLayers")] public readonly Dictionary<string, SharedMapLayerData> MapLayers = new();
- [DataField("sprite")] public ResourcePath? RSIPath;
+ [DataField("sprite")] public ResPath? RSIPath;
/// <summary>
/// If this exists, shown layers will only consider entities in the given containers.
if (component.Open)
{
verb.Text = Loc.GetString("verb-common-close");
- verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
+ verb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
}
else
{
verb.Text = Loc.GetString("verb-common-open");
verb.Icon = new SpriteSpecifier.Texture(
- new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
+ new("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
}
verb.Act = () => ToggleOpen(args.User, args.Target, component);
args.Verbs.Add(verb);
public InstantAction HornAction = new()
{
UseDelay = TimeSpan.FromSeconds(3.4),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("Objects/Fun/bikehorn.rsi/icon.png")),
+ Icon = new SpriteSpecifier.Texture(new("Objects/Fun/bikehorn.rsi/icon.png")),
DisplayName = "action-name-honk",
Description = "action-desc-honk",
Event = new HonkActionEvent(),
public VerbCategory(string text, string? icon, bool iconsOnly = false)
{
Text = Loc.GetString(text);
- Icon = icon == null ? null : new SpriteSpecifier.Texture(new ResourcePath(icon));
+ Icon = icon == null ? null : new SpriteSpecifier.Texture(new(icon));
IconsOnly = iconsOnly;
}
{
Act = () => SelectFire(uid, component, nextMode, args.User),
Text = Loc.GetString("gun-selector-verb", ("mode", GetLocSelector(nextMode))),
- Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/fold.svg.192dpi.png")),
+ Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/fold.svg.192dpi.png")),
};
args.Verbs.Add(verb);
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
Assert.That(alertsSystem.TryGet(AlertType.LowPressure, out var lowPressure));
- Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
+ Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
Assert.That(alertsSystem.TryGet(AlertType.HighPressure, out var highPressure));
- Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
+ Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
Assert.That(alertsSystem.TryGet(AlertType.LowPressure, out lowPressure));
- Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
+ Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
Assert.That(alertsSystem.TryGet(AlertType.HighPressure, out highPressure));
- Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
+ Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
}
}
}
public void GetsIconPath(short? severity, string expected)
{
var alert = GetTestPrototype();
- Assert.That(alert.GetIcon(severity), Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath(expected))));
+ Assert.That(alert.GetIcon(severity), Is.EqualTo(new SpriteSpecifier.Texture(new (expected))));
}
[TestCase(null, "/Textures/Interface/Alerts/Human/human.rsi/human0.png")]
await client.WaitPost(() =>
{
- clientErrors = cPrototypeManager.ValidateDirectory(new ResourcePath("/Prototypes"));
+ clientErrors = cPrototypeManager.ValidateDirectory(new ResPath("/Prototypes"));
});
await pairTracker.CleanReturnAsync();
await server.WaitPost(() =>
{
- serverErrors = sPrototypeManager.ValidateDirectory(new ResourcePath("/Prototypes"));
+ serverErrors = sPrototypeManager.ValidateDirectory(new ResPath("/Prototypes"));
});
await pairTracker.CleanReturnAsync();
state: on
- type: Appearance
- type: Rotatable
- - type: Physics
- - type: Fixtures
- type: SignalTimer
canEditLabel: false
- type: SignalTransmitter
usesApcPower: true
- type: ExtensionCableReceiver
- type: ActivatableUIRequiresPower
-
+
- type: entity
id: ScreenTimer
parent: SignalTimer