123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491 |
- -- [[mods/cannabis/tools.lua]]
- --REGISTER TOOLS : PICKS SHOVELS AXES SWORDS
- --
- -- Picks______________________________________________________________________________
- --
- -- get Boilerplate for Translations
- local S = cannabis.S
- minetest.register_tool("cannabis:pick_hemp_steel", {
- description = S("Hemp Steel Pickaxe"),
- inventory_image = "cannabis_tool_steelpick.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=20, maxlevel=2},
- },
- damage_groups = {fleshy=4},
- },
- })
- minetest.register_tool("cannabis:pick_hemp_bronze", {
- description = S("Hemp Bronze Pickaxe"),
- inventory_image = "cannabis_tool_bronzepick.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
- },
- damage_groups = {fleshy=4},
- },
- })
- minetest.register_tool("cannabis:pick_hemp_mese", {
- description = S("Hemp Mese Pickaxe"),
- inventory_image = "cannabis_tool_mesepick.png",
- tool_capabilities = {
- full_punch_interval = 0.9,
- max_drop_level=3,
- groupcaps={
- cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3},
- },
- damage_groups = {fleshy=5},
- },
- })
- minetest.register_tool("cannabis:pick_hemp_diamond", {
- description = S("Hemp Diamond Pickaxe"),
- inventory_image = "cannabis_tool_diamondpick.png",
- tool_capabilities = {
- full_punch_interval = 0.9,
- max_drop_level=3,
- groupcaps={
- cracky = {times={[1]=0.5, [2]=0.4, [3]=0.3}, uses=30, maxlevel=3},
- },
- damage_groups = {fleshy=5},
- },
- })
- minetest.register_tool("cannabis:pick_hemp_high", {
- description = S("Hemp High Pickaxe"),
- inventory_image = "cannabis_tool_highpick.png",
- tool_capabilities = {
- full_punch_interval = 0.9,
- max_drop_level=3,
- groupcaps={
- cracky = {times={[1]=0.3, [2]=0.2, [3]=0.1}, uses=40, maxlevel=3},
- },
- damage_groups = {fleshy=5},
- },
- })
- minetest.register_tool("cannabis:pick_hemp_adminh", {
- description = S("Hemp Adminh Pickaxe"),
- inventory_image = "cannabis_tool_adminhpick.png",
- tool_capabilities = {
- full_punch_interval = 0.35,
- max_drop_level=3,
- groupcaps= {
- unbreakable = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
- fleshy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
- choppy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
- bendy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
- cracky = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
- crumbly = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
- snappy = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 0, maxlevel = 3},
- },
- damage_groups = {fleshy=10000},
- },
- })
- minetest.register_on_punchnode(function(pos, node, puncher)
- if puncher:get_wielded_item():get_name() == "cannabis:pick_hemp_adminh"
- and minetest.get_node(pos).name ~= "air" then
- minetest.log("action", puncher:get_player_name() .. " digs " .. minetest.get_node(pos).name .. " at " .. minetest.pos_to_string(pos) .. " using an Admin Pickaxe.")
- minetest.remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
- minetest.check_for_falling(pos) -- Run node update actions like falling nodes.
- end
- end)
- --
- -- Shovels___________________________________________________________________________________________________________
- --
- minetest.register_tool("cannabis:shovel_hemp_high", {
- description = S("Hemp High Shovel"),
- inventory_image = "cannabis_tool_highshovel.png",
- wield_image = "cannabis_tool_highshovel.png^[transformR90",
- tool_capabilities = {
- full_punch_interval = 1.2,
- max_drop_level=3,
- groupcaps={
- crumbly = {times={[1]=1.00, [2]=0.40, [3]=0.25}, uses=40, maxlevel=3},
- },
- damage_groups = {fleshy=2},
- },
- })
- minetest.register_tool("cannabis:shovel_hemp_steel", {
- description = S("Hemp Steel Shovel"),
- inventory_image = "cannabis_tool_steelshovel.png",
- wield_image = "cannabis_tool_steelshovel.png^[transformR90",
- tool_capabilities = {
- full_punch_interval = 1.1,
- max_drop_level=1,
- groupcaps={
- crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2},
- },
- damage_groups = {fleshy=3},
- },
- })
- minetest.register_tool("cannabis:shovel_hemp_bronze", {
- description = S("Hemp Bronze Shovel"),
- inventory_image = "cannabis_tool_bronzeshovel.png",
- wield_image = "cannabis_tool_bronzeshovel.png^[transformR90",
- tool_capabilities = {
- full_punch_interval = 1.1,
- max_drop_level=1,
- groupcaps={
- crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=40, maxlevel=2},
- },
- damage_groups = {fleshy=3},
- },
- })
- minetest.register_tool("cannabis:shovel_hemp_mese", {
- description = S("Hemp Mese Shovel"),
- inventory_image = "cannabis_tool_meseshovel.png",
- wield_image = "cannabis_tool_meseshovel.png^[transformR90",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=3,
- groupcaps={
- crumbly = {times={[1]=1.20, [2]=0.60, [3]=0.30}, uses=20, maxlevel=3},
- },
- damage_groups = {fleshy=4},
- },
- })
- minetest.register_tool("cannabis:shovel_hemp_diamond", {
- description = S("Hemp Diamond Shovel"),
- inventory_image = "cannabis_tool_diamondshovel.png",
- wield_image = "cannabis_tool_diamondshovel.png^[transformR90",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3},
- },
- damage_groups = {fleshy=4},
- },
- })
- -- Axes____________________________________________________________________________________________________
- --
- minetest.register_tool("cannabis:axe_hemp_steel", {
- description = S("Hemp Steel Axe"),
- inventory_image = "cannabis_tool_steelaxe.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=20, maxlevel=2},
- },
- damage_groups = {fleshy=4},
- },
- })
- minetest.register_tool("cannabis:axe_hemp_bronze", {
- description = S("Hemp Bronze Axe"),
- inventory_image = "cannabis_tool_bronzeaxe.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=30, maxlevel=2},
- },
- damage_groups = {fleshy=4},
- },
- })
- minetest.register_tool("cannabis:axe_hemp_mese", {
- description = S("Hemp Mese Axe"),
- inventory_image = "cannabis_tool_meseaxe.png",
- tool_capabilities = {
- full_punch_interval = 0.9,
- max_drop_level=1,
- groupcaps={
- choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=20, maxlevel=3},
- },
- damage_groups = {fleshy=6},
- },
- })
- minetest.register_tool("cannabis:axe_hemp_diamond", {
- description = S("Hemp Diamond Axe"),
- inventory_image = "cannabis_tool_diamondaxe.png",
- tool_capabilities = {
- full_punch_interval = 0.9,
- max_drop_level=1,
- groupcaps={
- choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=2},
- },
- damage_groups = {fleshy=7},
- },
- })
- minetest.register_tool("cannabis:axe_hemp_high", {
- description = S("Hemp High Performance Axe"),
- inventory_image = "cannabis_tool_highaxe.png",
- tool_capabilities = {
- full_punch_interval = 0.9,
- max_drop_level=1,
- groupcaps={
- choppy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=40, maxlevel=3},
- },
- damage_groups = {fleshy=8},
- },
- })
- --
- -- Swords___________________________________________________________________________________________________
- minetest.register_tool("cannabis:sword_hemp_steel", {
- description = S("Hemp Steel Sword"),
- inventory_image = "cannabis_tool_steelsword.png",
- tool_capabilities = {
- full_punch_interval = 0.8,
- max_drop_level=1,
- groupcaps={
- snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2},
- },
- damage_groups = {fleshy=6},
- }
- })
- minetest.register_tool("cannabis:sword_hemp_bronze", {
- description = S("Hemp Bronze Sword"),
- inventory_image = "cannabis_tool_bronzesword.png",
- tool_capabilities = {
- full_punch_interval = 0.8,
- max_drop_level=1,
- groupcaps={
- snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=40, maxlevel=2},
- },
- damage_groups = {fleshy=6},
- }
- })
- minetest.register_tool("cannabis:sword_hemp_mese", {
- description = S("Hemp Mese Sword"),
- inventory_image = "cannabis_tool_mesesword.png",
- tool_capabilities = {
- full_punch_interval = 0.7,
- max_drop_level=1,
- groupcaps={
- snappy={times={[1]=2.0, [2]=1.00, [3]=0.35}, uses=30, maxlevel=3},
- },
- damage_groups = {fleshy=7},
- }
- })
- minetest.register_tool("cannabis:sword_hemp_diamond", {
- description = S("Hemp Diamond Sword"),
- inventory_image = "cannabis_tool_diamondsword.png",
- tool_capabilities = {
- full_punch_interval = 0.7,
- max_drop_level=1,
- groupcaps={
- snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
- },
- damage_groups = {fleshy=8},
- }
- })
- minetest.register_tool("cannabis:sword_hemp_high", {
- description = S("Hemp High Performance Sword"),
- inventory_image = "cannabis_tool_highsword.png",
- tool_capabilities = {
- full_punch_interval = 0.7,
- max_drop_level=1,
- groupcaps={
- snappy={times={[1]=0.8, [2]=0.8, [3]=0.25}, uses=50, maxlevel=3},
- },
- damage_groups = {fleshy=9},
- }
- })
- --pick:___________________________________________________________________
- minetest.register_craft({
- output = 'cannabis:pick_hemp_high',
- recipe = {
- {'cannabis:mixed_hr_ingot', 'cannabis:mixed_hr_ingot', 'cannabis:mixed_hr_ingot'},
- {'', 'group:stick', ''},
- {'', 'group:stick', ''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:pick_hemp_steel',
- recipe = {
- {'default:steel_ingot', 'cannabis:high_performance_ingot', 'default:steel_ingot'},
- {'', 'group:stick', ''},
- {'', 'group:stick', ''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:pick_hemp_bronze',
- recipe = {
- {'default:bronze_ingot', 'cannabis:foglie_ingot', 'default:bronze_ingot'},
- {'', 'group:stick', ''},
- {'', 'group:stick', ''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:pick_hemp_mese',
- recipe = {
- {'default:mese_crystal', 'cannabis:fibra_ingot', 'default:mese_crystal'},
- {'', 'group:stick', ''},
- {'', 'group:stick', ''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:pick_hemp_diamond',
- recipe = {
- {'default:diamond', 'cannabis:tessuto_ingot', 'default:diamond'},
- {'', 'group:stick', ''},
- {'', 'group:stick', ''},
- }
- })
- --shovel__________________________________________________________________________________________
- minetest.register_craft({
- output = 'cannabis:shovel_hemp_high',
- recipe = {
- {'cannabis:mixed_hr_ingot'},
- {'group:stick'},
- {'group:stick'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:shovel_hemp_steel',
- recipe = {
- {'default:steel_ingot'},
- {'group:stick'},
- {'cannabis:high_performance_ingot'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:shovel_hemp_bronze',
- recipe = {
- {'default:bronze_ingot'},
- {'group:stick'},
- {'cannabis:foglie_ingot'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:shovel_hemp_mese',
- recipe = {
- {'default:mese_crystal'},
- {'group:stick'},
- {'cannabis:fibra_ingot'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:shovel_hemp_diamond',
- recipe = {
- {'default:diamond'},
- {'group:stick'},
- {'cannabis:tessuto_ingot'},
- }
- })
- --axe_______________________________________________________________________________________________
- minetest.register_craft({
- output = 'cannabis:axe_hemp_high',
- recipe = {
- {'cannabis:mixed_hr_ingot', 'cannabis:mixed_hr_ingot'},
- {'group:stick', 'cannabis:mixed_hr_ingot'},
- {'group:stick',''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:axe_hemp_steel',
- recipe = {
- {'cannabis:high_performance_ingot', 'default:steel_ingot'},
- {'group:stick', 'default:steel_ingot'},
- {'group:stick', ''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:axe_hemp_bronze',
- recipe = {
- {'cannabis:foglie_ingot', 'default:bronze_ingot'},
- {'group:stick', 'default:bronze_ingot'},
- {'group:stick', ''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:axe_hemp_mese',
- recipe = {
- {'cannabis:fibra_ingot', 'default:mese_crystal'},
- {'group:stick', 'default:mese_crystal'},
- {'group:stick', ''},
- }
- })
- minetest.register_craft({
- output = 'cannabis:axe_hemp_diamond',
- recipe = {
- {'cannabis:tessuto_ingot', 'default:diamond'},
- {'group:stick', 'default:diamond'},
- {'group:stick', ''},
- }
- })
- --sword_________________________________________________________________________________________________________
- minetest.register_craft({
- output = 'cannabis:sword_hemp_high',
- recipe = {
- {'cannabis:mixed_hr_ingot'},
- {'cannabis:mixed_hr_ingot'},
- {'group:stick'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:sword_hemp_steel',
- recipe = {
- {'default:steel_ingot'},
- {'cannabis:high_performance_ingot'},
- {'group:stick'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:sword_hemp_bronze',
- recipe = {
- {'default:bronze_ingot'},
- {'cannabis:foglie_ingot'},
- {'group:stick'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:sword_hemp_mese',
- recipe = {
- {'default:mese_crystal'},
- {'cannabis:fibra_ingot'},
- {'group:stick'},
- }
- })
- minetest.register_craft({
- output = 'cannabis:sword_hemp_diamond',
- recipe = {
- {'default:diamond'},
- {'cannabis:tessuto_ingot'},
- {'group:stick'},
- }
- })
|