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

@ -1,5 +1,5 @@
local S = minetest.get_translator("pipeworks")
minetest.register_node("pipeworks:trashcan", {
local S = core.get_translator("pipeworks")
core.register_node("pipeworks:trashcan", {
description = S("Trash Can"),
drawtype = "normal",
tiles = {
@ -21,10 +21,10 @@ minetest.register_node("pipeworks:trashcan", {
priority = 1, -- Lower than anything else
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local meta = core.get_meta(pos)
local size = "10.2,9"
local list_background = ""
if minetest.get_modpath("i3") or minetest.get_modpath("mcl_formspec") then
if core.get_modpath("i3") or core.get_modpath("mcl_formspec") then
list_background = "style_type[box;colors=#666]box[4.5,2;1,1;]"
end
meta:set_string("formspec",
@ -46,7 +46,7 @@ minetest.register_node("pipeworks:trashcan", {
after_place_node = pipeworks.after_place,
after_dig_node = pipeworks.after_dig,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.get_meta(pos):get_inventory():set_stack(listname, index, ItemStack(""))
core.get_meta(pos):get_inventory():set_stack(listname, index, ItemStack(""))
end,
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:trashcan"