Table of Contents

Struct CanExecuteResult

Namespace
TinyLife.Actions
Assembly
Tiny Life.dll

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 string

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.

Type CanExecuteResult.ResultType

The CanExecuteResult.ResultType of this CanExecuteResult. In general, custom results will only have to use Invalid.

Fields

Hidden

public static readonly CanExecuteResult Hidden

Field Value

CanExecuteResult

LotStaffOnly

public static readonly CanExecuteResult LotStaffOnly

Field Value

CanExecuteResult

NoOneFree

public static readonly CanExecuteResult NoOneFree

Field Value

CanExecuteResult

NotEnoughMoney

public static readonly CanExecuteResult NotEnoughMoney

Field Value

CanExecuteResult

NotEnoughSkill

public static readonly CanExecuteResult NotEnoughSkill

Field Value

CanExecuteResult

NotYours

public static readonly CanExecuteResult NotYours

Field Value

CanExecuteResult

ObjectBroken

public static readonly CanExecuteResult ObjectBroken

Field Value

CanExecuteResult

Valid

public static readonly CanExecuteResult Valid

Field Value

CanExecuteResult

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

string

Type

The CanExecuteResult.ResultType of this CanExecuteResult. In general, custom results will only have to use Invalid.

public CanExecuteResult.ResultType Type { get; init; }

Property Value

CanExecuteResult.ResultType