Use "minetest" instead of "core" table
This commit is contained in:
parent
05152589fa
commit
f2b7392a30
9 changed files with 27 additions and 27 deletions
|
@ -366,7 +366,7 @@ function mesecon.vm_get_node(pos)
|
|||
local tbl = vm_get_or_create_entry(pos)
|
||||
local index = tbl.va:indexp(pos)
|
||||
local node_value = tbl.data[index]
|
||||
if node_value == core.CONTENT_IGNORE then
|
||||
if node_value == minetest.CONTENT_IGNORE then
|
||||
return nil
|
||||
else
|
||||
local node_param1 = tbl.param1[index]
|
||||
|
|
|
@ -179,7 +179,7 @@ local function update_anvil_slots(meta)
|
|||
else
|
||||
-- Custom name set. Colorize it!
|
||||
-- This makes the name visually different from unnamed items
|
||||
meta:set_string("description", core.colorize(NAME_COLOR, new_name))
|
||||
meta:set_string("description", minetest.colorize(NAME_COLOR, new_name))
|
||||
end
|
||||
-- Save the raw name internally, too
|
||||
meta:set_string("name", new_name)
|
||||
|
|
|
@ -281,7 +281,7 @@ mcl_banners.make_advanced_banner_description = function(description, layers)
|
|||
|
||||
-- Final string concatenations: Just a list of strings
|
||||
local append = table.concat(layerstrings, "\n")
|
||||
description = description .. "\n" .. core.colorize("#8F8F8F", append)
|
||||
description = description .. "\n" .. minetest.colorize("#8F8F8F", append)
|
||||
return description
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,7 +60,7 @@ local make_description = function(title, author, generation)
|
|||
else
|
||||
desc = S("Tattered Book")
|
||||
end
|
||||
desc = desc .. "\n" .. core.colorize("#AAAAAA", S("by @1", author))
|
||||
desc = desc .. "\n" .. minetest.colorize("#AAAAAA", S("by @1", author))
|
||||
return desc
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,7 @@ local read = function(itemstack, user, pointed_thing)
|
|||
local text = get_text(itemstack)
|
||||
local formspec = "size[8,9]"..
|
||||
"background[-0.5,-0.5;9,10;mcl_books_book_bg.png]"..
|
||||
"textarea[0.75,0.1;7.25,9;;"..core.colorize("#000000", minetest.formspec_escape(text))..";]"..
|
||||
"textarea[0.75,0.1;7.25,9;;"..minetest.colorize("#000000", minetest.formspec_escape(text))..";]"..
|
||||
"button_exit[2.25,7.95;3,1;ok;"..minetest.formspec_escape(S("Done")).."]"
|
||||
minetest.show_formspec(user:get_player_name(), "mcl_books:written_book", formspec)
|
||||
end
|
||||
|
@ -136,8 +136,8 @@ minetest.register_on_player_receive_fields(function ( player, formname, fields )
|
|||
local name = player:get_player_name()
|
||||
local formspec = "size[8,9]"..
|
||||
"background[-0.5,-0.5;9,10;mcl_books_book_bg.png]"..
|
||||
"field[0.75,1;7.25,1;title;"..minetest.formspec_escape(core.colorize("#000000", S("Enter book title:")))..";]"..
|
||||
"label[0.75,1.5;"..minetest.formspec_escape(core.colorize("#404040", S("by @1", name))).."]"..
|
||||
"field[0.75,1;7.25,1;title;"..minetest.formspec_escape(minetest.colorize("#000000", S("Enter book title:")))..";]"..
|
||||
"label[0.75,1.5;"..minetest.formspec_escape(minetest.colorize("#404040", S("by @1", name))).."]"..
|
||||
"button_exit[0.75,7.95;3,1;sign;"..minetest.formspec_escape(S("Sign and Close")).."]"..
|
||||
"tooltip[sign;"..minetest.formspec_escape(S("Note: The book will no longer be editable after signing")).."]"..
|
||||
"button[4.25,7.95;3,1;cancel;"..minetest.formspec_escape(S("Cancel")).."]"
|
||||
|
|
|
@ -146,7 +146,7 @@ minetest.register_craftitem("mcl_core:apple", {
|
|||
|
||||
-- TODO: Status effects
|
||||
minetest.register_craftitem("mcl_core:apple_gold", {
|
||||
description = core.colorize("#55FFFF", S("Golden Apple")),
|
||||
description = minetest.colorize("#55FFFF", S("Golden Apple")),
|
||||
_doc_items_longdesc = S("Golden apples are precious food items which can be eaten."),
|
||||
wield_image = "mcl_core_apple_golden.png",
|
||||
inventory_image = "mcl_core_apple_golden.png",
|
||||
|
|
|
@ -199,7 +199,7 @@ minetest.register_node("mcl_core:realm_barrier", {
|
|||
-- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of.
|
||||
node_placement_prediction = "",
|
||||
on_place = function(pos, placer, itemstack, pointed_thing)
|
||||
minetest.chat_send_player(placer:get_player_name(), core.colorize("#FF0000", "You can't just place a realm barrier by hand!"))
|
||||
minetest.chat_send_player(placer:get_player_name(), minetest.colorize("#FF0000", "You can't just place a realm barrier by hand!"))
|
||||
return
|
||||
end,
|
||||
})
|
||||
|
@ -229,7 +229,7 @@ minetest.register_node("mcl_core:void", {
|
|||
-- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of.
|
||||
node_placement_prediction = "",
|
||||
on_place = function(pos, placer, itemstack, pointed_thing)
|
||||
minetest.chat_send_player(placer:get_player_name(), core.colorize("#FF0000", "You can't just place the void by hand!"))
|
||||
minetest.chat_send_player(placer:get_player_name(), minetest.colorize("#FF0000", "You can't just place the void by hand!"))
|
||||
return
|
||||
end,
|
||||
drop = "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue