From 9d297474465eb54e0a2e17a5a3c26031b44521d5 Mon Sep 17 00:00:00 2001 From: ermprost Date: Mon, 19 Aug 2024 08:32:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 31 +++++++++++++++++++++++++++++++ magic_axe.lua | 29 +++++++++++++++++++++++++++++ magic_pick.lua | 29 +++++++++++++++++++++++++++++ magic_shovel.lua | 29 +++++++++++++++++++++++++++++ magic_sword.lua | 29 +++++++++++++++++++++++++++++ 5 files changed, 147 insertions(+) create mode 100644 init.lua create mode 100644 magic_axe.lua create mode 100644 magic_pick.lua create mode 100644 magic_shovel.lua create mode 100644 magic_sword.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..d1e7599 --- /dev/null +++ b/init.lua @@ -0,0 +1,31 @@ +local modname = minetest.get_current_modname() + +local S = minetest.get_translator(modname) + +local modpath = minetest.get_modpath(modname) + +--global variables +brewing = {} +brewing.settings = {} +brewing.craft_list = {} --for potion crafts +brewing.effects = {} --for the player effects +brewing.players = {} --for the players + +assert(loadfile(modpath.. "/settings.lua"))(modpath) +assert(loadfile(modpath.. "/api.lua"))(S, modname) +assert(loadfile(modpath.. "/effects.lua"))(S) +assert(loadfile(modpath.. "/potions.lua"))(S) +assert(loadfile(modpath.. "/potion_crafts.lua"))() +assert(loadfile(modpath.. "/cauldron.lua"))(S) +assert(loadfile(modpath.. "/cauldron1.lua"))(S) +assert(loadfile(modpath.. "/player.lua"))() +assert(loadfile(modpath.. "/sound.lua"))() +assert(loadfile(modpath.. "/mushroom.lua"))(S) +assert(loadfile(modpath.. "/magic_pick.lua"))() +assert(loadfile(modpath.. "/magic_sword.lua"))() +assert(loadfile(modpath.. "/magic_axe.lua"))() +assert(loadfile(modpath.. "/magic_shovel.lua"))() +assert(loadfile(modpath.. "/armor.lua"))() +assert(loadfile(modpath.. "/ore.lua"))() +assert(loadfile(modpath.. "/gem.lua"))() +assert(loadfile(modpath.. "/crystal.lua"))() \ No newline at end of file diff --git a/magic_axe.lua b/magic_axe.lua new file mode 100644 index 0000000..ba790b4 --- /dev/null +++ b/magic_axe.lua @@ -0,0 +1,29 @@ +minetest.register_tool("brewing:magic_axe", { + description = ("Магический Топор"), + inventory_image = "brewing_magic_axe.png", + wield_image = "brewing_magic_axe.png", + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level = 1, + groupcaps = { + choppy = { + times = {[1] = 2.00, [2] = 0.80, [3] = 0.40}, + uses = 40, + maxlevel = 3 + } + }, + damage_groups = {fleshy = 7} + }, + groups = {axe = 1}, + sound = {breaks = "default_tool_breaks"} +}) + + +minetest.register_craft({ + output = "brewing:magic_axe", + recipe = { + {"brewing:magic_gem", "brewing:magic_gem", ""}, + {"brewing:magic_gem", "default:stick", ""}, + {"", "default:stick", ""} + } +}) \ No newline at end of file diff --git a/magic_pick.lua b/magic_pick.lua new file mode 100644 index 0000000..b4c1507 --- /dev/null +++ b/magic_pick.lua @@ -0,0 +1,29 @@ +minetest.register_tool("brewing:magic_pick", { + description = ("Магическая Кирка"), + inventory_image = "brewing_magic_pick.png", + wield_image = "brewing_magic_pick.png", + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level = 3, + groupcaps={ + cracky = { + times = {[1] = 1.8, [2] = 0.8, [3] = 0.40}, + uses = 40, + maxlevel = 3 + } + }, + damage_groups = {fleshy = 6} + }, + groups = {pickaxe = 1}, + sound = {breaks = "default_tool_breaks"} +}) + + +minetest.register_craft({ + output = "brewing:magic_pick", + recipe = { + {"brewing:magic_gem", "brewing:magic_gem", "brewing:magic_gem"}, + {"", "default:stick", ""}, + {"", "default:stick", ""} + } +}) \ No newline at end of file diff --git a/magic_shovel.lua b/magic_shovel.lua new file mode 100644 index 0000000..670f1da --- /dev/null +++ b/magic_shovel.lua @@ -0,0 +1,29 @@ +minetest.register_tool("brewing:magic_shovel", { + description = ("Магическая Лопата"), + inventory_image = "brewing_magic_shovel.png", + wield_image = "brewing_magic_shovel.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} + }, + groups = {shovel = 1}, + sound = {breaks = "default_tool_breaks"} +}) + + +minetest.register_craft({ + output = "brewing:magic_shovel", + recipe = { + {"", "brewing:magic_gem", ""}, + {"", "default:stick", ""}, + {"", "default:stick", ""} + } +}) diff --git a/magic_sword.lua b/magic_sword.lua new file mode 100644 index 0000000..351bcf8 --- /dev/null +++ b/magic_sword.lua @@ -0,0 +1,29 @@ +minetest.register_tool("brewing:magic_sword", { + description = ("Магический Меч"), + inventory_image = "brewing_magic_sword.png", + wield_image = "brewing_magic_sword.png", + tool_capabilities = { + full_punch_interval = 0.6, + max_drop_level = 1, + groupcaps = { + snappy = { + times = {[1] = 1.70, [2] = 0.70, [3] = 0.25}, + uses = 50, + maxlevel = 3 + } + }, + damage_groups = {fleshy = 10} + }, + groups = {sword = 1}, + sound = {breaks = "default_tool_breaks"} +}) + + +minetest.register_craft({ + output = "brewing:magic_sword", + recipe = { + {"", "brewing:magic_gem", ""}, + {"", "brewing:magic_gem", ""}, + {"", "default:stick", ""} + } +}) \ No newline at end of file