Increase pointing range in Creative Mode

This commit is contained in:
Wuzzy 2017-12-08 14:00:44 +01:00
parent 85442e7ce5
commit da8729a7a1
2 changed files with 5 additions and 2 deletions

View File

@ -768,6 +768,7 @@ S("Enabling Creative Mode in MineClone 2 applies the following changes:").."\n\n
S("• You keep the things you've placed").."\n".. S("• You keep the things you've placed").."\n"..
S("• Creative inventory is available to obtain most items easily").."\n".. S("• Creative inventory is available to obtain most items easily").."\n"..
S("• Hand breaks all default blocks instantly").."\n".. S("• Hand breaks all default blocks instantly").."\n"..
S("• Greatly increased hand pointing range").."\n"..
S("• Mined blocks don't drop items").."\n".. S("• Mined blocks don't drop items").."\n"..
S("• Tools don't wear off").."\n".. S("• Tools don't wear off").."\n"..
S("• Bows have infinite arrows").."\n".. S("• Bows have infinite arrows").."\n"..

View File

@ -16,7 +16,7 @@
-- TODO: Add legacy support for Minetest Game groups like crumbly, snappy, cracky, etc. for all tools -- TODO: Add legacy support for Minetest Game groups like crumbly, snappy, cracky, etc. for all tools
-- The hand -- The hand
local groupcaps local groupcaps, range
if minetest.settings:get_bool("creative_mode") then if minetest.settings:get_bool("creative_mode") then
-- Instant breaking in creative mode -- Instant breaking in creative mode
groupcaps = { groupcaps = {
@ -26,10 +26,12 @@ if minetest.settings:get_bool("creative_mode") then
for k,v in pairs(mcl_autogroup.creativetimes) do for k,v in pairs(mcl_autogroup.creativetimes) do
groupcaps[k] = { times = v, uses = 0 } groupcaps[k] = { times = v, uses = 0 }
end end
hand_range = 10
else else
groupcaps = { groupcaps = {
handy_dig = {times=mcl_autogroup.digtimes.handy_dig, uses=0}, handy_dig = {times=mcl_autogroup.digtimes.handy_dig, uses=0},
} }
hand_range = 4
end end
minetest.register_item(":", { minetest.register_item(":", {
type = "none", type = "none",
@ -38,7 +40,7 @@ minetest.register_item(":", {
wield_scale = {x=1.0,y=1.0,z=2.0}, wield_scale = {x=1.0,y=1.0,z=2.0},
-- According to Minecraft Wiki, the exact range is 3.975. -- According to Minecraft Wiki, the exact range is 3.975.
-- Minetest seems to only support whole numbers, so we use 4. -- Minetest seems to only support whole numbers, so we use 4.
range = 4, range = hand_range,
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.25, full_punch_interval = 0.25,
max_drop_level = 0, max_drop_level = 0,