From 10d84670b9c141e994d4cd4e51a2179d73fa81e9 Mon Sep 17 00:00:00 2001 From: Insality Date: Wed, 27 Mar 2019 01:10:10 +0300 Subject: [PATCH] all actions now passed to components --- druid/druid.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/druid/druid.lua b/druid/druid.lua index f95655d..255039c 100644 --- a/druid/druid.lua +++ b/druid/druid.lua @@ -20,7 +20,6 @@ local function register_basic_components() M.register(k, v) end end -register_basic_components() function M.register(name, module) @@ -70,7 +69,7 @@ function M.on_input(factory, action_id, action) local len = #factory[data.ON_INPUT] for i = 1, len do v = factory[data.ON_INPUT][i] - if action_id == v.event and action[v.action] and v:on_input(action_id, action) then + if action_id == v.event and v:on_input(action_id, action) then return true end end @@ -156,5 +155,5 @@ function M.play_sound(name) -- override to play sound with name end - +register_basic_components() return M \ No newline at end of file