diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2020-05-22 22:22:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 22:22:55 +0200 |
commit | 800ade77021b34adf8daa5ca5de0efaa8df24152 (patch) | |
tree | 7a2eb5c73c926476c81cd782bcb9b42c93bafdc4 /src/script/api/ai | |
parent | c972a63c8cbee7fa8d6d5af2cbbecb8c75ee561a (diff) | |
download | openttd-800ade77021b34adf8daa5ca5de0efaa8df24152.tar.xz |
Feature: Push-buttons on storybook pages (#7896)
Allow more direct player-initiated interaction for Game Scripts, by letting the GS put push-buttons on storybook pages. These buttons can either trigger an immediate event, or require the player to first select a tile on the map, or a vehicle.
Additionally this reworks how the storybook pages are layouted and rendered, to allow for slightly more complex layouts, and maybe speeding drawing up a bit.
Diffstat (limited to 'src/script/api/ai')
-rw-r--r-- | src/script/api/ai/ai_event.hpp.sq | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_event.hpp.sq b/src/script/api/ai/ai_event.hpp.sq index 6061eeed5..1290008c7 100644 --- a/src/script/api/ai/ai_event.hpp.sq +++ b/src/script/api/ai/ai_event.hpp.sq @@ -49,6 +49,9 @@ void SQAIEvent_Register(Squirrel *engine) SQAIEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS"); SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ROAD_RECONSTRUCTION, "ET_ROAD_RECONSTRUCTION"); SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_AUTOREPLACED, "ET_VEHICLE_AUTOREPLACED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_BUTTON_CLICK, "ET_STORYPAGE_BUTTON_CLICK"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_TILE_SELECT, "ET_STORYPAGE_TILE_SELECT"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_VEHICLE_SELECT, "ET_STORYPAGE_VEHICLE_SELECT"); SQAIEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x"); |