|
|
@ -20,6 +20,7 @@
|
|
|
|
#include "../settings_type.h"
|
|
|
|
#include "../settings_type.h"
|
|
|
|
#include "../openttd.h"
|
|
|
|
#include "../openttd.h"
|
|
|
|
#include "../debug.h"
|
|
|
|
#include "../debug.h"
|
|
|
|
|
|
|
|
#include "../rev.h"
|
|
|
|
|
|
|
|
|
|
|
|
AIConfigItem _start_date_config = {
|
|
|
|
AIConfigItem _start_date_config = {
|
|
|
|
"start_date",
|
|
|
|
"start_date",
|
|
|
@ -114,6 +115,10 @@ static bool CheckAPIVersion(const char *api_version)
|
|
|
|
SQInteger res = AIFileInfo::Constructor(vm, info);
|
|
|
|
SQInteger res = AIFileInfo::Constructor(vm, info);
|
|
|
|
if (res != 0) return res;
|
|
|
|
if (res != 0) return res;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char buf[8];
|
|
|
|
|
|
|
|
seprintf(buf, lastof(buf), "%d.%d", GB(_openttd_newgrf_version, 28, 4), GB(_openttd_newgrf_version, 24, 4));
|
|
|
|
|
|
|
|
info->api_version = strdup(buf);
|
|
|
|
|
|
|
|
|
|
|
|
/* Remove the link to the real instance, else it might get deleted by RegisterAI() */
|
|
|
|
/* Remove the link to the real instance, else it might get deleted by RegisterAI() */
|
|
|
|
sq_setinstanceup(vm, 2, NULL);
|
|
|
|
sq_setinstanceup(vm, 2, NULL);
|
|
|
|
/* Register the AI to the base system */
|
|
|
|
/* Register the AI to the base system */
|
|
|
|