Replace VerbTypes with verb classes (#6525)
This commit is contained in:
@@ -18,15 +18,15 @@ namespace Content.Server.Light.EntitySystems
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<UnpoweredFlashlightComponent, GetActivationVerbsEvent>(AddToggleLightVerbs);
|
||||
SubscribeLocalEvent<UnpoweredFlashlightComponent, GetVerbsEvent<ActivationVerb>>(AddToggleLightVerbs);
|
||||
}
|
||||
|
||||
private void AddToggleLightVerbs(EntityUid uid, UnpoweredFlashlightComponent component, GetActivationVerbsEvent args)
|
||||
private void AddToggleLightVerbs(EntityUid uid, UnpoweredFlashlightComponent component, GetVerbsEvent<ActivationVerb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract)
|
||||
return;
|
||||
|
||||
Verb verb = new();
|
||||
ActivationVerb verb = new();
|
||||
verb.Text = Loc.GetString("toggle-flashlight-verb-get-data-text");
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/light.svg.192dpi.png";
|
||||
verb.Act = () => ToggleLight(component);
|
||||
|
||||
Reference in New Issue
Block a user