1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +00:00

Rename minetest.* to core.* in devtest

This commit is contained in:
Lars Müller 2024-10-28 15:57:54 +01:00 committed by GitHub
parent d849d51c2d
commit 88c7a54e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
78 changed files with 914 additions and 914 deletions

View file

@ -2,12 +2,12 @@ local ALLOW_PUT_MAX = 1
local ALLOW_TAKE_MAX = 4
local function print_to_everything(msg)
minetest.log("action", "[chest] " .. msg)
minetest.chat_send_all(msg)
core.log("action", "[chest] " .. msg)
core.chat_send_all(msg)
end
-- Create a detached inventory
local inv = minetest.create_detached_inventory("detached_inventory", {
local inv = core.create_detached_inventory("detached_inventory", {
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
print_to_everything("Detached inventory: "..player:get_player_name().." triggered allow_move")
return count -- Allow all
@ -34,7 +34,7 @@ inv:set_size("main", 8*3)
-- Add a special chest to grant access to this inventory
minetest.register_node("chest:detached_chest", {
core.register_node("chest:detached_chest", {
description = "Detached Chest" .. "\n" ..
"Grants access to a shared detached inventory" .."\n" ..
"Max. item put count: "..ALLOW_PUT_MAX .."\n"..
@ -46,7 +46,7 @@ minetest.register_node("chest:detached_chest", {
groups = {dig_immediate=2,choppy=3,meta_is_privatizable=1},
is_ground_content = false,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local meta = core.get_meta(pos)
meta:set_string("formspec",
"size[8,9]"..
"list[detached:detached_inventory;main;0,0;8,3;0]"..