From 86f0106d0523825549f1e74b835688c78a10cf6c Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 17 May 2018 15:34:24 -0400 Subject: Added muxer access to script engine --- src/systems/scripting.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/systems') 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 @@ #include "components/automatable.h" #include "systems/realizing.h" #include "vector.h" +#include "muxer.h" struct script_entity { using id_type = EntityManager::id_type; @@ -103,10 +104,12 @@ ScriptingSystem::ScriptingSystem(Game& game) : System(game) engine_.set_function( "realizing", - [&] () { + [&] () -> RealizingSystem& { return game_.getSystemManager().getSystem(); }); + engine_.set_function("playSound", playSound); + engine_.script_file("scripts/common.lua"); engine_.script_file("scripts/movplat.lua"); engine_.script_file("scripts/checkpoint.lua"); -- cgit 1.4.1