Raise power events by ref and not broadcast (#11923)
Also some other minor stuff.
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
SubscribeLocalEvent<ReagentGrinderComponent, ComponentInit>(OnComponentInit);
|
||||
SubscribeLocalEvent<ReagentGrinderComponent, ComponentRemove>(OnComponentRemove);
|
||||
|
||||
SubscribeLocalEvent<ReagentGrinderComponent, PowerChangedEvent>((_, component, _) => EnqueueUiUpdate(component));
|
||||
SubscribeLocalEvent<ReagentGrinderComponent, PowerChangedEvent>(OnPowerChange);
|
||||
SubscribeLocalEvent<ReagentGrinderComponent, InteractUsingEvent>(OnInteractUsing);
|
||||
SubscribeLocalEvent<StackComponent, ExtractableScalingEvent>(ExtractableScaling);
|
||||
|
||||
@@ -43,6 +43,11 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
SubscribeLocalEvent<ReagentGrinderComponent, ContainerIsRemovingAttemptEvent>(OnEntRemoveAttempt);
|
||||
}
|
||||
|
||||
private void OnPowerChange(EntityUid uid, ReagentGrinderComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
EnqueueUiUpdate(component);
|
||||
}
|
||||
|
||||
private void OnEntRemoveAttempt(EntityUid uid, ReagentGrinderComponent component, ContainerIsRemovingAttemptEvent args)
|
||||
{
|
||||
if (component.Busy)
|
||||
|
||||
Reference in New Issue
Block a user