Deprecate minetest.add_to_creative_inventory and use group not_in_creative_inventory instead
This commit is contained in:
parent
4548b1cef5
commit
0e8ad8b6b8
@ -20,3 +20,7 @@ minetest.node_metadata_inventory_move_allow_all = function()
|
|||||||
minetest.log("info", "WARNING: minetest.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
|
minetest.log("info", "WARNING: minetest.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.add_to_creative_inventory = function(itemstring)
|
||||||
|
minetest.log('info', "WARNING: minetest.add_to_creative_inventory: This function is deprecated and does nothing.")
|
||||||
|
end
|
||||||
|
|
||||||
|
@ -244,6 +244,7 @@ minetest.register_item(":unknown", {
|
|||||||
inventory_image = "unknown_item.png",
|
inventory_image = "unknown_item.png",
|
||||||
on_place = minetest.item_place,
|
on_place = minetest.item_place,
|
||||||
on_drop = minetest.item_drop,
|
on_drop = minetest.item_drop,
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":air", {
|
minetest.register_node(":air", {
|
||||||
@ -258,6 +259,7 @@ minetest.register_node(":air", {
|
|||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
air_equivalent = true,
|
air_equivalent = true,
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":ignore", {
|
minetest.register_node(":ignore", {
|
||||||
@ -272,23 +274,15 @@ minetest.register_node(":ignore", {
|
|||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true, -- A way to remove accidentally placed ignores
|
buildable_to = true, -- A way to remove accidentally placed ignores
|
||||||
air_equivalent = true,
|
air_equivalent = true,
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- The hand (bare definition)
|
-- The hand (bare definition)
|
||||||
minetest.register_item(":", {
|
minetest.register_item(":", {
|
||||||
type = "none",
|
type = "none",
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
--
|
|
||||||
-- Creative inventory
|
|
||||||
--
|
|
||||||
|
|
||||||
minetest.creative_inventory = {}
|
|
||||||
|
|
||||||
minetest.add_to_creative_inventory = function(itemstring)
|
|
||||||
table.insert(minetest.creative_inventory, itemstring)
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Callback registration
|
-- Callback registration
|
||||||
--
|
--
|
||||||
|
Loading…
x
Reference in New Issue
Block a user