Game.Tools.TempFlags
Assembly: Assembly-CSharp
Namespace: Game.Tools
Type: public enum (flags)
Base: System.Enum (underlying type: System.UInt32)
Summary:
TempFlags is a [Flags] enum used by the game's tooling systems to mark temporary object states/operations during editing/placement workflows. Each named value represents a single bit (uint) that can be combined to express multiple simultaneous temporary conditions such as create/delete operations, selection state, dragging, replacement, etc. This is typically used by tools that manage transient objects or actions before committing changes to the world.
Fields
-
Create = 1u
Flag indicating a create operation or that the temporary entry represents a newly created object. -
Delete = 2u
Flag indicating a delete operation or that the temporary entry is marked for removal. -
IsLast = 4u
Flag used to mark the last item in a sequence or the final step of a multi-step operation. -
Essential = 8u
Flag indicating the item is essential and should not be discarded by non-critical operations. -
Dragging = 0x10u
Flag set while the item is being dragged (e.g., during repositioning with the mouse). -
Select = 0x20u
Flag indicating the item is selected. -
Modify = 0x40u
Flag indicating the item is under modification. -
Regenerate = 0x80u
Flag indicating the item should be regenerated (e.g., re-created or refreshed). -
Replace = 0x100u
Flag indicating the item is part of a replace operation. -
Upgrade = 0x200u
Flag indicating the item is being upgraded. -
Hidden = 0x400u
Flag indicating the item is hidden from view or game logic temporarily. -
Parent = 0x800u
Flag used to mark a parent item in a parent/child relationship. -
Combine = 0x1000u
Flag indicating the item is part of a combine / merge operation. -
RemoveCost = 0x2000u
Flag indicating removal should also remove or affect associated costs. -
Optional = 0x4000u
Flag marking the item as optional (not required for an operation to complete). -
Cancel = 0x8000u
Flag indicating the operation involving the item was cancelled. -
SubDetail = 0x10000u
Flag used for sub-detail elements (smaller parts of a larger temporary object). -
Duplicate = 0x20000u
Flag indicating the item is a duplicate or part of a duplication operation.
Properties
- (none specific to this enum)
Enums do not declare instance properties. Use standard System.Enum methods and bitwise operators to query or manipulate flags.
Constructors
- (none)
Enums do not have user-declared constructors. Values are represented as constants of the underlying integral type.
Methods
- (inherited)
Standard enum methods from System.Enum / System.ValueType / System.Object apply (e.g., ToString(), HasFlag(Enum), CompareTo(object), GetHashCode()).
Usage Example
// combine flags when creating a temp object that's created and selected
TempFlags flags = TempFlags.Create | TempFlags.Select;
// test for a flag
bool isSelected = (flags & TempFlags.Select) != 0;
// or using HasFlag (less performant)
bool isSelected2 = flags.HasFlag(TempFlags.Select);
// add a flag (e.g., start dragging)
flags |= TempFlags.Dragging;
// remove a flag (e.g., finish dragging)
flags &= ~TempFlags.Dragging;
// check multiple flags
bool isCreateAndSelected = (flags & (TempFlags.Create | TempFlags.Select)) == (TempFlags.Create | TempFlags.Select);
// example: mark a temp entry as a hidden replacement
flags = TempFlags.Hidden | TempFlags.Replace;
Notes: - Because the enum is marked with [Flags], values are intended to be combined with bitwise operations. - The underlying type is uint; ensure any numeric casts consider unsigned behavior if doing raw numeric manipulation.