Skip to content

Class

Refunder

Generated GDScript class reference for GridPlacement.Refunder.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Base class for consumers who want to inspect / veto a demolish at [signal ManipulationState.pre_demolish] time (5.1.0-D refund contract). Register instances on [member ManipulationState.refunders]; each one is called with the live [Manipulatable] and the [BuildCost] stamped at placement time (or [code]null[/code] when nothing was stamped). Implement [method on_pre_demolish] and return [code]true[/code] to veto the demolition. [b]Authority contract:[/b] [method on_pre_demolish] is veto-only. Apply refunds, resource grants, or other game-world consequences from [method on_demolish_confirmed], which runs after the demolish is FINISHED and after every registered refunder has had its veto chance. Applying consequences from [method on_pre_demolish] can grant a refund for a demolish a later refunder vetoes.

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

Syntax

class Refunder extends RefCounted

Members

NameKindSummary
on_pre_demolishMethod
on_demolish_confirmedMethod