Changeset View
Changeset View
Standalone View
Standalone View
source/ps/TemplateLoader.h
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | private: | ||||
bool LoadTemplateFile(const std::string& templateName, int depth); | bool LoadTemplateFile(const std::string& templateName, int depth); | ||||
/** | /** | ||||
* Constructs a standard static-decorative-object template for the given actor | * Constructs a standard static-decorative-object template for the given actor | ||||
*/ | */ | ||||
void ConstructTemplateActor(const std::string& actorName, CParamNode& out); | void ConstructTemplateActor(const std::string& actorName, CParamNode& out); | ||||
/** | /** | ||||
* Copy the non-interactive components of an entity template (position, actor, etc) into | |||||
* a new entity template | |||||
*/ | |||||
void CopyPreviewSubset(CParamNode& out, const CParamNode& in, bool corpse); | |||||
/** | |||||
* Copy the components of an entity template necessary for a fogged "mirage" | |||||
* entity (position, actor) into a new entity template | |||||
*/ | |||||
void CopyMirageSubset(CParamNode& out, const CParamNode& in); | |||||
/** | |||||
* Copy the components of an entity template necessary for a construction foundation | |||||
* (position, actor, armour, health, etc) into a new entity template | |||||
*/ | |||||
void CopyFoundationSubset(CParamNode& out, const CParamNode& in); | |||||
/** | |||||
* Copy the components of an entity template necessary for a non-foundation construction entity | |||||
* into a new entity template | |||||
*/ | |||||
void CopyConstructionSubset(CParamNode& out, const CParamNode& in); | |||||
/** | |||||
* Copy the components of an entity template necessary for a gatherable resource | |||||
* into a new entity template | |||||
*/ | |||||
void CopyResourceSubset(CParamNode& out, const CParamNode& in); | |||||
/** | |||||
* Map from template name (XML filename or special |-separated string) to the most recently | * Map from template name (XML filename or special |-separated string) to the most recently | ||||
* loaded non-broken template data. This includes files that will fail schema validation. | * loaded non-broken template data. This includes files that will fail schema validation. | ||||
* (Failed loads won't remove existing entries under the same name, so we behave more nicely | * (Failed loads won't remove existing entries under the same name, so we behave more nicely | ||||
* when hotloading broken files) | * when hotloading broken files) | ||||
*/ | */ | ||||
std::map<std::string, CParamNode> m_TemplateFileData; | std::map<std::string, CParamNode> m_TemplateFileData; | ||||
}; | }; | ||||
#endif // INCLUDED_TEMPLATELOADER | #endif // INCLUDED_TEMPLATELOADER |
Wildfire Games · Phabricator