You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
Made ConsoleMan not use forward slash as one of its trigger keys
Cleaned up comments in PresetMan::LoadAllDataModules
Cleaned up commented assert in DataModule and added issue link to a todo
Cleaned up comments and commented code in Entity.cpp, used Limit when setting RandomWeight, changed tabbing in init list, fixed newline in for loop, fixed returning false instead of int
Changed spacing for defines in Entity.h, reorganized ClassInfo members so they match the init list organization, fixed some method comments, added TODO
Removed unused Writer(string, bool) constructor
if (!LoadDataModule(string(moduleInfo.name), false, &LoadingGUI::LoadingSplashProgressReport)) {
211
-
// LoadDataModule can return false (esp since it may try to load already loaded modules, and that's ok) and shouldn't cause stop
212
-
// TODO: Report error and skip loading module.
213
-
}
209
+
// NOTE: LoadDataModule can return false (especially since it may try to load already loaded modules, which is okay) and shouldn't cause stop, so we can ignore its return value here.
// TODO: This method is almost identical to GetEntityPreset, except it doesn't return a const Entity *.
384
383
// Investigate if the latter needs to return const (based on what's using it) and if not, get rid of this and replace its uses. At the very least, consider renaming this
384
+
// See https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/issues/87
TYPE *pEnt = pCloneTo ? dynamic_cast<TYPE *>(pCloneTo) : newTYPE(); \
44
+
RTEAssert(pEnt, "Tried to clone to an incompatible instance!"); \
45
+
if (pCloneTo) { pEnt->Destroy(); } \
46
+
pEnt->Create(*this); \
47
+
return pEnt; \
48
+
}
49
49
#pragma endregion
50
50
51
51
/// <summary>
@@ -178,17 +178,17 @@ namespace RTE {
178
178
const std::string m_Name; //!< A string with the friendly - formatted name of this ClassInfo.
179
179
const ClassInfo *m_pParentInfo; //!< A pointer to the parent ClassInfo.
180
180
181
+
MemoryAllocate m_fpAllocate; //!< Raw memory allocation for the size of the type this ClassInfo describes.
182
+
MemoryDeallocate m_fpDeallocate; //!< Raw memory deallocation for the size of the type this ClassInfo describes.
183
+
// TODO: figure out why this doesn't want to work when defined as std::function.
184
+
Entity *(*m_fpNewInstance)(); //!< Returns an actual new instance of the type that this describes.
185
+
181
186
ClassInfo *m_NextClass; //!< Next ClassInfo after this one on aforementioned unordered linked list.
182
187
183
188
std::vector<void *> m_AllocatedPool; //!< Pool of pre-allocated objects of the type described by this ClassInfo.
184
189
int m_PoolAllocBlockCount; //!< The number of instances to fill up the pool of this type with each time it runs dry.
185
190
int m_InstancesInUse; //!< The number of allocated instances passed out from the pool.
186
191
187
-
MemoryAllocate m_fpAllocate; //!< Raw memory allocation for the size of the type this ClassInfo describes.
188
-
MemoryDeallocate m_fpDeallocate; //!< Raw memory deallocation for the size of the type this ClassInfo describes.
189
-
190
-
// TODO: figure out why this doesn't want to work when defined as std::function.
191
-
Entity *(*m_fpNewInstance)(); //!< Returns an actual new instance of the type that this describes.
192
192
193
193
// Forbidding copying
194
194
ClassInfo(const ClassInfo &reference) {}
@@ -220,7 +220,7 @@ namespace RTE {
220
220
/// </summary>
221
221
/// <param name="reader">A Reader that the Serializable will create itself from.</param>
222
222
/// <param name="checkType">Whether there is a class name in the stream to check against to make sure the correct type is being read from the stream.</param>
223
-
/// <param name="doCreate"></param>
223
+
/// <param name="doCreate">Whether to do any additional initialization of the object after reading in all the properties from the Reader. This is done by calling Create().</param>
224
224
/// <returns>An error return value signaling success or any particular failure. Anything below 0 is an error signal.</returns>
bool m_IsOriginalPreset; //!< Whether this is to be added to the PresetMan as an original preset instance.
431
431
int m_DefinedInModule; //!< The DataModule ID that this was successfully added to at some point. -1 if not added to anything yet.
432
432
433
+
//TODO Consider replacing this with an unordered_set. See https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/issues/88
433
434
std::list<std::string> m_Groups; //!< List of all tags associated with this. The groups are used to categorize and organize Entities.
434
435
std::string m_LastGroupSearch; //!< Last group search string, for more efficient response on multiple tries for the same group name.
435
436
bool m_LastGroupResult; //!< Last group search result, for more efficient response on multiple tries for the same group name.
0 commit comments