PlaceableTestFactory

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Source File: /addons/grid_building/test/factories/placeable_test_factory.gd

Extends: RefCounted

Public Methods

create_test_placeable_with_rules

1
2
3
4
5
create_test_placeable_with_rules(
    base_placeable: Placeable,
    display_name: String = "Test Placeable With Rules",
    include_tile_rule: bool = true
) -> Placeable

Flags: static

Placeable Test Factory Centralized creation of Placeable objects for testing Following GdUnit best practices: DRY principle, centralize common object creation Creates a test placeable with standard rules configuration @param base_placeable: Base placeable to copy scene from (e.g., smithy_placeable) @param display_name: Display name for the test placeable @param include_tile_rule: Whether to include ValidPlacementTileRule


create_polygon_test_placeable

1
create_polygon_test_placeable(test_instance: Node) -> Placeable

Flags: static

Creates a polygon test placeable (extracted from UnifiedTestFactory) @param test_instance: Test instance for node management


create_polygon_test_setup

1
create_polygon_test_setup(test_instance: Node) -> Dictionary

Flags: static

Creates a polygon test setup with rules and placeable @param test_instance: Test instance for node management


create_basic_test_placeable

1
2
3
4
create_basic_test_placeable(
    base_placeable: Placeable,
    display_name: String = "Basic Test Placeable"
) -> Placeable

Flags: static

Creates a basic test placeable without placement rules @param base_placeable: Base placeable to copy scene from @param display_name: Display name for the placeable


create_minimal_test_placeable

1
2
3
4
create_minimal_test_placeable(
    display_name: String = "Minimal Test Placeable",
    include_rules: bool = false
) -> Placeable

Flags: static

@deprecated Use GBTestConstants.PLACEABLE_SMITHY or other preloaded placeables instead. This function creates placeables without collision shapes which causes indicator generation to fail. Creates a minimal test placeable for simple testing scenarios @param display_name: Display name for the placeable @param include_rules: Whether to include default placement rules


create_smithy_test_placeable

1
2
3
4
create_smithy_test_placeable(
    smithy_placeable: Placeable,
    include_tile_rule: bool = true
) -> Placeable

Flags: static

Creates a smithy-based test placeable using loaded smithy resource @param smithy_placeable: The loaded smithy placeable resource @param include_tile_rule: Whether to include ValidPlacementTileRule


validate_test_placeable

1
2
3
4
validate_test_placeable(
    placeable: Placeable,
    context: String = "Test placeable"
) -> bool

Flags: static

Validates that a placeable has the required configuration for testing @param placeable: The placeable to validate @param context: Context string for error messages



Grid Building v5.0.8 | Generated 24/05/2026