Skip to content

Game.Prefabs.ContentFlags

Assembly: Assembly-CSharp.dll (game's main assembly)
Namespace: Game.Prefabs

Type: public enum (with [Flags] attribute)

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

Summary:
Flags enum used by prefab/content definitions to indicate special requirements or restrictions. Values can be combined using bitwise operations to express multiple requirements (for example, a prefab that requires both a DLC and a Paradox login).


Fields

  • RequireDlc = 1u
    Indicates the prefab/content requires one or more DLCs to be present/owned. Bit value: 0x1.

  • RequirePdxLogin = 2u
    Indicates the prefab/content requires the player to be logged in to a Paradox (PDX) account. Bit value: 0x2.

Properties

  • This enum declares no properties. Use the enum values directly and standard enum methods (e.g., HasFlag, ToString) where needed.

Constructors

  • Enums have no user-declared constructors. The default (implicit) value is 0 (no flags set).

Methods

  • No methods are declared on this enum. Use System.Enum utility methods and bitwise operations to work with flag values (e.g., HasFlag, bitwise & and |).

Usage Example

// Combine flags
ContentFlags flags = ContentFlags.RequireDlc | ContentFlags.RequirePdxLogin;

// Check for a specific flag (recommended: use bitwise ops for performance in hot paths)
bool requiresDlc = (flags & ContentFlags.RequireDlc) != 0;

// Alternatively, using Enum.HasFlag (convenient, slightly slower)
bool requiresPdxLogin = flags.HasFlag(ContentFlags.RequirePdxLogin);

// Clear a flag
flags &= ~ContentFlags.RequireDlc;