Replace VerbTypes with verb classes (#6525)

This commit is contained in:
Leon Friedrich
2022-02-10 15:30:59 +13:00
committed by GitHub
parent 0cd2c2fa9d
commit 1c9ffdc78c
60 changed files with 409 additions and 405 deletions

View File

@@ -33,7 +33,7 @@ namespace Content.Server.Stack
base.Initialize();
SubscribeLocalEvent<StackComponent, InteractUsingEvent>(OnStackInteractUsing);
SubscribeLocalEvent<StackComponent, GetAlternativeVerbsEvent>(OnStackAlternativeInteract);
SubscribeLocalEvent<StackComponent, GetVerbsEvent<AlternativeVerb>>(OnStackAlternativeInteract);
}
/// <summary>
@@ -126,12 +126,12 @@ namespace Content.Server.Stack
args.Handled = true;
}
private void OnStackAlternativeInteract(EntityUid uid, StackComponent stack, GetAlternativeVerbsEvent args)
private void OnStackAlternativeInteract(EntityUid uid, StackComponent stack, GetVerbsEvent<AlternativeVerb> args)
{
if (!args.CanAccess || !args.CanInteract)
return;
Verb halve = new()
AlternativeVerb halve = new()
{
Text = Loc.GetString("comp-stack-split-halve"),
Category = VerbCategory.Split,
@@ -146,7 +146,7 @@ namespace Content.Server.Stack
if (amount >= stack.Count)
continue;
Verb verb = new()
AlternativeVerb verb = new()
{
Text = amount.ToString(),
Category = VerbCategory.Split,