RigsofRods
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 = false
 To block logging during conflict resolution (which works by generating dummy tuneups - would confuse user) More...
 

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 45 of file AddonPartFileFormat.cpp.

Member Function Documentation

◆ CheckForAddonpartConflict()

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

Definition at line 885 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 911 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 903 of file AddonPartFileFormat.cpp.

+ Here is the caller graph for this function:

◆ ProcessDirectiveSetManagedMaterialsOptions()

void AddonPartUtility::ProcessDirectiveSetManagedMaterialsOptions ( )
private

Definition at line 240 of file AddonPartFileFormat.cpp.

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

◆ ProcessFlare()

void AddonPartUtility::ProcessFlare ( )
private

Definition at line 367 of file AddonPartFileFormat.cpp.

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

◆ ProcessFlare2()

void AddonPartUtility::ProcessFlare2 ( )
private

Definition at line 405 of file AddonPartFileFormat.cpp.

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

◆ ProcessFlexbody()

void AddonPartUtility::ProcessFlexbody ( )
private

Definition at line 315 of file AddonPartFileFormat.cpp.

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

◆ ProcessManagedMaterial()

void AddonPartUtility::ProcessManagedMaterial ( )
private

Definition at line 211 of file AddonPartFileFormat.cpp.

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

◆ ProcessProp()

void AddonPartUtility::ProcessProp ( )
private

Definition at line 249 of file AddonPartFileFormat.cpp.

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

◆ ProcessTweakFlexbody()

void AddonPartUtility::ProcessTweakFlexbody ( )
private

Definition at line 660 of file AddonPartFileFormat.cpp.

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

◆ ProcessTweakManagedMat()

void AddonPartUtility::ProcessTweakManagedMat ( )
private

Definition at line 771 of file AddonPartFileFormat.cpp.

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

◆ ProcessTweakNode()

void AddonPartUtility::ProcessTweakNode ( )
private

Definition at line 615 of file AddonPartFileFormat.cpp.

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

◆ ProcessTweakProp()

void AddonPartUtility::ProcessTweakProp ( )
private

Definition at line 714 of file AddonPartFileFormat.cpp.

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

◆ ProcessTweakWheel()

void AddonPartUtility::ProcessTweakWheel ( )
private

Definition at line 567 of file AddonPartFileFormat.cpp.

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

◆ ProcessUnwantedExhaust()

void AddonPartUtility::ProcessUnwantedExhaust ( )
private

Definition at line 518 of file AddonPartFileFormat.cpp.

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

◆ ProcessUnwantedFlare()

void AddonPartUtility::ProcessUnwantedFlare ( )
private

Definition at line 494 of file AddonPartFileFormat.cpp.

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

◆ ProcessUnwantedFlexbody()

void AddonPartUtility::ProcessUnwantedFlexbody ( )
private

Definition at line 470 of file AddonPartFileFormat.cpp.

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

◆ ProcessUnwantedManagedMat()

void AddonPartUtility::ProcessUnwantedManagedMat ( )
private

Definition at line 542 of file AddonPartFileFormat.cpp.

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

◆ ProcessUnwantedProp()

void AddonPartUtility::ProcessUnwantedProp ( )
private

Definition at line 446 of file AddonPartFileFormat.cpp.

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

◆ RecordAddonpartConflicts()

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

Definition at line 813 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 191 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 133 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 50 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 = false
private

To block logging during conflict resolution (which works by generating dummy tuneups - would confuse user)

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: