From acf79a8209990d92fbf70706b0655450e5b38eab Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 20 Apr 2023 11:43:54 +1000 Subject: [PATCH] Revert "Replace `ResourcePath` with `ResPath` (#15308)" (#15551) --- Content.Client/Actions/ActionsSystem.cs | 2 +- .../Administration/Commands/UploadFile.cs | 2 +- .../Administration/Commands/UploadFolder.cs | 6 +- .../Managers/ClientAdminManager.cs | 2 +- .../Administration/Systems/AdminVerbSystem.cs | 2 +- .../Administration/Systems/KillSignSystem.cs | 2 +- .../AirlockPainter/AirlockPainterSystem.cs | 2 +- Content.Client/Atmos/Miasma/FliesSystem.cs | 2 +- .../Atmos/Overlays/GasTileOverlay.cs | 4 +- Content.Client/Audio/AmbientSoundSystem.cs | 2 +- Content.Client/Changelog/ChangelogManager.cs | 6 +- .../Changelog/ChangelogWindow.xaml.cs | 2 +- .../Chemistry/UI/ChemMasterWindow.xaml.cs | 2 +- Content.Client/Credits/CreditsWindow.xaml.cs | 2 +- .../CrewManifest/CrewManifestUi.xaml.cs | 2 +- Content.Client/Damage/DamageVisualsSystem.cs | 4 +- Content.Client/DoAfter/DoAfterOverlay.cs | 2 +- Content.Client/Examine/ExamineSystem.cs | 2 +- Content.Client/Ghost/GhostComponent.cs | 6 +- Content.Client/Guidebook/GuideEntry.cs | 2 +- Content.Client/Guidebook/GuidebookSystem.cs | 2 +- Content.Client/LateJoin/LateJoinGui.cs | 4 +- Content.Client/Mapping/MappingSystem.cs | 6 +- Content.Client/PDA/PDAMenu.xaml.cs | 10 +-- .../Data/GeneratedParallaxTextureSource.cs | 8 +- .../Data/ImageParallaxTextureSource.cs | 2 +- Content.Client/Pointing/PointingSystem.cs | 2 +- .../UI/HumanoidProfileEditor.xaml.cs | 6 +- .../Resources/ResourceCacheExtensions.cs | 14 ++-- Content.Client/Screenshot/ScreenshotHook.cs | 2 +- Content.Client/Stack/StackVisualizer.cs | 2 +- .../Storage/Systems/ItemMapperSystem.cs | 2 +- Content.Client/TextScreen/TextScreenSystem.cs | 2 +- .../Weapons/Melee/MeleeWindupOverlay.cs | 2 +- .../EntityPrototypeComponentsTest.cs | 2 +- .../Tests/PostMapInitTest.cs | 4 +- .../Tests/SaveLoadMapTest.cs | 10 +-- .../Tests/SaveLoadSaveTest.cs | 12 +-- .../Abilities/Mime/MimePowersComponent.cs | 2 +- .../Access/Systems/IdExaminableSystem.cs | 2 +- .../Administration/Managers/AdminManager.cs | 2 +- .../Administration/Notes/AdminNotesSystem.cs | 2 +- .../Systems/AdminVerbSystem.Antags.cs | 8 +- .../Systems/AdminVerbSystem.Smites.cs | 74 +++++++++---------- .../Systems/AdminVerbSystem.Tools.cs | 74 +++++++++---------- .../Administration/Systems/AdminVerbSystem.cs | 26 +++---- .../Bible/Components/SummonableComponent.cs | 2 +- .../Body/Systems/InternalsSystem.cs | 2 +- Content.Server/Botany/SeedPrototype.cs | 2 +- .../Buckle/Systems/BuckleSystem.Buckle.cs | 2 +- .../Systems/ChameleonClothingSystem.cs | 2 +- .../Construction/Conditions/EntityAnchored.cs | 2 +- .../Construction/ConstructionSystem.Guided.cs | 2 +- .../ConstructionSystem.Machine.cs | 2 +- .../DetailExaminable/DetailExaminableystem.cs | 2 +- .../Systems/NetworkConfiguratorSystem.cs | 6 +- .../Unit/EntitySystems/DisposalUnitSystem.cs | 2 +- Content.Server/Entry/EntryPoint.cs | 2 +- Content.Server/Foldable/FoldableSystem.cs | 2 +- .../GameTicking/GameTicker.LobbyBackground.cs | 2 +- .../Prototypes/LobbyBackgroundPrototype.cs | 2 +- .../NukeopsRuleConfiguration.cs | 8 +- .../Ghost/Components/GhostComponent.cs | 2 +- .../Guardian/GuardianHostComponent.cs | 2 +- .../HealthExaminableSystem.cs | 2 +- .../Systems/HumanoidSystem.Modifier.cs | 2 +- .../Kitchen/EntitySystems/SharpSystem.cs | 2 +- .../EntitySystems/ExpendableLightSystem.cs | 2 +- .../EntitySystems/HandheldLightSystem.cs | 2 +- .../UnpoweredFlashlightSystem.cs | 2 +- .../System/TwoWayLeverSystem.cs | 4 +- Content.Server/Mapping/MappingSystem.cs | 2 +- Content.Server/Maps/GameMapPrototype.cs | 2 +- .../Components/StethoscopeComponent.cs | 2 +- .../Medical/Stethoscope/StethoscopeSystem.cs | 2 +- .../Nutrition/EntitySystems/DrinkSystem.cs | 2 +- .../Nutrition/EntitySystems/FoodSystem.cs | 2 +- .../Objectives/Conditions/DieCondition.cs | 2 +- .../Conditions/EscapeShuttleCondition.cs | 2 +- .../Conditions/KillPersonCondition.cs | 2 +- .../Conditions/RandomTraitorAliveCondition.cs | 2 +- .../RandomTraitorProgressCondition.cs | 2 +- Content.Server/PDA/Ringer/RingerSystem.cs | 2 +- .../EntitySystems/CableMultitoolSystem.cs | 2 +- .../EntitySystems/PowerReceiverSystem.cs | 4 +- Content.Server/Prayer/PrayableComponent.cs | 2 +- .../DungeonAtlasTemplateComponent.cs | 2 +- Content.Server/Procedural/DungeonSystem.cs | 2 +- Content.Server/Rotatable/RotatableSystem.cs | 8 +- Content.Server/Salvage/SalvageMapPrototype.cs | 2 +- .../Shuttles/Components/GridFillComponent.cs | 2 +- .../Components/StationArrivalsComponent.cs | 2 +- .../Station/StationConfig.Shuttles.cs | 4 +- Content.Server/Sticky/Systems/StickySystem.cs | 2 +- .../Storage/EntitySystems/DumpableSystem.cs | 2 +- .../Storage/EntitySystems/StorageSystem.cs | 4 +- Content.Server/Strip/StrippableSystem.cs | 4 +- Content.Server/Tabletop/TabletopSystem.cs | 2 +- .../Weapons/Melee/MeleeWeaponSystem.cs | 2 +- .../Ranged/Systems/GunSystem.Battery.cs | 2 +- .../Ranged/Systems/GunSystem.Cartridges.cs | 2 +- .../NetworkResourceUploadMessage.cs | 9 +-- .../SharedNetworkResourceManager.cs | 4 +- .../Cabinet/SharedItemCabinetSystem.cs | 4 +- .../Cargo/Prototypes/CargoShuttlePrototype.cs | 2 +- .../TypingIndicatorPrototype.cs | 2 +- .../EntitySystems/ToggleableClothingSystem.cs | 2 +- .../Containers/ItemSlot/ItemSlotsSystem.cs | 8 +- .../Examine/ExamineSystemShared.Group.cs | 2 +- .../Examine/GroupExamineComponent.cs | 2 +- .../Explosion/ExplosionPrototype.cs | 2 +- Content.Shared/Follower/FollowerSystem.cs | 2 +- Content.Shared/Item/SharedItemSystem.cs | 2 +- Content.Shared/Lock/LockSystem.cs | 4 +- Content.Shared/Maps/ContentTileDefinition.cs | 4 +- .../Procedural/DungeonRoomPrototype.cs | 2 +- .../Storage/Components/ItemMapperComponent.cs | 2 +- .../SharedEntityStorageSystem.cs | 4 +- .../Vehicle/Components/VehicleComponent.cs | 2 +- Content.Shared/Verbs/VerbCategory.cs | 2 +- .../Systems/SharedGunSystem.Interactions.cs | 2 +- .../Shared/Alert/AlertManagerTests.cs | 8 +- .../Shared/Alert/AlertPrototypeTests.cs | 2 +- Content.YAMLLinter/Program.cs | 4 +- 124 files changed, 273 insertions(+), 278 deletions(-) diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index f2be7be225..f76205063b 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -272,7 +272,7 @@ namespace Content.Client.Actions if (PlayerActions == null) return; - var file = new ResPath(path).ToRootedPath(); + var file = new ResourcePath(path).ToRootedPath(); TextReader reader = userData ? _resources.UserData.OpenText(file) : _resources.ContentFileReadText(file); diff --git a/Content.Client/Administration/Commands/UploadFile.cs b/Content.Client/Administration/Commands/UploadFile.cs index db501c8fb1..5056ef540f 100644 --- a/Content.Client/Administration/Commands/UploadFile.cs +++ b/Content.Client/Administration/Commands/UploadFile.cs @@ -30,7 +30,7 @@ public sealed class UploadFile : IConsoleCommand return; } - var path = new ResPath(args[0]).ToRelativePath(); + var path = new ResourcePath(args[0]).ToRelativePath(); var dialog = IoCManager.Resolve(); diff --git a/Content.Client/Administration/Commands/UploadFolder.cs b/Content.Client/Administration/Commands/UploadFolder.cs index 128da57577..02b094e916 100644 --- a/Content.Client/Administration/Commands/UploadFolder.cs +++ b/Content.Client/Administration/Commands/UploadFolder.cs @@ -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 ResPath BaseUploadFolderPath = new("/UploadFolder"); + private static readonly ResourcePath 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 ResPath(BaseUploadFolderPath + $"/{args[0]}"); + var folderPath = new ResourcePath(BaseUploadFolderPath + $"/{args[0]}"); if (!_resourceManager.UserData.Exists(folderPath.ToRootedPath())) { @@ -63,7 +63,7 @@ public sealed class UploadFolder : IConsoleCommand var netManager = IoCManager.Resolve(); var msg = netManager.CreateNetMessage(); - msg.RelativePath = new ResPath($"{filepath.ToString().Remove(0,14)}"); //removes /UploadFolder/ from path + msg.RelativePath = new ResourcePath($"{filepath.ToString().Remove(0,14)}"); //removes /UploadFolder/ from path msg.Data = data; netManager.ClientSendMessage(msg); diff --git a/Content.Client/Administration/Managers/ClientAdminManager.cs b/Content.Client/Administration/Managers/ClientAdminManager.cs index 67d847fe51..2242ef8cda 100644 --- a/Content.Client/Administration/Managers/ClientAdminManager.cs +++ b/Content.Client/Administration/Managers/ClientAdminManager.cs @@ -72,7 +72,7 @@ namespace Content.Client.Administration.Managers _netMgr.RegisterNetMessage(UpdateMessageRx); // Load flags for engine commands, since those don't have the attributes. - if (_res.TryContentFileRead(new ResPath("/clientCommandPerms.yml"), out var efs)) + if (_res.TryContentFileRead(new ResourcePath("/clientCommandPerms.yml"), out var efs)) { _localCommandPermissions.LoadPermissionsFromStream(efs); } diff --git a/Content.Client/Administration/Systems/AdminVerbSystem.cs b/Content.Client/Administration/Systems/AdminVerbSystem.cs index e37b51af52..3a19463b9f 100644 --- a/Content.Client/Administration/Systems/AdminVerbSystem.cs +++ b/Content.Client/Administration/Systems/AdminVerbSystem.cs @@ -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 ("/Textures/Interface/VerbIcons/vv.svg.192dpi.png")); + verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/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); diff --git a/Content.Client/Administration/Systems/KillSignSystem.cs b/Content.Client/Administration/Systems/KillSignSystem.cs index 59ee2e1714..5d86c0d91e 100644 --- a/Content.Client/Administration/Systems/KillSignSystem.cs +++ b/Content.Client/Administration/Systems/KillSignSystem.cs @@ -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 ResPath("Objects/Misc/killsign.rsi"), "sign")); + var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/killsign.rsi"), "sign")); sprite.LayerMapSet(KillSignKey.Key, layer); sprite.LayerSetOffset(layer, new Vector2(0.0f, adj)); diff --git a/Content.Client/AirlockPainter/AirlockPainterSystem.cs b/Content.Client/AirlockPainter/AirlockPainterSystem.cs index 6831b0e4e1..dd2995d482 100644 --- a/Content.Client/AirlockPainter/AirlockPainterSystem.cs +++ b/Content.Client/AirlockPainter/AirlockPainterSystem.cs @@ -28,7 +28,7 @@ namespace Content.Client.AirlockPainter continue; } - RSIResource doorRsi = _resourceCache.GetResource(TextureRoot / new ResPath(iconPath)); + RSIResource doorRsi = _resourceCache.GetResource(TextureRoot / new ResourcePath(iconPath)); if (!doorRsi.RSI.TryGetState("closed", out var icon)) { Entries.Add(new AirlockPainterEntry(style, null)); diff --git a/Content.Client/Atmos/Miasma/FliesSystem.cs b/Content.Client/Atmos/Miasma/FliesSystem.cs index c6f94c4a01..493ca8bd4b 100644 --- a/Content.Client/Atmos/Miasma/FliesSystem.cs +++ b/Content.Client/Atmos/Miasma/FliesSystem.cs @@ -30,7 +30,7 @@ public sealed class FliesSystem : EntitySystem if (sprite.LayerMapTryGet(FliesKey.Key, out var _)) return; - var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ("Objects/Misc/flies.rsi"), "flies")); + var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/flies.rsi"), "flies")); sprite.LayerMapSet(FliesKey.Key, layer); } diff --git a/Content.Client/Atmos/Overlays/GasTileOverlay.cs b/Content.Client/Atmos/Overlays/GasTileOverlay.cs index 209b8ee6b0..ac8eb70afc 100644 --- a/Content.Client/Atmos/Overlays/GasTileOverlay.cs +++ b/Content.Client/Atmos/Overlays/GasTileOverlay.cs @@ -62,9 +62,9 @@ namespace Content.Client.Atmos.Overlays SpriteSpecifier overlay; if (!string.IsNullOrEmpty(gasPrototype.GasOverlaySprite) && !string.IsNullOrEmpty(gasPrototype.GasOverlayState)) - overlay = new SpriteSpecifier.Rsi(new (gasPrototype.GasOverlaySprite), gasPrototype.GasOverlayState); + overlay = new SpriteSpecifier.Rsi(new ResourcePath(gasPrototype.GasOverlaySprite), gasPrototype.GasOverlayState); else if (!string.IsNullOrEmpty(gasPrototype.GasOverlayTexture)) - overlay = new SpriteSpecifier.Texture(new (gasPrototype.GasOverlayTexture)); + overlay = new SpriteSpecifier.Texture(new ResourcePath(gasPrototype.GasOverlayTexture)); else continue; diff --git a/Content.Client/Audio/AmbientSoundSystem.cs b/Content.Client/Audio/AmbientSoundSystem.cs index e357e63c25..a26b7cc515 100644 --- a/Content.Client/Audio/AmbientSoundSystem.cs +++ b/Content.Client/Audio/AmbientSoundSystem.cs @@ -205,7 +205,7 @@ namespace Content.Client.Audio string key; if (ambientComp.Sound is SoundPathSpecifier path) - key = path.Path.ToString(); + key = path.Path?.ToString() ?? string.Empty; else key = ((SoundCollectionSpecifier) ambientComp.Sound).Collection ?? string.Empty; diff --git a/Content.Client/Changelog/ChangelogManager.cs b/Content.Client/Changelog/ChangelogManager.cs index 0e27ec7f6a..59fb7dc182 100644 --- a/Content.Client/Changelog/ChangelogManager.cs +++ b/Content.Client/Changelog/ChangelogManager.cs @@ -43,7 +43,7 @@ namespace Content.Client.Changelog NewChangelogEntries = false; NewChangelogEntriesChanged?.Invoke(); - using var sw = _resource.UserData.OpenWriteText(new ($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}")); + using var sw = _resource.UserData.OpenWriteText(new ResourcePath($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}")); sw.Write(MaxId.ToString()); } @@ -60,7 +60,7 @@ namespace Content.Client.Changelog MaxId = changelog.Max(c => c.Id); - var path = new ResPath($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}"); + var path = new ResourcePath($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}"); if(_resource.UserData.TryReadAllText(path, out var lastReadIdText)) { LastReadId = int.Parse(lastReadIdText); @@ -75,7 +75,7 @@ namespace Content.Client.Changelog { return Task.Run(() => { - var yamlData = _resource.ContentFileReadYaml(new ("/Changelog/Changelog.yml")); + var yamlData = _resource.ContentFileReadYaml(new ResourcePath("/Changelog/Changelog.yml")); if (yamlData.Documents.Count == 0) return new List(); diff --git a/Content.Client/Changelog/ChangelogWindow.xaml.cs b/Content.Client/Changelog/ChangelogWindow.xaml.cs index 88981268af..1cb8377c99 100644 --- a/Content.Client/Changelog/ChangelogWindow.xaml.cs +++ b/Content.Client/Changelog/ChangelogWindow.xaml.cs @@ -182,7 +182,7 @@ namespace Content.Client.Changelog return new TextureRect { - Texture = _resourceCache.GetTexture(new ResPath($"/Textures/Interface/Changelog/{file}")), + Texture = _resourceCache.GetTexture(new ResourcePath($"/Textures/Interface/Changelog/{file}")), VerticalAlignment = VAlignment.Top, TextureScale = (0.5f, 0.5f), Margin = new Thickness(2, 4, 6, 2), diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs index d0913e5cdb..5f37206737 100644 --- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs +++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs @@ -38,7 +38,7 @@ namespace Content.Client.Chemistry.UI // Pill type selection buttons, in total there are 20 pills. // Pill rsi file should have states named as pill1, pill2, and so on. - var resourcePath = new ResPath(PillsRsiPath); + var resourcePath = new ResourcePath(PillsRsiPath); var pillTypeGroup = new ButtonGroup(); PillTypeButtons = new Button[20]; for (uint i = 0; i < PillTypeButtons.Length; i++) diff --git a/Content.Client/Credits/CreditsWindow.xaml.cs b/Content.Client/Credits/CreditsWindow.xaml.cs index 1b2a63f408..a2145b479d 100644 --- a/Content.Client/Credits/CreditsWindow.xaml.cs +++ b/Content.Client/Credits/CreditsWindow.xaml.cs @@ -103,7 +103,7 @@ namespace Content.Client.Credits private IEnumerable LoadPatrons() { - var yamlStream = _resourceManager.ContentFileReadYaml(new ("/Credits/Patrons.yml")); + var yamlStream = _resourceManager.ContentFileReadYaml(new ResourcePath("/Credits/Patrons.yml")); var sequence = (YamlSequenceNode) yamlStream.Documents[0].RootNode; return sequence diff --git a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs index 2f6f5f9268..3a043b595f 100644 --- a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs +++ b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs @@ -121,7 +121,7 @@ public sealed partial class CrewManifestUi : DefaultWindow AddChild(gridContainer); - var path = new ResPath("/Textures/Interface/Misc/job_icons.rsi"); + var path = new ResourcePath("/Textures/Interface/Misc/job_icons.rsi"); cache.TryGetResource(path, out RSIResource? rsi); foreach (var entry in entries) diff --git a/Content.Client/Damage/DamageVisualsSystem.cs b/Content.Client/Damage/DamageVisualsSystem.cs index 41f705c3f2..aaef798101 100644 --- a/Content.Client/Damage/DamageVisualsSystem.cs +++ b/Content.Client/Damage/DamageVisualsSystem.cs @@ -328,7 +328,7 @@ public sealed class DamageVisualsSystem : VisualizerSystem(); _meta = _entManager.EntitySysManager.GetEntitySystem(); - var sprite = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/progress_bar.rsi"), "icon"); + var sprite = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/progress_bar.rsi"), "icon"); _barTexture = _entManager.EntitySysManager.GetEntitySystem().Frame0(sprite); _shader = protoManager.Index("unshaded").Instance(); diff --git a/Content.Client/Examine/ExamineSystem.cs b/Content.Client/Examine/ExamineSystem.cs index 9b3e209c3b..39fc1408c4 100644 --- a/Content.Client/Examine/ExamineSystem.cs +++ b/Content.Client/Examine/ExamineSystem.cs @@ -117,7 +117,7 @@ namespace Content.Client.Examine // Center it on the entity if they use the verb instead. verb.Act = () => DoExamine(args.Target, false); verb.Text = Loc.GetString("examine-verb-name"); - verb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")); + verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")); verb.ShowOnExamineTooltip = false; verb.ClientExclusive = true; args.Verbs.Add(verb); diff --git a/Content.Client/Ghost/GhostComponent.cs b/Content.Client/Ghost/GhostComponent.cs index 99f19d4a15..aaf1da46e6 100644 --- a/Content.Client/Ghost/GhostComponent.cs +++ b/Content.Client/Ghost/GhostComponent.cs @@ -13,7 +13,7 @@ namespace Content.Client.Ghost public InstantAction ToggleLightingAction = new() { - Icon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/light.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/VerbIcons/light.svg.192dpi.png")), DisplayName = "ghost-gui-toggle-lighting-manager-name", Description = "ghost-gui-toggle-lighting-manager-desc", UserPopup = "ghost-gui-toggle-lighting-manager-popup", @@ -24,7 +24,7 @@ namespace Content.Client.Ghost public InstantAction ToggleFoVAction = new() { - Icon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/vv.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/VerbIcons/vv.svg.192dpi.png")), DisplayName = "ghost-gui-toggle-fov-name", Description = "ghost-gui-toggle-fov-desc", UserPopup = "ghost-gui-toggle-fov-popup", @@ -35,7 +35,7 @@ namespace Content.Client.Ghost public InstantAction ToggleGhostsAction = new() { - Icon = new SpriteSpecifier.Rsi(new ("Mobs/Ghosts/ghost_human.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("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", diff --git a/Content.Client/Guidebook/GuideEntry.cs b/Content.Client/Guidebook/GuideEntry.cs index f6029e78cb..da1b560c28 100644 --- a/Content.Client/Guidebook/GuideEntry.cs +++ b/Content.Client/Guidebook/GuideEntry.cs @@ -10,7 +10,7 @@ public class GuideEntry /// /// The file containing the contents of this guide. /// - [DataField("text", required: true)] public ResPath Text = default!; + [DataField("text", required: true)] public ResourcePath Text = default!; /// /// The unique id for this guide. diff --git a/Content.Client/Guidebook/GuidebookSystem.cs b/Content.Client/Guidebook/GuidebookSystem.cs index acaa51524b..e6272f440c 100644 --- a/Content.Client/Guidebook/GuidebookSystem.cs +++ b/Content.Client/Guidebook/GuidebookSystem.cs @@ -49,7 +49,7 @@ public sealed class GuidebookSystem : EntitySystem args.Verbs.Add(new() { Text = Loc.GetString("guide-help-verb"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/information.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")), Act = () => OnGuidebookOpen?.Invoke(component.Guides, null, null, component.IncludeChildren, component.Guides[0]), ClientExclusive = true, CloseMenu = true diff --git a/Content.Client/LateJoin/LateJoinGui.cs b/Content.Client/LateJoin/LateJoinGui.cs index b2d8240644..5da927f9c3 100644 --- a/Content.Client/LateJoin/LateJoinGui.cs +++ b/Content.Client/LateJoin/LateJoinGui.cs @@ -231,7 +231,7 @@ namespace Content.Client.LateJoin Stretch = TextureRect.StretchMode.KeepCentered }; - var specifier = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/job_icons.rsi"), prototype.Icon); + var specifier = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/job_icons.rsi"), prototype.Icon); icon.Texture = _sprites.Frame0(specifier); jobSelector.AddChild(icon); @@ -262,7 +262,7 @@ namespace Content.Client.LateJoin { TextureScale = (0.4f, 0.4f), Stretch = TextureRect.StretchMode.KeepCentered, - Texture = _sprites.Frame0(new SpriteSpecifier.Texture(new ("/Textures/Interface/Nano/lock.svg.192dpi.png"))), + Texture = _sprites.Frame0(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Nano/lock.svg.192dpi.png"))), HorizontalExpand = true, HorizontalAlignment = HAlignment.Right, }); diff --git a/Content.Client/Mapping/MappingSystem.cs b/Content.Client/Mapping/MappingSystem.cs index 8a5100925d..bf34ba3c6a 100644 --- a/Content.Client/Mapping/MappingSystem.cs +++ b/Content.Client/Mapping/MappingSystem.cs @@ -17,12 +17,12 @@ public sealed partial class MappingSystem : EntitySystem /// /// The icon to use for space tiles. /// - private readonly SpriteSpecifier _spaceIcon = new SpriteSpecifier.Texture(new ("Tiles/cropped_parallax.png")); + private readonly SpriteSpecifier _spaceIcon = new SpriteSpecifier.Texture(new ResourcePath("Tiles/cropped_parallax.png")); /// /// The icon to use for entity-eraser. /// - private readonly SpriteSpecifier _deleteIcon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/delete.svg.192dpi.png")); + private readonly SpriteSpecifier _deleteIcon = new SpriteSpecifier.Texture(new ResourcePath("Interface/VerbIcons/delete.svg.192dpi.png")); public string DefaultMappingActions = "/mapping_actions.yml"; @@ -80,7 +80,7 @@ public sealed partial class MappingSystem : EntitySystem var tileIcon = contentTileDef.IsSpace ? _spaceIcon - : new SpriteSpecifier.Texture(contentTileDef.Sprite!.Value); + : new SpriteSpecifier.Texture(contentTileDef.Sprite!); ev.Action = new InstantAction() { diff --git a/Content.Client/PDA/PDAMenu.xaml.cs b/Content.Client/PDA/PDAMenu.xaml.cs index 5d30e67e1b..b90b2aa7db 100644 --- a/Content.Client/PDA/PDAMenu.xaml.cs +++ b/Content.Client/PDA/PDAMenu.xaml.cs @@ -28,11 +28,11 @@ namespace Content.Client.PDA ViewContainer.OnChildAdded += control => control.Visible = false; - 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.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.OnPressed += _ => ToHomeScreen(); diff --git a/Content.Client/Parallax/Data/GeneratedParallaxTextureSource.cs b/Content.Client/Parallax/Data/GeneratedParallaxTextureSource.cs index 15ec9d959b..702ba5f3ab 100644 --- a/Content.Client/Parallax/Data/GeneratedParallaxTextureSource.cs +++ b/Content.Client/Parallax/Data/GeneratedParallaxTextureSource.cs @@ -23,7 +23,7 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource /// In client resources. /// [DataField("configPath")] - public ResPath ParallaxConfigPath { get; } = new("/parallax_config.toml"); + public ResourcePath ParallaxConfigPath { get; } = new("/parallax_config.toml"); /// /// ID for debugging, caching, and so forth. @@ -37,13 +37,13 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource /// Cached path. /// In user directory. /// - private ResPath ParallaxCachedImagePath => new($"/parallax_{Identifier}cache.png"); + private ResourcePath ParallaxCachedImagePath => new($"/parallax_{Identifier}cache.png"); /// /// Old parallax config path (for checking for parallax updates). /// In user directory. /// - private ResPath PreviousParallaxConfigPath => new($"/parallax_{Identifier}config_old"); + private ResourcePath PreviousParallaxConfigPath => new($"/parallax_{Identifier}config_old"); async Task IParallaxTextureSource.GenerateTexture(CancellationToken cancel) { @@ -113,7 +113,7 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource for (var i = 0; i < debugImages!.Count; i++) { var debugImage = debugImages[i]; - using var debugImageStream = StaticIoC.ResC.UserData.OpenWrite(new ResPath($"/parallax_{Identifier}debug_{i}.png")); + using var debugImageStream = StaticIoC.ResC.UserData.OpenWrite(new ResourcePath($"/parallax_{Identifier}debug_{i}.png")); debugImage.SaveAsPng(debugImageStream); } } diff --git a/Content.Client/Parallax/Data/ImageParallaxTextureSource.cs b/Content.Client/Parallax/Data/ImageParallaxTextureSource.cs index d4ac089236..8ebb970fc7 100644 --- a/Content.Client/Parallax/Data/ImageParallaxTextureSource.cs +++ b/Content.Client/Parallax/Data/ImageParallaxTextureSource.cs @@ -16,7 +16,7 @@ public sealed class ImageParallaxTextureSource : IParallaxTextureSource /// Texture path. /// [DataField("path", required: true)] - public ResPath Path { get; } = default!; + public ResourcePath Path { get; } = default!; Task IParallaxTextureSource.GenerateTexture(CancellationToken cancel) { diff --git a/Content.Client/Pointing/PointingSystem.cs b/Content.Client/Pointing/PointingSystem.cs index f8bae5664b..884c5ba83c 100644 --- a/Content.Client/Pointing/PointingSystem.cs +++ b/Content.Client/Pointing/PointingSystem.cs @@ -55,7 +55,7 @@ public sealed class PointingSystem : SharedPointingSystem Verb verb = new() { Text = Loc.GetString("pointing-verb-get-data-text"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/point.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/point.svg.192dpi.png")), ClientExclusive = true, Act = () => RaiseNetworkEvent(new PointingAttemptEvent(args.Target)) }; diff --git a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs index b404b13fcf..d95d72b937 100644 --- a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs @@ -53,7 +53,7 @@ namespace Content.Client.Preferences.UI private readonly IEntityManager _entMan; private readonly IConfigurationManager _configurationManager; private readonly MarkingManager _markingManager; - + private LineEdit _ageEdit => CAgeEdit; private LineEdit _nameEdit => CNameEdit; private LineEdit _flavorTextEdit = null!; @@ -1060,7 +1060,7 @@ namespace Content.Client.Preferences.UI { return; } - + // facial hair color Color? facialHairColor = null; if ( Profile.Appearance.FacialHairStyleId != HairStyles.DefaultFacialHairStyle && @@ -1213,7 +1213,7 @@ namespace Content.Client.Preferences.UI if (job.Icon != null) { - var specifier = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/job_icons.rsi"), + var specifier = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/job_icons.rsi"), job.Icon); icon.Texture = specifier.Frame0(); } diff --git a/Content.Client/Resources/ResourceCacheExtensions.cs b/Content.Client/Resources/ResourceCacheExtensions.cs index b2808e007e..cb0626c128 100644 --- a/Content.Client/Resources/ResourceCacheExtensions.cs +++ b/Content.Client/Resources/ResourceCacheExtensions.cs @@ -8,27 +8,27 @@ namespace Content.Client.Resources [PublicAPI] public static class ResourceCacheExtensions { - public static Texture GetTexture(this IResourceCache cache, ResPath path) + public static Texture GetTexture(this IResourceCache cache, ResourcePath path) { return cache.GetResource(path); } public static Texture GetTexture(this IResourceCache cache, string path) { - return GetTexture(cache, new ResPath(path)); + return GetTexture(cache, new ResourcePath(path)); } - public static Font GetFont(this IResourceCache cache, ResPath path, int size) + public static Font GetFont(this IResourceCache cache, ResourcePath path, int size) { return new VectorFont(cache.GetResource(path), size); } public static Font GetFont(this IResourceCache cache, string path, int size) { - return cache.GetFont(new ResPath(path), size); + return cache.GetFont(new ResourcePath(path), size); } - public static Font GetFont(this IResourceCache cache, ResPath[] path, int size) + public static Font GetFont(this IResourceCache cache, ResourcePath[] path, int size) { var fs = new Font[path.Length]; for (var i = 0; i < path.Length; i++) @@ -39,9 +39,9 @@ namespace Content.Client.Resources public static Font GetFont(this IResourceCache cache, string[] path, int size) { - var rp = new ResPath[path.Length]; + var rp = new ResourcePath[path.Length]; for (var i = 0; i < path.Length; i++) - rp[i] = new ResPath(path[i]); + rp[i] = new ResourcePath(path[i]); return cache.GetFont(rp, size); } diff --git a/Content.Client/Screenshot/ScreenshotHook.cs b/Content.Client/Screenshot/ScreenshotHook.cs index 753691a58e..31530c4e9a 100644 --- a/Content.Client/Screenshot/ScreenshotHook.cs +++ b/Content.Client/Screenshot/ScreenshotHook.cs @@ -18,7 +18,7 @@ namespace Content.Client.Screenshot { internal sealed class ScreenshotHook : IScreenshotHook { - private static readonly ResPath BaseScreenshotPath = new("/Screenshots"); + private static readonly ResourcePath BaseScreenshotPath = new("/Screenshots"); [Dependency] private readonly IInputManager _inputManager = default!; [Dependency] private readonly IClyde _clyde = default!; diff --git a/Content.Client/Stack/StackVisualizer.cs b/Content.Client/Stack/StackVisualizer.cs index a3437bb67c..ae1c96f261 100644 --- a/Content.Client/Stack/StackVisualizer.cs +++ b/Content.Client/Stack/StackVisualizer.cs @@ -76,7 +76,7 @@ namespace Content.Client.Stack /// [DataField("composite")] private bool _isComposite; - [DataField("sprite")] private ResPath? _spritePath; + [DataField("sprite")] private ResourcePath? _spritePath; [Obsolete("Subscribe to your component being initialised instead.")] public override void InitializeEntity(EntityUid entity) diff --git a/Content.Client/Storage/Systems/ItemMapperSystem.cs b/Content.Client/Storage/Systems/ItemMapperSystem.cs index 71c1c5b3be..5472126ada 100644 --- a/Content.Client/Storage/Systems/ItemMapperSystem.cs +++ b/Content.Client/Storage/Systems/ItemMapperSystem.cs @@ -48,7 +48,7 @@ public sealed class ItemMapperSystem : SharedItemMapperSystem foreach (var sprite in component.SpriteLayers) { spriteComponent.LayerMapReserveBlank(sprite); - spriteComponent.LayerSetSprite(sprite, new SpriteSpecifier.Rsi(component.RSIPath!.Value, sprite)); + spriteComponent.LayerSetSprite(sprite, new SpriteSpecifier.Rsi(component.RSIPath!, sprite)); spriteComponent.LayerSetVisible(sprite, false); } } diff --git a/Content.Client/TextScreen/TextScreenSystem.cs b/Content.Client/TextScreen/TextScreenSystem.cs index 20eb902579..ce3928b98b 100644 --- a/Content.Client/TextScreen/TextScreenSystem.cs +++ b/Content.Client/TextScreen/TextScreenSystem.cs @@ -88,7 +88,7 @@ public sealed class TextScreenSystem : VisualizerSystem(); _transform = _entManager.EntitySysManager.GetEntitySystem(); - var sprite = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/progress_bar.rsi"), "icon"); + var sprite = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/progress_bar.rsi"), "icon"); _texture = _entManager.EntitySysManager.GetEntitySystem().Frame0(sprite); _shader = protoManager.Index("unshaded").Instance(); } diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs b/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs index 30006d59dc..40c181346d 100644 --- a/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs +++ b/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs @@ -24,7 +24,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components var client = pairTracker.Pair.Client; var sResourceManager = server.ResolveDependency(); - var prototypePath = new ResPath("/Prototypes/"); + var prototypePath = new ResourcePath("/Prototypes/"); var paths = sResourceManager.ContentFindFiles(prototypePath) .ToList() .AsParallel() diff --git a/Content.IntegrationTests/Tests/PostMapInitTest.cs b/Content.IntegrationTests/Tests/PostMapInitTest.cs index a1d9045185..c1d7c2ac48 100644 --- a/Content.IntegrationTests/Tests/PostMapInitTest.cs +++ b/Content.IntegrationTests/Tests/PostMapInitTest.cs @@ -89,7 +89,7 @@ namespace Content.IntegrationTests.Tests var server = pairTracker.Pair.Server; var resourceManager = server.ResolveDependency(); - var mapFolder = new ResPath("/Maps"); + var mapFolder = new ResourcePath("/Maps"); var maps = resourceManager .ContentFindFiles(mapFolder) .Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith(".", StringComparison.Ordinal)) @@ -299,7 +299,7 @@ namespace Content.IntegrationTests.Tests var gameMaps = protoManager.EnumeratePrototypes().Select(o => o.MapPath).ToHashSet(); - var mapFolder = new ResPath("/Maps"); + var mapFolder = new ResourcePath("/Maps"); var maps = resourceManager .ContentFindFiles(mapFolder) .Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith(".", StringComparison.Ordinal)) diff --git a/Content.IntegrationTests/Tests/SaveLoadMapTest.cs b/Content.IntegrationTests/Tests/SaveLoadMapTest.cs index 904dd0c1b5..caf8e672cd 100644 --- a/Content.IntegrationTests/Tests/SaveLoadMapTest.cs +++ b/Content.IntegrationTests/Tests/SaveLoadMapTest.cs @@ -27,9 +27,9 @@ namespace Content.IntegrationTests.Tests var xformSystem = sEntities.EntitySysManager.GetEntitySystem(); var resManager = server.ResolveDependency(); - await server.WaitAssertion(() => + await server.WaitPost(() => { - var dir = new ResPath(mapPath).Directory; + var dir = new ResourcePath(mapPath).Directory; resManager.UserData.CreateDir(dir); var mapId = mapManager.CreateMap(); @@ -50,17 +50,14 @@ namespace Content.IntegrationTests.Tests Assert.Multiple(() => mapLoader.SaveMap(mapId, mapPath)); Assert.Multiple(() => mapManager.DeleteMap(mapId)); }); - await server.WaitIdleAsync(); - await server.WaitAssertion(() => + await server.WaitPost(() => { Assert.Multiple(() => mapLoader.LoadMap(new MapId(10), mapPath)); }); - await server.WaitIdleAsync(); - await server.WaitAssertion(() => { { @@ -87,7 +84,6 @@ namespace Content.IntegrationTests.Tests Assert.That(mapGrid.GetTileRef(new Vector2i(0, 0)).Tile, Is.EqualTo(new Tile(2, (TileRenderFlag)1, 254))); } }); - await pairTracker.CleanReturnAsync(); } } diff --git a/Content.IntegrationTests/Tests/SaveLoadSaveTest.cs b/Content.IntegrationTests/Tests/SaveLoadSaveTest.cs index a94c25f19f..c85ca1952a 100644 --- a/Content.IntegrationTests/Tests/SaveLoadSaveTest.cs +++ b/Content.IntegrationTests/Tests/SaveLoadSaveTest.cs @@ -43,14 +43,14 @@ namespace Content.IntegrationTests.Tests string one; string two; - var rp1 = new ResPath("/save load save 1.yml"); + var rp1 = new ResourcePath("/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 ResPath("/save load save 2.yml"); + var rp2 = new ResourcePath("/save load save 2.yml"); await using (var stream = userData.Open(rp2, FileMode.Open)) using (var reader = new StreamReader(stream)) { @@ -117,13 +117,13 @@ namespace Content.IntegrationTests.Tests string one; string two; - await using (var stream = userData.Open(new ResPath("/load save ticks save 1.yml"), FileMode.Open)) + await using (var stream = userData.Open(new ResourcePath("/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 ResPath("/load save ticks save 2.yml"), FileMode.Open)) + await using (var stream = userData.Open(new ResourcePath("/load save ticks save 2.yml"), FileMode.Open)) using (var reader = new StreamReader(stream)) { two = await reader.ReadToEndAsync(); @@ -189,7 +189,7 @@ namespace Content.IntegrationTests.Tests }); await server.WaitIdleAsync(); - await using (var stream = userData.Open(new ResPath(fileA), FileMode.Open)) + await using (var stream = userData.Open(new ResourcePath(fileA), FileMode.Open)) using (var reader = new StreamReader(stream)) { yamlA = await reader.ReadToEndAsync(); @@ -210,7 +210,7 @@ namespace Content.IntegrationTests.Tests await server.WaitIdleAsync(); - await using (var stream = userData.Open(new ResPath(fileB), FileMode.Open)) + await using (var stream = userData.Open(new ResourcePath(fileB), FileMode.Open)) using (var reader = new StreamReader(stream)) { yamlB = await reader.ReadToEndAsync(); diff --git a/Content.Server/Abilities/Mime/MimePowersComponent.cs b/Content.Server/Abilities/Mime/MimePowersComponent.cs index 15db6b7709..e38935742b 100644 --- a/Content.Server/Abilities/Mime/MimePowersComponent.cs +++ b/Content.Server/Abilities/Mime/MimePowersComponent.cs @@ -28,7 +28,7 @@ namespace Content.Server.Abilities.Mime public InstantAction InvisibleWallAction = new() { UseDelay = TimeSpan.FromSeconds(30), - Icon = new SpriteSpecifier.Texture(new("Structures/Walls/solid.rsi/full.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Structures/Walls/solid.rsi/full.png")), DisplayName = "mime-invisible-wall", Description = "mime-invisible-wall-desc", Priority = -1, diff --git a/Content.Server/Access/Systems/IdExaminableSystem.cs b/Content.Server/Access/Systems/IdExaminableSystem.cs index 26b6d01ee6..009718efad 100644 --- a/Content.Server/Access/Systems/IdExaminableSystem.cs +++ b/Content.Server/Access/Systems/IdExaminableSystem.cs @@ -36,7 +36,7 @@ public sealed class IdExaminableSystem : EntitySystem Category = VerbCategory.Examine, Disabled = !detailsRange, Message = Loc.GetString("id-examinable-component-verb-disabled"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/character.svg.192dpi.png")) + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/character.svg.192dpi.png")) }; args.Verbs.Add(verb); diff --git a/Content.Server/Administration/Managers/AdminManager.cs b/Content.Server/Administration/Managers/AdminManager.cs index b79d1a7f20..04f66c27f4 100644 --- a/Content.Server/Administration/Managers/AdminManager.cs +++ b/Content.Server/Administration/Managers/AdminManager.cs @@ -197,7 +197,7 @@ namespace Content.Server.Administration.Managers } // Load flags for engine commands, since those don't have the attributes. - if (_res.TryContentFileRead(new ResPath("/engineCommandPerms.yml"), out var efs)) + if (_res.TryContentFileRead(new ResourcePath("/engineCommandPerms.yml"), out var efs)) { _commandPermissions.LoadPermissionsFromStream(efs); } diff --git a/Content.Server/Administration/Notes/AdminNotesSystem.cs b/Content.Server/Administration/Notes/AdminNotesSystem.cs index 90abb5bc26..e36c69883c 100644 --- a/Content.Server/Administration/Notes/AdminNotesSystem.cs +++ b/Content.Server/Administration/Notes/AdminNotesSystem.cs @@ -34,7 +34,7 @@ public sealed class AdminNotesSystem : EntitySystem { Text = Loc.GetString("admin-notes-verb-text"), Category = VerbCategory.Admin, - Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")), Act = () => _console.RemoteExecuteCommand(user, $"{OpenAdminNotesCommand.CommandName} \"{target.UserId}\""), Impact = LogImpact.Low }; diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs index 01caaa4e07..b134d15fb3 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs @@ -36,7 +36,7 @@ public sealed partial class AdminVerbSystem { Text = "Make Traitor", Category = VerbCategory.Antag, - Icon = new SpriteSpecifier.Rsi(new ResPath("/Textures/Structures/Wallmounts/posters.rsi"), "poster5_contraband"), + Icon = new SpriteSpecifier.Rsi((new ResourcePath("/Textures/Structures/Wallmounts/posters.rsi")), "poster5_contraband"), Act = () => { if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null) @@ -53,7 +53,7 @@ public sealed partial class AdminVerbSystem { Text = "Make Zombie", Category = VerbCategory.Antag, - Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Wallmounts/signs.rsi"), "bio"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Wallmounts/signs.rsi"), "bio"), Act = () => { TryComp(args.Target, out MindComponent? mindComp); @@ -72,7 +72,7 @@ public sealed partial class AdminVerbSystem { Text = "Make nuclear operative", Category = VerbCategory.Antag, - Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Wallmounts/signs.rsi"), "radiation"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Wallmounts/signs.rsi"), "radiation"), Act = () => { if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null) @@ -89,7 +89,7 @@ public sealed partial class AdminVerbSystem { Text = "Make Pirate", Category = VerbCategory.Antag, - Icon = new SpriteSpecifier.Rsi(new("/Textures/Clothing/Head/Hats/pirate.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Hats/pirate.rsi"), "icon"), Act = () => { if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null) diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs index 53bb567625..219b7a86d6 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs @@ -102,7 +102,7 @@ public sealed partial class AdminVerbSystem { Text = "Explode", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), Act = () => { var coords = Transform(args.Target).MapPosition; @@ -122,7 +122,7 @@ public sealed partial class AdminVerbSystem { Text = "Chess Dimension", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"), Act = () => { _godmodeSystem.EnableGodmode(args.Target); // So they don't suffocate. @@ -150,7 +150,7 @@ public sealed partial class AdminVerbSystem { Text = "Set Alight", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Fire/fire.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Fire/fire.png")), Act = () => { // Fuck you. Burn Forever. @@ -172,7 +172,7 @@ public sealed partial class AdminVerbSystem { Text = "Monkeyify", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/monkey.rsi"), "dead"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Animals/monkey.rsi"), "dead"), Act = () => { _polymorphSystem.PolymorphEntity(args.Target, "AdminMonkeySmite"); @@ -186,7 +186,7 @@ public sealed partial class AdminVerbSystem { Text = "Garbage Can", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Piping/disposal.rsi"), "disposal"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Piping/disposal.rsi"), "disposal"), Act = () => { _polymorphSystem.PolymorphEntity(args.Target, "AdminDisposalsSmite"); @@ -202,7 +202,7 @@ public sealed partial class AdminVerbSystem { Text = "Lung Cancer", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-l"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "lung-l"), Act = () => { _diseaseSystem.TryInfect(carrier, _prototypeManager.Index("StageIIIALungCancer"), @@ -221,7 +221,7 @@ public sealed partial class AdminVerbSystem { Text = "Electrocute", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"), Act = () => { int damageToDeal; @@ -266,7 +266,7 @@ public sealed partial class AdminVerbSystem { Text = "Creampie", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"), Act = () => { _creamPieSystem.SetCreamPied(args.Target, creamPied, true); @@ -283,7 +283,7 @@ public sealed partial class AdminVerbSystem { Text = "Remove blood", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"), Act = () => { _bloodstreamSystem.SpillAllSolutions(args.Target, bloodstream); @@ -306,7 +306,7 @@ public sealed partial class AdminVerbSystem { Text = "Vomit organs", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Fluids/vomit_toxin.rsi"), "vomit_toxin-1"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Fluids/vomit_toxin.rsi"), "vomit_toxin-1"), Act = () => { _vomitSystem.Vomit(args.Target, -1000, -1000); // You feel hollow! @@ -335,7 +335,7 @@ public sealed partial class AdminVerbSystem { Text = "Remove hands", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hands.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/remove-hands.png")), Act = () => { var baseXform = Transform(args.Target); @@ -357,7 +357,7 @@ public sealed partial class AdminVerbSystem { Text = "Remove hands", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hand.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/remove-hand.png")), Act = () => { var baseXform = Transform(args.Target); @@ -380,7 +380,7 @@ public sealed partial class AdminVerbSystem { Text = "Stomach Removal", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"), Act = () => { foreach (var (component, _) in _bodySystem.GetBodyOrganComponents(args.Target, body)) @@ -400,7 +400,7 @@ public sealed partial class AdminVerbSystem { Text = "Lungs Removal", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"), Act = () => { foreach (var (component, _) in _bodySystem.GetBodyOrganComponents(args.Target, body)) @@ -423,7 +423,7 @@ public sealed partial class AdminVerbSystem { Text = "Pinball", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/toys.rsi"), "basketball"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/toys.rsi"), "basketball"), Act = () => { var xform = Transform(args.Target); @@ -457,7 +457,7 @@ public sealed partial class AdminVerbSystem { Text = "Yeet", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), Act = () => { var xform = Transform(args.Target); @@ -488,7 +488,7 @@ public sealed partial class AdminVerbSystem { Text = "Become Bread", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"), Act = () => { _polymorphSystem.PolymorphEntity(args.Target, "AdminBreadSmite"); @@ -502,7 +502,7 @@ public sealed partial class AdminVerbSystem { Text = "Become Mouse", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"), Act = () => { _polymorphSystem.PolymorphEntity(args.Target, "AdminMouseSmite"); @@ -518,7 +518,7 @@ public sealed partial class AdminVerbSystem { Text = "Ghostkick", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/gavel.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/gavel.svg.192dpi.png")), Act = () => { _ghostKickManager.DoDisconnect(actorComponent.PlayerSession.ConnectedClient, "Smitten."); @@ -534,7 +534,7 @@ public sealed partial class AdminVerbSystem { Text = "Nyanify", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"), Act = () => { var ears = Spawn("ClothingHeadHatCatEars", Transform(args.Target).Coordinates); @@ -551,7 +551,7 @@ public sealed partial class AdminVerbSystem { Text = "Kill sign", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/killsign.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/killsign.rsi"), "icon"), Act = () => { EnsureComp(args.Target); @@ -566,7 +566,7 @@ public sealed partial class AdminVerbSystem Text = "Cluwne", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Mask/cluwne.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Mask/cluwne.rsi"), "icon"), Act = () => { @@ -581,7 +581,7 @@ public sealed partial class AdminVerbSystem { Text = "Maid", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"), Act = () => { SetOutfitCommand.SetOutfit(args.Target, "JanitorMaidGear", EntityManager, (_, clothing) => @@ -601,7 +601,7 @@ public sealed partial class AdminVerbSystem { Text = "Anger Pointing Arrows", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/pointing.rsi"), "pointing"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/pointing.rsi"), "pointing"), Act = () => { EnsureComp(args.Target); @@ -615,7 +615,7 @@ public sealed partial class AdminVerbSystem { Text = "Dust", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Materials/materials.rsi"), "ash"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Materials/materials.rsi"), "ash"), Act = () => { EntityManager.QueueDeleteEntity(args.Target); @@ -631,7 +631,7 @@ public sealed partial class AdminVerbSystem { Text = "Buffering", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Misc/buffering_smite_icon.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Misc/buffering_smite_icon.png")), Act = () => { EnsureComp(args.Target); @@ -645,7 +645,7 @@ public sealed partial class AdminVerbSystem { Text = "Become Instrument", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "icon"), Act = () => { _polymorphSystem.PolymorphEntity(args.Target, "AdminInstrumentSmite"); @@ -659,7 +659,7 @@ public sealed partial class AdminVerbSystem { Text = "Remove gravity", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Machines/gravity_generator.rsi"), "off"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Machines/gravity_generator.rsi"), "off"), Act = () => { var grav = EnsureComp(args.Target); @@ -676,7 +676,7 @@ public sealed partial class AdminVerbSystem { Text = "Reptilian Species Swap", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/toys.rsi"), "plushie_lizard"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/toys.rsi"), "plushie_lizard"), Act = () => { _polymorphSystem.PolymorphEntity(args.Target, "AdminLizardSmite"); @@ -690,7 +690,7 @@ public sealed partial class AdminVerbSystem { Text = "Locker stuff", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Storage/closet.rsi"), "generic"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Storage/closet.rsi"), "generic"), Act = () => { var xform = Transform(args.Target); @@ -712,7 +712,7 @@ public sealed partial class AdminVerbSystem { Text = "Headstand", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")), Act = () => { EnsureComp(args.Target); @@ -726,7 +726,7 @@ public sealed partial class AdminVerbSystem { Text = "Zoom in", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/zoom.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/zoom.png")), Act = () => { var eye = EnsureComp(args.Target); @@ -744,7 +744,7 @@ public sealed partial class AdminVerbSystem { Text = "Flip eye", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/flip.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/flip.png")), Act = () => { var eye = EnsureComp(args.Target); @@ -762,7 +762,7 @@ public sealed partial class AdminVerbSystem { Text = "Run Walk Swap", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/run-walk-swap.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/run-walk-swap.png")), Act = () => { var movementSpeed = EnsureComp(args.Target); @@ -782,7 +782,7 @@ public sealed partial class AdminVerbSystem { Text = "Speak Backwards", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/help-backwards.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/help-backwards.png")), Act = () => { EnsureComp(args.Target); @@ -796,7 +796,7 @@ public sealed partial class AdminVerbSystem { Text = "Disarm Prone", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Actions/disarm.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Actions/disarm.png")), Act = () => { EnsureComp(args.Target); @@ -810,7 +810,7 @@ public sealed partial class AdminVerbSystem { Text = "Super speed", Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/super_speed.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/super_speed.png")), Act = () => { var movementSpeed = EnsureComp(args.Target); diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs index 8e320f2bc0..1d8305787f 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs @@ -67,8 +67,8 @@ public sealed partial class AdminVerbSystem Text = airlock.BoltsDown ? "Unbolt" : "Bolt", Category = VerbCategory.Tricks, Icon = airlock.BoltsDown - ? new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/unbolt.png")) - : new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/bolt.png")), + ? new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/unbolt.png")) + : new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/bolt.png")), Act = () => { _airlockSystem.SetBoltsWithAudio(args.Target, airlock, !airlock.BoltsDown); @@ -86,7 +86,7 @@ public sealed partial class AdminVerbSystem { Text = airlock.EmergencyAccess ? "Emergency Access Off" : "Emergency Access On", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/emergency_access.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/emergency_access.png")), Act = () => { _airlockSystem.ToggleEmergencyAccess(args.Target, airlock); @@ -108,7 +108,7 @@ public sealed partial class AdminVerbSystem { Text = "Rejuvenate", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/rejuvenate.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rejuvenate.png")), Act = () => { RejuvenateCommand.PerformRejuvenate(args.Target); @@ -126,7 +126,7 @@ public sealed partial class AdminVerbSystem { Text = "Make Indestructible", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")), Act = () => { _godmodeSystem.EnableGodmode(args.Target); @@ -143,7 +143,7 @@ public sealed partial class AdminVerbSystem { Text = "Make Vulnerable", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")), Act = () => { _godmodeSystem.DisableGodmode(args.Target); @@ -161,7 +161,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Battery", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/fill_battery.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill_battery.png")), Act = () => { battery.CurrentCharge = battery.MaxCharge; @@ -177,7 +177,7 @@ public sealed partial class AdminVerbSystem { Text = "Drain Battery", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/drain_battery.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/drain_battery.png")), Act = () => { battery.CurrentCharge = 0; @@ -193,7 +193,7 @@ public sealed partial class AdminVerbSystem { Text = "Infinite Battery", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/infinite_battery.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/infinite_battery.png")), Act = () => { var recharger = EnsureComp(args.Target); @@ -213,7 +213,7 @@ public sealed partial class AdminVerbSystem { Text = "Block Unanchoring", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/anchor.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/anchor.svg.192dpi.png")), Act = () => { RemComp(args.Target, anchor); @@ -231,7 +231,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Internals Oxygen", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/oxygen.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/oxygen.rsi"), "icon"), Act = () => { RefillGasTank(args.Target, Gas.Oxygen, tank); @@ -246,7 +246,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Internals Nitrogen", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/red.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/red.rsi"), "icon"), Act = () => { RefillGasTank(args.Target, Gas.Nitrogen, tank); @@ -261,7 +261,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Internals Plasma", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/plasma.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/plasma.rsi"), "icon"), Act = () => { RefillGasTank(args.Target, Gas.Plasma, tank); @@ -279,7 +279,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Internals Oxygen", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/oxygen.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/oxygen.rsi"), "icon"), Act = () => { foreach (var slot in _inventorySystem.GetSlots(args.Target)) @@ -311,7 +311,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Internals Nitrogen", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/red.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/red.rsi"), "icon"), Act = () => { foreach (var slot in _inventorySystem.GetSlots(args.Target)) @@ -343,7 +343,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Internals Plasma", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Tanks/plasma.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/plasma.rsi"), "icon"), Act = () => { foreach (var slot in _inventorySystem.GetSlots(args.Target)) @@ -376,7 +376,7 @@ public sealed partial class AdminVerbSystem { Text = "Send to test arena", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), Act = () => { @@ -397,7 +397,7 @@ public sealed partial class AdminVerbSystem { Text = "Grant All Access", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "centcom"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "centcom"), Act = () => { GiveAllAccess(activeId.Value); @@ -412,7 +412,7 @@ public sealed partial class AdminVerbSystem { Text = "Revoke All Access", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "default"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "default"), Act = () => { RevokeAllAccess(activeId.Value); @@ -430,7 +430,7 @@ public sealed partial class AdminVerbSystem { Text = "Grant All Access", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "centcom"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "centcom"), Act = () => { GiveAllAccess(args.Target); @@ -445,7 +445,7 @@ public sealed partial class AdminVerbSystem { Text = "Revoke All Access", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/id_cards.rsi"), "default"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "default"), Act = () => { RevokeAllAccess(args.Target); @@ -464,7 +464,7 @@ public sealed partial class AdminVerbSystem { Text = "Adjust Stack", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/adjust-stack.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/adjust-stack.png")), Act = () => { // Unbounded intentionally. @@ -483,7 +483,7 @@ public sealed partial class AdminVerbSystem { Text = "Fill Stack", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/fill-stack.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill-stack.png")), Act = () => { _stackSystem.SetCount(args.Target, _stackSystem.GetMaxCount(stack), stack); @@ -499,7 +499,7 @@ public sealed partial class AdminVerbSystem { Text = "Rename", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/rename.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rename.png")), Act = () => { _quickDialog.OpenDialog(player, "Rename", "Name", (string newName) => @@ -517,7 +517,7 @@ public sealed partial class AdminVerbSystem { Text = "Redescribe", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/redescribe.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/redescribe.png")), Act = () => { _quickDialog.OpenDialog(player, "Redescribe", "Description", (LongString newDescription) => @@ -535,7 +535,7 @@ public sealed partial class AdminVerbSystem { Text = "Redescribe", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/rename_and_redescribe.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rename_and_redescribe.png")), Act = () => { _quickDialog.OpenDialog(player, "Rename & Redescribe", "Name", "Description", @@ -560,7 +560,7 @@ public sealed partial class AdminVerbSystem { Text = "Bar job slots", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/bar_jobslots.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/bar_jobslots.png")), Act = () => { foreach (var (job, _) in _stationJobsSystem.GetJobs(args.Target)) @@ -579,7 +579,7 @@ public sealed partial class AdminVerbSystem { Text = "Locate Cargo Shuttle", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Head/Soft/cargosoft.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Soft/cargosoft.rsi"), "icon"), Act = () => { var shuttle = Comp(args.Target).Shuttle; @@ -602,7 +602,7 @@ public sealed partial class AdminVerbSystem { Text = "Refill Battery", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/fill_battery.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill_battery.png")), Act = () => { foreach (var ent in childEnum) @@ -624,7 +624,7 @@ public sealed partial class AdminVerbSystem { Text = "Drain Battery", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/drain_battery.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/drain_battery.png")), Act = () => { foreach (var ent in childEnum) @@ -646,7 +646,7 @@ public sealed partial class AdminVerbSystem { Text = "Infinite Battery", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/infinite_battery.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/infinite_battery.png")), Act = () => { // this kills the sloth @@ -675,7 +675,7 @@ public sealed partial class AdminVerbSystem { Text = "Halt Movement", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/halt.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/halt.png")), Act = () => { _physics.SetLinearVelocity(args.Target, Vector2.Zero, body: physics); @@ -698,7 +698,7 @@ public sealed partial class AdminVerbSystem { Text = "Unpause Map", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/play.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/play.png")), Act = () => { _mapManager.SetMapPaused(map.MapId, false); @@ -715,7 +715,7 @@ public sealed partial class AdminVerbSystem { Text = "Pause Map", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/pause.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/pause.png")), Act = () => { _mapManager.SetMapPaused(map.MapId, true); @@ -735,7 +735,7 @@ public sealed partial class AdminVerbSystem { Text = "Snap Joints", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/snap_joints.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/snap_joints.png")), Act = () => { _jointSystem.ClearJoints(joints); @@ -753,7 +753,7 @@ public sealed partial class AdminVerbSystem { Text = "Make Minigun", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Weapons/Guns/HMGs/minigun.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Weapons/Guns/HMGs/minigun.rsi"), "icon"), Act = () => { gun.FireRate = 15; @@ -771,7 +771,7 @@ public sealed partial class AdminVerbSystem { Text = "Set Bullet Amount", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/caps.rsi"), "mag-6"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/caps.rsi"), "mag-6"), Act = () => { _quickDialog.OpenDialog(player, "Set Bullet Amount", $"Amount (max {ballisticAmmo.Capacity}):", (int amount) => diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.cs b/Content.Server/Administration/Systems/AdminVerbSystem.cs index 8ef3c1069b..656c247a6a 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.cs @@ -81,7 +81,7 @@ namespace Content.Server.Administration.Systems Verb verb = new(); verb.Text = Loc.GetString("ahelp-verb-get-data-text"); verb.Category = VerbCategory.Admin; - verb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/gavel.svg.192dpi.png")); + verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/gavel.svg.192dpi.png")); verb.Act = () => _console.RemoteExecuteCommand(player, $"openahelp \"{targetActor.PlayerSession.UserId}\""); verb.Impact = LogImpact.Low; @@ -91,7 +91,7 @@ namespace Content.Server.Administration.Systems Verb prayerVerb = new(); prayerVerb.Text = Loc.GetString("prayer-verbs-subtle-message"); prayerVerb.Category = VerbCategory.Admin; - prayerVerb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/pray.svg.png")); + prayerVerb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/pray.svg.png")); prayerVerb.Act = () => { _quickDialog.OpenDialog(player, "Subtle Message", "Message", "Popup Message", (string message, string popupMessage) => @@ -111,7 +111,7 @@ namespace Content.Server.Administration.Systems ? Loc.GetString("admin-verbs-unfreeze") : Loc.GetString("admin-verbs-freeze"), Category = VerbCategory.Admin, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/snow.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/snow.svg.192dpi.png")), Act = () => { if (frozen) @@ -147,7 +147,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("admin-verbs-teleport-to"), Category = VerbCategory.Admin, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/open.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")), Act = () => _console.ExecuteCommand(player, $"tpto {args.Target}"), Impact = LogImpact.Low }); @@ -157,7 +157,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("admin-verbs-teleport-here"), Category = VerbCategory.Admin, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/close.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png")), Act = () => _console.ExecuteCommand(player, $"tpto {args.Target} {args.User}"), Impact = LogImpact.Low }); @@ -196,7 +196,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("delete-verb-get-data-text"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")), Act = () => EntityManager.DeleteEntity(args.Target), Impact = LogImpact.Medium, ConfirmationPopup = true @@ -211,7 +211,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("rejuvenate-verb-get-data-text"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")), Act = () => RejuvenateCommand.PerformRejuvenate(args.Target), Impact = LogImpact.Medium }; @@ -270,7 +270,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("make-sentient-verb-get-data-text"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")), Act = () => MakeSentientCommand.MakeSentient(args.Target, EntityManager), Impact = LogImpact.Medium }; @@ -285,7 +285,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("set-outfit-verb-get-data-text"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), Act = () => _euiManager.OpenEui(new SetOutfitEui(args.Target), player), Impact = LogImpact.Medium }; @@ -299,7 +299,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("in-range-unoccluded-verb-get-data-text"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/information.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")), Act = () => { var message = args.User.InRangeUnOccluded(args.Target) @@ -319,7 +319,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("tube-direction-verb-get-data-text"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/information.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")), Act = () => _disposalTubes.PopupDirections(args.Target, tube, args.User) }; args.Verbs.Add(verb); @@ -345,7 +345,7 @@ namespace Content.Server.Administration.Systems Verb verb = new() { Text = Loc.GetString("configure-verb-get-data-text"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")), Category = VerbCategory.Debug, Act = () => _uiSystem.TryOpen(args.Target, ConfigurationUiKey.Key, actor.PlayerSession) }; @@ -360,7 +360,7 @@ namespace Content.Server.Administration.Systems { Text = Loc.GetString("edit-solutions-verb-get-data-text"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/spill.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/spill.svg.192dpi.png")), Act = () => OpenEditSolutionsEui(player, args.Target), Impact = LogImpact.Medium // maybe high depending on WHAT reagents they add... }; diff --git a/Content.Server/Bible/Components/SummonableComponent.cs b/Content.Server/Bible/Components/SummonableComponent.cs index 7b4ee11d99..97c4ad41a3 100644 --- a/Content.Server/Bible/Components/SummonableComponent.cs +++ b/Content.Server/Bible/Components/SummonableComponent.cs @@ -30,7 +30,7 @@ namespace Content.Server.Bible.Components [DataField("summonAction")] public InstantAction SummonAction = new() { - Icon = new SpriteSpecifier.Texture(new ("Clothing/Head/Hats/witch.rsi/icon.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Clothing/Head/Hats/witch.rsi/icon.png")), DisplayName = "bible-summon-verb", Description = "bible-summon-verb-desc", Event = new SummonActionEvent(), diff --git a/Content.Server/Body/Systems/InternalsSystem.cs b/Content.Server/Body/Systems/InternalsSystem.cs index 561c5d7c6d..6b0c8e046e 100644 --- a/Content.Server/Body/Systems/InternalsSystem.cs +++ b/Content.Server/Body/Systems/InternalsSystem.cs @@ -49,7 +49,7 @@ public sealed class InternalsSystem : EntitySystem ToggleInternals(uid, args.User, false, component); }, Message = Loc.GetString("action-description-internals-toggle"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/dot.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/dot.svg.192dpi.png")), Text = Loc.GetString("action-name-internals-toggle"), }; diff --git a/Content.Server/Botany/SeedPrototype.cs b/Content.Server/Botany/SeedPrototype.cs index 3eed7c9387..d47bc42f7e 100644 --- a/Content.Server/Botany/SeedPrototype.cs +++ b/Content.Server/Botany/SeedPrototype.cs @@ -206,7 +206,7 @@ public class SeedData #region Cosmetics [DataField("plantRsi", required: true)] - public ResPath PlantRsi { get; set; } = default!; + public ResourcePath PlantRsi { get; set; } = default!; [DataField("plantIconState")] public string PlantIconState { get; set; } = "produce"; diff --git a/Content.Server/Buckle/Systems/BuckleSystem.Buckle.cs b/Content.Server/Buckle/Systems/BuckleSystem.Buckle.cs index eb62e902f0..28002c0ffa 100644 --- a/Content.Server/Buckle/Systems/BuckleSystem.Buckle.cs +++ b/Content.Server/Buckle/Systems/BuckleSystem.Buckle.cs @@ -45,7 +45,7 @@ public sealed partial class BuckleSystem { Act = () => TryUnbuckle(uid, args.User, buckle: component), Text = Loc.GetString("verb-categories-unbuckle"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/unbuckle.svg.192dpi.png")) + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/unbuckle.svg.192dpi.png")) }; if (args.Target == args.User && args.Using == null) diff --git a/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs b/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs index d9aa0066a7..718627812f 100644 --- a/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs +++ b/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs @@ -48,7 +48,7 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem args.Verbs.Add(new InteractionVerb() { Text = Loc.GetString("chameleon-component-verb-text"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")), Act = () => TryOpenUi(uid, args.User, component) }); } diff --git a/Content.Server/Construction/Conditions/EntityAnchored.cs b/Content.Server/Construction/Conditions/EntityAnchored.cs index 78b7e33ee9..8cebfa5cf7 100644 --- a/Content.Server/Construction/Conditions/EntityAnchored.cs +++ b/Content.Server/Construction/Conditions/EntityAnchored.cs @@ -43,7 +43,7 @@ namespace Content.Server.Construction.Conditions Localization = Anchored ? "construction-step-condition-entity-anchored" : "construction-step-condition-entity-unanchored", - Icon = new SpriteSpecifier.Rsi(new ("Objects/Tools/wrench.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Tools/wrench.rsi"), "icon"), }; } } diff --git a/Content.Server/Construction/ConstructionSystem.Guided.cs b/Content.Server/Construction/ConstructionSystem.Guided.cs index 0877ec79ba..3a684aa94f 100644 --- a/Content.Server/Construction/ConstructionSystem.Guided.cs +++ b/Content.Server/Construction/ConstructionSystem.Guided.cs @@ -46,7 +46,7 @@ namespace Content.Server.Construction //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 ("/Textures/Interface/hammer_scaled.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/hammer_scaled.svg.192dpi.png")); verb.Act = () => { diff --git a/Content.Server/Construction/ConstructionSystem.Machine.cs b/Content.Server/Construction/ConstructionSystem.Machine.cs index 18dd4aef63..dcaeab79a2 100644 --- a/Content.Server/Construction/ConstructionSystem.Machine.cs +++ b/Content.Server/Construction/ConstructionSystem.Machine.cs @@ -53,7 +53,7 @@ public sealed partial class ConstructionSystem Text = Loc.GetString("machine-upgrade-examinable-verb-text"), Message = Loc.GetString("machine-upgrade-examinable-verb-message"), Category = VerbCategory.Examine, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/pickup.svg.192dpi.png")) + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/pickup.svg.192dpi.png")) }; args.Verbs.Add(verb); diff --git a/Content.Server/DetailExaminable/DetailExaminableystem.cs b/Content.Server/DetailExaminable/DetailExaminableystem.cs index dfe8de6efc..dec4929a2a 100644 --- a/Content.Server/DetailExaminable/DetailExaminableystem.cs +++ b/Content.Server/DetailExaminable/DetailExaminableystem.cs @@ -32,7 +32,7 @@ namespace Content.Server.DetailExaminable Category = VerbCategory.Examine, Disabled = !detailsRange, Message = Loc.GetString("detail-examinable-verb-disabled"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")) + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/examine.svg.192dpi.png")) }; args.Verbs.Add(verb); diff --git a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs index 3ba10dcbb9..54ac6107fb 100644 --- a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs @@ -177,8 +177,8 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem { Text = Loc.GetString(isDeviceList ? "network-configurator-configure" : "network-configurator-save-device"), Icon = isDeviceList ? - new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")) : - new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/in.svg.192dpi.png")), + new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")) : + new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/in.svg.192dpi.png")), Act = () => OnUsed(uid, component, args.Target, args.User), Impact = LogImpact.Low }; @@ -200,7 +200,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem AlternativeVerb verb = new() { Text = Loc.GetString("network-configurator-save-device"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/in.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/in.svg.192dpi.png")), Act = () => TryAddNetworkDevice(args.Target, args.Using.Value, args.User), Impact = LogImpact.Low }; diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 49aa7313a3..99c57378c1 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -95,7 +95,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems AlternativeVerb flushVerb = new(); flushVerb.Act = () => Engage(uid, component); flushVerb.Text = Loc.GetString("disposal-flush-verb-get-data-text"); - flushVerb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")); + flushVerb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")); flushVerb.Priority = 1; args.Verbs.Add(flushVerb); diff --git a/Content.Server/Entry/EntryPoint.cs b/Content.Server/Entry/EntryPoint.cs index 454ce38198..0d43c5ebed 100644 --- a/Content.Server/Entry/EntryPoint.cs +++ b/Content.Server/Entry/EntryPoint.cs @@ -125,7 +125,7 @@ namespace Content.Server.Entry var dest = configManager.GetCVar(CCVars.DestinationFile); if (!string.IsNullOrEmpty(dest)) { - var resPath = new ResPath(dest).ToRootedPath(); + var resPath = new ResourcePath(dest).ToRootedPath(); var file = resourceManager.UserData.OpenWriteText(resPath.WithName("chem_" + dest)); ChemistryJsonGenerator.PublishJson(file); file.Flush(); diff --git a/Content.Server/Foldable/FoldableSystem.cs b/Content.Server/Foldable/FoldableSystem.cs index 04a967f650..a7748ccce2 100644 --- a/Content.Server/Foldable/FoldableSystem.cs +++ b/Content.Server/Foldable/FoldableSystem.cs @@ -90,7 +90,7 @@ namespace Content.Server.Foldable { Act = () => TryToggleFold(uid, component), Text = component.IsFolded ? Loc.GetString("unfold-verb") : Loc.GetString("fold-verb"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/fold.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/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, diff --git a/Content.Server/GameTicking/GameTicker.LobbyBackground.cs b/Content.Server/GameTicking/GameTicker.LobbyBackground.cs index 7f2ccfe235..068a5ff700 100644 --- a/Content.Server/GameTicking/GameTicker.LobbyBackground.cs +++ b/Content.Server/GameTicking/GameTicker.LobbyBackground.cs @@ -11,7 +11,7 @@ public sealed partial class GameTicker public string? LobbyBackground { get; private set; } [ViewVariables] - private List? _lobbyBackgrounds; + private List? _lobbyBackgrounds; private static readonly string[] WhitelistedBackgroundExtensions = new string[] {"png", "jpg", "jpeg"}; diff --git a/Content.Server/GameTicking/Prototypes/LobbyBackgroundPrototype.cs b/Content.Server/GameTicking/Prototypes/LobbyBackgroundPrototype.cs index 27f9930df5..ffde20912a 100644 --- a/Content.Server/GameTicking/Prototypes/LobbyBackgroundPrototype.cs +++ b/Content.Server/GameTicking/Prototypes/LobbyBackgroundPrototype.cs @@ -17,5 +17,5 @@ public sealed class LobbyBackgroundPrototype : IPrototype /// The sprite to use as the background. This should ideally be 1920x1080. /// [DataField("background", required: true)] - public ResPath Background = default!; + public ResourcePath Background = default!; } diff --git a/Content.Server/GameTicking/Rules/Configurations/NukeopsRuleConfiguration.cs b/Content.Server/GameTicking/Rules/Configurations/NukeopsRuleConfiguration.cs index 09ccd7ad31..43652c0eb7 100644 --- a/Content.Server/GameTicking/Rules/Configurations/NukeopsRuleConfiguration.cs +++ b/Content.Server/GameTicking/Rules/Configurations/NukeopsRuleConfiguration.cs @@ -74,11 +74,11 @@ public sealed class NukeopsRuleConfiguration : GameRuleConfiguration [DataField("normalNames", customTypeSerializer: typeof(PrototypeIdSerializer))] public string NormalNames = "SyndicateNamesNormal"; - [DataField("outpostMap", customTypeSerializer: typeof(ResPathSerializer))] - public ResPath NukieOutpostMap = new("/Maps/nukieplanet.yml"); + [DataField("outpostMap", customTypeSerializer: typeof(ResourcePathSerializer))] + public ResourcePath? NukieOutpostMap = new("/Maps/nukieplanet.yml"); - [DataField("shuttleMap", customTypeSerializer: typeof(ResPathSerializer))] - public ResPath NukieShuttleMap = new("/Maps/infiltrator.yml"); + [DataField("shuttleMap", customTypeSerializer: typeof(ResourcePathSerializer))] + public ResourcePath? NukieShuttleMap = new("/Maps/infiltrator.yml"); [DataField("greetingSound", customTypeSerializer: typeof(SoundSpecifierTypeSerializer))] public SoundSpecifier? GreetSound = new SoundPathSpecifier("/Audio/Misc/nukeops.ogg"); diff --git a/Content.Server/Ghost/Components/GhostComponent.cs b/Content.Server/Ghost/Components/GhostComponent.cs index 02f123d6a9..b0d51556f0 100644 --- a/Content.Server/Ghost/Components/GhostComponent.cs +++ b/Content.Server/Ghost/Components/GhostComponent.cs @@ -21,7 +21,7 @@ namespace Content.Server.Ghost.Components public InstantAction Action = new() { UseDelay = TimeSpan.FromSeconds(120), - Icon = new SpriteSpecifier.Texture(new ("Interface/Actions/scream.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/scream.png")), DisplayName = "action-name-boo", Description = "action-description-boo", CheckCanInteract = false, diff --git a/Content.Server/Guardian/GuardianHostComponent.cs b/Content.Server/Guardian/GuardianHostComponent.cs index e317f59be8..bb56d5ec4b 100644 --- a/Content.Server/Guardian/GuardianHostComponent.cs +++ b/Content.Server/Guardian/GuardianHostComponent.cs @@ -29,7 +29,7 @@ namespace Content.Server.Guardian { DisplayName = "action-name-guardian", Description = "action-description-guardian", - Icon = new SpriteSpecifier.Texture(new ("Interface/Actions/manifest.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/manifest.png")), UseDelay = TimeSpan.FromSeconds(2), CheckCanInteract = false, // allow use while stunned, etc. Gets removed on death anyways. Event = new GuardianToggleActionEvent(), diff --git a/Content.Server/HealthExaminable/HealthExaminableSystem.cs b/Content.Server/HealthExaminable/HealthExaminableSystem.cs index 60ea41829f..d49f5364eb 100644 --- a/Content.Server/HealthExaminable/HealthExaminableSystem.cs +++ b/Content.Server/HealthExaminable/HealthExaminableSystem.cs @@ -36,7 +36,7 @@ public sealed class HealthExaminableSystem : EntitySystem Category = VerbCategory.Examine, Disabled = !detailsRange, Message = Loc.GetString("health-examinable-verb-disabled"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")) + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")) }; args.Verbs.Add(verb); diff --git a/Content.Server/Humanoid/Systems/HumanoidSystem.Modifier.cs b/Content.Server/Humanoid/Systems/HumanoidSystem.Modifier.cs index e7c421d092..cd5cbda318 100644 --- a/Content.Server/Humanoid/Systems/HumanoidSystem.Modifier.cs +++ b/Content.Server/Humanoid/Systems/HumanoidSystem.Modifier.cs @@ -29,7 +29,7 @@ public sealed partial class HumanoidAppearanceSystem { Text = "Modify markings", Category = VerbCategory.Tricks, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Customization/reptilian_parts.rsi"), "tail_smooth"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Customization/reptilian_parts.rsi"), "tail_smooth"), Act = () => { _uiSystem.TryOpen(uid, HumanoidMarkingModifierKey.Key, actor.PlayerSession); diff --git a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs index c61fb5b382..5a798132b9 100644 --- a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs @@ -155,7 +155,7 @@ public sealed class SharpSystem : EntitySystem }, Message = message, Disabled = disabled, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")), Text = Loc.GetString("butcherable-verb-name"), }; diff --git a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs index 8d04e896c3..19ab08005a 100644 --- a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs +++ b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs @@ -184,7 +184,7 @@ namespace Content.Server.Light.EntitySystems ActivationVerb verb = new() { Text = Loc.GetString("expendable-light-start-verb"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/light.svg.192dpi.png")), Act = () => TryActivate(component) }; args.Verbs.Add(verb); diff --git a/Content.Server/Light/EntitySystems/HandheldLightSystem.cs b/Content.Server/Light/EntitySystems/HandheldLightSystem.cs index 0902602953..e37e6c8692 100644 --- a/Content.Server/Light/EntitySystems/HandheldLightSystem.cs +++ b/Content.Server/Light/EntitySystems/HandheldLightSystem.cs @@ -182,7 +182,7 @@ namespace Content.Server.Light.EntitySystems ActivationVerb verb = new() { Text = Loc.GetString("verb-common-toggle-light"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/light.svg.192dpi.png")), Act = component.Activated ? () => TurnOff(uid, component) : () => TurnOn(args.User, uid, component) diff --git a/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs b/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs index 7bb1ec52eb..6f61560d7f 100644 --- a/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs +++ b/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs @@ -49,7 +49,7 @@ namespace Content.Server.Light.EntitySystems ActivationVerb verb = new(); verb.Text = Loc.GetString("toggle-flashlight-verb-get-data-text"); - verb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")); + verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/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. diff --git a/Content.Server/MachineLinking/System/TwoWayLeverSystem.cs b/Content.Server/MachineLinking/System/TwoWayLeverSystem.cs index f217ed7a42..764b4f172c 100644 --- a/Content.Server/MachineLinking/System/TwoWayLeverSystem.cs +++ b/Content.Server/MachineLinking/System/TwoWayLeverSystem.cs @@ -66,7 +66,7 @@ namespace Content.Server.MachineLinking.System Category = VerbCategory.Lever, Message = Loc.GetString("two-way-lever-cant"), Disabled = component.State == TwoWayLeverState.Left, - Icon = new SpriteSpecifier.Texture(new ($"/Textures/Interface/VerbIcons/{_leftToggleImage}")), + Icon = new SpriteSpecifier.Texture(new ResourcePath($"/Textures/Interface/VerbIcons/{_leftToggleImage}")), Text = Loc.GetString("two-way-lever-left"), }; @@ -87,7 +87,7 @@ namespace Content.Server.MachineLinking.System Category = VerbCategory.Lever, Message = Loc.GetString("two-way-lever-cant"), Disabled = component.State == TwoWayLeverState.Right, - Icon = new SpriteSpecifier.Texture(new ($"/Textures/Interface/VerbIcons/{_rightToggleImage}")), + Icon = new SpriteSpecifier.Texture(new ResourcePath($"/Textures/Interface/VerbIcons/{_rightToggleImage}")), Text = Loc.GetString("two-way-lever-right"), }; diff --git a/Content.Server/Mapping/MappingSystem.cs b/Content.Server/Mapping/MappingSystem.cs index 5b4609bcd6..423f14717c 100644 --- a/Content.Server/Mapping/MappingSystem.cs +++ b/Content.Server/Mapping/MappingSystem.cs @@ -82,7 +82,7 @@ public sealed class MappingSystem : EntitySystem } var saveDir = Path.Combine(_cfg.GetCVar(CCVars.AutosaveDirectory), name); - _resMan.UserData.CreateDir(new ResPath(saveDir).ToRootedPath()); + _resMan.UserData.CreateDir(new ResourcePath(saveDir).ToRootedPath()); var path = Path.Combine(saveDir, $"{DateTime.Now.ToString("yyyy-M-dd_HH.mm.ss")}-AUTO.yml"); _currentlyAutosaving[map] = (CalculateNextTime(), name); diff --git a/Content.Server/Maps/GameMapPrototype.cs b/Content.Server/Maps/GameMapPrototype.cs index e289b7d1b1..d609a80cd3 100644 --- a/Content.Server/Maps/GameMapPrototype.cs +++ b/Content.Server/Maps/GameMapPrototype.cs @@ -31,7 +31,7 @@ public sealed partial class GameMapPrototype : IPrototype /// Relative directory path to the given map, i.e. `/Maps/saltern.yml` /// [DataField("mapPath", required: true)] - public ResPath MapPath { get; } = default!; + public ResourcePath MapPath { get; } = default!; [DataField("stations", required: true)] private Dictionary _stations = new(); diff --git a/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs b/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs index b16d49f38d..6e27ecc6b1 100644 --- a/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs +++ b/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs @@ -17,7 +17,7 @@ namespace Content.Server.Medical.Components public EntityTargetAction Action = new() { - Icon = new SpriteSpecifier.Texture(new ("Clothing/Neck/Misc/stethoscope.rsi/icon.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Clothing/Neck/Misc/stethoscope.rsi/icon.png")), DisplayName = "stethoscope-verb", Priority = -1, Event = new StethoscopeActionEvent(), diff --git a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs index 273b2d508b..b89c463dff 100644 --- a/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs +++ b/Content.Server/Medical/Stethoscope/StethoscopeSystem.cs @@ -83,7 +83,7 @@ namespace Content.Server.Medical StartListening(component.Stethoscope, uid, args.Target, stetho); // start doafter }, Text = Loc.GetString("stethoscope-verb"), - Icon = new SpriteSpecifier.Rsi(new ("Clothing/Neck/Misc/stethoscope.rsi"), "icon"), + Icon = new SpriteSpecifier.Rsi(new ResourcePath("Clothing/Neck/Misc/stethoscope.rsi"), "icon"), Priority = 2 }; args.Verbs.Add(verb); diff --git a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs index 41212e536b..e4ce6784af 100644 --- a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs @@ -411,7 +411,7 @@ namespace Content.Server.Nutrition.EntitySystems { TryDrink(ev.User, ev.User, component, uid); }, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/drink.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/drink.svg.192dpi.png")), Text = Loc.GetString("drink-system-verb-drink"), Priority = 2 }; diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index a78aa77124..7975f8898c 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -281,7 +281,7 @@ namespace Content.Server.Nutrition.EntitySystems { TryFeed(ev.User, ev.User, uid, component); }, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/cutlery.svg.192dpi.png")), Text = Loc.GetString("food-system-verb-eat"), Priority = -1 }; diff --git a/Content.Server/Objectives/Conditions/DieCondition.cs b/Content.Server/Objectives/Conditions/DieCondition.cs index cc5ddd9abf..340b5ba60c 100644 --- a/Content.Server/Objectives/Conditions/DieCondition.cs +++ b/Content.Server/Objectives/Conditions/DieCondition.cs @@ -19,7 +19,7 @@ namespace Content.Server.Objectives.Conditions public string Description => Loc.GetString("objective-condition-die-description"); - public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Mobs/Ghosts/ghost_human.rsi"), "icon"); + public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Mobs/Ghosts/ghost_human.rsi"), "icon"); public float Progress => (_mind?.CharacterDeadIC ?? true) ? 1f : 0f; diff --git a/Content.Server/Objectives/Conditions/EscapeShuttleCondition.cs b/Content.Server/Objectives/Conditions/EscapeShuttleCondition.cs index e5e8964f4e..ea86c2c7d6 100644 --- a/Content.Server/Objectives/Conditions/EscapeShuttleCondition.cs +++ b/Content.Server/Objectives/Conditions/EscapeShuttleCondition.cs @@ -24,7 +24,7 @@ namespace Content.Server.Objectives.Conditions public string Description => Loc.GetString("objective-condition-escape-shuttle-description"); - public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Structures/Furniture/chairs.rsi"), "shuttle"); + public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Structures/Furniture/chairs.rsi"), "shuttle"); private bool IsAgentOnShuttle(TransformComponent agentXform, EntityUid? shuttle) { diff --git a/Content.Server/Objectives/Conditions/KillPersonCondition.cs b/Content.Server/Objectives/Conditions/KillPersonCondition.cs index a3a057961b..2ae101f40f 100644 --- a/Content.Server/Objectives/Conditions/KillPersonCondition.cs +++ b/Content.Server/Objectives/Conditions/KillPersonCondition.cs @@ -30,7 +30,7 @@ namespace Content.Server.Objectives.Conditions public string Description => Loc.GetString("objective-condition-kill-person-description"); - public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Objects/Weapons/Guns/Pistols/viper.rsi"), "icon"); + public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Weapons/Guns/Pistols/viper.rsi"), "icon"); public float Progress => (Target?.CharacterDeadIC ?? true) ? 1f : 0f; diff --git a/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs b/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs index d653df357d..8906a2b737 100644 --- a/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs +++ b/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs @@ -39,7 +39,7 @@ namespace Content.Server.Objectives.Conditions public string Description => Loc.GetString("objective-condition-other-traitor-alive-description"); - public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Objects/Misc/bureaucracy.rsi"), "folder-white"); + public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/bureaucracy.rsi"), "folder-white"); public float Progress => (!_target?.CharacterDeadIC ?? true) ? 1f : 0f; diff --git a/Content.Server/Objectives/Conditions/RandomTraitorProgressCondition.cs b/Content.Server/Objectives/Conditions/RandomTraitorProgressCondition.cs index fd19603387..e11dba815d 100644 --- a/Content.Server/Objectives/Conditions/RandomTraitorProgressCondition.cs +++ b/Content.Server/Objectives/Conditions/RandomTraitorProgressCondition.cs @@ -59,7 +59,7 @@ namespace Content.Server.Objectives.Conditions public string Description => Loc.GetString("objective-condition-other-traitor-progress-description"); - public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Objects/Misc/bureaucracy.rsi"), "folder-white"); + public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/bureaucracy.rsi"), "folder-white"); public float Progress { diff --git a/Content.Server/PDA/Ringer/RingerSystem.cs b/Content.Server/PDA/Ringer/RingerSystem.cs index eb5e38e5a8..dd4394149b 100644 --- a/Content.Server/PDA/Ringer/RingerSystem.cs +++ b/Content.Server/PDA/Ringer/RingerSystem.cs @@ -130,7 +130,7 @@ namespace Content.Server.PDA.Ringer private string GetSound(Note note) { - return new ResPath("/Audio/Effects/RingtoneNotes/" + note.ToString().ToLower()) + ".ogg"; + return new ResourcePath("/Audio/Effects/RingtoneNotes/" + note.ToString().ToLower()) + ".ogg"; } } } diff --git a/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs b/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs index 15b967bb1d..a313419154 100644 --- a/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs +++ b/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs @@ -52,7 +52,7 @@ namespace Content.Server.Power.EntitySystems Message = Loc.GetString("cable-multitool-system-verb-tooltip"), Text = Loc.GetString("cable-multitool-system-verb-name"), Category = VerbCategory.Examine, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/zap.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/zap.svg.192dpi.png")), Act = () => { var markup = FormattedMessage.FromMarkup(GenerateCableMarkup(uid)); diff --git a/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs b/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs index 35412d1742..9accaed63e 100644 --- a/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs +++ b/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs @@ -46,7 +46,7 @@ namespace Content.Server.Power.EntitySystems { Text = Loc.GetString("verb-debug-toggle-need-power"), Category = VerbCategory.Debug, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), // "smite" is a lightning bolt + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), // "smite" is a lightning bolt Act = () => component.NeedsPower = !component.NeedsPower }); } @@ -127,7 +127,7 @@ namespace Content.Server.Power.EntitySystems { TogglePower(uid, user: args.User); }, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/Spare/poweronoff.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/Spare/poweronoff.svg.192dpi.png")), Text = Loc.GetString("power-switch-component-toggle-verb"), Priority = -3 }; diff --git a/Content.Server/Prayer/PrayableComponent.cs b/Content.Server/Prayer/PrayableComponent.cs index e458e59fd5..48a5eeedbe 100644 --- a/Content.Server/Prayer/PrayableComponent.cs +++ b/Content.Server/Prayer/PrayableComponent.cs @@ -41,7 +41,7 @@ namespace Content.Server.Prayer /// [DataField("verbImage")] [ViewVariables(VVAccess.ReadOnly)] - public SpriteSpecifier? VerbImage = new SpriteSpecifier.Texture(new ("/Textures/Interface/pray.svg.png")); + public SpriteSpecifier? VerbImage = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/pray.svg.png")); } } diff --git a/Content.Server/Procedural/DungeonAtlasTemplateComponent.cs b/Content.Server/Procedural/DungeonAtlasTemplateComponent.cs index 95f48da643..188cad2964 100644 --- a/Content.Server/Procedural/DungeonAtlasTemplateComponent.cs +++ b/Content.Server/Procedural/DungeonAtlasTemplateComponent.cs @@ -9,5 +9,5 @@ namespace Content.Server.Procedural; public sealed class DungeonAtlasTemplateComponent : Component { [DataField("path", required: true)] - public ResPath Path; + public ResourcePath? Path; } diff --git a/Content.Server/Procedural/DungeonSystem.cs b/Content.Server/Procedural/DungeonSystem.cs index 083c635b78..29e8c3ac6e 100644 --- a/Content.Server/Procedural/DungeonSystem.cs +++ b/Content.Server/Procedural/DungeonSystem.cs @@ -145,7 +145,7 @@ public sealed partial class DungeonSystem : EntitySystem while (query.MoveNext(out var uid, out comp)) { // Exists - if (comp.Path.Equals(proto.AtlasPath)) + if (comp.Path?.Equals(proto.AtlasPath) == true) return Transform(uid).MapID; } diff --git a/Content.Server/Rotatable/RotatableSystem.cs b/Content.Server/Rotatable/RotatableSystem.cs index a9df60c45b..f6785e4b4a 100644 --- a/Content.Server/Rotatable/RotatableSystem.cs +++ b/Content.Server/Rotatable/RotatableSystem.cs @@ -31,7 +31,7 @@ namespace Content.Server.Rotatable Act = () => TryFlip(uid, component, args.User), Text = Loc.GetString("flippable-verb-get-data-text"), Category = VerbCategory.Rotate, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/flip.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/flip.svg.192dpi.png")), Priority = -3, // show flip last DoContactInteraction = true }; @@ -56,7 +56,7 @@ namespace Content.Server.Rotatable DoContactInteraction = true, Act = () => EntityManager.GetComponent(uid).LocalRotation = Angle.Zero, Category = VerbCategory.Rotate, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")), Text = "Reset", Priority = -2, // show CCW, then CW, then reset CloseMenu = false, @@ -68,7 +68,7 @@ namespace Content.Server.Rotatable { Act = () => EntityManager.GetComponent(uid).LocalRotation -= component.Increment, Category = VerbCategory.Rotate, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rotate_cw.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rotate_cw.svg.192dpi.png")), Priority = -1, CloseMenu = false, // allow for easy double rotations. }; @@ -79,7 +79,7 @@ namespace Content.Server.Rotatable { Act = () => EntityManager.GetComponent(uid).LocalRotation += component.Increment, Category = VerbCategory.Rotate, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rotate_ccw.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rotate_ccw.svg.192dpi.png")), Priority = 0, CloseMenu = false, // allow for easy double rotations. }; diff --git a/Content.Server/Salvage/SalvageMapPrototype.cs b/Content.Server/Salvage/SalvageMapPrototype.cs index 40ea2122c6..dc6a5e5f4f 100644 --- a/Content.Server/Salvage/SalvageMapPrototype.cs +++ b/Content.Server/Salvage/SalvageMapPrototype.cs @@ -14,7 +14,7 @@ namespace Content.Server.Salvage /// Relative directory path to the given map, i.e. `Maps/Salvage/template.yml` /// [DataField("mapPath", required: true)] - public ResPath MapPath { get; } = default!; + public ResourcePath MapPath { get; } = default!; /// /// Map rectangle in world coordinates (to check if it fits) diff --git a/Content.Server/Shuttles/Components/GridFillComponent.cs b/Content.Server/Shuttles/Components/GridFillComponent.cs index 6154c7a283..c1493a98d7 100644 --- a/Content.Server/Shuttles/Components/GridFillComponent.cs +++ b/Content.Server/Shuttles/Components/GridFillComponent.cs @@ -9,5 +9,5 @@ namespace Content.Server.Shuttles.Components; [RegisterComponent, Access(typeof(ShuttleSystem))] public sealed class GridFillComponent : Component { - [DataField("path")] public ResPath Path = new("/Maps/Shuttles/escape_pod_small.yml"); + [DataField("path")] public ResourcePath Path = new("/Maps/Shuttles/escape_pod_small.yml"); } diff --git a/Content.Server/Shuttles/Components/StationArrivalsComponent.cs b/Content.Server/Shuttles/Components/StationArrivalsComponent.cs index ff88c798f4..5ba5c194ed 100644 --- a/Content.Server/Shuttles/Components/StationArrivalsComponent.cs +++ b/Content.Server/Shuttles/Components/StationArrivalsComponent.cs @@ -12,5 +12,5 @@ public sealed class StationArrivalsComponent : Component [DataField("shuttle")] public EntityUid Shuttle; - [DataField("shuttlePath")] public ResPath ShuttlePath = new("/Maps/Shuttles/arrivals.yml"); + [DataField("shuttlePath")] public ResourcePath ShuttlePath = new("/Maps/Shuttles/arrivals.yml"); } diff --git a/Content.Server/Station/StationConfig.Shuttles.cs b/Content.Server/Station/StationConfig.Shuttles.cs index 5b25abd4c5..7c97bb295c 100644 --- a/Content.Server/Station/StationConfig.Shuttles.cs +++ b/Content.Server/Station/StationConfig.Shuttles.cs @@ -8,6 +8,6 @@ public sealed partial class StationConfig /// /// Emergency shuttle map path for this station. /// - [DataField("emergencyShuttlePath", customTypeSerializer: typeof(ResPathSerializer))] - public ResPath EmergencyShuttlePath { get; set; } = new("/Maps/Shuttles/emergency.yml"); + [DataField("emergencyShuttlePath", customTypeSerializer: typeof(ResourcePathSerializer))] + public ResourcePath EmergencyShuttlePath { get; set; } = new("/Maps/Shuttles/emergency.yml"); } diff --git a/Content.Server/Sticky/Systems/StickySystem.cs b/Content.Server/Sticky/Systems/StickySystem.cs index 8d89d20615..fb9c5fab37 100644 --- a/Content.Server/Sticky/Systems/StickySystem.cs +++ b/Content.Server/Sticky/Systems/StickySystem.cs @@ -56,7 +56,7 @@ public sealed class StickySystem : EntitySystem { DoContactInteraction = true, Text = Loc.GetString("comp-sticky-unstick-verb-text"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), Act = () => StartUnsticking(uid, args.User, component) }); } diff --git a/Content.Server/Storage/EntitySystems/DumpableSystem.cs b/Content.Server/Storage/EntitySystems/DumpableSystem.cs index dabc8dbd61..69a2742542 100644 --- a/Content.Server/Storage/EntitySystems/DumpableSystem.cs +++ b/Content.Server/Storage/EntitySystems/DumpableSystem.cs @@ -57,7 +57,7 @@ namespace Content.Server.Storage.EntitySystems StartDoAfter(uid, args.Target, args.User, dumpable);//Had multiplier of 0.6f }, Text = Loc.GetString("dump-verb-name"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")), }; args.Verbs.Add(verb); } diff --git a/Content.Server/Storage/EntitySystems/StorageSystem.cs b/Content.Server/Storage/EntitySystems/StorageSystem.cs index fc05ba9121..5373c46e49 100644 --- a/Content.Server/Storage/EntitySystems/StorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/StorageSystem.cs @@ -124,13 +124,13 @@ namespace Content.Server.Storage.EntitySystems { verb.Text = Loc.GetString("verb-common-close-ui"); verb.Icon = new SpriteSpecifier.Texture( - new ("/Textures/Interface/VerbIcons/close.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png")); } else { verb.Text = Loc.GetString("verb-common-open-ui"); verb.Icon = new SpriteSpecifier.Texture( - new ("/Textures/Interface/VerbIcons/open.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")); } args.Verbs.Add(verb); } diff --git a/Content.Server/Strip/StrippableSystem.cs b/Content.Server/Strip/StrippableSystem.cs index dc0816a87e..338ff50698 100644 --- a/Content.Server/Strip/StrippableSystem.cs +++ b/Content.Server/Strip/StrippableSystem.cs @@ -132,7 +132,7 @@ namespace Content.Server.Strip Verb verb = new() { Text = Loc.GetString("strip-verb-get-data-text"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), Act = () => StartOpeningStripper(args.User, component, true), }; args.Verbs.Add(verb); @@ -149,7 +149,7 @@ namespace Content.Server.Strip ExamineVerb verb = new() { Text = Loc.GetString("strip-verb-get-data-text"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), Act = () => StartOpeningStripper(args.User, component, true), Category = VerbCategory.Examine, }; diff --git a/Content.Server/Tabletop/TabletopSystem.cs b/Content.Server/Tabletop/TabletopSystem.cs index c0dec008b0..5aac809cf2 100644 --- a/Content.Server/Tabletop/TabletopSystem.cs +++ b/Content.Server/Tabletop/TabletopSystem.cs @@ -59,7 +59,7 @@ namespace Content.Server.Tabletop ActivationVerb verb = new(); verb.Text = Loc.GetString("tabletop-verb-play-game"); - verb.Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/die.svg.192dpi.png")); + verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/die.svg.192dpi.png")); verb.Act = () => OpenSessionFor(actor.PlayerSession, uid); args.Verbs.Add(verb); } diff --git a/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs index 20205ea29d..c354a82bcc 100644 --- a/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs @@ -79,7 +79,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem Text = Loc.GetString("damage-examinable-verb-text"), Message = Loc.GetString("damage-examinable-verb-message"), Category = VerbCategory.Examine, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), }; args.Verbs.Add(verb); diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.Battery.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.Battery.cs index fa34dcaf58..39482048c9 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.Battery.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.Battery.cs @@ -94,7 +94,7 @@ public sealed partial class GunSystem Text = Loc.GetString("damage-examinable-verb-text"), Message = Loc.GetString("damage-examinable-verb-message"), Category = VerbCategory.Examine, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), }; args.Verbs.Add(verb); diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.Cartridges.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.Cartridges.cs index 497e66901c..2a5d646499 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.Cartridges.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.Cartridges.cs @@ -38,7 +38,7 @@ public sealed partial class GunSystem Text = Loc.GetString("damage-examinable-verb-text"), Message = Loc.GetString("damage-examinable-verb-message"), Category = VerbCategory.Examine, - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")), }; args.Verbs.Add(verb); diff --git a/Content.Shared/Administration/NetworkResourceUploadMessage.cs b/Content.Shared/Administration/NetworkResourceUploadMessage.cs index 9f5f64213b..54f37d9cb0 100644 --- a/Content.Shared/Administration/NetworkResourceUploadMessage.cs +++ b/Content.Shared/Administration/NetworkResourceUploadMessage.cs @@ -11,13 +11,13 @@ public sealed class NetworkResourceUploadMessage : NetMessage public override MsgGroups MsgGroup => MsgGroups.Command; public byte[] Data { get; set; } = Array.Empty(); - public ResPath RelativePath { get; set; } = ResPath.Self; + public ResourcePath RelativePath { get; set; } = ResourcePath.Self; public NetworkResourceUploadMessage() { } - public NetworkResourceUploadMessage(byte[] data, ResPath relativePath) + public NetworkResourceUploadMessage(byte[] data, ResourcePath relativePath) { Data = data; RelativePath = relativePath; @@ -27,8 +27,7 @@ public sealed class NetworkResourceUploadMessage : NetMessage { var dataLength = buffer.ReadVariableInt32(); Data = buffer.ReadBytes(dataLength); - // What is the second argument here? - RelativePath = new ResPath(buffer.ReadString()); + RelativePath = new ResourcePath(buffer.ReadString(), buffer.ReadString()); } public override void WriteToBuffer(NetOutgoingMessage buffer, IRobustSerializer serializer) @@ -36,6 +35,6 @@ public sealed class NetworkResourceUploadMessage : NetMessage buffer.WriteVariableInt32(Data.Length); buffer.Write(Data); buffer.Write(RelativePath.ToString()); - buffer.Write(ResPath.Separator); + buffer.Write(RelativePath.Separator); } } diff --git a/Content.Shared/Administration/SharedNetworkResourceManager.cs b/Content.Shared/Administration/SharedNetworkResourceManager.cs index 3ed35eb691..e1dc13a836 100644 --- a/Content.Shared/Administration/SharedNetworkResourceManager.cs +++ b/Content.Shared/Administration/SharedNetworkResourceManager.cs @@ -19,7 +19,7 @@ public abstract class SharedNetworkResourceManager : IDisposable /// /// The prefix for any and all downloaded network resources. /// - private static readonly ResPath Prefix = ResPath.Root / "Uploaded"; + private static readonly ResourcePath Prefix = ResourcePath.Root / "Uploaded"; protected readonly MemoryContentRoot ContentRoot = new(); @@ -47,6 +47,6 @@ public abstract class SharedNetworkResourceManager : IDisposable public sealed class ReplayResourceUploadMsg { public byte[] Data = default!; - public ResPath RelativePath = default!; + public ResourcePath RelativePath = default!; } } diff --git a/Content.Shared/Cabinet/SharedItemCabinetSystem.cs b/Content.Shared/Cabinet/SharedItemCabinetSystem.cs index 96461f2249..0ba03e2076 100644 --- a/Content.Shared/Cabinet/SharedItemCabinetSystem.cs +++ b/Content.Shared/Cabinet/SharedItemCabinetSystem.cs @@ -107,13 +107,13 @@ public abstract class SharedItemCabinetSystem : EntitySystem { toggleVerb.Text = Loc.GetString("verb-common-close"); toggleVerb.Icon = - new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/close.svg.192dpi.png")); + new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png")); } else { toggleVerb.Text = Loc.GetString("verb-common-open"); toggleVerb.Icon = - new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")); + new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")); } args.Verbs.Add(toggleVerb); } diff --git a/Content.Shared/Cargo/Prototypes/CargoShuttlePrototype.cs b/Content.Shared/Cargo/Prototypes/CargoShuttlePrototype.cs index b740c3a0f9..5d28411126 100644 --- a/Content.Shared/Cargo/Prototypes/CargoShuttlePrototype.cs +++ b/Content.Shared/Cargo/Prototypes/CargoShuttlePrototype.cs @@ -13,7 +13,7 @@ public sealed class CargoShuttlePrototype : IPrototype public string ID { get; } = default!; [DataField("path")] - public ResPath Path = default!; + public ResourcePath Path = default!; [DataField("nameDataset", customTypeSerializer:typeof(PrototypeIdSerializer))] public string NameDataset = "CargoShuttleNames"; diff --git a/Content.Shared/Chat/TypingIndicator/TypingIndicatorPrototype.cs b/Content.Shared/Chat/TypingIndicator/TypingIndicatorPrototype.cs index 578fdbecee..56a32492d0 100644 --- a/Content.Shared/Chat/TypingIndicator/TypingIndicatorPrototype.cs +++ b/Content.Shared/Chat/TypingIndicator/TypingIndicatorPrototype.cs @@ -13,7 +13,7 @@ public sealed class TypingIndicatorPrototype : IPrototype public string ID { get; } = default!; [DataField("spritePath")] - public ResPath SpritePath = new("/Textures/Effects/speech.rsi"); + public ResourcePath SpritePath = new("/Textures/Effects/speech.rsi"); [DataField("typingState", required: true)] public string TypingState = default!; diff --git a/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs index 68648950d8..fa5c2f647c 100644 --- a/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs +++ b/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs @@ -74,7 +74,7 @@ public sealed class ToggleableClothingSystem : EntitySystem var verb = new EquipmentVerb() { - Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), Text = Loc.GetString(text), }; diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs index 1551b30bb6..4dc4beec39 100644 --- a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs +++ b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs @@ -433,7 +433,7 @@ namespace Content.Shared.Containers.ItemSlots { verb.Text = Loc.GetString(slot.InsertVerbText); verb.Icon = new SpriteSpecifier.Texture( - new("/Textures/Interface/VerbIcons/insert.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/VerbIcons/insert.svg.192dpi.png")); } else if (slot.EjectOnInteract) { @@ -441,7 +441,7 @@ namespace Content.Shared.Containers.ItemSlots // category, we will use a single "Place " verb. verb.Text = Loc.GetString("place-item-verb-text", ("subject", verbSubject)); verb.Icon = new SpriteSpecifier.Texture( - new("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")); } else { @@ -549,7 +549,7 @@ namespace Content.Shared.Containers.ItemSlots insertVerb.Text = Loc.GetString(slot.InsertVerbText); insertVerb.Icon = new SpriteSpecifier.Texture( - new("/Textures/Interface/VerbIcons/insert.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/VerbIcons/insert.svg.192dpi.png")); } else if(slot.EjectOnInteract) { @@ -558,7 +558,7 @@ namespace Content.Shared.Containers.ItemSlots insertVerb.Text = Loc.GetString("place-item-verb-text", ("subject", verbSubject)); insertVerb.Icon = new SpriteSpecifier.Texture( - new("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png")); } else { diff --git a/Content.Shared/Examine/ExamineSystemShared.Group.cs b/Content.Shared/Examine/ExamineSystemShared.Group.cs index 4b050da2f4..78e5ce0d96 100644 --- a/Content.Shared/Examine/ExamineSystemShared.Group.cs +++ b/Content.Shared/Examine/ExamineSystemShared.Group.cs @@ -149,7 +149,7 @@ namespace Content.Shared.Examine Text = verbText, Message = hoverMessage, Category = VerbCategory.Examine, - Icon = new SpriteSpecifier.Texture(new(iconTexture)), + Icon = new SpriteSpecifier.Texture(new ResourcePath(iconTexture)), }; verbsEvent.Verbs.Add(examineVerb); diff --git a/Content.Shared/Examine/GroupExamineComponent.cs b/Content.Shared/Examine/GroupExamineComponent.cs index 529ad6075d..0bd260102f 100644 --- a/Content.Shared/Examine/GroupExamineComponent.cs +++ b/Content.Shared/Examine/GroupExamineComponent.cs @@ -55,7 +55,7 @@ namespace Content.Shared.Examine /// The icon path for the Examine Group. /// [DataField("icon")] - public SpriteSpecifier Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/examine-star.png")); + public SpriteSpecifier Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/examine-star.png")); /// /// The text shown in the context verb menu. diff --git a/Content.Shared/Explosion/ExplosionPrototype.cs b/Content.Shared/Explosion/ExplosionPrototype.cs index 927b963f9e..c4b532280e 100644 --- a/Content.Shared/Explosion/ExplosionPrototype.cs +++ b/Content.Shared/Explosion/ExplosionPrototype.cs @@ -66,7 +66,7 @@ public sealed class ExplosionPrototype : IPrototype public readonly SoundSpecifier Sound = new SoundCollectionSpecifier("explosion"); [DataField("texturePath")] - public readonly ResPath TexturePath = new("/Textures/Effects/fire.rsi"); + public readonly ResourcePath TexturePath = new("/Textures/Effects/fire.rsi"); /// /// How intense does the explosion have to be at a tile to advance to the next fire texture state? diff --git a/Content.Shared/Follower/FollowerSystem.cs b/Content.Shared/Follower/FollowerSystem.cs index 4e5f0931a7..d5739f7806 100644 --- a/Content.Shared/Follower/FollowerSystem.cs +++ b/Content.Shared/Follower/FollowerSystem.cs @@ -38,7 +38,7 @@ public sealed class FollowerSystem : EntitySystem }), Impact = LogImpact.Low, Text = Loc.GetString("verb-follow-text"), - Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/open.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")), }; ev.Verbs.Add(verb); diff --git a/Content.Shared/Item/SharedItemSystem.cs b/Content.Shared/Item/SharedItemSystem.cs index 229a25bffd..4a88249842 100644 --- a/Content.Shared/Item/SharedItemSystem.cs +++ b/Content.Shared/Item/SharedItemSystem.cs @@ -119,7 +119,7 @@ public abstract class SharedItemSystem : EntitySystem InteractionVerb verb = new(); verb.Act = () => _handsSystem.TryPickupAnyHand(args.User, args.Target, checkActionBlocker: false, handsComp: args.Hands, item: component); - verb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/pickup.svg.192dpi.png")); + verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/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 diff --git a/Content.Shared/Lock/LockSystem.cs b/Content.Shared/Lock/LockSystem.cs index 2af6366982..c80fbee965 100644 --- a/Content.Shared/Lock/LockSystem.cs +++ b/Content.Shared/Lock/LockSystem.cs @@ -226,8 +226,8 @@ public sealed class LockSystem : EntitySystem () => 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("/Textures/Interface/VerbIcons/unlock.svg.192dpi.png")) : - new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/lock.svg.192dpi.png")), + new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/unlock.svg.192dpi.png")) : + new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/lock.svg.192dpi.png")), }; args.Verbs.Add(verb); } diff --git a/Content.Shared/Maps/ContentTileDefinition.cs b/Content.Shared/Maps/ContentTileDefinition.cs index 6335c329a8..4a4555c560 100644 --- a/Content.Shared/Maps/ContentTileDefinition.cs +++ b/Content.Shared/Maps/ContentTileDefinition.cs @@ -27,9 +27,9 @@ namespace Content.Shared.Maps [DataField("name")] public string Name { get; private set; } = ""; - [DataField("sprite")] public ResPath? Sprite { get; } + [DataField("sprite")] public ResourcePath? Sprite { get; } - [DataField("edgeSprites")] public Dictionary EdgeSprites { get; } = new(); + [DataField("edgeSprites")] public Dictionary EdgeSprites { get; } = new(); [DataField("isSubfloor")] public bool IsSubFloor { get; private set; } diff --git a/Content.Shared/Procedural/DungeonRoomPrototype.cs b/Content.Shared/Procedural/DungeonRoomPrototype.cs index 2fc2bcc880..425194e90a 100644 --- a/Content.Shared/Procedural/DungeonRoomPrototype.cs +++ b/Content.Shared/Procedural/DungeonRoomPrototype.cs @@ -18,7 +18,7 @@ public sealed class DungeonRoomPrototype : IPrototype /// /// Path to the file to use for the room. /// - [DataField("atlas", required: true)] public ResPath AtlasPath; + [DataField("atlas", required: true)] public ResourcePath AtlasPath = default!; /// /// Tile offset into the atlas to use for the room. diff --git a/Content.Shared/Storage/Components/ItemMapperComponent.cs b/Content.Shared/Storage/Components/ItemMapperComponent.cs index ba9bdfdbbe..c5c9e55664 100644 --- a/Content.Shared/Storage/Components/ItemMapperComponent.cs +++ b/Content.Shared/Storage/Components/ItemMapperComponent.cs @@ -58,7 +58,7 @@ namespace Content.Shared.Storage.Components { [DataField("mapLayers")] public readonly Dictionary MapLayers = new(); - [DataField("sprite")] public ResPath? RSIPath; + [DataField("sprite")] public ResourcePath? RSIPath; /// /// If this exists, shown layers will only consider entities in the given containers. diff --git a/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs index 7b17cf4b7e..9abcc1a380 100644 --- a/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs @@ -146,13 +146,13 @@ public abstract class SharedEntityStorageSystem : EntitySystem if (component.Open) { verb.Text = Loc.GetString("verb-common-close"); - verb.Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/close.svg.192dpi.png")); + verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png")); } else { verb.Text = Loc.GetString("verb-common-open"); verb.Icon = new SpriteSpecifier.Texture( - new("/Textures/Interface/VerbIcons/open.svg.192dpi.png")); + new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")); } verb.Act = () => ToggleOpen(args.User, args.Target, component); args.Verbs.Add(verb); diff --git a/Content.Shared/Vehicle/Components/VehicleComponent.cs b/Content.Shared/Vehicle/Components/VehicleComponent.cs index 30dfabc4bf..f4b75e731a 100644 --- a/Content.Shared/Vehicle/Components/VehicleComponent.cs +++ b/Content.Shared/Vehicle/Components/VehicleComponent.cs @@ -49,7 +49,7 @@ namespace Content.Shared.Vehicle.Components public InstantAction HornAction = new() { UseDelay = TimeSpan.FromSeconds(3.4), - Icon = new SpriteSpecifier.Texture(new("Objects/Fun/bikehorn.rsi/icon.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("Objects/Fun/bikehorn.rsi/icon.png")), DisplayName = "action-name-honk", Description = "action-desc-honk", Event = new HonkActionEvent(), diff --git a/Content.Shared/Verbs/VerbCategory.cs b/Content.Shared/Verbs/VerbCategory.cs index d22041396f..63a1cbced6 100644 --- a/Content.Shared/Verbs/VerbCategory.cs +++ b/Content.Shared/Verbs/VerbCategory.cs @@ -31,7 +31,7 @@ namespace Content.Shared.Verbs public VerbCategory(string text, string? icon, bool iconsOnly = false) { Text = Loc.GetString(text); - Icon = icon == null ? null : new SpriteSpecifier.Texture(new(icon)); + Icon = icon == null ? null : new SpriteSpecifier.Texture(new ResourcePath(icon)); IconsOnly = iconsOnly; } diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs index 4ffbe8fc63..ae873f6f60 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs @@ -35,7 +35,7 @@ public abstract partial class SharedGunSystem { Act = () => SelectFire(uid, component, nextMode, args.User), Text = Loc.GetString("gun-selector-verb", ("mode", GetLocSelector(nextMode))), - Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/fold.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/fold.svg.192dpi.png")), }; args.Verbs.Add(verb); diff --git a/Content.Tests/Shared/Alert/AlertManagerTests.cs b/Content.Tests/Shared/Alert/AlertManagerTests.cs index 2d5f6af5a7..405bdc3437 100644 --- a/Content.Tests/Shared/Alert/AlertManagerTests.cs +++ b/Content.Tests/Shared/Alert/AlertManagerTests.cs @@ -46,14 +46,14 @@ namespace Content.Tests.Shared.Alert 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 ("/Textures/Interface/Alerts/Pressure/lowpressure.png")))); + Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/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 ("/Textures/Interface/Alerts/Pressure/highpressure.png")))); + Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/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 ("/Textures/Interface/Alerts/Pressure/lowpressure.png")))); + Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/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 ("/Textures/Interface/Alerts/Pressure/highpressure.png")))); + Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/highpressure.png")))); } } } diff --git a/Content.Tests/Shared/Alert/AlertPrototypeTests.cs b/Content.Tests/Shared/Alert/AlertPrototypeTests.cs index d95acb8aff..dffab940cc 100644 --- a/Content.Tests/Shared/Alert/AlertPrototypeTests.cs +++ b/Content.Tests/Shared/Alert/AlertPrototypeTests.cs @@ -50,7 +50,7 @@ namespace Content.Tests.Shared.Alert public void GetsIconPath(short? severity, string expected) { var alert = GetTestPrototype(); - Assert.That(alert.GetIcon(severity), Is.EqualTo(new SpriteSpecifier.Texture(new (expected)))); + Assert.That(alert.GetIcon(severity), Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath(expected)))); } [TestCase(null, "/Textures/Interface/Alerts/Human/human.rsi/human0.png")] diff --git a/Content.YAMLLinter/Program.cs b/Content.YAMLLinter/Program.cs index 8dd980864b..25ca37614e 100644 --- a/Content.YAMLLinter/Program.cs +++ b/Content.YAMLLinter/Program.cs @@ -48,7 +48,7 @@ namespace Content.YAMLLinter await client.WaitPost(() => { - clientErrors = cPrototypeManager.ValidateDirectory(new ResPath("/Prototypes")); + clientErrors = cPrototypeManager.ValidateDirectory(new ResourcePath("/Prototypes")); }); await pairTracker.CleanReturnAsync(); @@ -66,7 +66,7 @@ namespace Content.YAMLLinter await server.WaitPost(() => { - serverErrors = sPrototypeManager.ValidateDirectory(new ResPath("/Prototypes")); + serverErrors = sPrototypeManager.ValidateDirectory(new ResourcePath("/Prototypes")); }); await pairTracker.CleanReturnAsync();