Add customizable buckled status effect icon per strap
This commit is contained in:
@@ -55,7 +55,7 @@ namespace Content.Server.GameObjects.Components.Mobs
|
|||||||
{
|
{
|
||||||
status.ChangeStatusEffectIcon(StatusEffect.Buckled,
|
status.ChangeStatusEffectIcon(StatusEffect.Buckled,
|
||||||
Buckled
|
Buckled
|
||||||
? "/Textures/Mob/UI/Buckle/buckled.png"
|
? BuckledTo!.BuckledIcon
|
||||||
: "/Textures/Mob/UI/Buckle/unbuckled.png");
|
: "/Textures/Mob/UI/Buckle/unbuckled.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace Content.Server.GameObjects.Components.Strap
|
|||||||
private StrapPosition _position;
|
private StrapPosition _position;
|
||||||
private string _buckleSound;
|
private string _buckleSound;
|
||||||
private string _unbuckleSound;
|
private string _unbuckleSound;
|
||||||
|
private string _buckledIcon;
|
||||||
private int _rotation;
|
private int _rotation;
|
||||||
private int _size;
|
private int _size;
|
||||||
|
|
||||||
@@ -53,6 +54,12 @@ namespace Content.Server.GameObjects.Components.Strap
|
|||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public string UnbuckleSound => _unbuckleSound;
|
public string UnbuckleSound => _unbuckleSound;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The icon to be displayed as a status when buckled
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables]
|
||||||
|
public string BuckledIcon => _buckledIcon;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The angle in degrees to rotate the player by when they get strapped
|
/// The angle in degrees to rotate the player by when they get strapped
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -123,6 +130,7 @@ namespace Content.Server.GameObjects.Components.Strap
|
|||||||
serializer.DataField(ref _position, "position", StrapPosition.None);
|
serializer.DataField(ref _position, "position", StrapPosition.None);
|
||||||
serializer.DataField(ref _buckleSound, "buckleSound", "/Audio/effects/buckle.ogg");
|
serializer.DataField(ref _buckleSound, "buckleSound", "/Audio/effects/buckle.ogg");
|
||||||
serializer.DataField(ref _unbuckleSound, "unbuckleSound", "/Audio/effects/unbuckle.ogg");
|
serializer.DataField(ref _unbuckleSound, "unbuckleSound", "/Audio/effects/unbuckle.ogg");
|
||||||
|
serializer.DataField(ref _buckledIcon, "buckledIcon", "/Textures/Mob/UI/Buckle/buckled.png");
|
||||||
serializer.DataField(ref _rotation, "rotation", 0);
|
serializer.DataField(ref _rotation, "rotation", 0);
|
||||||
|
|
||||||
var defaultSize = 100;
|
var defaultSize = 100;
|
||||||
|
|||||||
Reference in New Issue
Block a user