#4222 fixed crayon cast issue causing exception (#4229)

This commit is contained in:
Galactic Chimp 2021-06-27 10:01:26 +02:00 committed by GitHub
parent c25b103316
commit 97f4f0a9bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
using Content.Shared.Crayon;
using Content.Shared.Crayon;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.Maths;
@ -19,9 +19,9 @@ namespace Content.Client.Crayon
sprite.LayerSetState(0, state);
}
if (component.TryGetData(CrayonVisuals.Color, out Color color))
if (component.TryGetData(CrayonVisuals.Color, out string color))
{
sprite.LayerSetColor(0, color);
sprite.LayerSetColor(0, Color.FromName(color));
}
if (component.TryGetData(CrayonVisuals.Rotation, out Angle rotation))