Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.
Pure refund math for the 5.1 refund contract. No node, no scene dependencies — embed it in a [RefundService], a custom [Refunder], or any consumer script. Given a resolved [BuildCost], computes id -> refund amount at [member refund_ratio] and optionally applies it to a container through the canonical id interface ([code]try_add_by_id[/code]).
Source: addons/grid_placement/systems/manipulation/refund_calculator.gd
Syntax
class RefundCalculator extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
refund_ratio | Property | How fractional refund amounts are converted to whole items. Fraction of the original cost returned on demolish (1.0 = full refund). |
rounding | Property | Rounding policy applied per entry after the ratio multiply. |
calculate | Method | |
refunds | Property | |
amount | Property | |
apply_to | Method | |
refunds | Property |
Source
addons/grid_placement/systems/manipulation/refund_calculator.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs