summary refs log tree commit diff stats
path: root/src/systems/scripting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/systems/scripting.cpp')
-rw-r--r--src/systems/scripting.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/systems/scripting.cpp b/src/systems/scripting.cpp index c423558..504224c 100644 --- a/src/systems/scripting.cpp +++ b/src/systems/scripting.cpp
@@ -9,6 +9,7 @@
9#include "components/automatable.h" 9#include "components/automatable.h"
10#include "systems/realizing.h" 10#include "systems/realizing.h"
11#include "vector.h" 11#include "vector.h"
12#include "muxer.h"
12 13
13struct script_entity { 14struct script_entity {
14 using id_type = EntityManager::id_type; 15 using id_type = EntityManager::id_type;
@@ -103,10 +104,12 @@ ScriptingSystem::ScriptingSystem(Game& game) : System(game)
103 104
104 engine_.set_function( 105 engine_.set_function(
105 "realizing", 106 "realizing",
106 [&] () { 107 [&] () -> RealizingSystem& {
107 return game_.getSystemManager().getSystem<RealizingSystem>(); 108 return game_.getSystemManager().getSystem<RealizingSystem>();
108 }); 109 });
109 110
111 engine_.set_function("playSound", playSound);
112
110 engine_.script_file("scripts/common.lua"); 113 engine_.script_file("scripts/common.lua");
111 engine_.script_file("scripts/movplat.lua"); 114 engine_.script_file("scripts/movplat.lua");
112 engine_.script_file("scripts/checkpoint.lua"); 115 engine_.script_file("scripts/checkpoint.lua");