(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See: http://wiki.openttd.org/wiki/index.php/AI:Main_Page With many thanks to: - glx and Rubidium for their syncing, feedback and hard work - Yexo for his feedback, patches, and AIs which tested the system very deep - Morloth for his feedback and patches - TJIP for hosting a challenge which kept NoAI on track - All AI authors for testing our AI API, and all other people who helped in one way or another -Remove: all old AIs and their cheats/hacks
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "string_func.h"
|
||||
#include "settings_type.h"
|
||||
#include "oldpool_func.h"
|
||||
#include "ai/ai.hpp"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "vehicle_func.h"
|
||||
|
||||
@@ -376,14 +377,10 @@ void EnginesDailyLoop()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!IsHumanCompany(best_company)) {
|
||||
/* XXX - TTDBUG: TTD has a bug here ???? */
|
||||
AcceptEnginePreview(i, best_company);
|
||||
} else {
|
||||
e->flags |= ENGINE_OFFER_WINDOW_OPEN;
|
||||
e->preview_wait = 20;
|
||||
if (IsInteractiveCompany(best_company)) ShowEnginePreviewWindow(i);
|
||||
}
|
||||
e->flags |= ENGINE_OFFER_WINDOW_OPEN;
|
||||
e->preview_wait = 20;
|
||||
AI::NewEvent(best_company, new AIEventEnginePreview(i));
|
||||
if (IsInteractiveCompany(best_company)) ShowEnginePreviewWindow(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -460,6 +457,8 @@ static void NewVehicleAvailable(Engine *e)
|
||||
FOR_ALL_COMPANIES(c) SetBit(c->avail_roadtypes, HasBit(e->info.misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
|
||||
}
|
||||
|
||||
AI::BroadcastNewEvent(new AIEventEngineAvailable(index));
|
||||
|
||||
SetDParam(0, GetEngineCategoryName(index));
|
||||
SetDParam(1, index);
|
||||
AddNewsItem(STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE, NS_NEW_VEHICLES, index, 0);
|
||||
|
Reference in New Issue
Block a user