Skip to content

Game.Zones.LotFlags

Assembly: Assembly-CSharp (game code)
Namespace: Game.Zones

Type: enum (flags)

Base: System.Enum (underlying type: byte)

Summary:
LotFlags is a small flags enum used to mark properties of a lot related to corner placement. The [Flags] attribute allows combinations (bitwise OR) so a lot can be marked as multiple corner-related states at once. The underlying type is byte, so values are stored in a single byte — useful for compact per-lot storage in the game world.


Fields

  • CornerLeft = 1
    Marks the lot as being on a left corner. Because this enum is a flags enum, this value represents the first bit (0x01).

  • CornerRight = 2
    Marks the lot as being on a right corner. This value represents the second bit (0x02).

Properties

  • This enum type does not define any properties. Use enum values or bitwise operations to inspect or manipulate flags.

Constructors

  • public LotFlags()
    Enums do not expose custom constructors in typical usage. An enum value is created by casting a numeric value or using one of the named fields; the default value is 0 (no flags set).

Methods

  • This enum does not declare methods. Use the standard System.Enum and extension methods such as Enum.HasFlag or bitwise operators (&, |, ^, ~) for operations.

Usage Example

// Combine flags
LotFlags flags = LotFlags.CornerLeft | LotFlags.CornerRight;

// Check flags
bool isLeft = (flags & LotFlags.CornerLeft) != 0;
// or
bool isRight = flags.HasFlag(LotFlags.CornerRight);

// Clear a flag
flags &= ~LotFlags.CornerLeft;

// Cast from byte (e.g., reading from compact storage)
byte stored = 2;
LotFlags loaded = (LotFlags)stored;

// Typical use in mod code: set or test corner state for a lot index
// (pseudocode)
void MarkLotAsLeftCorner(int lotIndex)
{
    LotFlags current = GetLotFlags(lotIndex); // hypothetical getter
    current |= LotFlags.CornerLeft;
    SetLotFlags(lotIndex, current); // hypothetical setter
}

Notes: - Because this enum is decorated with [Flags] and uses power-of-two values, it is safe to combine values with bitwise operations. - Value 0 (no flags) is a valid state representing a lot that is not on any corner.