diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 16:47:24 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 16:47:24 -0500 |
commit | d5e3bc615b300eb985d59b91ebd1f2f1a4d4e107 (patch) | |
tree | 7356a6796ff166a85b8f7accb20e82596f200a63 /src/script_system.cpp | |
parent | 46bf85e7b85b8d3e61f0d2b276450c4f439b5c30 (diff) | |
download | tanetane-d5e3bc615b300eb985d59b91ebd1f2f1a4d4e107.tar.gz tanetane-d5e3bc615b300eb985d59b91ebd1f2f1a4d4e107.tar.bz2 tanetane-d5e3bc615b300eb985d59b91ebd1f2f1a4d4e107.zip |
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.
Diffstat (limited to 'src/script_system.cpp')
-rw-r--r-- | src/script_system.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) { | |||
17 | 17 | ||
18 | engine_.new_usertype<vec2i>( | 18 | engine_.new_usertype<vec2i>( |
19 | "vec2i", | 19 | "vec2i", |
20 | sol::constructors<vec2i(int, int)>(), | ||
20 | "x", [] (const vec2i& v) { return v.x(); }, | 21 | "x", [] (const vec2i& v) { return v.x(); }, |
21 | "y", [] (const vec2i& v) { return v.y(); }); | 22 | "y", [] (const vec2i& v) { return v.y(); }); |
22 | 23 | ||
@@ -70,7 +71,8 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
70 | "initSprite", [] (TransformSystem& transform, int spriteId, int x, int y, SpriteLayer layer) { | 71 | "initSprite", [] (TransformSystem& transform, int spriteId, int x, int y, SpriteLayer layer) { |
71 | transform.initSprite(spriteId, vec2i{x, y}, layer); | 72 | transform.initSprite(spriteId, vec2i{x, y}, layer); |
72 | }, | 73 | }, |
73 | "undoCollision", &TransformSystem::undoCollision); | 74 | "undoCollision", &TransformSystem::undoCollision, |
75 | "moveSprite", &TransformSystem::moveSprite); | ||
74 | 76 | ||
75 | engine_.new_usertype<EffectSystem>( | 77 | engine_.new_usertype<EffectSystem>( |
76 | "effect", | 78 | "effect", |