Skip to content

Game.Prefabs.ObjectStatusType

Assembly: Game (likely compiled into Assembly-CSharp in Unity builds)
Namespace: Game.Prefabs

Type: enum

Base: System.Enum (underlying type: System.Int32)

Summary:
Enumeration that represents various status types that a prefab object can have in the game. These statuses are used by game systems (resource handling, fire/damage simulation, AI/tourist logic, etc.) to determine behavior and presentation of prefabs in the world.


Fields

  • WoodResource
    Represents that the object is a wood resource (e.g., a harvestable/collectible resource). Value = 0.

  • FireHazard
    Indicates the object is considered a fire hazard (used by fire simulation and risk assessment). Value = 1.

  • Damage
    Marks the object as damaged (may affect visuals, functionality, or require repairs). Value = 2.

  • Destroyed
    Indicates the object has been destroyed (removed/ruined state). Value = 3.

  • ExtractorPlaceholder
    Used for extractor-related prefabs as a placeholder state (e.g., for resource extractor placement or preview). Value = 4.

  • Tourist
    Marks the object as related to tourist functionality (affects tourism systems or visitor behavior). Value = 5.

Properties

  • None declared on this enum.
    Enums have no instance properties beyond those inherited from System.Enum; use the enum values directly.

Constructors

  • None declared.
    As with all enums, values are defined at compile-time. The enum uses the default underlying integer constructor semantics.

Methods

  • No custom methods are declared on this enum.
    Inherited members from System.Enum and System.ValueType are available, such as:
  • ToString()
  • HasFlag(Enum)
  • Enum.Parse / Enum.TryParse
  • CompareTo(object)

Usage Example

// Assigning a status
Game.Prefabs.ObjectStatusType status = Game.Prefabs.ObjectStatusType.WoodResource;

// Checking a status
if (status == Game.Prefabs.ObjectStatusType.FireHazard)
{
    // handle fire hazard logic
}

// Switch over statuses
switch (status)
{
    case Game.Prefabs.ObjectStatusType.Damaged:
    case Game.Prefabs.ObjectStatusType.Damage:
        // show damaged visuals
        break;
    case Game.Prefabs.ObjectStatusType.Destroyed:
        // remove or disable object
        break;
}

// Example: storing status on a prefab/component
public class PrefabStatusComponent : MonoBehaviour
{
    public Game.Prefabs.ObjectStatusType Status;

    void Start()
    {
        if (Status == Game.Prefabs.ObjectStatusType.Tourist)
        {
            // apply tourist-specific behavior
        }
    }
}