Skip to content

Game.Buildings.BuildingNotification

Assembly: Assembly-CSharp
Namespace: Game.Buildings

Type: public enum (flags)

Base: System.Enum (underlying type: byte)

Summary: A flags-style enumeration used to represent one or more notification types related to buildings (pollution notifications). The [Flags] attribute allows combining values using bitwise operators so a single variable can represent multiple active notifications (for example, both AirPollution and NoisePollution).


Fields

  • None = 0
    Represents no notifications active.

  • AirPollution = 1
    Indicates the building is producing or affected by air pollution.

  • NoisePollution = 2
    Indicates the building is producing or affected by noise pollution.

  • GroundPollution = 4
    Indicates the building is producing or affected by ground pollution.

Properties

  • (None)
    This enum has no properties. Use standard Enum methods (e.g., HasFlag) to inspect values.

Constructors

  • (None)
    Enums do not define user-visible constructors. Values are assigned from the underlying byte type.

Methods

  • (None declared)
    Standard System.Enum and ValueType methods are available (ToString(), HasFlag(Enum), etc.). Use bitwise operators to combine, test, or clear flags.

Usage Example

// Set notifications (combine flags)
Game.Buildings.BuildingNotification notifications = 
    Game.Buildings.BuildingNotification.AirPollution | Game.Buildings.BuildingNotification.NoisePollution;

// Check if a specific notification is present
bool hasAir = notifications.HasFlag(Game.Buildings.BuildingNotification.AirPollution);

// Add a flag
notifications |= Game.Buildings.BuildingNotification.GroundPollution;

// Remove a flag
notifications &= ~Game.Buildings.BuildingNotification.NoisePollution;

// Check for none
bool isNone = notifications == Game.Buildings.BuildingNotification.None;