Settings for placing objects and painting terrain: the preview, drag placement, and terrain brush limits.
Source: addons/grid_placement/systems/building/placement_settings.gd
Syntax
class PlacementSettings extends PlacementResourceMembers
| Name | Kind | Summary |
|---|---|---|
DRAG_PREVIEW_REFRESH_INTERVAL_TICKS | Field | Bulk previews revalidate external physics/rule changes periodically. |
preview_kept_script_types | Property | Class names of scripts kept on the placement preview. Every other script is removed from the preview so it does not run game logic. |
add_entry_instance | Property | Adds a SceneEntryInstance to every placed object, recording which entry it came from so it can be rebuilt when a level loads.Note: it stores the entry's file path. If you move or rename entry files, saved objects lose the link; look entries up by PlacementEntry.id instead if your files move often. |
preview_instance_z_index | Property | Z index of the placement preview. Keep it above indicator_z_index so the preview draws over the tile indicators. |
indicator_z_index | Property | Z index of the tile indicators. Keep it below preview_instance_z_index so they draw under the preview. |
default_cell_anchor_mode | Property | Where on the targeted 2D cell objects are placed, for entries set to INHERIT. See ScenePlacementEntry.CellAnchorMode. |
resolve_cell_anchor | Method | |
drag_ghost_style | Property | How a line or rectangle drag of objects is previewed. A tile-shaped marker on each cell where an object will be placed. Only the outline of the line or rectangle being dragged. A see-through copy of the object on each cell. How a line or rectangle drag of objects is previewed. See DragGhostStyle. |
drag_marker_texture | Property | Optional marker texture for PER_OBJECT_MARKERS, stretched to one tile. Leave empty to draw the map's tile shape. |
base_tile_paint_rules | Property | Rules checked whenever any terrain is painted. |
terrain_paint_requires_existing_cell | Property | When on, terrain can only be painted over cells that already have a tile. When off (default), painting empty space adds new cells. |
max_terrain_brush_cells | Property | Most cells one terrain brush stroke (line, rectangle, or flood fill) can paint. Keeps large drags from stalling the game. Cannot be set above BrushShapeGenerator.MAX_BRUSH_CELLS. |
max_object_drag_placements | Property | Most tiles one object drag can fill. The number of objects placed is this divided by the object's size in tiles (at least 1), so dragging large objects stays responsive. The preview shows only what will be placed. |
preview_root_script | Property | Script added to the root of the placement preview after its other scripts are removed. Does not replace a script that was kept. |