aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruns <runs@runs-PC.runs.es>2020-05-18 00:53:19 +0200
committerruns <runs@runs-PC.runs.es>2020-05-18 00:53:19 +0200
commit9522c009f7652e54873495eb1817f77c6415a739 (patch)
tree5a7a84d2999a8cbaffb111cbf7dd40a274f1a5ef
parent6eface65e756c3a713b1ab61baf05d0465612f48 (diff)
downloadfireworkz-9522c009f7652e54873495eb1817f77c6415a739.tar.gz
fireworkz-9522c009f7652e54873495eb1817f77c6415a739.tar.bz2
fireworkz-9522c009f7652e54873495eb1817f77c6415a739.zip
fixes
-rw-r--r--.luacheckrc19
-rw-r--r--init.lua4
2 files changed, 20 insertions, 3 deletions
diff --git a/.luacheckrc b/.luacheckrc
new file mode 100644
index 0000000..4de6466
--- /dev/null
+++ b/.luacheckrc
@@ -0,0 +1,19 @@
+unused_args = false
+allow_defined_top = true
+
+globals = {
+ "minetest",
+ "mobkit"
+}
+
+read_globals = {
+ string = {fields = {"split"}},
+ table = {fields = {"copy", "getn"}},
+
+ -- Builtin
+ "vector", "ItemStack",
+ "dump", "DIR_DELIM", "VoxelArea", "Settings",
+
+ -- MTG
+ "default", "sfinv", "creative",
+}
diff --git a/init.lua b/init.lua
index ae9cd54..c86aa74 100644
--- a/init.lua
+++ b/init.lua
@@ -174,7 +174,6 @@ function rocket:on_step(dtime)
local pos = self.object:getpos()
self.rocket_firetime = 0
local xrand = math.random(-15, 15) / 10
- local zrand = math.random(-15, 15) / 10
minetest.add_particle({
pos = {x=pos.x, y=pos.y - 0.4, z=pos.z},
velocity = {x=xrand, y=-3, z=xrand},
@@ -255,7 +254,7 @@ for _, i in pairs(variant_list) do
end,
on_use = function(itemstack, user, pointed_thing)
- pos = minetest.get_pointed_thing_position(pointed_thing, above)
+ local pos = minetest.get_pointed_thing_position(pointed_thing, false)
if pos then
fireworkz.launch(pos, rdt)
end
@@ -405,7 +404,6 @@ if minetest.get_modpath("mesecons") ~= nil then
mesecons = {effector = {
action_on = function (pos, node)
pos.y = pos. y + 1
- local node = minetest.get_node_or_nil(pos)
if node then
if node.name:sub(1, 16) == "fireworkz:rocket" then
local meta = minetest.get_meta(pos)