mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Cleanup event handler methods with nullable parameters (#45070)
This commit is contained in:
parent
8e687ad96e
commit
976463abce
4 changed files with 10 additions and 13 deletions
|
|
@ -174,7 +174,7 @@ namespace Content.Client.Actions
|
|||
LinkAllActions(component);
|
||||
}
|
||||
|
||||
private void OnPlayerDetached(EntityUid uid, ActionsComponent component, LocalPlayerDetachedEvent? args = null)
|
||||
private void OnPlayerDetached(EntityUid uid, ActionsComponent component, LocalPlayerDetachedEvent args)
|
||||
{
|
||||
UnlinkAllActions();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public sealed partial class ChemistryGuideDataSystem : SharedChemistryGuideDataS
|
|||
|
||||
SubscribeNetworkEvent<ReagentGuideRegistryChangedEvent>(OnReceiveRegistryUpdate);
|
||||
SubscribeLocalEvent<PrototypesReloadedEventArgs>(OnPrototypesReloaded);
|
||||
OnPrototypesReloaded(null);
|
||||
LoadPrototypes(null);
|
||||
}
|
||||
|
||||
private void OnReceiveRegistryUpdate(ReagentGuideRegistryChangedEvent message)
|
||||
|
|
@ -47,7 +47,12 @@ public sealed partial class ChemistryGuideDataSystem : SharedChemistryGuideDataS
|
|||
}
|
||||
}
|
||||
|
||||
private void OnPrototypesReloaded(PrototypesReloadedEventArgs? ev)
|
||||
private void OnPrototypesReloaded(PrototypesReloadedEventArgs ev)
|
||||
{
|
||||
LoadPrototypes(ev);
|
||||
}
|
||||
|
||||
private void LoadPrototypes(PrototypesReloadedEventArgs? args)
|
||||
{
|
||||
// this doesn't check what prototypes are being reloaded because, to be frank, we use a lot of them.
|
||||
_reagentSources.Clear();
|
||||
|
|
|
|||
|
|
@ -37,13 +37,8 @@ public sealed partial class HandheldLightSystem : SharedHandheldLightSystem
|
|||
return true;
|
||||
}
|
||||
|
||||
private void OnAppearanceChange(EntityUid uid, HandheldLightComponent? component, ref AppearanceChangeEvent args)
|
||||
private void OnAppearanceChange(EntityUid uid, HandheldLightComponent component, ref AppearanceChangeEvent args)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_appearance.TryGetData<bool>(uid, ToggleableVisuals.Enabled, out var enabled, args.Component))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -441,11 +441,8 @@ public abstract partial class SharedCryoPodSystem : EntitySystem
|
|||
}
|
||||
}
|
||||
|
||||
protected void OnEmagged(EntityUid uid, CryoPodComponent? cryoPodComponent, ref GotEmaggedEvent args)
|
||||
protected void OnEmagged(EntityUid uid, CryoPodComponent cryoPodComponent, ref GotEmaggedEvent args)
|
||||
{
|
||||
if (!Resolve(uid, ref cryoPodComponent))
|
||||
return;
|
||||
|
||||
if (!_emag.CompareFlag(args.Type, EmagType.Interaction))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue