make crayoncode use the colortype (#7975)
This commit is contained in:
@@ -8,7 +8,6 @@ namespace Content.Client.Crayon
|
||||
public sealed class CrayonComponent : SharedCrayonComponent
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)] public bool UIUpdateNeeded;
|
||||
[ViewVariables(VVAccess.ReadWrite)] public string Color => _color;
|
||||
[ViewVariables] public int Charges { get; set; }
|
||||
[ViewVariables] public int Capacity { get; set; }
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Client.Crayon;
|
||||
|
||||
public sealed class CrayonSystem : EntitySystem
|
||||
public sealed class CrayonSystem : SharedCrayonSystem
|
||||
{
|
||||
// Didn't do in shared because I don't think most of the server stuff can be predicted.
|
||||
public override void Initialize()
|
||||
@@ -25,7 +25,7 @@ public sealed class CrayonSystem : EntitySystem
|
||||
{
|
||||
if (args.Current is not CrayonComponentState state) return;
|
||||
|
||||
component._color = state.Color;
|
||||
component.Color = state.Color;
|
||||
component.SelectedState = state.State;
|
||||
component.Charges = state.Charges;
|
||||
component.Capacity = state.Capacity;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Content.Client.Crayon.UI
|
||||
SendMessage(new CrayonSelectMessage(state));
|
||||
}
|
||||
|
||||
public void SelectColor(string color)
|
||||
public void SelectColor(Color color)
|
||||
{
|
||||
SendMessage(new CrayonColorMessage(color));
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Content.Client.Crayon.UI
|
||||
{
|
||||
_color = color;
|
||||
|
||||
Owner.SelectColor(color.ToHex());
|
||||
Owner.SelectColor(color);
|
||||
|
||||
RefreshList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user