Class PlacementValidResult
A placement valid result allows buildings to define different reasons why a placement is invalid.
Namespace: TycoonTerrain.Core
Assembly: TycoonTerrainAssembly.dll
Syntax
public class PlacementValidResult
Properties
InvalidReason
Gets the reason for the placement to be invalid, if applicaple. Returns null for valid placements.
Declaration
public string InvalidReason { get; }
Property Value
Type | Description |
---|---|
String | The reason for the placement to be invalid. |
IsValid
Returns whether the placement is valid.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Valid
Creates a valid placement result.
Declaration
public static PlacementValidResult Valid { get; }
Property Value
Type | Description |
---|---|
PlacementValidResult | A valid placement result. |
Methods
Invalid(String)
Creates an invalid placement result with the specified reason.
Declaration
public static PlacementValidResult Invalid(string reason)
Parameters
Type | Name | Description |
---|---|---|
String | reason | The reason. |
Returns
Type | Description |
---|---|
PlacementValidResult | An invalid placement result with |