Persistent action history for placement and manipulation events. Stores [PlacementActionData] and [ManipulationData] entries in a serializable [Resource] so the action log survives UI close / scene changes. Supports [ResourceSaver]/[ResourceLoader] round-trips out of the box because all state is [member action_entries] — an exported [Dictionary] whose keys are timestamps and values are one of the two data types. Usage: var history := PlacementActionHistory.new() history.add_entry(data) ResourceSaver.save(history, "user://action_history.res") var loaded := ResourceLoader.load("user://action_history.res") as PlacementActionHistory
Source: addons/grid_placement/resources/placement_action_history.gd
Syntax
class PlacementActionHistory extends ResourceMembers
| Name | Kind | Summary |
|---|---|---|
entry_added | Event | Emitted whenever a new entry is added. |
action_entries | Property | Ordered entries. Keys are monotonically increasing frame-time integers; values are [PlacementActionData] or [ManipulationData]. Exported for [ResourceSaver] serialization (supported in Godot 4.4+). |
auto_dump_path | Property | Auto-dump path. When non-empty, the history is written to this path on [method dump_to_disk]. |
add_entry | Method | |
get_entries | Method | |
entries | Property | |
sorted_keys | Property | |
get_recent_entries | Method | |
all | Property | |
start | Property | |
clear | Method | |
save_to_file | Method | |
result | Property | |
load_from_file | Method | |
loaded | Property | |
history | Property | |
dump_to_disk | Method | |
dump_to_text | Method | |
lines | Property | |
line | Property | |
pad | Property | |
tdd | Property | |
md | Property | |
text | Property | |
file | Property |
Source
addons/grid_placement/resources/placement_action_history.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs