Hide "useless" items from creative and craft guide
parent
37b9b6fbfc
commit
66c99efb2f
|
@ -43,7 +43,10 @@ mobs:register_mob("mobs_mc:ghast", {
|
|||
chance = 1,
|
||||
min = 0,
|
||||
max = 2,},
|
||||
{name = mobs_mc.items.ghast_tear,
|
||||
-- TODO: drop tear when it's useful
|
||||
-- ghast tear replaced with gunpowder
|
||||
--{name = mobs_mc.items.ghast_tear,
|
||||
{name = mobs_mc.items.gunpowder,
|
||||
chance = 1,
|
||||
min = 0,
|
||||
max = 1,},
|
||||
|
|
|
@ -34,7 +34,8 @@ local rabbit = {
|
|||
drops = {
|
||||
{name = mobs_mc.items.rabbit_raw, chance = 1, min = 0, max = 1},
|
||||
{name = mobs_mc.items.rabbit_hide, chance = 1, min = 0, max = 1},
|
||||
{name = mobs_mc.items.rabbit_foot, chance = 10, min = 1, max = 1},
|
||||
-- TODO: Drop rabbit's foot when it's useful
|
||||
--{name = mobs_mc.items.rabbit_foot, chance = 10, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 4,
|
||||
|
|
|
@ -4,8 +4,10 @@ local players = {}
|
|||
-- Containing all the items for each Creative Mode tab
|
||||
local inventory_lists = {}
|
||||
|
||||
-- TODO: Brewing is disabled. Add brewing (uncommented code) when it is implemented properly
|
||||
|
||||
-- Create tables
|
||||
local builtin_filter_ids = {"blocks","deco","redstone","rail","food","tools","combat","brew","matr","misc","all"}
|
||||
local builtin_filter_ids = {"blocks","deco","redstone","rail","food","tools","combat",--[["brew",]]"matr","misc","all"}
|
||||
for _, f in pairs(builtin_filter_ids) do
|
||||
inventory_lists[f] = {}
|
||||
end
|
||||
|
@ -55,10 +57,11 @@ do
|
|||
table.insert(inventory_lists["combat"], name)
|
||||
nonmisc = true
|
||||
end
|
||||
if def.groups.brewitem then
|
||||
table.insert(inventory_lists["brew"], name)
|
||||
nonmisc = true
|
||||
end
|
||||
-- TODO: add brew
|
||||
--if def.groups.brewitem then
|
||||
--table.insert(inventory_lists["brew"], name)
|
||||
--nonmisc = true
|
||||
--end
|
||||
if def.groups.craftitem then
|
||||
table.insert(inventory_lists["matr"], name)
|
||||
nonmisc = true
|
||||
|
@ -178,7 +181,7 @@ noffset_y = 8.12
|
|||
next_noffset("food")
|
||||
next_noffset("tools")
|
||||
next_noffset("combat")
|
||||
next_noffset("brew")
|
||||
--next_noffset("brew") -- TODO: add brew
|
||||
next_noffset("matr")
|
||||
next_noffset("inv", true)
|
||||
|
||||
|
@ -197,7 +200,7 @@ hoch["default"] = ""
|
|||
hoch["food"] = "^[transformfy"
|
||||
hoch["tools"] = "^[transformfy"
|
||||
hoch["combat"] = "^[transformfy"
|
||||
hoch["brew"] = "^[transformfy"
|
||||
--hoch["brew"] = "^[transformfy" -- TODO: add brew
|
||||
hoch["matr"] = "^[transformfy"
|
||||
hoch["inv"] = "^[transformfy"
|
||||
|
||||
|
@ -213,7 +216,7 @@ local function reset_menu_item_bg()
|
|||
bg["food"] = dark_bg
|
||||
bg["tools"] = dark_bg
|
||||
bg["combat"] = dark_bg
|
||||
bg["brew"] = dark_bg
|
||||
--bg["brew"] = dark_bg -- TODO: add brew
|
||||
bg["matr"] = dark_bg
|
||||
bg["inv"] = dark_bg
|
||||
bg["default"] = dark_bg
|
||||
|
@ -380,8 +383,9 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
|||
"tooltip[tools;Tools]"..
|
||||
tab(name, "combat") ..
|
||||
"tooltip[combat;Combat]"..
|
||||
tab(name, "brew") ..
|
||||
"tooltip[brew;Brewing]"..
|
||||
-- TODO: Add brew
|
||||
--tab(name, "brew") ..
|
||||
--"tooltip[brew;Brewing]"..
|
||||
tab(name, "matr") ..
|
||||
"tooltip[matr;Materials]"..
|
||||
tab(name, "inv") ..
|
||||
|
@ -450,10 +454,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
if players[name].page == "combat" then return end
|
||||
set_inv_page("combat",player)
|
||||
page = "combat"
|
||||
--[[ TODO: add brew
|
||||
elseif fields.brew then
|
||||
if players[name].page == "brew" then return end
|
||||
set_inv_page("brew",player)
|
||||
page = "brew"
|
||||
]]
|
||||
elseif fields.matr then
|
||||
if players[name].page == "matr" then return end
|
||||
set_inv_page("matr",player)
|
||||
|
|
|
@ -198,7 +198,7 @@ minetest.register_craftitem("mcl_mobitems:blaze_powder", {
|
|||
_doc_items_longdesc = "This item is mainly used for crafting.",
|
||||
wield_image = "mcl_mobitems_blaze_powder.png",
|
||||
inventory_image = "mcl_mobitems_blaze_powder.png",
|
||||
groups = { brewitem = 1 },
|
||||
groups = { craftitem = 1, brewitem = 1 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
|
@ -207,25 +207,27 @@ minetest.register_craftitem("mcl_mobitems:magma_cream", {
|
|||
_doc_items_longdesc = "Magma cream is a crafting component.",
|
||||
wield_image = "mcl_mobitems_magma_cream.png",
|
||||
inventory_image = "mcl_mobitems_magma_cream.png",
|
||||
groups = { brewitem = 1 },
|
||||
groups = { craftitem = 1, brewitem = 1 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_mobitems:ghast_tear", {
|
||||
description = "Ghast Tear",
|
||||
_doc_items_longdesc = "A ghast tear is dropped from dead ghasts. It has no purpose yet.",
|
||||
_doc_items_longdesc = "Place this item in an item frame as decoration.",
|
||||
wield_image = "mcl_mobitems_ghast_tear.png",
|
||||
inventory_image = "mcl_mobitems_ghast_tear.png",
|
||||
groups = { brewitem = 1 },
|
||||
-- TODO: Reveal item when it's useful
|
||||
groups = { brewitem = 1, not_in_creative_inventory = 1 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_mobitems:nether_star", {
|
||||
description = "Nether Star",
|
||||
_doc_items_longdesc = "A nether star is a crafting component. It is dropped from the Wither.",
|
||||
_doc_items_longdesc = "A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.",
|
||||
wield_image = "mcl_mobitems_nether_star.png",
|
||||
inventory_image = "mcl_mobitems_nether_star.png",
|
||||
groups = { craftitem = 1 },
|
||||
-- TODO: Reveal item when it's useful
|
||||
groups = { craftitem = 1, not_in_creative_inventory = 1 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
|
@ -258,10 +260,11 @@ minetest.register_craftitem("mcl_mobitems:rabbit_hide", {
|
|||
|
||||
minetest.register_craftitem("mcl_mobitems:rabbit_foot", {
|
||||
description = "Rabbit's Foot",
|
||||
_doc_items_longdesc = "This item currently has no purpose.",
|
||||
_doc_items_longdesc = "Must be your lucky day! Place this item in an item frame for decoration.",
|
||||
wield_image = "mcl_mobitems_rabbit_foot.png",
|
||||
inventory_image = "mcl_mobitems_rabbit_foot.png",
|
||||
groups = { brewitem = 1 },
|
||||
-- TODO: Reveal item when it's useful
|
||||
groups = { brewitem = 1, not_in_creative_inventory = 1 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
local brewhelp = "This item currently has no purpose."
|
||||
local brewhelp = "Put this item in an item frame for decoration. It's useless otherwise."
|
||||
|
||||
minetest.register_craftitem("mcl_potions:fermented_spider_eye", {
|
||||
description = "Fermented Spider Eye",
|
||||
_doc_items_longdesc = brewhelp,
|
||||
wield_image = "mcl_potions_spider_eye_fermented.png",
|
||||
inventory_image = "mcl_potions_spider_eye_fermented.png",
|
||||
groups = { brewitem = 1 },
|
||||
-- TODO: Reveal item when it's actually useful
|
||||
groups = { brewitem = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
|
@ -218,7 +219,8 @@ minetest.register_craftitem("mcl_potions:potion_awkward", {
|
|||
stack_max = 1,
|
||||
inventory_image = potion_image("#0000FF"),
|
||||
wield_image = potion_image("#0000FF"),
|
||||
groups = {brewitem=1, food=3, can_eat_when_full=1},
|
||||
-- TODO: Reveal item when it's actually useful
|
||||
groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1},
|
||||
on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"),
|
||||
on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"),
|
||||
})
|
||||
|
@ -229,7 +231,8 @@ minetest.register_craftitem("mcl_potions:potion_mundane", {
|
|||
stack_max = 1,
|
||||
inventory_image = potion_image("#0000FF"),
|
||||
wield_image = potion_image("#0000FF"),
|
||||
groups = {brewitem=1, food=3, can_eat_when_full=1},
|
||||
-- TODO: Reveal item when it's actually useful
|
||||
groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1 },
|
||||
on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"),
|
||||
on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"),
|
||||
})
|
||||
|
@ -240,16 +243,18 @@ minetest.register_craftitem("mcl_potions:potion_thick", {
|
|||
stack_max = 1,
|
||||
inventory_image = potion_image("#0000FF"),
|
||||
wield_image = potion_image("#0000FF"),
|
||||
groups = {brewitem=1, food=3, can_eat_when_full=1},
|
||||
-- TODO: Reveal item when it's actually useful
|
||||
groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1 },
|
||||
on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"),
|
||||
on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_potions:speckled_melon", {
|
||||
description = "Glistering Melon",
|
||||
_doc_items_longdesc = brewhelp,
|
||||
_doc_items_longdesc = "This shiny melon is full of tiny gold nuggets and would be nice in an item frame. It isn't edible and not useful for anything else.",
|
||||
stack_max = 64,
|
||||
groups = { brewitem = 1 },
|
||||
-- TODO: Reveal item when it's actually useful
|
||||
groups = { brewitem = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1 },
|
||||
inventory_image = "mcl_potions_melon_speckled.png",
|
||||
})
|
||||
|
||||
|
@ -267,6 +272,7 @@ minetest.register_craftitem("mcl_potions:dragon_breath", {
|
|||
_doc_items_longdesc = brewhelp,
|
||||
wield_image = "mcl_potions_dragon_breath.png",
|
||||
inventory_image = "mcl_potions_dragon_breath.png",
|
||||
groups = { brewitem = 1 },
|
||||
-- TODO: Reveal item when it's actually useful
|
||||
groups = { brewitem = 1, not_in_creative_inventory = 1 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue