From 6571ee456240b5369f50269f58745b5de2904a2c Mon Sep 17 00:00:00 2001 From: coil <51716565+coil0@users.noreply.github.com> Date: Tue, 18 Feb 2020 01:55:48 -0500 Subject: [PATCH] Add public throwing.make_arrow_def It was removed in b9c78c9, leaving no way for other mods to use the arrow_step function. --- init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.lua b/init.lua index bea63c6..c7d903e 100644 --- a/init.lua +++ b/init.lua @@ -207,6 +207,14 @@ local function arrow_step(self, dtime) self.last_pos = pos -- Used by the build arrow end +function throwing.make_arrow_def(def) + def.timer = 0 + def.player = "" + def.on_step = arrow_step + def.data = {} + return def +end + --[[ on_hit(pos, last_pos, node, object, hitter) Either node or object is nil, depending whether the arrow collided with an object (luaentity or player) or with a node.