MineClone2/mods/MISC/mcl_wip/init.lua

50 lines
1.4 KiB
Lua
Raw Normal View History

2019-03-14 02:32:35 +01:00
-- Mod to mark WIP (Work In Progress) content
local S = minetest.get_translator("mcl_wip")
local wip_items = {
"mcl_maps:empty_map",
2017-08-28 02:08:41 +02:00
"mcl_comparators:comparator_off_comp",
"mcl_minecarts:hopper_minecart",
"mcl_minecarts:command_block_minecart",
"mcl_minecarts:chest_minecart",
"mcl_minecarts:furnace_minecart",
2018-01-09 14:32:58 +01:00
"mobs_mc:enderdragon",
"mobs_mc:wither",
"mobs_mc:parrot",
"mobs_mc:witch",
2019-12-11 04:53:01 +01:00
"screwdriver:screwdriver",
2020-06-06 16:22:07 +02:00
"mcl_paintings:painting",
}
2017-11-27 12:17:26 +01:00
local experimental_items = {
}
for i=1,#wip_items do
local def = minetest.registered_items[wip_items[i]]
if not def then
minetest.log("error", "[mcl_wip] Unknown item: "..wip_items[i])
break
end
local new_description = def.description
local new_groups = table.copy(def.groups)
2018-01-10 18:41:07 +01:00
if new_description == "" then
new_description = wip_items[i]
end
new_description = new_description .. "\n"..core.colorize("#FF0000", S("(WIP)"))
new_groups.not_in_craft_guide = 1
minetest.override_item(wip_items[i], { description = new_description, groups = new_groups })
end
2017-03-18 01:18:33 +01:00
for i=1,#experimental_items do
local def = minetest.registered_items[experimental_items[i]]
if not def then
minetest.log("error", "[mcl_wip] Unknown item: "..experimental_items[i])
break
end
local new_description = def.description
new_description = new_description .. "\n"..core.colorize("#FFFF00", S("(Temporary)"))
2017-03-18 01:18:33 +01:00
minetest.override_item(experimental_items[i], { description = new_description })
end