Skip to content

Class

RefundCalculator

Generated GDScript class reference for GridPlacement.RefundCalculator.

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.

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 refund_ratio and optionally applies it to a container through the canonical id interface (try_add_by_id).

Source: addons/grid_placement/systems/manipulation/refund_calculator.gd

Syntax

class RefundCalculator extends RefCounted

Members

NameKindSummary
refund_ratioPropertyHow fractional refund amounts are converted to whole items. Fraction of the original cost returned on demolish (1.0 = full refund). Values above 1.0 would pay more than the build cost, so construction clamps them to 1.0 with an error; negatives produce no refund.
roundingPropertyRounding policy applied per entry after the ratio multiply.
calculateMethod
apply_toMethod