Tools created

First 2 pickaxes are created, and stone-like things were updated to match.
master
opfromthestart 2022-08-24 15:04:42 -04:00
parent f3f71282ba
commit 3ab8f41785
8 changed files with 70 additions and 12 deletions

View File

@ -2,7 +2,7 @@ local hand_groupcap = {
oddly_breakable_by_hand = {
times = { 3, 1, 0.30 },
uses = 0,
},
}
}
if minetest.is_creative_enabled("") then
hand_groupcap = {
@ -10,6 +10,10 @@ if minetest.is_creative_enabled("") then
times = { 0.1, 0.1, 0.1 },
uses = 0,
},
pickaxey = {
times = {0.1, 0.1, 0.1},
uses = 0,
},
}
end

View File

@ -0,0 +1,17 @@
minetest.register_craft({
output = "pmb_tools:wooden_pickaxe",
recipe = {
{ "group:planks", "group:planks", "group:planks" },
{ "", "pmb_items:stick", "" },
{ "", "pmb_items:stick", "" },
},
})
minetest.register_craft({
output = "pmb_tools:stone_pickaxe",
recipe = {
{ "pmb_stone:cobble", "pmb_stone:cobble", "pmb_stone:cobble" },
{ "", "pmb_items:stick", "" },
{ "", "pmb_items:stick", "" },
},
})

View File

@ -0,0 +1,33 @@
local mod_name = minetest.get_current_modname()
local mod_path = minetest.get_modpath(mod_name)
local S = minetest.get_translator(mod_name)
minetest.register_tool("pmb_tools:wooden_pickaxe", {
description = S("A wooden pickaxe"),
inventory_image = "pmb_wooden_pickaxe.png",
tool_capabilities = {
groupcaps = {
pickaxey = {
times = { 1 },
uses = 32,
},
},
},
groups = { pickaxe = 1 },
})
minetest.register_tool("pmb_tools:stone_pickaxe", {
description = S("A stone pickaxe"),
inventory_image = "pmb_stone_pickaxe.png",
tool_capabilities = {
groupcaps = {
pickaxey = {
times = { .7, 1 },
uses = 64,
},
},
},
groups = { pickaxe = 1 },
})
dofile(mod_path .. DIR_DELIM .. "crafting.lua")

View File

@ -0,0 +1,3 @@
name = pmb_tools
description = For tool items
author = PMB team

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

View File

@ -1,2 +1,3 @@
name = pmb_dummy
author = PMB team
author = PMB team
description = This mod does nothing

View File

@ -8,32 +8,32 @@ pmb_stone = {}
minetest.register_node('pmb_stone:stone', {
description = 'Stone',
groups = { item_stone = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, silk_touchable = 1 },
groups = { item_stone = 1, solid = 1, pickaxey = 1, stone = 1, silk_touchable = 1 },
tiles = { 'pmb_stone_stone.png' },
drop = 'pmb_stone:cobble',
sounds = pmb_sounds.default_stone(),
})
minetest.register_node('pmb_stone:granite', {
description = 'Granite',
groups = { item_granite = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, },
groups = { item_granite = 1, solid = 1, pickaxey = 1, stone = 1, },
tiles = { 'pmb_stone_granite.png' },
})
minetest.register_node('pmb_stone:cobble', {
description = 'Cobbled Stone',
groups = { item_cobble = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, },
groups = { item_cobble = 1, solid = 1, pickaxey = 1, stone = 1, },
tiles = { 'pmb_stone_cobble.png' },
sounds = pmb_sounds.default_stone(),
})
minetest.register_node('pmb_stone:cobble_moss_1', {
description = 'Cobbled Stone with some Moss',
groups = { item_cobble_moss_1 = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, },
groups = { item_cobble_moss_1 = 1, solid = 1, pickaxey = 1, stone = 1, },
tiles = { 'pmb_stone_cobble_moss_1.png' },
drop = 'pmb_stone:cobble_moss_1',
sounds = pmb_sounds.default_stone(),
})
minetest.register_node('pmb_stone:cobble_moss_2', {
description = 'Cobbled Stone Moss',
groups = { item_cobble_moss_2 = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, },
groups = { item_cobble_moss_2 = 1, solid = 1, pickaxey = 1, stone = 1, },
tiles = { 'pmb_stone_cobble_moss_2.png' },
drop = 'pmb_stone:cobble_moss_2',
sounds = pmb_sounds.default_stone(),
@ -89,7 +89,7 @@ pmb_stone.register_slab("Granite", {"pmb_stone_granite.png"})
minetest.register_node('pmb_stone:stone_iron_ore', {
description = 'Iron ore',
groups = { item_iron_ore = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, silk_touchable = 1 },
groups = { item_iron_ore = 1, solid = 1, pickaxey = 2, stone = 1, silk_touchable = 1 },
tiles = { 'pmb_stone_stone.png^pmb_iron_overlay.png' },
sounds = pmb_sounds.default_stone(),
drop = {
@ -108,7 +108,7 @@ minetest.register_node('pmb_stone:stone_iron_ore', {
minetest.register_node('pmb_stone:stone_tin_ore', {
description = 'Tin ore',
groups = { item_tin_ore = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, silk_touchable = 1 },
groups = { item_tin_ore = 1, solid = 1, pickaxey = 2, stone = 1, silk_touchable = 1 },
tiles = { 'pmb_stone_stone.png^pmb_tin_overlay.png' },
sounds = pmb_sounds.default_stone(),
drop = {
@ -127,7 +127,7 @@ minetest.register_node('pmb_stone:stone_tin_ore', {
minetest.register_node('pmb_stone:stone_copper_ore', {
description = 'Copper ore',
groups = { item_copper_ore = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, silk_touchable = 1 },
groups = { item_copper_ore = 1, solid = 1, pickaxey = 2, stone = 1, silk_touchable = 1 },
tiles = { 'pmb_stone_stone.png^pmb_copper_overlay.png' },
sounds = pmb_sounds.default_stone(),
drop = {
@ -146,7 +146,7 @@ minetest.register_node('pmb_stone:stone_copper_ore', {
minetest.register_node('pmb_stone:stone_lapis_ore', {
description = 'Lapis lazuli ore',
groups = { item_lapis_ore = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, silk_touchable = 1 },
groups = { item_lapis_ore = 1, solid = 1, pickaxey = 3, stone = 1, silk_touchable = 1 },
tiles = { 'pmb_stone_stone.png^pmb_lapis_overlay.png' },
sounds = pmb_sounds.default_stone(),
drop = {
@ -173,7 +173,7 @@ minetest.register_node('pmb_stone:stone_lapis_ore', {
minetest.register_node('pmb_stone:stone_diamond_ore', {
description = 'Diamond ore',
groups = { item_diamond_ore = 1, solid = 1, oddly_breakable_by_hand = 3, stone = 1, silk_touchable = 1 },
groups = { item_diamond_ore = 1, solid = 1, pickaxey = 3, stone = 1, silk_touchable = 1 },
tiles = { 'pmb_stone_stone.png^pmb_diamond_overlay.png' },
sounds = pmb_sounds.default_stone(),
drop = {