![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Static data for trainers in the world. More...
#include <Trainer.hpp>
Public Member Functions | |
Trainer () | |
Gives sane defaults. More... | |
bool | save (const std::string &file) const |
Saves the trainer data to the given file. More... | |
bool | saveBundle (bl::serial::binary::OutputStream &output, bl::resource::bundle::FileHandlerContext &ctx) const |
Saves the data from this object to the given bundle and registers depency files if any. More... | |
bool | load (const std::string &file, bl::tmap::Direction spawnDir=bl::tmap::Direction::Down) |
Loads the trainer data from the given file. More... | |
bool | loadDev (std::istream &input) |
Loads the trainer from the json stream. More... | |
bool | loadProd (bl::serial::binary::InputStream &input) |
Loads the trainer from it's binary format. More... | |
Public Attributes | |
std::string | name |
std::string | animation |
std::string | prebattleConversation |
std::string | postBattleConversation |
std::string | lostBattleLine |
std::uint8_t | visionRange |
Behavior | behavior |
std::vector< pplmn::OwnedPeoplemon > | peoplemon |
std::vector< item::Id > | items |
std::uint8_t | payout |
std::string | sourceFile |
Static data for trainers in the world.
Definition at line 20 of file Trainer.hpp.
core::file::Trainer::Trainer | ( | ) |
Gives sane defaults.
Definition at line 11 of file Trainer.cpp.
bool core::file::Trainer::load | ( | const std::string & | file, |
bl::tmap::Direction | spawnDir = bl::tmap::Direction::Down |
||
) |
Loads the trainer data from the given file.
file | The file to load from |
spawnDir | The direction to put in the standing behavior on load |
Definition at line 43 of file Trainer.cpp.
bool core::file::Trainer::loadDev | ( | std::istream & | input | ) |
Loads the trainer from the json stream.
input | JSON input stream |
Definition at line 56 of file Trainer.cpp.
bool core::file::Trainer::loadProd | ( | bl::serial::binary::InputStream & | input | ) |
Loads the trainer from it's binary format.
input | The input stream to load from |
Definition at line 52 of file Trainer.cpp.
bool core::file::Trainer::save | ( | const std::string & | file | ) | const |
Saves the trainer data to the given file.
file | The file to save to |
Definition at line 14 of file Trainer.cpp.
bool core::file::Trainer::saveBundle | ( | bl::serial::binary::OutputStream & | output, |
bl::resource::bundle::FileHandlerContext & | ctx | ||
) | const |
Saves the data from this object to the given bundle and registers depency files if any.
output | Stream to output to |
ctx | Context to register dependencies with |
Definition at line 19 of file Trainer.cpp.
std::string core::file::Trainer::animation |
Definition at line 72 of file Trainer.hpp.
Behavior core::file::Trainer::behavior |
Definition at line 77 of file Trainer.hpp.
std::vector<item::Id> core::file::Trainer::items |
Definition at line 79 of file Trainer.hpp.
std::string core::file::Trainer::lostBattleLine |
Definition at line 75 of file Trainer.hpp.
std::string core::file::Trainer::name |
Definition at line 71 of file Trainer.hpp.
std::uint8_t core::file::Trainer::payout |
Definition at line 80 of file Trainer.hpp.
std::vector<pplmn::OwnedPeoplemon> core::file::Trainer::peoplemon |
Definition at line 78 of file Trainer.hpp.
std::string core::file::Trainer::postBattleConversation |
Definition at line 74 of file Trainer.hpp.
std::string core::file::Trainer::prebattleConversation |
Definition at line 73 of file Trainer.hpp.
std::string core::file::Trainer::sourceFile |
Definition at line 83 of file Trainer.hpp.
std::uint8_t core::file::Trainer::visionRange |
Definition at line 76 of file Trainer.hpp.