6
6
7
7
Tool types:
8
8
9
- * Hand: basic tool/weapon (just for convenience, not optimized for testing )
9
+ * Hand: basic tool/weapon (special capabilities in creative mode )
10
10
* Pickaxe: dig cracky
11
11
* Axe: dig choppy
12
12
* Shovel: dig crumbly
@@ -24,21 +24,49 @@ Tool materials:
24
24
]]
25
25
26
26
-- The hand
27
- minetest .register_item (" :" , {
28
- type = " none" ,
29
- wield_image = " wieldhand.png" ,
30
- wield_scale = {x = 1 ,y = 1 ,z = 2.5 },
31
- tool_capabilities = {
32
- full_punch_interval = 1.0 ,
33
- max_drop_level = 0 ,
34
- groupcaps = {
35
- crumbly = {times = {[3 ]= 1.50 }, uses = 0 , maxlevel = 0 },
36
- snappy = {times = {[3 ]= 1.50 }, uses = 0 , maxlevel = 0 },
37
- oddly_breakable_by_hand = {times = {[1 ]= 7.00 ,[2 ]= 4.00 ,[3 ]= 2.00 }, uses = 0 , maxlevel = 0 },
38
- },
39
- damage_groups = {fleshy = 1 },
40
- }
41
- })
27
+ if minetest .settings :get_bool (" creative_mode" ) then
28
+ local digtime = 42
29
+ local caps = {times = {digtime , digtime , digtime }, uses = 0 , maxlevel = 256 }
30
+
31
+ minetest .register_item (" :" , {
32
+ type = " none" ,
33
+ wield_image = " wieldhand.png" ,
34
+ wield_scale = {x = 1 , y = 1 , z = 2.5 },
35
+ range = 10 ,
36
+ tool_capabilities = {
37
+ full_punch_interval = 0.5 ,
38
+ max_drop_level = 3 ,
39
+ groupcaps = {
40
+ crumbly = caps ,
41
+ cracky = caps ,
42
+ snappy = caps ,
43
+ choppy = caps ,
44
+ oddly_breakable_by_hand = caps ,
45
+ -- dig_immediate group doesn't use value 1. Value 3 is instant dig
46
+ dig_immediate =
47
+ {times = {[2 ] = digtime , [3 ] = 0 }, uses = 0 , maxlevel = 256 },
48
+ },
49
+ damage_groups = {fleshy = 10 },
50
+ }
51
+ })
52
+ else
53
+ minetest .register_item (" :" , {
54
+ type = " none" ,
55
+ wield_image = " wieldhand.png" ,
56
+ wield_scale = {x = 1 , y = 1 , z = 2.5 },
57
+ tool_capabilities = {
58
+ full_punch_interval = 0.9 ,
59
+ max_drop_level = 0 ,
60
+ groupcaps = {
61
+ crumbly = {times = {[2 ] = 3.00 , [3 ] = 0.70 }, uses = 0 , maxlevel = 1 },
62
+ snappy = {times = {[3 ] = 0.40 }, uses = 0 , maxlevel = 1 },
63
+ oddly_breakable_by_hand =
64
+ {times = {[1 ] = 3.50 , [2 ] = 2.00 , [3 ] = 0.70 }, uses = 0 }
65
+ },
66
+ damage_groups = {fleshy = 1 },
67
+ }
68
+ })
69
+ end
42
70
43
71
-- Mese Pickaxe: special tool that digs "everything" instantly
44
72
minetest .register_tool (" basetools:pick_mese" , {
0 commit comments