mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 21:47:00 -04:00
fixed: GetMember works on values without save_value
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@130 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -226,5 +226,5 @@ bool ChoiceValue::update(Context& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_REFLECTION_NAMELESS(ChoiceValue) {
|
IMPLEMENT_REFLECTION_NAMELESS(ChoiceValue) {
|
||||||
if (fieldP->save_value) REFLECT_NAMELESS(value);
|
if (fieldP->save_value || tag.scripting()) REFLECT_NAMELESS(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,5 +82,5 @@ bool ColorValue::update(Context& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_REFLECTION_NAMELESS(ColorValue) {
|
IMPLEMENT_REFLECTION_NAMELESS(ColorValue) {
|
||||||
if (fieldP->save_value) REFLECT_NAMELESS(value);
|
if (fieldP->save_value || tag.scripting()) REFLECT_NAMELESS(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,5 +36,5 @@ String ImageValue::toString() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_REFLECTION_NAMELESS(ImageValue) {
|
IMPLEMENT_REFLECTION_NAMELESS(ImageValue) {
|
||||||
if (fieldP->save_value) REFLECT_NAMELESS(filename);
|
if (fieldP->save_value || tag.scripting()) REFLECT_NAMELESS(filename);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,5 +46,5 @@ String SymbolValue::toString() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_REFLECTION_NAMELESS(SymbolValue) {
|
IMPLEMENT_REFLECTION_NAMELESS(SymbolValue) {
|
||||||
if (fieldP->save_value) REFLECT_NAMELESS(filename);
|
if (fieldP->save_value || tag.scripting()) REFLECT_NAMELESS(filename);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,5 +99,5 @@ bool TextValue::update(Context& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_REFLECTION_NAMELESS(TextValue) {
|
IMPLEMENT_REFLECTION_NAMELESS(TextValue) {
|
||||||
if (fieldP->save_value) REFLECT_NAMELESS(value);
|
if (fieldP->save_value || tag.scripting()) REFLECT_NAMELESS(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class GetDefaultMember {
|
|||||||
public:
|
public:
|
||||||
/// Tell the reflection code we are not reading
|
/// Tell the reflection code we are not reading
|
||||||
inline bool reading() const { return false; }
|
inline bool reading() const { return false; }
|
||||||
|
inline bool scripting() const { return true; }
|
||||||
inline bool isComplex() const { return false; }
|
inline bool isComplex() const { return false; }
|
||||||
inline void addAlias(int, const Char*, const Char*) {}
|
inline void addAlias(int, const Char*, const Char*) {}
|
||||||
inline void handleAppVersion() {} // no effect
|
inline void handleAppVersion() {} // no effect
|
||||||
@@ -67,6 +68,7 @@ class GetMember : private GetDefaultMember {
|
|||||||
|
|
||||||
/// Tell the reflection code we are not reading
|
/// Tell the reflection code we are not reading
|
||||||
inline bool reading() const { return false; }
|
inline bool reading() const { return false; }
|
||||||
|
inline bool scripting() const { return true; }
|
||||||
inline bool isComplex() const { return false; }
|
inline bool isComplex() const { return false; }
|
||||||
inline void addAlias(int, const Char*, const Char*) {}
|
inline void addAlias(int, const Char*, const Char*) {}
|
||||||
inline void handleAppVersion() {} // no effect
|
inline void handleAppVersion() {} // no effect
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ class Reader {
|
|||||||
|
|
||||||
/// Tell the reflection code we are reading
|
/// Tell the reflection code we are reading
|
||||||
inline bool reading() const { return true; }
|
inline bool reading() const { return true; }
|
||||||
|
/// Tell the reflection code we are not related to scripting
|
||||||
|
inline bool scripting() const { return false; }
|
||||||
/// Is the thing currently being read 'complex', i.e. does it have children
|
/// Is the thing currently being read 'complex', i.e. does it have children
|
||||||
inline bool isComplex() const { return value.empty(); }
|
inline bool isComplex() const { return value.empty(); }
|
||||||
/// Add a as an alias for b, all keys a will be replaced with b, only if file_app_version < end_version
|
/// Add a as an alias for b, all keys a will be replaced with b, only if file_app_version < end_version
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class Writer {
|
|||||||
|
|
||||||
/// Tell the reflection code we are not reading
|
/// Tell the reflection code we are not reading
|
||||||
inline bool reading() const { return false; }
|
inline bool reading() const { return false; }
|
||||||
|
inline bool scripting() const { return false; }
|
||||||
inline bool isComplex() const { return false; }
|
inline bool isComplex() const { return false; }
|
||||||
inline void addAlias(int, const Char*, const Char*) {}
|
inline void addAlias(int, const Char*, const Char*) {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user