16 const auto it = entries.find(name);
17 return it != entries.end() ? &it->second :
nullptr;
21 entries.emplace(name, val);
Core classes and functionality for both the editor and game.
Fired when the game is saving or loading. Allows systems to hook in their data.
file::GameSave & gameSave
Game save being initialized.
struct core::file::GameSave::ScriptDataPointers scripts
std::unordered_map< std::string, bl::script::Value > * entries
const bl::script::Value * getEntry(const std::string &name) const
Returns the save entry with the given name. May be null if not found.
void setEntry(const std::string &name, const bl::script::Value &val)
Sets a save entry.
void init()
Subscribes to the game event bus.
Scripts(Systems &owner)
Initializes the scripting system.
Owns all primary systems and a reference to the engine.