From d5e3bc615b300eb985d59b91ebd1f2f1a4d4e107 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 26 Feb 2021 16:47:24 -0500 Subject: Added first underwater map Also spruced up the event that takes you there. Also fixed an issue where transplantParty wouldn't take the medium of the new position into consideration. Also added a constructor to the lua version of vec2i. --- src/script_system.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/script_system.cpp') diff --git a/src/script_system.cpp b/src/script_system.cpp index 0d82436..31b8bee 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp @@ -17,6 +17,7 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { engine_.new_usertype( "vec2i", + sol::constructors(), "x", [] (const vec2i& v) { return v.x(); }, "y", [] (const vec2i& v) { return v.y(); }); @@ -70,7 +71,8 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { "initSprite", [] (TransformSystem& transform, int spriteId, int x, int y, SpriteLayer layer) { transform.initSprite(spriteId, vec2i{x, y}, layer); }, - "undoCollision", &TransformSystem::undoCollision); + "undoCollision", &TransformSystem::undoCollision, + "moveSprite", &TransformSystem::moveSprite); engine_.new_usertype( "effect", -- cgit 1.4.1