Class PlaceableSequenceFactory
- Namespace
- GridPlacement.GDScript
- Assembly
- MoonBark.GridPlacement.GDScript.dll
Factory utilities for creating and normalizing PlaceableSequence collections.\n\nThis factory implements the "Helper Factory (Suggested)" pattern mentioned in the UI PlaceableSequence guide documentation. It provides convenient methods for: - Converting individual Placeables into single-item sequences - Normalizing mixed arrays of Placeables and PlaceableSequences - Reducing UI wiring code when working with PlaceableList components\n\nUsage Context: These utilities are designed for cases where you have existing Placeable collections but need to use them with PlaceableSequenceSelectionUI or PlaceableList components that expect PlaceableSequence objects.\n\nNote: Currently not used in the main plugin demos, but provided as convenience utilities for game developers who need sequence normalization.
class PlaceableSequenceFactory extends RefCounted
Properties
converted_sequences
var converted_sequences: Array[PlaceableSequence] = []
single_item_sequence
var single_item_sequence = PlaceableSequence.new()
normalized_sequences
var normalized_sequences: Array[PlaceableSequence] = []
wrapper_sequence
var wrapper_sequence = PlaceableSequence.new()
Methods
from_placeables
static func from_placeables(placeables: Array[Placeable]) -> Array[PlaceableSequence]:
Parameters
placeables
Returns
ensure_sequences
static func ensure_sequences(mixed: Array) -> Array[PlaceableSequence]:
Parameters
mixed