summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-06-17 19:34:42 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-06-17 19:34:42 -0400
commit3c3be04962a8c06ce9b5956e5799cdf3bbecf2aa (patch)
tree8578a1384609de55b26936b8be17891b9eae78cc
parent75e0a665ce2a45e1158a427d3f70f854f5f4d5a8 (diff)
downloaddreambuilder_modpack-3c3be04962a8c06ce9b5956e5799cdf3bbecf2aa.tar
dreambuilder_modpack-3c3be04962a8c06ce9b5956e5799cdf3bbecf2aa.tar.gz
dreambuilder_modpack-3c3be04962a8c06ce9b5956e5799cdf3bbecf2aa.tar.bz2
dreambuilder_modpack-3c3be04962a8c06ce9b5956e5799cdf3bbecf2aa.tar.xz
dreambuilder_modpack-3c3be04962a8c06ce9b5956e5799cdf3bbecf2aa.zip
update castle modpack, areas, blox, boost_cart, currency, farming redo, homedecor, and pipeworks
-rw-r--r--anvil/init.lua16
-rw-r--r--areas/init.lua2
-rw-r--r--areas/settings.lua6
-rw-r--r--blox/init.lua6
-rw-r--r--boost_cart/README.txt3
-rw-r--r--boost_cart/init.lua13
-rw-r--r--boost_cart/settingtypes.txt6
-rw-r--r--castle_masonry/init.lua2
-rw-r--r--castle_storage/mod.conf1
-rw-r--r--castle_weapons/crossbow.lua26
-rw-r--r--crafting_bench/init.lua2
-rw-r--r--currency/init.lua2
-rw-r--r--farming/grapes.lua81
-rw-r--r--homedecor/textures/homedecor_glowlight_cube_sides_overlay.pngbin208 -> 203 bytes
-rw-r--r--homedecor/textures/homedecor_glowlight_cube_tb_overlay.pngbin209 -> 204 bytes
-rw-r--r--homedecor/textures/homedecor_glowlight_thick_sides_overlay.pngbin317 -> 307 bytes
-rw-r--r--homedecor/textures/homedecor_glowlight_thin_sides_overlay.pngbin189 -> 187 bytes
-rw-r--r--homedecor/textures/homedecor_glowlight_top_overlay.pngbin417 -> 423 bytes
-rw-r--r--lavalamp/init.lua7
-rw-r--r--lavalamp/textures/lavalamp_lamp_anim.pngbin4804 -> 5640 bytes
-rw-r--r--lavalamp/textures/lavalamp_lamp_liquid.pngbin0 -> 412 bytes
-rw-r--r--pipeworks/routing_tubes.lua3
22 files changed, 118 insertions, 58 deletions
diff --git a/anvil/init.lua b/anvil/init.lua
index 910c187..acc4996 100644
--- a/anvil/init.lua
+++ b/anvil/init.lua
@@ -5,14 +5,18 @@
-- * the hammer gets dammaged a bit at each repair step
---------------------------------------------------------------------------------------
+anvil = {
+ setting = {
+ item_displacement = 7/16,
+ }
+}
+
minetest.register_alias("castle:anvil", "anvil:anvil")
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-local item_displacement = 7/16
-
-- the hammer for the anvil
minetest.register_tool("anvil:hammer", {
description = S("Steel blacksmithing hammer"),
@@ -69,7 +73,7 @@ minetest.register_entity("anvil:item",{
})
local remove_item = function(pos, node)
- local objs = minetest.get_objects_inside_radius({x = pos.x, y = pos.y + item_displacement, z = pos.z}, .5)
+ local objs = minetest.get_objects_inside_radius({x = pos.x, y = pos.y + anvil.setting.item_displacement, z = pos.z}, .5)
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "anvil:item" then
@@ -83,7 +87,7 @@ local update_item = function(pos, node)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if not inv:is_empty("input") then
- pos.y = pos.y + item_displacement
+ pos.y = pos.y + anvil.setting.item_displacement
tmp.nodename = node.name
tmp.texture = inv:get_stack("input", 1):get_name()
local e = minetest.add_entity(pos,"anvil:item")
@@ -283,7 +287,7 @@ minetest.register_node("anvil:anvil", {
minetest.chat_send_player( puncher:get_player_name(), S('Your @1 has been repaired successfully.', tool_desc))
return
else
- pos.y = pos.y + item_displacement
+ pos.y = pos.y + anvil_item_displacement
minetest.sound_play({name="anvil_clang"}, {pos=pos})
minetest.add_particlespawner({
amount = 10,
@@ -321,7 +325,7 @@ minetest.register_lbm({
nodenames = { "anvil:anvil" },
run_at_every_load = true,
action = function(pos, node, active_object_count, active_object_count_wider)
- local test_pos = {x=pos.x, y=pos.y + item_displacement, z=pos.z}
+ local test_pos = {x=pos.x, y=pos.y + anvil_item_displacement, z=pos.z}
if #minetest.get_objects_inside_radius(test_pos, 0.5) > 0 then return end
update_item(pos, node)
end
diff --git a/areas/init.lua b/areas/init.lua
index 2c10cdd..d1b7ebe 100644
--- a/areas/init.lua
+++ b/areas/init.lua
@@ -32,7 +32,7 @@ if not minetest.registered_privileges[areas.config.self_protection_privilege] th
})
end
-if minetest.setting_getbool("log_mod") then
+if minetest.settings:get_bool("log_mod") then
local diffTime = os.clock() - areas.startTime
minetest.log("action", "areas loaded in "..diffTime.."s.")
end
diff --git a/areas/settings.lua b/areas/settings.lua
index 140a655..ffb5355 100644
--- a/areas/settings.lua
+++ b/areas/settings.lua
@@ -6,13 +6,13 @@ local function setting(tp, name, default)
local full_name = "areas."..name
local value
if tp == "boolean" then
- value = minetest.setting_getbool(full_name)
+ value = minetest.settings:get_bool(full_name)
elseif tp == "string" then
- value = minetest.setting_get(full_name)
+ value = minetest.settings:get(full_name)
elseif tp == "position" then
value = minetest.setting_get_pos(full_name)
elseif tp == "number" then
- value = tonumber(minetest.setting_get(full_name))
+ value = tonumber(minetest.settings:get(full_name))
else
error("Invalid setting type!")
end
diff --git a/blox/init.lua b/blox/init.lua
index c022863..f48d9b7 100644
--- a/blox/init.lua
+++ b/blox/init.lua
@@ -51,7 +51,7 @@ minetest.register_node("blox:glowstone", {
light_propagates = true,
paramtype = "light",
sunlight_propagates = true,
- light_source = 30 ,
+ light_source = 14,
is_ground_content = true,
groups = {cracky=2},
sounds = default.node_sound_stone_defaults(),
@@ -64,7 +64,7 @@ minetest.register_node("blox:glowore", {
light_propagates = true,
paramtype = "light",
sunlight_propagates = false,
- light_source = 12 ,
+ light_source = 8,
drop = {
max_items = 1,
items = {
@@ -90,7 +90,7 @@ minetest.register_node("blox:glowdust", {
light_propagates = true,
paramtype = "light",
sunlight_propagates = true,
- light_source = 8 ,
+ light_source = 9,
walkable = false,
groups = {cracky=3, snappy=3},
})
diff --git a/boost_cart/README.txt b/boost_cart/README.txt
index 7565ee8..9442926 100644
--- a/boost_cart/README.txt
+++ b/boost_cart/README.txt
@@ -7,7 +7,8 @@ Target: Run smoothly as possible even on laggy server
Features
----------
-- A fast cart for your railway or roller coaster (up to 10 m/s!)
+- A fast cart for your railway or roller coaster
+- Easily configurable cart speed using the Advanced Settings
- Boost and brake rails
- By mesecons controlled Start-Stop rails
- Detector rails that send a mesecons signal when the cart drives over them
diff --git a/boost_cart/init.lua b/boost_cart/init.lua
index bfae5d9..b9e0c67 100644
--- a/boost_cart/init.lua
+++ b/boost_cart/init.lua
@@ -2,10 +2,19 @@
boost_cart = {}
boost_cart.modpath = minetest.get_modpath("boost_cart")
+
+-- Settings glue for <= 0.4.15
+local setting_getter = minetest.setting_get
+if minetest.settings then
+ setting_getter = function (key)
+ return minetest.settings:get(key)
+ end
+end
+
-- Maximal speed of the cart in m/s
-boost_cart.speed_max = 10
+boost_cart.speed_max = tonumber(setting_getter("boost_cart.speed_max")) or 10
-- Set to -1 to disable punching the cart from inside
-boost_cart.punch_speed_max = 7
+boost_cart.punch_speed_max = tonumber(setting_getter("boost_cart.punch_speed_max")) or 7
if not boost_cart.modpath then
diff --git a/boost_cart/settingtypes.txt b/boost_cart/settingtypes.txt
new file mode 100644
index 0000000..d64d88a
--- /dev/null
+++ b/boost_cart/settingtypes.txt
@@ -0,0 +1,6 @@
+# Maximal speed of the cart in m/s (min=1, max=100)
+boost_cart.speed_max (Maximal speed) int 10 1 100
+
+# Maximal speed to which the driving player can accelerate the cart by punching
+# from inside the cart. -1 will disable this feature. (min=-1, max=100)
+boost_cart.punch_speed_max (Maximal punch speed) int 7 -1 100 \ No newline at end of file
diff --git a/castle_masonry/init.lua b/castle_masonry/init.lua
index 0d23922..64cf296 100644
--- a/castle_masonry/init.lua
+++ b/castle_masonry/init.lua
@@ -10,7 +10,7 @@ dofile(MP.."/paving.lua")
local S, NS = dofile(MP.."/intllib.lua")
local read_setting = function(name, default)
- local setting = minetest.setting_getbool(name)
+ local setting = minetest.settings:get_bool(name)
if setting == nil then return default end
return setting
end
diff --git a/castle_storage/mod.conf b/castle_storage/mod.conf
new file mode 100644
index 0000000..b2b6496
--- /dev/null
+++ b/castle_storage/mod.conf
@@ -0,0 +1 @@
+name = castle_storage \ No newline at end of file
diff --git a/castle_weapons/crossbow.lua b/castle_weapons/crossbow.lua
index f61b752..439f99b 100644
--- a/castle_weapons/crossbow.lua
+++ b/castle_weapons/crossbow.lua
@@ -79,12 +79,22 @@ function crossbow:spawn_particles(pos, texture)
texture = CROSSBOW_EXPLOSION_TEXTURE
end
local spread = {x=0.1, y=0.1, z=0.1}
- minetest.add_particlespawner(15, 0.3,
- vector.subtract(pos, spread), vector.add(pos, spread),
- {x=-1, y=1, z=-1}, {x=1, y=2, z=1},
- {x=-2, y=-2, z=-2}, {x=2, y=-2, z=2},
- 0.1, 0.75, 1, 2, false, texture
- )
+ minetest.add_particlespawner({
+ amount = 15,
+ time = 0.3,
+ minpos = vector.subtract(pos, spread),
+ maxpos = vector.add(pos, spread),
+ minvel = {x=-1, y=1, z=-1},
+ maxvel = {x=1, y=2, z=1},
+ minacc = {x=-2, y=-2, z=-2},
+ maxacc = {x=2, y=-2, z=2},
+ minexptime = 0.1,
+ maxexptime = 0.75,
+ minsize = 1,
+ maxsize = 2,
+ collisiondetection = false,
+ texture = texture,
+ })
end
end
@@ -361,7 +371,7 @@ minetest.register_entity("castle_weapons:crossbow_bolt_entity", {
groups = {not_in_creative_inventory=1},
on_use = function(itemstack, user, pointed_thing)
minetest.sound_play("castle_crossbow_click", {object=user})
- if not minetest.setting_getbool("creative_mode") then
+ if not minetest.settings:get_bool("creative_mode") then
itemstack:add_wear(65535/CROSSBOW_USES)
end
itemstack = "castle_weapons:crossbow 1 "..itemstack:get_wear()
@@ -421,7 +431,7 @@ minetest.register_tool("castle_weapons:crossbow", {
local inv = user:get_inventory()
if inv:contains_item("main", "castle_weapons:crossbow_bolt") then
minetest.sound_play("castle_crossbow_reload", {object=user})
- if not minetest.setting_getbool("creative_mode") then
+ if not minetest.settings:get_bool("creative_mode") then
inv:remove_item("main", "castle_weapons:crossbow_bolt 1")
end
return "castle_weapons:crossbow_loaded 1 "..itemstack:get_wear()
diff --git a/crafting_bench/init.lua b/crafting_bench/init.lua
index b723424..bab8d27 100644
--- a/crafting_bench/init.lua
+++ b/crafting_bench/init.lua
@@ -11,7 +11,7 @@ if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~=
end
-local crafting_rate = minetest.setting_get("crafting_bench_crafting_rate")
+local crafting_rate = minetest.settings:get("crafting_bench_crafting_rate")
if crafting_rate == nil then crafting_rate = 5 end
diff --git a/currency/init.lua b/currency/init.lua
index fa85bd2..6dbf3a9 100644
--- a/currency/init.lua
+++ b/currency/init.lua
@@ -16,7 +16,7 @@ minetest.log("info", "[Currency] "..S("Safe Loaded!"))
dofile(modpath.."/crafting.lua")
minetest.log("info", "[Currency] "..S("Crafting Loaded!"))
-if minetest.setting_getbool("creative_mode") then
+if minetest.settings:get_bool("creative_mode") then
minetest.log("info", "[Currency] "..S("Creative mode in use, skipping basic income."))
else
dofile(modpath.."/income.lua")
diff --git a/farming/grapes.lua b/farming/grapes.lua
index e4381e9..9070d0e 100644
--- a/farming/grapes.lua
+++ b/farming/grapes.lua
@@ -1,46 +1,69 @@
local S = farming.intllib
--- grapes
-minetest.register_craftitem("farming:grapes", {
- description = S("Grapes"),
- inventory_image = "farming_grapes.png",
- on_use = minetest.item_eat(2),
+-- place trellis
+function place_grapes(itemstack, placer, pointed_thing, plantname)
- on_place = function(itemstack, placer, pointed_thing)
+ local pt = pointed_thing
- if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then
- return
- end
+ -- check if pointing at a node
+ if not pt or pt.type ~= "node" then
- local nodename = minetest.get_node(pointed_thing.under).name
+ return
+ end
- if nodename == "farming:trellis" then
- minetest.set_node(pointed_thing.under, {name = "farming:grapes_1"})
+ local under = minetest.get_node(pt.under)
- minetest.sound_play("default_place_node", {pos = pointed_thing.above, gain = 1.0})
- else
- return
- end
+ -- return if any of the nodes are not registered
+ if not minetest.registered_nodes[under.name] then
+ return
+ end
- if not minetest.setting_getbool("creative_mode") then
+ -- am I right-clicking on something that has a custom on_place set?
+ -- thanks to Krock for helping with this issue :)
+ local def = minetest.registered_nodes[under.name]
+ if def and def.on_rightclick then
+ return def.on_rightclick(pt.under, under, placer, itemstack)
+ end
- itemstack:take_item()
+ -- check if pointing at trellis
+ if under.name ~= "farming:trellis" then
+ return
+ end
- -- check for refill
- if itemstack:get_count() == 0 then
+ -- add the node and remove 1 item from the itemstack
+ minetest.set_node(pt.under, {name = plantname})
- minetest.after(0.20,
- farming.refill_plant,
- placer,
- "farming:grapes",
- placer:get_wield_index()
- )
- end
- end
+ minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0})
- return itemstack
+ if not minetest.setting_getbool("creative_mode") then
+
+ itemstack:take_item()
+
+ -- check for refill
+ if itemstack:get_count() == 0 then
+
+ minetest.after(0.20,
+ farming.refill_plant,
+ placer,
+ "farming:grapes",
+ placer:get_wield_index()
+ )
+ end
end
+
+ return itemstack
+end
+
+-- grapes
+minetest.register_craftitem("farming:grapes", {
+ description = S("Grapes"),
+ inventory_image = "farming_grapes.png",
+ on_use = minetest.item_eat(2),
+
+ on_place = function(itemstack, placer, pointed_thing)
+ return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1")
+ end,
})
-- grapes can be used for violet dye
diff --git a/homedecor/textures/homedecor_glowlight_cube_sides_overlay.png b/homedecor/textures/homedecor_glowlight_cube_sides_overlay.png
index 4db5867..0e5aefb 100644
--- a/homedecor/textures/homedecor_glowlight_cube_sides_overlay.png
+++ b/homedecor/textures/homedecor_glowlight_cube_sides_overlay.png
Binary files differ
diff --git a/homedecor/textures/homedecor_glowlight_cube_tb_overlay.png b/homedecor/textures/homedecor_glowlight_cube_tb_overlay.png
index c5b9d9e..03cf1dc 100644
--- a/homedecor/textures/homedecor_glowlight_cube_tb_overlay.png
+++ b/homedecor/textures/homedecor_glowlight_cube_tb_overlay.png
Binary files differ
diff --git a/homedecor/textures/homedecor_glowlight_thick_sides_overlay.png b/homedecor/textures/homedecor_glowlight_thick_sides_overlay.png
index f22551c..0d871d1 100644
--- a/homedecor/textures/homedecor_glowlight_thick_sides_overlay.png
+++ b/homedecor/textures/homedecor_glowlight_thick_sides_overlay.png
Binary files differ
diff --git a/homedecor/textures/homedecor_glowlight_thin_sides_overlay.png b/homedecor/textures/homedecor_glowlight_thin_sides_overlay.png
index 8fedb2c..f9335ef 100644
--- a/homedecor/textures/homedecor_glowlight_thin_sides_overlay.png
+++ b/homedecor/textures/homedecor_glowlight_thin_sides_overlay.png
Binary files differ
diff --git a/homedecor/textures/homedecor_glowlight_top_overlay.png b/homedecor/textures/homedecor_glowlight_top_overlay.png
index ec27d4a..5fbf891 100644
--- a/homedecor/textures/homedecor_glowlight_top_overlay.png
+++ b/homedecor/textures/homedecor_glowlight_top_overlay.png
Binary files differ
diff --git a/lavalamp/init.lua b/lavalamp/init.lua
index 4260c36..54909cb 100644
--- a/lavalamp/init.lua
+++ b/lavalamp/init.lua
@@ -8,7 +8,11 @@ minetest.register_node("lavalamp:lavalamp", {
drawtype = "mesh",
mesh = "lavalamp.obj",
tiles = {
- { name = "lavalamp_metal.png", color = 0xffffffff},
+ { name = "lavalamp_metal.png", color = "white" },
+ { name = "lavalamp_lamp_liquid.png", color = "white" },
+ },
+ overlay_tiles = {
+ "",
{
name="lavalamp_lamp_anim.png",
animation={
@@ -19,6 +23,7 @@ minetest.register_node("lavalamp:lavalamp", {
},
},
},
+ use_texture_alpha = true,
inventory_image = "lavalamp_lamp_inv.png",
paramtype = "light",
paramtype2 = "color",
diff --git a/lavalamp/textures/lavalamp_lamp_anim.png b/lavalamp/textures/lavalamp_lamp_anim.png
index d9f7d53..a6f60e7 100644
--- a/lavalamp/textures/lavalamp_lamp_anim.png
+++ b/lavalamp/textures/lavalamp_lamp_anim.png
Binary files differ
diff --git a/lavalamp/textures/lavalamp_lamp_liquid.png b/lavalamp/textures/lavalamp_lamp_liquid.png
new file mode 100644
index 0000000..565f4a9
--- /dev/null
+++ b/lavalamp/textures/lavalamp_lamp_liquid.png
Binary files differ
diff --git a/pipeworks/routing_tubes.lua b/pipeworks/routing_tubes.lua
index 6ed0723..ba9e0aa 100644
--- a/pipeworks/routing_tubes.lua
+++ b/pipeworks/routing_tubes.lua
@@ -10,6 +10,8 @@ minetest.register_craft( {
},
})
+local nodecolor = 0xffff3030
+
pipeworks.register_tube("pipeworks:broken_tube", {
description = "Broken Tube (you hacker you)",
plain = { { name = "pipeworks_broken_tube_plain.png", backface_culling = false, color = nodecolor } },
@@ -66,7 +68,6 @@ pipeworks.register_tube("pipeworks:broken_tube", {
-- without doing actual sorting, like at outputs of tubedevices that might both accept and eject items
if pipeworks.enable_priority_tube then
local color = "#ff3030:128"
- local nodecolor = 0xffff3030
pipeworks.register_tube("pipeworks:priority_tube", {
description = "High Priority Tube Segment",
inventory_image = "pipeworks_tube_inv.png^[colorize:" .. color,