* Fix handlabeler/utility belt misprediction * Partly moved HandLabelerSystem to shared And cleaned up HandLabelerComponent * WIP format the files so later commits look clearer Doesn't change individual code lines, but may move functions to another file * WIP some more code movement * Hand Labeler is now mostly predicted Only the UI isn't * WIP: Formatting and moved stuff * Using componentstates for prediction correction * review * Update label on label change * Don't overwrite label while editing --------- Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
19 lines
540 B
C#
19 lines
540 B
C#
using Content.Client.Labels.UI;
|
|
using Content.Shared.Labels;
|
|
using Content.Shared.Labels.Components;
|
|
using Content.Shared.Labels.EntitySystems;
|
|
|
|
namespace Content.Client.Labels.EntitySystems;
|
|
|
|
public sealed class HandLabelerSystem : SharedHandLabelerSystem
|
|
{
|
|
protected override void UpdateUI(Entity<HandLabelerComponent> ent)
|
|
{
|
|
if (UserInterfaceSystem.TryGetOpenUi(ent.Owner, HandLabelerUiKey.Key, out var bui)
|
|
&& bui is HandLabelerBoundUserInterface cBui)
|
|
{
|
|
cBui.Reload();
|
|
}
|
|
}
|
|
}
|