diff options
Diffstat (limited to 'src/script_system.cpp')
| -rw-r--r-- | src/script_system.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
| diff --git a/src/script_system.cpp b/src/script_system.cpp index 8674f97..090bf46 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp | |||
| @@ -54,6 +54,7 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
| 54 | 54 | ||
| 55 | engine_.new_usertype<CharacterSystem>( | 55 | engine_.new_usertype<CharacterSystem>( |
| 56 | "character", | 56 | "character", |
| 57 | "transplantParty", &CharacterSystem::transplantParty, | ||
| 57 | "startRunning", &CharacterSystem::startRunning, | 58 | "startRunning", &CharacterSystem::startRunning, |
| 58 | "halt", &CharacterSystem::halt); | 59 | "halt", &CharacterSystem::halt); |
| 59 | 60 | ||
| @@ -165,8 +166,14 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
| 165 | 166 | ||
| 166 | engine_.set_function( | 167 | engine_.set_function( |
| 167 | "loadMap", | 168 | "loadMap", |
| 168 | [&] (std::string filename, std::string warpPoint, Direction dir) { | 169 | [&] (std::string filename) { |
| 169 | game_.loadMap(filename, warpPoint, dir); | 170 | game_.loadMap(filename); |
| 171 | }); | ||
| 172 | |||
| 173 | engine_.set_function( | ||
| 174 | "getWarpPoint", | ||
| 175 | [&] (std::string warp) { | ||
| 176 | return game_.getMap().getWarpPoint(warp); | ||
| 170 | }); | 177 | }); |
| 171 | 178 | ||
| 172 | engine_.script_file("../res/scripts/common.lua"); | 179 | engine_.script_file("../res/scripts/common.lua"); |
