#include <C4InfoCore.h>
Public Member Functions | |
C4ObjectInfoCore () | |
bool | Save (C4Group &hGroup, class C4DefList *pDefs) |
bool | Load (C4Group &hGroup) |
void | Default (C4ID n_id=C4ID::None, class C4DefList *pDefs=nullptr, const char *cpNames=nullptr) |
void | Promote (int32_t iRank, C4RankSystem &rRanks, bool fForceRankName) |
bool | GetNextRankInfo (C4RankSystem &rDefaultRanks, int32_t *piNextRankExp, StdStrBuf *psNextRankName) |
void | CompileFunc (StdCompiler *pComp) |
Public Attributes | |
C4ID | id |
char | Name [C4MaxName+1] |
int32_t | Participation |
int32_t | Rank |
StdStrBuf | sRankName |
StdStrBuf | sNextRankName |
int32_t | NextRankExp |
int32_t | Experience |
int32_t | Rounds |
int32_t | DeathCount |
char | TypeName [C4MaxName+1+1] |
int32_t | Birthday |
int32_t | TotalPlayingTime |
int32_t | Age |
char | DeathMessage [C4MaxDeathMsg+1] |
C4ValueMapData | ExtraData |
Protected Member Functions | |
bool | Compile (const char *szSource) |
bool | Decompile (StdStrBuf &Buf) |
void | UpdateCustomRanks (C4DefList *pDefs) |
Definition at line 31 of file C4InfoCore.h.
C4ObjectInfoCore::C4ObjectInfoCore | ( | ) |
Definition at line 196 of file C4InfoCore.cpp.
References Default().
|
protected |
Definition at line 389 of file C4InfoCore.cpp.
References DeathMessage, and mkNamingAdapt().
Referenced by Load().
void C4ObjectInfoCore::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 362 of file C4InfoCore.cpp.
References Age, Birthday, DeathCount, DeathMessage, C4ValueNumbers::Denumerate(), C4ValueMapData::Denumerate(), Experience, ExtraData, StdCompiler::isDeserializer(), mkNamingAdapt(), mkParAdapt(), Name, NextRankExp, C4ID::None, Participation, Rank, Rounds, sNextRankName, sRankName, toC4CStr, TotalPlayingTime, TypeName, and StdCompiler::Value().
|
protected |
Definition at line 403 of file C4InfoCore.cpp.
References mkNamingAdapt().
Referenced by Save().
void C4ObjectInfoCore::Default | ( | C4ID | n_id = C4ID::None , |
class C4DefList * | pDefs = nullptr , |
||
const char * | cpNames = nullptr |
||
) |
Definition at line 201 of file C4InfoCore.cpp.
References Age, Birthday, C4MaxName, StdStrBuf::Clear(), StdStrBuf::Copy(), DeathCount, DeathMessage, Experience, ExtraData, C4PropListStatic::GetName(), C4DefList::ID2Def(), Name, NextRankExp, Participation, Random(), Rank, C4ValueMapData::Reset(), Rounds, SCharCount(), SClearFrontBack(), SCopy(), SCopySegment(), sNextRankName, sRankName, SReplaceChar(), TotalPlayingTime, TypeName, and UpdateCustomRanks().
Referenced by C4ObjectInfoCore().
bool C4ObjectInfoCore::GetNextRankInfo | ( | C4RankSystem & | rDefaultRanks, |
int32_t * | piNextRankExp, | ||
StdStrBuf * | psNextRankName | ||
) |
Definition at line 297 of file C4InfoCore.cpp.
References StdStrBuf::Copy(), C4RankSystem::EXP_NoPromotion, C4RankSystem::Experience(), C4RankSystem::GetRankName(), NextRankExp, Rank, and sNextRankName.
bool C4ObjectInfoCore::Load | ( | C4Group & | hGroup | ) |
Definition at line 336 of file C4InfoCore.cpp.
References C4CFN_ObjectInfoCore, Compile(), StdStrBuf::getData(), and C4Group::LoadEntryString().
Referenced by C4ObjectInfo::Load().
void C4ObjectInfoCore::Promote | ( | int32_t | iRank, |
C4RankSystem & | rRanks, | ||
bool | fForceRankName | ||
) |
Definition at line 252 of file C4InfoCore.cpp.
References StdStrBuf::Copy(), C4RankSystem::GetRankName(), Rank, and sRankName.
Referenced by C4Object::Promote().
Definition at line 343 of file C4InfoCore.cpp.
References C4Group::Add(), C4CFN_ObjectInfoCore, Decompile(), and UpdateCustomRanks().
Referenced by C4ObjectInfo::Save().
|
protected |
Definition at line 263 of file C4InfoCore.cpp.
References StdStrBuf::Clear(), StdStrBuf::Copy(), C4RankSystem::EXP_NoPromotion, C4RankSystem::Experience(), C4RankSystem::GetRankName(), C4DefList::ID2Def(), NextRankExp, C4Def::pRankNames, Rank, sNextRankName, and sRankName.
Referenced by Default(), and Save().
int32_t C4ObjectInfoCore::Age |
Definition at line 47 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), and C4Object::ExecLife().
int32_t C4ObjectInfoCore::Birthday |
Definition at line 46 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), C4ObjectInfoList::New(), and C4ObjectInfo::SetBirthday().
int32_t C4ObjectInfoCore::DeathCount |
Definition at line 44 of file C4InfoCore.h.
Referenced by C4Object::AssignDeath(), CompileFunc(), and Default().
char C4ObjectInfoCore::DeathMessage[C4MaxDeathMsg+1] |
Definition at line 48 of file C4InfoCore.h.
Referenced by Compile(), CompileFunc(), and Default().
int32_t C4ObjectInfoCore::Experience |
Definition at line 43 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), C4Object::DoExperience(), C4Player::GetHiExpActiveCrew(), and C4ObjectInfoList::GetIdle().
C4ValueMapData C4ObjectInfoCore::ExtraData |
Definition at line 49 of file C4InfoCore.h.
Referenced by CompileFunc(), and Default().
C4ID C4ObjectInfoCore::id |
Definition at line 36 of file C4InfoCore.h.
Referenced by C4Game::CreateInfoObject(), C4ObjectInfoList::GetIdle(), C4Player::PlaceReadyCrew(), C4Object::Promote(), C4ObjectInfoList::Save(), and C4ObjectInfoList::Strip().
char C4ObjectInfoCore::Name[C4MaxName+1] |
Definition at line 37 of file C4InfoCore.h.
Referenced by CompileFunc(), C4Object::CompileFunc(), Default(), C4ObjectInfoList::GetIdle(), C4Object::GrabInfo(), C4Object::Init(), C4Player::MakeCrewMember(), C4ObjectInfoList::NameExists(), C4ObjectInfoList::New(), C4ObjectInfo::Save(), and C4Object::SetName().
int32_t C4ObjectInfoCore::NextRankExp |
Definition at line 42 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), GetNextRankInfo(), and UpdateCustomRanks().
int32_t C4ObjectInfoCore::Participation |
Definition at line 38 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), and C4ObjectInfoList::GetIdle().
int32_t C4ObjectInfoCore::Rank |
Definition at line 39 of file C4InfoCore.h.
Referenced by C4Player::CheckCrewExPromotion(), CompileFunc(), Default(), C4Object::DoExperience(), C4Game::DrawCrewOverheadText(), C4GraphicsOverlay::DrawRankSymbol(), C4Player::GetHiRankActiveCrew(), GetNextRankInfo(), Promote(), C4ObjectInfo::Recruit(), C4ObjectInfo::Save(), and UpdateCustomRanks().
int32_t C4ObjectInfoCore::Rounds |
Definition at line 43 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), and C4ObjectInfo::Evaluate().
StdStrBuf C4ObjectInfoCore::sNextRankName |
Definition at line 41 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), GetNextRankInfo(), and UpdateCustomRanks().
StdStrBuf C4ObjectInfoCore::sRankName |
Definition at line 40 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), C4Game::DrawCrewOverheadText(), Promote(), C4Object::Promote(), C4ObjectInfo::Recruit(), and UpdateCustomRanks().
int32_t C4ObjectInfoCore::TotalPlayingTime |
Definition at line 46 of file C4InfoCore.h.
Referenced by CompileFunc(), Default(), C4Object::ExecLife(), and C4ObjectInfo::Retire().
char C4ObjectInfoCore::TypeName[C4MaxName+1+1] |
Definition at line 45 of file C4InfoCore.h.
Referenced by CompileFunc(), and Default().