ItemUsesAttribute
namespace Griff.Scenes;
public sealed class ItemUsesAttribute : FieldEditorAttributeMarks a list of strings as what items do when they’re used, one a line: the item, a colon, and what it does, several separated by commas: “heal 3”, “spawn Explosion” (a prefab), “send Teleport” (a message), e.g. “Bomb: spawn Explosion, send Boom” (an inventory’s Item Uses). The Inspector lists each item with what it does a row each, the item, prefab and message picked from the project’s.
Properties
Section titled “Properties”FitsText
Section titled “FitsText”public override string FitsText { get; }public static IReadOnlyList<string> Verbs { get; }What an item can do: heal hit points, spawn a prefab, send a message.
Methods
Section titled “Methods”Describe
Section titled “Describe”public override string Describe()public override bool Fits(Type type)Problem
Section titled “Problem”public override string? Problem(Component component, object? value)public static ValueTuple<string, IReadOnlyList<ValueTuple<string, string>>>? Read(string line)A line read, every effect kept as written (verbs in small letters); null when it has no colon.