From 907e8bf6a64215a516fdf16869dd81248aeaa2f6 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 17 Mar 2017 16:53:18 -0400 Subject: update digilines, technic, unified inventory, and switched castles to the new modpack form --- ropes/LICENSE.md | 4 + ropes/README.md | 11 + ropes/crafts.lua | 34 +++ ropes/depends.txt | 6 + ropes/description.txt | 1 + ropes/doc.lua | 47 ++++ ropes/functions.lua | 97 ++++++++ ropes/init.lua | 43 ++++ ropes/intllib.lua | 45 ++++ ropes/ladder.lua | 180 +++++++++++++++ ropes/locale/template.pot | 123 ++++++++++ ropes/loot.lua | 56 +++++ ropes/mod.conf | 1 + ropes/ropeboxes.lua | 348 +++++++++++++++++++++++++++++ ropes/screenshot.png | Bin 0 -> 109876 bytes ropes/settingtypes.txt | 37 +++ ropes/sounds/license.txt | 1 + ropes/sounds/ropes_creak.1.ogg | Bin 0 -> 8446 bytes ropes/sounds/ropes_creak.2.ogg | Bin 0 -> 10929 bytes ropes/sounds/ropes_creak.3.ogg | Bin 0 -> 9114 bytes ropes/textures/ropes_1.png | Bin 0 -> 376 bytes ropes/textures/ropes_2.png | Bin 0 -> 435 bytes ropes/textures/ropes_3.png | Bin 0 -> 509 bytes ropes/textures/ropes_4.png | Bin 0 -> 572 bytes ropes/textures/ropes_5.png | Bin 0 -> 653 bytes ropes/textures/ropes_item.png | Bin 0 -> 153 bytes ropes/textures/ropes_ropebox_front_1.png | Bin 0 -> 345 bytes ropes/textures/ropes_ropebox_front_2.png | Bin 0 -> 418 bytes ropes/textures/ropes_ropebox_front_3.png | Bin 0 -> 475 bytes ropes/textures/ropes_ropebox_front_4.png | Bin 0 -> 555 bytes ropes/textures/ropes_ropebox_front_5.png | Bin 0 -> 621 bytes ropes/textures/ropes_ropebox_side.png | Bin 0 -> 412 bytes ropes/textures/ropes_ropeladder.png | Bin 0 -> 394 bytes ropes/textures/ropes_ropeladder_bottom.png | Bin 0 -> 415 bytes ropes/textures/ropes_ropeladder_top.png | Bin 0 -> 426 bytes 35 files changed, 1034 insertions(+) create mode 100644 ropes/LICENSE.md create mode 100644 ropes/README.md create mode 100644 ropes/crafts.lua create mode 100644 ropes/depends.txt create mode 100644 ropes/description.txt create mode 100644 ropes/doc.lua create mode 100644 ropes/functions.lua create mode 100644 ropes/init.lua create mode 100644 ropes/intllib.lua create mode 100644 ropes/ladder.lua create mode 100644 ropes/locale/template.pot create mode 100644 ropes/loot.lua create mode 100644 ropes/mod.conf create mode 100644 ropes/ropeboxes.lua create mode 100644 ropes/screenshot.png create mode 100644 ropes/settingtypes.txt create mode 100644 ropes/sounds/license.txt create mode 100644 ropes/sounds/ropes_creak.1.ogg create mode 100644 ropes/sounds/ropes_creak.2.ogg create mode 100644 ropes/sounds/ropes_creak.3.ogg create mode 100644 ropes/textures/ropes_1.png create mode 100644 ropes/textures/ropes_2.png create mode 100644 ropes/textures/ropes_3.png create mode 100644 ropes/textures/ropes_4.png create mode 100644 ropes/textures/ropes_5.png create mode 100644 ropes/textures/ropes_item.png create mode 100644 ropes/textures/ropes_ropebox_front_1.png create mode 100644 ropes/textures/ropes_ropebox_front_2.png create mode 100644 ropes/textures/ropes_ropebox_front_3.png create mode 100644 ropes/textures/ropes_ropebox_front_4.png create mode 100644 ropes/textures/ropes_ropebox_front_5.png create mode 100644 ropes/textures/ropes_ropebox_side.png create mode 100644 ropes/textures/ropes_ropeladder.png create mode 100644 ropes/textures/ropes_ropeladder_bottom.png create mode 100644 ropes/textures/ropes_ropeladder_top.png (limited to 'ropes') diff --git a/ropes/LICENSE.md b/ropes/LICENSE.md new file mode 100644 index 0000000..fb67788 --- /dev/null +++ b/ropes/LICENSE.md @@ -0,0 +1,4 @@ +License +======= +- Code WTFPL +- Texture CC diff --git a/ropes/README.md b/ropes/README.md new file mode 100644 index 0000000..699369c --- /dev/null +++ b/ropes/README.md @@ -0,0 +1,11 @@ +# Ropes + +This mod adds "rope boxes", blocks that when placed in world will automatically lower a rope at 1 meter per second until it reaches a fixed maximum length. The basic rope box produces 50m of rope by default and there are up to eight additional rope box types that produce multiples of that rope length - 100m, 150m, and so forth up to 450m. The number of rope boxes and the length of a standard rope length can be configured via the settings menu. + +The rope stops lowering if it reaches an obstruction. Ropes can be cut using an axe or other choppy tool at any location and when they're cut the bottom half of the rope will disappear, dropping any climbers. The same happens to the entire rope if the rope box at the top of the rope is removed. Cutting the rope doesn't reduce the maximum length of rope the rope box will produce if it's removed and rebuilt again. Ropes are flammable. They respect protection settings - if the player that placed the rope box isn't permitted to build in an area then the rope descending from that box will treat it as an obstruction. + +Also included is a rope ladder that behaves similarly, though it only comes in one standard maximum length - 50m by default, again changeable in settings. + +This mod retains optional backward compatibility with the crafting items from the vines mod (anything with group "vines" can be used to make rope boxes and rope ladders). Ropes can also be made from cotton, available via an optional dependency on the farming mod. + +In-game documentation is provided via an optional dependency on the doc mod. \ No newline at end of file diff --git a/ropes/crafts.lua b/ropes/crafts.lua new file mode 100644 index 0000000..299c0cc --- /dev/null +++ b/ropes/crafts.lua @@ -0,0 +1,34 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +if minetest.get_modpath("farming") then + minetest.register_craft({ + output = 'ropes:ropesegment', + recipe = { + {'farming:cotton','farming:cotton'}, + {'farming:cotton','farming:cotton'}, + {'farming:cotton','farming:cotton'} + } + }) +end + +minetest.register_craftitem("ropes:ropesegment", { + description = S("Rope Segment"), + _doc_items_longdesc = ropes.doc.ropesegment_longdesc, + _doc_items_usagehelp = ropes.doc.ropesegment_usage, + groups = {vines = 1}, + inventory_image = "ropes_item.png", +}) + +local cotton_burn_time = 1 +ropes.wood_burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack("default:wood")}}).time +ropes.rope_burn_time = cotton_burn_time * 6 +local stick_burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack("default:stick")}}).time +ropes.ladder_burn_time = ropes.rope_burn_time * 2 + stick_burn_time * 3 + +minetest.register_craft({ + type = "fuel", + recipe = "ropes:ropesegment", + burntime = ropes.rope_burn_time, +}) \ No newline at end of file diff --git a/ropes/depends.txt b/ropes/depends.txt new file mode 100644 index 0000000..6672602 --- /dev/null +++ b/ropes/depends.txt @@ -0,0 +1,6 @@ +default +farming? +vines? +doc? +intllib? +loot? \ No newline at end of file diff --git a/ropes/description.txt b/ropes/description.txt new file mode 100644 index 0000000..846f150 --- /dev/null +++ b/ropes/description.txt @@ -0,0 +1 @@ +Adds rope boxes of various lengths and also rope ladders. \ No newline at end of file diff --git a/ropes/doc.lua b/ropes/doc.lua new file mode 100644 index 0000000..7f2ce54 --- /dev/null +++ b/ropes/doc.lua @@ -0,0 +1,47 @@ +ropes.doc = {} + +if not minetest.get_modpath("doc") then + return +end + +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +ropes.doc.ropesegment_longdesc = S("Rope segments are bundles of fibre twisted into robust cables.") +ropes.doc.ropesegment_usage = S("This craft item is useful for creating rope ladders, or for spooling on wooden spindles to hang and climb upon.") + +ropes.doc.ropeladder_longdesc = S("A hanging rope ladder that automatically extends downward.") +ropes.doc.ropeladder_usage = S("After a rope ladder is placed on a vertical wall it will begin extending downward until it reaches its maximum length (@1 meters). If the rope ladder is removed all of the ladder below the point of removal will disappear. A rope ladder can be severed partway down using an axe or similar tool, and the ladder below the point where it is cut will collapse. No rope is actually lost in the process, though, and if the uppermost section of the ladder is removed and replaced the ladder will re-extend to the same maximum length as before.", ropes.ropeLadderLength) + +local rope_length_doc = S("Rope boxes have a certain amount of rope contained within them specified in the name of the node, and have a limit to how much rope they can support that depends on the material they're made of. The different lengths can be crafted by combining and splitting up rope boxes in the crafting grid. For example, you can craft a @1m rope box by putting a @2m rope box and a rope segment in the crafting grid, or a @3m rope box and two rope segments in the crafting grid. Two rope segments can be recovered by putting the @1m rope box in the crafting grid by itself.", ropes.ropeLength*3, ropes.ropeLength*2, ropes.ropeLength) .. "\n" + +if ropes.woodRopeBoxMaxMultiple == 1 then + rope_length_doc = rope_length_doc .. "\n" .. S("Wood") .. " " .. S("rope boxes can hold @1m of rope.", ropes.ropeLength) +elseif ropes.woodRopeBoxMaxMultiple > 1 then + rope_length_doc = rope_length_doc .. "\n" .. S("Wood") .. " " .. S("rope boxes can hold rope lengths from @1m to @2m.", ropes.ropeLength, ropes.ropeLength*ropes.woodRopeBoxMaxMultiple) +end + +if ropes.copperRopeBoxMaxMultiple == 1 then + rope_length_doc = rope_length_doc .. "\n" .. S("Copper") .. " " .. S("rope boxes can hold @1m of rope.", ropes.ropeLength) +elseif ropes.copperRopeBoxMaxMultiple > 1 then + rope_length_doc = rope_length_doc .. "\n" .. S("Copper") .. " " .. S("rope boxes can hold rope lengths from @1m to @2m.", ropes.ropeLength, ropes.ropeLength*ropes.copperRopeBoxMaxMultiple) +end + +if ropes.steelRopeBoxMaxMultiple == 1 then + rope_length_doc = rope_length_doc .. "\n" .. S("Steel") .. " " .. S("rope boxes can hold @1m of rope.", ropes.ropeLength) +elseif ropes.steelRopeBoxMaxMultiple > 1 then + rope_length_doc = rope_length_doc .. "\n" .. S("Steel") .. " " .. S("rope boxes can hold rope lengths from @1m to @2m.", ropes.ropeLength, ropes.ropeLength*ropes.steelRopeBoxMaxMultiple) +end + +ropes.doc.ropebox_longdesc = S("Ropes are hung by placing rope boxes, which automatically lower a rope of fixed length below them. They can be climbed and cut.") +ropes.doc.ropebox_usage = rope_length_doc .. "\n\n" .. + S("When a rope box is placed the rope will immediately begin lowering from it at one meter per second. The rope will only descend when its end is in the vicinity of an active player, suspending its journey when no players are nearby, so a long descent may require a player to climb down the rope as it goes. If you are near the bottom end of a rope that's extending you'll be automatically carried down with it. The rope will stop when it encounters and obstruction, but will resume lowering if the obstruction is removed.") .. "\n\n" .. + S("A rope can be severed midway using an axe or other similar tool. The section of rope below the cut will collapse and disappear, potentially causing players who were hanging on to it to fall. The remaining rope will not resume descent on its own, but the rope box at the top of the rope \"remembers\" how long the rope was and if it is deconstructed and replaced it will still have the same maximum length of rope as before - no rope is permanently lost when a rope is severed like this.") + +doc.add_entry_alias("nodes", "ropes:ropeladder_top", "nodes", "ropes:ropeladder") +doc.add_entry_alias("nodes", "ropes:ropeladder_top", "nodes", "ropes:ropeladder_bottom") +doc.add_entry_alias("nodes", "ropes:ropeladder_top", "nodes", "ropes:ropeladder_falling") + +doc.add_entry_alias("nodes", "ropes:rope", "nodes", "ropes:rope_bottom") +doc.add_entry_alias("nodes", "ropes:rope", "nodes", "ropes:rope_top") \ No newline at end of file diff --git a/ropes/functions.lua b/ropes/functions.lua new file mode 100644 index 0000000..4ce5e62 --- /dev/null +++ b/ropes/functions.lua @@ -0,0 +1,97 @@ +ropes.make_rope_on_timer = function(rope_node_name) + return function(pos, elapsed) + local currentend = minetest.get_node(pos) + local currentmeta = minetest.get_meta(pos) + local currentlength = currentmeta:get_int("length_remaining") + local placer_name = currentmeta:get_string("placer") + local newpos = {x=pos.x, y=pos.y-1, z=pos.z} + local newnode = minetest.get_node(newpos) + local oldnode = minetest.get_node(pos) + if currentlength > 1 and (not minetest.is_protected(newpos, placer_name) + or minetest.check_player_privs(placer_name, "protection_bypass")) then + if newnode.name == "air" then + minetest.add_node(newpos, {name=currentend.name, param2=oldnode.param2}) + local newmeta = minetest.get_meta(newpos) + newmeta:set_int("length_remaining", currentlength-1) + newmeta:set_string("placer", placer_name) + minetest.set_node(pos, {name=rope_node_name, param2=oldnode.param2}) + ropes.move_players_down(pos, 1) + else + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end + end + end +end + +local data = {} +local c_air = minetest.get_content_id("air") + +ropes.destroy_rope = function(pos, nodes) + local top = pos.y + local bottom = pos.y-15 + local voxel_manip = minetest.get_voxel_manip() + + local finished = false + local ids_to_destroy = {} + for _, node in pairs(nodes) do + ids_to_destroy[minetest.get_content_id(node)] = true + end + + while not finished do + local emin, emax = voxel_manip:read_from_map({x=pos.x, y=bottom, z=pos.z}, {x=pos.x, y=top, z=pos.z}) + voxel_manip:get_data(data) + local voxel_area = VoxelArea:new{MinEdge=emin, MaxEdge=emax} + bottom = emin.y + for y = top, bottom, -1 do + local index = voxel_area:index(pos.x, y, pos.z) + if ids_to_destroy[data[index]] then + data[index] = c_air + else + finished = true + break + end + end + voxel_manip:set_data(data) + voxel_manip:write_to_map() + voxel_manip:update_map() + top = bottom - 1 + bottom = bottom - 15 + end +end + + +ropes.hanging_after_destruct = function(pos, top_node, middle_node, bottom_node) + local node = minetest.get_node(pos) + if node.name == top_node or node.name == middle_node or node.name == bottom_node then + return -- this was done by another ladder or rope node changing this one, don't react + end + + pos.y = pos.y + 1 -- one up + local node_above = minetest.get_node(pos) + if node_above.name == middle_node then + minetest.swap_node(pos, {name=bottom_node, param2=node_above.param2}) + end + + pos.y = pos.y - 2 -- one down + local node_below = minetest.get_node(pos) + if node_below.name == middle_node then + ropes.destroy_rope(pos, {middle_node, bottom_node}) + elseif node_below.name == bottom_node then + minetest.swap_node(pos, {name="air"}) + end +end + +ropes.move_players_down = function(pos, radius) + local all_objects = minetest.get_objects_inside_radius({x=pos.x, y=pos.y+radius, z=pos.z}, radius) + local players = {} + local _,obj + for _,obj in pairs(all_objects) do + if obj:is_player() then + local obj_pos = obj:getpos() + if math.abs(obj_pos.x-pos.x) < 0.5 and math.abs(obj_pos.z-pos.z) < 0.5 then + obj:moveto({x=obj_pos.x, y=obj_pos.y-1, z=obj_pos.z}, true) + end + end + end +end diff --git a/ropes/init.lua b/ropes/init.lua new file mode 100644 index 0000000..68d9895 --- /dev/null +++ b/ropes/init.lua @@ -0,0 +1,43 @@ +ropes = { + name = 'ropes', +} + +-- internationalization boilerplate +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") + +dofile( minetest.get_modpath( ropes.name ) .. "/doc.lua" ) +dofile( minetest.get_modpath( ropes.name ) .. "/functions.lua" ) +dofile( minetest.get_modpath( ropes.name ) .. "/crafts.lua" ) +dofile( minetest.get_modpath( ropes.name ) .. "/ropeboxes.lua" ) +dofile( minetest.get_modpath( ropes.name ) .. "/ladder.lua" ) +dofile( minetest.get_modpath( ropes.name ) .. "/loot.lua" ) + + +for i=1,5 do + minetest.register_alias(string.format("vines:%irope_block", i), string.format("ropes:%irope_block", i)) +end +minetest.register_alias("vines:rope", "ropes:rope") +minetest.register_alias("vines:rope_bottom", "ropes:rope_bottom") +minetest.register_alias("vines:rope_end", "ropes:rope_bottom") +minetest.register_alias("vines:rope_top", "ropes:rope_top") +minetest.register_alias("vines:ropeladder_top", "ropes:ropeladder_top") +minetest.register_alias("vines:ropeladder", "ropes:ropeladder") +minetest.register_alias("vines:ropeladder_bottom", "ropes:ropeladder_bottom") +minetest.register_alias("vines:ropeladder_falling", "ropes:ropeladder_falling") +minetest.register_alias("vines:rope_block", "ropes:steel5rope_block") +for i=1,9 do + minetest.register_alias(string.format("ropes:%irope_block", i), string.format("ropes:steel%irope_block", i)) +end +minetest.register_alias("castle:ropes", "ropes:rope") +minetest.register_alias("castle:ropebox", "ropes:steel1rope_block") +minetest.register_alias("castle:box_rope", "ropes:rope") + +print(S("[Ropes] Loaded!")) diff --git a/ropes/intllib.lua b/ropes/intllib.lua new file mode 100644 index 0000000..6669d72 --- /dev/null +++ b/ropes/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/ropes/ladder.lua b/ropes/ladder.lua new file mode 100644 index 0000000..5ac872c --- /dev/null +++ b/ropes/ladder.lua @@ -0,0 +1,180 @@ +if ropes.ropeLadderLength == 0 and not ropes.create_all_definitions then + return +end + +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +if ropes.ropeLadderLength > 0 then + minetest.register_craft({ + output = "ropes:ropeladder_top", + recipe = { + {'','group:stick',''}, + {'group:vines','group:stick','group:vines'}, + {'','group:stick',''}, + } + }) +end + +minetest.register_craft({ + type = "fuel", + recipe = "ropes:ropeladder_top", + burntime = ropes.ladder_burn_time, +}) + +local rope_ladder_top_def = { + description = S("Rope Ladder"), + _doc_items_longdesc = ropes.doc.ropeladder_longdesc, + _doc_items_usagehelp = ropes.doc.ropeladder_usage, + drawtype = "signlike", + tiles = {"default_ladder_wood.png^ropes_ropeladder_top.png"}, + is_ground_content = false, + inventory_image = "default_ladder_wood.png^ropes_ropeladder_top.png", + wield_image = "default_ladder_wood.png^ropes_ropeladder_top.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + climbable = true, + sunlight_propagates = true, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + + }, + groups = { choppy=2, oddly_breakable_by_hand=1,flammable=2}, + sounds = default.node_sound_wood_defaults(), + + after_place_node = function(pos, placer) + local pos_below = {x=pos.x, y=pos.y-1, z=pos.z} + local node_below = minetest.get_node(pos_below) + local this_node = minetest.get_node(pos) + local placer_name = placer:get_player_name() + -- param2 holds the facing direction of this node. If it's 0 or 1 the node is "flat" and we don't want the ladder to extend. + if node_below.name == "air" and this_node.param2 > 1 + and (not minetest.is_protected(pos_below, placer_name) + or minetest.check_player_privs(placer_name, "protection_bypass")) then + minetest.add_node(pos_below, {name="ropes:ropeladder_bottom", param2=this_node.param2}) + local meta = minetest.get_meta(pos_below) + meta:set_int("length_remaining", ropes.ropeLadderLength) + meta:set_string("placer", placer_name) + end + end, + after_destruct = function(pos) + local pos_below = {x=pos.x, y=pos.y-1, z=pos.z} + ropes.destroy_rope(pos_below, {"ropes:ropeladder", "ropes:ropeladder_bottom", "ropes:ropeladder_falling"}) + end, +} + +if ropes.ropeLadderLength == 0 then + rope_ladder_top_def.groups.not_in_creative_inventory = 1 +end + +minetest.register_node("ropes:ropeladder_top", rope_ladder_top_def) + +minetest.register_node("ropes:ropeladder", { + description = S("Rope Ladder"), + _doc_items_create_entry = false, + drop = "", + drawtype = "signlike", + tiles = {"default_ladder_wood.png^ropes_ropeladder.png"}, + is_ground_content = false, + inventory_image = "default_ladder_wood.png^ropes_ropeladder.png", + wield_image = "default_ladder_wood.png^ropes_ropeladder.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + climbable = true, + sunlight_propagates = true, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + }, + groups = {choppy=2, flammable=2, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + + after_destruct = function(pos) + ropes.hanging_after_destruct(pos, "ropes:ropeladder_falling", "ropes:ropeladder", "ropes:ropeladder_bottom") + end, +}) + +local ladder_extender = ropes.make_rope_on_timer("ropes:ropeladder") + +minetest.register_node("ropes:ropeladder_bottom", { + description = S("Rope Ladder"), + _doc_items_create_entry = false, + drop = "", + drawtype = "signlike", + tiles = {"default_ladder_wood.png^ropes_ropeladder_bottom.png"}, + is_ground_content = false, + inventory_image = "default_ladder_wood.png^ropes_ropeladder_bottom.png", + wield_image = "default_ladder_wood.png^ropes_ropeladder_bottom.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + climbable = true, + sunlight_propagates = true, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + + }, + groups = {choppy=2, flammable=2, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + on_construct = function( pos ) + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end, + on_timer = ladder_extender, + + after_destruct = function(pos) + ropes.hanging_after_destruct(pos, "ropes:ropeladder_falling", "ropes:ropeladder", "ropes:ropeladder_bottom") + end, +}) + +minetest.register_node("ropes:ropeladder_falling", { + description = S("Rope Ladder"), + _doc_items_create_entry = false, + drop = "", + drawtype = "signlike", + tiles = {"default_ladder_wood.png^ropes_ropeladder.png"}, + is_ground_content = false, + inventory_image = "default_ladder_wood.png^ropes_ropeladder.png", + wield_image = "default_ladder_wood.png^ropes_ropeladder.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + climbable = true, + sunlight_propagates = true, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + + }, + groups = {flammable=2, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + on_construct = function( pos ) + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end, + on_timer = function( pos, elapsed ) + local pos_below = {x=pos.x, y=pos.y-1, z=pos.z} + local node_below = minetest.get_node(pos_below) + + if (node_below.name ~= "ignore") then + ropes.destroy_rope(pos_below, {'ropes:ropeladder', 'ropes:ropeladder_bottom', 'ropes:ropeladder_falling'}) + minetest.swap_node(pos, {name="air"}) + else + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end + end +}) diff --git a/ropes/locale/template.pot b/ropes/locale/template.pot new file mode 100644 index 0000000..3d739ab --- /dev/null +++ b/ropes/locale/template.pot @@ -0,0 +1,123 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-09 21:21-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: crafts.lua:17 +msgid "Rope Segment" +msgstr "" + +#: doc.lua:11 +msgid "Rope segments are bundles of fibre twisted into robust cables." +msgstr "" + +#: doc.lua:12 +msgid "" +"This craft item is useful for creating rope ladders, or for spooling on " +"wooden spindles to hang and climb upon." +msgstr "" + +#: doc.lua:14 +msgid "A hanging rope ladder that automatically extends downward." +msgstr "" + +#: doc.lua:15 +msgid "" +"After a rope ladder is placed on a vertical wall it will begin extending " +"downward until it reaches its maximum length (@1 meters). If the rope ladder " +"is removed all of the ladder below the point of removal will disappear. A " +"rope ladder can be severed partway down using an axe or similar tool, and " +"the ladder below the point where it is cut will collapse. No rope is " +"actually lost in the process, though, and if the uppermost section of the " +"ladder is removed and replaced the ladder will re-extend to the same maximum " +"length as before." +msgstr "" + +#: doc.lua:17 +msgid "" +"Rope boxes have a certain amount of rope contained within them specified in " +"the name of the node, and have a limit to how much rope they can support " +"that depends on the material they're made of. The different lengths can be " +"crafted by combining and splitting up rope boxes in the crafting grid. For " +"example, you can craft a @1m rope box by putting a @2m rope box and a rope " +"segment in the crafting grid, or a @3m rope box and two rope segments in the " +"crafting grid. Two rope segments can be recovered by putting the @1m rope " +"box in the crafting grid by itself." +msgstr "" + +#: doc.lua:20 doc.lua:22 ropeboxes.lua:302 +msgid "Wood" +msgstr "" + +#: doc.lua:20 doc.lua:26 doc.lua:32 +msgid "rope boxes can hold @1m of rope." +msgstr "" + +#: doc.lua:22 doc.lua:28 doc.lua:34 +msgid "rope boxes can hold rope lengths from @1m to @2m." +msgstr "" + +#: doc.lua:26 doc.lua:28 ropeboxes.lua:319 +msgid "Copper" +msgstr "" + +#: doc.lua:32 doc.lua:34 ropeboxes.lua:336 +msgid "Steel" +msgstr "" + +#: doc.lua:37 +msgid "" +"Ropes are hung by placing rope boxes, which automatically lower a rope of " +"fixed length below them. They can be climbed and cut." +msgstr "" + +#: doc.lua:39 +msgid "" +"When a rope box is placed the rope will immediately begin lowering from it " +"at one meter per second. The rope will only descend when its end is in the " +"vicinity of an active player, suspending its journey when no players are " +"nearby, so a long descent may require a player to climb down the rope as it " +"goes. If you are near the bottom end of a rope that's extending you'll be " +"automatically carried down with it. The rope will stop when it encounters " +"and obstruction, but will resume lowering if the obstruction is removed." +msgstr "" + +#: doc.lua:40 +msgid "" +"A rope can be severed midway using an axe or other similar tool. The section " +"of rope below the cut will collapse and disappear, potentially causing " +"players who were hanging on to it to fall. The remaining rope will not " +"resume descent on its own, but the rope box at the top of the rope " +"\"remembers\" how long the rope was and if it is deconstructed and replaced " +"it will still have the same maximum length of rope as before - no rope is " +"permanently lost when a rope is severed like this." +msgstr "" + +#: init.lua:72 +msgid "[Ropes] Loaded!" +msgstr "" + +#: ladder.lua:27 ladder.lua:78 ladder.lua:108 ladder.lua:142 +msgid "Rope Ladder" +msgstr "" + +#: ropeboxes.lua:121 +msgid "@1 Ropebox @2m" +msgstr "" + +#: ropeboxes.lua:218 ropeboxes.lua:249 +msgid "Rope" +msgstr "" diff --git a/ropes/loot.lua b/ropes/loot.lua new file mode 100644 index 0000000..ed512be --- /dev/null +++ b/ropes/loot.lua @@ -0,0 +1,56 @@ +if not minetest.get_modpath("loot") then + return +end + +loot.register_loot({ + weights = { generic = 300 }, + payload = { + stack = ItemStack("ropes:ropesegment"), + min_size = 1, + max_size = 50, + }, +}) + +if ropes.ropeLadderLength > 0 then +loot.register_loot({ + weights = { generic = 150 }, + payload = { + stack = ItemStack("ropes:ropeladder_top"), + min_size = 1, + max_size = 20, + }, +}) +end + +if ropes.woodRopeBoxMaxMultiple > 0 then +loot.register_loot({ + weights = { generic = 100 }, + payload = { + stack = ItemStack("ropes:wood1rope_block"), + min_size = 1, + max_size = 20, + }, +}) +end + +if ropes.copperRopeBoxMaxMultiple > 0 then +loot.register_loot({ + weights = { generic = 75 }, + payload = { + stack = ItemStack("ropes:copper1rope_block"), + min_size = 1, + max_size = 15, + }, +}) +end + +if ropes.steelRopeBoxMaxMultiple > 0 then +loot.register_loot({ + weights = { generic = 50 }, + payload = { + stack = ItemStack("ropes:steel1rope_block"), + min_size = 1, + max_size = 10, + }, +}) +end \ No newline at end of file diff --git a/ropes/mod.conf b/ropes/mod.conf new file mode 100644 index 0000000..88ecfd1 --- /dev/null +++ b/ropes/mod.conf @@ -0,0 +1 @@ +name = ropes \ No newline at end of file diff --git a/ropes/ropeboxes.lua b/ropes/ropeboxes.lua new file mode 100644 index 0000000..9049bb1 --- /dev/null +++ b/ropes/ropeboxes.lua @@ -0,0 +1,348 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +local function rope_box_tiles(count, tint) + return { + string.format("ropes_ropebox_front_%i.png^[colorize:%s^ropes_ropebox_front_%i.png^ropes_%i.png", count, tint, count, count), + string.format("ropes_ropebox_front_%i.png^[colorize:%s^ropes_ropebox_front_%i.png^ropes_%i.png", count, tint, count, count), + string.format("ropes_ropebox_side.png^[colorize:%s^ropes_ropebox_side.png", tint), + string.format("ropes_ropebox_side.png^[colorize:%s^ropes_ropebox_side.png", tint), + string.format("ropes_ropebox_front_%i.png^[colorize:%s^ropes_ropebox_front_%i.png^ropes_%i.png", count, tint, count, count), + string.format("ropes_ropebox_front_%i.png^[colorize:%s^ropes_ropebox_front_%i.png^ropes_%i.png", count, tint, count, count), + } +end + +local rope_box_data = { +{ + node={ + {-0.125, -0.125, -0.25, 0.125, 0.125, 0.25}, -- pulley + {-0.125, -0.25, -0.125, 0.125, 0.25, 0.125}, -- pulley + {-0.125, -0.1875, -0.1875, 0.125, 0.1875, 0.1875}, -- pulley_core + {-0.1875, -0.5, -0.125, -0.125, 0.125, 0.125}, -- support + {0.125, -0.5, -0.125, 0.1875, 0.125, 0.125}, -- support + }, + --selection = {-0.1875, -0.5, -0.25, 0.1875, 0.25, 0.25}, -- selection + tiles = 1, +}, +{ + node={ + {-0.1875, -0.125, -0.25, 0.1875, 0.125, 0.25}, -- pulley + {-0.1875, -0.25, -0.125, 0.1875, 0.25, 0.125}, -- pulley + {-0.1875, -0.1875, -0.1875, 0.1875, 0.1875, 0.1875}, -- pulley_core + {-0.25, -0.5, -0.125, -0.1875, 0.125, 0.125}, -- support + {0.1875, -0.5, -0.125, 0.25, 0.125, 0.125}, -- support + }, + --selection = {-0.1875, -0.5, -0.25, 0.1875, 0.25, 0.25}, -- selection + tiles = 2, +}, +{ + node={ + {-0.25, -0.125, -0.25, 0.25, 0.125, 0.25}, -- pulley + {-0.25, -0.25, -0.125, 0.25, 0.25, 0.125}, -- pulley + {-0.25, -0.1875, -0.1875, 0.25, 0.1875, 0.1875}, -- pulley_core + {-0.3125, -0.5, -0.125, -0.25, 0.125, 0.125}, -- support + {0.25, -0.5, -0.125, 0.3125, 0.125, 0.125}, -- support + }, + --selection = {-0.3125, -0.5, -0.25, 0.3125, 0.25, 0.25}, -- selection + tiles = 3, +}, +{ + node={ + {-0.3125, -0.125, -0.25, 0.3125, 0.125, 0.25}, -- pulley + {-0.3125, -0.25, -0.125, 0.3125, 0.25, 0.125}, -- pulley + {-0.3125, -0.1875, -0.1875, 0.3125, 0.1875, 0.1875}, -- pulley_core + {-0.375, -0.5, -0.125, -0.3125, 0.125, 0.125}, -- support + {0.3125, -0.5, -0.125, 0.375, 0.125, 0.125}, -- support + }, + --selection = {-0.375, -0.5, -0.25, 0.375, 0.25, 0.25}, -- selection + tiles = 4, +}, +{ + node={ + {-0.375, -0.125, -0.25, 0.375, 0.125, 0.25}, -- pulley + {-0.375, -0.25, -0.125, 0.375, 0.25, 0.125}, -- pulley + {-0.375, -0.1875, -0.1875, 0.375, 0.1875, 0.1875}, -- pulley_core + {-0.4375, -0.5, -0.125, -0.375, 0.125, 0.125}, -- support + {0.375, -0.5, -0.125, 0.4375, 0.125, 0.125}, -- support + }, + --selection = {-0.4375, -0.5, -0.25, 0.4375, 0.25, 0.25}, -- selection + tiles = 5, +}, +{ + node={ + {-0.1875, -0.1875, -0.3125, 0.1875, 0.1875, 0.3125}, -- pulley + {-0.1875, -0.3125, -0.1875, 0.1875, 0.3125, 0.1875}, -- pulley + {-0.1875, -0.25, -0.25, 0.1875, 0.25, 0.25}, -- pulley_core + {-0.25, -0.5, -0.125, -0.1875, 0.125, 0.125}, -- support + {0.1875, -0.5, -0.125, 0.25, 0.125, 0.125}, -- support + }, + --selection = {-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.3125}, -- selection + tiles = 2, +}, +{ + node={ + {-0.25, -0.1875, -0.3125, 0.25, 0.1875, 0.3125}, -- pulley + {-0.25, -0.3125, -0.1875, 0.25, 0.3125, 0.1875}, -- pulley + {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}, -- pulley_core + {-0.3125, -0.5, -0.125, -0.25, 0.125, 0.125}, -- support + {0.25, -0.5, -0.125, 0.3125, 0.125, 0.125}, -- support + }, + --selection = {-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125}, -- selection + tiles = 3, +}, +{ + node={ + {-0.3125, -0.1875, -0.3125, 0.3125, 0.1875, 0.3125}, -- pulley + {-0.3125, -0.3125, -0.1875, 0.3125, 0.3125, 0.1875}, -- pulley + {-0.3125, -0.25, -0.25, 0.3125, 0.25, 0.25}, -- pulley_core + {-0.375, -0.5, -0.125, -0.3125, 0.125, 0.125}, -- support + {0.3125, -0.5, -0.125, 0.375, 0.125, 0.125}, -- support + }, + --selection = {-0.375, -0.5, -0.3125, 0.375, 0.3125, 0.3125}, -- selection + tiles = 4, +}, +{ + node={ + {-0.375, -0.1875, -0.3125, 0.375, 0.1875, 0.3125}, -- pulley + {-0.375, -0.3125, -0.1875, 0.375, 0.3125, 0.1875}, -- pulley + {-0.375, -0.25, -0.25, 0.375, 0.25, 0.25}, -- pulley_core + {-0.4375, -0.5, -0.125, -0.375, 0.125, 0.125}, -- support + {0.375, -0.5, -0.125, 0.4375, 0.125, 0.125}, -- support + }, + --selection_bottom = {-0.4375, -0.5, -0.3125, 0.4375, 0.3125, 0.3125}, -- selection + tiles = 5, +} +} + +local function register_rope_block(multiple, max_multiple, name_prefix, node_prefix, tint, flammable) + local node_name = string.format("ropes:%s%irope_block", node_prefix, multiple) + local rope_block_def = { + description = S("@1 Ropebox @2m", name_prefix, ropes.ropeLength*multiple), + _doc_items_create_entry = false, + drawtype="nodebox", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + climbable = true, + tiles = rope_box_tiles(rope_box_data[multiple].tiles, tint), + node_box = { + type = "fixed", + fixed = rope_box_data[multiple].node + }, + selection_box = {type="regular"}, + collision_box = {type="regular"}, + groups = {choppy=2, oddly_breakable_by_hand=1, rope_block = 1}, + + after_place_node = function(pos, placer) + local pos_below = {x=pos.x, y=pos.y-1, z=pos.z} + local placer_name = placer:get_player_name() + + if minetest.is_protected(pos_below, placer_name) and not minetest.check_player_privs(placer, "protection_bypass") then + return + end + + local node_below = minetest.get_node(pos_below) + if node_below.name == "air" then + minetest.add_node(pos_below, {name="ropes:rope_bottom"}) + local meta = minetest.get_meta(pos_below) + meta:set_int("length_remaining", ropes.ropeLength*multiple) + meta:set_string("placer", placer:get_player_name()) + end + end, + + after_destruct = function(pos) + local pos_below = {x=pos.x, y=pos.y-1, z=pos.z} + ropes.destroy_rope(pos_below, {'ropes:rope', 'ropes:rope_bottom'}) + end + } + + -- If this number is higher than permitted, we still want to register the block (in case + -- some were already placed in-world) but we want to hide it from creative inventory + -- and if someone digs it we want to disintegrate it into its component parts to prevent + -- reuse. + if multiple > max_multiple then + rope_block_def.groups.not_in_creative_inventory = 1 + rope_block_def.drop = string.format("ropes:%s1rope_block %i", node_prefix, multiple) + end + + if flammable then + rope_block_def.groups.flammable = flammable + + minetest.register_craft({ + type = "fuel", + recipe = node_name, + burntime = ropes.rope_burn_time * multiple + ropes.wood_burn_time, + }) + end + + minetest.register_node(node_name, rope_block_def) + + if (multiple ~= 1) then + -- Only register a recipe to craft this if it's within the permitted multiple range + if multiple <= max_multiple then + for i = 1, multiple-1 do + local rec = {string.format("ropes:%s%irope_block", node_prefix, i)} + for n = 1, multiple-i do + table.insert(rec, "ropes:ropesegment") + end + minetest.register_craft({ + output = node_name, + type = "shapeless", + recipe = rec + }) + end + end + + -- Always allow players to disintegrate this into component parts, in case + -- there were some in inventory and the setting was changed. + minetest.register_craft({ + output = "ropes:ropesegment", + type = "shapeless", + recipe = { + node_name + }, + replacements = { + {node_name, string.format('ropes:%s%irope_block', node_prefix, multiple-1)}, + }, + }) + end + + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "ropes:rope", "nodes", node_name) + end +end + +local rope_def = { + description = S("Rope"), + _doc_items_longdesc = ropes.doc.ropebox_longdesc, + _doc_items_usagehelp = ropes.doc.ropebox_usage, + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + 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", + dig = "__group", + dug = "__group", + }, + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}, + connect_top = {-1/16, 1/2, -1/16, 1/16, 3/4, 1/16} + }, + connects_to = {"group:rope_block"}, + connect_sides = {"top"}, + selection_box = { + type = "fixed", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}, + }, + after_destruct = function(pos) + ropes.hanging_after_destruct(pos, "ropes:rope_top", "ropes:rope", "ropes:rope_bottom") + end, +} + +local rope_extension_timer = ropes.make_rope_on_timer("ropes:rope") + +local rope_bottom_def = { + description = S("Rope"), + _doc_items_create_entry = false, + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + drop = "", + tiles = { "ropes_3.png", "ropes_3.png", "ropes_3.png", "ropes_3.png", "ropes_5.png", "ropes_5.png" }, + drawtype = "nodebox", + groups = {choppy=2, flammable=2, not_in_creative_inventory=1}, + sounds = { + footstep = "ropes_creak", + dig = "__group", + dug = "__group", + }, + node_box = { + type = "connected", + fixed = { + {-1/16, -3/8, -1/16, 1/16, 1/2, 1/16}, + {-2/16, -5/16, -2/16, 2/16, -1/16, 2/16}, + }, + connect_top = {-1/16, 1/2, -1/16, 1/16, 3/4, 1/16} + }, + connects_to = {"group:rope_block"}, + connect_sides = {"top"}, + selection_box = { + type = "fixed", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}, + }, + + on_construct = function( pos ) + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end, + + on_timer = rope_extension_timer, + + after_destruct = function(pos) + ropes.hanging_after_destruct(pos, "ropes:rope_top", "ropes:rope", "ropes:rope_bottom") + end, +} + +minetest.register_node("ropes:rope", rope_def) +minetest.register_node("ropes:rope_bottom", rope_bottom_def) + +if ropes.woodRopeBoxMaxMultiple > 0 or ropes.create_all_definitions then + if ropes.woodRopeBoxMaxMultiple > 0 then + minetest.register_craft({ + output = "ropes:wood1rope_block", + recipe = { + {'group:wood'}, + {'group:vines'} + } + }) + end + for i = 1,9 do + if ropes.woodRopeBoxMaxMultiple >= i or ropes.create_all_definitions then + register_rope_block(i, ropes.woodRopeBoxMaxMultiple, S("Wood"), "wood", "#86683a", 2) + end + end +end + +if ropes.copperRopeBoxMaxMultiple > 0 or ropes.create_all_definitions then + if ropes.copperRopeBoxMaxMultiple > 0 then + minetest.register_craft({ + output = "ropes:copper1rope_block", + recipe = { + {'default:copper_ingot'}, + {'group:vines'} + } + }) + end + for i = 1,9 do + if ropes.copperRopeBoxMaxMultiple >= i or ropes.create_all_definitions then + register_rope_block(i, ropes.copperRopeBoxMaxMultiple, S("Copper"), "copper", "#c88648") + end + end +end + +if ropes.steelRopeBoxMaxMultiple > 0 or ropes.create_all_definitions then + if ropes.steelRopeBoxMaxMultiple > 0 then + minetest.register_craft({ + output = "ropes:steel1rope_block", + recipe = { + {'default:steel_ingot'}, + {'group:vines'} + } + }) + end + for i = 1,9 do + if ropes.steelRopeBoxMaxMultiple >= i or ropes.create_all_definitions then + register_rope_block(i, ropes.steelRopeBoxMaxMultiple, S("Steel"), "steel", "#ffffff") + end + end +end diff --git a/ropes/screenshot.png b/ropes/screenshot.png new file mode 100644 index 0000000..1366a4f Binary files /dev/null and b/ropes/screenshot.png differ diff --git a/ropes/settingtypes.txt b/ropes/settingtypes.txt new file mode 100644 index 0000000..242cd76 --- /dev/null +++ b/ropes/settingtypes.txt @@ -0,0 +1,37 @@ +#The shortest rope will extend for this many meters. Longer ropes come in +#multiples of this length. +#Changing this value will not affect ropes that already exist in-world. +ropes_rope_length (Rope length) int 50 1 30000 + +#Rope ladders will extend this far at maximum. +#Changing this value will not affect rope ladders that already exist in-world. +#Setting this to 0 disables rope ladders. +ropes_rope_ladder_length (Rope ladder length) int 50 0 30000 + +#Sets the maximum length multiple wooden rope box permitted to be crafted. +#So for example if the rope length is set to 50 and this is set to 2, +#the longest possible wooden rope box a player can craft has 100 meters of rope. +#Allowed values run from 0 to 9. 0 disables wood rope boxes. +ropes_wood_rope_box_max_multiple (Maximum wood_rope box multiple) int 2 0 9 + +#Sets the maximum length multiple copper rope box permitted to be crafted. +#So for example if the rope length is set to 50 and this is set to 5, +#the longest possible copper rope box a player can craft has 250 meters of rope. +#Allowed values run from 0 to 9. 0 disables copper rope boxes. +ropes_copper_rope_box_max_multiple (Maximum copper rope box multiple) int 5 0 9 + +#Sets the maximum length multiple steel rope box permitted to be crafted. +#So for example if the rope length is set to 50 and this is set to 9, +#the longest possible steel rope box a player can craft has 450 meters of rope. +#Allowed values run from 0 to 9. 0 disables steel rope boxes. +ropes_steel_rope_box_max_multiple (Maximum steel rope box multiple) int 9 0 9 + +#If this is set to true, then the mod will generate definitions for the rope boxes +#that are otherwise not permitted by the settings above. These rope boxes +#will not be craftable and will not be available in the creative inventory, +#but they will continue to exist if they were placed "in world" and a player +#can deconstruct them to retrieve their rope components. This setting is +#intended for the situation where you have an established world and you want +#to reduce the number of rope boxes available to players without turning +#existing rope boxes into "unknown node"s. +ropes_create_all_definitions (Create all rope box definitions) bool false \ No newline at end of file diff --git a/ropes/sounds/license.txt b/ropes/sounds/license.txt new file mode 100644 index 0000000..c5f29d0 --- /dev/null +++ b/ropes/sounds/license.txt @@ -0,0 +1 @@ +ropes_creak.ogg - by jergonda from https://www.freesound.org/people/jergonda/sounds/254735/ under public domain via CC 0 \ No newline at end of file diff --git a/ropes/sounds/ropes_creak.1.ogg b/ropes/sounds/ropes_creak.1.ogg new file mode 100644 index 0000000..c6f1b68 Binary files /dev/null and b/ropes/sounds/ropes_creak.1.ogg differ diff --git a/ropes/sounds/ropes_creak.2.ogg b/ropes/sounds/ropes_creak.2.ogg new file mode 100644 index 0000000..625083b Binary files /dev/null and b/ropes/sounds/ropes_creak.2.ogg differ diff --git a/ropes/sounds/ropes_creak.3.ogg b/ropes/sounds/ropes_creak.3.ogg new file mode 100644 index 0000000..c52876b Binary files /dev/null and b/ropes/sounds/ropes_creak.3.ogg differ diff --git a/ropes/textures/ropes_1.png b/ropes/textures/ropes_1.png new file mode 100644 index 0000000..6172d67 Binary files /dev/null and b/ropes/textures/ropes_1.png differ diff --git a/ropes/textures/ropes_2.png b/ropes/textures/ropes_2.png new file mode 100644 index 0000000..ef361cb Binary files /dev/null and b/ropes/textures/ropes_2.png differ diff --git a/ropes/textures/ropes_3.png b/ropes/textures/ropes_3.png new file mode 100644 index 0000000..a7dd7c8 Binary files /dev/null and b/ropes/textures/ropes_3.png differ diff --git a/ropes/textures/ropes_4.png b/ropes/textures/ropes_4.png new file mode 100644 index 0000000..c67d74f Binary files /dev/null and b/ropes/textures/ropes_4.png differ diff --git a/ropes/textures/ropes_5.png b/ropes/textures/ropes_5.png new file mode 100644 index 0000000..3a40d58 Binary files /dev/null and b/ropes/textures/ropes_5.png differ diff --git a/ropes/textures/ropes_item.png b/ropes/textures/ropes_item.png new file mode 100644 index 0000000..6f53f82 Binary files /dev/null and b/ropes/textures/ropes_item.png differ diff --git a/ropes/textures/ropes_ropebox_front_1.png b/ropes/textures/ropes_ropebox_front_1.png new file mode 100644 index 0000000..23b6067 Binary files /dev/null and b/ropes/textures/ropes_ropebox_front_1.png differ diff --git a/ropes/textures/ropes_ropebox_front_2.png b/ropes/textures/ropes_ropebox_front_2.png new file mode 100644 index 0000000..ee8c471 Binary files /dev/null and b/ropes/textures/ropes_ropebox_front_2.png differ diff --git a/ropes/textures/ropes_ropebox_front_3.png b/ropes/textures/ropes_ropebox_front_3.png new file mode 100644 index 0000000..4e420cd Binary files /dev/null and b/ropes/textures/ropes_ropebox_front_3.png differ diff --git a/ropes/textures/ropes_ropebox_front_4.png b/ropes/textures/ropes_ropebox_front_4.png new file mode 100644 index 0000000..cc0a10a Binary files /dev/null and b/ropes/textures/ropes_ropebox_front_4.png differ diff --git a/ropes/textures/ropes_ropebox_front_5.png b/ropes/textures/ropes_ropebox_front_5.png new file mode 100644 index 0000000..e6eab8b Binary files /dev/null and b/ropes/textures/ropes_ropebox_front_5.png differ diff --git a/ropes/textures/ropes_ropebox_side.png b/ropes/textures/ropes_ropebox_side.png new file mode 100644 index 0000000..37cfa10 Binary files /dev/null and b/ropes/textures/ropes_ropebox_side.png differ diff --git a/ropes/textures/ropes_ropeladder.png b/ropes/textures/ropes_ropeladder.png new file mode 100644 index 0000000..e27a55c Binary files /dev/null and b/ropes/textures/ropes_ropeladder.png differ diff --git a/ropes/textures/ropes_ropeladder_bottom.png b/ropes/textures/ropes_ropeladder_bottom.png new file mode 100644 index 0000000..71f91b0 Binary files /dev/null and b/ropes/textures/ropes_ropeladder_bottom.png differ diff --git a/ropes/textures/ropes_ropeladder_top.png b/ropes/textures/ropes_ropeladder_top.png new file mode 100644 index 0000000..81a31ce Binary files /dev/null and b/ropes/textures/ropes_ropeladder_top.png differ -- cgit v1.2.3