MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AreScriptsOutofDate

Function AreScriptsOutofDate

editor/ScriptLevelInterface.cpp:2397–2438  ·  view source on GitHub ↗

Returns true if there are out of date script files (only checks those in manage system)

Source from the content-addressed store, hash-verified

2395
2396// Returns true if there are out of date script files (only checks those in manage system)
2397int AreScriptsOutofDate(void) {
2398 if (Scripts_need_sync) {
2399 CScriptSyncDialog dlg;
2400 dlg.DoModal();
2401 Scripts_need_sync = false;
2402 return dlg.m_ErrorCount;
2403 }
2404 return 0;
2405
2406 /*
2407 int count = 0;
2408 char old_dir[_MAX_PATH];
2409
2410 ddio_GetWorkingDir(old_dir,_MAX_PATH);
2411
2412 // First check for out-of-sync scripts (attempt load aigame and generic)
2413 mprintf(0,"Checking for out of sync scripts...\n");
2414 if(IsScriptOutofSync("aigame.dll")||IsScriptOutofSync("generic.dll"))
2415 {
2416 OutrageMessageBox(MBOX_OK,"WARNING! You have out of sync scripts...you MUST recompile your scripts!!!!!");
2417 }
2418
2419
2420 mprintf(0,"Checking for out of date scripts...");
2421 ddio_SetWorkingDir(LocalScriptDir);
2422
2423 for (int i=0;i<MAX_GAMEFILES;i++){
2424 if (Gamefiles[i].used){
2425 //we're only adding .d3l's to this list
2426 int length = strlen(Gamefiles[i].name);
2427 if(!stricmp(&Gamefiles[i].name[length-4],".cpp") && IsScriptOutofDate(Gamefiles[i].name)){
2428 count++;
2429 }
2430 }
2431 }
2432
2433 ddio_SetWorkingDir(old_dir);
2434
2435 mprintf(0,"Found %d OOD scripts\n",count);
2436 return count;
2437 */
2438}
2439
2440/*
2441#include "psglob.h"

Callers 2

OnFilePlayin640x480Method · 0.85
OnFileLeaveEditorMethod · 0.85

Calls 1

DoModalMethod · 0.45

Tested by

no test coverage detected