Handcuff system (#1831)
* Implemented most serverside logic * All serverside cuff logic complete * SFX, Clientside HUD stuff, Other logic. * fffff * Cuffs 1.0 * missing loc string * Cuffs are stored in the balls now. * Basic integrationtest * Support stripping menu. * rrr * Fixes * properties * gun emoji * fixes * get rid of unused * reeee * Update Content.Shared/GameObjects/ContentNetIDs.cs Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@ using Robust.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Items
|
||||
@@ -25,6 +26,8 @@ namespace Content.Client.GameObjects.Components.Items
|
||||
|
||||
[ViewVariables] protected ResourcePath RsiPath;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)] protected Color Color;
|
||||
|
||||
private string _equippedPrefix;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
@@ -40,7 +43,7 @@ namespace Content.Client.GameObjects.Components.Items
|
||||
}
|
||||
}
|
||||
|
||||
public (RSI rsi, RSI.StateId stateId)? GetInHandStateInfo(HandLocation hand)
|
||||
public (RSI rsi, RSI.StateId stateId, Color color)? GetInHandStateInfo(HandLocation hand)
|
||||
{
|
||||
if (RsiPath == null)
|
||||
{
|
||||
@@ -52,7 +55,7 @@ namespace Content.Client.GameObjects.Components.Items
|
||||
var stateId = EquippedPrefix != null ? $"{EquippedPrefix}-inhand-{handName}" : $"inhand-{handName}";
|
||||
if (rsi.TryGetState(stateId, out _))
|
||||
{
|
||||
return (rsi, stateId);
|
||||
return (rsi, stateId, Color);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -62,6 +65,7 @@ namespace Content.Client.GameObjects.Components.Items
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataFieldCached(ref Color, "color", Color.White);
|
||||
serializer.DataFieldCached(ref RsiPath, "sprite", null);
|
||||
serializer.DataFieldCached(ref _equippedPrefix, "HeldPrefix", null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user