Skip to content

Class

PlacementCostProvider

Generated GDScript class reference for GridPlacement.PlacementCostProvider.

Status
Current
Version
v6.3.0
Source updated
2026-10-29
Generated on
2026-10-29

6.3. These pages document the 6.3 release, where placeable is now entry (what changed) and PlacementOwner is deprecated (migration). Still on 6.2? Your version's guides ship inside the plugin itself, under addons/grid_placement/guides/; the 6.2 URLs on this site now redirect to this series.

Typed view over a game-owned cost provider (inventory, wallet, stockpile). Grid Placement does not own inventory and cannot see its boundary. Any Object implementing this id-keyed protocol works as a provider:
get_count_by_id(id: StringName) -> int
try_remove_by_id(id: StringName, amount: int) -> int
try_add_by_id(id: StringName, amount: int) -> int

This wrapper is the one place that probes for those methods, so SpendCostRuleBase and RefundCalculator call a typed API. See the placement rules guide for the limits of spending through the plugin.

Source: addons/grid_placement/placement/placement_rules/template_rules/placement_cost_provider.gd

Syntax

class PlacementCostProvider extends RefCounted

Members

NameKindSummary
METHOD_COUNTField
METHOD_REMOVEField
METHOD_ADDField
is_boundMethod
can_countMethod
can_removeMethod
can_addMethod
get_missing_methodsMethod
get_target_classMethod
countMethod
removeMethod
addMethod