Initial version of ages mods. Stone age has been moved into ages mod pack.

master
SFENCE 2020-08-31 21:01:47 +02:00
commit f141ab8ef8
22 changed files with 692 additions and 0 deletions

6
README.md Normal file
View File

@ -0,0 +1,6 @@
Ages
=====================
Ages mod pack for Minetest (https://minetest.net/)
Check submodules for get license.

5
modpack.conf Normal file
View File

@ -0,0 +1,5 @@
description = Package of mods for ages like stone age, copper age, brozne age, iron age, steel age, modern age etc.
author = SFENCE
title = Ages
release = 1
name = ages

38
stone_age/PLAN Normal file
View File

@ -0,0 +1,38 @@
PLAN for stone age
Tools
Chip tools
stone_age:chip_stone_hard - stone for chipping another stone
stone_age:chip_stone_soft - stone for chipping another stone
Scrapers
stone_age:scraper_flint - hand axe from flint
stone_age:scraper_soft_stone - hand axe from soft stone
Axes
stone_age:hand_axe_flint - hand axe from flint
stone_age:hand_axe_soft_stone - hand axe from soft stone
Shovels
stone_age:shovel_wood - wooden shovel
Spikes
stone_age:spike_soft_stone_medium
stone_age:spike_flint_medium
stone_age:spike_flint_precise
Saws
stone_age:saw_small_flint - saw from flints
Sickles
stone_age:sickle_flint
Bowls
stone_age:bowl_wood
Make fire tools
Hand Weapons
stone_age:lance_wood - wooden lance
Shot Weapons

98
stone_age/crafting.lua Normal file
View File

@ -0,0 +1,98 @@
local S = stone_age.S
-- craft recipes
minetest.register_craft({
output = "stone_age:chip_stone_hard",
recipe = {
{"default:stone_hard"},
},
})
minetest.register_craft({
output = "stone_age:chip_stone_soft",
recipe = {
{"default:stone_soft"},
},
})
minetest.register_craft({
output = "stone_age:flat_stone_desk",
recipe = {
{"default:stone_flat"},
},
})
minetest.register_craft({
output = "default:stone_flat",
recipe = {
{"stone_age:flat_stone_desk"},
},
})
-- Roughly Chipping recipes
recipes.register_recipe({
name = S("Break flint"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=20,level=1,wear=1}}},
tool_in_order = false,
output = {"stone_age:flint_fragment 2","stone_age:flint_shard 6"},
input = {{"default:flint"}},
})
recipes.register_recipe({
name = S("Flint scraper"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=15,level=1,wear=1}}},
tool_in_order = false,
output = {"stone_age:scraper_flint","stone_age:flint_fragment 1","stone_age:flint_shard 5"},
input = {{"default:flint"}},
})
recipes.register_recipe({
name = S("Flint hand axe"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=10,level=1,wear=1}}},
tool_in_order = false,
output = {"stone_age:hand_axe_flint","stone_age:flint_fragment 1","stone_age:flint_shard 3"},
input = {{"default:flint"}},
})
recipes.register_recipe({
name = S("Flint chisel"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=15,level=1,wear=1}}},
tool_in_order = false,
output = {"stone_age:chisel_flint","stone_age:flint_fragment 2","stone_age:flint_shard 4"},
input = {{"default:flint"}},
})
recipes.register_recipe({
name = S("Break soft stone"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=40,level=2,wear=1}}},
tool_in_order = false,
output = {"stone_age:stone_soft_fragment 8"},
input = {{"default:stone_soft"}},
})
recipes.register_recipe({
name = S("Soft stone scraper"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=30,level=2,wear=1}}},
tool_in_order = false,
output = {"stone_age:scraper_soft_stone","stone_age:stone_soft_fragment 6"},
input = {{"default:stone_soft"}},
})
recipes.register_recipe({
name = S("Soft stone hand axe"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=40,level=2,wear=1}}},
tool_in_order = false,
output = {"stone_age:hand_axe_soft_stone","stone_age:stone_soft_fragment 4"},
input = {{"default:stone_soft"}},
})
recipes.register_recipe({
name = S("Soft stone chisel"),
category = "rough_stone_crafts",
manual = {{rough_chip_tool = {points=30,level=2,wear=1}}},
tool_in_order = false,
output = {"stone_age:chisel_soft_stone","stone_age:stone_soft_fragment 6"},
input = {{"default:stone_soft"}},
})

2
stone_age/depends.txt Normal file
View File

@ -0,0 +1,2 @@
default
recipes

24
stone_age/init.lua Normal file
View File

@ -0,0 +1,24 @@
-- Mods which include stone age items
-- Definitions made by this mod that other mods can use too
stone_age = {}
-- localize support via initlib
stone_age.S = function(s) return s end
if minetest.get_modpath("intllib") and intllib then
stone_age.S = intllib.Getter()
end
-- Load files
local default_path = minetest.get_modpath("stone_age")
dofile(default_path.."/nodes.lua")
dofile(default_path.."/tools.lua")
-- dofile(default_path.."/craftitems.lua")
dofile(default_path.."/items.lua")
dofile(default_path.."/crafting.lua")
-- dofile(default_path.."/mapgen.lua")
stone_age.S = nil

109
stone_age/items.lua Normal file
View File

@ -0,0 +1,109 @@
-- items for stone age
local S = stone_age.S
--
-- work with stones
--
minetest.register_craftitem("stone_age:flint_fragment", {
description = S("Flint fragment"),
inventory_image = "stone_age_flint_fragment.png",
groups = {},
})
minetest.register_craftitem("stone_age:flint_shard", {
description = S("Flint shard (sharp)"),
inventory_image = "stone_age_flint_shard.png",
groups = {},
})
minetest.register_craftitem("stone_age:stone_soft_fragment", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_stone_soft_fragment.png",
groups = {},
})
minetest.register_craftitem("stone_age:axe_head_soft_stone", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_axe_head_soft_stone.png",
groups = {},
})
minetest.register_craftitem("stone_age:axe_head_soft_stone_sharpen", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_axe_head_soft_stone.png",
groups = {},
})
minetest.register_craftitem("stone_age:axe_head_soft_stone_with_aperture", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_axe_head_soft_stone.png",
groups = {},
})
minetest.register_craftitem("stone_age:axe_head_soft_stone_sharpen_with_aperture", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_axe_head_soft_stone.png",
groups = {},
})
minetest.register_craftitem("stone_age:stone_soft_hammer_head_soft_stone", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_hammer_head_soft_stone.png",
groups = {},
})
minetest.register_craftitem("stone_age:hammer_head_soft_stone_with_aperture", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_hammer_head_soft_stone_with_aperture.png",
groups = {},
})
minetest.register_craftitem("stone_age:chisel_flint", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_chisel_flint.png",
groups = {},
})
minetest.register_craftitem("stone_age:chisel_soft_stone", {
description = S("Soft stone fragment"),
inventory_image = "stone_age_chisel_soft_stone.png",
groups = {},
})
--
-- work with wood
--
minetest.register_craftitem("stone_age:handle_wood", {
description = S("Wood handle"),
inventory_image = "stone_age_handle_wood.png",
groups = {},
})
minetest.register_craftitem("stone_age:handle_wood_thick", {
description = S("Wood handle"),
inventory_image = "stone_age_handle_wood_thick.png",
groups = {},
})
minetest.register_craftitem("stone_age:handle_wood_thick_with_aperture", {
description = S("Wood handle with aperture"),
inventory_image = "stone_age_handle_wood_thick_with_aperture.png",
groups = {},
})
--
-- for fire
--
minetest.register_craftitem("stone_age:tinder_spark", {
description = S("High flammable tinder"),
inventory_image = "stone_age_tinder_spark.png",
groups = {tinder = 1, flammable = 5},
})
--
--
--

146
stone_age/nodes.lua Normal file
View File

@ -0,0 +1,146 @@
-- nodes for stone age
local S = stone_age.S
-- fromspec definitions
function stone_age.get_flat_stone_desk_formspec(recipes, selected)
local variants = "";
local separator = "";
for key, recipe in pairs(recipes) do
variants = variants..separator..recipe.name;
separator = ",";
end
return "size[8,9;]"..
"list[context;input;2,1;1,1;]"..
"list[context;output;5,1;2,2;]"..
"list[current_player;main;0,4.85;8,1;]"..
"list[current_player;main;0,6.08;8,3;8]"..
"listring[context;input]"..
"listring[current_player;main]"..
"listring[context;output]"..
"listring[current_player;main]"..
"textlist[4,3;4,1;output_select;"..variants..";"..tonumber(selected)..";no]"..
"";
end
-- node registration
minetest.register_node("stone_age:flat_stone_desk",{
description = S("Stone desk"),
groups = {oddly_breakable_by_hand = 1},
drawtype = "nodebox",
is_ground_content = false,
tiles = {
"stone_age_flat_stone_desk_top.png", "stone_age_flat_stone_desk_top.png",
"stone_age_flat_stone_desk_side.png", "stone_age_flat_stone_desk_side.png",
"stone_age_flat_stone_desk_side.png", "stone_age_flat_stone_desk_side.png",
},
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
on_construct = function(pos)
local meta = minetest.get_meta(pos);
meta:set_string("infotext", S("Flat stone desk"))
local inv = meta:get_inventory();
inv:set_size("input", 1);
inv:set_width("input", 1);
inv:set_size("output", 4);
inv:set_width("output", 2);
meta:set_string("formspec", stone_age.get_flat_stone_desk_formspec({}, 1));
meta:set_string("progress", "");
meta:set_string("last_recipe", "");
meta:set_int("fromspec_recipe_select", 1);
end,
can_dig = function(pos, player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory();
if ( not(inv:is_empty("input"))
or not(inv:is_empty("output"))
) then
return false;
end
return true;
end,
on_punch = function(pos, node, puncher)
local settings = {
input_list = "input",
output_list = "output",
recipe_categories = {"rough_stone_crafts"},
};
return recipes.work_on_push(pos, node, puncher, settings);
end,
on_receive_fields = function(pos, formname, fields, sender)
local settings = {
input_list = "input",
output_list = "output",
recipe_categories = {"rough_stone_crafts"},
selection_field_name = "output_select",
formspec_function = stone_age.get_flat_stone_desk_formspec,
};
minetest.log("warning", "on_receive_fields "..dump(fields))
recipes.on_receive_fields(pos, fields, settings, 4)
end,
on_metadata_inventory_move = function(pos)
local settings = {
input_list = "input",
output_list = "output",
recipe_categories = {"rough_stone_crafts"},
selection_field_name = "output_select",
formspec_function = stone_age.get_flat_stone_desk_formspec,
};
minetest.log("warning", "on_receive_fields "..dump(fields))
recipes.on_inventory_update(pos, settings, 4)
end,
on_metadata_inventory_put = function(pos)
local settings = {
input_list = "input",
output_list = "output",
recipe_categories = {"rough_stone_crafts"},
selection_field_name = "output_select",
formspec_function = stone_age.get_flat_stone_desk_formspec,
};
minetest.log("warning", "on_receive_fields "..dump(fields))
recipes.on_inventory_update(pos, settings, 4)
end,
on_metadata_inventory_take = function(pos)
local settings = {
input_list = "input",
output_list = "output",
recipe_categories = {"rough_stone_crafts"},
selection_field_name = "output_select",
formspec_function = stone_age.get_flat_stone_desk_formspec,
};
minetest.log("warning", "on_receive_fields "..dump(fields))
recipes.on_inventory_update(pos, settings, 4)
end,
})
minetest.register_node("stone_age:flat_stone_table",{
description = S("Stone table"),
groups = {cracky=2},
drawtype = "nodebox",
is_ground_content = false,
tiles = {
"stone_age_flat_stone_table_top.png", "stone_age_flat_stone_table_bottom.png",
"stone_age_flat_stone_table_side.png", "stone_age_flat_stone_table_side.png",
"stone_age_flat_stone_table_side.png", "stone_age_flat_stone_table_side.png",
},
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

264
stone_age/tools.lua Normal file
View File

@ -0,0 +1,264 @@
local S = stone_age.S
-- stone age tools
--
-- chip tool
--
minetest.register_tool("stone_age:chip_stone_hard", {
description = S("Hard chip stone"),
inventory_image = "default_stone_hard.png",
tool_capabilities = {
full_punch_interval = 1.7,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=15.2, [3]=2.60}, uses=12, maxlevel=1},
rough_chip = {times={[2]=15.2, [3]=2.60}, uses=50, maxlevel=2},
},
damage_groups = {fleshy=1},
},
sound = {breaks = "default_tool_breaks"},
groups = {chip_stone = 1, disable_repair = 1,
rough_chip_tool = 2, rough_chip_tool_uses = 50,
rough_chip_tool_maxlevel = 2},
})
minetest.register_tool("stone_age:chip_stone_soft", {
description = S("Soft chip stone"),
inventory_image = "default_stone_soft.png",
tool_capabilities = {
full_punch_interval = 1.7,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=15.2, [3]=2.60}, uses=12, maxlevel=1},
},
damage_groups = {fleshy=1},
},
sound = {breaks = "default_tool_breaks"},
groups = {chip_stone = 1, disable_repair = 1,
rough_chip_tool = 1, rough_chip_tool_uses = 30,
rough_chip_tool_maxlevel = 1}
})
--
-- Scrapers
--
minetest.register_tool("stone_age:scraper_flint", {
description = S("Hand axe"),
inventory_image = "stone_age_scraper_flint.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=3.2, [3]=0.80}, uses=40, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1, disable_repair = 1}
})
minetest.register_tool("stone_age:scraper_soft_stone", {
description = S("Hand axe"),
inventory_image = "stone_age_scraper_soft_stone.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=7.2, [3]=1.50}, uses=80, maxlevel=2},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1, disable_repair = 1}
})
--
-- Axe
--
minetest.register_tool("stone_age:hand_axe_flint", {
description = S("Hand axe"),
inventory_image = "stone_age_hand_axe.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=12.4, [3]=2.30}, uses=10, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1, disable_repair = 1}
})
minetest.register_tool("stone_age:hand_axe_soft_stone", {
description = S("Hand axe"),
inventory_image = "stone_age_hand_axe.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=18.2, [3]=3.60}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1, disable_repair = 1}
})
--
-- Shovel
--
minetest.register_tool("stone_age:shovel_wood", {
description = S("Wooden shovel"),
inventory_image = "stone_age_shovel_wood.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
crumbly = {times={[1]=30.0,[2]=16.0, [3]=6.00}, uses=10, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1, disable_repair = 1}
})
--
-- Spike
--
minetest.register_tool("stone_age:spike_soft_stone_medium", {
description = S("Hand axe"),
inventory_image = "stone_age_hand_axe.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=18.2, [3]=3.60}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {spike = 1, disable_repair = 1}
})
minetest.register_tool("stone_age:spike_flint_medium", {
description = S("Hand axe"),
inventory_image = "stone_age_hand_axe.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=18.2, [3]=3.60}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {spike = 1, disable_repair = 1}
})
minetest.register_tool("stone_age:spike_flint_precise", {
description = S("Hand axe"),
inventory_image = "stone_age_hand_axe.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=18.2, [3]=3.60}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {spike = 1, disable_repair = 1}
})
--
-- saw
--
minetest.register_tool("stone_age:saw_small_flint", {
description = S("Hand axe"),
inventory_image = "stone_age_hand_axe_flint.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=18.2, [3]=3.60}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {saw = 1, disable_repair = 1}
})
--
-- sickle
--
minetest.register_tool("stone_age:sickle_flint", {
description = S("Flint sickle"),
inventory_image = "stone_age_hand_axe.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=18.2, [3]=3.60}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1, disable_repair = 1}
})
--
-- bowl
--
minetest.register_tool("stone_age:bowl_wood", {
description = S("Wooden bowl"),
inventory_image = "stone_age_bowl_wood.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
crumply = {times={[2]=25.0, [3]=5.00}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {bowl = 1, disable_repair = 1}
})
--
-- make fire tools
--
--
-- weapons normal
--
minetest.register_tool("stone_age:lance_wood", {
description = S("Wooden lance"),
inventory_image = "stone_age_lance_wood.png",
tool_capabilities = {
full_punch_interval = 2.0,
max_drop_level=0,
groupcaps={
choppy = {times={[2]=18.2, [3]=3.60}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {lance = 1, disable_repair = 1}
})
--
-- weapons fire
--