Blood-Red Magboots now correctly show if magboots are active (#38013)
* Change JetPack Item Visuals to use GenericVisualizer instead of AppearanceChangeEvents * Fix YAML indentation for jetpacks.yml
This commit is contained in:
@@ -34,10 +34,6 @@ public sealed class JetpackSystem : SharedJetpackSystem
|
|||||||
{
|
{
|
||||||
Appearance.TryGetData<bool>(uid, JetpackVisuals.Enabled, out var enabled, args.Component);
|
Appearance.TryGetData<bool>(uid, JetpackVisuals.Enabled, out var enabled, args.Component);
|
||||||
|
|
||||||
var state = "icon" + (enabled ? "-on" : "");
|
|
||||||
if (args.Sprite != null)
|
|
||||||
_sprite.LayerSetRsiState((uid, args.Sprite), 0, state);
|
|
||||||
|
|
||||||
if (TryComp<ClothingComponent>(uid, out var clothing))
|
if (TryComp<ClothingComponent>(uid, out var clothing))
|
||||||
_clothing.SetEquippedPrefix(uid, enabled ? "on" : null, clothing);
|
_clothing.SetEquippedPrefix(uid, enabled ? "on" : null, clothing);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,4 +202,5 @@ public abstract class SharedJetpackSystem : EntitySystem
|
|||||||
public enum JetpackVisuals : byte
|
public enum JetpackVisuals : byte
|
||||||
{
|
{
|
||||||
Enabled,
|
Enabled,
|
||||||
|
Layer
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,9 @@
|
|||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Tanks/Jetpacks/blue.rsi
|
sprite: Objects/Tanks/Jetpacks/blue.rsi
|
||||||
state: icon
|
layers:
|
||||||
|
- state: icon
|
||||||
|
map: ["enum.JetpackVisuals.Layer"]
|
||||||
- type: Item
|
- type: Item
|
||||||
sprite: Objects/Tanks/Jetpacks/blue.rsi
|
sprite: Objects/Tanks/Jetpacks/blue.rsi
|
||||||
size: Huge
|
size: Huge
|
||||||
@@ -52,6 +54,12 @@
|
|||||||
- type: Jetpack
|
- type: Jetpack
|
||||||
moleUsage: 0.00085
|
moleUsage: 0.00085
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
|
- type: GenericVisualizer
|
||||||
|
visuals:
|
||||||
|
enum.JetpackVisuals.Enabled:
|
||||||
|
enum.JetpackVisuals.Layer:
|
||||||
|
True: {state: icon-on}
|
||||||
|
False: {state: icon}
|
||||||
- type: StaticPrice
|
- type: StaticPrice
|
||||||
price: 100
|
price: 100
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user