Struct CanExecuteResult
A utility structure used by ActionType.CanExecuteDelegate and other situations where an action can fail, or fail to start, due to a specific circumstance. The Name of the CanExecuteResult will be localized and displayed to the player if the CanExecuteResult.ResultType is not Hidden or Valid.
public readonly record struct CanExecuteResult : IEquatable<CanExecuteResult>
- Implements
- Inherited Members
- Extension Methods
Constructors
CanExecuteResult(string, ResultType)
A utility structure used by ActionType.CanExecuteDelegate and other situations where an action can fail, or fail to start, due to a specific circumstance. The Name of the CanExecuteResult will be localized and displayed to the player if the CanExecuteResult.ResultType is not Hidden or Valid.
public CanExecuteResult(string Name, CanExecuteResult.ResultType Type = ResultType.Invalid)
Parameters
Name
stringThe name of this CanExecuteResult, which is localized and displayed to the player. If the Type is Valid or Hidden, this name usually doesn't ever have to be displayed.
Type
CanExecuteResult.ResultTypeThe CanExecuteResult.ResultType of this CanExecuteResult. In general, custom results will only have to use Invalid.
Fields
Hidden
public static readonly CanExecuteResult Hidden
Field Value
LotStaffOnly
public static readonly CanExecuteResult LotStaffOnly
Field Value
NoOneFree
public static readonly CanExecuteResult NoOneFree
Field Value
NotEnoughMoney
public static readonly CanExecuteResult NotEnoughMoney
Field Value
NotEnoughSkill
public static readonly CanExecuteResult NotEnoughSkill
Field Value
NotYours
public static readonly CanExecuteResult NotYours
Field Value
ObjectBroken
public static readonly CanExecuteResult ObjectBroken
Field Value
Valid
public static readonly CanExecuteResult Valid
Field Value
Properties
Name
The name of this CanExecuteResult, which is localized and displayed to the player. If the Type is Valid or Hidden, this name usually doesn't ever have to be displayed.
public string Name { get; init; }
Property Value
Type
The CanExecuteResult.ResultType of this CanExecuteResult. In general, custom results will only have to use Invalid.
public CanExecuteResult.ResultType Type { get; init; }