summary refs log tree commit diff stats
path: root/src/systems
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-05-17 15:34:24 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-05-17 15:39:39 -0400
commit86f0106d0523825549f1e74b835688c78a10cf6c (patch)
tree6f83fce90e71abb22b1a8f3e09c79963b2a34d5d /src/systems
parent5e48cf6333aca7af6854d79194f138d57ce0b5e1 (diff)
downloadtherapy-es-rewrite.tar.gz
therapy-es-rewrite.tar.bz2
therapy-es-rewrite.zip
Added muxer access to script engine es-rewrite
Diffstat (limited to 'src/systems')
-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");