-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from lava76/development
Use a different approach to check entity for modstorage
- Loading branch information
Showing
19 changed files
with
714 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
JM/CF/Scripts/3_Game/CommunityFramework/ModStorage/CF_ModStorageData.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
enum CF_ModStorageDataType | ||
{ | ||
INVALID = -1, | ||
BOOL, | ||
INT, | ||
FLOAT, | ||
VECTOR, | ||
STRING | ||
|
||
//! TODO | ||
//ARRAY_BOOL, | ||
//ARRAY_INT, | ||
//ARRAY_FLOAT, | ||
//ARRAY_VECTOR, | ||
//ARRAY_STRING | ||
}; | ||
|
||
class CF_ModStorageDataBase | ||
{ | ||
typename ValueType() | ||
{ | ||
return typename; | ||
} | ||
|
||
string ValueString() | ||
{ | ||
return ""; | ||
} | ||
}; | ||
|
||
class CF_ModStorageData<Class T>: CF_ModStorageDataBase | ||
{ | ||
T m_Value; | ||
|
||
void CF_ModStorageData(T value) | ||
{ | ||
m_Value = value; | ||
} | ||
|
||
T Get() | ||
{ | ||
return m_Value; | ||
} | ||
|
||
override typename ValueType() | ||
{ | ||
return T; | ||
} | ||
|
||
override string ValueString() | ||
{ | ||
return string.ToString(m_Value); | ||
} | ||
}; |
Oops, something went wrong.