1#ifndef YAZE_CORE_STORY_EVENT_GRAPH_H
2#define YAZE_CORE_STORY_EVENT_GRAPH_H
6#include <unordered_map>
9#include "absl/status/status.h"
163 void UpdateStatus(uint8_t crystal_bitfield, uint8_t game_state);
174 uint8_t crystal_bitfield, uint8_t game_state)
const;
184 [[nodiscard]]
const std::vector<StoryEventNode>&
nodes()
const {
188 [[nodiscard]]
const std::vector<StoryEdge>&
edges()
const {
return edges_; }
The complete Oracle narrative progression graph.
const std::vector< StoryEventNode > & nodes() const
void AutoLayout()
Compute layout positions using topological sort + layered positioning.
StoryEventGraph()=default
std::vector< StoryEventNode > nodes_
std::vector< StoryEdge > edges_
const StoryEventNode * GetNode(const std::string &id) const
void UpdateStatus(uint8_t crystal_bitfield, uint8_t game_state)
Update node completion status based on SRAM state.
std::vector< std::string > GetCompletedNodes(uint8_t crystal_bitfield, uint8_t game_state) const
Get IDs of events that are completed based on SRAM state.
bool loaded() const
Check if the graph has been loaded.
const std::vector< StoryEdge > & edges() const
absl::Status LoadFromJson(const std::string &path)
Load the graph from a JSON file.
std::unordered_map< std::string, size_t > node_index_
absl::Status LoadFromString(const std::string &json_content)
Load the graph from a JSON string.
StoryNodeStatus
Completion status of a story event node for rendering.
Oracle of Secrets game progression state parsed from SRAM.
A directed edge in the story event graph.
A node in the Oracle story event graph.
std::vector< StoryLocation > locations
std::vector< std::string > unlocks
std::vector< std::string > dependencies
std::vector< std::string > scripts
std::vector< std::string > text_ids
std::vector< StoryFlag > flags
std::string last_verified
std::vector< StoryPredicate > completed_when
A flag set or cleared by a story event.
A location associated with a story event.
std::string special_world_id
A predicate for determining event completion from SRAM state.