summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blox/init.lua15
-rw-r--r--bobblocks/blocks.lua9
-rw-r--r--castle/LICENSE21
-rw-r--r--castle/README.txt58
-rw-r--r--castle/arrowslit.lua133
-rw-r--r--castle/crossbow.lua443
-rw-r--r--castle/depends.txt10
-rw-r--r--castle/description.txt1
-rw-r--r--castle/init.lua395
-rw-r--r--castle/jailbars.lua22
-rw-r--r--castle/mod.conf1
-rw-r--r--castle/models/LICENSE.txt10
-rw-r--r--castle/models/castle_crossbow_bolt.b3dbin21158 -> 0 bytes
-rw-r--r--castle/models/castle_crossbow_bolt.blendbin493796 -> 0 bytes
-rw-r--r--castle/models/castle_crossbow_bolt_uv.pngbin157 -> 0 bytes
-rw-r--r--castle/models/castle_tapestry.obj212
-rw-r--r--castle/models/castle_tapestry_long.obj220
-rw-r--r--castle/models/castle_tapestry_very_long.obj228
-rw-r--r--castle/murder_hole.lua50
-rw-r--r--castle/orbs.lua0
-rw-r--r--castle/pillars.lua108
-rw-r--r--castle/rope.lua124
-rw-r--r--castle/screenshot.pngbin209588 -> 0 bytes
-rw-r--r--castle/shields_decor.lua103
-rw-r--r--castle/sounds/LICENSE.txt52
-rw-r--r--castle/sounds/castle_birds.oggbin14797 -> 0 bytes
-rw-r--r--castle/sounds/castle_crossbow_bolt.oggbin5967 -> 0 bytes
-rw-r--r--castle/sounds/castle_crossbow_click.oggbin7377 -> 0 bytes
-rw-r--r--castle/sounds/castle_crossbow_reload.oggbin12213 -> 0 bytes
-rw-r--r--castle/sounds/castle_crossbow_shoot.oggbin8112 -> 0 bytes
-rw-r--r--castle/sounds/castle_orbs.oggbin17034 -> 0 bytes
-rw-r--r--castle/sounds/castle_owl.oggbin50950 -> 0 bytes
-rw-r--r--castle/tapestry.lua196
-rw-r--r--castle/textures/LICENSE.txt84
-rw-r--r--castle/textures/castle_battleaxe.pngbin358 -> 0 bytes
-rw-r--r--castle/textures/castle_chandelier.pngbin360 -> 0 bytes
-rw-r--r--castle/textures/castle_chandelier_chain.pngbin169 -> 0 bytes
-rw-r--r--castle/textures/castle_chandelier_wield.pngbin316 -> 0 bytes
-rw-r--r--castle/textures/castle_corner_stonewall1.pngbin696 -> 0 bytes
-rw-r--r--castle/textures/castle_corner_stonewall2.pngbin682 -> 0 bytes
-rw-r--r--castle/textures/castle_corner_stonewall_tb.pngbin691 -> 0 bytes
-rw-r--r--castle/textures/castle_crate.pngbin344 -> 0 bytes
-rw-r--r--castle/textures/castle_crate_top.pngbin395 -> 0 bytes
-rw-r--r--castle/textures/castle_crossbow_bolt_inv.pngbin146 -> 0 bytes
-rw-r--r--castle/textures/castle_crossbow_hit.pngbin516 -> 0 bytes
-rw-r--r--castle/textures/castle_crossbow_inv.pngbin280 -> 0 bytes
-rw-r--r--castle/textures/castle_crossbow_loaded.pngbin295 -> 0 bytes
-rw-r--r--castle/textures/castle_door_jail.pngbin878 -> 0 bytes
-rw-r--r--castle/textures/castle_door_oak.pngbin1343 -> 0 bytes
-rw-r--r--castle/textures/castle_dungeon_stone.pngbin543 -> 0 bytes
-rw-r--r--castle/textures/castle_grey.pngbin70 -> 0 bytes
-rw-r--r--castle/textures/castle_hide.pngbin618 -> 0 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_back.pngbin522 -> 0 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_front.pngbin537 -> 0 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_side.pngbin374 -> 0 bytes
-rw-r--r--castle/textures/castle_ironbound_chest_top.pngbin522 -> 0 bytes
-rw-r--r--castle/textures/castle_jail_door_inv.pngbin186 -> 0 bytes
-rw-r--r--castle/textures/castle_jailbars.pngbin253 -> 0 bytes
-rw-r--r--castle/textures/castle_oak_door_inv.pngbin411 -> 0 bytes
-rw-r--r--castle/textures/castle_orb_day.pngbin112 -> 0 bytes
-rw-r--r--castle/textures/castle_orb_day_weild.pngbin185 -> 0 bytes
-rw-r--r--castle/textures/castle_orb_night.pngbin109 -> 0 bytes
-rw-r--r--castle/textures/castle_orb_night_weild.pngbin184 -> 0 bytes
-rw-r--r--castle/textures/castle_pavement_brick.pngbin700 -> 0 bytes
-rw-r--r--castle/textures/castle_ropebox_side_1.pngbin342 -> 0 bytes
-rw-r--r--castle/textures/castle_ropebox_side_2.pngbin286 -> 0 bytes
-rw-r--r--castle/textures/castle_ropebox_top.pngbin262 -> 0 bytes
-rw-r--r--castle/textures/castle_ropes.pngbin278 -> 0 bytes
-rw-r--r--castle/textures/castle_rubble.pngbin563 -> 0 bytes
-rw-r--r--castle/textures/castle_shield_back.pngbin620 -> 0 bytes
-rw-r--r--castle/textures/castle_shield_front.pngbin520 -> 0 bytes
-rw-r--r--castle/textures/castle_shield_front_2.pngbin701 -> 0 bytes
-rw-r--r--castle/textures/castle_shield_front_3.pngbin536 -> 0 bytes
-rw-r--r--castle/textures/castle_shield_side.pngbin94 -> 0 bytes
-rw-r--r--castle/textures/castle_shield_side_2.pngbin91 -> 0 bytes
-rw-r--r--castle/textures/castle_shield_side_3.pngbin101 -> 0 bytes
-rw-r--r--castle/textures/castle_slate.pngbin261 -> 0 bytes
-rw-r--r--castle/textures/castle_space.pngbin151 -> 0 bytes
-rw-r--r--castle/textures/castle_steel.pngbin214 -> 0 bytes
-rw-r--r--castle/textures/castle_stonewall.pngbin660 -> 0 bytes
-rw-r--r--castle/textures/castle_straw_bale.pngbin756 -> 0 bytes
-rw-r--r--castle/textures/castle_street_light.pngbin465 -> 0 bytes
-rw-r--r--castle/textures/castle_tapestry.pngbin323 -> 0 bytes
-rw-r--r--castle/textures/castle_tapestry_inv.pngbin2062 -> 0 bytes
-rw-r--r--castle/textures/castle_tapestry_long_inv.pngbin1822 -> 0 bytes
-rw-r--r--castle/textures/castle_tapestry_very_long_inv.pngbin1376 -> 0 bytes
-rw-r--r--castle/textures/castle_workbench_back.pngbin383 -> 0 bytes
-rw-r--r--castle/textures/castle_workbench_bottom.pngbin369 -> 0 bytes
-rw-r--r--castle/textures/castle_workbench_front.pngbin391 -> 0 bytes
-rw-r--r--castle/textures/castle_workbench_side.pngbin342 -> 0 bytes
-rw-r--r--castle/textures/castle_workbench_top.pngbin336 -> 0 bytes
-rw-r--r--castle/town_item.lua386
-rw-r--r--castle_tapestries/init.lua15
-rw-r--r--coloredwood/init.lua23
-rw-r--r--extranodes/init.lua6
-rw-r--r--homedecor/bathroom_furniture.lua3
-rw-r--r--homedecor/bedroom.lua16
-rw-r--r--homedecor/furniture.lua10
-rw-r--r--homedecor/handlers/expansion.lua56
-rw-r--r--homedecor/lighting.lua24
-rw-r--r--homedecor/shutters.lua13
-rw-r--r--homedecor/window_treatments.lua10
-rw-r--r--ilights/init.lua5
-rw-r--r--lavalamp/init.lua2
-rw-r--r--lrfurn/armchairs.lua5
-rw-r--r--lrfurn/longsofas.lua1
-rw-r--r--lrfurn/sofas.lua1
-rw-r--r--stained_glass/init.lua10
-rw-r--r--unifiedbricks/init.lua11
-rw-r--r--unifieddyes/init.lua80
110 files changed, 253 insertions, 2919 deletions
diff --git a/blox/init.lua b/blox/init.lua
index dee170e..cfcc71e 100644
--- a/blox/init.lua
+++ b/blox/init.lua
@@ -117,6 +117,7 @@ for _, nodeclass in ipairs(NodeClass) do
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -136,6 +137,7 @@ for _, nodeclass in ipairs(NodeClass) do
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -155,6 +157,7 @@ for _, nodeclass in ipairs(NodeClass) do
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -176,6 +179,7 @@ minetest.register_node("blox:wood_tinted", {
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -190,6 +194,7 @@ minetest.register_node("blox:stone_square", {
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -204,6 +209,7 @@ minetest.register_node("blox:cobble_tinted", {
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:cobble"
})
@@ -219,6 +225,7 @@ minetest.register_node("blox:stone_tinted", {
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:cobble"
})
@@ -233,12 +240,14 @@ table.insert(blox.old_89_color_nodes, "blox:stone_tinted")
minetest.override_item("default:stone", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "blox:stone_tinted",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {cracky = 3, stone = 1, ud_param2_colorable = 1},
})
minetest.override_item("default:cobble", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "blox:cobble_tinted",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {cracky = 3, stone = 2, ud_param2_colorable = 1},
})
@@ -248,8 +257,10 @@ if moreblocks then
minetest.override_item("moreblocks:stone_tile", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "blox:stone_square",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {cracky = 3, ud_param2_colorable = 1},
})
+
minetest.override_item("blox:stone_square", {
drop = "moreblocks:stone_tile",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
@@ -258,6 +269,7 @@ if moreblocks then
minetest.override_item("moreblocks:circle_stone_bricks", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "blox:stone_loop",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {cracky = 3, ud_param2_colorable = 1},
})
minetest.override_item("blox:stone_loop", {
@@ -268,6 +280,7 @@ if moreblocks then
minetest.override_item("moreblocks:iron_checker", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "blox:stone_checker",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {cracky = 3, ud_param2_colorable = 1},
})
minetest.override_item("blox:stone_checker", {
@@ -278,6 +291,7 @@ if moreblocks then
minetest.override_item("moreblocks:wood_tile", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "blox:wood_quarter",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1},
})
minetest.override_item("blox:wood_quarter", {
@@ -288,6 +302,7 @@ if moreblocks then
minetest.override_item("moreblocks:wood_tile_flipped", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "blox:wood_quarter",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1},
})
else
diff --git a/bobblocks/blocks.lua b/bobblocks/blocks.lua
index 21d8709..a7dd602 100644
--- a/bobblocks/blocks.lua
+++ b/bobblocks/blocks.lua
@@ -53,6 +53,7 @@ minetest.register_node("bobblocks:block", {
},
on_rightclick = bobblocks.update_bobblock,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -74,6 +75,7 @@ minetest.register_node("bobblocks:block_off", {
},
on_rightclick = bobblocks.update_bobblock,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -99,6 +101,7 @@ minetest.register_node("bobblocks:pole", {
},
on_rightclick = bobblocks.update_bobblock,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -124,10 +127,11 @@ minetest.register_node("bobblocks:pole_off", {
},
on_rightclick = bobblocks.update_bobblock,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
--- old static nodes grandfathered-in because they have a different texture or usage than the colored ones.
+-- old nodes grandfathered-in because they have a different texture or usage than the colored ones.
minetest.register_node("bobblocks:btm", {
description = "Bobs TransMorgifier v5",
@@ -160,6 +164,7 @@ minetest.register_node("bobblocks:wavyblock", {
},
on_rightclick = bobblocks.update_bobblock,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -182,6 +187,7 @@ minetest.register_node("bobblocks:wavyblock_off", {
},
on_rightclick = bobblocks.update_bobblock,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -199,6 +205,7 @@ minetest.register_node("bobblocks:wavypole", {
sounds = default.node_sound_glass_defaults(),
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
--light_source = LIGHT_MAX-0,
})
diff --git a/castle/LICENSE b/castle/LICENSE
deleted file mode 100644
index 456d091..0000000
--- a/castle/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Minetest Mods Team
-
-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
-AUTHORS OR COPYRIGHT HOLDERS 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.
diff --git a/castle/README.txt b/castle/README.txt
deleted file mode 100644
index 3baca1a..0000000
--- a/castle/README.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-=-=-=-=-=-=-=-=-=-=
-
-Castles Mod
-by: Philipbenr And DanDuncombe
-
-=-=-=-=-=-=-=-=-=-=
-
-Licence: MIT, LGPLv2.1 (Crossbow)
-
-see: LICENSE
-
-=-=-=-=-=-=-=-=-=-=
-
-This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons.
-
-=-=-=-=-=-=-=-=-=-=
-
-Contains as of now:
-
---Walls, Corner-walls,
---Castlestone Stairs, Slabs, and Pillars
---Jailbars
---Hides
---Arrows and Arrowslits
---Rubble
---Doors
---Weapons
---Chandeliers
---Tapestries
---and more!
-
-=-=-=-=-=-=-=-=-=-=
-
-Big release coming soon. ;) Stay tuned.
-
-Planned features (anything with question mark means that I am either unsure or don't know how to accomplish it ;)
-
---More/Better weapons
---More decorations
---More nodes
---Redone columns
---More doors
---Gatehouse mod
---Armor
---More magical items (mana, orbs, potions...)
---Crowns/capes/player decor
---Flags
---Brewery/Liquor (liquor effects is another thing altogether)
---Tannery?
---Dye Vats?
---Books? (that is an interesting one... I'll write a post on it later)
---Guards?
---Player status (King, queen, etc.)?
---Foods?
---Horses/Livestock?
---Ruins?
-
---Modpack Configurator
diff --git a/castle/arrowslit.lua b/castle/arrowslit.lua
deleted file mode 100644
index 275d817..0000000
--- a/castle/arrowslit.lua
+++ /dev/null
@@ -1,133 +0,0 @@
-minetest.register_alias("castle:arrowslit", "castle:arrowslit_stonewall")
-minetest.register_alias("castle:arrowslit_hole", "castle:arrowslit_stonewall_hole")
-minetest.register_alias("castle:arrowslit", "castle:arrowslit_stonewall_cross")
-
-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"},
-}
-
-for _, row in ipairs(arrowslit.types) do
- local name = row[1]
- local desc = row[2]
- local tile = row[3]
- local craft_material = row[4]
- -- Node Definition
- minetest.register_node("castle:arrowslit_"..name, {
- drawtype = "nodebox",
- description = desc.." Arrowslit",
- tiles = {tile..".png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.375000,-0.500000,-0.062500,0.375000,-0.312500},
- {0.062500,-0.375000,-0.500000,0.500000,0.375000,-0.312500},
- {-0.500000,0.375000,-0.500000,0.500000,0.500000,-0.312500},
- {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,-0.312500},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,-0.500000,0.500000,0.500000,-0.312500},
- },
- },
- })
- minetest.register_node("castle:arrowslit_"..name.."_cross", {
- drawtype = "nodebox",
- description = desc.." Arrowslit with Cross",
- tiles = {tile..".png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.125000,-0.500000,-0.062500,0.375000,-0.312500},
- {0.062500,-0.125000,-0.500000,0.500000,0.375000,-0.312500},
- {-0.500000,0.375000,-0.500000,0.500000,0.500000,-0.312500},
- {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,-0.312500},
- {0.062500,-0.375000,-0.500000,0.500000,-0.250000,-0.312500},
- {-0.500000,-0.375000,-0.500000,-0.062500,-0.250000,-0.312500},
- {-0.500000,-0.250000,-0.500000,-0.187500,-0.125000,-0.312500},
- {0.187500,-0.250000,-0.500000,0.500000,-0.125000,-0.312500},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,-0.500000,0.500000,0.500000,-0.312500},
- },
- },
- })
- minetest.register_node("castle:arrowslit_"..name.."_hole", {
- drawtype = "nodebox",
- description = desc.." Arrowslit with Hole",
- tiles = {tile..".png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.375000,-0.500000,-0.125000,0.375000,-0.312500},
- {0.125000,-0.375000,-0.500000,0.500000,0.375000,-0.312500},
- {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,-0.312500},
- {0.062500,-0.125000,-0.500000,0.125000,0.375000,-0.312500},
- {-0.125000,-0.125000,-0.500000,-0.062500,0.375000,-0.312500},
- {-0.500000,0.375000,-0.500000,0.500000,0.500000,-0.312500},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,-0.500000,0.500000,0.500000,-0.312500},
- },
- },
- })
- if craft_material then
- --Choose craft material
- minetest.register_craft({
- output = "castle:arrowslit_"..name.." 6",
- recipe = {
- {craft_material,"", craft_material},
- {craft_material,"", craft_material},
- {craft_material,"", craft_material} },
- })
- end
- if craft_material then
- minetest.register_craft({
- output = "castle:arrowslit_"..name.."_cross",
- recipe = {
- {"castle:arrowslit_"..name} },
- })
- end
- if craft_material then
- minetest.register_craft({
- output = "castle:arrowslit_"..name.."_hole",
- recipe = {
- {"castle:arrowslit_"..name.."_cross"} },
- })
- end
- if craft_material then
- minetest.register_craft({
- output = "castle:arrowslit_"..name,
- recipe = {
- {"castle:arrowslit_"..name.."_hole"} },
- })
- end
-end
diff --git a/castle/crossbow.lua b/castle/crossbow.lua
deleted file mode 100644
index c752779..0000000
--- a/castle/crossbow.lua
+++ /dev/null
@@ -1,443 +0,0 @@
---[[
-Minetest Mod - Simple Shooter [shooter] 0.5.3
-=======================================
-
-License Source Code: 2013 Stuart Jones - LGPL v2.1
-
-License Textures: Stuart Jones - WTFPL
-
-Licence Models: Stuart Jones - CC-BY-SA 3.0
-
-License Sounds: freesound.org
-
---]]
-local crossbow={}
-
-minetest.register_alias("crossbow", "castle:crossbow")
-minetest.register_alias("bolt", "castle:crossbow_bolt")
-
-CROSSBOW_USES = 300
-CROSSBOW_BOLT_TOOL_CAPS = {damage_groups={fleshy=4}}
-CROSSBOW_BOLT_LIFETIME = 60-- 1 minute
-CROSSBOW_ENABLE_PARTICLE_FX = false
-CROSSBOW_ENABLE_PROTECTION = true
-CROSSBOW_EXPLOSION_TEXTURE = "castle_crossbow_hit.png"
-CROSSBOW_ALLOW_NODES = true
-CROSSBOW_ALLOW_ENTITIES = true
-CROSSBOW_ALLOW_PLAYERS = true
-CROSSBOW_PLAYER_OFFSET = {x=0, y=1, z=0}
-CROSSBOW_ENTITY_OFFSET = {x=0, y=0, z=0}
-CROSSBOW_ENTITIES = {
-"mobs:chicken",
-"mobs:cow",
-"mobs:dirt_monster",
-"mobs:dungeon_master",
-"mobs:goat",
-"mobs:mese_monster",
-"mobs:npc",
-"mobs:oerkki",
-"mobs:pig",
-"mobs:pumba",
-"mobs:rat",
-"mobs:rhino",
-"mobs:sand_monster",
-"mobs:sheep",
-"mobs:spider",
-"mobs:stone_monster",
-"mobs:tree_monster",
-}
-
-if minetest.is_singleplayer() == true then
- CROSSBOW_ALLOW_ENTITIES = true
- CROSSBOW_ALLOW_PLAYERS = true
-end
-
-local allowed_entities = {}
-for _,v in ipairs(CROSSBOW_ENTITIES) do
- allowed_entities[v] = 1
-end
-
-local function get_dot_product(v1, v2)
- return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z
-end
-
-local function get_particle_pos(p, v, d)
- return vector.add(p, vector.multiply(v, {x=d, y=d, z=d}))
-end
-
-function crossbow:spawn_particles(pos, texture)
- if CROSSBOW_ENABLE_PARTICLE_FX == true then
- if type(texture) ~= "string" then
- 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
- )
- end
-end
-
-function crossbow:punch_node(pos, def)
- local node = minetest.get_node(pos)
- if not node then
- return
- end
- local item = minetest.registered_items[node.name]
- if not item then
- return
- end
- if CROSSBOW_ENABLE_PROTECTION then
- if minetest.is_protected(pos, def.name) then
- return
- end
- end
- if item.groups then
- for k, v in pairs(def.groups) do
- local level = item.groups[k] or 0
- if level >= v then
- minetest.remove_node(pos)
- if item.tiles then
- if item.tiles[1] then
- crossbow:spawn_particles(pos, item.tiles[1])
- end
- end
- break
- end
- end
- end
-end
-
-function crossbow:is_valid_object(object)
- if object then
- if object:is_player() == true then
- return CROSSBOW_ALLOW_PLAYERS
- end
- if CROSSBOW_ALLOW_ENTITIES == true then
- local luaentity = object:get_luaentity()
- if luaentity then
- if luaentity.name then
- if allowed_entities[luaentity.name] then
- return true
- end
- end
- end
- end
- end
-end
-
-function crossbow:get_intersect_pos(ray, plane, collisionbox)
- local v = vector.subtract(ray.pos, plane.pos)
- local r1 = get_dot_product(v, plane.normal)
- local r2 = get_dot_product(ray.dir, plane.normal)
- if r2 ~= 0 then
- local t = -(r1 / r2)
- local td = vector.multiply(ray.dir, {x=t, y=t, z=t})
- local pt = vector.add(ray.pos, td)
- local pd = vector.subtract(pt, plane.pos)
- if math.abs(pd.x) < collisionbox[4] and
- math.abs(pd.y) < collisionbox[5] and
- math.abs(pd.z) < collisionbox[6] then
- return pt
- end
- end
-end
-
-function crossbow:process_round(round)
- local target = {object=nil, distance=10000}
- local p1 = round.pos
- local v1 = round.ray
- for _,ref in ipairs(castle.objects) do
- local p2 = vector.add(ref.pos, ref.offset)
- if p1 and p2 and ref.name ~= round.name then
- local d = vector.distance(p1, p2)
- if d < round.def.step and d < target.distance then
- local ray = {pos=p1, dir=v1}
- local plane = {pos=p2, normal={x=-1, y=0, z=-1}}
- local pos = crossbow:get_intersect_pos(ray, plane, ref.collisionbox)
- if pos then
- target.object = ref.object
- target.pos = pos
- target.distance = d
- end
- end
- end
- end
- if target.object and target.pos then
- local success, pos = minetest.line_of_sight(p1, target.pos, 1)
- if success then
- local user = minetest.get_player_by_name(round.name)
- if user then
- target.object:punch(user, nil, round.def.tool_caps, v1)
- crossbow:spawn_particles(target.pos, CROSSBOW_EXPLOSION_TEXTURE)
- end
- return 1
- elseif pos and CROSSBOW_ALLOW_NODES == true then
- crossbow:punch_node(pos, round.def)
- return 1
- end
- elseif CROSSBOW_ALLOW_NODES == true then
- local d = round.def.step
- local p2 = vector.add(p1, vector.multiply(v1, {x=d, y=d, z=d}))
- local success, pos = minetest.line_of_sight(p1, p2, 1)
- if pos then
- crossbow:punch_node(pos, round.def)
- return 1
- end
- end
-end
-
-local function get_animation_frame(dir)
- local angle = math.atan(dir.y)
- local frame = 90 - math.floor(angle * 360 / math.pi)
- if frame < 1 then
- frame = 1
- elseif frame > 180 then
- frame = 180
- end
- return frame
-end
-
-local function get_target_pos(p1, p2, dir, offset)
- local d = vector.distance(p1, p2) - offset
- local td = vector.multiply(dir, {x=d, y=d, z=d})
- return vector.add(p1, td)
-end
-
-local function punch_object(puncher, object)
- if puncher and crossbow:is_valid_object(object) then
- if puncher ~= object then
- local dir = puncher:get_look_dir()
- local p1 = puncher:getpos()
- local p2 = object:getpos()
- local tpos = get_target_pos(p1, p2, dir, 0)
- crossbow:spawn_particles(tpos, CROSSBOW_EXPLOSION_TEXTURE)
- object:punch(puncher, nil, CROSSBOW_BOLT_TOOL_CAPS, dir)
- end
- end
-end
-
-local function stop_crossbow_bolt(object, pos, stuck)
- local acceleration = {x=0, y=-10, z=0}
- if stuck == true then
- pos = pos or object:getpos()
- acceleration = {x=0, y=0, z=0}
- object:moveto(pos)
- end
- object:set_properties({
- physical = true,
- collisionbox = {-1/8,-1/8,-1/8, 1/8,1/8,1/8},
- })
- object:setvelocity({x=0, y=0, z=0})
- object:setacceleration(acceleration)
-end
-
-minetest.register_craftitem("castle:crossbow_bolt", {
- description = "Bolt",
- stack_max = 20,
- inventory_image = "castle_crossbow_bolt_inv.png",
-})
-
-minetest.register_entity("castle:crossbow_bolt_entity", {
- physical = false,
- visual = "mesh",
- mesh = "castle_crossbow_bolt.b3d",
- visual_size = {x=1.0, y=1.0},
- textures = {
- "castle_crossbow_bolt_uv.png"
- },
- timer = 0,
- lifetime = CROSSBOW_BOLT_LIFETIME,
- player = nil,
- state = "init",
- node_pos = nil,
- collisionbox = {0,0,0, 0,0,0},
- on_activate = function(self, staticdata)
- self.object:set_armor_groups({immortal=1})
- if staticdata == "expired" then
- self.object:remove()
- end
- end,
- on_punch = function(self, puncher)
- if puncher then
- if puncher:is_player() then
- local stack = "castle:crossbow_bolt"
- local inv = puncher:get_inventory()
- if inv:room_for_item("main", stack) then
- inv:add_item("main", stack)
- self.object:remove()
- end
- end
- end
- end,
- on_step = function(self, dtime)
- if self.state == "init" then
- return
- end
- self.timer = self.timer + dtime
- self.lifetime = self.lifetime - dtime
- if self.lifetime < 0 then
- self.object:remove()
- return
- elseif self.state == "dropped" then
- return
- elseif self.state == "stuck" then
- if self.timer > 1 then
- if self.node_pos then
- local node = minetest.get_node(self.node_pos)
- if node.name then
- local item = minetest.registered_items[node.name]
- if item then
- if not item.walkable then
- self.state = "dropped"
- stop_crossbow_bolt(self.object)
- return
- end
- end
- end
- end
- self.timer = 0
- end
- return
- end
- if self.timer > 0.2 then
- local pos = self.object:getpos()
- local dir = vector.normalize(self.object:getvelocity())
- local frame = get_animation_frame(dir)
- self.object:set_animation({x=frame, y=frame}, 0)
- local objects = minetest.get_objects_inside_radius(pos, 5)
- for _,obj in ipairs(objects) do
- if crossbow:is_valid_object(obj) then
- local collisionbox = {-0.25,-1.0,-0.25, 0.25,0.8,0.25}
- local offset = CROSSBOW_PLAYER_OFFSET
- if not obj:is_player() then
- offset = CROSSBOW_ENTITY_OFFSET
- local ent = obj:get_luaentity()
- if ent then
- local def = minetest.registered_entities[ent.name]
- collisionbox = def.collisionbox or collisionbox
- end
- end
- local opos = vector.add(obj:getpos(), offset)
- local ray = {pos=pos, dir=dir}
- local plane = {pos=opos, normal={x=-1, y=0, z=-1}}
- local ipos = crossbow:get_intersect_pos(ray, plane, collisionbox)
- if ipos then
- punch_object(self.player, obj)
- end
- end
- end
- local p = vector.add(pos, vector.multiply(dir, {x=5, y=5, z=5}))
- local _, npos = minetest.line_of_sight(pos, p, 1)
- if npos then
- local node = minetest.get_node(npos)
- local tpos = get_target_pos(pos, npos, dir, 0.66)
- self.node_pos = npos
- self.state = "stuck"
- stop_crossbow_bolt(self.object, tpos, true)
- minetest.sound_play("castle_crossbow_bolt", {gain = 0.08, max_hear_distance = 2})
- end
- self.timer = 0
- end
- end,
- get_staticdata = function(self)
- return "expired"
- end,
-})
-
- minetest.register_tool("castle:crossbow_loaded", {
- description = "Crossbow",
- inventory_image = "castle_crossbow_loaded.png",
- 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
- itemstack:add_wear(65535/CROSSBOW_USES)
- end
- itemstack = "castle:crossbow 1 "..itemstack:get_wear()
- local pos = user:getpos()
- local dir = user:get_look_dir()
- local yaw = user:get_look_yaw()
- if pos and dir and yaw then
- pos.y = pos.y + 1.5
- local obj = minetest.add_entity(pos, "castle:crossbow_bolt_entity")
- local ent = nil
- if obj then
- ent = obj:get_luaentity()
- end
- if ent then
- obj:set_properties({
- textures = {"castle_crossbow_bolt_uv.png"}
- })
- minetest.sound_play("castle_crossbow_shoot", {object=obj})
- local frame = get_animation_frame(dir)
- obj:setyaw(yaw + math.pi)
- obj:set_animation({x=frame, y=frame}, 0)
- obj:setvelocity({x=dir.x * 14, y=dir.y * 14, z=dir.z * 14})
- if pointed_thing.type ~= "nothing" then
- local ppos = minetest.get_pointed_thing_position(pointed_thing, false)
- local _, npos = minetest.line_of_sight(pos, ppos, 1)
- if npos then
- ppos = npos
- pointed_thing.type = "node"
- end
- if pointed_thing.type == "object" then
- punch_object(user, pointed_thing.ref)
- elseif pointed_thing.type == "node" then
- local node = minetest.get_node(ppos)
- local tpos = get_target_pos(pos, ppos, dir, 0.66)
- minetest.after(0.2, function(object, pos, npos)
- ent.node_pos = npos
- ent.state = "stuck"
- stop_crossbow_bolt(object, pos, true)
- minetest.sound_play("castle_crossbow_bolt", {gain = 0.08, max_hear_distance = 2})
- end, obj, tpos, ppos)
- return itemstack
- end
- end
- obj:setacceleration({x=dir.x * -3, y=-5, z=dir.z * -3})
- ent.player = ent.player or user
- ent.state = "flight"
- end
- end
- return itemstack
- end,
- })
-
-minetest.register_tool("castle:crossbow", {
- description = "Crossbow",
- inventory_image = "castle_crossbow_inv.png",
- on_use = function(itemstack, user, pointed_thing)
- local inv = user:get_inventory()
-if inv:contains_item("main", "castle:crossbow_bolt") then
- minetest.sound_play("castle_crossbow_reload", {object=user})
- if not minetest.setting_getbool("creative_mode") then
- inv:remove_item("main", "castle:crossbow_bolt 1")
- end
- return "castle:crossbow_loaded 1 "..itemstack:get_wear()
- end
- minetest.sound_play("castle_crossbow_click", {object=user})
- end,
-})
-
------------
---Crafting
------------
-
-minetest.register_craft({
- output = 'castle:crossbow',
- recipe = {
- {'default:steel_ingot', 'default:stick', 'default:steel_ingot'},
- {'farming:string', 'farming:string', 'farming:string'},
- {'', 'default:stick', ''},
- }
-})
-
-minetest.register_craft({
- output = "castle:crossbow_bolt 6",
- recipe = {
- {'default:stick', 'default:stick', 'default:steel_ingot'},
- }
-}) \ No newline at end of file
diff --git a/castle/depends.txt b/castle/depends.txt
deleted file mode 100644
index da4fb74..0000000
--- a/castle/depends.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-default
-stairs
-doors
-farming
-unifieddyes
-building_blocks?
-asphalt?
-streets?
-moreblocks?
-xpanes?
diff --git a/castle/description.txt b/castle/description.txt
deleted file mode 100644
index 2399226..0000000
--- a/castle/description.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons.
diff --git a/castle/init.lua b/castle/init.lua
deleted file mode 100644
index d57967e..0000000
--- a/castle/init.lua
+++ /dev/null
@@ -1,395 +0,0 @@
-castle = {}
-
-dofile(minetest.get_modpath("castle").."/pillars.lua")
-dofile(minetest.get_modpath("castle").."/arrowslit.lua")
-dofile(minetest.get_modpath("castle").."/tapestry.lua")
-dofile(minetest.get_modpath("castle").."/jailbars.lua")
-dofile(minetest.get_modpath("castle").."/town_item.lua")
-dofile(minetest.get_modpath("castle").."/shields_decor.lua")
-dofile(minetest.get_modpath("castle").."/murder_hole.lua")
-dofile(minetest.get_modpath("castle").."/orbs.lua")
-dofile(minetest.get_modpath("castle").."/rope.lua")
-dofile(minetest.get_modpath("castle").."/crossbow.lua")
-
--- nodes
-
-minetest.register_node("castle:stonewall", {
- description = "Castle Wall",
- drawtype = "normal",
- tiles = {"castle_stonewall.png"},
- paramtype = "light",
- drop = "castle:stonewall",
- groups = {cracky=3},
- sunlight_propagates = false,
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("castle:rubble", {
- description = "Castle Rubble",
- drawtype = "normal",
- tiles = {"castle_rubble.png"},
- paramtype = "light",
- groups = {crumbly=3,falling_node=1},
- sounds = default.node_sound_gravel_defaults(),
-})
-
-minetest.register_craft({
- output = "castle:stonewall",
- recipe = {
- {"default:cobble"},
- {"default:desert_stone"},
- }
-})
-
-minetest.register_craft({
- output = "castle:rubble",
- recipe = {
- {"castle:stonewall"},
- }
-})
-
-minetest.register_craft({
- output = "castle:rubble 2",
- recipe = {
- {"default:gravel"},
- {"default:desert_stone"},
- }
-})
-
-minetest.register_node("castle:stonewall_corner", {
- drawtype = "normal",
- paramtype = "light",
- paramtype2 = "facedir",
- description = "Castle Corner",
- tiles = {"castle_corner_stonewall_tb.png^[transformR90",
- "castle_corner_stonewall_tb.png^[transformR180",
- "castle_corner_stonewall1.png",
- "castle_stonewall.png",
- "castle_stonewall.png",
- "castle_corner_stonewall2.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_craft({
- output = "castle:stonewall_corner",
- recipe = {
- {"", "castle:stonewall"},
- {"castle:stonewall", "default:sandstone"},
- }
-})
-
-minetest.register_node("castle:roofslate", {
- drawtype = "raillike",
- description = "Roof Slates",
- inventory_image = "castle_slate.png",
- paramtype = "light",
- walkable = false,
- tiles = {'castle_slate.png'},
- climbable = true,
- selection_box = {
- type = "fixed",
- fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
- },
- groups = {cracky=3,attached_node=1},
- sounds = default.node_sound_glass_defaults(),
-})
-
-minetest.register_node("castle:hides", {
- drawtype = "signlike",
- description = "Hides",
- inventory_image = "castle_hide.png",
- paramtype = "light",
- walkable = false,
- tiles = {'castle_hide.png'},
- climbable = true,
- paramtype2 = "wallmounted",
- legacy_wallmounted = true,
- groups = {dig_immediate=2},
- selection_box = {
- type = "wallmounted",
- },
-})
-
-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_streets = minetest.get_modpath("streets") or minetest.get_modpath("asphalt")
-
-if mod_building_blocks then
- 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 = {
- { "default:gravel", "building_blocks:Tar" },
- { "building_blocks:Tar" , "default:gravel" }
- }
- })
-end
-
-if mod_streets then
- minetest.register_craft( {
- output = "castle:roofslate 4",
- recipe = {
- { "streets:asphalt" , "default:gravel" },
- { "default:gravel", "streets:asphalt" }
- }
- })
-
- minetest.register_craft( {
- output = "castle:roofslate 4",
- recipe = {
- { "default:gravel", "streets:asphalt" },
- { "streets:asphalt" , "default:gravel" }
- }
- })
-end
-
-if not (mod_building_blocks or mod_streets) then
- minetest.register_craft({
- type = "cooking",
- output = "castle:roofslate",
- recipe = "default:gravel",
- })
-
-end
-
-doors.register("castle:oak_door", {
- tiles = {{ name = "castle_door_oak.png", backface_culling = true }},
- description = "Oak Door",
- inventory_image = "castle_oak_door_inv.png",
- 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"},
- }
-})
-
-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"},
- }
-})
-
-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
-end
-
-local function has_ironbound_chest_privilege(meta, player)
- local name = ""
- if player then
- if minetest.check_player_privs(player, "protection_bypass") then
- return true
- end
- name = player:get_player_name()
- end
- if name ~= meta:get_string("owner") then
- return false
- end
- return true
-end
-
-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_side.png",
- "castle_ironbound_chest_side.png",
- "castle_ironbound_chest_back.png",
- "castle_ironbound_chest_front.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {cracky=2},
- node_box = {
- 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.000000,-0.187500,0.500000,0.062500,0.187500},
- {-0.500000,0.062500,-0.062500,0.500000,0.125000,0.062500},
- },
- },
- selection_box = {
- type = "fixed",
- 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)
- local meta = minetest.get_meta(pos)
- meta:set_string("owner", placer:get_player_name() or "")
- meta:set_string("infotext", "Ironbound Chest (owned by "..
- meta:get_string("owner")..")")
- end,
- on_construct = function(pos)
- local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Ironbound Chest")
- meta:set_string("owner", "")
- local inv = meta:get_inventory()
- inv:set_size("main", 8*4)
- end,
- can_dig = function(pos,player)
- local meta = minetest.get_meta(pos);
- local inv = meta:get_inventory()
- return inv:is_empty("main") and has_ironbound_chest_privilege(meta, player)
- end,
- allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
- local meta = minetest.get_meta(pos)
- if not has_ironbound_chest_privilege(meta, player) then
- minetest.log("action", player:get_player_name()..
- " tried to access a locked chest belonging to "..
- meta:get_string("owner").." at "..
- minetest.pos_to_string(pos))
- return 0
- end
- return count
- end,
- 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()..
- " tried to access a locked chest belonging to "..
- meta:get_string("owner").." at "..
- minetest.pos_to_string(pos))
- return 0
- end
- return stack:get_count()
- end,
- 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()..
- " tried to access a locked chest belonging to "..
- meta:get_string("owner").." at "..
- minetest.pos_to_string(pos))
- return 0
- end
- return stack:get_count()
- end,
- on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
- 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)
- 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)
- minetest.log("action", player:get_player_name()..
- " takes stuff from locked chest at "..minetest.pos_to_string(pos))
- end,
- on_rightclick = function(pos, node, clicker)
- local meta = minetest.get_meta(pos)
- if has_ironbound_chest_privilege(meta, clicker) then
- minetest.show_formspec(
- clicker:get_player_name(),
- "castle:ironbound_chest",
- default.get_ironbound_chest_formspec(pos)
- )
- end
- end,
- on_blast = function() end,
-})
-
-minetest.register_craft({
- output = "castle:ironbound_chest",
- recipe = {
- {"default:wood", "default:steel_ingot","default:wood"},
- {"default:wood", "default:steel_ingot","default:wood"}
- }
-})
-
-minetest.register_tool("castle:battleaxe", {
- description = "Battleaxe",
- inventory_image = "castle_battleaxe.png",
- tool_capabilities = {
- full_punch_interval = 2.0,
- max_drop_level=1,
- groupcaps={
- choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=20, maxlevel=3},
- snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=20, maxlevel=3},
- },
- 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",""}
- }
-})
-
-if minetest.get_modpath("moreblocks") then
- stairsplus:register_all("castle", "stonewall", "castle:stonewall", {
- description = "Stone Wall",
- tiles = {"castle_stonewall.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("castle", "rubble", "castle:rubble", {
- description = "Rubble",
- tiles = {"castle_rubble.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_gravel_defaults(),
- sunlight_propagates = true,
- })
-
-else
- stairs.register_stair_and_slab("stonewall", "castle:stonewall",
- {cracky=3},
- {"castle_stonewall.png"},
- "Castle Stonewall Stair",
- "Castle Stonewall Slab",
- default.node_sound_stone_defaults()
- )
-
- stairs.register_stair_and_slab("rubble", "castle:rubble",
- {cracky=3},
- {"castle_rubble.png"},
- "Castle Rubble Stair",
- "Castle Rubble Slab",
- default.node_sound_stone_defaults()
- )
-end
diff --git a/castle/jailbars.lua b/castle/jailbars.lua
deleted file mode 100644
index 5fe3cab..0000000
--- a/castle/jailbars.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-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"}},
- })
-end
-
-for i = 1, 15 do
- minetest.register_alias("castle:jailbars_"..i, "xpanes:jailbars_"..i)
-end
-minetest.register_alias("castle:jailbars", "xpanes:jailbars")
diff --git a/castle/mod.conf b/castle/mod.conf
deleted file mode 100644
index 759a5cf..0000000
--- a/castle/mod.conf
+++ /dev/null
@@ -1 +0,0 @@
-name = castle
diff --git a/castle/models/LICENSE.txt b/castle/models/LICENSE.txt
deleted file mode 100644
index 7c019e6..0000000
--- a/castle/models/LICENSE.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-License Textures: Stuart Jones - WTFPL
-
--castle_crossbow_bolt_inv.png
--castle_crossbow_bolt_uv.png
--castle_crossbow_hit.png
-
-Licence Models: Stuart Jones - CC-BY-SA 3.0
-
--castle_crossbow_bolt.b3d
--castle_crossbow_bolt.blend \ No newline at end of file
diff --git a/castle/models/castle_crossbow_bolt.b3d b/castle/models/castle_crossbow_bolt.b3d
deleted file mode 100644
index d24be3c..0000000
--- a/castle/models/castle_crossbow_bolt.b3d
+++ /dev/null
Binary files differ
diff --git a/castle/models/castle_crossbow_bolt.blend b/castle/models/castle_crossbow_bolt.blend
deleted file mode 100644
index 4cf5f43..0000000
--- a/castle/models/castle_crossbow_bolt.blend
+++ /dev/null
Binary files differ
diff --git a/castle/models/castle_crossbow_bolt_uv.png b/castle/models/castle_crossbow_bolt_uv.png
deleted file mode 100644
index b7d29c5..0000000
--- a/castle/models/castle_crossbow_bolt_uv.png
+++ /dev/null
Binary files differ
diff --git a/castle/models/castle_tapestry.obj b/castle/models/castle_tapestry.obj
deleted file mode 100644
index 5465c46..0000000
--- a/castle/models/castle_tapestry.obj
+++ /dev/null
@@ -1,212 +0,0 @@
-# Blender v2.72 (sub 0) OBJ File: 'castle_tapestry.blend'
-# www.blender.org
-o Cube
-v -0.500000 0.500000 -0.125000
-v -0.437500 0.500000 -0.125000
-v -0.500000 0.500000 1.500000
-v -0.437500 0.500000 1.500000
-v -0.437500 -0.500000 1.500000
-v -0.500000 -0.500000 1.500000
-v -0.437500 0.125000 -0.250000
-v -0.500000 0.125000 -0.250000
-v -0.500000 0.125000 -0.375000
-v -0.437500 0.125000 -0.375000
-v -0.437500 0.187500 -0.375000
-v -0.500000 0.187500 -0.375000
-v -0.500000 0.312500 -0.500000
-v -0.437500 0.312500 -0.500000
-v -0.437500 0.312500 -0.375000
-v -0.500000 0.312500 -0.375000
-v -0.500000 0.375000 -0.375000
-v -0.437500 0.375000 -0.375000
-v -0.437500 0.375000 -0.250000
-v -0.500000 0.375000 -0.250000
-v -0.437500 -0.187500 -0.500000
-v -0.500000 -0.312500 -0.500000
-v -0.437500 -0.312500 -0.500000
-v -0.500000 0.187500 -0.500000
-v -0.437500 0.187500 -0.500000
-v -0.500000 0.437500 -0.250000
-v -0.437500 0.437500 -0.250000
-v -0.437500 0.437500 -0.125000
-v -0.500000 0.437500 -0.125000
-v -0.437500 0.062500 -0.250000
-v -0.500000 0.062500 -0.250000
-v -0.437500 0.062500 -0.125000
-v -0.500000 0.062500 -0.125000
-v -0.437500 -0.062500 -0.125000
-v -0.500000 -0.062500 -0.125000
-v -0.437500 -0.062500 -0.250000
-v -0.500000 -0.062500 -0.250000
-v -0.437500 -0.125000 -0.250000
-v -0.500000 -0.125000 -0.250000
-v -0.437500 -0.125000 -0.375000
-v -0.500000 -0.125000 -0.375000
-v -0.437500 -0.187500 -0.375000
-v -0.500000 -0.187500 -0.375000
-v -0.500000 -0.187500 -0.500000
-v -0.500000 -0.312500 -0.375000
-v -0.437500 -0.312500 -0.375000
-v -0.500000 -0.375000 -0.375000
-v -0.437500 -0.375000 -0.375000
-v -0.500000 -0.375000 -0.250000
-v -0.437500 -0.375000 -0.250000
-v -0.500000 -0.437500 -0.250000
-v -0.437500 -0.437500 -0.250000
-v -0.500000 -0.437500 -0.125000
-v -0.437500 -0.437500 -0.125000
-v -0.500000 -0.500000 -0.125000
-v -0.437500 -0.500000 -0.125000
-v -0.500000 0.500000 0.500000
-v -0.437500 0.500000 0.500000
-v -0.500000 -0.500000 0.500000
-v -0.437500 -0.500000 0.500000
-v -0.500000 0.343750 -0.375000
-vt 0.062500 0.000000
-vt 0.062500 1.000000
-vt 0.000000 1.000000
-vt 0.000003 0.000000
-vt 0.937500 0.250000
-vt 1.000000 0.250000
-vt 1.000000 0.375000
-vt 0.937500 0.375000
-vt 0.625000 0.937500
-vt 0.625000 0.999999
-vt 0.562500 0.999999
-vt 0.562500 0.937500
-vt 0.937500 0.125000
-vt 1.000000 0.125000
-vt 0.687500 0.937500
-vt 0.687500 0.999999
-vt 0.937500 0.000000
-vt 1.000000 0.000000
-vt 0.062500 0.125000
-vt 0.000000 0.125000
-vt 0.875000 0.937500
-vt 0.875000 1.000000
-vt 0.812500 1.000000
-vt 0.812500 0.937500
-vt 0.843750 0.937500
-vt 0.062500 0.250000
-vt 0.000000 0.250000
-vt 0.937500 0.937500
-vt 0.937500 1.000000
-vt 0.062500 0.375000
-vt 0.000000 0.375000
-vt 1.000000 0.937500
-vt 1.000000 1.000000
-vt 0.437500 0.937500
-vt 0.437500 0.999999
-vt 0.375000 0.999999
-vt 0.375000 0.937500
-vt 0.312500 0.999999
-vt 0.312500 0.937500
-vt 0.187500 0.937500
-vt 0.187500 0.999999
-vt 0.125000 0.999999
-vt 0.125000 0.937500
-vt 0.062500 0.937500
-vt 0.000000 0.937500
-vt 0.625000 0.000000
-vt 0.625000 0.062500
-vt 0.625000 0.437500
-vt 0.625000 0.562500
-vt 0.375000 0.437500
-vt 0.375000 0.062500
-vt 0.375000 0.000000
-vt 0.375000 0.562500
-vt 0.250000 0.437500
-vt 0.250000 0.375000
-vt 0.250000 0.125000
-vt 0.250000 0.062500
-vt 0.250000 0.937500
-vt 0.250000 0.875000
-vt 0.250000 0.625000
-vt 0.250000 0.562500
-vt 0.750000 0.562500
-vt 0.750000 0.625000
-vt 0.750000 0.875000
-vt 0.750000 0.937500
-vt 0.750000 0.062500
-vt 0.750000 0.125000
-vt 0.750000 0.375000
-vt 0.750000 0.437500
-vt 0.875000 0.625000
-vt 0.875000 0.687500
-vt 0.875000 0.812500
-vt 0.875000 0.875000
-vt 0.875000 0.125000
-vt 0.875000 0.156250
-vt 0.875000 0.187500
-vt 0.875000 0.312500
-vt 0.875000 0.375000
-vt 1.000000 0.687500
-vt 1.000000 0.812500
-vt 1.000000 0.187500
-vt 1.000000 0.312500
-vt 0.125000 0.187500
-vt 0.125000 0.312500
-vt 0.000000 0.312500
-vt 0.000000 0.187500
-vt 0.125000 0.687500
-vt 0.125000 0.812500
-vt 0.000000 0.812500
-vt 0.000000 0.687500
-vt 0.125000 0.875000
-vt 0.125000 0.625000
-vt 0.125000 0.375000
-vt 0.125000 0.125000
-vn 0.000000 1.000000 -0.000000
-vn -0.000000 -1.000000 0.000000
-vn 0.000000 0.000000 -1.000000
-vn -1.000000 0.000000 0.000000
-vn 1.000000 -0.000000 -0.000000
-vn 0.000000 0.000000 1.000000
-g Cube_Cube_Material
-s off
-f 57/1/1 3/2/1 4/3/1 58/4/1
-f 31/5/2 30/6/2 32/7/2 33/8/2
-f 8/9/3 7/10/3 30/11/3 31/12/3
-f 9/13/2 10/14/2 7/6/2 8/5/2
-f 12/15/3 11/16/3 10/10/3 9/9/3
-f 24/17/2 25/18/2 11/14/2 12/13/2
-f 16/19/1 15/20/1 14/4/1 13/1/1
-f 17/21/3 18/22/3 15/23/3 16/24/3 61/25/3
-f 20/26/1 19/27/1 18/20/1 17/19/1
-f 26/28/3 27/29/3 19/22/3 20/21/3
-f 29/30/1 28/31/1 27/27/1 26/26/1
-f 1/32/3 2/33/3 28/29/3 29/28/3
-f 37/34/3 36/35/3 38/36/3 39/37/3
-f 39/26/1 38/27/1 40/20/1 41/19/1
-f 41/37/3 40/36/3 42/38/3 43/39/3
-f 22/17/2 23/18/2 46/14/2 45/13/2
-f 45/40/3 46/41/3 48/42/3 47/43/3
-f 47/13/2 48/14/2 50/6/2 49/5/2
-f 49/43/3 50/42/3 52/2/3 51/44/3
-f 51/5/2 52/6/2 54/7/2 53/8/2
-f 53/44/3 54/2/3 56/3/3 55/45/3
-f 43/19/1 42/20/1 21/4/1 44/1/1
-f 14/23/3 25/16/3 24/15/3 13/24/3
-f 60/18/2 5/33/2 6/29/2 59/17/2
-f 21/38/3 23/41/3 22/40/3 44/39/3
-f 57/18/4 59/33/4 6/3/4 3/4/4
-f 60/3/5 58/4/5 4/18/5 5/33/5
-f 1/30/1 57/2/1 58/3/1 2/31/1
-f 56/7/2 60/33/2 59/29/2 55/8/2
-f 1/46/4 29/47/4 33/48/4 35/49/4 53/9/4 55/10/4 59/3/4 57/4/4
-f 32/50/5 28/51/5 2/52/5 58/18/5 60/33/5 56/36/5 54/37/5 34/53/5
-f 34/31/1 36/27/1 37/26/1 35/30/1
-f 30/54/5 7/55/5 19/56/5 27/57/5 28/51/5 32/50/5
-f 34/53/5 54/37/5 52/58/5 50/59/5 38/60/5 36/61/5
-f 53/9/4 35/49/4 37/62/4 39/63/4 49/64/4 51/65/4
-f 29/47/4 26/66/4 20/67/4 8/68/4 31/69/4 33/48/4
-f 33/12/3 32/11/3 34/35/3 35/34/3
-f 49/64/4 39/63/4 41/70/4 43/71/4 45/72/4 47/73/4
-f 8/68/4 20/67/4 17/74/4 61/75/4 16/76/4 12/77/4 9/78/4
-f 45/72/4 43/71/4 44/79/4 22/80/4
-f 12/77/4 16/76/4 13/81/4 24/82/4
-f 15/83/5 11/84/5 25/85/5 14/86/5
-f 42/87/5 46/88/5 23/89/5 21/90/5
-f 38/60/5 50/59/5 48/91/5 46/88/5 42/87/5 40/92/5
-f 7/55/5 10/93/5 11/84/5 15/83/5 18/94/5 19/56/5
-f 3/33/6 6/3/6 5/45/6 4/32/6
diff --git a/castle/models/castle_tapestry_long.obj b/castle/models/castle_tapestry_long.obj
deleted file mode 100644
index f240853..0000000
--- a/castle/models/castle_tapestry_long.obj
+++ /dev/null
@@ -1,220 +0,0 @@
-# Blender v2.72 (sub 0) OBJ File: 'castle_tapestry_long.blend'
-# www.blender.org
-o Cube
-v -0.500000 0.500000 -0.125000
-v -0.437500 0.500000 -0.125000
-v -0.500000 0.500001 1.500000
-v -0.437499 0.500000 1.500000
-v -0.437500 -0.500000 1.500000
-v -0.500000 -0.500000 1.500000
-v -0.437500 0.125000 -0.250000
-v -0.500000 0.125000 -0.250000
-v -0.500000 0.125000 -0.375000
-v -0.437500 0.125000 -0.375000
-v -0.437500 0.187500 -0.375000
-v -0.500000 0.187500 -0.375000
-v -0.500000 0.312500 -0.500000
-v -0.437500 0.312500 -0.500000
-v -0.437500 0.312500 -0.375000
-v -0.500000 0.312500 -0.375000
-v -0.500000 0.375000 -0.375000
-v -0.437500 0.375000 -0.375000
-v -0.437500 0.375000 -0.250000
-v -0.500000 0.375000 -0.250000
-v -0.437500 -0.187500 -0.500000
-v -0.500000 -0.312500 -0.500000
-v -0.437500 -0.312500 -0.500000
-v -0.500000 0.187500 -0.500000
-v -0.437500 0.187500 -0.500000
-v -0.500000 0.437500 -0.250000
-v -0.437500 0.437500 -0.250000
-v -0.437500 0.437500 -0.125000
-v -0.500000 0.437500 -0.125000
-v -0.437500 0.062500 -0.250000
-v -0.500000 0.062500 -0.250000
-v -0.437500 0.062500 -0.125000
-v -0.500000 0.062500 -0.125000
-v -0.437500 -0.062500 -0.125000
-v -0.500000 -0.062500 -0.125000
-v -0.437500 -0.062500 -0.250000
-v -0.500000 -0.062500 -0.250000
-v -0.437500 -0.125000 -0.250000
-v -0.500000 -0.125000 -0.250000
-v -0.437500 -0.125000 -0.375000
-v -0.500000 -0.125000 -0.375000
-v -0.437500 -0.187500 -0.375000
-v -0.500000 -0.187500 -0.375000
-v -0.500000 -0.187500 -0.500000
-v -0.500000 -0.312500 -0.375000
-v -0.437500 -0.312500 -0.375000
-v -0.500000 -0.375000 -0.375000
-v -0.437500 -0.375000 -0.375000
-v -0.500000 -0.375000 -0.250000
-v -0.437500 -0.375000 -0.250000
-v -0.500000 -0.437500 -0.250000
-v -0.437500 -0.437500 -0.250000
-v -0.500000 -0.437500 -0.125000
-v -0.437500 -0.437500 -0.125000
-v -0.500000 -0.500000 -0.125000
-v -0.437500 -0.500000 -0.125000
-v -0.500000 0.500000 0.500000
-v -0.437500 0.500000 0.500000
-v -0.500000 -0.500000 0.500000
-v -0.437500 -0.500000 0.500000
-v -0.500000 0.500001 2.500000
-v -0.437499 0.500000 2.500000
-v -0.437500 -0.500000 2.500000
-v -0.500000 -0.500000 2.500000
-v -0.500000 0.343750 -0.375000
-vt 0.062500 0.000000
-vt 0.062500 1.000000
-vt 0.000000 1.000000
-vt 0.000003 0.000000
-vt 0.937500 0.250000
-vt 1.000000 0.250000
-vt 1.000000 0.375000
-vt 0.937500 0.375000
-vt 0.625000 0.937500
-vt 0.625000 0.999999
-vt 0.562500 0.999999
-vt 0.562500 0.937500
-vt 0.937500 0.125000
-vt 1.000000 0.125000
-vt 0.687500 0.937500
-vt 0.687500 0.999999
-vt 0.937500 0.000000
-vt 1.000000 0.000000
-vt 0.062500 0.125000
-vt 0.000000 0.125000
-vt 0.875000 0.937500
-vt 0.875000 1.000000
-vt 0.812500 1.000000
-vt 0.812500 0.937500
-vt 0.843750 0.937500
-vt 0.062500 0.250000
-vt 0.000000 0.250000
-vt 0.937500 0.937500
-vt 0.937500 1.000000
-vt 0.062500 0.375000
-vt 0.000000 0.375000
-vt 1.000000 0.937500
-vt 1.000000 1.000000
-vt 0.437500 0.937500
-vt 0.437500 0.999999
-vt 0.375000 0.999999
-vt 0.375000 0.937500
-vt 0.312500 0.999999
-vt 0.312500 0.937500
-vt 0.187500 0.937500
-vt 0.187500 0.999999
-vt 0.125000 0.999999
-vt 0.125000 0.937500
-vt 0.062500 0.937500
-vt 0.000000 0.937500
-vt 0.625000 0.000000
-vt 0.625000 0.062500
-vt 0.625000 0.437500
-vt 0.625000 0.562500
-vt 0.375000 0.437500
-vt 0.375000 0.062500
-vt 0.375000 0.000000
-vt 0.375000 0.562500
-vt 0.250000 0.437500
-vt 0.250000 0.375000
-vt 0.250000 0.125000
-vt 0.250000 0.062500
-vt 0.250000 0.937500
-vt 0.250000 0.875000
-vt 0.250000 0.625000
-vt 0.250000 0.562500
-vt 0.750000 0.562500
-vt 0.750000 0.625000
-vt 0.750000 0.875000
-vt 0.750000 0.937500
-vt 0.750000 0.062500
-vt 0.750000 0.125000
-vt 0.750000 0.375000
-vt 0.750000 0.437500
-vt 0.875000 0.625000
-vt 0.875000 0.687500
-vt 0.875000 0.812500
-vt 0.875000 0.875000
-vt 0.875000 0.125000
-vt 0.875000 0.156250
-vt 0.875000 0.187500
-vt 0.875000 0.312500
-vt 0.875000 0.375000
-vt 1.000000 0.687500
-vt 1.000000 0.812500
-vt 1.000000 0.187500
-vt 1.000000 0.312500
-vt 0.125000 0.187500
-vt 0.125000 0.312500
-vt 0.000000 0.312500
-vt 0.000000 0.187500
-vt 0.125000 0.687500
-vt 0.125000 0.812500
-vt 0.000000 0.812500
-vt 0.000000 0.687500
-vt 0.125000 0.875000
-vt 0.125000 0.625000
-vt 0.125000 0.375000
-vt 0.125000 0.125000
-vn 0.000000 1.000000 0.000000
-vn -0.000000 -1.000000 0.000000
-vn 0.000000 0.000000 -1.000000
-vn -1.000000 0.000000 0.000000
-vn 1.000000 -0.000000 -0.000000
-vn 0.000000 0.000000 1.000000
-g Cube_Cube_Material
-s off
-f 57/1/1 3/2/1 4/3/1 58/4/1
-f 31/5/2 30/6/2 32/7/2 33/8/2
-f 8/9/3 7/10/3 30/11/3 31/12/3
-f 9/13/2 10/14/2 7/6/2 8/5/2
-f 12/15/3 11/16/3 10/10/3 9/9/3
-f 24/17/2 25/18/2 11/14/2 12/13/2
-f 16/19/1 15/20/1 14/4/1 13/1/1
-f 17/21/3 18/22/3 15/23/3 16/24/3 65/25/3
-f 20/26/1 19/27/1 18/20/1 17/19/1
-f 26/28/3 27/29/3 19/22/3 20/21/3
-f 29/30/1 28/31/1 27/27/1 26/26/1
-f 1/32/3 2/33/3 28/29/3 29/28/3
-f 37/34/3 36/35/3 38/36/3 39/37/3
-f 39/26/1 38/27/1 40/20/1 41/19/1
-f 41/37/3 40/36/3 42/38/3 43/39/3
-f 22/17/2 23/18/2 46/14/2 45/13/2
-f 45/40/3 46/41/3 48/42/3 47/43/3
-f 47/13/2 48/14/2 50/6/2 49/5/2
-f 49/43/3 50/42/3 52/2/3 51/44/3
-f 51/5/2 52/6/2 54/7/2 53/8/2
-f 53/44/3 54/2/3 56/3/3 55/45/3
-f 43/19/1 42/20/1 21/4/1 44/1/1
-f 14/23/3 25/16/3 24/15/3 13/24/3
-f 60/18/2 5/33/2 6/29/2 59/17/2
-f 21/38/3 23/41/3 22/40/3 44/39/3
-f 57/18/4 59/33/4 6/3/4 3/4/4
-f 60/3/5 58/4/5 4/18/5 5/33/5
-f 1/30/1 57/2/1 58/3/1 2/31/1
-f 56/7/2 60/33/2 59/29/2 55/8/2
-f 1/46/4 29/47/4 33/48/4 35/49/4 53/9/4 55/10/4 59/3/4 57/4/4
-f 32/50/5 28/51/5 2/52/5 58/18/5 60/33/5 56/36/5 54/37/5 34/53/5
-f 34/31/1 36/27/1 37/26/1 35/30/1
-f 30/54/5 7/55/5 19/56/5 27/57/5 28/51/5 32/50/5
-f 34/53/5 54/37/5 52/58/5 50/59/5 38/60/5 36/61/5
-f 53/9/4 35/49/4 37/62/4 39/63/4 49/64/4 51/65/4
-f 29/47/4 26/66/4 20/67/4 8/68/4 31/69/4 33/48/4
-f 33/12/3 32/11/3 34/35/3 35/34/3
-f 3/1/1 61/2/1 62/3/1 4/4/1
-f 5/18/2 63/33/2 64/29/2 6/17/2
-f 3/18/4 6/33/4 64/3/4 61/4/4
-f 5/3/5 4/4/5 62/18/5 63/33/5
-f 49/64/4 39/63/4 41/70/4 43/71/4 45/72/4 47/73/4
-f 8/68/4 20/67/4 17/74/4 65/75/4 16/76/4 12/77/4 9/78/4
-f 45/72/4 43/71/4 44/79/4 22/80/4
-f 12/77/4 16/76/4 13/81/4 24/82/4
-f 15/83/5 11/84/5 25/85/5 14/86/5
-f 42/87/5 46/88/5 23/89/5 21/90/5
-f 38/60/5 50/59/5 48/91/5 46/88/5 42/87/5 40/92/5
-f 7/55/5 10/93/5 11/84/5 15/83/5 18/94/5 19/56/5
-f 61/33/6 64/3/6 63/45/6 62/32/6
diff --git a/castle/models/castle_tapestry_very_long.obj b/castle/models/castle_tapestry_very_long.obj
deleted file mode 100644
index bfe9843..0000000
--- a/castle/models/castle_tapestry_very_long.obj
+++ /dev/null
@@ -1,228 +0,0 @@
-# Blender v2.72 (sub 0) OBJ File: 'castle_tapestry_very_long.blend'
-# www.blender.org
-o Cube
-v -0.500000 0.500000 -0.125000
-v -0.437500 0.500000 -0.125000
-v -0.500000 0.500001 1.500000
-v -0.437499 0.500000 1.500000
-v -0.437500 -0.500000 1.500000
-v -0.500000 -0.500000 1.500000
-v -0.437500 0.125000 -0.250000
-v -0.500000 0.125000 -0.250000
-v -0.500000 0.125000 -0.375000
-v -0.437500 0.125000 -0.375000
-v -0.437500 0.187500 -0.375000
-v -0.500000 0.187500 -0.375000
-v -0.500000 0.312500 -0.500000
-v -0.437500 0.312500 -0.500000
-v -0.437500 0.312500 -0.375000
-v -0.500000 0.312500 -0.375000
-v -0.500000 0.375000 -0.375000
-v -0.437500 0.375000 -0.375000
-v -0.437500 0.375000 -0.250000
-v -0.500000 0.375000 -0.250000
-v -0.437500 -0.187500 -0.500000
-v -0.500000 -0.312500 -0.500000
-v -0.437500 -0.312500 -0.500000
-v -0.500000 0.187500 -0.500000
-v -0.437500 0.187500 -0.500000
-v -0.500000 0.437500 -0.250000
-v -0.437500 0.437500 -0.250000
-v -0.437500 0.437500 -0.125000
-v -0.500000 0.437500 -0.125000
-v -0.437500 0.062500 -0.250000
-v -0.500000 0.062500 -0.250000
-v -0.437500 0.062500 -0.125000
-v -0.500000 0.062500 -0.125000
-v -0.437500 -0.062500 -0.125000
-v -0.500000 -0.062500 -0.125000
-v -0.437500 -0.062500 -0.250000
-v -0.500000 -0.062500 -0.250000
-v -0.437500 -0.125000 -0.250000
-v -0.500000 -0.125000 -0.250000
-v -0.437500 -0.125000 -0.375000
-v -0.500000 -0.125000 -0.375000
-v -0.437500 -0.187500 -0.375000
-v -0.500000 -0.187500 -0.375000
-v -0.500000 -0.187500 -0.500000
-v -0.500000 -0.312500 -0.375000
-v -0.437500 -0.312500 -0.375000
-v -0.500000 -0.375000 -0.375000
-v -0.437500 -0.375000 -0.375000
-v -0.500000 -0.375000 -0.250000
-v -0.437500 -0.375000 -0.250000
-v -0.500000 -0.437500 -0.250000
-v -0.437500 -0.437500 -0.250000
-v -0.500000 -0.437500 -0.125000
-v -0.437500 -0.437500 -0.125000
-v -0.500000 -0.500000 -0.125000
-v -0.437500 -0.500000 -0.125000
-v -0.500000 0.500000 0.500000
-v -0.437500 0.500000 0.500000
-v -0.500000 -0.500000 0.500000
-v -0.437500 -0.500000 0.500000
-v -0.500000 0.500001 2.500000
-v -0.437499 0.500000 2.500000
-v -0.437500 -0.500000 2.500000
-v -0.500000 -0.500000 2.500000
-v -0.500000 0.500001 3.500000
-v -0.437499 0.500000 3.500000
-v -0.437500 -0.500000 3.500000
-v -0.500000 -0.500000 3.500000
-v -0.500000 0.343750 -0.375000
-vt 0.062500 0.000000
-vt 0.062500 1.000000
-vt 0.000000 1.000000
-vt 0.000003 0.000000
-vt 0.937500 0.250000
-vt 1.000000 0.250000
-vt 1.000000 0.375000
-vt 0.937500 0.375000
-vt 0.625000 0.937500
-vt 0.625000 0.999999
-vt 0.562500 0.999999
-vt 0.562500 0.937500
-vt 0.937500 0.125000
-vt 1.000000 0.125000
-vt 0.687500 0.937500
-vt 0.687500 0.999999
-vt 0.937500 0.000000
-vt 1.000000 0.000000
-vt 0.062500 0.125000
-vt 0.000000 0.125000
-vt 0.875000 0.937500
-vt 0.875000 1.000000
-vt 0.812500 1.000000
-vt 0.812500 0.937500
-vt 0.843750 0.937500
-vt 0.062500 0.250000
-vt 0.000000 0.250000
-vt 0.937500 0.937500
-vt 0.937500 1.000000
-vt 0.062500 0.375000
-vt 0.000000 0.375000
-vt 1.000000 0.937500
-vt 1.000000 1.000000
-vt 0.437500 0.937500
-vt 0.437500 0.999999
-vt 0.375000 0.999999
-vt 0.375000 0.937500
-vt 0.312500 0.999999
-vt 0.312500 0.937500
-vt 0.187500 0.937500
-vt 0.187500 0.999999
-vt 0.125000 0.999999
-vt 0.125000 0.937500
-vt 0.062500 0.937500
-vt 0.000000 0.937500
-vt 0.625000 0.000000
-vt 0.625000 0.062500
-vt 0.625000 0.437500
-vt 0.625000 0.562500
-vt 0.375000 0.437500
-vt 0.375000 0.062500
-vt 0.375000 0.000000
-vt 0.375000 0.562500
-vt 0.250000 0.437500
-vt 0.250000 0.375000
-vt 0.250000 0.125000
-vt 0.250000 0.062500
-vt 0.250000 0.937500
-vt 0.250000 0.875000
-vt 0.250000 0.625000
-vt 0.250000 0.562500
-vt 0.750000 0.562500
-vt 0.750000 0.625000
-vt 0.750000 0.875000
-vt 0.750000 0.937500
-vt 0.750000 0.062500
-vt 0.750000 0.125000
-vt 0.750000 0.375000
-vt 0.750000 0.437500
-vt 0.875000 0.625000
-vt 0.875000 0.687500
-vt 0.875000 0.812500
-vt 0.875000 0.875000
-vt 0.875000 0.125000
-vt 0.875000 0.156250
-vt 0.875000 0.187500
-vt 0.875000 0.312500
-vt 0.875000 0.375000
-vt 1.000000 0.687500
-vt 1.000000 0.812500
-vt 1.000000 0.187500
-vt 1.000000 0.312500
-vt 0.125000 0.187500
-vt 0.125000 0.312500
-vt 0.000000 0.312500
-vt 0.000000 0.187500
-vt 0.125000 0.687500
-vt 0.125000 0.812500
-vt 0.000000 0.812500
-vt 0.000000 0.687500
-vt 0.125000 0.875000
-vt 0.125000 0.625000
-vt 0.125000 0.375000
-vt 0.125000 0.125000
-vn 0.000000 1.000000 0.000000
-vn -0.000000 -1.000000 0.000000
-vn 0.000000 0.000000 -1.000000
-vn -1.000000 0.000000 0.000000
-vn 1.000000 -0.000000 -0.000000
-vn 0.000000 0.000000 1.000000
-g Cube_Cube_Material
-s off
-f 57/1/1 3/2/1 4/3/1 58/4/1
-f 31/5/2 30/6/2 32/7/2 33/8/2
-f 8/9/3 7/10/3 30/11/3 31/12/3
-f 9/13/2 10/14/2 7/6/2 8/5/2
-f 12/15/3 11/16/3 10/10/3 9/9/3
-f 24/17/2 25/18/2 11/14/2 12/13/2
-f 16/19/1 15/20/1 14/4/1 13/1/1
-f 17/21/3 18/22/3 15/23/3 16/24/3 69/25/3
-f 20/26/1 19/27/1 18/20/1 17/19/1
-f 26/28/3 27/29/3 19/22/3 20/21/3
-f 29/30/1 28/31/1 27/27/1 26/26/1
-f 1/32/3 2/33/3 28/29/3 29/28/3
-f 37/34/3 36/35/3 38/36/3 39/37/3
-f 39/26/1 38/27/1 40/20/1 41/19/1
-f 41/37/3 40/36/3 42/38/3 43/39/3
-f 22/17/2 23/18/2 46/14/2 45/13/2
-f 45/40/3 46/41/3 48/42/3 47/43/3
-f 47/13/2 48/14/2 50/6/2 49/5/2
-f 49/43/3 50/42/3 52/2/3 51/44/3
-f 51/5/2 52/6/2 54/7/2 53/8/2
-f 53/44/3 54/2/3 56/3/3 55/45/3
-f 43/19/1 42/20/1 21/4/1 44/1/1
-f 14/23/3 25/16/3 24/15/3 13/24/3
-f 60/18/2 5/33/2 6/29/2 59/17/2
-f 21/38/3 23/41/3 22/40/3 44/39/3
-f 57/18/4 59/33/4 6/3/4 3/4/4
-f 60/3/5 58/4/5 4/18/5 5/33/5
-f 1/30/1 57/2/1 58/3/1 2/31/1
-f 56/7/2 60/33/2 59/29/2 55/8/2
-f 1/46/4 29/47/4 33/48/4 35/49/4 53/9/4 55/10/4 59/3/4 57/4/4
-f 32/50/5 28/51/5 2/52/5 58/18/5 60/33/5 56/36/5 54/37/5 34/53/5
-f 34/31/1 36/27/1 37/26/1 35/30/1
-f 30/54/5 7/55/5 19/56/5 27/57/5 28/51/5 32/50/5
-f 34/53/5 54/37/5 52/58/5 50/59/5 38/60/5 36/61/5
-f 53/9/4 35/49/4 37/62/4 39/63/4 49/64/4 51/65/4
-f 29/47/4 26/66/4 20/67/4 8/68/4 31/69/4 33/48/4
-f 33/12/3 32/11/3 34/35/3 35/34/3
-f 3/1/1 61/2/1 62/3/1 4/4/1
-f 65/33/6 68/3/6 67/45/6 66/32/6
-f 5/18/2 63/33/2 64/29/2 6/17/2
-f 3/18/4 6/33/4 64/3/4 61/4/4
-f 5/3/5 4/4/5 62/18/5 63/33/5
-f 61/1/1 65/2/1 66/3/1 62/4/1
-f 63/18/2 67/33/2 68/29/2 64/17/2
-f 61/18/4 64/33/4 68/3/4 65/4/4
-f 63/3/5 62/4/5 66/18/5 67/33/5
-f 49/64/4 39/63/4 41/70/4 43/71/4 45/72/4 47/73/4
-f 8/68/4 20/67/4 17/74/4 69/75/4 16/76/4 12/77/4 9/78/4
-f 45/72/4 43/71/4 44/79/4 22/80/4
-f 12/77/4 16/76/4 13/81/4 24/82/4
-f 15/83/5 11/84/5 25/85/5 14/86/5
-f 42/87/5 46/88/5 23/89/5 21/90/5
-f 38/60/5 50/59/5 48/91/5 46/88/5 42/87/5 40/92/5
-f 7/55/5 10/93/5 11/84/5 15/83/5 18/94/5 19/56/5
diff --git a/castle/murder_hole.lua b/castle/murder_hole.lua
deleted file mode 100644
index 672f3b9..0000000
--- a/castle/murder_hole.lua
+++ /dev/null
@@ -1,50 +0,0 @@
-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"},
-}
-
-for _, row in ipairs(hole.types) do
- local name = row[1]
- local desc = row[2]
- local tile = row[3]
- local craft_material = row[4]
- -- Node Definition
- minetest.register_node("castle:hole_"..name, {
- drawtype = "nodebox",
- description = desc.." Murder Hole",
- tiles = {tile..".png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
- 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},
- },
- },
- })
-
- if craft_material then
- --Choose craft material
- minetest.register_craft({
- output = "castle:hole_"..name.." 4",
- recipe = {
- {"",craft_material, "" },
- {craft_material,"", craft_material},
- {"",craft_material, ""} },
- })
- end
-end
-
diff --git a/castle/orbs.lua b/castle/orbs.lua
deleted file mode 100644
index e69de29..0000000
--- a/castle/orbs.lua
+++ /dev/null
diff --git a/castle/pillars.lua b/castle/pillars.lua
deleted file mode 100644
index 40b8143..0000000
--- a/castle/pillars.lua
+++ /dev/null
@@ -1,108 +0,0 @@
-minetest.register_alias("castle:pillars_bottom", "castle:pillars_stonewall_bottom")
-minetest.register_alias("castle:pillars_top", "castle:pillars_stonewall_top")
-minetest.register_alias("castle:pillars_middle", "castle:pillars_stonewall_middle")
-
-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"},
-}
-
-for _, row in ipairs(pillar.types) do
- local name = row[1]
- local desc = row[2]
- local tile = row[3]
- local craft_material = row[4]
- -- Node Definition
- minetest.register_node("castle:pillars_"..name.."_bottom", {
- drawtype = "nodebox",
- description = desc.." Pillar Base",
- tiles = {tile..".png"},
- groups = {cracky=3,attached_node=1},
- sounds = default.node_sound_stone_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},
- },
- },
- })
- minetest.register_node("castle:pillars_"..name.."_top", {
- drawtype = "nodebox",
- description = desc.." Pillar Top",
- tiles = {tile..".png"},
- groups = {cracky=3,attached_node=1},
- sounds = default.node_sound_stone_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,0.312500,-0.500000,0.500000,0.500000,0.500000},
- {-0.375000,0.062500,-0.375000,0.375000,0.312500,0.375000},
- {-0.250000,-0.500000,-0.250000,0.250000,0.062500,0.250000},
- },
- },
- })
-
- minetest.register_node("castle:pillars_"..name.."_middle", {
- drawtype = "nodebox",
- description = desc.." Pillar Middle",
- tiles = {tile..".png"},
- groups = {cracky=3,attached_node=1},
- sounds = default.node_sound_stone_defaults(),
- 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} },
- })
- 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,""} },
- })
- 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} },
- })
- end
-end
-
diff --git a/castle/rope.lua b/castle/rope.lua
deleted file mode 100644
index 8c7b73e..0000000
--- a/castle/rope.lua
+++ /dev/null
@@ -1,124 +0,0 @@
-minetest.register_node("castle:ropes",{
- description = "Rope",
- drawtype = "nodebox",
- sunlight_propagates = true,
- tiles = {"castle_ropes.png"},
- groups = {choppy=3,snappy=3,oddly_breakable_by_hand=3,flammable=1},
- sounds = default.node_sound_defaults(),
- paramtype = "light",
- climbable = true,
- walkable = false,
- node_box = {
- type = "fixed",
- fixed = {
- {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16},
- },
- },
-})
-
-minetest.register_craft({
- output = "castle:ropes",
- recipe = {
- {"farming:string"},
- {"farming:string"},
- {"farming:string"},
- }
-})
-
-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,
- node_box = {
- type = "fixed",
- fixed = {
- {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-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,
-})
-
-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},
- sounds = default.node_sound_defaults(),
- 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},
- {-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},
- },
- },
- 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({
- nodenames = {"castle:ropebox"},
- interval = 1,
- 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"})
- end
-})
-
-minetest.register_abm({
- nodenames = {"castle:box_rope"},
- interval = 1,
- 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"})
- end
-})
-
-minetest.register_craft({
- output = "castle:ropebox",
- recipe = {
- {"default:wood"},
- {"castle:ropes"},
- }
-})
-
diff --git a/castle/screenshot.png b/castle/screenshot.png
deleted file mode 100644
index 60175ee..0000000
--- a/castle/screenshot.png
+++ /dev/null
Binary files differ
diff --git a/castle/shields_decor.lua b/castle/shields_decor.lua
deleted file mode 100644
index 20823f6..0000000
--- a/castle/shields_decor.lua
+++ /dev/null
@@ -1,103 +0,0 @@
-minetest.register_node("castle:shield",{
- description = "Mounted Shield",
- tiles = {"castle_shield_side.png", "castle_shield_side.png", "castle_shield_side.png", "castle_shield_side.png", "castle_shield_back.png", "castle_shield_front.png"},
- drawtype="nodebox",
- paramtype2 = "facedir",
- paramtype = "light",
- groups={cracky=3},
- sounds = default.node_sound_defaults(),
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.125000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
- {-0.437500,-0.312500,0.375000,0.425000,0.500000,0.500000}, --NodeBox 2
- {-0.312500,-0.437500,0.375000,0.312500,0.500000,0.500000}, --NodeBox 3
- {-0.187500,-0.500000,0.375000,0.187500,0.500000,0.500000}, --NodeBox 4
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
- },
- },
-})
-
-
-minetest.register_craft({
- output = "castle:shield",
- recipe = {
- {"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
- {"default:steel_ingot", "default:steel_ingot","default:steel_ingot"},
- {"dye:red", "default:steel_ingot","dye:blue"},
- }
-})
-
-minetest.register_node("castle:shield_2",{
- description = "Mounted Shield",
- tiles = {"castle_shield_side_2.png", "castle_shield_side_2.png", "castle_shield_side_2.png", "castle_shield_side_2.png", "castle_shield_back.png", "castle_shield_front_2.png"},
- drawtype="nodebox",
- paramtype2 = "facedir",
- paramtype = "light",
- groups={cracky=3},
- sounds = default.node_sound_defaults(),
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.125000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
- {-0.437500,-0.312500,0.375000,0.425000,0.500000,0.500000}, --NodeBox 2
- {-0.312500,-0.437500,0.375000,0.312500,0.500000,0.500000}, --NodeBox 3
- {-0.187500,-0.500000,0.375000,0.187500,0.500000,0.500000}, --NodeBox 4
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
- },
- },
-})
-
-minetest.register_craft({
- output = "castle:shield_2",
- recipe = {
- {"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
- {"default:steel_ingot", "default:steel_ingot","default:steel_ingot"},
- {"dye:cyan", "default:steel_ingot","dye:yellow"},
- }
-})
-
-minetest.register_node("castle:shield_3",{
- description = "Mounted Shield",
- tiles = {"castle_shield_side_3.png", "castle_shield_side_3.png", "castle_shield_side_3.png", "castle_shield_side_3.png", "castle_shield_back.png", "castle_shield_front_3.png"},
- drawtype="nodebox",
- paramtype2 = "facedir",
- paramtype = "light",
- groups={cracky=3},
- sounds = default.node_sound_defaults(),
- node_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.125000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
- {-0.437500,-0.312500,0.375000,0.425000,0.500000,0.500000}, --NodeBox 2
- {-0.312500,-0.437500,0.375000,0.312500,0.500000,0.500000}, --NodeBox 3
- {-0.187500,-0.500000,0.375000,0.187500,0.500000,0.500000}, --NodeBox 4
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.500000,-0.500000,0.375000,0.500000,0.500000,0.500000}, --NodeBox 1
- },
- },
-})
-
-minetest.register_craft({
- output = "castle:shield_3",
- recipe = {
- {"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
- {"default:steel_ingot", "default:steel_ingot","default:steel_ingot"},
- {"dye:grey", "default:steel_ingot","dye:green"},
- }
-})
-
diff --git a/castle/sounds/LICENSE.txt b/castle/sounds/LICENSE.txt
deleted file mode 100644
index f8041dd..0000000
--- a/castle/sounds/LICENSE.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-License Sounds
-------------------
-
-(From Simple Shooter mod by Stuart Jones)
--castle_crossbow_click.ogg
--castle_crossbow_shoot.ogg
--castle_crossbow_reload.ogg
-
-Author : freesound.org
-License : Attribution 3.0 Unported (CC BY 3.0)
-CC0 1.0 Universal (CC0 1.0)
-
-------------------
-
-(From Minetest Game:default mod)
--default_wood_footstep.1.ogg
-(renamed to : castle_crossbow_bolt.ogg)
-Author : Mito551
-License : (CC BY-SA)
-
-------------------
-
-Author: Brandon Morris
-file: castle_orbs.ogg
-original file : completetask_0.mp3
-http://opengameart.org/content/completion-sound
-License: CC-BY 3.0
-http://creativecommons.org/licenses/by/3.0/
-
-------------------
-
-(From Ambience mod)
-
-Author: Mike Koenig
-file: castle_owl.ogg
-original file : horned_owl.ogg
-http://soundbible.com/1851-Horned-Owl.html
-License: Attribution 3.0
-http://creativecommons.org/licenses/by/3.0/
-
-------------------
-
-(From Ambience mod)
-
-Author: PsychoBird
-file: castle_birds.ogg
-original file : Best Cardinal Bird.ogg
-http://soundbible.com/1515-Best-Cardinal-Bird.html
-License: Attribution 3.0
-http://creativecommons.org/licenses/by/3.0/
-
------------------- \ No newline at end of file
diff --git a/castle/sounds/castle_birds.ogg b/castle/sounds/castle_birds.ogg
deleted file mode 100644
index 4a93395..0000000
--- a/castle/sounds/castle_birds.ogg
+++ /dev/null
Binary files differ
diff --git a/castle/sounds/castle_crossbow_bolt.ogg b/castle/sounds/castle_crossbow_bolt.ogg
deleted file mode 100644
index 34f63a1..0000000
--- a/castle/sounds/castle_crossbow_bolt.ogg
+++ /dev/null
Binary files differ
diff --git a/castle/sounds/castle_crossbow_click.ogg b/castle/sounds/castle_crossbow_click.ogg
deleted file mode 100644
index 8e60db8..0000000
--- a/castle/sounds/castle_crossbow_click.ogg
+++ /dev/null
Binary files differ
diff --git a/castle/sounds/castle_crossbow_reload.ogg b/castle/sounds/castle_crossbow_reload.ogg
deleted file mode 100644
index 47f7245..0000000
--- a/castle/sounds/castle_crossbow_reload.ogg
+++ /dev/null
Binary files differ
diff --git a/castle/sounds/castle_crossbow_shoot.ogg b/castle/sounds/castle_crossbow_shoot.ogg
deleted file mode 100644
index 9ce9176..0000000
--- a/castle/sounds/castle_crossbow_shoot.ogg
+++ /dev/null
Binary files differ
diff --git a/castle/sounds/castle_orbs.ogg b/castle/sounds/castle_orbs.ogg
deleted file mode 100644
index c7aa8f8..0000000
--- a/castle/sounds/castle_orbs.ogg
+++ /dev/null
Binary files differ
diff --git a/castle/sounds/castle_owl.ogg b/castle/sounds/castle_owl.ogg
deleted file mode 100644
index f30d0b3..0000000
--- a/castle/sounds/castle_owl.ogg
+++ /dev/null
Binary files differ
diff --git a/castle/tapestry.lua b/castle/tapestry.lua
deleted file mode 100644
index 1115b0e..0000000
--- a/castle/tapestry.lua
+++ /dev/null
@@ -1,196 +0,0 @@
-local tapestry = {}
-
-minetest.register_node("castle:tapestry_top", {
- drawtype = "nodebox",
- description = "Tapestry Top",
- tiles = {"default_wood.png"},
- sunlight_propagates = true,
- groups = {flammable=3,oddly_breakable_by_hand=3},
- sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.6,-0.5,0.375,0.6,-0.375,0.5},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.6,-0.5,0.375,0.6,-0.375,0.5},
- },
- },
-})
-
-minetest.register_craft({
- type = "shapeless",
- output = 'castle:tapestry_top',
- recipe = {'default:stick'},
-})
-
-tapestry.colours = {
- "white",
- "grey",
- "black",
- "red",
- "yellow",
- "green",
- "cyan",
- "blue",
- "magenta",
- "orange",
- "violet",
- "dark_grey",
- "dark_green",
- "pink",
- "brown",
-}
-
--- Regular-length tapestry
-
-minetest.register_node("castle:tapestry", {
- drawtype = "mesh",
- mesh = "castle_tapestry.obj",
- description = "Tapestry",
- tiles = {"castle_tapestry.png"},
- inventory_image = "castle_tapestry_inv.png",
- groups = {oddly_breakable_by_hand=3,flammable=3, ud_param2_colorable = 1},
- sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "colorwallmounted",
- palette = "unifieddyes_palette_colorwallmounted.png",
- selection_box = {
- type = "wallmounted",
- wall_side = {-0.5,-0.5,0.4375,0.5,1.5,0.5},
- },
- after_place_node = unifieddyes.fix_rotation_nsew,
- after_dig_node = unifieddyes.after_dig_node,
- on_rotate = unifieddyes.fix_after_screwdriver_nsew
-})
-
--- Crafting from wool and a stick
-
-minetest.register_craft({
- type = "shapeless",
- output = 'castle:tapestry',
- recipe = {'wool:white', 'default:stick'},
-})
-
--- Long tapestry
-
-minetest.register_node("castle:tapestry_long", {
- drawtype = "mesh",
- mesh = "castle_tapestry_long.obj",
- description = "Tapestry (Long)",
- tiles = {"castle_tapestry.png"},
- inventory_image = "castle_tapestry_long_inv.png",
- groups = {oddly_breakable_by_hand=3,flammable=3, ud_param2_colorable = 1},
- sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "colorwallmounted",
- palette = "unifieddyes_palette_colorwallmounted.png",
- selection_box = {
- type = "wallmounted",
- wall_side = {-0.5,-0.5,0.4375,0.5,2.5,0.5},
- },
- after_place_node = unifieddyes.fix_rotation_nsew,
- after_dig_node = unifieddyes.after_dig_node,
- on_rotate = unifieddyes.fix_after_screwdriver_nsew
-})
-
--- Crafting from normal tapestry and wool
-
-minetest.register_craft({
- type = "shapeless",
- output = 'castle:tapestry_long',
- recipe = {'wool:white', 'castle:tapestry'},
-})
-
--- Very long tapestry
-
-minetest.register_node("castle:tapestry_very_long", {
- drawtype = "mesh",
- mesh = "castle_tapestry_very_long.obj",
- description = "Tapestry (Very Long)",
- tiles = {"castle_tapestry.png"},
- inventory_image = "castle_tapestry_very_long_inv.png",
- groups = {oddly_breakable_by_hand=3,flammable=3, ud_param2_colorable = 1},
- sounds = default.node_sound_defaults(),
- paramtype = "light",
- paramtype2 = "colorwallmounted",
- palette = "unifieddyes_palette_colorwallmounted.png",
- selection_box = {
- type = "wallmounted",
- wall_side = {-0.5,-0.5,0.4375,0.5,3.5,0.5},
- },
- after_place_node = unifieddyes.fix_rotation_nsew,
- after_dig_node = unifieddyes.after_dig_node,
- on_rotate = unifieddyes.fix_after_screwdriver_nsew
-})
-
--- Crafting from long tapestry and wool
-
-minetest.register_craft({
- type = "shapeless",
- output = 'castle:tapestry_very_long',
- recipe = {'wool:white', 'castle:tapestry_long'},
-})
-
--- Convert static tapestries to param2 color
-
-castle.old_static_tapestries = {}
-
-for _, color in ipairs(tapestry.colours) do
- table.insert(castle.old_static_tapestries, "castle:tapestry_"..color)
- table.insert(castle.old_static_tapestries, "castle:long_tapestry_"..color)
- table.insert(castle.old_static_tapestries, "castle:very_long_tapestry_"..color)
-end
-
-minetest.register_lbm({
- name = "castle:convert_tapestries",
- label = "Convert tapestries to use param2 color",
- run_at_every_load = false,
- nodenames = castle.old_static_tapestries,
- action = function(pos, node)
- local oldname = node.name
- local color = string.sub(oldname, string.find(oldname, "_", -12) + 1)
-
- if color == "red" then
- color = "medium_red"
- elseif color == "cyan" then
- color = "medium_cyan"
- elseif color == "blue" then
- color = "medium_blue"
- elseif color == "magenta" then
- color = "medium_magenta"
- end
-
- local paletteidx, _ = unifieddyes.getpaletteidx("unifieddyes:"..color, "wallmounted")
-
- local old_fdir = math.floor(node.param2 % 32)
- local new_fdir = 3
-
- if old_fdir == 0 then
- new_fdir = 3
- elseif old_fdir == 1 then
- new_fdir = 4
- elseif old_fdir == 2 then
- new_fdir = 2
- elseif old_fdir == 3 then
- new_fdir = 5
- end
-
- local param2 = paletteidx + new_fdir
- local newname = "castle:tapestry"
- if string.find(oldname, ":long") then
- newname = "castle:tapestry_long"
- elseif string.find(oldname, ":very_long") then
- newname = "castle:tapestry_very_long"
- end
-
- minetest.set_node(pos, { name = newname, param2 = param2 })
- local meta = minetest.get_meta(pos)
- meta:set_string("dye", "unifieddyes:"..color)
- end
-})
diff --git a/castle/textures/LICENSE.txt b/castle/textures/LICENSE.txt
deleted file mode 100644
index ce99ae2..0000000
--- a/castle/textures/LICENSE.txt
+++ /dev/null
@@ -1,84 +0,0 @@
---------------------------------------------
-
-License Textures: Stuart Jones - WTFPL
--castle_crossbow_bolt_inv.png
--castle_crossbow_bolt_uv.png
--castle_crossbow_hit.png
-
-Licence Models: Stuart Jones - CC-BY-SA 3.0
--castle_crossbow_bolt.b3d
--castle_crossbow_bolt.blend
-
-
---------------------------------------------
-
-License Textures: Kilbith - WTFPL
-
--castle_tapestry_overlay.png
-
-
---------------------------------------------
-
-License Textures: Philipner - CC-BY-SA 3.0
-
--castle_chandelier.png
--castle_chandelier_chain.png
--castle_chandelier_wield.png
--castle_corner_stonewall_tb.png
--castle_corner_stonewall1.png
--castle_corner_stonewall2.png
--castle_orb_day.png
--castle_orb_night.png
--castle_workbench_back.png
--castle_workbench_front.png
--castle_workbench_side.png
--castle_workbench_top.png
-
-
---------------------------------------------
-
-16 px textures based on Castle mod
-original textures by Philipner
-
-License Textures: Napiophelios - CC-BY-SA 3.0
-
--castle_battleaxe.png
--castle_crossbow_bolt_inv.png
--castle_crossbow_hit.png
--castle_crossbow_loaded.png
--castle_door_jail.png
--castle_door_oak.png
--castle_dungeon_stone.png
--castle_grey.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_orb_day_weild.png
--castle_orb_night_weild.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_space.png
--castle_steel.png
--castle_stonewall.png
--castle_straw_bale.png
--castle_street_light.png
--castle_workbench_bottom.png
-
---------------------------------------------
diff --git a/castle/textures/castle_battleaxe.png b/castle/textures/castle_battleaxe.png
deleted file mode 100644
index 4f7f738..0000000
--- a/castle/textures/castle_battleaxe.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_chandelier.png b/castle/textures/castle_chandelier.png
deleted file mode 100644
index fbc0039..0000000
--- a/castle/textures/castle_chandelier.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_chandelier_chain.png b/castle/textures/castle_chandelier_chain.png
deleted file mode 100644
index 47a526a..0000000
--- a/castle/textures/castle_chandelier_chain.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_chandelier_wield.png b/castle/textures/castle_chandelier_wield.png
deleted file mode 100644
index 59dae96..0000000
--- a/castle/textures/castle_chandelier_wield.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_corner_stonewall1.png b/castle/textures/castle_corner_stonewall1.png
deleted file mode 100644
index 0a9c091..0000000
--- a/castle/textures/castle_corner_stonewall1.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_corner_stonewall2.png b/castle/textures/castle_corner_stonewall2.png
deleted file mode 100644
index d9d7d0c..0000000
--- a/castle/textures/castle_corner_stonewall2.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_corner_stonewall_tb.png b/castle/textures/castle_corner_stonewall_tb.png
deleted file mode 100644
index d72d78d..0000000
--- a/castle/textures/castle_corner_stonewall_tb.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_crate.png b/castle/textures/castle_crate.png
deleted file mode 100644
index 33669e8..0000000
--- a/castle/textures/castle_crate.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_crate_top.png b/castle/textures/castle_crate_top.png
deleted file mode 100644
index 89d65a2..0000000
--- a/castle/textures/castle_crate_top.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_crossbow_bolt_inv.png b/castle/textures/castle_crossbow_bolt_inv.png
deleted file mode 100644
index 87cd847..0000000
--- a/castle/textures/castle_crossbow_bolt_inv.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_crossbow_hit.png b/castle/textures/castle_crossbow_hit.png
deleted file mode 100644
index 0a2b2f3..0000000
--- a/castle/textures/castle_crossbow_hit.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_crossbow_inv.png b/castle/textures/castle_crossbow_inv.png
deleted file mode 100644
index 39bcf07..0000000
--- a/castle/textures/castle_crossbow_inv.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_crossbow_loaded.png b/castle/textures/castle_crossbow_loaded.png
deleted file mode 100644
index ca2dca7..0000000
--- a/castle/textures/castle_crossbow_loaded.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_door_jail.png b/castle/textures/castle_door_jail.png
deleted file mode 100644
index 0d4f7bf..0000000
--- a/castle/textures/castle_door_jail.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_door_oak.png b/castle/textures/castle_door_oak.png
deleted file mode 100644
index 2282fb2..0000000
--- a/castle/textures/castle_door_oak.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_dungeon_stone.png b/castle/textures/castle_dungeon_stone.png
deleted file mode 100644
index 6a2c154..0000000
--- a/castle/textures/castle_dungeon_stone.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_grey.png b/castle/textures/castle_grey.png
deleted file mode 100644
index 8e77900..0000000
--- a/castle/textures/castle_grey.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_hide.png b/castle/textures/castle_hide.png
deleted file mode 100644
index 3e6f6c4..0000000
--- a/castle/textures/castle_hide.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_back.png b/castle/textures/castle_ironbound_chest_back.png
deleted file mode 100644
index 29446db..0000000
--- a/castle/textures/castle_ironbound_chest_back.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_front.png b/castle/textures/castle_ironbound_chest_front.png
deleted file mode 100644
index 8d91e07..0000000
--- a/castle/textures/castle_ironbound_chest_front.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_side.png b/castle/textures/castle_ironbound_chest_side.png
deleted file mode 100644
index 3a94f81..0000000
--- a/castle/textures/castle_ironbound_chest_side.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ironbound_chest_top.png b/castle/textures/castle_ironbound_chest_top.png
deleted file mode 100644
index 29446db..0000000
--- a/castle/textures/castle_ironbound_chest_top.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_jail_door_inv.png b/castle/textures/castle_jail_door_inv.png
deleted file mode 100644
index 5121fb8..0000000
--- a/castle/textures/castle_jail_door_inv.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_jailbars.png b/castle/textures/castle_jailbars.png
deleted file mode 100644
index e2cc911..0000000
--- a/castle/textures/castle_jailbars.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_oak_door_inv.png b/castle/textures/castle_oak_door_inv.png
deleted file mode 100644
index 1122d51..0000000
--- a/castle/textures/castle_oak_door_inv.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_orb_day.png b/castle/textures/castle_orb_day.png
deleted file mode 100644
index 3c12896..0000000
--- a/castle/textures/castle_orb_day.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_orb_day_weild.png b/castle/textures/castle_orb_day_weild.png
deleted file mode 100644
index 1cfc6df..0000000
--- a/castle/textures/castle_orb_day_weild.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_orb_night.png b/castle/textures/castle_orb_night.png
deleted file mode 100644
index 2b062d1..0000000
--- a/castle/textures/castle_orb_night.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_orb_night_weild.png b/castle/textures/castle_orb_night_weild.png
deleted file mode 100644
index ded6e38..0000000
--- a/castle/textures/castle_orb_night_weild.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_pavement_brick.png b/castle/textures/castle_pavement_brick.png
deleted file mode 100644
index fd10e0f..0000000
--- a/castle/textures/castle_pavement_brick.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ropebox_side_1.png b/castle/textures/castle_ropebox_side_1.png
deleted file mode 100644
index 00902d7..0000000
--- a/castle/textures/castle_ropebox_side_1.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ropebox_side_2.png b/castle/textures/castle_ropebox_side_2.png
deleted file mode 100644
index 6340191..0000000
--- a/castle/textures/castle_ropebox_side_2.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ropebox_top.png b/castle/textures/castle_ropebox_top.png
deleted file mode 100644
index 0b9115b..0000000
--- a/castle/textures/castle_ropebox_top.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_ropes.png b/castle/textures/castle_ropes.png
deleted file mode 100644
index 456d7bb..0000000
--- a/castle/textures/castle_ropes.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_rubble.png b/castle/textures/castle_rubble.png
deleted file mode 100644
index fbaa32c..0000000
--- a/castle/textures/castle_rubble.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_shield_back.png b/castle/textures/castle_shield_back.png
deleted file mode 100644
index 53cca18..0000000
--- a/castle/textures/castle_shield_back.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_shield_front.png b/castle/textures/castle_shield_front.png
deleted file mode 100644
index c7b56fc..0000000
--- a/castle/textures/castle_shield_front.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_shield_front_2.png b/castle/textures/castle_shield_front_2.png
deleted file mode 100644
index ffc2256..0000000
--- a/castle/textures/castle_shield_front_2.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_shield_front_3.png b/castle/textures/castle_shield_front_3.png
deleted file mode 100644
index 7dc48a7..0000000
--- a/castle/textures/castle_shield_front_3.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_shield_side.png b/castle/textures/castle_shield_side.png
deleted file mode 100644
index 8aaa6a9..0000000
--- a/castle/textures/castle_shield_side.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_shield_side_2.png b/castle/textures/castle_shield_side_2.png
deleted file mode 100644
index 07282d2..0000000
--- a/castle/textures/castle_shield_side_2.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_shield_side_3.png b/castle/textures/castle_shield_side_3.png
deleted file mode 100644
index 6dc8aeb..0000000
--- a/castle/textures/castle_shield_side_3.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_slate.png b/castle/textures/castle_slate.png
deleted file mode 100644
index a7de1ea..0000000
--- a/castle/textures/castle_slate.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_space.png b/castle/textures/castle_space.png
deleted file mode 100644
index c2e8752..0000000
--- a/castle/textures/castle_space.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_steel.png b/castle/textures/castle_steel.png
deleted file mode 100644
index 28ecd60..0000000
--- a/castle/textures/castle_steel.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_stonewall.png b/castle/textures/castle_stonewall.png
deleted file mode 100644
index b8f823f..0000000
--- a/castle/textures/castle_stonewall.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_straw_bale.png b/castle/textures/castle_straw_bale.png
deleted file mode 100644
index ad56330..0000000
--- a/castle/textures/castle_straw_bale.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_street_light.png b/castle/textures/castle_street_light.png
deleted file mode 100644
index dc3f72e..0000000
--- a/castle/textures/castle_street_light.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_tapestry.png b/castle/textures/castle_tapestry.png
deleted file mode 100644
index e807340..0000000
--- a/castle/textures/castle_tapestry.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_tapestry_inv.png b/castle/textures/castle_tapestry_inv.png
deleted file mode 100644
index 99c1b2e..0000000
--- a/castle/textures/castle_tapestry_inv.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_tapestry_long_inv.png b/castle/textures/castle_tapestry_long_inv.png
deleted file mode 100644
index ce04c40..0000000
--- a/castle/textures/castle_tapestry_long_inv.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_tapestry_very_long_inv.png b/castle/textures/castle_tapestry_very_long_inv.png
deleted file mode 100644
index 6fcca22..0000000
--- a/castle/textures/castle_tapestry_very_long_inv.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_workbench_back.png b/castle/textures/castle_workbench_back.png
deleted file mode 100644
index 174d941..0000000
--- a/castle/textures/castle_workbench_back.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_workbench_bottom.png b/castle/textures/castle_workbench_bottom.png
deleted file mode 100644
index f50a8f3..0000000
--- a/castle/textures/castle_workbench_bottom.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_workbench_front.png b/castle/textures/castle_workbench_front.png
deleted file mode 100644
index 27a1f1f..0000000
--- a/castle/textures/castle_workbench_front.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_workbench_side.png b/castle/textures/castle_workbench_side.png
deleted file mode 100644
index b6418ac..0000000
--- a/castle/textures/castle_workbench_side.png
+++ /dev/null
Binary files differ
diff --git a/castle/textures/castle_workbench_top.png b/castle/textures/castle_workbench_top.png
deleted file mode 100644
index fef4827..0000000
--- a/castle/textures/castle_workbench_top.png
+++ /dev/null
Binary files differ
diff --git a/castle/town_item.lua b/castle/town_item.lua
deleted file mode 100644
index ee7d22f..0000000
--- a/castle/town_item.lua
+++ /dev/null
@@ -1,386 +0,0 @@
-
-minetest.register_alias("darkage:box", "castle:crate")
-minetest.register_alias("cottages:straw", "farming:straw")
-minetest.register_alias("castle:straw", "farming:straw")
-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",
- description = "Anvil",
- tiles = {"castle_steel.png"},
- groups = {cracky=2,falling_node=1},
- sounds = default.node_sound_stone_defaults(),
- paramtype = "light",
- paramtype2 = "facedir",
- node_box = {
- 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},
- },
- },
-})
-
-minetest.register_craft({
- output = "castle:anvil",
- recipe = {
- {"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
- {"","default:steel_ingot", ""},
- {"default:steel_ingot", "default:steel_ingot","default:steel_ingot"},
- }
-})
-
-minetest.register_node("castle:workbench",{
- description = "Workbench",
- tiles = {"castle_workbench_top.png", "castle_workbench_bottom.png", "castle_workbench_side.png", "castle_workbench_side.png", "castle_workbench_back.png", "castle_workbench_front.png"},
- paramtype2 = "facedir",
- paramtype = "light",
- groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- drawtype = "normal",
- 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]' ..
- 'list[context;rec;4,1;3,3;]' ..
- '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 )
- inv:set_size( 'rec', 3 * 3 )
- inv:set_size( 'dst', 1 * 4 )
- end,
- can_dig = function(pos,player)
- local meta = minetest.get_meta(pos);
- local inv = meta:get_inventory()
- return inv:is_empty("main")
- end,
- on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
- 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)
- 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)
- minetest.log("action", player:get_player_name()..
- " takes stuff from workbench at "..minetest.pos_to_string(pos))
- end,
-})
-local get_recipe = function ( inv )
- local result, needed, input
- needed = inv:get_list( 'rec' )
-
- result, input = minetest.get_craft_result( {
- method = 'normal',
- width = 3,
- items = needed
- })
-
- local totalneed = {}
-
- if result.item:is_empty() then
- result = nil
- else
- result = result.item
- for _, item in ipairs( needed ) do
- if item ~= nil and not item:is_empty() and not inv:contains_item( 'src', item ) then
- result = nil
- break
- end
- if item ~= nil and not item:is_empty() then
- if totalneed[item:get_name()] == nil then
- totalneed[item:get_name()] = 1
- else
- totalneed[item:get_name()] = totalneed[item:get_name()] + 1
- end
- end
- end
- for name, number in pairs( totalneed ) do
- local totallist = inv:get_list( 'src' )
- for i, srcitem in pairs( totallist ) do
- if srcitem:get_name() == name then
- local taken = srcitem:take_item( number )
- number = number - taken:get_count()
- totallist[i] = srcitem
- end
- if number <= 0 then
- break
- end
- end
- if number > 0 then
- result = nil
- break
- end
- end
- end
-
- return needed, input, result
-end
-
-minetest.register_abm( {
- nodenames = { 'castle:workbench' },
- interval = 5,
- chance = 1,
- action = function ( pos, node )
- local meta = minetest.get_meta( pos )
- local inv = meta:get_inventory()
- local result, newinput, needed
- if not inv:is_empty( 'src' ) then
- -- Check for a valid recipe and sufficient resources to craft it
- needed, newinput, result = get_recipe( inv )
- if result ~= nil and inv:room_for_item( 'dst', result ) then
- inv:add_item( 'dst', result )
- for i, item in pairs( needed ) do
- if item ~= nil and item ~= '' then
- inv:remove_item( 'src', ItemStack( item ) )
- end
- if newinput[i] ~= nil and not newinput[i]:is_empty() then
- inv:add_item( 'src', newinput[i] )
- end
- end
- end
- end
- end
-} )
-
-local function has_locked_chest_privilege(meta, player)
- if player:get_player_name() ~= meta:get_string("owner") then
- return false
- end
- return true
-end
-
-minetest.register_craft({
- output = "castle:workbench",
- recipe = {
- {"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
- {"default:wood", "default:wood","default:steel_ingot"},
- {"default:tree", "default:tree","default:steel_ingot"},
- }
-})
-
-minetest.register_node("castle:dungeon_stone", {
- description = "Dungeon Stone",
- drawtype = "normal",
- tiles = {"castle_dungeon_stone.png"},
- groups = {cracky=2},
- paramtype = "light",
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_craft({
- output = "castle:dungeon_stone",
- recipe = {
- {"default:stonebrick", "default:obsidian"},
- }
-})
-
-minetest.register_craft({
- output = "castle:dungeon_stone",
- recipe = {
- {"default:stonebrick"},
- {"default:obsidian"},
- }
-})
-
-minetest.register_node("castle:crate", {
- description = "Crate",
- drawtype = "normal",
- tiles = {"castle_crate_top.png","castle_crate_top.png","castle_crate.png","castle_crate.png","castle_crate.png","castle_crate.png"},
- groups = {choppy=3},
- sounds = default.node_sound_wood_defaults(),
- paramtype = "light",
- on_construct = function(pos)
- 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,0;8,5;]"..
- "list[current_player;main;0,5;8,4;]")
- meta:set_string("infotext", "Crate")
- local inv = meta:get_inventory()
- inv:set_size("main", 8*4)
- end,
- can_dig = function(pos,player)
- local meta = minetest.get_meta(pos);
- local inv = meta:get_inventory()
- return inv:is_empty("main")
- end,
- on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
- 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)
- 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)
- minetest.log("action", player:get_player_name()..
- " takes stuff from crate at "..minetest.pos_to_string(pos))
- end,
-})
-
-minetest.register_craft({
- output = "castle:crate",
- recipe = {
- {"default:wood", "default:wood", "default:wood"},
- {"default:wood", "default:steel_ingot", "default:wood"},
- }
-})
-
-minetest.register_node("castle:bound_straw", {
- description = "Bound Straw",
- drawtype = "normal",
- tiles = {"castle_straw_bale.png"},
- groups = {choppy=4, flammable=1, oddly_breakable_by_hand=3},
- sounds = default.node_sound_leaves_defaults(),
- paramtype = "light",
-})
-
-minetest.register_craft({
- output = "castle:bound_straw",
- recipe = {
- {"castle:straw", "castle:ropes"},
- }
-})
-
-minetest.register_node("castle:pavement_brick", {
- description = "Paving Stone",
- drawtype = "normal",
- tiles = {"castle_pavement_brick.png"},
- groups = {cracky=2},
- paramtype = "light",
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_craft({
- output = "castle:pavement_brick 4",
- recipe = {
- {"default:stone", "default:cobble"},
- {"default:cobble", "default:stone"},
- }
-})
-
-minetest.register_node("castle:light",{
- drawtype = "glasslike",
- description = "Light Block",
- sunlight_propagates = true,
- light_source = 14,
- tiles = {"castle_street_light.png"},
- groups = {cracky=2},
- sounds = default.node_sound_glass_defaults(),
- paramtype = "light",
-})
-
-minetest.register_craft({
- output = "castle:light",
- recipe = {
- {"default:stick", "default:glass", "default:stick"},
- {"default:glass", "default:torch", "default:glass"},
- {"default:stick", "default:glass", "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"},
- groups = {cracky=2, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("castle", "pavement_brick", "castle:pavement_brick", {
- description = "Pavement Brick",
- tiles = {"castle_pavement_brick.png"},
- groups = {cracky=2, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
-else
- stairs.register_stair_and_slab("dungeon_stone", "castle:dungeon_stone",
- {cracky=2},
- {"castle_dungeon_stone.png"},
- "Dungeon Stone Stair",
- "Dungeon Stone Slab",
- default.node_sound_stone_defaults()
- )
-
- stairs.register_stair_and_slab("pavement_brick", "castle:pavement_brick",
- {cracky=2},
- {"castle_pavement_brick.png"},
- "Castle Pavement Stair",
- "Castle Pavement Slab",
- default.node_sound_stone_defaults()
- )
-end
-
-minetest.register_node( "castle:chandelier", {
- drawtype = "plantlike",
- description = "Chandelier",
- paramtype = "light",
- wield_image = "castle_chandelier_wield.png",
- inventory_image = "castle_chandelier_wield.png",
- groups = {cracky=2},
- sounds = default.node_sound_glass_defaults(),
- sunlight_propagates = true,
- light_source = 14,
- tiles = {
- {
- name = "castle_chandelier.png",
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 1.0
- },
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {0.35,-0.375,0.35,-0.35,0.5,-0.35},
-
- },
- },
-})
-
-minetest.register_node( "castle:chandelier_chain", {
- drawtype = "plantlike",
- description = "Chandelier Chain",
- paramtype = "light",
- wield_image = "castle_chandelier_chain.png",
- inventory_image = "castle_chandelier_chain.png",
- groups = {cracky=2},
- sounds = default.node_sound_glass_defaults(),
- sunlight_propagates = true,
- tiles = {"castle_chandelier_chain.png"},
- selection_box = {
- type = "fixed",
- fixed = {
- {0.1,-0.5,0.1,-0.1,0.5,-0.1},
-
- },
- },
-})
-
diff --git a/castle_tapestries/init.lua b/castle_tapestries/init.lua
index 03e318d..437511e 100644
--- a/castle_tapestries/init.lua
+++ b/castle_tapestries/init.lua
@@ -73,7 +73,10 @@ minetest.register_node("castle_tapestries:tapestry", {
type = "wallmounted",
wall_side = {-0.5,-0.5,0.4375,0.5,1.5,0.5},
},
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew
})
@@ -103,7 +106,10 @@ minetest.register_node("castle_tapestries:tapestry_long", {
type = "wallmounted",
wall_side = {-0.5,-0.5,0.4375,0.5,2.5,0.5},
},
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew
})
@@ -133,7 +139,10 @@ minetest.register_node("castle_tapestries:tapestry_very_long", {
type = "wallmounted",
wall_side = {-0.5,-0.5,0.4375,0.5,3.5,0.5},
},
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew
})
diff --git a/coloredwood/init.lua b/coloredwood/init.lua
index 9a9f231..2c09e21 100644
--- a/coloredwood/init.lua
+++ b/coloredwood/init.lua
@@ -158,6 +158,7 @@ minetest.register_node("coloredwood:wood_block", {
sunlight_propagates = false,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:wood"
})
@@ -180,6 +181,11 @@ for _, color in ipairs(coloredwood.hues_plus_greys) do
paramtype = "light",
paramtype2 = "colorfacedir",
palette = "unifieddyes_palette_"..color.."s.png",
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ print("after_place_node on "..minetest.get_node(pos).name)
+ minetest.rotate_node(itemstack, placer, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1, ud_param2_colorable = 1},
after_dig_node = unifieddyes.after_dig_node
}
@@ -203,13 +209,19 @@ end
minetest.override_item(i.name, {
ud_replacement_node = "coloredwood:"..s1.."_wood_grey"..s2,
paramtype2 = "colorfacedir",
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ print("overridden after_place_node on "..i.name)
+ minetest.rotate_node(itemstack, placer, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
+ on_place = minetest.item_place,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1},
})
end
end
end
- -- fix drops for colored versions of stairsplus nodes
+ -- fix drops and other stuff for colored versions of stairsplus nodes
for _, i in pairs(minetest.registered_nodes) do
if string.find(i.name, "coloredwood:stair_")
@@ -222,6 +234,12 @@ end
mname = string.gsub(i.name, "coloredwood:", "moreblocks:")
local s1, s2 = is_stairsplus(mname, true)
minetest.override_item(i.name, {
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ print("overridden after_place_node on "..i.name)
+ minetest.rotate_node(itemstack, placer, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
+ on_place = minetest.item_place,
drop = "moreblocks:"..s1.."_wood"..s2
})
end
@@ -231,6 +249,7 @@ end
minetest.override_item("default:wood", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "coloredwood:wood_block",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1},
})
@@ -241,6 +260,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(),
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:fence_wood",
material = "default:wood"
@@ -249,6 +269,7 @@ default.register_fence("coloredwood:fence", {
minetest.override_item("default:fence_wood", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "coloredwood:fence",
+ after_place_node = unifieddyes.recolor_on_place,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1}
})
diff --git a/extranodes/init.lua b/extranodes/init.lua
index c3de5ab..eb54067 100644
--- a/extranodes/init.lua
+++ b/extranodes/init.lua
@@ -149,13 +149,17 @@ local iclipfence_def = {
if minetest.get_modpath("unifieddyes") then
iclip_def.paramtype2 = "colorwallmounted"
iclip_def.palette = "unifieddyes_palette_colorwallmounted.png"
- iclip_def.after_place_node = unifieddyes.fix_rotation
+ iclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end
iclip_def.after_dig_node = unifieddyes.after_dig_node
iclip_def.groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
iclipfence_def.paramtype2 = "color"
iclipfence_def.palette = "unifieddyes_palette_extended.png"
iclipfence_def.on_construct = unifieddyes.on_construct
+ iclipfence_def.after_place_node = unifieddyes.recolor_on_place
iclipfence_def.after_dig_node = unifieddyes.after_dig_node
iclipfence_def.groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
iclipfence_def.place_param2 = 171 -- medium amber, low saturation, closest color to default:wood
diff --git a/homedecor/bathroom_furniture.lua b/homedecor/bathroom_furniture.lua
index 100ea88..8980422 100644
--- a/homedecor/bathroom_furniture.lua
+++ b/homedecor/bathroom_furniture.lua
@@ -16,6 +16,7 @@ minetest.register_node("homedecor:bathroom_tiles_dark", {
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -34,6 +35,7 @@ minetest.register_node("homedecor:bathroom_tiles_medium", {
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -52,6 +54,7 @@ minetest.register_node("homedecor:bathroom_tiles_light", {
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
diff --git a/homedecor/bedroom.lua b/homedecor/bedroom.lua
index 9dd42ea..94f886d 100644
--- a/homedecor/bedroom.lua
+++ b/homedecor/bedroom.lua
@@ -52,11 +52,13 @@ homedecor.register("bed_regular", {
on_rotate = screwdriver.disallow,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
if not placer:get_player_control().sneak then
return homedecor.bed_expansion(pos, placer, itemstack, pointed_thing)
end
end,
- after_dig_node = function(pos)
+ after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
homedecor.unextend_bed(pos)
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
@@ -91,7 +93,9 @@ homedecor.register("bed_extended", {
sounds = default.node_sound_wood_defaults(),
expand = { forward = "air" },
on_rotate = screwdriver.disallow,
- after_dig_node = function(pos)
+ after_place_node = unifieddyes.recolor_on_place,
+ after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
homedecor.unextend_bed(pos)
end,
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
@@ -123,10 +127,14 @@ homedecor.register("bed_kingsize", {
node_box = kbed_cbox,
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.disallow,
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
local inv = digger:get_inventory()
- if digger:get_player_control().sneak and inv:room_for_item("main", "bed_regular 1") then
+ if digger:get_player_control().sneak and inv:room_for_item("main", "homedecor:bed_regular 2") then
inv:remove_item("main", "homedecor:bed_kingsize 1")
inv:add_item("main", "homedecor:bed_regular 2")
end
diff --git a/homedecor/furniture.lua b/homedecor/furniture.lua
index a7258bc..37cca25 100644
--- a/homedecor/furniture.lua
+++ b/homedecor/furniture.lua
@@ -81,7 +81,10 @@ homedecor.register("kitchen_chair_padded", {
collision_box = kc_cbox,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
@@ -105,7 +108,10 @@ homedecor.register("armchair", {
groups = {snappy=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
node_box = ac_cbox,
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
})
diff --git a/homedecor/handlers/expansion.lua b/homedecor/handlers/expansion.lua
index 17d6d31..9028f3e 100644
--- a/homedecor/handlers/expansion.lua
+++ b/homedecor/handlers/expansion.lua
@@ -53,18 +53,8 @@ homedecor.wall_fdir_to_fwd = {
{ -1, 0 },
}
-local placeholder_node = "homedecor:expansion_placeholder"
-minetest.register_node(placeholder_node, {
- description = S("Expansion placeholder (you hacker you!)"),
- groups = { not_in_creative_inventory=1 },
- drawtype = "airlike",
- paramtype = "light",
- walkable = false,
- selection_box = { type = "fixed", fixed = { 0, 0, 0, 0, 0, 0 } },
- is_ground_content = false,
- sunlight_propagates = true,
- buildable_to = false,
-})
+local placeholder_node = "air"
+minetest.register_alias("homedecor:expansion_placeholder", "air")
--- select which node was pointed at based on it being known, not ignored, buildable_to
-- returns nil if no node could be selected
@@ -94,7 +84,7 @@ local function is_buildable_to(placer_name, ...)
end
-- place one or two nodes if and only if both can be placed
-local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2)
+local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2, pointed_thing)
local placer_name = placer:get_player_name() or ""
if is_buildable_to(placer_name, pos, pos2) then
local lfdir = fdir or minetest.dir_to_facedir(placer:get_look_dir())
@@ -111,7 +101,7 @@ local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2)
-- call after_place_node of the placed node if available
local ctrl_node_def = minetest.registered_nodes[node1]
if ctrl_node_def and ctrl_node_def.after_place_node then
- ctrl_node_def.after_place_node(pos, placer)
+ ctrl_node_def.after_place_node(pos, placer, itemstack, pointed_thing)
end
if not homedecor.expect_infinite_stacks then
@@ -140,7 +130,7 @@ function homedecor.stack_vertically(itemstack, placer, pointed_thing, node1, nod
local top_pos = { x=pos.x, y=pos.y+1, z=pos.z }
- return stack(itemstack, placer, nil, pos, def, top_pos, node1, node2)
+ return stack(itemstack, placer, nil, pos, def, top_pos, node1, node2, pointed_thing)
end
-- Stack one door node above another
@@ -162,7 +152,7 @@ function homedecor.stack_wing(itemstack, placer, pointed_thing, node1, node2, no
end
local top_pos = { x=pos.x, y=pos.y+1, z=pos.z }
- return stack(itemstack, placer, fdir, pos, def, top_pos, node1, node2)
+ return stack(itemstack, placer, fdir, pos, def, top_pos, node1, node2, pointed_thing)
end
function homedecor.stack_sideways(itemstack, placer, pointed_thing, node1, node2, dir)
@@ -177,13 +167,14 @@ function homedecor.stack_sideways(itemstack, placer, pointed_thing, node1, node2
local pos2 = { x = pos.x + fdir_transform[fdir+1][1], y=pos.y, z = pos.z + fdir_transform[fdir+1][2] }
- return stack(itemstack, placer, fdir, pos, def, pos2, node1, node2)
+ return stack(itemstack, placer, fdir, pos, def, pos2, node1, node2, pointed_thing)
end
function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks)
local thisnode = minetest.get_node(pos)
- local fdir = thisnode.param2
+ local param2 = thisnode.param2
+ local fdir = param2 % 8
local fxd = homedecor.wall_fdir_to_fwd[fdir+1][1]
local fzd = homedecor.wall_fdir_to_fwd[fdir+1][2]
@@ -219,14 +210,23 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
local rightpos = {x=pos.x+rxd, y=pos.y, z=pos.z+rzd}
local rightnode = minetest.get_node(rightpos)
+ local inv = placer:get_inventory()
+ local lastdye = unifieddyes.last_used_dye[placer_name]
+
if leftnode.name == "homedecor:bed_regular" then
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
+ local meta = minetest.get_meta(leftpos)
minetest.set_node(pos, {name = "air"})
- minetest.set_node(leftpos, { name = newname, param2 = fdir})
+ minetest.set_node(leftpos, { name = newname, param2 = param2})
+ meta:set_string("dye", lastdye)
+ inv:add_item("main", lastdye)
elseif rightnode.name == "homedecor:bed_regular" then
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
+ local meta = minetest.get_meta(rightpos)
minetest.set_node(rightpos, {name = "air"})
- minetest.set_node(pos, { name = newname, param2 = fdir})
+ minetest.set_node(pos, { name = newname, param2 = param2})
+ meta:set_string("dye", lastdye)
+ inv:add_item("main", lastdye)
end
local toppos = {x=pos.x, y=pos.y+1.0, z=pos.z}
@@ -234,18 +234,26 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
if trybunks and is_buildable_to(placer_name, toppos, topposfwd) then
local newname = string.gsub(thisnode.name, "_regular", "_extended")
- minetest.set_node(toppos, { name = thisnode.name, param2 = fdir})
- minetest.set_node(pos, { name = newname, param2 = fdir})
+ local newparam2 = param2 % 8
+ if inv:contains_item("main", lastdye) then
+ minetest.set_node(toppos, { name = thisnode.name, param2 = param2})
+ inv:remove_item("main", lastdye.." 1")
+ else
+ minetest.set_node(toppos, { name = thisnode.name, param2 = newparam2})
+ minetest.chat_send_player(placer_name, "Ran out of "..lastdye..", using neutral color.")
+ unifieddyes.last_used_dye[placer_name] = nil
+ end
+ minetest.swap_node(pos, { name = newname, param2 = param2})
itemstack:take_item()
end
end
function homedecor.unextend_bed(pos)
local bottomnode = minetest.get_node({x=pos.x, y=pos.y-1.0, z=pos.z})
- local fdir = bottomnode.param2
+ local param2 = bottomnode.param2
if bottomnode.name == "homedecor:bed_extended" then
local newname = string.gsub(bottomnode.name, "_extended", "_regular")
- minetest.set_node({x=pos.x, y=pos.y-1.0, z=pos.z}, { name = newname, param2 = fdir})
+ minetest.swap_node({x=pos.x, y=pos.y-1.0, z=pos.z}, { name = newname, param2 = param2})
end
end
diff --git a/homedecor/lighting.lua b/homedecor/lighting.lua
index ea1e166..7dd504e 100644
--- a/homedecor/lighting.lua
+++ b/homedecor/lighting.lua
@@ -35,7 +35,10 @@ minetest.register_node("homedecor:glowlight_half", {
groups = { snappy = 3, ud_param2_colorable = 1 },
light_source = default.LIGHT_MAX,
sounds = default.node_sound_glass_defaults(),
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node
})
@@ -63,7 +66,10 @@ minetest.register_node("homedecor:glowlight_quarter", {
groups = { snappy = 3, ud_param2_colorable = 1 },
light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(),
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node
})
@@ -91,7 +97,10 @@ minetest.register_node("homedecor:glowlight_small_cube", {
groups = { snappy = 3, ud_param2_colorable = 1 },
light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(),
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node
})
@@ -429,6 +438,7 @@ local function reg_lamp(suffix, nxt, light, brightness)
minetest.set_node(pos, node)
end,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@@ -459,8 +469,9 @@ local function reg_lamp(suffix, nxt, light, brightness)
minetest.set_node(pos, node)
end,
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
- expand = { top="placeholder" },
+ expand = { top="air" },
})
-- for old maps that had the original 3dforniture mod
@@ -497,7 +508,10 @@ homedecor.register("desk_lamp", {
node_box = dlamp_cbox,
walkable = false,
groups = {snappy=3, ud_param2_colorable = 1},
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew
})
diff --git a/homedecor/shutters.lua b/homedecor/shutters.lua
index b463021..44aa4ab 100644
--- a/homedecor/shutters.lua
+++ b/homedecor/shutters.lua
@@ -32,13 +32,17 @@ homedecor.register("shutter", {
description = S("Wooden Shutter"),
inventory_image = inv,
wield_image = inv,
- paramtype2 = "wallmounted",
+ paramtype2 = "colorwallmounted",
+ palette = "unifieddyes_palette_colorwallmounted.png",
ud_replacement_node = "homedecor:shutter_colored",
groups = { snappy = 3, ud_param2_colorable = 1 },
sounds = default.node_sound_wood_defaults(),
selection_box = shutter_cbox,
node_box = shutter_cbox,
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node
})
@@ -54,7 +58,10 @@ homedecor.register("shutter_colored", {
sounds = default.node_sound_wood_defaults(),
selection_box = shutter_cbox,
node_box = shutter_cbox,
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
drop = "homedecor:shutter"
})
diff --git a/homedecor/window_treatments.lua b/homedecor/window_treatments.lua
index df9dadf..d6d776b 100644
--- a/homedecor/window_treatments.lua
+++ b/homedecor/window_treatments.lua
@@ -113,7 +113,10 @@ minetest.register_node("homedecor:curtain_closed", {
palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = { type = "wallmounted" },
after_dig_node = unifieddyes.after_dig_node,
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
if string.find(topnode.name, "homedecor:curtainrod") then
@@ -139,7 +142,10 @@ minetest.register_node("homedecor:curtain_open", {
palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = { type = "wallmounted" },
after_dig_node = unifieddyes.after_dig_node,
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
if string.find(topnode.name, "homedecor:curtainrod") then
diff --git a/ilights/init.lua b/ilights/init.lua
index 6f6fdd4..eed4b03 100644
--- a/ilights/init.lua
+++ b/ilights/init.lua
@@ -48,7 +48,10 @@ minetest.register_node("ilights:light", {
light_source = 14,
selection_box = lamp_cbox,
node_box = lamp_cbox,
- after_place_node = unifieddyes.fix_rotation,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node
})
diff --git a/lavalamp/init.lua b/lavalamp/init.lua
index 3fd1278..4260c36 100644
--- a/lavalamp/init.lua
+++ b/lavalamp/init.lua
@@ -34,6 +34,7 @@ minetest.register_node("lavalamp:lavalamp", {
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "lavalamp:lavalamp_off"
@@ -64,6 +65,7 @@ minetest.register_node("lavalamp:lavalamp_off", {
sounds = default.node_sound_glass_defaults(),
drop = "lavalamp:lavalamp",
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "lavalamp:lavalamp"
diff --git a/lrfurn/armchairs.lua b/lrfurn/armchairs.lua
index 93903f8..1488c95 100644
--- a/lrfurn/armchairs.lua
+++ b/lrfurn/armchairs.lua
@@ -23,7 +23,10 @@ minetest.register_node("lrfurn:armchair", {
groups = {snappy=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
node_box = armchair_cbox,
- after_place_node = unifieddyes.fix_rotation_nsew,
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+ end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
diff --git a/lrfurn/longsofas.lua b/lrfurn/longsofas.lua
index b5c09d5..39a6dc1 100644
--- a/lrfurn/longsofas.lua
+++ b/lrfurn/longsofas.lua
@@ -26,6 +26,7 @@ minetest.register_node("lrfurn:longsofa", {
on_rotate = screwdriver.disallow,
after_place_node = function(pos, placer, itemstack, pointed_thing)
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
local playername = placer:get_player_name()
if minetest.is_protected(pos, placer:get_player_name()) then return true end
diff --git a/lrfurn/sofas.lua b/lrfurn/sofas.lua
index 38b557d..0f6a153 100644
--- a/lrfurn/sofas.lua
+++ b/lrfurn/sofas.lua
@@ -26,6 +26,7 @@ minetest.register_node("lrfurn:sofa", {
on_rotate = screwdriver.disallow,
after_place_node = function(pos, placer, itemstack, pointed_thing)
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
local playername = placer:get_player_name()
if minetest.is_protected(pos, placer:get_player_name()) then return true end
diff --git a/stained_glass/init.lua b/stained_glass/init.lua
index 214b7a9..64e36ca 100644
--- a/stained_glass/init.lua
+++ b/stained_glass/init.lua
@@ -39,6 +39,8 @@ January 2017 -- rewritten a bit more by Vanessa E. to use engine param2 coloriza
stainedglass = {}
stainedglass.old_static_nodes = {}
+local myglow = LIGHT_MAX-3
+
minetest.register_node("stained_glass:stained_glass", {
description = "Stained Glass",
drawtype = "glasslike",
@@ -56,6 +58,7 @@ minetest.register_node("stained_glass:stained_glass", {
sounds = default.node_sound_glass_defaults(),
drop = "moreblocks:super_glow_glass",
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "moreblocks:super_glow_glass"
})
@@ -64,7 +67,8 @@ minetest.override_item("moreblocks:super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3, ud_param2_colorable = 1},
- ud_replacement_node = "stained_glass:stained_glass"
+ ud_replacement_node = "stained_glass:stained_glass",
+ after_place_node = unifieddyes.recolor_on_place
})
-- trap glass
@@ -86,6 +90,7 @@ minetest.register_node("stained_glass:stained_trap_glass", {
sounds = default.node_sound_glass_defaults(),
drop = "moreblocks:trap_super_glow_glass",
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "moreblocks:trap_super_glow_glass"
})
@@ -94,7 +99,8 @@ minetest.override_item("moreblocks:trap_super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
- ud_replacement_node = "stained_glass:stained_trap_glass"
+ ud_replacement_node = "stained_glass:stained_trap_glass",
+ after_place_node = unifieddyes.recolor_on_place
})
function stainedglass.makenode(arg)
diff --git a/unifiedbricks/init.lua b/unifiedbricks/init.lua
index 00964f0..d912ac4 100644
--- a/unifiedbricks/init.lua
+++ b/unifiedbricks/init.lua
@@ -108,6 +108,7 @@ minetest.register_node("unifiedbricks:brickblock", {
groups = {cracky=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:brick"
})
@@ -115,7 +116,8 @@ minetest.register_node("unifiedbricks:brickblock", {
minetest.override_item("default:brick", {
ud_replacement_node = "unifiedbricks:brickblock",
palette = "unifieddyes_palette_extended.png",
- groups = {cracky = 3, ud_param2_colorable = 1}
+ groups = {cracky = 3, ud_param2_colorable = 1},
+ after_place_node = unifieddyes.recolor_on_place
})
minetest.register_node("unifiedbricks:clayblock", {
@@ -133,6 +135,7 @@ minetest.register_node("unifiedbricks:clayblock", {
footstep = "",
}),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:clay"
})
@@ -140,7 +143,8 @@ minetest.register_node("unifiedbricks:clayblock", {
minetest.override_item("default:clay", {
ud_replacement_node = "unifiedbricks:clayblock",
palette = "unifieddyes_palette_extended.png",
- groups = {crumbly = 3, ud_param2_colorable = 1}
+ groups = {crumbly = 3, ud_param2_colorable = 1},
+ after_place_node = unifieddyes.recolor_on_place,
})
minetest.register_node("unifiedbricks:brickblock_multicolor_dark", {
@@ -159,6 +163,7 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_dark", {
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
})
@@ -178,6 +183,7 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_medium", {
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
})
@@ -197,6 +203,7 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_light", {
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
+ after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
})
diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua
index 3329612..379f641 100644
--- a/unifieddyes/init.lua
+++ b/unifieddyes/init.lua
@@ -30,6 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
--=====================================================================
unifieddyes = {}
+unifieddyes.last_used_dye = {}
+unifieddyes.last_dyed_node = {}
local creative_mode = minetest.setting_getbool("creative_mode")
@@ -134,16 +136,73 @@ local default_dyes = {
"yellow"
}
--- this tiles the "extended" palette sideways and then crops it to 256x1
--- to convert it from human readable to something the engine can use as a palette.
---
--- in machine-readable form, the selected color is:
--- [hue] - [shade]*24 for the light colors, or
--- [hue] + [saturation]*24 + [shade]*48 for the dark colors, or
--- 240 + [shade] for the greys, 0 = white.
+-- automatically recolor a placed node to match the last-used dye
+-- should be called in the node's `after_place_node` callback.
--- code borrowed from homedecor
+function unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+
+ local playername = placer:get_player_name()
+ local stackname = itemstack:get_name()
+
+ if unifieddyes.last_dyed_node[playername] ~= stackname then
+ if unifieddyes.last_used_dye[playername] then
+ minetest.chat_send_player(playername, "Switched to \""..stackname.."\" while auto-coloring, color reset to neutral.")
+ end
+ unifieddyes.last_used_dye[playername] = nil
+ unifieddyes.last_dyed_node[playername] = nil
+ end
+
+ unifieddyes.last_dyed_node[playername] = stackname
+
+ if unifieddyes.last_used_dye[playername] then
+ local lastdye = unifieddyes.last_used_dye[playername]
+
+ local inv = placer:get_inventory()
+ if (lastdye and lastdye ~= "" and inv:contains_item("main", lastdye.." 1")) or creative_mode then
+
+ local nodedef = minetest.registered_nodes[stackname]
+ local newname = nodedef.ud_replacement_node or stackname
+ local node = minetest.get_node(pos)
+
+ local palette_type = true -- default to 89-color split, because the others are easier to check for.
+ local oldfdir = node.param2 % 32
+
+ if nodedef.palette == "unifieddyes_palette.png" then
+ palette_type = false
+ oldfdir = 0
+ elseif nodedef.palette == "unifieddyes_palette_colorwallmounted.png" then
+ palette_type = "wallmounted"
+ oldfdir = node.param2 % 8
+ elseif nodedef.palette == "unifieddyes_palette_extended.png" then
+ palette_type = "extended"
+ oldfdir = 0
+ end
+
+ local paletteidx, hue = unifieddyes.getpaletteidx(lastdye, palette_type)
+ if palette_type == true then newname = string.gsub(newname, "_grey", "_"..unifieddyes.HUES[hue]) end
+ minetest.set_node(pos, { name = newname, param2 = oldfdir + paletteidx })
+
+ local meta = minetest.get_meta(pos)
+ meta:set_string("dye", lastdye)
+
+ if not creative_mode then
+ inv:remove_item("main", lastdye.." 1")
+ end
+ else
+ minetest.chat_send_player(playername, "Ran out of "..unifieddyes.last_used_dye[playername]..", resetting to neutral.")
+ unifieddyes.last_used_dye[playername] = nil
+ end
+ end
+end
+
+minetest.register_on_leaveplayer(function(player)
+ local playername = player:get_player_name()
+ unifieddyes.last_used_dye[playername] = nil
+ unifieddyes.last_dyed_node[playername] = nil
+end)
+
+-- code borrowed from homedecor
-- call this function to reset the rotation of a "wallmounted" object on place
function unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
@@ -520,6 +579,7 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
local pos = minetest.get_pointed_thing_position(pointed_thing)
local node = minetest.get_node(pos)
+
local nodedef = minetest.registered_nodes[node.name]
if not nodedef then return end -- target was an unknown node, just bail out
@@ -551,8 +611,6 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
palette_type = "wallmounted"
end
- print(palette_type)
-
if minetest.is_protected(pos, playername) and not minetest.check_player_privs(playername, {protection_bypass=true}) then
minetest.record_protection_violation(pos, playername)
return
@@ -564,6 +622,8 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
if paletteidx then
+ unifieddyes.last_used_dye[playername] = stackname
+
local meta = minetest.get_meta(pos)
local prevdye = meta:get_string("dye")
local inv = player:get_inventory()