diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-07-14 20:39:33 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-07-14 20:39:33 +0300 |
commit | 97c67d3433f3a519f490aae79e6c6b6d3a9e70f6 (patch) | |
tree | ff0a3d7dd47ac321ab5cdc97dca87b13386870f8 | |
parent | 6b6879245d3f58c65955fa56b42ffdb397d1fe19 (diff) |
thresher
-rw-r--r-- | technic/machines/MV/init.lua | 2 | ||||
-rw-r--r-- | technic/machines/MV/thresher.lua | 16 | ||||
-rw-r--r-- | technic/machines/register/init.lua | 3 | ||||
-rw-r--r-- | technic/machines/register/thresher.lua | 8 | ||||
-rw-r--r-- | technic/machines/register/thresher_recipes.lua | 49 | ||||
-rw-r--r-- | technic/textures/technic_mv_thresher_bottom.png | bin | 0 -> 738 bytes | |||
-rw-r--r-- | technic/textures/technic_mv_thresher_front.png | bin | 0 -> 2787 bytes | |||
-rw-r--r-- | technic/textures/technic_mv_thresher_front_active.png | bin | 0 -> 2783 bytes | |||
-rw-r--r-- | technic/textures/technic_mv_thresher_side.png | bin | 0 -> 2629 bytes | |||
-rw-r--r-- | technic/textures/technic_mv_thresher_top.png | bin | 0 -> 2228 bytes |
10 files changed, 78 insertions, 0 deletions
diff --git a/technic/machines/MV/init.lua b/technic/machines/MV/init.lua index 66e2d45..804f81c 100644 --- a/technic/machines/MV/init.lua +++ b/technic/machines/MV/init.lua @@ -24,6 +24,8 @@ dofile(path.."/centrifuge.lua") dofile(path.."/tool_workshop.lua") +dofile(path.."/thresher.lua") + -- The power radiator supplies appliances with inductive coupled power: -- Lighting and associated textures is taken directly from VanessaE's homedecor and made electric. -- This is currently useless, slow, and mostly copied diff --git a/technic/machines/MV/thresher.lua b/technic/machines/MV/thresher.lua new file mode 100644 index 0000000..9488701 --- /dev/null +++ b/technic/machines/MV/thresher.lua @@ -0,0 +1,16 @@ +minetest.register_craft({ + output = "technic:mv_thresher", + recipe = { + {"technic:motor", "technic:copper_plate", "technic:diamond_drill_head"}, + {"default:copper_ingot", "technic:machine_casing", "default:copper_ingot" }, + {"pipeworks:one_way_tube", "technic:mv_cable", "pipeworks:mese_filter" }, + } +}) + +technic.register_thresher({ + tier = "MV", + demand = {700, 500, 350}, + speed = 2, + upgrade = 1, + tube = 1, +}) diff --git a/technic/machines/register/init.lua b/technic/machines/register/init.lua index 1667d75..3356fe5 100644 --- a/technic/machines/register/init.lua +++ b/technic/machines/register/init.lua @@ -20,6 +20,7 @@ dofile(path.."/grinder_recipes.lua") dofile(path.."/extractor_recipes.lua") dofile(path.."/compressor_recipes.lua") dofile(path.."/centrifuge_recipes.lua") +dofile(path.."/thresher_recipes.lua") -- Multi-Machine Recipes dofile(path.."/grindings.lua") @@ -31,3 +32,5 @@ dofile(path.."/grinder.lua") dofile(path.."/extractor.lua") dofile(path.."/compressor.lua") dofile(path.."/centrifuge.lua") + +dofile(path.."/thresher.lua") diff --git a/technic/machines/register/thresher.lua b/technic/machines/register/thresher.lua new file mode 100644 index 0000000..62f2404 --- /dev/null +++ b/technic/machines/register/thresher.lua @@ -0,0 +1,8 @@ +local S = technic.getter + +function technic.register_thresher(data) + data.typename = "threshing" + data.machine_name = "thresher" + data.machine_desc = S("%s Thresher") + technic.register_base_machine(data) +end diff --git a/technic/machines/register/thresher_recipes.lua b/technic/machines/register/thresher_recipes.lua new file mode 100644 index 0000000..c6ce246 --- /dev/null +++ b/technic/machines/register/thresher_recipes.lua @@ -0,0 +1,49 @@ +-- the thresher should take the agricultural functions away from the centrifuge + +local S = technic.getter + +technic.register_recipe_type("threshing", { + description = S("Threshing"), + output_size = 2, +}) + +function technic.register_threshing_recipe(data) + data.time = data.time or 2 + technic.register_recipe("threshing", data) +end + +local recipes = { +} + +if minetest.get_modpath("bushes_classic") then + for _, berry in ipairs({ "blackberry", "blueberry", "gooseberry", "raspberry", "strawberry" }) do + table.insert(recipes, { "bushes:"..berry.."_bush", "default:stick 20", "bushes:"..berry.." 4" }) + end +end + +if minetest.get_modpath("farming") then + + table.insert(recipes, {"farming:hemp_leaf", "farming:hemp_fibre"}) + + if minetest.get_modpath("cottages") then + -- work as a mechanized threshing floor + table.insert(recipes, { "farming:wheat", "farming:seed_wheat", "cottages:straw_mat" }) + table.insert(recipes, { "farming:barley", "farming:seed_barley", "cottages:straw_mat" }) + else + -- work in a less fancy and less efficient manner + table.insert(recipes, { "farming:wheat 4", "farming:seed_wheat 3", "default:dry_shrub 1" }) + table.insert(recipes, { "farming:barley 4", "farming:seed_barley 3", "default:dry_shrub 1" }) + end +end + +-- using centfuge as a sorting machine for grass seeds +table.insert(recipes, { "default:grass_1 99", "default:dry_grass_1 80", "default:dry_shrub 7", "default:junglegrass 12" }) +if minetest.get_modpath("ethereal") then + table.insert(recipes, { "default:junglegrass 99", "ethereal:dry_shrub 10", "ethereal:crystalgrass 5", "ethereal:snowygrass 5" }) + table.insert(recipes, { "default:dry_grass_1 99", "ethereal:fern 5" }) +end + + +for _, data in pairs(recipes) do + technic.register_threshing_recipe({ input = { data[1] }, output = { data[2], data[3], data[4] } }) +end diff --git a/technic/textures/technic_mv_thresher_bottom.png b/technic/textures/technic_mv_thresher_bottom.png Binary files differnew file mode 100644 index 0000000..2c0aaee --- /dev/null +++ b/technic/textures/technic_mv_thresher_bottom.png diff --git a/technic/textures/technic_mv_thresher_front.png b/technic/textures/technic_mv_thresher_front.png Binary files differnew file mode 100644 index 0000000..71e1048 --- /dev/null +++ b/technic/textures/technic_mv_thresher_front.png diff --git a/technic/textures/technic_mv_thresher_front_active.png b/technic/textures/technic_mv_thresher_front_active.png Binary files differnew file mode 100644 index 0000000..224afdb --- /dev/null +++ b/technic/textures/technic_mv_thresher_front_active.png diff --git a/technic/textures/technic_mv_thresher_side.png b/technic/textures/technic_mv_thresher_side.png Binary files differnew file mode 100644 index 0000000..821ee58 --- /dev/null +++ b/technic/textures/technic_mv_thresher_side.png diff --git a/technic/textures/technic_mv_thresher_top.png b/technic/textures/technic_mv_thresher_top.png Binary files differnew file mode 100644 index 0000000..7fa4553 --- /dev/null +++ b/technic/textures/technic_mv_thresher_top.png |