What was paid to build an object, so it can be refunded on demolish. Your game stores it on the placed Manipulatable as metadata under META_KEY when the object is built. A Refunder reads it back when the object is demolished (see ManipulationState.pre_demolish). Costs are keyed by id; your inventory decides what each id means. See the refund-on-demolish guide.
Source: addons/grid_placement/resources/build_cost.gd
Syntax
class BuildCost extends ResourceMembers
| Name | Kind | Summary |
|---|---|---|
META_KEY | Field | Metadata key the cost is stored under on the Manipulatable. Use this constant instead of typing the string. |
entries | Property | Items paid. Each dictionary has an id (StringName) and a quantity ([int]). |
currency | Property | Currency paid, as currency id (StringName) mapped to amount. |
source_resource | Property | Optional. The resource this cost came from, such as the ScenePlacementEntry. For reference only; refunds do not use it. |
resolve_for | Method | |
from_costs | Method | |
from_pairs | Method | |
is_valid_quantity | Method | |
multiplied | Method |