initial working version
101
armor.lua
Normal file
@ -0,0 +1,101 @@
|
||||
|
||||
-- Helmet
|
||||
|
||||
armor:register_armor("obsidianstuff:helmet_obsidian", {
|
||||
description = "Obsidian Helmet",
|
||||
inventory_image = "obsidianstuff_inv_helmet_obsidian.png",
|
||||
groups = {armor_head = 1, armor_heal = 10, armor_use = 500, armor_fire = 15},
|
||||
armor_groups = {fleshy = 14},
|
||||
damage_groups = {cracky = 2, snappy = 2, choppy = 2, level = 2}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:helmet_obsidian",
|
||||
recipe = {
|
||||
{"default:obsidian", "default:obsidian", "default:obsidian"},
|
||||
{"default:obsidian", "", "default:obsidian"},
|
||||
{"", "", ""}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Chestplate
|
||||
|
||||
armor:register_armor("obsidianstuff:chestplate_obsidian", {
|
||||
description = "Obsidian Chestplate",
|
||||
inventory_image = "obsidianstuff_inv_chestplate_obsidian.png",
|
||||
groups = {armor_torso = 1, armor_heal = 10, armor_use = 500, armor_fire = 15},
|
||||
armor_groups = {fleshy = 18},
|
||||
damage_groups = {cracky = 2, snappy = 2, choppy = 2, level = 2}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:chestplate_obsidian",
|
||||
recipe = {
|
||||
{"default:obsidian", "", "default:obsidian"},
|
||||
{"default:obsidian", "default:obsidian", "default:obsidian"},
|
||||
{"default:obsidian", "default:obsidian", "default:obsidian"}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Leggings
|
||||
|
||||
armor:register_armor("obsidianstuff:leggings_obsidian", {
|
||||
description = "Obsidian Leggings",
|
||||
inventory_image = "obsidianstuff_inv_leggings_obsidian.png",
|
||||
groups = {armor_legs = 1, armor_heal = 10, armor_use = 500, armor_fire = 15},
|
||||
armor_groups = {fleshy = 18},
|
||||
damage_groups = {cracky = 2, snappy = 2, choppy = 2, level = 2}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:leggings_obsidian",
|
||||
recipe = {
|
||||
{"default:obsidian", "default:obsidian", "default:obsidian"},
|
||||
{"default:obsidian", "", "default:obsidian"},
|
||||
{"default:obsidian", "", "default:obsidian"}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Boots
|
||||
|
||||
armor:register_armor("obsidianstuff:boots_obsidian", {
|
||||
description = "Obsidian Boots",
|
||||
inventory_image = "obsidianstuff_inv_boots_obsidian.png",
|
||||
groups = {armor_feet = 1, armor_heal = 10, armor_use = 500, armor_fire = 15},
|
||||
armor_groups = {fleshy = 14},
|
||||
damage_groups = {cracky = 2, snappy = 2, choppy = 2, level = 2}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:boots_obsidian",
|
||||
recipe = {
|
||||
{"default:obsidian", "", "default:obsidian"},
|
||||
{"default:obsidian", "", "default:obsidian"}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Shield
|
||||
|
||||
if minetest.get_modpath("shields") then
|
||||
|
||||
armor:register_armor("obsidianstuff:shield_obsidian", {
|
||||
description = "Obsidian Shield",
|
||||
inventory_image = "obsidianstuff_inv_shield_obsidian.png",
|
||||
groups = {armor_shield = 1, armor_heal = 10, armor_use = 500, armor_fire = 15},
|
||||
armor_groups = {fleshy = 18},
|
||||
damage_groups = {cracky = 2, snappy = 2, choppy = 2, level = 2}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:shield_obsidian",
|
||||
recipe = {
|
||||
{"default:obsidian", "default:obsidian", "default:obsidian"},
|
||||
{"default:obsidian", "default:obsidian", "default:obsidian"},
|
||||
{"", "default:obsidian", ""}
|
||||
}
|
||||
})
|
||||
end
|
56
init.lua
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
local MP = minetest.get_modpath("obsidianstuff")
|
||||
|
||||
|
||||
-- Tools
|
||||
|
||||
dofile(MP.."/tools.lua")
|
||||
|
||||
|
||||
-- Armor
|
||||
|
||||
if minetest.get_modpath("3d_armor") then
|
||||
dofile(MP.."/armor.lua")
|
||||
end
|
||||
|
||||
|
||||
-- Toolranks support
|
||||
|
||||
if minetest.get_modpath("toolranks") then
|
||||
|
||||
minetest.override_item("obsidianstuff:sword", {
|
||||
description = toolranks.create_description("Obsidian Sword", 0, 1),
|
||||
original_description = "Obsidian Sword",
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
|
||||
minetest.override_item("obsidianstuff:pick", {
|
||||
description = toolranks.create_description("Obsidian Pickaxe", 0, 1),
|
||||
original_description = "Obsidian Pickaxe",
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
|
||||
minetest.override_item("obsidianstuff:axe", {
|
||||
description = toolranks.create_description("Obsidian Axe", 0, 1),
|
||||
original_description = "Obsidian Axe",
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
|
||||
minetest.override_item("obsidianstuff:shovel", {
|
||||
description = toolranks.create_description("Obsidian Shovel", 0, 1),
|
||||
original_description = "Obsidian Shovel",
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-- Aliases
|
||||
|
||||
minetest.register_alias("obsidianstuff:helmet", "obsidianstuff:helmet_obsidian")
|
||||
minetest.register_alias("obsidianstuff:chestplate", "obsidianstuff:chestplate_obsidian")
|
||||
minetest.register_alias("obsidianstuff:leggings", "obsidianstuff:leggings_obsidian")
|
||||
minetest.register_alias("obsidianstuff:boots", "obsidianstuff:boots_obsidian")
|
||||
minetest.register_alias("obsidianstuff:shield", "obsidianstuff:shield_obsidian")
|
||||
|
||||
minetest.register_alias("obsidianstuff:block", "default:obsidian")
|
||||
minetest.register_alias("obsidianstuff:ingot", "default:obsidian")
|
5
mod.conf
Normal file
@ -0,0 +1,5 @@
|
||||
name = obsidianstuff
|
||||
description = Adds obsidian tools and armor
|
||||
depends = default
|
||||
optional_depends = 3d_armor, toolranks
|
||||
min_minetest_version = 5.0
|
BIN
textures/obsidianstuff_axe.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
textures/obsidianstuff_boots_obsidian.png
Normal file
After Width: | Height: | Size: 179 B |
BIN
textures/obsidianstuff_boots_obsidian_preview.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
textures/obsidianstuff_chestplate_obsidian.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
textures/obsidianstuff_chestplate_obsidian_preview.png
Normal file
After Width: | Height: | Size: 225 B |
BIN
textures/obsidianstuff_helmet_obsidian.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
textures/obsidianstuff_helmet_obsidian_preview.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
textures/obsidianstuff_inv_boots_obsidian.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
textures/obsidianstuff_inv_chestplate_obsidian.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
textures/obsidianstuff_inv_helmet_obsidian.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
textures/obsidianstuff_inv_leggings_obsidian.png
Normal file
After Width: | Height: | Size: 199 B |
BIN
textures/obsidianstuff_inv_shield_obsidian.png
Normal file
After Width: | Height: | Size: 199 B |
BIN
textures/obsidianstuff_leggings_obsidian.png
Normal file
After Width: | Height: | Size: 201 B |
BIN
textures/obsidianstuff_leggings_obsidian_preview.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
textures/obsidianstuff_pick.png
Normal file
After Width: | Height: | Size: 184 B |
BIN
textures/obsidianstuff_shield_obsidian.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
textures/obsidianstuff_shield_obsidian_preview.png
Normal file
After Width: | Height: | Size: 218 B |
BIN
textures/obsidianstuff_shovel.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
textures/obsidianstuff_sword.png
Normal file
After Width: | Height: | Size: 164 B |
124
tools.lua
Normal file
@ -0,0 +1,124 @@
|
||||
|
||||
-- Pickaxe
|
||||
|
||||
minetest.register_tool("obsidianstuff:pick", {
|
||||
description = "Obsidian Pickaxe",
|
||||
inventory_image = "obsidianstuff_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level = 2,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {[1] = 2.5, [2] = 1.20, [3] = 0.60},
|
||||
uses = 20,
|
||||
maxlevel = 2
|
||||
}
|
||||
},
|
||||
damage_groups = {fleshy = 6},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
groups = {pickaxe = 1}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:pick",
|
||||
recipe = {
|
||||
{"default:obsidian", "default:obsidian", "default:obsidian"},
|
||||
{"", "default:stick", ""},
|
||||
{"", "default:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Shovel
|
||||
|
||||
minetest.register_tool("obsidianstuff:shovel", {
|
||||
description = "Obsidian Shovel",
|
||||
inventory_image = "obsidianstuff_shovel.png",
|
||||
wield_image = "obsidianstuff_shovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
crumbly = {
|
||||
times = {[1] = 1.20, [2] = 0.60, [3] = 0.30},
|
||||
uses = 20,
|
||||
maxlevel = 2
|
||||
}
|
||||
},
|
||||
damage_groups = {fleshy = 4},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
groups = {shovel = 1}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:shovel",
|
||||
recipe = {
|
||||
{"default:obsidian"},
|
||||
{"default:stick"},
|
||||
{"default:stick"}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Axe
|
||||
|
||||
minetest.register_tool("obsidianstuff:axe", {
|
||||
description = "Obsidian Axe",
|
||||
inventory_image = "obsidianstuff_axe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {[1] = 2.20, [2] = 1.00, [3] = 0.60},
|
||||
uses = 20,
|
||||
maxlevel = 2
|
||||
}
|
||||
},
|
||||
damage_groups = {fleshy = 8},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
groups = {axe = 1}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:axe",
|
||||
recipe = {
|
||||
{"default:obsidian", "default:obsidian", ""},
|
||||
{"default:obsidian", "default:stick", ""},
|
||||
{"", "default:stick", ""}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Sword
|
||||
|
||||
minetest.register_tool("obsidianstuff:sword", {
|
||||
description = "Obsidian Sword",
|
||||
inventory_image = "obsidianstuff_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.6,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
snappy = {
|
||||
times = {[1] = 1.90, [2] = 0.90, [3] = 0.30},
|
||||
uses = 20,
|
||||
maxlevel = 2
|
||||
}
|
||||
},
|
||||
damage_groups = {fleshy = 10}
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
groups = {sword = 1}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "obsidianstuff:sword",
|
||||
recipe = {
|
||||
{"default:obsidian"},
|
||||
{"default:obsidian"},
|
||||
{"default:stick"}
|
||||
}
|
||||
})
|