From ea41de41ace82d2968bd582e3d6e3a3eb13fb1ee Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 4 Aug 2017 16:04:39 +0200 Subject: [PATCH] Indicate frame ID in clock group --- GROUPS.md | 4 ++-- mods/ITEMS/mcl_clock/init.lua | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/GROUPS.md b/GROUPS.md index dd95ed5013..e2137d43c0 100644 --- a/GROUPS.md +++ b/GROUPS.md @@ -158,8 +158,8 @@ These groups are used mostly for informational purposes These groups put similar items together which should all be treated by the gameplay or the GUI as a single item. You should not add custom items to these groups for no good reason, this is likely to cause a ton of conflicts. -* `clock=1`: Clock -* `compass`: Compass (rating doesn't matter) +* `clock`: Clock (rating indicates the “frame”) +* `compass`: Compass (rating indicates the “frame”) This has the following implication: If you want to use a compass or clock in a crafting recipe, you *must* use `group:compass` or `group:clock`, respectively. diff --git a/mods/ITEMS/mcl_clock/init.lua b/mods/ITEMS/mcl_clock/init.lua index 0622dc9577..c011b1ee2e 100644 --- a/mods/ITEMS/mcl_clock/init.lua +++ b/mods/ITEMS/mcl_clock/init.lua @@ -32,7 +32,7 @@ end local doc_mod = minetest.get_modpath("doc") ~= nil -- Register items -function watch.register_item(name, image, creative) +function watch.register_item(name, image, creative, frame) local g = 1 if creative then g = 0 @@ -52,7 +52,7 @@ function watch.register_item(name, image, creative) _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, inventory_image = image, - groups = {not_in_creative_inventory=g, tool=1, clock=1}, + groups = {not_in_creative_inventory=g, tool=1, clock=frame}, wield_image = "", stack_max = 64, }) @@ -104,7 +104,7 @@ minetest.register_craft({ }) -- Clock tool -watch.register_item(mcl_clock.stereotype, watch.images[1], true) +watch.register_item(mcl_clock.stereotype, watch.images[1], true, 1) -- Faces for a=0,63,1 do @@ -114,6 +114,6 @@ for a=0,63,1 do else b = b + 32 end - watch.register_item("mcl_clock:clock_"..tostring(a), watch.images[b+1], false) + watch.register_item("mcl_clock:clock_"..tostring(a), watch.images[b+1], false, a+1) end