summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-20 13:13:20 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-20 13:13:20 -0400
commit56c6604e85994d0a6e993695c718f9086a3d014e (patch)
treeb6e5890d8cd45057be551279c3caacf133df8a66
parent2368b5c948c971cd6899393b00cb3a8c51f4e006 (diff)
downloaddreambuilder_modpack-56c6604e85994d0a6e993695c718f9086a3d014e.tar
dreambuilder_modpack-56c6604e85994d0a6e993695c718f9086a3d014e.tar.gz
dreambuilder_modpack-56c6604e85994d0a6e993695c718f9086a3d014e.tar.bz2
dreambuilder_modpack-56c6604e85994d0a6e993695c718f9086a3d014e.tar.xz
dreambuilder_modpack-56c6604e85994d0a6e993695c718f9086a3d014e.zip
updated several mods:
blox, bobblocks, castle, digilines, home decor, mesecons, pipeworks, and quartz
-rw-r--r--blox/LICENSE.txt29
-rw-r--r--blox/description.txt1
-rw-r--r--blox/mod.conf1
-rw-r--r--bobblocks/description.txt1
-rw-r--r--bobblocks/mod.conf1
-rw-r--r--castle/arrowslit.lua32
-rw-r--r--castle/crossbow.lua2
-rw-r--r--castle/depends.txt1
-rw-r--r--castle/init.lua159
-rw-r--r--castle/jailbars.lua127
-rw-r--r--castle/murder_hole.lua30
-rw-r--r--castle/pillars.lua79
-rw-r--r--castle/rope.lua79
-rw-r--r--castle/shields_decor.lua6
-rw-r--r--castle/tapestry.lua138
-rw-r--r--castle/textures/LICENSE.txt51
-rw-r--r--castle/textures/castle_corner_stonewall1.pngbin9720 -> 848 bytes
-rw-r--r--castle/textures/castle_corner_stonewall2.pngbin9726 -> 850 bytes
-rw-r--r--castle/textures/castle_crate.pngbin4447 -> 457 bytes
-rw-r--r--castle/textures/castle_crate_top.pngbin3720 -> 502 bytes
-rw-r--r--castle/textures/castle_door_jail.pngbin0 -> 878 bytes
-rw-r--r--castle/textures/castle_door_oak.pngbin0 -> 1343 bytes
-rw-r--r--castle/textures/castle_dungeon_stone.pngbin5596 -> 543 bytes
-rw-r--r--castle/textures/castle_hide.pngbin9991 -> 618 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_back.pngbin415 -> 522 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_front.pngbin442 -> 537 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_side.pngbin332 -> 374 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_top.pngbin408 -> 522 bytes
-rw-r--r--castle/textures/castle_jail_door_inv.pngbin3843 -> 186 bytes
-rw-r--r--castle/textures/castle_jailbars.pngbin455 -> 253 bytes
-rw-r--r--castle/textures/castle_oak_door_inv.pngbin1038 -> 411 bytes
-rw-r--r--castle/textures/castle_pavement_brick.pngbin10244 -> 700 bytes
-rw-r--r--castle/textures/castle_ropebox_side_1.pngbin445 -> 454 bytes
-rw-r--r--castle/textures/castle_ropebox_side_2.pngbin550 -> 515 bytes
-rw-r--r--castle/textures/castle_ropebox_top.pngbin550 -> 515 bytes
-rw-r--r--castle/textures/castle_ropes.pngbin286 -> 278 bytes
-rw-r--r--castle/textures/castle_rubble.pngbin7940 -> 563 bytes
-rw-r--r--castle/textures/castle_shield_back.pngbin7423 -> 620 bytes
-rw-r--r--castle/textures/castle_shield_front.pngbin2073 -> 520 bytes
-rw-r--r--castle/textures/castle_shield_front_2.pngbin3470 -> 701 bytes
-rw-r--r--castle/textures/castle_shield_front_3.pngbin3974 -> 536 bytes
-rw-r--r--castle/textures/castle_shield_side.pngbin200 -> 94 bytes
-rw-r--r--castle/textures/castle_shield_side_2.pngbin187 -> 91 bytes
-rw-r--r--castle/textures/castle_shield_side_3.pngbin252 -> 101 bytes
-rw-r--r--castle/textures/castle_slate.pngbin789 -> 261 bytes
-rw-r--r--castle/textures/castle_steel.pngbin2096 -> 214 bytes
-rw-r--r--castle/textures/castle_stonewall.pngbin8105 -> 660 bytes
-rw-r--r--castle/textures/castle_straw_bale.pngbin9561 -> 756 bytes
-rw-r--r--castle/textures/castle_street_light.pngbin1895 -> 465 bytes
-rw-r--r--castle/textures/castle_workbench_1.pngbin6244 -> 593 bytes
-rw-r--r--castle/textures/castle_workbench_2.pngbin6037 -> 593 bytes
-rw-r--r--castle/textures/castle_workbench_bottom.pngbin0 -> 594 bytes
-rw-r--r--castle/textures/castle_workbench_top.pngbin8226 -> 388 bytes
-rw-r--r--castle/town_item.lua58
-rw-r--r--digilines/internal.lua2
-rw-r--r--itemframes/depends.txt1
-rw-r--r--itemframes/init.lua74
-rw-r--r--mesecons_luacontroller/init.lua56
-rw-r--r--pipeworks/devices.lua2
-rw-r--r--pipeworks/filter-injector.lua19
-rw-r--r--pipeworks/signal_tubes.lua8
-rw-r--r--quartz/README.txt2
-rw-r--r--quartz/init.lua4
-rw-r--r--quartz/mod.conf1
-rw-r--r--quartz/settings.txt4
65 files changed, 482 insertions, 486 deletions
diff --git a/blox/LICENSE.txt b/blox/LICENSE.txt
new file mode 100644
index 0000000..62b6824
--- /dev/null
+++ b/blox/LICENSE.txt
@@ -0,0 +1,29 @@
+
+License:
+
+Copyright (C) 2016 - VanessaE, and others
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the authors shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the authors.
+
diff --git a/blox/description.txt b/blox/description.txt
new file mode 100644
index 0000000..d4e9f90
--- /dev/null
+++ b/blox/description.txt
@@ -0,0 +1 @@
+Adds lots of differently colored and textured blocks to Minetest.
diff --git a/blox/mod.conf b/blox/mod.conf
new file mode 100644
index 0000000..bb5b16a
--- /dev/null
+++ b/blox/mod.conf
@@ -0,0 +1 @@
+name = blox
diff --git a/bobblocks/description.txt b/bobblocks/description.txt
new file mode 100644
index 0000000..6d01c91
--- /dev/null
+++ b/bobblocks/description.txt
@@ -0,0 +1 @@
+Add some colorful nodes to building and also to add light.
diff --git a/bobblocks/mod.conf b/bobblocks/mod.conf
new file mode 100644
index 0000000..decbf01
--- /dev/null
+++ b/bobblocks/mod.conf
@@ -0,0 +1 @@
+name = bobblocks
diff --git a/castle/arrowslit.lua b/castle/arrowslit.lua
index 76cabb7..66614eb 100644
--- a/castle/arrowslit.lua
+++ b/castle/arrowslit.lua
@@ -6,13 +6,13 @@ local arrowslit = {}
arrowslit.types = {
{"stonewall", "Stonewall", "castle_stonewall", "castle:stonewall"},
- {"cobble", "Cobble", "default_cobble", "default:cobble"},
- {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"},
- {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"},
- {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"},
- {"stone", "Stone", "default_stone", "default:stone"},
- {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"},
- {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"},
+ {"cobble", "Cobble", "default_cobble", "default:cobble"},
+ {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"},
+ {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"},
+ {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"},
+ {"stone", "Stone", "default_stone", "default:stone"},
+ {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"},
+ {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"},
}
for _, row in ipairs(arrowslit.types) do
@@ -22,13 +22,13 @@ for _, row in ipairs(arrowslit.types) do
local craft_material = row[4]
-- Node Definition
minetest.register_node("castle:arrowslit_"..name, {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Arrowslit",
tiles = {tile..".png"},
groups = {cracky=3},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
@@ -46,13 +46,13 @@ for _, row in ipairs(arrowslit.types) do
},
})
minetest.register_node("castle:arrowslit_"..name.."_cross", {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Arrowslit with Cross",
tiles = {tile..".png"},
groups = {cracky=3},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
@@ -74,13 +74,13 @@ for _, row in ipairs(arrowslit.types) do
},
})
minetest.register_node("castle:arrowslit_"..name.."_hole", {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Arrowslit with Hole",
tiles = {tile..".png"},
groups = {cracky=3},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
diff --git a/castle/crossbow.lua b/castle/crossbow.lua
index f0ecda4..43f033d 100644
--- a/castle/crossbow.lua
+++ b/castle/crossbow.lua
@@ -27,7 +27,7 @@ end
minetest.register_tool("castle:crossbow", {
description = "Crossbow",
inventory_image = "castle_crossbow.png",
- stack_max = 1,
+ stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
if castle_shoot_arrow(item, user, pointed_thing) then
if not minetest.setting_getbool("creative_mode") then
diff --git a/castle/depends.txt b/castle/depends.txt
index 433156d..66ca057 100644
--- a/castle/depends.txt
+++ b/castle/depends.txt
@@ -6,3 +6,4 @@ building_blocks?
asphalt?
streets?
moreblocks?
+xpanes? \ No newline at end of file
diff --git a/castle/init.lua b/castle/init.lua
index 7814df4..8c56f72 100644
--- a/castle/init.lua
+++ b/castle/init.lua
@@ -12,17 +12,16 @@ minetest.register_node("castle:stonewall", {
description = "Castle Wall",
drawtype = "normal",
tiles = {"castle_stonewall.png"},
- paramtype = light,
+ paramtype = "light",
drop = "castle:stonewall",
groups = {cracky=3},
-
})
minetest.register_node("castle:rubble", {
description = "Castle Rubble",
drawtype = "normal",
tiles = {"castle_rubble.png"},
- paramtype = light,
+ paramtype = "light",
groups = {crumbly=3,falling_node=1},
})
@@ -51,14 +50,14 @@ minetest.register_craft({
minetest.register_node("castle:stonewall_corner", {
drawtype = "normal",
- paramtype = light,
+ paramtype = "light",
paramtype2 = "facedir",
description = "Castle Corner",
- tiles = {"castle_stonewall.png",
- "castle_stonewall.png",
- "castle_corner_stonewall1.png",
- "castle_stonewall.png",
- "castle_stonewall.png",
+ tiles = {"castle_stonewall.png",
+ "castle_stonewall.png",
+ "castle_corner_stonewall1.png",
+ "castle_stonewall.png",
+ "castle_stonewall.png",
"castle_corner_stonewall2.png"},
groups = {cracky=3},
})
@@ -81,7 +80,7 @@ minetest.register_node("castle:roofslate", {
climbable = true,
selection_box = {
type = "fixed",
- fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
+ fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
groups = {cracky=3,attached_node=1},
})
@@ -102,40 +101,30 @@ minetest.register_node("castle:hides", {
},
})
-
-minetest.register_craft({
- output = "castle:hides",
- recipe = {
- {"wool:white"},
- {"bucket:bucket_water"},
+minetest.register_craft( {
+ type = "shapeless",
+ output = "castle:hides 6",
+ recipe = { "wool:white" , "bucket:bucket_water" },
+ replacements = {
+ { 'bucket:bucket_water', 'bucket:bucket_empty' }
}
})
-
-minetest.register_craft( {
- type = "shapeless",
- output = "castle:hides 6",
- recipe = { "wool:white" , "bucket:bucket_water" },
- replacements = {
- { 'bucket:bucket_water', 'bucket:bucket_empty' }
- }
-} )
-
-local mod_building_blocks = minetest.get_modpath("building_blocks")
+local mod_building_blocks = minetest.get_modpath("building_blocks")
local mod_streets = minetest.get_modpath("streets") or minetest.get_modpath("asphalt")
if mod_building_blocks then
- minetest.register_craft( {
- output = "castle:roofslate 4",
- recipe = {
+ minetest.register_craft({
+ output = "castle:roofslate 4",
+ recipe = {
{ "building_blocks:Tar" , "default:gravel" },
{ "default:gravel", "building_blocks:Tar" }
}
})
minetest.register_craft( {
- output = "castle:roofslate 4",
- recipe = {
+ output = "castle:roofslate 4",
+ recipe = {
{ "default:gravel", "building_blocks:Tar" },
{ "building_blocks:Tar" , "default:gravel" }
}
@@ -143,17 +132,17 @@ if mod_building_blocks then
end
if mod_streets then
- minetest.register_craft( {
- output = "castle:roofslate 4",
- recipe = {
+ minetest.register_craft( {
+ output = "castle:roofslate 4",
+ recipe = {
{ "streets:asphalt" , "default:gravel" },
{ "default:gravel", "streets:asphalt" }
}
})
minetest.register_craft( {
- output = "castle:roofslate 4",
- recipe = {
+ output = "castle:roofslate 4",
+ recipe = {
{ "default:gravel", "streets:asphalt" },
{ "streets:asphalt" , "default:gravel" }
}
@@ -170,11 +159,11 @@ if not (mod_building_blocks or mod_streets) then
end
stairs.register_stair_and_slab("stonewall", "castle:stonewall",
- {cracky=3},
- {"castle_stonewall.png"},
- "Castle Wall Stair",
- "Castle Wall Slab",
- default.node_sound_stone_defaults())
+ {cracky=3},
+ {"castle_stonewall.png"},
+ "Castle Wall Stair",
+ "Castle Wall Slab",
+ default.node_sound_stone_defaults())
minetest.register_craft({
output = "castle:stairs 4",
@@ -201,39 +190,32 @@ minetest.register_craft({
}
})
-doors.register_door("castle:oak_door", {
+doors.register("castle:oak_door", {
+ tiles = {{ name = "castle_door_oak.png", backface_culling = true }},
description = "Oak Door",
inventory_image = "castle_oak_door_inv.png",
- groups = {choppy=2,door=1},
- tiles_bottom = {"castle_oak_door_bottom.png", "door_oak.png"},
- tiles_top = {"castle_oak_door_top.png", "door_oak.png"},
- only_placer_can_open = true,
-})
-
-doors.register_door("castle:jail_door", {
- description = "Jail Door",
- inventory_image = "castle_jail_door_inv.png",
- groups = {cracky=2,door=1},
- tiles_bottom = {"castle_jail_door_bottom.png", "door_jail.png"},
- tiles_top = {"castle_jail_door_top.png", "door_jail.png"},
- only_placer_can_open = true,
-})
-
-minetest.register_craft({
- output = "castle:oak_door",
+ protected = true,
+ groups = { choppy = 2, door = 1 },
+ sounds = default.node_sound_wood_defaults(),
recipe = {
{"default:tree", "default:tree"},
{"default:tree", "default:tree"},
- {"default:tree", "default:tree"}
+ {"default:tree", "default:tree"},
}
})
-minetest.register_craft({
- output = "castle:jail_door",
+doors.register("castle:jail_door", {
+ tiles = {{ name = "castle_door_jail.png", backface_culling = true }},
+ description = "Jail Door",
+ inventory_image = "castle_jail_door_inv.png",
+ protected = true,
+ groups = { cracky = 2, door = 1},
+ sound_open = "doors_steel_door_open",
+ sound_close = "doors_steel_door_close",
recipe = {
{"castle:jailbars", "castle:jailbars"},
{"castle:jailbars", "castle:jailbars"},
- {"castle:jailbars", "castle:jailbars"}
+ {"castle:jailbars", "castle:jailbars"},
}
})
@@ -241,6 +223,9 @@ function default.get_ironbound_chest_formspec(pos)
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
local formspec =
"size[8,9]"..
+ default.gui_bg ..
+ default.gui_bg_img ..
+ default.gui_slots ..
"list[nodemeta:".. spos .. ";main;0,0;8,4;]"..
"list[current_player;main;0,5;8,4;]"
return formspec
@@ -257,7 +242,7 @@ minetest.register_node("castle:ironbound_chest",{
drawtype = "nodebox",
description = "Ironbound Chest",
tiles = {"castle_ironbound_chest_top.png",
- "castle_ironbound_chest_top.png",
+ "castle_ironbound_chest_top.png",
"castle_ironbound_chest_side.png",
"castle_ironbound_chest_side.png",
"castle_ironbound_chest_back.png",
@@ -269,9 +254,9 @@ minetest.register_node("castle:ironbound_chest",{
type = "fixed",
fixed = {
{-0.500000,-0.500000,-0.312500,0.500000,-0.062500,0.312500},
- {-0.500000,-0.062500,-0.250000,0.500000,0.000000,0.250000},
+ {-0.500000,-0.062500,-0.250000,0.500000,0.000000,0.250000},
{-0.500000,0.000000,-0.187500,0.500000,0.062500,0.187500},
- {-0.500000,0.062500,-0.062500,0.500000,0.125000,0.062500},
+ {-0.500000,0.062500,-0.062500,0.500000,0.125000,0.062500},
},
},
selection_box = {
@@ -279,7 +264,7 @@ minetest.register_node("castle:ironbound_chest",{
fixed = {
{-0.5,-0.500000,-0.400000,0.5,0.200000,0.4},
- },
+ },
},
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
@@ -311,7 +296,7 @@ minetest.register_node("castle:ironbound_chest",{
end
return count
end,
- allow_metadata_inventory_put = function(pos, listname, index, stack, player)
+ allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if not has_ironbound_chest_privilege(meta, player) then
minetest.log("action", player:get_player_name()..
@@ -322,7 +307,7 @@ minetest.register_node("castle:ironbound_chest",{
end
return stack:get_count()
end,
- allow_metadata_inventory_take = function(pos, listname, index, stack, player)
+ allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if not has_ironbound_chest_privilege(meta, player) then
minetest.log("action", player:get_player_name()..
@@ -337,11 +322,11 @@ minetest.register_node("castle:ironbound_chest",{
minetest.log("action", player:get_player_name()..
" moves stuff in locked chest at "..minetest.pos_to_string(pos))
end,
- on_metadata_inventory_put = function(pos, listname, index, stack, player)
+ on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" moves stuff to locked chest at "..minetest.pos_to_string(pos))
end,
- on_metadata_inventory_take = function(pos, listname, index, stack, player)
+ on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" takes stuff from locked chest at "..minetest.pos_to_string(pos))
end,
@@ -378,17 +363,17 @@ minetest.register_tool("castle:battleaxe", {
damage_groups = {fleshy=7},
},
})
+
minetest.register_craft({
output = "castle:battleaxe",
recipe = {
{"default:steel_ingot", "default:steel_ingot","default:steel_ingot"},
{"default:steel_ingot", "default:stick","default:steel_ingot"},
- {"", "default:stick",""}
+ {"", "default:stick",""}
}
})
if minetest.get_modpath("moreblocks") then
-
stairsplus:register_all("castle", "dungeon_stone", "castle:dungeon_stone", {
description = "Dungeon Stone",
tiles = {"castle_dungeon_stone.png"},
@@ -403,7 +388,7 @@ if minetest.get_modpath("moreblocks") then
groups = {cracky=1, not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),
sunlight_propagates = true,
- })
+ })
stairsplus:register_all("castle", "stonewall", "castle:stonewall", {
description = "Stone Wall",
@@ -419,22 +404,22 @@ if minetest.get_modpath("moreblocks") then
groups = {cracky=1, not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),
sunlight_propagates = true,
- })
- end
+ })
+end
stairs.register_stair_and_slab("dungeon_stone", "castle:dungeon_stone",
- {cracky=3},
- {"castle_dungeon_stone.png"},
- "Dungeon Stone Stair",
- "Dungeon Stone Slab",
- default.node_sound_stone_defaults())
+ {cracky=3},
+ {"castle_dungeon_stone.png"},
+ "Dungeon Stone Stair",
+ "Dungeon Stone Slab",
+ default.node_sound_stone_defaults())
stairs.register_stair_and_slab("castle_pavement_brick", "castle:pavement_brick",
- {cracky=3},
- {"castle_pavement_brick.png"},
- "Castle Pavement Stair",
- "Castle Pavement Slab",
- default.node_sound_stone_defaults())
+ {cracky=3},
+ {"castle_pavement_brick.png"},
+ "Castle Pavement Stair",
+ "Castle Pavement Slab",
+ default.node_sound_stone_defaults())
minetest.register_craft({
output = "stairs:slab_dungeon_stone 6",
diff --git a/castle/jailbars.lua b/castle/jailbars.lua
index 2bc6d66..504e23f 100644
--- a/castle/jailbars.lua
+++ b/castle/jailbars.lua
@@ -1,113 +1,16 @@
--- xjailbarss mod by xyz
-
-local function rshift(x, by)
- return math.floor(x / 2 ^ by)
-end
-
-local directions = {
- {x = 1, y = 0, z = 0},
- {x = 0, y = 0, z = 1},
- {x = -1, y = 0, z = 0},
- {x = 0, y = 0, z = -1},
-}
-
-local function update_jailbars(pos)
- if minetest.get_node(pos).name:find("castle:jailbars") == nil then
- return
- end
- local sum = 0
- for i = 1, 4 do
- local node = minetest.get_node({x = pos.x + directions[i].x, y = pos.y + directions[i].y, z = pos.z + directions[i].z})
- if minetest.registered_nodes[node.name].walkable ~= false then
- sum = sum + 2 ^ (i - 1)
- end
- end
- if sum == 0 then
- sum = 15
- end
- minetest.add_node(pos, {name = "castle:jailbars_"..sum})
-end
-
-local function update_nearby(pos)
- for i = 1,4 do
- update_jailbars({x = pos.x + directions[i].x, y = pos.y + directions[i].y, z = pos.z + directions[i].z})
- end
-end
-
-local half_blocks = {
- {0, -0.5, -0.06, 0.5, 0.5, 0.06},
- {-0.06, -0.5, 0, 0.06, 0.5, 0.5},
- {-0.5, -0.5, -0.06, 0, 0.5, 0.06},
- {-0.06, -0.5, -0.5, 0.06, 0.5, 0}
-}
-
-local full_blocks = {
- {-0.5, -0.5, -0.06, 0.5, 0.5, 0.06},
- {-0.06, -0.5, -0.5, 0.06, 0.5, 0.5}
-}
-
-for i = 1, 15 do
- local need = {}
- local cnt = 0
- for j = 1, 4 do
- if rshift(i, j - 1) % 2 == 1 then
- need[j] = true
- cnt = cnt + 1
- end
- end
- local take = {}
- if need[1] == true and need[3] == true then
- need[1] = nil
- need[3] = nil
- table.insert(take, full_blocks[1])
- end
- if need[2] == true and need[4] == true then
- need[2] = nil
- need[4] = nil
- table.insert(take, full_blocks[2])
- end
- for k in pairs(need) do
- table.insert(take, half_blocks[k])
- end
- local texture = "castle_jailbars.png"
- if cnt == 1 then
- texture = "castle_jailbars.png"
- end
- minetest.register_node("castle:jailbars_"..i, {
- drawtype = "nodebox",
- tiles = {"castle_grey.png", "castle_grey.png", texture},
- paramtype = "light",
- groups = {cracky=2},
- drop = "castle:jailbars",
- node_box = {
- type = "fixed",
- fixed = take
- },
- selection_box = {
- type = "fixed",
- fixed = take
- }
- })
-end
-
-minetest.register_node("castle:jailbars", {
- description = "Jailbars",
- tiles = {"castle_space.png"},
- inventory_image = "castle_jailbars.png",
- wield_image = "castle_jailbars.png",
- node_placement_prediction = "",
- on_construct = update_jailbars
-})
-
-minetest.register_on_placenode(update_nearby)
-minetest.register_on_dignode(update_nearby)
-
-minetest.register_craft({
- output = "castle:jailbars 12",
- recipe = {
- {"default:steel_ingot","","default:steel_ingot"},
+if minetest.get_modpath("xpanes") then
+ xpanes.register_pane("jailbars", {
+ description = "Jail Bars",
+ tiles = {"castle_jailbars.png"},
+ drawtype = "airlike",
+ paramtype = "light",
+ textures = {"castle_jailbars.png", "castle_jailbars.png", "xpanes_space.png"},
+ inventory_image = "castle_jailbars.png",
+ wield_image = "castle_jailbars.png",
+ sounds = default.node_sound_stone_defaults(),
+ groups = {cracky=1, pane=1},
+ recipe = {{"default:steel_ingot","","default:steel_ingot"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
- {"default:steel_ingot","","default:steel_ingot"},
- }
-})
-
+ {"default:steel_ingot","","default:steel_ingot"}}
+ })
+end
diff --git a/castle/murder_hole.lua b/castle/murder_hole.lua
index cf2fab6..bd0dfb1 100644
--- a/castle/murder_hole.lua
+++ b/castle/murder_hole.lua
@@ -2,13 +2,13 @@ local hole = {}
hole.types = {
{"stonewall", "Stonewall", "castle_stonewall", "castle:stonewall"},
- {"cobble", "Cobble", "default_cobble", "default:cobble"},
- {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"},
- {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"},
- {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"},
- {"stone", "Stone", "default_stone", "default:stone"},
- {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"},
- {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"},
+ {"cobble", "Cobble", "default_cobble", "default:cobble"},
+ {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"},
+ {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"},
+ {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"},
+ {"stone", "Stone", "default_stone", "default:stone"},
+ {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"},
+ {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"},
}
for _, row in ipairs(hole.types) do
@@ -18,24 +18,24 @@ for _, row in ipairs(hole.types) do
local craft_material = row[4]
-- Node Definition
minetest.register_node("castle:hole_"..name, {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Murder Hole",
tiles = {tile..".png"},
groups = {cracky=3},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
- {-8/16,-8/16,-8/16,-4/16,8/16,8/16},
- {4/16,-8/16,-8/16,8/16,8/16,8/16},
- {-4/16,-8/16,-8/16,4/16,8/16,-4/16},
- {-4/16,-8/16,8/16,4/16,8/16,4/16},
-
+ {-8/16,-8/16,-8/16,-4/16,8/16,8/16},
+ {4/16,-8/16,-8/16,8/16,8/16,8/16},
+ {-4/16,-8/16,-8/16,4/16,8/16,-4/16},
+ {-4/16,-8/16,8/16,4/16,8/16,4/16},
},
},
})
+
if craft_material then
--Choose craft material
minetest.register_craft({
diff --git a/castle/pillars.lua b/castle/pillars.lua
index 4024390..ac63cb5 100644
--- a/castle/pillars.lua
+++ b/castle/pillars.lua
@@ -6,13 +6,13 @@ local pillar = {}
pillar.types = {
{"stonewall", "Stonewall", "castle_stonewall", "castle:stonewall"},
- {"cobble", "Cobble", "default_cobble", "default:cobble"},
- {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"},
- {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"},
- {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"},
- {"stone", "Stone", "default_stone", "default:stone"},
- {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"},
- {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"},
+ {"cobble", "Cobble", "default_cobble", "default:cobble"},
+ {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"},
+ {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"},
+ {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"},
+ {"stone", "Stone", "default_stone", "default:stone"},
+ {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"},
+ {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"},
}
for _, row in ipairs(pillar.types) do
@@ -22,30 +22,30 @@ for _, row in ipairs(pillar.types) do
local craft_material = row[4]
-- Node Definition
minetest.register_node("castle:pillars_"..name.."_bottom", {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Pillar Base",
tiles = {tile..".png"},
groups = {cracky=3,attached_node=1},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,0.500000},
- {-0.375000,-0.375000,-0.375000,0.375000,-0.125000,0.375000},
- {-0.250000,-0.125000,-0.250000,0.250000,0.500000,0.250000},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,0.500000},
+ {-0.375000,-0.375000,-0.375000,0.375000,-0.125000,0.375000},
+ {-0.250000,-0.125000,-0.250000,0.250000,0.500000,0.250000},
+ },
},
- },
})
minetest.register_node("castle:pillars_"..name.."_top", {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Pillar Top",
tiles = {tile..".png"},
groups = {cracky=3,attached_node=1},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
@@ -55,49 +55,54 @@ for _, row in ipairs(pillar.types) do
},
},
})
+
minetest.register_node("castle:pillars_"..name.."_middle", {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Pillar Middle",
tiles = {tile..".png"},
groups = {cracky=3,attached_node=1},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.250000,-0.500000,-0.250000,0.250000,0.500000,0.250000},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.250000,-0.500000,-0.250000,0.250000,0.500000,0.250000},
+ },
},
- },
})
+
if craft_material then
--Choose craft material
minetest.register_craft({
output = "castle:pillars_"..name.."_bottom 4",
recipe = {
- {"",craft_material,""},
- {"",craft_material,""},
- {craft_material,craft_material,craft_material} },
+ {"",craft_material,""},
+ {"",craft_material,""},
+ {craft_material,craft_material,craft_material} },
})
end
+
if craft_material then
--Choose craft material
minetest.register_craft({
output = "castle:pillars_"..name.."_top 4",
recipe = {
- {craft_material,craft_material,craft_material},
- {"",craft_material,""},
- {"",craft_material,""} },
+ {craft_material,craft_material,craft_material},
+ {"",craft_material,""},
+ {"",craft_material,""} },
})
end
+
if craft_material then
--Choose craft material
minetest.register_craft({
output = "castle:pillars_"..name.."_middle 4",
recipe = {
- {craft_material,craft_material},
- {craft_material,craft_material},
- {craft_material,craft_material} },
+ {craft_material,craft_material},
+ {craft_material,craft_material},
+ {craft_material,craft_material} },
})
end
end
+
diff --git a/castle/rope.lua b/castle/rope.lua
index 23ebea8..1141913 100644
--- a/castle/rope.lua
+++ b/castle/rope.lua
@@ -31,15 +31,15 @@ minetest.register_craft({
})
minetest.register_node("castle:box_rope", {
- description = "Rope from Ropebox",
- drawtype = "nodebox",
- paramtype = "light",
- sunlight_propagates = true,
- tiles = {"castle_ropes.png"},
- groups = {not_in_creative_inventory=1},
- climbable = true,
- walkable = false,
- diggable = false,
+ description = "Rope from Ropebox",
+ drawtype = "nodebox",
+ paramtype = "light",
+ sunlight_propagates = true,
+ tiles = {"castle_ropes.png"},
+ groups = {not_in_creative_inventory=1},
+ climbable = true,
+ walkable = false,
+ diggable = false,
node_box = {
type = "fixed",
fixed = {
@@ -52,44 +52,44 @@ minetest.register_node("castle:box_rope", {
{-1/16, -8/16, -1/16, 1/16, 8/16, 1/16},
},
},
- after_destruct = function(pos,oldnode)
- local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
- if node.name == "castle:box_rope" then
- minetest.remove_node({x=pos.x,y=pos.y-1,z=pos.z})
- end
- end,
+ after_destruct = function(pos,oldnode)
+ local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
+ if node.name == "castle:box_rope" then
+ minetest.remove_node({x=pos.x,y=pos.y-1,z=pos.z})
+ end
+ end,
})
minetest.register_node("castle:ropebox", {
- description = "Ropebox",
- drawtype = "nodebox",
- sunlight_propagates = true,
- tiles = {"castle_ropebox_top.png",
- "castle_ropebox_top.png",
- "castle_ropebox_side_1.png",
- "castle_ropebox_side_1.png",
- "castle_ropebox_side_2.png",
- "castle_ropebox_side_2.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {choppy=3},
+ description = "Ropebox",
+ drawtype = "nodebox",
+ sunlight_propagates = true,
+ tiles = {"castle_ropebox_top.png",
+ "castle_ropebox_top.png",
+ "castle_ropebox_side_1.png",
+ "castle_ropebox_side_1.png",
+ "castle_ropebox_side_2.png",
+ "castle_ropebox_side_2.png"},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ groups = {choppy=3},
node_box = {
type = "fixed",
fixed = {
- {-2/16, -2/16, -4/16, 2/16, 2/16, 4/16},
- {-2/16, -4/16, -2/16, 2/16, 4/16, 2/16},
- {-2/16, -3/16, -3/16, 2/16, 3/16, 3/16},
+ {-2/16, -2/16, -4/16, 2/16, 2/16, 4/16},
+ {-2/16, -4/16, -2/16, 2/16, 4/16, 2/16},
+ {-2/16, -3/16, -3/16, 2/16, 3/16, 3/16},
{-3/16, -2/16, -2/16, -2/16, 8/16, 2/16},
{2/16, -2/16, -2/16, 3/16, 8/16, 2/16},
- {-1/16, -8/16, -1/16, 1/16, -4/16, 1/16},
+ {-1/16, -8/16, -1/16, 1/16, -4/16, 1/16},
},
},
- after_destruct = function(pos,oldnode)
- local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
- if node.name == "castle:box_rope" then
- minetest.remove_node({x=pos.x,y=pos.y-1,z=pos.z})
- end
- end,
+ after_destruct = function(pos,oldnode)
+ local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
+ if node.name == "castle:box_rope" then
+ minetest.remove_node({x=pos.x,y=pos.y-1,z=pos.z})
+ end
+ end,
})
minetest.register_abm({
@@ -98,7 +98,7 @@ minetest.register_abm({
chance = 1,
action = function(pos, node)
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name ~= 'air' then return end
- minetest.add_node({x=pos.x,y=pos.y-1,z=pos.z}, {name="castle:box_rope"})
+ minetest.add_node({x=pos.x,y=pos.y-1,z=pos.z}, {name="castle:box_rope"})
end
})
@@ -108,7 +108,7 @@ minetest.register_abm({
chance = 1,
action = function(pos, node)
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name ~= 'air' then return end
- minetest.add_node({x=pos.x,y=pos.y-1,z=pos.z}, {name="castle:box_rope"})
+ minetest.add_node({x=pos.x,y=pos.y-1,z=pos.z}, {name="castle:box_rope"})
end
})
@@ -119,3 +119,4 @@ minetest.register_craft({
{"castle:ropes"},
}
})
+
diff --git a/castle/shields_decor.lua b/castle/shields_decor.lua
index 0772f41..354b099 100644
--- a/castle/shields_decor.lua
+++ b/castle/shields_decor.lua
@@ -19,7 +19,7 @@ minetest.register_node("castle:shield",{
fixed = {
{-0.500000,-0.500000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
},
- },
+ },
})
@@ -53,7 +53,7 @@ minetest.register_node("castle:shield_2",{
fixed = {
{-0.500000,-0.500000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
},
- },
+ },
})
minetest.register_craft({
@@ -86,7 +86,7 @@ minetest.register_node("castle:shield_3",{
fixed = {
{-0.500000,-0.500000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
},
- },
+ },
})
minetest.register_craft({
diff --git a/castle/tapestry.lua b/castle/tapestry.lua
index 845fb7a..3cc3401 100644
--- a/castle/tapestry.lua
+++ b/castle/tapestry.lua
@@ -2,7 +2,7 @@ local tapestry = {}
minetest.register_node("castle:tapestry_top", {
drawtype = "nodebox",
- description = "Tapestry Top",
+ description = "Tapestry Top",
tiles = {"default_wood.png"},
sunlight_propagates = true,
groups = {flammable=3,oddly_breakable_by_hand=1},
@@ -18,7 +18,7 @@ minetest.register_node("castle:tapestry_top", {
selection_box = {
type = "fixed",
fixed = {
- {-0.600000,-0.500000,0.375000,0.600000,-0.375000,0.500000},
+ {-0.600000,-0.500000,0.375000,0.600000,-0.375000,0.500000},
},
},
})
@@ -53,33 +53,33 @@ for _, row in ipairs(tapestry.colours) do
local craft_color_group = row[3]
-- Node Definition
minetest.register_node("castle:tapestry_"..name, {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Tapestry",
tiles = {"wool_"..name..".png"},
groups = {oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
- type = "fixed",
- fixed = {
- {-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
- {0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
- {-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
- {0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
- {-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
- {0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
- {-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
- {0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
- {-0.500000,0.000000,0.437500,0.500000,1.500000,0.500000},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,0.437500,0.500000,1.500000,0.500000},
- },
- },
+ type = "fixed",
+ fixed = {
+ {-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
+ {0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
+ {-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
+ {0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
+ {-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
+ {0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
+ {-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
+ {0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
+ {-0.500000,0.000000,0.437500,0.500000,1.500000,0.500000},
+ },
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.500000,-0.500000,0.437500,0.500000,1.500000,0.500000},
+ },
+ },
})
if craft_color_group then
-- Crafting from wool and a stick
@@ -97,34 +97,35 @@ for _, row in ipairs(tapestry.colours) do
local craft_color_group = row[3]
-- Node Definition
minetest.register_node("castle:long_tapestry_"..name, {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Tapestry (Long)",
tiles = {"wool_"..name..".png"},
groups = {oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
- type = "fixed",
- fixed = {
- {-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
- {0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
- {-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
- {0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
- {-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
- {0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
- {-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
- {0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
- {-0.500000,0.000000,0.437500,0.500000,2.500000,0.500000},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,0.437500,0.500000,2.500000,0.500000},
- },
- },
+ type = "fixed",
+ fixed = {
+ {-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
+ {0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
+ {-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
+ {0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
+ {-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
+ {0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
+ {-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
+ {0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
+ {-0.500000,0.000000,0.437500,0.500000,2.500000,0.500000},
+ },
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.500000,-0.500000,0.437500,0.500000,2.500000,0.500000},
+ },
+ },
})
+
if craft_color_group then
-- Crafting from normal tapestry and wool
minetest.register_craft({
@@ -141,33 +142,33 @@ for _, row in ipairs(tapestry.colours) do
local craft_color_group = row[3]
-- Node Definition
minetest.register_node("castle:very_long_tapestry_"..name, {
- drawtype = "nodebox",
+ drawtype = "nodebox",
description = desc.." Tapestry (Very Long)",
tiles = {"wool_"..name..".png"},
groups = {oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
+ paramtype = "light",
+ paramtype2 = "facedir",
node_box = {
- type = "fixed",
- fixed = {
- {-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
- {0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
- {-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
- {0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
- {-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
- {0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
- {-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
- {0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
- {-0.500000,0.000000,0.437500,0.500000,3.500000,0.500000},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,0.437500,0.500000,3.500000,0.500000},
- },
- },
+ type = "fixed",
+ fixed = {
+ {-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
+ {0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
+ {-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
+ {0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
+ {-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
+ {0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
+ {-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
+ {0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
+ {-0.500000,0.000000,0.437500,0.500000,3.500000,0.500000},
+ },
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.500000,-0.500000,0.437500,0.500000,3.500000,0.500000},
+ },
+ },
})
if craft_color_group then
-- Crafting from long tapestry and wool
@@ -178,3 +179,4 @@ for _, row in ipairs(tapestry.colours) do
})
end
end
+
diff --git a/castle/textures/LICENSE.txt b/castle/textures/LICENSE.txt
new file mode 100644
index 0000000..e2aefc5
--- /dev/null
+++ b/castle/textures/LICENSE.txt
@@ -0,0 +1,51 @@
+--------------------------------------------
+
+All textures based on
+original textures by: ???
+
+License Textures: ???
+
+--------------------------------------------
+
+License Textures: Napiophelios - CC-BY-SA 3.0
+
+-castle_corner_stonewall1.png
+-castle_corner_stonewall2.png
+-castle_crate.png
+-castle_crate_top.png
+-castle_door_jail.png
+-castle_door_oak.png
+-castle_dungeon_stone.png
+-castle_hide.png
+-castle_ironbound_chest_back.png
+-castle_ironbound_chest_front.png
+-castle_ironbound_chest_side.png
+-castle_ironbound_chest_top.png
+-castle_jail_door_inv.png
+-castle_jailbars.png
+-castle_oak_door_inv.png
+-castle_pavement_brick.png
+-castle_ropebox_side_1.png
+-castle_ropebox_side_2.png
+-castle_ropebox_top.png
+-castle_ropes.png
+-castle_rubble.png
+-castle_shield_back.png
+-castle_shield_front.png
+-castle_shield_front_2.png
+-castle_shield_front_3.png
+-castle_shield_side.png
+-castle_shield_side_2.png
+-castle_shield_side_3.png
+-castle_slate.png
+-castle_steel.png
+-castle_stonewall.png
+-castle_straw_bale.png
+-castle_street_light.png
+-castle_workbench_1.png
+-castle_workbench_2.png
+-castle_workbench_bottom.png
+-castle_workbench_top.png
+
+
+-------------------------------------------- \ No newline at end of file
diff --git a/castle/textures/castle_corner_stonewall1.png b/castle/textures/castle_corner_stonewall1.png
index 22ba91f..d6066ea 100644
--- a/castle/textures/castle_corner_stonewall1.png
+++ b/castle/textures/castle_corner_stonewall1.png
Binary files differ
diff --git a/castle/textures/castle_corner_stonewall2.png b/castle/textures/castle_corner_stonewall2.png
index 0693427..72bf8e6 100644
--- a/castle/textures/castle_corner_stonewall2.png
+++ b/castle/textures/castle_corner_stonewall2.png
Binary files differ
diff --git a/castle/textures/castle_crate.png b/castle/textures/castle_crate.png
index 4aca511..b68c685 100644
--- a/castle/textures/castle_crate.png
+++ b/castle/textures/castle_crate.png
Binary files differ
diff --git a/castle/textures/castle_crate_top.png b/castle/textures/castle_crate_top.png
index 1de0365..dd63b1b 100644
--- a/castle/textures/castle_crate_top.png
+++ b/castle/textures/castle_crate_top.png
Binary files differ
diff --git a/castle/textures/castle_door_jail.png b/castle/textures/castle_door_jail.png
new file mode 100644
index 0000000..0d4f7bf
--- /dev/null
+++ b/castle/textures/castle_door_jail.png
Binary files differ
diff --git a/castle/textures/castle_door_oak.png b/castle/textures/castle_door_oak.png
new file mode 100644
index 0000000..2282fb2
--- /dev/null
+++ b/castle/textures/castle_door_oak.png
Binary files differ
diff --git a/castle/textures/castle_dungeon_stone.png b/castle/textures/castle_dungeon_stone.png
index 10c5c47..6a2c154 100644
--- a/castle/textures/castle_dungeon_stone.png
+++ b/castle/textures/castle_dungeon_stone.png
Binary files differ
diff --git a/castle/textures/castle_hide.png b/castle/textures/castle_hide.png
index 8abc259..3e6f6c4 100644
--- a/castle/textures/castle_hide.png
+++ b/castle/textures/castle_hide.png
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_back.png b/castle/textures/castle_ironbound_chest_back.png
index 52d0ae4..29446db 100644
--- a/castle/textures/castle_ironbound_chest_back.png
+++ b/castle/textures/castle_ironbound_chest_back.png
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_front.png b/castle/textures/castle_ironbound_chest_front.png
index 8151300..8d91e07 100644
--- a/castle/textures/castle_ironbound_chest_front.png
+++ b/castle/textures/castle_ironbound_chest_front.png
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_side.png b/castle/textures/castle_ironbound_chest_side.png
index f38ba39..3a94f81 100644
--- a/castle/textures/castle_ironbound_chest_side.png
+++ b/castle/textures/castle_ironbound_chest_side.png
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_top.png b/castle/textures/castle_ironbound_chest_top.png
index fff7da0..29446db 100644
--- a/castle/textures/castle_ironbound_chest_top.png
+++ b/castle/textures/castle_ironbound_chest_top.png
Binary files differ
diff --git a/castle/textures/castle_jail_door_inv.png b/castle/textures/castle_jail_door_inv.png
index 50a502d..5121fb8 100644
--- a/castle/textures/castle_jail_door_inv.png
+++ b/castle/textures/castle_jail_door_inv.png
Binary files differ
diff --git a/castle/textures/castle_jailbars.png b/castle/textures/castle_jailbars.png
index 79421ac..e2cc911 100644
--- a/castle/textures/castle_jailbars.png
+++ b/castle/textures/castle_jailbars.png
Binary files differ
diff --git a/castle/textures/castle_oak_door_inv.png b/castle/textures/castle_oak_door_inv.png
index d1966db..1122d51 100644
--- a/castle/textures/castle_oak_door_inv.png
+++ b/castle/textures/castle_oak_door_inv.png
Binary files differ
diff --git a/castle/textures/castle_pavement_brick.png b/castle/textures/castle_pavement_brick.png
index 0d06f6b..fd10e0f 100644
--- a/castle/textures/castle_pavement_brick.png
+++ b/castle/textures/castle_pavement_brick.png
Binary files differ
diff --git a/castle/textures/castle_ropebox_side_1.png b/castle/textures/castle_ropebox_side_1.png
index 75da619..a747750 100644
--- a/castle/textures/castle_ropebox_side_1.png
+++ b/castle/textures/castle_ropebox_side_1.png
Binary files differ
diff --git a/castle/textures/castle_ropebox_side_2.png b/castle/textures/castle_ropebox_side_2.png
index f3bbe53..ec8b9ab 100644
--- a/castle/textures/castle_ropebox_side_2.png
+++ b/castle/textures/castle_ropebox_side_2.png
Binary files differ
diff --git a/castle/textures/castle_ropebox_top.png b/castle/textures/castle_ropebox_top.png
index a6eb2ef..ec8b9ab 100644
--- a/castle/textures/castle_ropebox_top.png
+++ b/castle/textures/castle_ropebox_top.png
Binary files differ
diff --git a/castle/textures/castle_ropes.png b/castle/textures/castle_ropes.png
index 0df712e..456d7bb 100644
--- a/castle/textures/castle_ropes.png
+++ b/castle/textures/castle_ropes.png
Binary files differ
diff --git a/castle/textures/castle_rubble.png b/castle/textures/castle_rubble.png
index a16c5da..fbaa32c 100644
--- a/castle/textures/castle_rubble.png
+++ b/castle/textures/castle_rubble.png
Binary files differ
diff --git a/castle/textures/castle_shield_back.png b/castle/textures/castle_shield_back.png
index 91ce914..53cca18 100644
--- a/castle/textures/castle_shield_back.png
+++ b/castle/textures/castle_shield_back.png
Binary files differ
diff --git a/castle/textures/castle_shield_front.png b/castle/textures/castle_shield_front.png
index 194754a..c7b56fc 100644
--- a/castle/textures/castle_shield_front.png
+++ b/castle/textures/castle_shield_front.png
Binary files differ
diff --git a/castle/textures/castle_shield_front_2.png b/castle/textures/castle_shield_front_2.png
index 65f38b7..ffc2256 100644
--- a/castle/textures/castle_shield_front_2.png
+++ b/castle/textures/castle_shield_front_2.png
Binary files differ
diff --git a/castle/textures/castle_shield_front_3.png b/castle/textures/castle_shield_front_3.png
index 4b0cdc1..7dc48a7 100644
--- a/castle/textures/castle_shield_front_3.png
+++ b/castle/textures/castle_shield_front_3.png
Binary files differ
diff --git a/castle/textures/castle_shield_side.png b/castle/textures/castle_shield_side.png
index 706fecc..8aaa6a9 100644
--- a/castle/textures/castle_shield_side.png
+++ b/castle/textures/castle_shield_side.png
Binary files differ
diff --git a/castle/textures/castle_shield_side_2.png b/castle/textures/castle_shield_side_2.png
index a33cd65..07282d2 100644
--- a/castle/textures/castle_shield_side_2.png
+++ b/castle/textures/castle_shield_side_2.png
Binary files differ
diff --git a/castle/textures/castle_shield_side_3.png b/castle/textures/castle_shield_side_3.png
index d412952..6dc8aeb 100644
--- a/castle/textures/castle_shield_side_3.png
+++ b/castle/textures/castle_shield_side_3.png
Binary files differ
diff --git a/castle/textures/castle_slate.png b/castle/textures/castle_slate.png
index f8d7f82..a7de1ea 100644
--- a/castle/textures/castle_slate.png
+++ b/castle/textures/castle_slate.png
Binary files differ
diff --git a/castle/textures/castle_steel.png b/castle/textures/castle_steel.png
index d0e39f3..28ecd60 100644
--- a/castle/textures/castle_steel.png
+++ b/castle/textures/castle_steel.png
Binary files differ
diff --git a/castle/textures/castle_stonewall.png b/castle/textures/castle_stonewall.png
index 5edf86b..b8f823f 100644
--- a/castle/textures/castle_stonewall.png
+++ b/castle/textures/castle_stonewall.png
Binary files differ
diff --git a/castle/textures/castle_straw_bale.png b/castle/textures/castle_straw_bale.png
index 8403e2a..ad56330 100644
--- a/castle/textures/castle_straw_bale.png
+++ b/castle/textures/castle_straw_bale.png
Binary files differ
diff --git a/castle/textures/castle_street_light.png b/castle/textures/castle_street_light.png
index 81ad148..dc3f72e 100644
--- a/castle/textures/castle_street_light.png
+++ b/castle/textures/castle_street_light.png
Binary files differ
diff --git a/castle/textures/castle_workbench_1.png b/castle/textures/castle_workbench_1.png
index af945b5..da9d997 100644
--- a/castle/textures/castle_workbench_1.png
+++ b/castle/textures/castle_workbench_1.png
Binary files differ
diff --git a/castle/textures/castle_workbench_2.png b/castle/textures/castle_workbench_2.png
index 008a285..da9d997 100644
--- a/castle/textures/castle_workbench_2.png
+++ b/castle/textures/castle_workbench_2.png
Binary files differ
diff --git a/castle/textures/castle_workbench_bottom.png b/castle/textures/castle_workbench_bottom.png
new file mode 100644
index 0000000..c859118
--- /dev/null
+++ b/castle/textures/castle_workbench_bottom.png
Binary files differ
diff --git a/castle/textures/castle_workbench_top.png b/castle/textures/castle_workbench_top.png
index 90e9227..90c0a3f 100644
--- a/castle/textures/castle_workbench_top.png
+++ b/castle/textures/castle_workbench_top.png
Binary files differ
diff --git a/castle/town_item.lua b/castle/town_item.lua
index 64db0e8..57aeb37 100644
--- a/castle/town_item.lua
+++ b/castle/town_item.lua
@@ -1,3 +1,4 @@
+
minetest.register_alias("darkage:box", "castle:crate")
minetest.register_alias("cottages:straw", "farming:straw")
minetest.register_alias("castle:straw", "farming:straw")
@@ -5,6 +6,7 @@ minetest.register_alias("darkage:straw", "farming:straw")
minetest.register_alias("cottages:straw_bale", "castle:bound_straw")
minetest.register_alias("darkage:straw_bale", "castle:bound_straw")
minetest.register_alias("darkage:lamp", "castle:street_light")
+minetest.register_alias("castle:pavement", "castle:pavement_brick")
minetest.register_node("castle:anvil",{
drawtype = "nodebox",
@@ -17,10 +19,10 @@ minetest.register_node("castle:anvil",{
type = "fixed",
fixed = {
{-0.500000,-0.500000,-0.500000,0.500000,-0.250000,0.500000},
- {-0.187500,-0.500000,-0.375000,0.187500,0.312500,0.375000},
- {-0.375000,-0.500000,-0.437500,0.375000,-0.125000,0.437500},
- {-0.500000,0.312500,-0.500000,0.500000,0.500000,0.500000},
- {-0.375000,0.187500,-0.437500,0.375000,0.425000,0.437500},
+ {-0.187500,-0.500000,-0.375000,0.187500,0.312500,0.375000},
+ {-0.375000,-0.500000,-0.437500,0.375000,-0.125000,0.437500},
+ {-0.500000,0.312500,-0.500000,0.500000,0.500000,0.500000},
+ {-0.375000,0.187500,-0.437500,0.375000,0.425000,0.437500},
},
},
})
@@ -36,14 +38,18 @@ minetest.register_craft({
minetest.register_node("castle:workbench",{
description = "Workbench",
- tiles = {"castle_workbench_top.png", "default_wood.png", "castle_workbench_1.png", "castle_workbench_1.png", "castle_workbench_2.png", "castle_workbench_2.png"},
+ tiles = {"castle_workbench_top.png", "castle_workbench_bottom.png", "castle_workbench_1.png", "castle_workbench_1.png", "castle_workbench_2.png", "castle_workbench_2.png"},
paramtype2 = "facedir",
paramtype = "light",
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
drawtype = "normal",
- on_construct = function ( pos )
- local meta = minetest.get_meta( pos )
- meta:set_string( 'formspec', 'size[10,10;]' ..
+ on_construct = function ( pos )
+ local meta = minetest.get_meta( pos )
+ meta:set_string( 'formspec',
+ 'size[10,10;]' ..
+ default.gui_bg ..
+ default.gui_bg_img ..
+ default.gui_slots ..
'label[1,0;Source Material]' ..
'list[context;src;1,1;2,4;]' ..
'label[4,0;Recipe to Use]' ..
@@ -51,12 +57,12 @@ minetest.register_node("castle:workbench",{
'label[7.5,0;Craft Output]' ..
'list[context;dst;8,1;1,4;]' ..
'list[current_player;main;1,6;8,4;]' )
- meta:set_string( 'infotext', 'Workbench' )
- local inv = meta:get_inventory()
- inv:set_size( 'src', 2 * 4 )
+ meta:set_string( 'infotext', 'Workbench' )
+ local inv = meta:get_inventory()
+ inv:set_size( 'src', 2 * 4 )
inv:set_size( 'rec', 3 * 3 )
inv:set_size( 'dst', 1 * 4 )
- end,
+ end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
@@ -66,11 +72,11 @@ minetest.register_node("castle:workbench",{
minetest.log("action", player:get_player_name()..
" moves stuff in workbench at "..minetest.pos_to_string(pos))
end,
- on_metadata_inventory_put = function(pos, listname, index, stack, player)
+ on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" moves stuff to workbench at "..minetest.pos_to_string(pos))
end,
- on_metadata_inventory_take = function(pos, listname, index, stack, player)
+ on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" takes stuff from workbench at "..minetest.pos_to_string(pos))
end,
@@ -83,7 +89,7 @@ local get_recipe = function ( inv )
method = 'normal',
width = 3,
items = needed
- } )
+ })
local totalneed = {}
@@ -190,7 +196,6 @@ minetest.register_craft({
recipe = {
{"default:stonebrick"},
{"default:obsidian"},
-
}
})
@@ -204,6 +209,9 @@ minetest.register_node("castle:crate", {
local meta = minetest.get_meta(pos)
meta:set_string("formspec",
"size[8,9]"..
+ default.gui_bg ..
+ default.gui_bg_img ..
+ default.gui_slots ..
"list[current_name;main;0,1;8,4;]"..
"list[current_player;main;0,5;8,4;]")
meta:set_string("infotext", "Crate")
@@ -219,11 +227,11 @@ minetest.register_node("castle:crate", {
minetest.log("action", player:get_player_name()..
" moves stuff in crate at "..minetest.pos_to_string(pos))
end,
- on_metadata_inventory_put = function(pos, listname, index, stack, player)
+ on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" moves stuff to crate at "..minetest.pos_to_string(pos))
end,
- on_metadata_inventory_take = function(pos, listname, index, stack, player)
+ on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" takes stuff from crate at "..minetest.pos_to_string(pos))
end,
@@ -259,15 +267,7 @@ minetest.register_craft({
}
})
-stairs.register_stair_and_slab("straw", "farming:straw",
- {choppy=3, flammable=1, oddly_breakable_by_hand=3},
- {"farming_straw.png"},
- "Castle Straw Stair",
- "Castle Straw Slab",
- default.node_sound_leaves_defaults()
-)
-
-minetest.register_node("castle:pavement", {
+minetest.register_node("castle:pavement_brick", {
description = "Paving Stone",
drawtype = "normal",
tiles = {"castle_pavement_brick.png"},
@@ -276,14 +276,13 @@ minetest.register_node("castle:pavement", {
})
minetest.register_craft({
- output = "castle:pavement 4",
+ output = "castle:pavement_brick 4",
recipe = {
{"default:stone", "default:cobble"},
{"default:cobble", "default:stone"},
}
})
-
minetest.register_node("castle:light",{
drawtype = "glasslike",
description = "Light Block",
@@ -303,4 +302,3 @@ minetest.register_craft({
}
})
-
diff --git a/digilines/internal.lua b/digilines/internal.lua
index f29cc8d..2319c16 100644
--- a/digilines/internal.lua
+++ b/digilines/internal.lua
@@ -24,8 +24,6 @@ function digiline:getAnyInputRules(pos)
if spec.effector then
return digiline:importrules(spec.effector.rules, node)
end
-
- return rules
end
function digiline:getAnyOutputRules(pos)
diff --git a/itemframes/depends.txt b/itemframes/depends.txt
index 4ad96d5..85a4dc2 100644
--- a/itemframes/depends.txt
+++ b/itemframes/depends.txt
@@ -1 +1,2 @@
default
+mesecons_mvps?
diff --git a/itemframes/init.lua b/itemframes/init.lua
index 000eab6..8900dd5 100644
--- a/itemframes/init.lua
+++ b/itemframes/init.lua
@@ -4,10 +4,10 @@ screwdriver = screwdriver or {}
minetest.register_entity("itemframes:item",{
hp_max = 1,
visual="wielditem",
- visual_size={x=.33,y=.33},
- collisionbox = {0,0,0,0,0,0},
- physical=false,
- textures={"air"},
+ visual_size={x = 0.33, y = 0.33},
+ collisionbox = {0, 0, 0, 0, 0, 0},
+ physical = false,
+ textures = {"air"},
on_activate = function(self, staticdata)
if tmp.nodename ~= nil and tmp.texture ~= nil then
self.nodename = tmp.nodename
@@ -24,10 +24,10 @@ minetest.register_entity("itemframes:item",{
end
end
if self.texture ~= nil then
- self.object:set_properties({textures={self.texture}})
+ self.object:set_properties({textures = {self.texture}})
end
if self.nodename == "itemframes:pedestal" then
- self.object:set_properties({automatic_rotate=1})
+ self.object:set_properties({automatic_rotate = 1})
end
end,
get_staticdata = function(self)
@@ -38,12 +38,12 @@ minetest.register_entity("itemframes:item",{
end,
})
-
local facedir = {}
-facedir[0] = {x=0,y=0,z=1}
-facedir[1] = {x=1,y=0,z=0}
-facedir[2] = {x=0,y=0,z=-1}
-facedir[3] = {x=-1,y=0,z=0}
+
+facedir[0] = {x = 0, y = 0, z = 1}
+facedir[1] = {x = 1, y = 0, z = 0}
+facedir[2] = {x = 0, y = 0, z = -1}
+facedir[3] = {x = -1, y = 0, z = 0}
local remove_item = function(pos, node)
local objs = nil
@@ -68,17 +68,17 @@ local update_item = function(pos, node)
if node.name == "itemframes:frame" then
local posad = facedir[node.param2]
if not posad then return end
- pos.x = pos.x + posad.x*6.5/16
- pos.y = pos.y + posad.y*6.5/16
- pos.z = pos.z + posad.z*6.5/16
+ pos.x = pos.x + posad.x * 6.5 / 16
+ pos.y = pos.y + posad.y * 6.5 / 16
+ pos.z = pos.z + posad.z * 6.5 / 16
elseif node.name == "itemframes:pedestal" then
- pos.y = pos.y + 12/16+.33
+ pos.y = pos.y + 12 / 16 + 0.33
end
tmp.nodename = node.name
tmp.texture = ItemStack(meta:get_string("item")):get_name()
local e = minetest.add_entity(pos,"itemframes:item")
if node.name == "itemframes:frame" then
- local yaw = math.pi*2 - node.param2 * math.pi/2
+ local yaw = math.pi * 2 - node.param2 * math.pi / 2
e:setyaw(yaw)
end
end
@@ -100,15 +100,21 @@ end
minetest.register_node("itemframes:frame",{
description = "Item frame",
drawtype = "nodebox",
- node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} },
- selection_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} },
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5}
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5}
+ },
tiles = {"itemframes_frame.png"},
inventory_image = "itemframes_frame.png",
wield_image = "itemframes_frame.png",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
- groups = { choppy=2,dig_immediate=2 },
+ groups = {choppy = 2, dig_immediate = 2},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
on_rotate = screwdriver.disallow,
@@ -152,16 +158,21 @@ minetest.register_node("itemframes:frame",{
minetest.register_node("itemframes:pedestal",{
description = "Pedestal",
drawtype = "nodebox",
- node_box = { type = "fixed", fixed = {
- {-7/16, -8/16, -7/16, 7/16, -7/16, 7/16}, -- bottom plate
- {-6/16, -7/16, -6/16, 6/16, -6/16, 6/16}, -- bottom plate (upper)
- {-0.25, -6/16, -0.25, 0.25, 11/16, 0.25}, -- pillar
- {-7/16, 11/16, -7/16, 7/16, 12/16, 7/16}, -- top plate
- } },
- --selection_box = { type = "fixed", fixed = {-7/16, -0.5, -7/16, 7/16, 12/16, 7/16} },
+ node_box = {
+ type = "fixed", fixed = {
+ {-7/16, -8/16, -7/16, 7/16, -7/16, 7/16}, -- bottom plate
+ {-6/16, -7/16, -6/16, 6/16, -6/16, 6/16}, -- bottom plate (upper)
+ {-0.25, -6/16, -0.25, 0.25, 11/16, 0.25}, -- pillar
+ {-7/16, 11/16, -7/16, 7/16, 12/16, 7/16}, -- top plate
+ }
+ },
+ --selection_box = {
+ -- type = "fixed",
+ -- fixed = {-7/16, -0.5, -7/16, 7/16, 12/16, 7/16}
+ --},
tiles = {"itemframes_pedestal.png"},
paramtype = "light",
- groups = { cracky=3 },
+ groups = {cracky = 3},
sounds = default.node_sound_defaults(),
on_rotate = screwdriver.disallow,
after_place_node = function(pos, placer, itemstack)
@@ -204,7 +215,7 @@ minetest.register_node("itemframes:pedestal",{
-- due to /clearobjects or similar
minetest.register_abm({
- nodenames = { "itemframes:frame", "itemframes:pedestal" },
+ nodenames = {"itemframes:frame", "itemframes:pedestal"},
interval = 15,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
@@ -233,6 +244,7 @@ minetest.register_craft({
{'group:stick', 'group:stick', 'group:stick'},
}
})
+
minetest.register_craft({
output = 'itemframes:pedestal',
recipe = {
@@ -241,3 +253,9 @@ minetest.register_craft({
{'default:stone', 'default:stone', 'default:stone'},
}
})
+
+-- stop mesecon pistons from pushing itemframes and pedestals
+if minetest.get_modpath("mesecons_mvps") then
+ mesecon.register_mvps_stopper("itemframes:frame")
+ mesecon.register_mvps_stopper("itemframes:pedestal")
+end
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index 7df2bdc..e669f93 100644
--- a/mesecons_luacontroller/init.lua
+++ b/mesecons_luacontroller/init.lua
@@ -216,6 +216,17 @@ local function safe_string_rep(str, n)
return string.rep(str, n)
end
+-- string.find with a pattern can be used to DoS the server.
+-- Therefore, limit string.find to patternless matching.
+local function safe_string_find(...)
+ if (select(4, ...)) ~= true then
+ debug.sethook() -- Clear hook
+ error("string.find: 'plain' (fourth parameter) must always be true in a LuaController")
+ end
+
+ return string.find(...)
+end
+
local function remove_functions(x)
local tp = type(x)
if tp == "table" then
@@ -292,6 +303,7 @@ local function create_environment(pos, mem, event)
rep = safe_string_rep,
reverse = string.reverse,
sub = string.sub,
+ find = safe_string_find,
},
math = {
abs = math.abs,
@@ -354,22 +366,6 @@ local function timeout()
end
-local function code_prohibited(code)
- -- LuaJIT doesn't increment the instruction counter when running
- -- loops, so we have to sanitize inputs if we're using LuaJIT.
- if not rawget(_G, "jit") then
- return false
- end
- local prohibited = {"while", "for", "repeat", "until", "goto"}
- code = " "..code.." "
- for _, p in ipairs(prohibited) do
- if string.find(code, "[^%w_]"..p.."[^%w_]") then
- return "Prohibited command: "..p
- end
- end
-end
-
-
local function create_sandbox(code, env)
if code:byte(1) == 27 then
return nil, "Binary code prohibited."
@@ -378,24 +374,17 @@ local function create_sandbox(code, env)
if not f then return nil, msg end
setfenv(f, env)
+ -- Turn off JIT optimization for user code so that count
+ -- events are generated when adding debug hooks
+ if rawget(_G, "jit") then
+ jit.off(f, true)
+ end
+
return function(...)
- -- Normal Lua: Use instruction counter to stop execution
- -- after luacontroller_maxevents.
- -- LuaJIT: Count function calls instead of instructions, allows usage
- -- of function keyword. However, LuaJIT still doesn't trigger
- -- lines events when using infinite loops.
+ -- Use instruction counter to stop execution
+ -- after luacontroller_maxevents
local maxevents = mesecon.setting("luacontroller_maxevents", 10000)
- if not rawget(_G, "jit") then
- debug.sethook(timeout, "", maxevents)
- else
- local events = 0
- debug.sethook(function ()
- events = events + 1
- if events > maxevents then
- timeout()
- end
- end, "c")
- end
+ debug.sethook(timeout, "", maxevents)
local ok, ret = pcall(f, ...)
debug.sethook() -- Clear hook
if not ok then error(ret, 0) end
@@ -432,9 +421,6 @@ local function run(pos, event)
local mem = load_memory(meta)
local code = meta:get_string("code")
- local err = code_prohibited(code)
- if err then return err end
-
-- Create environment
local env = create_environment(pos, mem, event)
diff --git a/pipeworks/devices.lua b/pipeworks/devices.lua
index 52f3002..e4c5f43 100644
--- a/pipeworks/devices.lua
+++ b/pipeworks/devices.lua
@@ -3,7 +3,7 @@
local pipereceptor_on = nil
local pipereceptor_off = nil
-if mesecon then
+if minetest.get_modpath("mesecons") then
pipereceptor_on = {
receptor = {
state = mesecon.state.on,
diff --git a/pipeworks/filter-injector.lua b/pipeworks/filter-injector.lua
index bcfcbc9..4c407f6 100644
--- a/pipeworks/filter-injector.lua
+++ b/pipeworks/filter-injector.lua
@@ -12,6 +12,13 @@ end
local function set_filter_formspec(data, meta)
local itemname = data.wise_desc.." Filter-Injector"
+ local exmatch_button = ""
+ if data.stackwise then
+ exmatch_button =
+ fs_helpers.cycling_button(meta, "button[4,3.5;4,1", "exmatch_mode",
+ {"Exact match - off",
+ "Exact match - on "})
+ end
local formspec = "size[8,8.5]"..
"item_image[0,0;1,1;pipeworks:"..data.name.."]"..
"label[1,0;"..minetest.formspec_escape(itemname).."]"..
@@ -21,12 +28,13 @@ local function set_filter_formspec(data, meta)
{"Sequence slots by Priority",
"Sequence slots Randomly",
"Sequence slots by Rotation"})..
+ exmatch_button..
"list[current_player;main;0,4.5;8,4;]"
meta:set_string("formspec", formspec)
end
-- todo SOON: this function has *way too many* parameters
-local function grabAndFire(data,slotseq_mode,filtmeta,frominv,frominvname,frompos,fromnode,filterfor,fromtube,fromdef,dir,fakePlayer,all)
+local function grabAndFire(data,slotseq_mode,exmatch_mode,filtmeta,frominv,frominvname,frompos,fromnode,filterfor,fromtube,fromdef,dir,fakePlayer,all)
local sposes = {}
for spos,stack in ipairs(frominv:get_list(frominvname)) do
local matches
@@ -79,7 +87,11 @@ local function grabAndFire(data,slotseq_mode,filtmeta,frominv,frominvname,frompo
if all then
count = math.min(stack:get_count(), doRemove)
if filterfor.count and filterfor.count > 1 then
- count = math.min(filterfor.count, count)
+ if exmatch_mode ~= 0 and filterfor.count > count then
+ return false
+ else
+ count = math.min(filterfor.count, count)
+ end
end
else
count = 1
@@ -127,13 +139,14 @@ local function punch_filter(data, filtpos, filtnode)
end
if #filters == 0 then table.insert(filters, "") end
local slotseq_mode = filtmeta:get_int("slotseq_mode")
+ local exact_match = filtmeta:get_int("exmatch_mode")
local frommeta = minetest.get_meta(frompos)
local frominv = frommeta:get_inventory()
if fromtube.before_filter then fromtube.before_filter(frompos) end
for _, frominvname in ipairs(type(fromtube.input_inventory) == "table" and fromtube.input_inventory or {fromtube.input_inventory}) do
local done = false
for _, filterfor in ipairs(filters) do
- if grabAndFire(data, slotseq_mode, filtmeta, frominv, frominvname, frompos, fromnode, filterfor, fromtube, fromdef, dir, fakePlayer, data.stackwise) then
+ if grabAndFire(data, slotseq_mode, exact_match, filtmeta, frominv, frominvname, frompos, fromnode, filterfor, fromtube, fromdef, dir, fakePlayer, data.stackwise) then
done = true
break
end
diff --git a/pipeworks/signal_tubes.lua b/pipeworks/signal_tubes.lua
index bfce14a..c7b61ec 100644
--- a/pipeworks/signal_tubes.lua
+++ b/pipeworks/signal_tubes.lua
@@ -58,10 +58,10 @@ if pipeworks.enable_detector_tube then
})
minetest.register_craft( {
- output = "pipeworks:conductor_tube_off_1 6",
+ output = "pipeworks:detector_tube_off_1 2",
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
- { "mesecons:mesecon", "mesecons:mesecon", "mesecons:mesecon" },
+ { "mesecons:mesecon", "mesecons_materials:silicon", "mesecons:mesecon" },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
},
})
@@ -99,10 +99,10 @@ if pipeworks.enable_conductor_tube then
})
minetest.register_craft( {
- output = "pipeworks:detector_tube_off_1 2",
+ output = "pipeworks:conductor_tube_off_1 6",
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
- { "mesecons:mesecon", "mesecons_materials:silicon", "mesecons:mesecon" },
+ { "mesecons:mesecon", "mesecons:mesecon", "mesecons:mesecon" },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
},
})
diff --git a/quartz/README.txt b/quartz/README.txt
index e8674ad..0db0cf8 100644
--- a/quartz/README.txt
+++ b/quartz/README.txt
@@ -15,7 +15,7 @@ stairs (found in minetest_game)
moreblocks (optional, for stairsplus support)
Please report bugs at the github issue tracker:
-https://github.com/4Evergreen4/quartz/issues/
+https://github.com/minetest-mods/quartz/issues/
Crafting:
diff --git a/quartz/init.lua b/quartz/init.lua
index 6b0a41b..7bcbaea 100644
--- a/quartz/init.lua
+++ b/quartz/init.lua
@@ -153,7 +153,7 @@ minetest.register_abm({
-- Compatibility with stairsplus
--
-if minetest.get_modpath("moreblocks") and enable_stairsplus then
+if minetest.get_modpath("moreblocks") and ENABLE_STAIRSPLUS then
register_stair_slab_panel_micro("quartz", "block", "quartz:block",
{cracky=3},
{"quartz_block.png"},
@@ -187,7 +187,7 @@ end
-- Deprecated
--
-if enable_horizontal_pillar then
+if ENABLE_HORIZONTAL_PILLAR then
-- Quartz Pillar (horizontal)
minetest.register_node("quartz:pillar_horizontal", {
description = "Quartz Pillar Horizontal",
diff --git a/quartz/mod.conf b/quartz/mod.conf
new file mode 100644
index 0000000..a5f15f3
--- /dev/null
+++ b/quartz/mod.conf
@@ -0,0 +1 @@
+name = quartz
diff --git a/quartz/settings.txt b/quartz/settings.txt
index 246021e..7bed3f8 100644
--- a/quartz/settings.txt
+++ b/quartz/settings.txt
@@ -1,7 +1,7 @@
-- Set this to true to allow usage of the stairsplus mod in moreblocks
-enable_stairsplus = false
+ENABLE_STAIRSPLUS = false
-- This enables the old horizontal pillar block(deprecated, be sure to convert them back to normal pillars)
-enable_horizontal_pillar = true
+ENABLE_HORIZONTAL_PILLAR = true