Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | Friends | List of all members
core::system::Scripts Class Reference

System that stores and handles saving/loading of save entries for scripts. More...

#include <Scripts.hpp>

+ Inheritance diagram for core::system::Scripts:

Public Member Functions

 Scripts (Systems &owner)
 Initializes the scripting system. More...
 
void init ()
 Subscribes to the game event bus. More...
 
const bl::script::Value * getEntry (const std::string &name) const
 Returns the save entry with the given name. May be null if not found. More...
 
void setEntry (const std::string &name, const bl::script::Value &val)
 Sets a save entry. More...
 

Friends

struct bl::serial::SerializableObject< Scripts >
 

Detailed Description

System that stores and handles saving/loading of save entries for scripts.

Definition at line 22 of file Scripts.hpp.

Constructor & Destructor Documentation

◆ Scripts()

core::system::Scripts::Scripts ( Systems owner)

Initializes the scripting system.

Parameters
ownerThe main game systems

Definition at line 10 of file Scripts.cpp.

Member Function Documentation

◆ getEntry()

const bl::script::Value * core::system::Scripts::getEntry ( const std::string &  name) const

Returns the save entry with the given name. May be null if not found.

Parameters
nameThe name of the save entry to get
Returns
const bl::script::Value* The value if found, or nullptr if not

Definition at line 15 of file Scripts.cpp.

◆ init()

void core::system::Scripts::init ( )

Subscribes to the game event bus.

Definition at line 13 of file Scripts.cpp.

◆ setEntry()

void core::system::Scripts::setEntry ( const std::string &  name,
const bl::script::Value &  val 
)

Sets a save entry.

Parameters
nameThe name to set
valThe value to set to

Definition at line 20 of file Scripts.cpp.

Friends And Related Function Documentation

◆ bl::serial::SerializableObject< Scripts >

friend struct bl::serial::SerializableObject< Scripts >
friend

Definition at line 57 of file Scripts.hpp.


The documentation for this class was generated from the following files: