mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-05 23:33:51 +01:00
Use minetest instead of core namespace, discourage via luacheck
This commit is contained in:
parent
b408e9cce6
commit
76211624ac
@ -149,7 +149,7 @@ local function may_replace(pos, player)
|
||||
end
|
||||
|
||||
local drop = function(pos, itemstack)
|
||||
local obj = core.add_item(pos, itemstack:take_item(itemstack:get_count()))
|
||||
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count()))
|
||||
if obj then
|
||||
obj:setvelocity({
|
||||
x = math.random(-10, 10) / 9,
|
||||
|
@ -141,7 +141,7 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||
else
|
||||
local pos = user:getpos()
|
||||
pos.y = math.floor(pos.y + 0.5)
|
||||
core.add_item(pos, liquiddef.itemname)
|
||||
minetest.add_item(pos, liquiddef.itemname)
|
||||
end
|
||||
|
||||
-- set to return empty buckets minus 1
|
||||
|
@ -185,7 +185,7 @@ end
|
||||
local function on_place_node(place_to, newnode,
|
||||
placer, oldnode, itemstack, pointed_thing)
|
||||
-- Run script hook
|
||||
for _, callback in ipairs(core.registered_on_placenodes) do
|
||||
for _, callback in ipairs(minetest.registered_on_placenodes) do
|
||||
-- Deepcopy pos, node and pointed_thing because callback can modify them
|
||||
local place_to_copy = {x = place_to.x, y = place_to.y, z = place_to.z}
|
||||
local newnode_copy =
|
||||
|
Loading…
Reference in New Issue
Block a user