mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Added field to ModuleDefinition for priority, which can be used to process/sort them in priority order
Added logic to ModuleManager's findModules method to allow priority sorting as well as pre-filtering by a given module group Adjusts the %isFine argument for the onMapLoadFailed callback events to %canContinueOnFail for a bit more clarity on what the arg conveys Shifts the setSpawnObjectType, setSpawnPoint and onPostSpawn call stack to utilize an event manager to allow the setup process for spawners and gamemode prepwork to run in it's own time, if needbe. Such as if a gamemode has to generate a map and there's no guarantees on when it'll b e done for one client vs another Added getModulesAndGameModesList, callOnObjectList and getNumCanCallOnObjectList utility functions
This commit is contained in:
parent
c5ae9af0ae
commit
46f6f6a9da
6 changed files with 220 additions and 31 deletions
|
|
@ -115,6 +115,7 @@ private:
|
|||
SimObjectId mScopeSet;
|
||||
bool mLocked;
|
||||
ModuleManager* mpModuleManager;
|
||||
F32 mPriority;
|
||||
|
||||
private:
|
||||
inline bool checkUnlocked( void ) const { if ( mLocked ) { Con::warnf("Ignoring changes for locked module definition."); } return !mLocked; }
|
||||
|
|
@ -195,6 +196,9 @@ public:
|
|||
inline bool getModuleLocked( void ) const { return mLocked; }
|
||||
inline ModuleManager* getModuleManager( void ) const { return mpModuleManager; }
|
||||
|
||||
inline void setPriority(const F32 pPriority) { if (checkUnlocked()) { mPriority = pPriority; } }
|
||||
inline F32 getPriority(void) const { return mPriority; }
|
||||
|
||||
using Parent::save;
|
||||
bool save( void );
|
||||
|
||||
|
|
@ -332,6 +336,8 @@ protected:
|
|||
}
|
||||
static bool writeDependencies( void* obj, StringTableEntry pFieldName ) { return static_cast<ModuleDefinition*>(obj)->getDependencies().size() > 0; }
|
||||
static const char* getSignature(void* obj, const char* data) { return static_cast<ModuleDefinition*>(obj)->getSignature(); }
|
||||
|
||||
static bool setPriority(void* obj, const char* index, const char* data) { static_cast<ModuleDefinition*>(obj)->setPriority((F32)dAtof(data)); return false; }
|
||||
};
|
||||
|
||||
#endif // _MODULE_DEFINITION_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue