GBEnums
Summary
Section titled “Summary”Centralized enums used across the Grid Building plugin.
Collects shared enum types (modes, actions, statuses, tile types) used by systems, UI, and tests.
enum ModeDefines what building operation is being performed
OFF=0— Building systems are offlineINFO=1— Targeting objects for information purposes onlyBUILD=2— Objects currently being placedMOVE=3— Changing Position, Rotation, or Size of Existing ObjectsDEMOLISH=4— Destroying destructible objects from the scene
enum MoveDirectionDefines what moves are allowed for purposes like AStarGrid2D pathing
SINGLE=0— Only allow moves in a single direction up, down, left, rightALLOW_DIAGONOL=1— Allow diagonal moves that go in both X, Y axis at the same time
enum ActionActions that can be taken within the building system
BUILD=0— Place object in locationMOVE=1— Move object to new locationROTATE=2— Rotate object left or rightFLIP_H=3— Flip horizontallyFLIP_V=4— Flip verticallyDEMOLISH=5— Destroy a scene object
enum BuildTypeType of build operation being performed
SINGLE=0— Single click/confirmation buildDRAG=1— Continuous drag-building across multiple tilesAREA=2— Future: Build across a defined area (e.g., fence line from point A to B)
enum StatusStatus for a build / manipulation action
CREATED=0— Data for action has been createdSTARTED=1— Action has been started and is runningFAILED=2— Action failed to execute. Some actions can continue to attempt to finish after initial failing.FINISHED=3— Action has finished executing successfully,CANCELED=4— Action was manually canceled before finishing execution
enum ProjectionMethodProjection methods for screen to world conversion
UNPROJECT=0SCREEN_TO_WORLD=1CAMERA_INVERSE=2EVENT_GLOBAL=3EVENT_POS=4
enum CenteringModeManual recenter targets for GridPositioner2D input actions
CENTER_ON_SCREEN=0— Center on the middle of the active viewportCENTER_ON_MOUSE=1— Center on the current mouse cursor position
Methods
Section titled “Methods”static func mode_to_string( mode: Mode ) -> StringConvert Mode enum to a stable string for diagnostics and UI
static func projection_method_to_string( method: ProjectionMethod ) -> StringConvert ProjectionMethod enum to string
Source
Section titled “Source”addons/grid_building/gb_enums.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.