#include <C4ObjectInfo.h>
Public Member Functions | |
C4ObjectInfo () | |
~C4ObjectInfo () | |
void | Default () |
void | Clear () |
void | Evaluate () |
void | Retire () |
void | Recruit () |
void | SetBirthday () |
bool | Save (C4Group &hGroup, bool fStoreTiny, C4DefList *pDefs) |
bool | Load (C4Group &hGroup) |
bool | Load (C4Group &hMother, const char *szEntryname) |
bool | Save (C4Group &hGroup, class C4DefList *pDefs) |
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 | |
bool | WasInAction |
bool | InAction |
int32_t | InActionTime |
bool | HasDied |
int32_t | ControlCount |
class C4Def * | pDef |
char | Filename [_MAX_PATH_LEN] |
C4ObjectInfo * | Next |
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 28 of file C4ObjectInfo.h.
C4ObjectInfo::C4ObjectInfo | ( | ) |
Definition at line 37 of file C4ObjectInfo.cpp.
References Default().
C4ObjectInfo::~C4ObjectInfo | ( | ) |
Definition at line 42 of file C4ObjectInfo.cpp.
References Clear().
void C4ObjectInfo::Clear | ( | ) |
Definition at line 189 of file C4ObjectInfo.cpp.
References pDef.
Referenced by ~C4ObjectInfo().
|
protectedinherited |
Definition at line 389 of file C4InfoCore.cpp.
References C4ObjectInfoCore::DeathMessage, and mkNamingAdapt().
Referenced by C4ObjectInfoCore::Load().
|
inherited |
Definition at line 362 of file C4InfoCore.cpp.
References C4ObjectInfoCore::Age, C4ObjectInfoCore::Birthday, C4ObjectInfoCore::DeathCount, C4ObjectInfoCore::DeathMessage, C4ValueNumbers::Denumerate(), C4ValueMapData::Denumerate(), C4ObjectInfoCore::Experience, C4ObjectInfoCore::ExtraData, StdCompiler::isDeserializer(), mkNamingAdapt(), mkParAdapt(), C4ObjectInfoCore::Name, C4ObjectInfoCore::NextRankExp, C4ID::None, C4ObjectInfoCore::Participation, C4ObjectInfoCore::Rank, C4ObjectInfoCore::Rounds, C4ObjectInfoCore::sNextRankName, C4ObjectInfoCore::sRankName, toC4CStr, C4ObjectInfoCore::TotalPlayingTime, C4ObjectInfoCore::TypeName, and StdCompiler::Value().
|
protectedinherited |
Definition at line 403 of file C4InfoCore.cpp.
References mkNamingAdapt().
Referenced by C4ObjectInfoCore::Save().
void C4ObjectInfo::Default | ( | ) |
Definition at line 47 of file C4ObjectInfo.cpp.
References ControlCount, Filename, HasDied, InAction, InActionTime, Next, pDef, and WasInAction.
Referenced by C4ObjectInfo().
|
inherited |
Definition at line 201 of file C4InfoCore.cpp.
References C4ObjectInfoCore::Age, C4ObjectInfoCore::Birthday, C4MaxName, StdStrBuf::Clear(), StdStrBuf::Copy(), C4ObjectInfoCore::DeathCount, C4ObjectInfoCore::DeathMessage, C4ObjectInfoCore::Experience, C4ObjectInfoCore::ExtraData, C4PropListStatic::GetName(), C4DefList::ID2Def(), C4ObjectInfoCore::Name, C4ObjectInfoCore::NextRankExp, C4ObjectInfoCore::Participation, Random(), C4ObjectInfoCore::Rank, C4ValueMapData::Reset(), C4ObjectInfoCore::Rounds, SCharCount(), SClearFrontBack(), SCopy(), SCopySegment(), C4ObjectInfoCore::sNextRankName, C4ObjectInfoCore::sRankName, SReplaceChar(), C4ObjectInfoCore::TotalPlayingTime, C4ObjectInfoCore::TypeName, and C4ObjectInfoCore::UpdateCustomRanks().
Referenced by C4ObjectInfoCore::C4ObjectInfoCore().
void C4ObjectInfo::Evaluate | ( | ) |
Definition at line 180 of file C4ObjectInfo.cpp.
References Retire(), C4ObjectInfoCore::Rounds, and WasInAction.
Referenced by C4ObjectInfoList::Evaluate().
|
inherited |
Definition at line 297 of file C4InfoCore.cpp.
References StdStrBuf::Copy(), C4RankSystem::EXP_NoPromotion, C4RankSystem::Experience(), C4RankSystem::GetRankName(), C4ObjectInfoCore::NextRankExp, C4ObjectInfoCore::Rank, and C4ObjectInfoCore::sNextRankName.
bool C4ObjectInfo::Load | ( | C4Group & | hGroup | ) |
Definition at line 83 of file C4ObjectInfo.cpp.
References _MAX_FNAME, Filename, GetFilename(), C4Group::GetName(), C4ObjectInfoCore::Load(), and SCopy().
Referenced by C4ObjectInfoList::Load(), and Load().
bool C4ObjectInfo::Load | ( | C4Group & | hMother, |
const char * | szEntryname | ||
) |
Definition at line 59 of file C4ObjectInfo.cpp.
References C4Id2Def(), C4Group::Close(), GetExtension(), Load(), C4Group::OpenAsChild(), pDef, and SEqualNoCase().
|
inherited |
Definition at line 252 of file C4InfoCore.cpp.
References StdStrBuf::Copy(), C4RankSystem::GetRankName(), C4ObjectInfoCore::Rank, and C4ObjectInfoCore::sRankName.
Referenced by C4Object::Promote().
void C4ObjectInfo::Recruit | ( | ) |
Definition at line 194 of file C4ObjectInfo.cpp.
References StdStrBuf::Copy(), Definitions, Game, C4RankSystem::GetRankName(), C4DefList::ID2Def(), InAction, InActionTime, pDef, C4Def::pRankNames, C4ObjectInfoCore::Rank, C4ObjectInfoCore::sRankName, C4Game::Time, and WasInAction.
Referenced by C4ObjectInfoList::GetIdle(), and C4Object::GrabInfo().
void C4ObjectInfo::Retire | ( | ) |
Definition at line 216 of file C4ObjectInfo.cpp.
References Game, InAction, InActionTime, C4Game::Time, and C4ObjectInfoCore::TotalPlayingTime.
Referenced by C4Object::AssignDeath(), C4Object::AssignRemoval(), Evaluate(), C4Object::GrabInfo(), and C4Player::SetObjectCrewStatus().
Definition at line 91 of file C4ObjectInfo.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4CFN_ClonkRank, C4Group::Close(), C4Group::Delete(), C4RankSystem::DrawRankSymbol(), EnforceExtension(), Filename, C4Group::FindEntry(), StdStrBuf::getData(), C4FacetSurface::GetFace(), C4Group::GetFullName(), GetTrailingNumber(), C4DefList::ID2Def(), Inside(), C4Def::iNumRankSymbols, LogF(), MakeFilenameFromTitle(), C4ObjectInfoCore::Name, C4Group::OpenAsChild(), pDef, C4Def::pRankSymbols, C4ObjectInfoCore::Rank, RemoveExtension(), C4Group::Rename(), SAppend(), C4ObjectInfoCore::Save(), C4Surface::SavePNG(), SCopy(), SEqualNoCase(), and SLen().
Referenced by C4ObjectInfoList::Save().
Definition at line 343 of file C4InfoCore.cpp.
References C4Group::Add(), C4CFN_ObjectInfoCore, C4ObjectInfoCore::Decompile(), and C4ObjectInfoCore::UpdateCustomRanks().
Referenced by Save().
void C4ObjectInfo::SetBirthday | ( | ) |
Definition at line 228 of file C4ObjectInfo.cpp.
References C4ObjectInfoCore::Birthday.
|
protectedinherited |
Definition at line 263 of file C4InfoCore.cpp.
References StdStrBuf::Clear(), StdStrBuf::Copy(), C4RankSystem::EXP_NoPromotion, C4RankSystem::Experience(), C4RankSystem::GetRankName(), C4DefList::ID2Def(), C4ObjectInfoCore::NextRankExp, C4Def::pRankNames, C4ObjectInfoCore::Rank, C4ObjectInfoCore::sNextRankName, and C4ObjectInfoCore::sRankName.
Referenced by C4ObjectInfoCore::Default(), and C4ObjectInfoCore::Save().
|
inherited |
Definition at line 47 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), and C4Object::ExecLife().
|
inherited |
Definition at line 46 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), C4ObjectInfoList::New(), and SetBirthday().
int32_t C4ObjectInfo::ControlCount |
Definition at line 38 of file C4ObjectInfo.h.
Referenced by C4Player::CountControl(), Default(), and C4Command::Finish().
|
inherited |
Definition at line 44 of file C4InfoCore.h.
Referenced by C4Object::AssignDeath(), C4ObjectInfoCore::CompileFunc(), and C4ObjectInfoCore::Default().
|
inherited |
Definition at line 48 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::Compile(), C4ObjectInfoCore::CompileFunc(), and C4ObjectInfoCore::Default().
|
inherited |
Definition at line 43 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), C4Object::DoExperience(), C4Player::GetHiExpActiveCrew(), and C4ObjectInfoList::GetIdle().
|
inherited |
Definition at line 49 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), and C4ObjectInfoCore::Default().
char C4ObjectInfo::Filename[_MAX_PATH_LEN] |
Definition at line 40 of file C4ObjectInfo.h.
bool C4ObjectInfo::HasDied |
Definition at line 37 of file C4ObjectInfo.h.
Referenced by C4Object::AssignDeath(), Default(), and C4ObjectInfoList::GetIdle().
|
inherited |
Definition at line 36 of file C4InfoCore.h.
Referenced by C4Game::CreateInfoObject(), C4ObjectInfoList::GetIdle(), C4Player::PlaceReadyCrew(), C4Object::Promote(), C4ObjectInfoList::Save(), and C4ObjectInfoList::Strip().
bool C4ObjectInfo::InAction |
Definition at line 35 of file C4ObjectInfo.h.
Referenced by Default(), C4ObjectInfoList::GetIdle(), Recruit(), and Retire().
int32_t C4ObjectInfo::InActionTime |
Definition at line 36 of file C4ObjectInfo.h.
Referenced by Default(), C4Object::ExecLife(), Recruit(), and Retire().
|
inherited |
Definition at line 37 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4Object::CompileFunc(), C4ObjectInfoCore::Default(), C4ObjectInfoList::GetIdle(), C4Object::GrabInfo(), C4Object::Init(), C4Player::MakeCrewMember(), C4ObjectInfoList::NameExists(), C4ObjectInfoList::New(), Save(), and C4Object::SetName().
C4ObjectInfo* C4ObjectInfo::Next |
Definition at line 41 of file C4ObjectInfo.h.
Referenced by C4ObjectInfoList::Add(), C4ObjectInfoList::Clear(), Default(), C4ObjectInfoList::DetachFromObjects(), C4ObjectInfoList::Evaluate(), C4ObjectInfoList::GetIdle(), C4ObjectInfoList::GetLast(), C4ObjectInfoList::GetPrevious(), C4ObjectInfoList::IsElement(), C4Player::LocalSync(), C4ObjectInfoList::NameExists(), and C4ObjectInfoList::Strip().
|
inherited |
Definition at line 42 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), C4ObjectInfoCore::GetNextRankInfo(), and C4ObjectInfoCore::UpdateCustomRanks().
|
inherited |
Definition at line 38 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), and C4ObjectInfoList::GetIdle().
class C4Def* C4ObjectInfo::pDef |
|
inherited |
Definition at line 39 of file C4InfoCore.h.
Referenced by C4Player::CheckCrewExPromotion(), C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), C4Object::DoExperience(), C4Game::DrawCrewOverheadText(), C4GraphicsOverlay::DrawRankSymbol(), C4Player::GetHiRankActiveCrew(), C4ObjectInfoCore::GetNextRankInfo(), C4ObjectInfoCore::Promote(), Recruit(), Save(), and C4ObjectInfoCore::UpdateCustomRanks().
|
inherited |
Definition at line 43 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), and Evaluate().
|
inherited |
Definition at line 41 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), C4ObjectInfoCore::GetNextRankInfo(), and C4ObjectInfoCore::UpdateCustomRanks().
|
inherited |
Definition at line 40 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), C4Game::DrawCrewOverheadText(), C4ObjectInfoCore::Promote(), C4Object::Promote(), Recruit(), and C4ObjectInfoCore::UpdateCustomRanks().
|
inherited |
Definition at line 46 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), C4ObjectInfoCore::Default(), C4Object::ExecLife(), and Retire().
|
inherited |
Definition at line 45 of file C4InfoCore.h.
Referenced by C4ObjectInfoCore::CompileFunc(), and C4ObjectInfoCore::Default().
bool C4ObjectInfo::WasInAction |
Definition at line 34 of file C4ObjectInfo.h.
Referenced by Default(), Evaluate(), and Recruit().