@@ -1395,9 +1395,11 @@ Script *Script::ParseScriptJSON(JSONChunkInput &file, unsigned short version)
13951395 if (version>=K_SCRIPT_DATA_VERSION_2) {
13961396 pScript->m_delayEvaluationSeconds = file.readInt ();
13971397 }
1398+ #ifdef RTS_HAS_JSON_CHUNK
13981399 file.registerParser ( " OrCondition" , " Script" , OrCondition::ParseOrConditionDataChunkJSON );
13991400 file.registerParser ( " ScriptAction" , " Script" , ScriptAction::ParseActionDataChunkJSON );
14001401 file.registerParser ( " ScriptActionFalse" , " Script" , ScriptAction::ParseActionFalseDataChunkJSON );
1402+ #endif
14011403 if (! file.parse (pScript) )
14021404 {
14031405 return NULL ;
@@ -2488,7 +2490,7 @@ Parameter *Parameter::ReadParameterJSON(JSONChunkInput &file)
24882490 if (pParm->getParameterType () == KIND_OF_PARAM)
24892491 {
24902492 Bool found = false ;
2491- const char * const * kindofNames = TheKindOf-> getKindOfNames ();
2493+ const char * const * kindofNames = KindOfMaskType::getBitNames ();
24922494 Int i;
24932495 for ( i = 0 ; kindofNames[i]; ++i )
24942496 {
@@ -2524,7 +2526,7 @@ Parameter *Parameter::ReadParameterJSON(JSONChunkInput &file)
25242526 }
25252527 else
25262528 {
2527- const char * const * kindofNames = TheKindOf-> getKindOfNames ();
2529+ const char * const * kindofNames = KindOfMaskType::getBitNames ();
25282530 pParm->m_string = kindofNames[pParm->m_int ];
25292531 }
25302532
@@ -2921,33 +2923,6 @@ Bool ScriptAction::ParseActionFalseDataChunkJSON(JSONChunkInput &file, JSONChunk
29212923}
29222924#endif
29232925
2924- #ifdef RTS_HAS_JSON_CHUNK
2925- Bool ScriptAction::ParseActionFalseDataChunkJSON (JSONChunkInput &file, JSONChunkInfo *info, void *userData)
2926- {
2927- Script *pScript = (Script *)userData;
2928-
2929- ScriptAction *pScriptAction = newInstance (ScriptAction);
2930-
2931- pScriptAction->m_actionType = (enum ScriptActionType)file.readInt ();
2932- pScriptAction->m_numParms =file.readInt ();
2933- Int i;
2934- for (i=0 ; i<pScriptAction->m_numParms ; i++) {
2935- pScriptAction->m_parms [i] = Parameter::ReadParameterJSON (file);
2936- }
2937- ScriptAction *pLast = pScript->getFalseAction ();
2938- while (pLast && pLast->getNext ()) {
2939- pLast = pLast->getNext ();
2940- }
2941- if (pLast) {
2942- pLast->setNextAction (pScriptAction);
2943- } else {
2944- pScript->setFalseAction (pScriptAction);
2945- }
2946- DEBUG_ASSERTCRASH (file.atEndOfChunk (), (" Unexpected data left over." ));
2947- return true ;
2948- }
2949- #endif
2950-
29512926// NOTE: Changing these or adding to TheObjectFlagsNames requires changes to
29522927// ScriptActions::changeObjectPanelFlagForSingleObject
29532928// THEY SHOULD STAY IN SYNC.
0 commit comments