updated castles, coloredwood, digistuff, locks, mesecons,

pipeworks, steel, unified dyes, unified mesecons, and worldedit
This commit is contained in:
Vanessa Dannenberg
2018-09-08 12:12:15 -04:00
parent ba470a6975
commit aaed0a2ea8
66 changed files with 2537 additions and 585 deletions

View File

@@ -1,4 +1,19 @@
License
=======
- Code WTFPL
- Texture CC
## MIT License
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.

View File

@@ -3,16 +3,53 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
if minetest.get_modpath("farming") then
-- this doesn't work reliably due to side effects of https://github.com/minetest/minetest/issues/5518
-- local old_def = minetest.registered_craftitems["farming:cotton"]
-- if old_def then
-- old_def.groups["thread"] = 1
-- minetest.override_item("farming:cotton", {
-- groups = old_def.groups
-- })
-- end
minetest.register_craft({
output = 'ropes:ropesegment',
output = 'ropes:ropesegment',
recipe = {
{'farming:cotton','farming:cotton'},
{'farming:cotton','farming:cotton'},
{'farming:cotton','farming:cotton'}
{'farming:cotton','farming:cotton'},
}
})
end
if minetest.get_modpath("hemp") then
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'hemp:hemp_rope'},
{'hemp:hemp_rope'},
}
})
end
if minetest.get_modpath("cottages") then
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'cottages:rope'},
{'cottages:rope'},
}
})
end
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'group:thread','group:thread'},
{'group:thread','group:thread'},
{'group:thread','group:thread'},
}
})
minetest.register_craftitem("ropes:ropesegment", {
description = S("Rope Segment"),
_doc_items_longdesc = ropes.doc.ropesegment_longdesc,

View File

@@ -3,4 +3,6 @@ farming?
vines?
doc?
intllib?
loot?
loot?
hemp?
cottages?

View File

@@ -6,12 +6,12 @@ ropes = {
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
ropes.ropeLength = tonumber(minetest.setting_get("ropes_rope_length")) or 50
ropes.ropeLadderLength = tonumber(minetest.setting_get("ropes_rope_ladder_length")) or 50
ropes.woodRopeBoxMaxMultiple = tonumber(minetest.setting_get("ropes_wood_rope_box_max_multiple")) or 2
ropes.copperRopeBoxMaxMultiple = tonumber(minetest.setting_get("ropes_copper_rope_box_max_multiple")) or 5
ropes.steelRopeBoxMaxMultiple = tonumber(minetest.setting_get("ropes_steel_rope_box_max_multiple")) or 9
ropes.create_all_definitions = minetest.setting_getbool("ropes_create_all_definitions")
ropes.ropeLength = tonumber(minetest.settings:get("ropes_rope_length")) or 50
ropes.ropeLadderLength = tonumber(minetest.settings:get("ropes_rope_ladder_length")) or 50
ropes.woodRopeBoxMaxMultiple = tonumber(minetest.settings:get("ropes_wood_rope_box_max_multiple")) or 2
ropes.copperRopeBoxMaxMultiple = tonumber(minetest.settings:get("ropes_copper_rope_box_max_multiple")) or 5
ropes.steelRopeBoxMaxMultiple = tonumber(minetest.settings:get("ropes_steel_rope_box_max_multiple")) or 9
ropes.create_all_definitions = minetest.settings:get_bool("ropes_create_all_definitions")
dofile( minetest.get_modpath( ropes.name ) .. "/doc.lua" )
dofile( minetest.get_modpath( ropes.name ) .. "/functions.lua" )

View File

@@ -46,6 +46,17 @@ local rope_ladder_top_def = {
},
groups = { choppy=2, oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
local target_node = minetest.get_node(pointed_thing.under)
local target_def = minetest.registered_nodes[target_node.name]
if target_def.walkable == false then
return itemstack
end
end
return minetest.item_place(itemstack, placer, pointed_thing)
end,
after_place_node = function(pos, placer)
local pos_below = {x=pos.x, y=pos.y-1, z=pos.z}

View File

@@ -134,6 +134,17 @@ local function register_rope_block(multiple, max_multiple, name_prefix, node_pre
selection_box = {type="regular"},
collision_box = {type="regular"},
groups = {choppy=2, oddly_breakable_by_hand=1, rope_block = 1},
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
local target_node = minetest.get_node(pointed_thing.under)
local target_def = minetest.registered_nodes[target_node.name]
if target_def.walkable == false then
return itemstack
end
end
return minetest.item_place(itemstack, placer, pointed_thing)
end,
after_place_node = function(pos, placer)
local pos_below = {x=pos.x, y=pos.y-1, z=pos.z}
@@ -225,9 +236,8 @@ local rope_def = {
drop = "",
tiles = { "ropes_3.png", "ropes_3.png", "ropes_3.png", "ropes_3.png", "ropes_5.png", "ropes_5.png" },
groups = {choppy=2, flammable=2, not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
sounds = {
footstep = "ropes_creak",
footstep = {name = "ropes_creak", gain = 0.8, max_hear_distance = 6},
dig = "__group",
dug = "__group",
},
@@ -262,7 +272,7 @@ local rope_bottom_def = {
drawtype = "nodebox",
groups = {choppy=2, flammable=2, not_in_creative_inventory=1},
sounds = {
footstep = "ropes_creak",
footstep = {name = "ropes_creak", gain = 0.8, max_hear_distance = 6},
dig = "__group",
dug = "__group",
},