diff --git a/AGRARIAN_DEVELOPMENT_ROADMAP.md b/AGRARIAN_DEVELOPMENT_ROADMAP.md index cf852f4..e65c826 100644 --- a/AGRARIAN_DEVELOPMENT_ROADMAP.md +++ b/AGRARIAN_DEVELOPMENT_ROADMAP.md @@ -751,7 +751,10 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe and restore through `RestoreSavedItems`, so inventory listeners and derived carry weight refresh after load. - [x] Save placed structures. -- [ ] Save resource depletion state if needed. +- [x] Save resource depletion state if needed. Active loaded resource nodes + persist stable `ResourceNodeId`, remaining harvest count, and MVP respawn + flag through `FAgrarianSavedResourceNode`, then restore depletion to matching + map-authored nodes on load. - [ ] Save world time. - [ ] Save weather seed/state. - [ ] Save containers. diff --git a/Docs/PersistenceDesignDocument.md b/Docs/PersistenceDesignDocument.md index 6f76785..ffbc220 100644 --- a/Docs/PersistenceDesignDocument.md +++ b/Docs/PersistenceDesignDocument.md @@ -485,6 +485,11 @@ restore only matching existing nodes. This deliberately avoids spawning resource nodes from saves, keeping tile-authored resources owned by tile content while letting persistence remember depletion for active tiles. +Resource depletion is stored in `FAgrarianSavedResourceNode` records with stable +`ResourceNodeId`, remaining harvest count, and the MVP respawn flag. The +persistence subsystem captures active loaded resource nodes during world save +and applies depletion only to matching map-authored nodes during load. + ## Open Questions - Should the first playable MVP use `USaveGame`, JSON, or a hybrid save diff --git a/Scripts/verify_resource_node_persistence.py b/Scripts/verify_resource_node_persistence.py index e88581f..db456fd 100644 --- a/Scripts/verify_resource_node_persistence.py +++ b/Scripts/verify_resource_node_persistence.py @@ -46,12 +46,19 @@ EXPECTED = { "Resource node persistence is map/tile state", "captures only resource nodes that exist in the", ], + ROOT / "Docs" / "PersistenceDesignDocument.md": [ + "`FAgrarianSavedResourceNode`", + "`ResourceNodeId`, remaining harvest count, and the MVP respawn flag", + "matching map-authored nodes during load", + ], ROOT / "Docs" / "Terrain" / "GroundZeroResourcePass.md": [ "Ground Zero resource actors receive stable `PersistenceNodeId` values", "resource nodes that exist in the loaded world", ], ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [ "[x] Add resource node persistence.", + "[x] Save resource depletion state if needed.", + "`FAgrarianSavedResourceNode`", ], }