summaryrefslogtreecommitdiff
path: root/src/script/api/game/game_event.hpp.sq
blob: 396295530a2b763bfcfd8b5bf4ee462ff4f2a613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* $Id$ */

/*
 * This file is part of OpenTTD.
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 */

/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */

#include "../script_event.hpp"
#include "../template/template_event.hpp.sq"


template <> const char *GetClassName<ScriptEvent, ST_GS>() { return "GSEvent"; }

void SQGSEvent_Register(Squirrel *engine)
{
	DefSQClass<ScriptEvent, ST_GS> SQGSEvent("GSEvent");
	SQGSEvent.PreRegister(engine);
	SQGSEvent.AddConstructor<void (ScriptEvent::*)(ScriptEvent::ScriptEventType type), 2>(engine, "xi");

	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INVALID,                     "ET_INVALID");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_TEST,                        "ET_TEST");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER,               "ET_SUBSIDY_OFFER");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER_EXPIRED,       "ET_SUBSIDY_OFFER_EXPIRED");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_AWARDED,             "ET_SUBSIDY_AWARDED");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_EXPIRED,             "ET_SUBSIDY_EXPIRED");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_PREVIEW,              "ET_ENGINE_PREVIEW");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_NEW,                 "ET_COMPANY_NEW");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_IN_TROUBLE,          "ET_COMPANY_IN_TROUBLE");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_ASK_MERGER,          "ET_COMPANY_ASK_MERGER");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_MERGER,              "ET_COMPANY_MERGER");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_BANKRUPT,            "ET_COMPANY_BANKRUPT");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_CRASHED,             "ET_VEHICLE_CRASHED");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_LOST,                "ET_VEHICLE_LOST");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_WAITING_IN_DEPOT,    "ET_VEHICLE_WAITING_IN_DEPOT");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_UNPROFITABLE,        "ET_VEHICLE_UNPROFITABLE");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_OPEN,               "ET_INDUSTRY_OPEN");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_CLOSE,              "ET_INDUSTRY_CLOSE");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_AVAILABLE,            "ET_ENGINE_AVAILABLE");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STATION_FIRST_VEHICLE,       "ET_STATION_FIRST_VEHICLE");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CRASHED, "ET_DISASTER_ZEPPELINER_CRASHED");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CLEARED, "ET_DISASTER_ZEPPELINER_CLEARED");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_TOWN_FOUNDED,                "ET_TOWN_FOUNDED");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_AIRCRAFT_DEST_TOO_FAR,       "ET_AIRCRAFT_DEST_TOO_FAR");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ADMIN_PORT,                  "ET_ADMIN_PORT");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK,         "ET_WINDOW_WIDGET_CLICK");
	SQGSEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER,        "ET_GOAL_QUESTION_ANSWER");

	SQGSEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x");

	SQGSEvent.PostRegister(engine);
}


template <> const char *GetClassName<ScriptEventController, ST_GS>() { return "GSEventController"; }

void SQGSEventController_Register(Squirrel *engine)
{
	DefSQClass<ScriptEventController, ST_GS> SQGSEventController("GSEventController");
	SQGSEventController.PreRegister(engine);
	SQGSEventController.AddConstructor<void (ScriptEventController::*)(), 1>(engine, "x");

	SQGSEventController.DefSQStaticMethod(engine, &ScriptEventController::IsEventWaiting, "IsEventWaiting", 1, ".");
	SQGSEventController.DefSQStaticMethod(engine, &ScriptEventController::GetNextEvent,   "GetNextEvent",   1, ".");

	SQGSEventController.PostRegister(engine);
}