Skip to content

Commit

Permalink
Revert "Revert "Replace ResourcePath with ResPath (#15308)" (new-…
Browse files Browse the repository at this point in the history
  • Loading branch information
metalgearsloth authored and rbertoche committed Aug 30, 2023
1 parent 3b9f6bc commit 6cd6f21
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Content.Client/EntityHealthBar/EntityHealthBarOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public EntityHealthBarOverlay(IEntityManager entManager, IPrototypeManager proto
_mobStateSystem = _entManager.EntitySysManager.GetEntitySystem<MobStateSystem>();
_mobThresholdSystem = _entManager.EntitySysManager.GetEntitySystem<MobThresholdSystem>();

var sprite = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/health_bar.rsi"), "icon");
var sprite = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/health_bar.rsi"), "icon");
_barTexture = _entManager.EntitySysManager.GetEntitySystem<SpriteSystem>().Frame0(sprite);

_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
Expand Down
10 changes: 5 additions & 5 deletions Content.Client/PDA/PdaMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public PdaMenu()

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 ("/Textures/Interface/home.png"));
FlashLightToggleButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/light.png"));
EjectPenButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/pencil.png"));
EjectIdButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/eject.png"));
ProgramCloseButton.IconTexture = new SpriteSpecifier.Texture(new ("/Textures/Interface/Nano/cross.svg.png"));


HomeButton.OnPressed += _ => ToHomeScreen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
{
Text = "Cluwne",
Category = VerbCategory.Smite,

Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/bikehorn.rsi"), "icon"),
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Mask/cluwne.rsi"), "icon"),

Act = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ private void AddTricksVerbs(GetVerbsEvent<Verb> args)
Text = bolts.BoltsDown ? "Unbolt" : "Bolt",
Category = VerbCategory.Tricks,
Icon = bolts.BoltsDown
? new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/unbolt.png"))
: new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/bolt.png")),
? new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/unbolt.png"))
: new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/bolt.png")),
Act = () =>
{
_boltsSystem.SetBoltsWithAudio(args.Target, bolts, !bolts.BoltsDown);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ private void OnAddInteractVerb(EntityUid uid, NetworkConfiguratorComponent confi
var verb = new UtilityVerb
{
Act = () => OnUsed(uid, configurator, args.Target, args.User),
new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")) :
new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/in.svg.192dpi.png")),
Impact = LogImpact.Low
};

Expand Down Expand Up @@ -371,7 +373,7 @@ private void OnAddAlternativeSaveDeviceVerb(EntityUid uid, DeviceNetworkComponen
AlternativeVerb verb = new()
{
Text = Loc.GetString("network-configurator-save-device"),
Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/in.svg.192dpi.png")),
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/in.svg.192dpi.png")),
Act = () => TryAddNetworkDevice(args.Target, args.Using.Value, args.User),
Impact = LogImpact.Low
};
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Salvage/SalvageMapPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public sealed class SalvageMapPrototype : IPrototype
/// Relative directory path to the given map, i.e. `Maps/Salvage/template.yml`
/// </summary>
[DataField("mapPath", required: true)] public ResPath MapPath;
public ResPath MapPath { get; } = default!;

/// <summary>
/// Name for admin use
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Vehicle/Components/VehicleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public sealed partial class VehicleComponent : Component
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 ("Objects/Fun/bikehorn.rsi/icon.png")),
DisplayName = "action-name-honk",
Description = "action-desc-honk",
Event = new HonkActionEvent(),
Expand Down

0 comments on commit 6cd6f21

Please sign in to comment.