1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 14:50:41 +02:00

Replace minetest namespace with core (#158)

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
This commit is contained in:
The4codeblocks
2025-06-26 02:41:04 -05:00
committed by GitHub
parent d39ff8a097
commit 2ebc4ac92d
34 changed files with 619 additions and 617 deletions

View File

@ -8,7 +8,7 @@ pipeworks.chests = {}
-- @param override: additional overrides, such as stuff to modify the node formspec
-- @param connect_sides: which directions the chests shall connect to
function pipeworks.override_chest(chestname, override, connect_sides)
local old_def = minetest.registered_nodes[chestname]
local old_def = core.registered_nodes[chestname]
local tube_entry = "^pipeworks_tube_connection_wooden.png"
override.tiles = override.tiles or old_def.tiles
@ -64,12 +64,12 @@ function pipeworks.override_chest(chestname, override, connect_sides)
override.tube = {
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local meta = core.get_meta(pos)
local inv = meta:get_inventory()
return inv:add_item("main", stack)
end,
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local meta = core.get_meta(pos)
local inv = meta:get_inventory()
if meta:get_int("splitstacks") == 1 then
stack = stack:peek_item(1)
@ -85,6 +85,6 @@ function pipeworks.override_chest(chestname, override, connect_sides)
override.groups.tubedevice = 1
override.groups.tubedevice_receiver = 1
minetest.override_item(chestname, override)
core.override_item(chestname, override)
pipeworks.chests[chestname] = true
end