RigsofRods
Soft-body Physics Simulation
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
RoR::AddonPartUtility Class Reference

NOTE: Modcache processes this format directly using RoR::GenericDocument, see RoR::CacheSystem::FillAddonPartDetailInfo() More...

#include <AddonPartFileFormat.h>

+ Collaboration diagram for RoR::AddonPartUtility:

Public Member Functions

 AddonPartUtility (bool silent_mode=false)
 
 ~AddonPartUtility ()
 
std::shared_ptr< RigDef::Document::ModuleTransformToRigDefModule (CacheEntryPtr &addonpart_entry)
 transforms the addonpart to RigDef::File::Module (fake 'section/end_section') used for spawning. More...
 
void ResolveUnwantedAndTweakedElements (TuneupDefPtr &tuneup, CacheEntryPtr &addonpart_entry)
 Evaluates 'addonpart_unwanted_*' elements, respecting 'protected_*' directives in the tuneup. More...
 

Static Public Member Functions

static void ResetUnwantedAndTweakedElements (TuneupDefPtr &tuneup)
 
static void RecordAddonpartConflicts (CacheEntryPtr addonpart1, CacheEntryPtr addonpart2, AddonPartConflictVec &conflicts)
 
static bool CheckForAddonpartConflict (CacheEntryPtr addonpart1, CacheEntryPtr addonpart2, AddonPartConflictVec &conflicts)
 
static bool DoubleCheckForAddonpartConflict (ActorPtr target_actor, CacheEntryPtr addonpart_entry)
 

Private Member Functions

void ProcessManagedMaterial ()
 
void ProcessDirectiveSetManagedMaterialsOptions ()
 
void ProcessProp ()
 
void ProcessFlexbody ()
 
void ProcessFlare ()
 
void ProcessFlare2 ()
 
void ProcessTweakWheel ()
 
void ProcessTweakNode ()
 
void ProcessTweakFlexbody ()
 
void ProcessTweakProp ()
 
void ProcessTweakManagedMat ()
 
void ProcessUnwantedProp ()
 
void ProcessUnwantedFlexbody ()
 
void ProcessUnwantedFlare ()
 
void ProcessUnwantedExhaust ()
 
void ProcessUnwantedManagedMat ()
 
void Log (const std::string &text)
 

Private Attributes

GenericDocumentPtr m_document
 
GenericDocContextPtr m_context
 
CacheEntryPtr m_addonpart_entry
 
std::shared_ptr< RigDef::Document::Modulem_module
 
RigDef::ManagedMaterialsOptions m_managedmaterials_options
 
TuneupDefPtr m_tuneup
 
bool m_silent_mode
 

Detailed Description

NOTE: Modcache processes this format directly using RoR::GenericDocument, see RoR::CacheSystem::FillAddonPartDetailInfo()

Definition at line 56 of file AddonPartFileFormat.h.

Constructor & Destructor Documentation

◆ AddonPartUtility()

AddonPartUtility::AddonPartUtility ( bool  silent_mode = false)

Definition at line 39 of file AddonPartFileFormat.cpp.

◆ ~AddonPartUtility()

AddonPartUtility::~AddonPartUtility ( )

Definition at line 44 of file AddonPartFileFormat.cpp.

Member Function Documentation

◆ CheckForAddonpartConflict()

bool AddonPartUtility::CheckForAddonpartConflict ( CacheEntryPtr  addonpart1,
CacheEntryPtr  addonpart2,
AddonPartConflictVec conflicts 
)
static

Definition at line 884 of file AddonPartFileFormat.cpp.

+ Here is the caller graph for this function:

◆ DoubleCheckForAddonpartConflict()

bool AddonPartUtility::DoubleCheckForAddonpartConflict ( ActorPtr  target_actor,
CacheEntryPtr  addonpart_entry 
)
static

Definition at line 910 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Log()

void AddonPartUtility::Log ( const std::string &  text)
private

Definition at line 902 of file AddonPartFileFormat.cpp.

◆ ProcessDirectiveSetManagedMaterialsOptions()

void AddonPartUtility::ProcessDirectiveSetManagedMaterialsOptions ( )
private

Definition at line 239 of file AddonPartFileFormat.cpp.

◆ ProcessFlare()

void AddonPartUtility::ProcessFlare ( )
private

Definition at line 366 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessFlare2()

void AddonPartUtility::ProcessFlare2 ( )
private

Definition at line 404 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessFlexbody()

void AddonPartUtility::ProcessFlexbody ( )
private

Definition at line 314 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessManagedMaterial()

void AddonPartUtility::ProcessManagedMaterial ( )
private

Definition at line 210 of file AddonPartFileFormat.cpp.

◆ ProcessProp()

void AddonPartUtility::ProcessProp ( )
private

Definition at line 248 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessTweakFlexbody()

void AddonPartUtility::ProcessTweakFlexbody ( )
private

Definition at line 659 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessTweakManagedMat()

void AddonPartUtility::ProcessTweakManagedMat ( )
private

Definition at line 770 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessTweakNode()

void AddonPartUtility::ProcessTweakNode ( )
private

Definition at line 614 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessTweakProp()

void AddonPartUtility::ProcessTweakProp ( )
private

Definition at line 713 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessTweakWheel()

void AddonPartUtility::ProcessTweakWheel ( )
private

Definition at line 566 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessUnwantedExhaust()

void AddonPartUtility::ProcessUnwantedExhaust ( )
private

Definition at line 517 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessUnwantedFlare()

void AddonPartUtility::ProcessUnwantedFlare ( )
private

Definition at line 493 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessUnwantedFlexbody()

void AddonPartUtility::ProcessUnwantedFlexbody ( )
private

Definition at line 469 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessUnwantedManagedMat()

void AddonPartUtility::ProcessUnwantedManagedMat ( )
private

Definition at line 541 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ ProcessUnwantedProp()

void AddonPartUtility::ProcessUnwantedProp ( )
private

Definition at line 445 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:

◆ RecordAddonpartConflicts()

void AddonPartUtility::RecordAddonpartConflicts ( CacheEntryPtr  addonpart1,
CacheEntryPtr  addonpart2,
AddonPartConflictVec conflicts 
)
static

Definition at line 812 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetUnwantedAndTweakedElements()

void AddonPartUtility::ResetUnwantedAndTweakedElements ( TuneupDefPtr tuneup)
static

Definition at line 190 of file AddonPartFileFormat.cpp.

+ Here is the caller graph for this function:

◆ ResolveUnwantedAndTweakedElements()

void AddonPartUtility::ResolveUnwantedAndTweakedElements ( TuneupDefPtr tuneup,
CacheEntryPtr addonpart_entry 
)

Evaluates 'addonpart_unwanted_*' elements, respecting 'protected_*' directives in the tuneup.

Also handles 'addonpart_tweak_*' elements, resolving possible conflicts among used parts.

Definition at line 132 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TransformToRigDefModule()

std::shared_ptr< Document::Module > AddonPartUtility::TransformToRigDefModule ( CacheEntryPtr addonpart_entry)

transforms the addonpart to RigDef::File::Module (fake 'section/end_section') used for spawning.

Returns
nullptr on error

Definition at line 49 of file AddonPartFileFormat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ m_addonpart_entry

CacheEntryPtr RoR::AddonPartUtility::m_addonpart_entry
private

Definition at line 104 of file AddonPartFileFormat.h.

◆ m_context

GenericDocContextPtr RoR::AddonPartUtility::m_context
private

Definition at line 103 of file AddonPartFileFormat.h.

◆ m_document

GenericDocumentPtr RoR::AddonPartUtility::m_document
private

Definition at line 102 of file AddonPartFileFormat.h.

◆ m_managedmaterials_options

RigDef::ManagedMaterialsOptions RoR::AddonPartUtility::m_managedmaterials_options
private

Definition at line 107 of file AddonPartFileFormat.h.

◆ m_module

std::shared_ptr<RigDef::Document::Module> RoR::AddonPartUtility::m_module
private

Definition at line 106 of file AddonPartFileFormat.h.

◆ m_silent_mode

bool RoR::AddonPartUtility::m_silent_mode
private

Definition at line 110 of file AddonPartFileFormat.h.

◆ m_tuneup

TuneupDefPtr RoR::AddonPartUtility::m_tuneup
private

Definition at line 109 of file AddonPartFileFormat.h.


The documentation for this class was generated from the following files: