Skip to content

Game.Prefabs.CalendarEventMonths

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: enum

Base: System.Int32

Summary:
Defines month identifiers as individual bit flags (each value is a distinct power-of-two) so multiple months can be combined with bitwise operations. Note: the enum in the source does not include a [Flags] attribute, but its numeric layout indicates intended use as a bitmask. Also there is a spelling typo in the enum member "Septermber" (should be "September"); keep this name when referencing the original enum to preserve compatibility with existing code.


Fields

  • January = 1
    Represents January (bit 0).

  • February = 2
    Represents February (bit 1).

  • March = 4
    Represents March (bit 2).

  • April = 8
    Represents April (bit 3).

  • May = 0x10
    Represents May (bit 4).

  • June = 0x20
    Represents June (bit 5).

  • July = 0x40
    Represents July (bit 6).

  • August = 0x80
    Represents August (bit 7).

  • Septermber = 0x100
    Represents September (bit 8). Note the original enum spells this member "Septermber" (typo).

  • October = 0x200
    Represents October (bit 9).

  • November = 0x400
    Represents November (bit 10).

  • December = 0x800
    Represents December (bit 11).

Properties

  • None (enum type—no properties)

Constructors

  • None (enum type—no constructors)

Methods

  • None (enum type—no methods)

Usage Example

// Treating the enum as a bitmask (recommended to add [Flags] if defining your own copy)
using Game.Prefabs;

CalendarEventMonths winter = CalendarEventMonths.December | CalendarEventMonths.January | CalendarEventMonths.February;

// Check if a month is included
bool hasJanuary = (winter & CalendarEventMonths.January) != 0;

// Add a month
winter |= CalendarEventMonths.March;

// Remove a month
winter &= ~CalendarEventMonths.December;

Notes: - Because the original enum lacks the [Flags] attribute, code using it still works with bitwise operations, but adding [Flags] to your own copy improves readability and tooling support. - If you need to reference September by name, use the exact spelling "Septermber" to match the game's enum. Consider wrapping or mapping it to a correctly spelled identifier in your mod code to avoid confusion.