Game.Prefabs.ChirpDataFlags
Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs
Type: enum
Base: System.Enum (underlying type: byte)
Summary:
ChirpDataFlags defines which kinds of senders are allowed to send "chirps" (short notifications/messages) in the game. It is a byte-based enumeration where individual values are powers of two so they can be combined as a bitmask (even though the enum in source does not have a [Flags] attribute). Use bitwise operations to test, combine, or clear flags.
Fields
-
None = 0
Represents no sender types allowed. -
CitizensCanSend = 1
Flag indicating citizens are permitted to send chirps. -
BrandsCanSend = 2
Flag indicating brands are permitted to send chirps (e.g., company/brand-related notifications). -
ServiceCanSend = 4
Flag indicating services (city services) are permitted to send chirps.
Properties
- (none)
This enum does not declare any properties.
Constructors
- (implicit)
Enums have an implicit constructor; there are no public instance constructors to call directly.
Methods
- (none)
No methods are declared on this enum.
Usage Example
// Combine flags: allow citizens and services to send chirps
ChirpDataFlags allowed = ChirpDataFlags.CitizensCanSend | ChirpDataFlags.ServiceCanSend;
// Test if a specific flag is set
bool citizensAllowed = (allowed & ChirpDataFlags.CitizensCanSend) != 0;
// Add a flag
allowed |= ChirpDataFlags.BrandsCanSend;
// Remove a flag
allowed &= ~ChirpDataFlags.ServiceCanSend;
// Check multiple flags (both Citizens and Brands allowed?)
bool both = (allowed & (ChirpDataFlags.CitizensCanSend | ChirpDataFlags.BrandsCanSend))
== (ChirpDataFlags.CitizensCanSend | ChirpDataFlags.BrandsCanSend);
Additional notes: - Although the enum values are defined as bit flags, the source does not include the [System.Flags] attribute. You can still use bitwise operations to combine and test values; adding [Flags] (if modifying the source) can make debugging/ToString output more descriptive.