Adds verb categories (#766)
* Adds verb categories * Update Content.Shared/GameObjects/Verbs/Verb.cs Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com> * Make GetCategory virtual Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5747eb5fac
commit
e17ffbd76f
@@ -31,6 +31,14 @@ namespace Content.Shared.GameObjects
|
||||
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
||||
public abstract string GetText(IEntity user, IComponent component);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the category of this verb.
|
||||
/// </summary>
|
||||
/// <param name="user">The entity of the user opening this menu.</param>
|
||||
/// <param name="component">The component instance for which this verb is being loaded.</param>
|
||||
/// <returns>The category of this verb.</returns>
|
||||
public virtual string GetCategory(IEntity user, IComponent component) => "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility level of this verb in the right click menu.
|
||||
/// </summary>
|
||||
@@ -63,6 +71,14 @@ namespace Content.Shared.GameObjects
|
||||
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
||||
protected abstract string GetText(IEntity user, T component);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the category of this verb.
|
||||
/// </summary>
|
||||
/// <param name="user">The entity of the user opening this menu.</param>
|
||||
/// <param name="component">The component instance for which this verb is being loaded.</param>
|
||||
/// <returns>The category of this verb.</returns>
|
||||
protected virtual string GetCategory(IEntity user, T component) => "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility level of this verb in the right click menu.
|
||||
/// </summary>
|
||||
@@ -84,6 +100,12 @@ namespace Content.Shared.GameObjects
|
||||
return GetText(user, (T) component);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public sealed override string GetCategory(IEntity user, IComponent component)
|
||||
{
|
||||
return GetCategory(user, (T) component);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public sealed override VerbVisibility GetVisibility(IEntity user, IComponent component)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user