File data for NPCs.
More...
#include <NPC.hpp>
File data for NPCs.
Definition at line 26 of file NPC.hpp.
◆ NPC()
Construct a new NPC file.
◆ animation() [1/2]
std::string & core::file::NPC::animation |
( |
| ) |
|
The directory of the movement animations.
Definition at line 54 of file NPC.cpp.
◆ animation() [2/2]
const std::string & core::file::NPC::animation |
( |
| ) |
const |
The directory of the movement animations.
Definition at line 56 of file NPC.cpp.
◆ behavior() [1/2]
Behavior & core::file::NPC::behavior |
( |
| ) |
|
The behavior of the NPC.
Definition at line 62 of file NPC.cpp.
◆ behavior() [2/2]
Behavior core::file::NPC::behavior |
( |
| ) |
const |
The behavior of the NPC.
Definition at line 64 of file NPC.cpp.
◆ conversation() [1/2]
std::string & core::file::NPC::conversation |
( |
| ) |
|
The conversation file of the NPC.
Definition at line 58 of file NPC.cpp.
◆ conversation() [2/2]
const std::string & core::file::NPC::conversation |
( |
| ) |
const |
The conversation file of the NPC.
Definition at line 60 of file NPC.cpp.
◆ load()
bool core::file::NPC::load |
( |
const std::string & |
file, |
|
|
bl::tmap::Direction |
spawnDir = bl::tmap::Direction::Up |
|
) |
| |
Loads the NPC data from the given file.
- Parameters
-
file | The file to load from |
spawnDir | The direction to put into the standing behavior on load |
- Returns
- True on success, false on error
Definition at line 36 of file NPC.cpp.
◆ loadDev()
bool core::file::NPC::loadDev |
( |
std::istream & |
input | ) |
|
Loads the NPC from the json stream.
- Parameters
-
- Returns
- True if the NPC could be loaded, false on error
Definition at line 42 of file NPC.cpp.
◆ loadProd()
bool core::file::NPC::loadProd |
( |
bl::serial::binary::InputStream & |
input | ) |
|
Loads the NPC from it's binary format.
- Parameters
-
input | The input stream to load from |
- Returns
- True if the NPC could be loaded, false otherwise
Definition at line 46 of file NPC.cpp.
◆ name() [1/2]
std::string & core::file::NPC::name |
( |
| ) |
|
◆ name() [2/2]
const std::string & core::file::NPC::name |
( |
| ) |
const |
◆ save()
bool core::file::NPC::save |
( |
const std::string & |
file | ) |
const |
Saves the NPC data to the given file.
- Parameters
-
- Returns
- True on success, false on error
Definition at line 10 of file NPC.cpp.
◆ saveBundle()
bool core::file::NPC::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.
- Parameters
-
output | Stream to output to |
ctx | Context to register dependencies with |
- Returns
- True if serialization succeeded, false otherwise
Definition at line 15 of file NPC.cpp.
◆ bl::serial::SerializableObject< NPC >
friend struct bl::serial::SerializableObject< NPC > |
|
friend |
The documentation for this class was generated from the following files: