Use item status extension method (#23884)
Just removes some lines of code.
This commit is contained in:
committed by
GitHub
parent
e2dd30f640
commit
e665c2487e
@@ -31,13 +31,13 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<ClearAllOverlaysEvent>(_ => ClearAllOverlays());
|
||||
SubscribeLocalEvent<NetworkConfiguratorComponent, ItemStatusCollectMessage>(OnCollectItemStatus);
|
||||
Subs.ItemStatus<NetworkConfiguratorComponent>(OnCollectItemStatus);
|
||||
}
|
||||
|
||||
private void OnCollectItemStatus(EntityUid uid, NetworkConfiguratorComponent configurator, ItemStatusCollectMessage args)
|
||||
private Control OnCollectItemStatus(Entity<NetworkConfiguratorComponent> entity)
|
||||
{
|
||||
_inputManager.TryGetKeyBinding((ContentKeyFunctions.AltUseItemInHand), out var binding);
|
||||
args.Controls.Add(new StatusControl(configurator, binding?.GetKeyString() ?? ""));
|
||||
return new StatusControl(entity, binding?.GetKeyString() ?? "");
|
||||
}
|
||||
|
||||
public bool ConfiguredListIsTracked(EntityUid uid, NetworkConfiguratorComponent? component = null)
|
||||
|
||||
Reference in New Issue
Block a user