Use minetest.raillike_group for rails
[MineClone/MineClone2/MineClone2.git] / mods / MISC / mcl_wip / init.lua
blob0b042e21258f7b7395c76b6d62f5ce08aad3bb82
1 -- Mod to mark WIP (Work In Progress) content
3 local S = minetest.get_translator("mcl_wip")
5 local wip_items = {
6 "mcl_fishing:fishing_rod",
7 "mcl_maps:empty_map",
8 "mcl_comparators:comparator_off_comp",
9 "mcl_minecarts:hopper_minecart",
10 "mcl_minecarts:command_block_minecart",
11 "mcl_minecarts:chest_minecart",
12 "mcl_minecarts:furnace_minecart",
13 "mcl_minecarts:tnt_minecart",
14 "mcl_minecarts:activator_rail",
15 "mobs_mc:enderdragon",
16 "mobs_mc:wither",
17 "mobs_mc:parrot",
18 "mobs_mc:witch",
20 local experimental_items = {
23 for i=1,#wip_items do
24 local def = minetest.registered_items[wip_items[i]]
25 if not def then
26 minetest.log("error", "[mcl_wip] Unknown item: "..wip_items[i])
27 break
28 end
29 local new_description = def.description
30 local new_groups = table.copy(def.groups)
31 if new_description == "" then
32 new_description = wip_items[i]
33 end
34 new_description = new_description .. "\n"..core.colorize("#FF0000", S("(WIP)"))
35 new_groups.not_in_craft_guide = 1
36 minetest.override_item(wip_items[i], { description = new_description, groups = new_groups })
37 end
39 for i=1,#experimental_items do
40 local def = minetest.registered_items[experimental_items[i]]
41 if not def then
42 minetest.log("error", "[mcl_wip] Unknown item: "..experimental_items[i])
43 break
44 end
45 local new_description = def.description
46 new_description = new_description .. "\n"..core.colorize("#FFFF00", S("(Temporary)"))
47 minetest.override_item(experimental_items[i], { description = new_description })
48 end