Skip to content

Class

RefundCalculator

Generated GDScript class reference for GridPlacement.RefundCalculator.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

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 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).
roundingPropertyRounding policy applied per entry after the ratio multiply.
calculateMethod
apply_toMethod