summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bees/depends.txt1
-rw-r--r--bees/init.lua154
-rw-r--r--bees/readme.txt2
-rw-r--r--coloredwood/init.lua13
-rw-r--r--digidisplay/init.lua2
-rw-r--r--farming/api.txt5
-rw-r--r--farming/crops/barley.lua9
-rw-r--r--farming/crops/beans.lua9
-rw-r--r--farming/crops/beetroot.lua9
-rw-r--r--farming/crops/blueberry.lua9
-rw-r--r--farming/crops/carrot.lua9
-rw-r--r--farming/crops/chili.lua9
-rw-r--r--farming/crops/cocoa.lua9
-rw-r--r--farming/crops/coffee.lua9
-rw-r--r--farming/crops/corn.lua9
-rw-r--r--farming/crops/cotton.lua9
-rw-r--r--farming/crops/cucumber.lua9
-rw-r--r--farming/crops/garlic.lua13
-rw-r--r--farming/crops/grapes.lua9
-rw-r--r--farming/crops/hemp.lua9
-rw-r--r--farming/crops/melon.lua9
-rw-r--r--farming/crops/onion.lua9
-rw-r--r--farming/crops/peas.lua9
-rw-r--r--farming/crops/pepper.lua9
-rw-r--r--farming/crops/pineapple.lua9
-rw-r--r--farming/crops/potato.lua9
-rw-r--r--farming/crops/pumpkin.lua14
-rw-r--r--farming/crops/raspberry.lua9
-rw-r--r--farming/crops/rhubarb.lua9
-rw-r--r--farming/crops/tomato.lua9
-rw-r--r--farming/crops/wheat.lua9
-rw-r--r--farming/init.lua25
-rw-r--r--moreblocks/crafting.lua18
-rw-r--r--technic/machines/register/compressor_recipes.lua19
-rw-r--r--technic/machines/register/extractor_recipes.lua20
-rw-r--r--technic/machines/register/grinder_recipes.lua22
-rw-r--r--travelnet/init.lua5
-rw-r--r--unifieddyes/init.lua17
38 files changed, 437 insertions, 100 deletions
diff --git a/bees/depends.txt b/bees/depends.txt
index 9207dab..53a9e75 100644
--- a/bees/depends.txt
+++ b/bees/depends.txt
@@ -1,2 +1,3 @@
default
intllib?
+lucky_block?
diff --git a/bees/init.lua b/bees/init.lua
index 95ff21e..79be907 100644
--- a/bees/init.lua
+++ b/bees/init.lua
@@ -5,7 +5,7 @@
-- Intllib support
local S
-if intllib then
+if minetest.global_exists('intllib') then
S = intllib.Getter()
else
S = function(s) return s end
@@ -14,6 +14,9 @@ end
-- FUNCTIONS
+local floor = math.floor
+local random = math.random
+
local hive_wild = function(pos, grafting)
local spos = pos.x .. ',' .. pos.y .. ',' ..pos.z
@@ -44,9 +47,9 @@ end
local polinate_flower = function(pos, flower)
local spawn_pos = {
- x = pos.x + math.random(-3, 3),
- y = pos.y + math.random(-3, 3),
- z = pos.z + math.random(-3, 3)
+ x = pos.x + random(-3, 3),
+ y = pos.y + random(-3, 3),
+ z = pos.z + random(-3, 3)
}
local floor_pos = {x = spawn_pos.x, y = spawn_pos.y - 1, z = spawn_pos.z}
local spawn = minetest.get_node(spawn_pos).name
@@ -121,22 +124,22 @@ minetest.register_node('bees:extractor', {
inv:remove_item('frames_filled', 'bees:frame_full')
local p = {
- x = pos.x + math.random() - 0.5,
- y = pos.y + math.random() - 0.5,
- z = pos.z + math.random() - 0.5
+ x = pos.x + random() - 0.5,
+ y = pos.y + random() - 0.5,
+ z = pos.z + random() - 0.5
}
--wax flying all over the place
minetest.add_particle({
pos = {x = pos.x, y = pos.y, z = pos.z},
vel = {
- x = math.random(-1, 1),
- y = math.random(4),
- z = math.random(-1, 1)
+ x = random(-1, 1),
+ y = random(4),
+ z = random(-1, 1)
},
acc = {x = 0, y = -6, z = 0},
expirationtime = 2,
- size = math.random(1, 3),
+ size = random(1, 3),
collisiondetection = false,
texture = 'bees_wax_particle.png',
})
@@ -253,7 +256,12 @@ minetest.register_node('bees:bees', {
damage_per_second = 1,
walkable = false,
buildable_to = true,
- pointable = false,
+ selection_box = {
+ type = 'fixed',
+ fixed = {
+ {-0.3, -0.4, -0.3, 0.3, 0.4, 0.3},
+ }
+ },
on_punch = function(pos, node, puncher)
@@ -312,7 +320,7 @@ minetest.register_node('bees:hive_wild', {
-- Requires 2 or more flowers to make honey
if #flowers < 3 then return end
- local flower = flowers[math.random(#flowers)]
+ local flower = flowers[random(#flowers)]
polinate_flower(flower, minetest.get_node(flower).name)
@@ -342,13 +350,13 @@ minetest.register_node('bees:hive_wild', {
meta:set_int('agressive', 1)
- timer:start(100+math.random(100))
+ timer:start(100 + random(100))
inv:set_size('queen', 1)
inv:set_size('combs', 5)
inv:set_stack('queen', 1, 'bees:queen')
- for i = 1, math.random(3) do
+ for i = 1, random(3) do
inv:set_stack('combs', i, 'bees:honey_comb')
end
end,
@@ -539,7 +547,7 @@ minetest.register_node('bees:hive_artificial', {
if progress > 1000 then
- local flower = flowers[math.random(#flowers)]
+ local flower = flowers[random(#flowers)]
polinate_flower(flower, minetest.get_node(flower).name)
@@ -651,17 +659,17 @@ minetest.register_abm({
minetest.add_particle({
pos = {x = pos.x, y = pos.y, z = pos.z},
vel = {
- x = (math.random() - 0.5) * 5,
- y = (math.random() - 0.5) * 5,
- z = (math.random() - 0.5) * 5
+ x = (random() - 0.5) * 5,
+ y = (random() - 0.5) * 5,
+ z = (random() - 0.5) * 5
},
acc = {
- x = math.random() - 0.5,
- y = math.random() - 0.5,
- z = math.random() - 0.5
+ x = random() - 0.5,
+ y = random() - 0.5,
+ z = random() - 0.5
},
- expirationtime = math.random(2.5),
- size = math.random(3),
+ expirationtime = random(2.5),
+ size = random(3),
collisiondetection = true,
texture = 'bees_particle_bee.png',
})
@@ -682,8 +690,6 @@ minetest.register_abm({
})
-local floor = math.floor
-
-- spawn abm. This should be changed to a more realistic type of spawning
minetest.register_abm({
nodenames = {'group:leaves'},
@@ -720,9 +726,9 @@ minetest.register_abm({
action = function(pos, node, _, _)
local p = {
- x = pos.x + math.random(-5, 5),
- y = pos.y - math.random(0, 3),
- z = pos.z + math.random(-5, 5)
+ x = pos.x + random(-5, 5),
+ y = pos.y - random(0, 3),
+ z = pos.z + random(-5, 5)
}
if minetest.get_node(p).name == 'air' then
@@ -854,39 +860,38 @@ minetest.register_tool('bees:smoker', {
damage_groups = {fleshy = 2},
},
- on_use = function(tool, user, node)
+ on_use = function(itemstack, user, pointed_thing)
- if node then
+ if pointed_thing.type ~= "node" then
+ return
+ end
- local pos = node.under
+ local pos = pointed_thing.under
- if pos then
+ for i = 1, 6 do
- for i = 1, 6 do
+ minetest.add_particle({
+ pos = {
+ x = pos.x + random() - 0.5,
+ y = pos.y,
+ z = pos.z + random() - 0.5
+ },
+ vel = {x = 0, y = 0.5 + random(), z = 0},
+ acc = {x = 0, y = 0, z = 0},
+ expirationtime = 2 + random(2.5),
+ size = random(3),
+ collisiondetection = false,
+ texture = 'bees_smoke_particle.png',
+ })
+ end
- minetest.add_particle({
- pos = {
- x = pos.x + math.random() - 0.5,
- y = pos.y,
- z = pos.z + math.random() - 0.5
- },
- vel = {x = 0, y = 0.5 + math.random(), z = 0},
- acc = {x = 0, y = 0, z = 0},
- expirationtime = 2 + math.random(2.5),
- size = math.random(3),
- collisiondetection = false,
- texture = 'bees_smoke_particle.png',
- })
- end
+ itemstack:add_wear(65535 / 200)
- --tool:add_wear(2)
- local meta = minetest.get_meta(pos)
+ local meta = minetest.get_meta(pos)
- meta:set_int('agressive', 0)
+ meta:set_int('agressive', 0)
- return nil
- end
- end
+ return itemstack
end,
})
@@ -1083,7 +1088,7 @@ if minetest.get_modpath("pipeworks") then
if progress > 1000 then
- local flower = flowers[math.random(#flowers)]
+ local flower = flowers[random(#flowers)]
polinate_flower(flower, minetest.get_node(flower).name)
@@ -1195,4 +1200,43 @@ if minetest.get_modpath("pipeworks") then
end
+-- LUCKY BLOCKS
+
+if minetest.get_modpath('lucky_block') then
+
+ local add_bees = function(pos, player)
+
+ local objs = minetest.get_objects_inside_radius(pos, 15)
+ local violet = minetest.get_color_escape_sequence("#ff00ff")
+
+ minetest.chat_send_player(player:get_player_name(),
+ violet .. S("Bees! Bees for all!"))
+
+ for n = 1, #objs do
+
+ if objs[n]:is_player() then
+
+ local player_pos = objs[n]:get_pos()
+
+ player_pos.y = player_pos.y + 1
+
+ minetest.swap_node(player_pos, {name = 'bees:bees'})
+ end
+ end
+ end
+
+ lucky_block:add_blocks({
+ {'cus', add_bees},
+ {'dro', {'bees:grafting_tool'}, 1},
+ {'dro', {'bees:frame_empty'}, 2},
+ {'dro', {'bees:queen'}, 1},
+ {'nod', 'bees:extractor'},
+ {'dro', {'bees:frame_full'}, 2},
+ {'dro', {'bees:bottle_honey'}, 3},
+ {'dro', {'bees:smoker'}, 1},
+ {'nod', 'bees:hive_artificial'},
+ })
+end
+
+
print(S('[MOD] Bees Loaded!'))
diff --git a/bees/readme.txt b/bees/readme.txt
index 0920e0f..5c2636f 100644
--- a/bees/readme.txt
+++ b/bees/readme.txt
@@ -12,6 +12,8 @@ FEATURES
- Change compatibility abm to lbm
- Change from WTFPL to MIT license
- Make wild hive abm less intensive (thanks VanessaE)
+- Added 9x Lucky Blocks
+- Smokers have 200 uses before breaking
2.2.2
- Pipeworks compatibility (Industrial beehive)
diff --git a/coloredwood/init.lua b/coloredwood/init.lua
index 4a62435..6581e6a 100644
--- a/coloredwood/init.lua
+++ b/coloredwood/init.lua
@@ -164,7 +164,7 @@ default.register_fence("coloredwood:fence", {
palette = "unifieddyes_palette_extended.png",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
- material = "default:wood"
+ material = "coloredwood:wood_block"
})
minetest.override_item("default:fence_wood", {
@@ -196,4 +196,15 @@ unifieddyes.register_color_craft({
}
})
+unifieddyes.register_color_craft({
+ output = "coloredwood:fence",
+ palette = "extended",
+ type = "shapeless",
+ neutral_node = "coloredwood:fence",
+ recipe = {
+ "NEUTRAL_NODE",
+ "MAIN_DYE"
+ }
+})
+
print("[Colored Wood] Loaded!")
diff --git a/digidisplay/init.lua b/digidisplay/init.lua
index 5096950..606842a 100644
--- a/digidisplay/init.lua
+++ b/digidisplay/init.lua
@@ -1,7 +1,7 @@
local function removeEntity(pos)
local entitiesNearby = minetest.get_objects_inside_radius(pos,0.5)
for _,i in pairs(entitiesNearby) do
- if i:get_luaentity().name == "digidisplay:text" then
+ if i:get_luaentity() and i:get_luaentity().name == "digidisplay:text" then
i:remove()
end
end
diff --git a/farming/api.txt b/farming/api.txt
index eda1289..0098624 100644
--- a/farming/api.txt
+++ b/farming/api.txt
@@ -11,6 +11,11 @@ The farming API allows you to easily register plants and hoes.
`farming.registered_plants[name] = definition`
* Table of registered plants, indexed by plant name
+ 'crop' holds name of growing crop node minus _step-number at end
+ 'seed' has name of seed required to plant crop
+ 'minlight' min light level needed to grow
+ 'maxlight' max light level needed to grow
+ 'steps' number of steps crop has in growth cycle
### Hoe Definition
diff --git a/farming/crops/barley.lua b/farming/crops/barley.lua
index f509335..6f3cb97 100644
--- a/farming/crops/barley.lua
+++ b/farming/crops/barley.lua
@@ -103,3 +103,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:barley_7", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:barley"] = {
+ crop = "farming:barley",
+ seed = "farming:seed_barley",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/beans.lua b/farming/crops/beans.lua
index a575956..a75030a 100644
--- a/farming/crops/beans.lua
+++ b/farming/crops/beans.lua
@@ -224,6 +224,15 @@ crop_def.drop = {
}
minetest.register_node("farming:beanpole_5", table.copy(crop_def))
+-- add to registered_plants
+farming.registered_plants["farming:beans"] = {
+ crop = "farming:beanpole",
+ seed = "farming:beans",
+ minlight = 13,
+ maxlight = 15,
+ steps = 5
+}
+
-- wild green bean bush (this is what you find on the map)
minetest.register_node("farming:beanbush", {
drawtype = "plantlike",
diff --git a/farming/crops/beetroot.lua b/farming/crops/beetroot.lua
index e683a94..8f7069b 100644
--- a/farming/crops/beetroot.lua
+++ b/farming/crops/beetroot.lua
@@ -83,3 +83,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:beetroot_5", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:beetroot"] = {
+ crop = "farming:beetroot",
+ seed = "farming:beetroot",
+ minlight = 13,
+ maxlight = 15,
+ steps = 5
+}
diff --git a/farming/crops/blueberry.lua b/farming/crops/blueberry.lua
index 9a30387..64aee3e 100644
--- a/farming/crops/blueberry.lua
+++ b/farming/crops/blueberry.lua
@@ -83,3 +83,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:blueberry_4", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:blueberries"] = {
+ crop = "farming:blueberry",
+ seed = "farming:blueberries",
+ minlight = 13,
+ maxlight = 15,
+ steps = 4
+}
diff --git a/farming/crops/carrot.lua b/farming/crops/carrot.lua
index 0aefcfd..b9cf535 100644
--- a/farming/crops/carrot.lua
+++ b/farming/crops/carrot.lua
@@ -94,3 +94,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:carrot_8", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:carrot"] = {
+ crop = "farming:carrot",
+ seed = "farming:carrot",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/chili.lua b/farming/crops/chili.lua
index 9889162..429d256 100644
--- a/farming/crops/chili.lua
+++ b/farming/crops/chili.lua
@@ -90,3 +90,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:chili_8", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:chili_pepper"] = {
+ crop = "farming:chili",
+ seed = "farming:chili_pepper",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/cocoa.lua b/farming/crops/cocoa.lua
index ecefcea..7b5e8d4 100644
--- a/farming/crops/cocoa.lua
+++ b/farming/crops/cocoa.lua
@@ -165,6 +165,15 @@ crop_def.drop = {
}
minetest.register_node("farming:cocoa_4", table.copy(crop_def))
+-- add to registered_plants
+farming.registered_plants["farming:cocoa_beans"] = {
+ crop = "farming:cocoa",
+ seed = "farming:cocoa_beans",
+ minlight = 13,
+ maxlight = 15,
+ steps = 4
+}
+
-- add random cocoa pods to jungle tree's
minetest.register_on_generated(function(minp, maxp)
diff --git a/farming/crops/coffee.lua b/farming/crops/coffee.lua
index f98694b..c4528e2 100644
--- a/farming/crops/coffee.lua
+++ b/farming/crops/coffee.lua
@@ -86,3 +86,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:coffee_5", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:coffee"] = {
+ crop = "farming:coffee",
+ seed = "farming:coffee_beans",
+ minlight = 13,
+ maxlight = 15,
+ steps = 5
+}
diff --git a/farming/crops/corn.lua b/farming/crops/corn.lua
index 4847903..52f8b94 100644
--- a/farming/crops/corn.lua
+++ b/farming/crops/corn.lua
@@ -147,3 +147,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:corn_8", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:corn"] = {
+ crop = "farming:corn",
+ seed = "farming:corn",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/cotton.lua b/farming/crops/cotton.lua
index 7f893ec..24dc7bb 100644
--- a/farming/crops/cotton.lua
+++ b/farming/crops/cotton.lua
@@ -142,6 +142,15 @@ crop_def.drop = {
}
minetest.register_node("farming:cotton_8", table.copy(crop_def))
+-- add to registered_plants
+farming.registered_plants["farming:cotton"] = {
+ crop = "farming:cotton",
+ seed = "farming:seed_cotton",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
+
--[[ Cotton (example, is already registered in cotton.lua)
farming.register_plant("farming:cotton", {
description = "Cotton seed",
diff --git a/farming/crops/cucumber.lua b/farming/crops/cucumber.lua
index 4e6981c..d7178b8 100644
--- a/farming/crops/cucumber.lua
+++ b/farming/crops/cucumber.lua
@@ -54,3 +54,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:cucumber_4", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:cucumber"] = {
+ crop = "farming:cucumber",
+ seed = "farming:cucumber",
+ minlight = 13,
+ maxlight = 15,
+ steps = 4
+}
diff --git a/farming/crops/garlic.lua b/farming/crops/garlic.lua
index f2bb16d..09ab375 100644
--- a/farming/crops/garlic.lua
+++ b/farming/crops/garlic.lua
@@ -27,7 +27,7 @@ minetest.register_craftitem("farming:garlic", {
minetest.register_craft({
type = "shapeless",
- output = "farming:garlic_clove 9",
+ output = "farming:garlic_clove 8",
recipe = { "farming:garlic" }
})
@@ -35,7 +35,7 @@ minetest.register_craft({
output = "farming:garlic",
recipe = {
{"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"},
- {"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"},
+ {"farming:garlic_clove", "", "farming:garlic_clove"},
{"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"}
}
})
@@ -126,3 +126,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:garlic_5", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:garlic"] = {
+ crop = "farming:garlic",
+ seed = "farming:garlic_clove",
+ minlight = 13,
+ maxlight = 15,
+ steps = 5
+}
diff --git a/farming/crops/grapes.lua b/farming/crops/grapes.lua
index d8c6c3f..c341075 100644
--- a/farming/crops/grapes.lua
+++ b/farming/crops/grapes.lua
@@ -231,6 +231,15 @@ crop_def.drop = {
}
minetest.register_node("farming:grapes_8", table.copy(crop_def))
+-- add to registered_plants
+farming.registered_plants["farming:grapes"] = {
+ crop = "farming:grapes",
+ seed = "farming:grapes",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
+
-- wild grape vine (this is what you find on the map)
minetest.register_node("farming:grapebush", {
drawtype = "plantlike",
diff --git a/farming/crops/hemp.lua b/farming/crops/hemp.lua
index eb522a9..931a586 100644
--- a/farming/crops/hemp.lua
+++ b/farming/crops/hemp.lua
@@ -249,3 +249,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:hemp_8", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:hemp"] = {
+ crop = "farming:hemp",
+ seed = "farming:seed_hemp",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/melon.lua b/farming/crops/melon.lua
index 43c0809..06056a0 100644
--- a/farming/crops/melon.lua
+++ b/farming/crops/melon.lua
@@ -84,3 +84,12 @@ crop_def.groups = {
--crop_def.drop = "farming:melon_slice 9"
crop_def.drop = "farming:melon_8"
minetest.register_node("farming:melon_8", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:melon"] = {
+ crop = "farming:melon",
+ seed = "farming:melon_slice",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/onion.lua b/farming/crops/onion.lua
index d9268f8..f4291a5 100644
--- a/farming/crops/onion.lua
+++ b/farming/crops/onion.lua
@@ -66,3 +66,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:onion_5", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:onion"] = {
+ crop = "farming:onion",
+ seed = "farming:onion",
+ minlight = 13,
+ maxlight = 15,
+ steps = 5
+}
diff --git a/farming/crops/peas.lua b/farming/crops/peas.lua
index e50564e..93e9232 100644
--- a/farming/crops/peas.lua
+++ b/farming/crops/peas.lua
@@ -87,3 +87,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:pea_5", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:pea_pod"] = {
+ crop = "farming:pea",
+ seed = "farming:pea_pod",
+ minlight = 13,
+ maxlight = 15,
+ steps = 5
+}
diff --git a/farming/crops/pepper.lua b/farming/crops/pepper.lua
index 498556e..8f5e29e 100644
--- a/farming/crops/pepper.lua
+++ b/farming/crops/pepper.lua
@@ -104,3 +104,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:pepper_5", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:pepper"] = {
+ crop = "farming:pepper",
+ seed = "farming:peppercorn",
+ minlight = 13,
+ maxlight = 15,
+ steps = 5
+}
diff --git a/farming/crops/pineapple.lua b/farming/crops/pineapple.lua
index 3525136..8a60310 100644
--- a/farming/crops/pineapple.lua
+++ b/farming/crops/pineapple.lua
@@ -127,3 +127,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:pineapple_8", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:pineapple"] = {
+ crop = "farming:pineapple",
+ seed = "farming:pineapple_top",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/potato.lua b/farming/crops/potato.lua
index a1512c2..1547fc0 100644
--- a/farming/crops/potato.lua
+++ b/farming/crops/potato.lua
@@ -92,3 +92,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:potato_4", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:potato"] = {
+ crop = "farming:potato",
+ seed = "farming:potato",
+ minlight = 13,
+ maxlight = 15,
+ steps = 4
+}
diff --git a/farming/crops/pumpkin.lua b/farming/crops/pumpkin.lua
index c864d55..c362449 100644
--- a/farming/crops/pumpkin.lua
+++ b/farming/crops/pumpkin.lua
@@ -202,12 +202,16 @@ minetest.register_node("farming:pumpkin_8", {
food_pumpkin = 1, choppy = 1, oddly_breakable_by_hand = 1,
flammable = 2, plant = 1
},
--- drop = {
--- items = {
--- {items = {'farming:pumpkin_slice 9'}, rarity = 1},
--- }
--- },
sounds = default.node_sound_wood_defaults(),
})
minetest.register_alias("farming:pumpkin", "farming:pumpkin_8")
+
+-- add to registered_plants
+farming.registered_plants["farming:pumpkin"] = {
+ crop = "farming:pumpkin",
+ seed = "farming:pumpkin_slice",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/raspberry.lua b/farming/crops/raspberry.lua
index 713ea2f..4938658 100644
--- a/farming/crops/raspberry.lua
+++ b/farming/crops/raspberry.lua
@@ -67,3 +67,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:raspberry_4", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:raspberries"] = {
+ crop = "farming:raspberry",
+ seed = "farming:raspberries",
+ minlight = 13,
+ maxlight = 15,
+ steps = 4
+}
diff --git a/farming/crops/rhubarb.lua b/farming/crops/rhubarb.lua
index 90a2d8b..9471733 100644
--- a/farming/crops/rhubarb.lua
+++ b/farming/crops/rhubarb.lua
@@ -64,3 +64,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:rhubarb_3", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:rhubarb"] = {
+ crop = "farming:rhubarb",
+ seed = "farming:rhubarb",
+ minlight = 13,
+ maxlight = 15,
+ steps = 3
+}
diff --git a/farming/crops/tomato.lua b/farming/crops/tomato.lua
index 53012a8..bab0e47 100644
--- a/farming/crops/tomato.lua
+++ b/farming/crops/tomato.lua
@@ -77,3 +77,12 @@ crop_def.drop = {
}
}
minetest.register_node("farming:tomato_8", table.copy(crop_def))
+
+-- add to registered_plants
+farming.registered_plants["farming:tomato"] = {
+ crop = "farming:tomato",
+ seed = "farming:tomato",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
diff --git a/farming/crops/wheat.lua b/farming/crops/wheat.lua
index abf3ada..7c77d11 100644
--- a/farming/crops/wheat.lua
+++ b/farming/crops/wheat.lua
@@ -230,6 +230,15 @@ crop_def.drop = {
}
minetest.register_node("farming:wheat_8", table.copy(crop_def))
+-- add to registered_plants
+farming.registered_plants["farming:wheat"] = {
+ crop = "farming:wheat",
+ seed = "farming:seed_wheat",
+ minlight = 13,
+ maxlight = 15,
+ steps = 8
+}
+
-- fuels
minetest.register_craft({
type = "fuel",
diff --git a/farming/init.lua b/farming/init.lua
index 038ba6d..04fe300 100644
--- a/farming/init.lua
+++ b/farming/init.lua
@@ -5,13 +5,15 @@
auto-refill by crabman77
]]
-farming = {}
-farming.mod = "redo"
-farming.version = "20180617"
-farming.path = minetest.get_modpath("farming")
-farming.select = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
+farming = {
+ mod = "redo",
+ version = "20180929",
+ path = minetest.get_modpath("farming"),
+ select = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
+ },
+ registered_plants = {}
}
@@ -581,6 +583,15 @@ farming.register_plant = function(name, def)
})
end
+-- add to farming.registered_plants
+farming.registered_plants[mname .. ":" .. pname] = {
+ crop = mname .. ":" .. pname,
+ seed = mname .. ":seed_" .. pname,
+ steps = def.steps,
+ minlight = def.minlight,
+ maxlight = def.maxlight
+}
+print(dump(farming.registered_plants[mname .. ":" .. pname]))
-- Return info
return {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname}
end
diff --git a/moreblocks/crafting.lua b/moreblocks/crafting.lua
index 3fb9830..5b14602 100644
--- a/moreblocks/crafting.lua
+++ b/moreblocks/crafting.lua
@@ -36,6 +36,15 @@ minetest.register_craft({
})
minetest.register_craft({
+ output = "moreblocks:wood_tile_center 9",
+ recipe = {
+ {"group:wood", "group:wood", "group:wood"},
+ {"group:wood", "moreblocks:wood_tile", "group:wood"},
+ {"group:wood", "group:wood", "group:wood"},
+ }
+})
+
+minetest.register_craft({
output = "moreblocks:wood_tile 9",
recipe = {
{"group:wood", "group:wood", "group:wood"},
@@ -51,15 +60,6 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:wood_tile_center 9",
- recipe = {
- {"group:wood", "group:wood", "group:wood"},
- {"group:wood", "moreblocks:wood_tile", "group:wood"},
- {"group:wood", "group:wood", "group:wood"},
- }
-})
-
-minetest.register_craft({
output = "moreblocks:wood_tile_full 4",
recipe = {
{"moreblocks:wood_tile", "moreblocks:wood_tile"},
diff --git a/technic/machines/register/compressor_recipes.lua b/technic/machines/register/compressor_recipes.lua
index a625f1a..acb9eca 100644
--- a/technic/machines/register/compressor_recipes.lua
+++ b/technic/machines/register/compressor_recipes.lua
@@ -11,6 +11,8 @@ end
local recipes = {
{"default:snowblock", "default:ice"},
{"default:sand 2", "default:sandstone"},
+ {"default:desert_sand 2", "default:desert_sandstone"},
+ {"default:silver_sand 2", "default:silver_sandstone"},
{"default:desert_sand", "default:desert_stone"},
{"technic:mixed_metal_ingot", "technic:composite_plate"},
{"default:copper_ingot 5", "technic:copper_plate"},
@@ -21,10 +23,21 @@ local recipes = {
-- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner
minetest.clear_craft({
- output = "default:sandstone",
recipe = {
- {'group:sand', 'group:sand'},
- {'group:sand', 'group:sand'}
+ {"default:sand", "default:sand"},
+ {"default:sand", "default:sand"},
+ },
+})
+minetest.clear_craft({
+ recipe = {
+ {"default:desert_sand", "default:desert_sand"},
+ {"default:desert_sand", "default:desert_sand"},
+ },
+})
+minetest.clear_craft({
+ recipe = {
+ {"default:silver_sand", "default:silver_sand"},
+ {"default:silver_sand", "default:silver_sand"},
},
})
diff --git a/technic/machines/register/extractor_recipes.lua b/technic/machines/register/extractor_recipes.lua
index 1de0ba0..54baa61 100644
--- a/technic/machines/register/extractor_recipes.lua
+++ b/technic/machines/register/extractor_recipes.lua
@@ -36,13 +36,21 @@ if minetest.get_modpath("dye") then
-- overwrite the existing crafting recipes
local dyes = {"white", "red", "yellow", "blue", "violet", "orange"}
for _, color in ipairs(dyes) do
+ minetest.clear_craft({
+ type = "shapeless",
+ recipe = {"group:flower,color_"..color},
+ })
minetest.register_craft({
- type = "shapeless",
- output = "dye:"..color.." 1",
- recipe = {"group:flower,color_"..color},
+ type = "shapeless",
+ output = "dye:"..color.." 1",
+ recipe = {"group:flower,color_"..color},
})
-
end
+
+ minetest.clear_craft({
+ type = "shapeless",
+ recipe = {"group:coal"},
+ })
minetest.register_craft({
type = "shapeless",
output = "dye:black 1",
@@ -50,6 +58,10 @@ if minetest.get_modpath("dye") then
})
if unifieddyes then
+ minetest.clear_craft({
+ type = "shapeless",
+ recipe = {"default:cactus"},
+ })
minetest.register_craft({
type = "shapeless",
output = "dye:green 1",
diff --git a/technic/machines/register/grinder_recipes.lua b/technic/machines/register/grinder_recipes.lua
index 1f4047c..8c8e178 100644
--- a/technic/machines/register/grinder_recipes.lua
+++ b/technic/machines/register/grinder_recipes.lua
@@ -23,17 +23,29 @@ local recipes = {
{"technic:sulfur_lump", "technic:sulfur_dust 2"},
{"default:stone", "technic:stone_dust"},
{"default:sand", "technic:stone_dust"},
-
+
-- Other
- {"default:cobble", "default:gravel"},
- {"default:gravel", "default:sand"},
- {"default:sandstone", "default:sand 2"}, -- reverse recipe can be found in the compressor
+ {"default:cobble", "default:gravel"},
+ {"default:gravel", "default:sand"},
+ {"default:sandstone", "default:sand 2"}, -- reverse recipe can be found in the compressor
+ {"default:desert_sandstone", "default:desert_sand 2"}, -- reverse recipe can be found in the compressor
+ {"default:silver_sandstone", "default:silver_sand 2"}, -- reverse recipe can be found in the compressor
}
-- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
minetest.clear_craft({
recipe = {
- {'default:sandstone'}
+ {"default:sandstone"}
+ },
+})
+minetest.clear_craft({
+ recipe = {
+ {"default:desert_sandstone"}
+ },
+})
+minetest.clear_craft({
+ recipe = {
+ {"default:silver_sandstone"}
},
})
diff --git a/travelnet/init.lua b/travelnet/init.lua
index 1d4c643..a7aab85 100644
--- a/travelnet/init.lua
+++ b/travelnet/init.lua
@@ -144,8 +144,9 @@ travelnet.check_if_trying_to_dig = function( puncher, node )
-- show menu when in creative mode
if( creative
and creative.is_enabled_for(puncher:get_player_name())
- and (not(puncher:get_wielded_item())
- or puncher:get_wielded_item():get_name()~="default:pick_diamond")) then
+-- and (not(puncher:get_wielded_item())
+-- or puncher:get_wielded_item():get_name()~="default:pick_diamond")) then
+ ) then
return false;
end
local tool_capabilities = puncher:get_wielded_item():get_tool_capabilities();
diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua
index 838d67e..07d6864 100644
--- a/unifieddyes/init.lua
+++ b/unifieddyes/init.lua
@@ -172,20 +172,25 @@ minetest.register_on_placenode(
end
if not string.find(itemstack:to_string(), "palette_index") then
- local param2 = 0
+ local param2
local color = 0
- if def.palette == "unifieddyes_palette_extended.png" then
+ if def.palette == "unifieddyes_palette_extended.png"
+ and def.paramtype2 == "color" then
param2 = 240
color = 240
- elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then
+ elseif def.palette == "unifieddyes_palette_colorwallmounted.png"
+ and def.paramtype2 == "colorwallmounted" then
param2 = newnode.param2 % 8
- else -- it's a split palette
+ elseif string.find(def.palette, "unifieddyes_palette_")
+ and def.paramtype2 == "colorfacedir" then -- it's a split palette
param2 = newnode.param2 % 32
end
- minetest.swap_node(pos, {name = newnode.name, param2 = param2})
- minetest.get_meta(pos):set_int("palette_index", color)
+ if param2 then
+ minetest.swap_node(pos, {name = newnode.name, param2 = param2})
+ minetest.get_meta(pos):set_int("palette_index", color)
+ end
end
end
)