Replace VerbTypes with verb classes (#6525)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user