1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-24 21:35:21 +02:00

Add luacheck to check builtin (#7895)

This commit is contained in:
rubenwardy
2019-08-06 19:30:18 +01:00
committed by GitHub
parent 8da35c22d1
commit 8e757859d6
24 changed files with 202 additions and 140 deletions

View File

@@ -206,7 +206,6 @@ function core.get_node_drops(node, toolname)
-- Extended drop table
local got_items = {}
local got_count = 0
local _, item, tool
for _, item in ipairs(drop.items) do
local good_rarity = true
local good_tool = true
@@ -614,15 +613,10 @@ function core.node_dig(pos, node, digger)
end
-- Run script hook
local _, callback
for _, callback in ipairs(core.registered_on_dignodes) do
local origin = core.callback_origins[callback]
if origin then
core.set_last_run_mod(origin.mod)
--print("Running " .. tostring(callback) ..
-- " (a " .. origin.name .. " callback in " .. origin.mod .. ")")
else
--print("No data associated with callback")
end
-- Copy pos and node because callback can modify them