Base class for rules that spend a cost when something is placed. Use SpendByIdRule or SpendMaterialsRuleById instead of this class. Costs are keyed by id, such as &"gold" or &"wood". What the ids mean is up to your game: it supplies a provider (see PlacementCostProvider) that checks and removes amounts. If any cost cannot be paid in full, everything already taken is given back and placement fails.
Source: addons/grid_placement/placement/placement_rules/template_rules/spend_cost_rule_base.gd
Syntax
class SpendCostRuleBase extends PlacementRuleMembers
| Name | Kind | Summary |
|---|---|---|
costs | Property | What placing costs: each id mapped to an amount. |
validate_placement | Method | |
apply | Method | |
tear_down | Method | |
get_setup_issues | Method | |
get_missing_costs | Method |