diff --git a/mods/beds/README.txt b/mods/beds/README.txt new file mode 100644 index 0000000..7b35e14 --- /dev/null +++ b/mods/beds/README.txt @@ -0,0 +1,30 @@ +Minetest Game mod: beds +======================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by BlockMen (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +BlockMen (CC BY-SA 3.0) + All textures unless otherwise noted + +TumeniNodes (CC BY-SA 3.0) + beds_bed_under.png + +This mod adds a bed to Minetest which allows players to skip the night. +To sleep, right click on the bed. If playing in singleplayer mode the night gets skipped +immediately. If playing multiplayer you get shown how many other players are in bed too, +if all players are sleeping the night gets skipped. The night skip can be forced if more +than half of the players are lying in bed and use this option. + +Another feature is a controlled respawning. If you have slept in bed (not just lying in +it) your respawn point is set to the beds location and you will respawn there after +death. +You can disable the respawn at beds by setting "enable_bed_respawn = false" in +minetest.conf. +You can disable the night skip feature by setting "enable_bed_night_skip = false" in +minetest.conf or by using the /set command in-game. diff --git a/mods/beds/api.lua b/mods/beds/api.lua new file mode 100644 index 0000000..d049440 --- /dev/null +++ b/mods/beds/api.lua @@ -0,0 +1,183 @@ + +local reverse = true + +local function destruct_bed(pos, n) + local node = minetest.get_node(pos) + local other + + if n == 2 then + local dir = minetest.facedir_to_dir(node.param2) + other = vector.subtract(pos, dir) + elseif n == 1 then + local dir = minetest.facedir_to_dir(node.param2) + other = vector.add(pos, dir) + end + + if reverse then + reverse = not reverse + minetest.remove_node(other) + minetest.check_for_falling(other) + beds.remove_spawns_at(pos) + beds.remove_spawns_at(other) + else + reverse = not reverse + end +end + +function beds.register_bed(name, def) + minetest.register_node(name .. "_bottom", { + description = def.description, + inventory_image = def.inventory_image, + wield_image = def.wield_image, + drawtype = "nodebox", + tiles = def.tiles.bottom, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + stack_max = 1, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1}, + sounds = def.sounds or default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = def.nodebox.bottom, + }, + selection_box = { + type = "fixed", + fixed = def.selectionbox, + }, + + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + local pos + if udef and udef.buildable_to then + pos = under + else + pos = pointed_thing.above + end + + local player_name = placer and placer:get_player_name() or "" + + if minetest.is_protected(pos, player_name) and + not minetest.check_player_privs(player_name, "protection_bypass") then + minetest.record_protection_violation(pos, player_name) + return itemstack + end + + local node_def = minetest.registered_nodes[minetest.get_node(pos).name] + if not node_def or not node_def.buildable_to then + return itemstack + end + + local dir = placer and placer:get_look_dir() and + minetest.dir_to_facedir(placer:get_look_dir()) or 0 + local botpos = vector.add(pos, minetest.facedir_to_dir(dir)) + + if minetest.is_protected(botpos, player_name) and + not minetest.check_player_privs(player_name, "protection_bypass") then + minetest.record_protection_violation(botpos, player_name) + return itemstack + end + + local botdef = minetest.registered_nodes[minetest.get_node(botpos).name] + if not botdef or not botdef.buildable_to then + return itemstack + end + + minetest.set_node(pos, {name = name .. "_bottom", param2 = dir}) + minetest.set_node(botpos, {name = name .. "_top", param2 = dir}) + + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + return itemstack + end, + + on_destruct = function(pos) + destruct_bed(pos, 1) + end, + + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + beds.on_rightclick(pos, clicker) + return itemstack + end, + + on_rotate = function(pos, node, user, _, new_param2) + local dir = minetest.facedir_to_dir(node.param2) + local p = vector.add(pos, dir) + local node2 = minetest.get_node_or_nil(p) + if not node2 or not minetest.get_item_group(node2.name, "bed") == 2 or + not node.param2 == node2.param2 then + return false + end + if minetest.is_protected(p, user:get_player_name()) then + minetest.record_protection_violation(p, user:get_player_name()) + return false + end + if new_param2 % 32 > 3 then + return false + end + local newp = vector.add(pos, minetest.facedir_to_dir(new_param2)) + local node3 = minetest.get_node_or_nil(newp) + local node_def = node3 and minetest.registered_nodes[node3.name] + if not node_def or not node_def.buildable_to then + return false + end + if minetest.is_protected(newp, user:get_player_name()) then + minetest.record_protection_violation(newp, user:get_player_name()) + return false + end + node.param2 = new_param2 + -- do not remove_node here - it will trigger destroy_bed() + minetest.set_node(p, {name = "air"}) + minetest.set_node(pos, node) + minetest.set_node(newp, {name = name .. "_top", param2 = new_param2}) + return true + end, + can_dig = function(pos, player) + return beds.can_dig(pos) + end, + }) + + minetest.register_node(name .. "_top", { + drawtype = "nodebox", + tiles = def.tiles.top, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + pointable = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2, + not_in_creative_inventory = 1}, + sounds = def.sounds or default.node_sound_wood_defaults(), + drop = name .. "_bottom", + node_box = { + type = "fixed", + fixed = def.nodebox.top, + }, + on_destruct = function(pos) + destruct_bed(pos, 2) + end, + can_dig = function(pos, player) + local node = minetest.get_node(pos) + local dir = minetest.facedir_to_dir(node.param2) + local p = vector.add(pos, dir) + return beds.can_dig(p) + end, + }) + + minetest.register_alias(name, name .. "_bottom") + + minetest.register_craft({ + output = name, + recipe = def.recipe + }) +end diff --git a/mods/beds/beds.lua b/mods/beds/beds.lua new file mode 100644 index 0000000..dc044a3 --- /dev/null +++ b/mods/beds/beds.lua @@ -0,0 +1,109 @@ +-- beds/beds.lua + +-- support for MT game translation. +local S = beds.get_translator + +-- Fancy shaped bed + +beds.register_bed("beds:fancy_bed", { + description = S("Fancy Bed"), + inventory_image = "beds_bed_fancy.png", + wield_image = "beds_bed_fancy.png", + tiles = { + bottom = { + "beds_bed_top1.png", + "beds_bed_under.png", + "beds_bed_side1.png", + "beds_bed_side1.png^[transformFX", + "beds_bed_foot.png", + "beds_bed_foot.png", + }, + top = { + "beds_bed_top2.png", + "beds_bed_under.png", + "beds_bed_side2.png", + "beds_bed_side2.png^[transformFX", + "beds_bed_head.png", + "beds_bed_head.png", + } + }, + nodebox = { + bottom = { + {-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375}, + {0.375, -0.5, -0.5, 0.5, -0.065, -0.4375}, + {-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375}, + {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, + {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, + {-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, + }, + top = { + {-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5}, + {0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5}, + {-0.5, 0, 0.4375, 0.5, 0.125, 0.5}, + {-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5}, + {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, + {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, + {-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375}, + } + }, + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, + recipe = { + {"", "", "group:stick"}, + {"wool:white", "wool:white", "wool:white"}, + {"group:wood", "group:wood", "group:wood"}, + }, +}) + +-- Simple shaped bed + +beds.register_bed("beds:bed", { + description = S("Simple Bed"), + inventory_image = "beds_bed.png", + wield_image = "beds_bed.png", + tiles = { + bottom = { + "beds_bed_top_bottom.png^[transformR90", + "beds_bed_under.png", + "beds_bed_side_bottom_r.png", + "beds_bed_side_bottom_r.png^[transformfx", + "beds_transparent.png", + "beds_bed_side_bottom.png" + }, + top = { + "beds_bed_top_top.png^[transformR90", + "beds_bed_under.png", + "beds_bed_side_top_r.png", + "beds_bed_side_top_r.png^[transformfx", + "beds_bed_side_top.png", + "beds_transparent.png", + } + }, + nodebox = { + bottom = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5}, + top = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5}, + }, + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.0625, 1.5}, + recipe = { + {"wool:white", "wool:white", "wool:white"}, + {"group:wood", "group:wood", "group:wood"} + }, +}) + +-- Aliases for PilzAdam's beds mod + +minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom") +minetest.register_alias("beds:bed_top_red", "beds:bed_top") + +-- Fuel + +minetest.register_craft({ + type = "fuel", + recipe = "beds:fancy_bed_bottom", + burntime = 13, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "beds:bed_bottom", + burntime = 12, +}) diff --git a/mods/beds/functions.lua b/mods/beds/functions.lua new file mode 100644 index 0000000..933a6e8 --- /dev/null +++ b/mods/beds/functions.lua @@ -0,0 +1,286 @@ +local pi = math.pi +local is_sp = minetest.is_singleplayer() +local enable_respawn = minetest.settings:get_bool("enable_bed_respawn") +if enable_respawn == nil then + enable_respawn = true +end + +-- support for MT game translation. +local S = beds.get_translator + +-- Helper functions + +local function get_look_yaw(pos) + local rotation = minetest.get_node(pos).param2 + if rotation > 3 then + rotation = rotation % 4 -- Mask colorfacedir values + end + if rotation == 1 then + return pi / 2, rotation + elseif rotation == 3 then + return -pi / 2, rotation + elseif rotation == 0 then + return pi, rotation + else + return 0, rotation + end +end + +local function is_night_skip_enabled() + local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip") + if enable_night_skip == nil then + enable_night_skip = true + end + return enable_night_skip +end + +local function check_in_beds(players) + local in_bed = beds.player + if not players then + players = minetest.get_connected_players() + end + + for n, player in ipairs(players) do + local name = player:get_player_name() + if not in_bed[name] then + return false + end + end + + return #players > 0 +end + +local function lay_down(player, pos, bed_pos, state, skip) + local name = player:get_player_name() + local hud_flags = player:hud_get_flags() + + if not player or not name then + return + end + + -- stand up + if state ~= nil and not state then + local p = beds.pos[name] or nil + beds.player[name] = nil + beds.bed_position[name] = nil + -- skip here to prevent sending player specific changes (used for leaving players) + if skip then + return + end + if p then + player:set_pos(p) + end + + -- physics, eye_offset, etc + player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}) + player:set_look_horizontal(math.random(1, 180) / 100) + player_api.player_attached[name] = false + player:set_physics_override({speed = 1, jump = 1, gravity = 1}) + hud_flags.wielditem = true + player_api.set_animation(player, "stand" , 30) + + -- lay down + else + + -- Check if bed is occupied + for _, other_pos in pairs(beds.bed_position) do + if vector.distance(bed_pos, other_pos) < 0.1 then + minetest.chat_send_player(name, S("This bed is already occupied!")) + return false + end + end + + -- Check if player is moving + if vector.length(player:get_velocity()) > 0.001 then + minetest.chat_send_player(name, S("You have to stop moving before going to bed!")) + return false + end + + beds.pos[name] = pos + beds.bed_position[name] = bed_pos + beds.player[name] = 1 + + -- physics, eye_offset, etc + player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0}) + local yaw, param2 = get_look_yaw(bed_pos) + player:set_look_horizontal(yaw) + local dir = minetest.facedir_to_dir(param2) + -- p.y is just above the nodebox height of the 'Simple Bed' (the highest bed), + -- to avoid sinking down through the bed. + local p = { + x = bed_pos.x + dir.x / 2, + y = bed_pos.y + 0.07, + z = bed_pos.z + dir.z / 2 + } + player:set_physics_override({speed = 0, jump = 0, gravity = 0}) + player:set_pos(p) + player_api.player_attached[name] = true + hud_flags.wielditem = false + player_api.set_animation(player, "lay" , 0) + end + + player:hud_set_flags(hud_flags) +end + +local function get_player_in_bed_count() + local c = 0 + for _, _ in pairs(beds.player) do + c = c + 1 + end + return c +end + +local function update_formspecs(finished) + local ges = #minetest.get_connected_players() + local player_in_bed = get_player_in_bed_count() + local is_majority = (ges / 2) < player_in_bed + + local form_n + local esc = minetest.formspec_escape + if finished then + form_n = beds.formspec .. "label[2.7,9;" .. esc(S("Good morning.")) .. "]" + else + form_n = beds.formspec .. "label[2.2,9;" .. + esc(S("@1 of @2 players are in bed", player_in_bed, ges)) .. "]" + if is_majority and is_night_skip_enabled() then + form_n = form_n .. "button_exit[2,6;4,0.75;force;" .. + esc(S("Force night skip")) .. "]" + end + end + + for name,_ in pairs(beds.player) do + minetest.show_formspec(name, "beds_form", form_n) + end +end + + +-- Public functions + +function beds.kick_players() + for name, _ in pairs(beds.player) do + local player = minetest.get_player_by_name(name) + lay_down(player, nil, nil, false) + end +end + +function beds.skip_night() + minetest.set_timeofday(0.23) +end + +function beds.on_rightclick(pos, player) + local name = player:get_player_name() + local ppos = player:get_pos() + local tod = minetest.get_timeofday() + + if tod > 0.2 and tod < 0.805 then + if beds.player[name] then + lay_down(player, nil, nil, false) + end + minetest.chat_send_player(name, S("You can only sleep at night.")) + return + end + + -- move to bed + if not beds.player[name] then + lay_down(player, ppos, pos) + beds.set_spawns() -- save respawn positions when entering bed + else + lay_down(player, nil, nil, false) + end + + if not is_sp then + update_formspecs(false) + end + + -- skip the night and let all players stand up + if check_in_beds() then + minetest.after(2, function() + if not is_sp then + update_formspecs(is_night_skip_enabled()) + end + if is_night_skip_enabled() then + beds.skip_night() + beds.kick_players() + end + end) + end +end + +function beds.can_dig(bed_pos) + -- Check all players in bed which one is at the expected position + for _, player_bed_pos in pairs(beds.bed_position) do + if vector.equals(bed_pos, player_bed_pos) then + return false + end + end + return true +end + +-- Callbacks +-- Only register respawn callback if respawn enabled +if enable_respawn then + -- respawn player at bed if enabled and valid position is found + minetest.register_on_respawnplayer(function(player) + local name = player:get_player_name() + local pos = beds.spawn[name] + if pos then + player:set_pos(pos) + return true + end + end) +end + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + lay_down(player, nil, nil, false, true) + beds.player[name] = nil + if check_in_beds() then + minetest.after(2, function() + update_formspecs(is_night_skip_enabled()) + if is_night_skip_enabled() then + beds.skip_night() + beds.kick_players() + end + end) + end +end) + +minetest.register_on_dieplayer(function(player) + local name = player:get_player_name() + local in_bed = beds.player + local pos = player:get_pos() + local yaw = get_look_yaw(pos) + + if in_bed[name] then + lay_down(player, nil, pos, false) + player:set_look_horizontal(yaw) + player:set_pos(pos) + end +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "beds_form" then + return + end + + -- Because "Force night skip" button is a button_exit, it will set fields.quit + -- and lay_down call will change value of player_in_bed, so it must be taken + -- earlier. + local last_player_in_bed = get_player_in_bed_count() + + if fields.quit or fields.leave then + lay_down(player, nil, nil, false) + update_formspecs(false) + end + + if fields.force then + local is_majority = (#minetest.get_connected_players() / 2) < last_player_in_bed + if is_majority and is_night_skip_enabled() then + update_formspecs(true) + beds.skip_night() + beds.kick_players() + else + update_formspecs(false) + end + end +end) diff --git a/mods/beds/init.lua b/mods/beds/init.lua new file mode 100644 index 0000000..a1a46ce --- /dev/null +++ b/mods/beds/init.lua @@ -0,0 +1,26 @@ +-- beds/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("beds") +local esc = minetest.formspec_escape + +beds = {} +beds.player = {} +beds.bed_position = {} +beds.pos = {} +beds.spawn = {} +beds.get_translator = S + +beds.formspec = "size[8,11;true]" .. + "no_prepend[]" .. + "bgcolor[#080808BB;true]" .. + "button_exit[2,10;4,0.75;leave;" .. esc(S("Leave Bed")) .. "]" + +local modpath = minetest.get_modpath("beds") + +-- Load files + +dofile(modpath .. "/functions.lua") +dofile(modpath .. "/api.lua") +dofile(modpath .. "/beds.lua") +dofile(modpath .. "/spawns.lua") diff --git a/mods/beds/license.txt b/mods/beds/license.txt new file mode 100644 index 0000000..f3c517f --- /dev/null +++ b/mods/beds/license.txt @@ -0,0 +1,61 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2014-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2018 TumeniNodes + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/beds/locale/beds.de.tr b/mods/beds/locale/beds.de.tr new file mode 100644 index 0000000..e77f654 --- /dev/null +++ b/mods/beds/locale/beds.de.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Fancy Bed=Schickes Bett +Simple Bed=Schlichtes Bett +Leave Bed=Bett verlassen +Good morning.=Guten Morgen. +@1 of @2 players are in bed=@1 von @2 Spielern sind im Bett +Force night skip=Überspringen der Nacht erzwingen +You can only sleep at night.=Sie können nur nachts schlafen. diff --git a/mods/beds/locale/beds.es.tr b/mods/beds/locale/beds.es.tr new file mode 100644 index 0000000..0543e7f --- /dev/null +++ b/mods/beds/locale/beds.es.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Fancy Bed=Cama de lujo +Simple Bed=Cama sencilla +Leave Bed=Abandonar cama +Good morning.=Buenos días. +@1 of @2 players are in bed=@1 de @2 jugadores están en cama +Force night skip=Forzar evitar noche +You can only sleep at night.=Sólo puedes dormir por la noche. diff --git a/mods/beds/locale/beds.fr.tr b/mods/beds/locale/beds.fr.tr new file mode 100644 index 0000000..bddf9b5 --- /dev/null +++ b/mods/beds/locale/beds.fr.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Fancy Bed=Lit chic +Simple Bed=Lit simple +Leave Bed=Se lever du lit +Good morning.=Bonjour. +@1 of @2 players are in bed=@1 joueur(s) sur @2 sont au lit +Force night skip=Forcer le passage de la nuit +You can only sleep at night.=Vous ne pouvez dormir que la nuit. diff --git a/mods/beds/locale/beds.id.tr b/mods/beds/locale/beds.id.tr new file mode 100644 index 0000000..401a162 --- /dev/null +++ b/mods/beds/locale/beds.id.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Leave Bed=Tinggalkan Dipan +Good morning.=Selamat pagi. +@1 of @2 players are in bed=@1 dari @2 pemain sedang tidur +Force night skip=Paksa lewati malam +You can only sleep at night.=Anda hanya boleh tidur pada waktu malam. +Fancy Bed=Dipan Mewah +Simple Bed=Dipan Sederhana diff --git a/mods/beds/locale/beds.it.tr b/mods/beds/locale/beds.it.tr new file mode 100644 index 0000000..3dbc70c --- /dev/null +++ b/mods/beds/locale/beds.it.tr @@ -0,0 +1,4 @@ +# textdomain: beds +Fancy Bed=Letto decorato +Simple Bed=Letto semplice +Leave Bed=Alzati dal letto \ No newline at end of file diff --git a/mods/beds/locale/beds.ms.tr b/mods/beds/locale/beds.ms.tr new file mode 100644 index 0000000..797e3a6 --- /dev/null +++ b/mods/beds/locale/beds.ms.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Fancy Bed=Katil Beragam +Simple Bed=Katil Biasa +Leave Bed=Bangun +Good morning.=Selamat pagi. +@1 of @2 players are in bed=@1 daripada @2 pemain sedang tidur +Force night skip=Paksa langkau malam +You can only sleep at night.=Anda hanya boleh tidur pada waktu malam. diff --git a/mods/beds/locale/beds.ru.tr b/mods/beds/locale/beds.ru.tr new file mode 100644 index 0000000..1974b3d --- /dev/null +++ b/mods/beds/locale/beds.ru.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Fancy Bed=Детализированная Кровать +Simple Bed=Обычная Кровать +Leave Bed=Встать с кровати +Good morning.=Доброе утро. +@1 of @2 players are in bed=@1 из @2 игроков в кровати +Force night skip=Пропустить ночь +You can only sleep at night.=Вы можете спать только ночью. diff --git a/mods/beds/locale/beds.se.tr b/mods/beds/locale/beds.se.tr new file mode 100644 index 0000000..53f4f2d --- /dev/null +++ b/mods/beds/locale/beds.se.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Fancy Bed=Fin säng +Simple Bed=Enkel Säng +Leave Bed=Lämna Säng +Good morning.= God morgon. +@1 of @2 players are in bed=@1 av @2 spelar försöker sover. +Force night skip=Tvinga över natten +You can only sleep at night.=Du kan bara sova på natten. diff --git a/mods/beds/locale/beds.sk.tr b/mods/beds/locale/beds.sk.tr new file mode 100644 index 0000000..353ae26 --- /dev/null +++ b/mods/beds/locale/beds.sk.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Leave Bed=Opusti posteľ +Good morning.=Dobré ráno. +@1 of @2 players are in bed=@1 z @2 hráčov sú v posteli +Force night skip=Nútene preskočiť noc +You can only sleep at night.=Môžeš spať len v noci. +Fancy Bed=Pekná posteľ +Simple Bed=Jednoduchá posteľ diff --git a/mods/beds/locale/beds.zh_CN.tr b/mods/beds/locale/beds.zh_CN.tr new file mode 100644 index 0000000..609524d --- /dev/null +++ b/mods/beds/locale/beds.zh_CN.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Fancy Bed=花式床 +Simple Bed=简易床 +Leave Bed=离开床 +Good morning.=早安! +@1 of @2 players are in bed=@2位玩家中的@1位在床上 +Force night skip=强制跳过夜晚 +You can only sleep at night.=你只能在晚上睡觉。 diff --git a/mods/beds/locale/beds.zh_TW.tr b/mods/beds/locale/beds.zh_TW.tr new file mode 100644 index 0000000..4e7d687 --- /dev/null +++ b/mods/beds/locale/beds.zh_TW.tr @@ -0,0 +1,9 @@ +# textdomain: beds +Fancy Bed=花式床 +Simple Bed=簡易床 +Leave Bed=離開床 +Good morning.=早安! +@1 of @2 players are in bed=@2位玩家中的@1位在床上 +Force night skip=強制跳過夜晚 +You can only sleep at night.=你只能在晚上睡覺。 + diff --git a/mods/beds/locale/template.txt b/mods/beds/locale/template.txt new file mode 100644 index 0000000..9dd9c5c --- /dev/null +++ b/mods/beds/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: beds +Leave Bed= +Good morning.= +@1 of @2 players are in bed= +Force night skip= +You can only sleep at night.= +Fancy Bed= +Simple Bed= diff --git a/mods/beds/mod.conf b/mods/beds/mod.conf new file mode 100644 index 0000000..450ec13 --- /dev/null +++ b/mods/beds/mod.conf @@ -0,0 +1,3 @@ +name = beds +description = Minetest Game mod: beds +depends = default, wool diff --git a/mods/beds/spawns.lua b/mods/beds/spawns.lua new file mode 100644 index 0000000..1a2ce81 --- /dev/null +++ b/mods/beds/spawns.lua @@ -0,0 +1,72 @@ +local world_path = minetest.get_worldpath() +local org_file = world_path .. "/beds_spawns" +local file = world_path .. "/beds_spawns" +local bkwd = false + +-- check for PA's beds mod spawns +local cf = io.open(world_path .. "/beds_player_spawns", "r") +if cf ~= nil then + io.close(cf) + file = world_path .. "/beds_player_spawns" + bkwd = true +end + +function beds.read_spawns() + local spawns = beds.spawn + local input = io.open(file, "r") + if input and not bkwd then + repeat + local x = input:read("*n") + if x == nil then + break + end + local y = input:read("*n") + local z = input:read("*n") + local name = input:read("*l") + spawns[name:sub(2)] = {x = x, y = y, z = z} + until input:read(0) == nil + io.close(input) + elseif input and bkwd then + beds.spawn = minetest.deserialize(input:read("*all")) + input:close() + beds.save_spawns() + os.rename(file, file .. ".backup") + file = org_file + end +end + +beds.read_spawns() + +function beds.save_spawns() + if not beds.spawn then + return + end + local data = {} + local output = io.open(org_file, "w") + for k, v in pairs(beds.spawn) do + table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, k)) + end + output:write(table.concat(data)) + io.close(output) +end + +function beds.set_spawns() + for name,_ in pairs(beds.player) do + local player = minetest.get_player_by_name(name) + local p = player:get_pos() + -- but don't change spawn location if borrowing a bed + if not minetest.is_protected(p, name) then + beds.spawn[name] = p + end + end + beds.save_spawns() +end + +function beds.remove_spawns_at(pos) + for name, p in pairs(beds.spawn) do + if vector.equals(vector.round(p), pos) then + beds.spawn[name] = nil + end + end + beds.save_spawns() +end diff --git a/mods/beds/textures/beds_bed.png b/mods/beds/textures/beds_bed.png new file mode 100644 index 0000000..5c0054c Binary files /dev/null and b/mods/beds/textures/beds_bed.png differ diff --git a/mods/beds/textures/beds_bed_fancy.png b/mods/beds/textures/beds_bed_fancy.png new file mode 100644 index 0000000..4f9e8a7 Binary files /dev/null and b/mods/beds/textures/beds_bed_fancy.png differ diff --git a/mods/beds/textures/beds_bed_foot.png b/mods/beds/textures/beds_bed_foot.png new file mode 100644 index 0000000..74d84c8 Binary files /dev/null and b/mods/beds/textures/beds_bed_foot.png differ diff --git a/mods/beds/textures/beds_bed_head.png b/mods/beds/textures/beds_bed_head.png new file mode 100644 index 0000000..763f5e1 Binary files /dev/null and b/mods/beds/textures/beds_bed_head.png differ diff --git a/mods/beds/textures/beds_bed_side1.png b/mods/beds/textures/beds_bed_side1.png new file mode 100644 index 0000000..1ed8158 Binary files /dev/null and b/mods/beds/textures/beds_bed_side1.png differ diff --git a/mods/beds/textures/beds_bed_side2.png b/mods/beds/textures/beds_bed_side2.png new file mode 100644 index 0000000..9d1384d Binary files /dev/null and b/mods/beds/textures/beds_bed_side2.png differ diff --git a/mods/beds/textures/beds_bed_side_bottom.png b/mods/beds/textures/beds_bed_side_bottom.png new file mode 100644 index 0000000..99ff309 Binary files /dev/null and b/mods/beds/textures/beds_bed_side_bottom.png differ diff --git a/mods/beds/textures/beds_bed_side_bottom_r.png b/mods/beds/textures/beds_bed_side_bottom_r.png new file mode 100644 index 0000000..6f870e8 Binary files /dev/null and b/mods/beds/textures/beds_bed_side_bottom_r.png differ diff --git a/mods/beds/textures/beds_bed_side_top.png b/mods/beds/textures/beds_bed_side_top.png new file mode 100644 index 0000000..b2807c5 Binary files /dev/null and b/mods/beds/textures/beds_bed_side_top.png differ diff --git a/mods/beds/textures/beds_bed_side_top_r.png b/mods/beds/textures/beds_bed_side_top_r.png new file mode 100644 index 0000000..429ad7d Binary files /dev/null and b/mods/beds/textures/beds_bed_side_top_r.png differ diff --git a/mods/beds/textures/beds_bed_top1.png b/mods/beds/textures/beds_bed_top1.png new file mode 100644 index 0000000..b6fcc2c Binary files /dev/null and b/mods/beds/textures/beds_bed_top1.png differ diff --git a/mods/beds/textures/beds_bed_top2.png b/mods/beds/textures/beds_bed_top2.png new file mode 100644 index 0000000..2fe5bf2 Binary files /dev/null and b/mods/beds/textures/beds_bed_top2.png differ diff --git a/mods/beds/textures/beds_bed_top_bottom.png b/mods/beds/textures/beds_bed_top_bottom.png new file mode 100644 index 0000000..9b78be6 Binary files /dev/null and b/mods/beds/textures/beds_bed_top_bottom.png differ diff --git a/mods/beds/textures/beds_bed_top_top.png b/mods/beds/textures/beds_bed_top_top.png new file mode 100644 index 0000000..e877c80 Binary files /dev/null and b/mods/beds/textures/beds_bed_top_top.png differ diff --git a/mods/beds/textures/beds_bed_under.png b/mods/beds/textures/beds_bed_under.png new file mode 100644 index 0000000..a930115 Binary files /dev/null and b/mods/beds/textures/beds_bed_under.png differ diff --git a/mods/beds/textures/beds_transparent.png b/mods/beds/textures/beds_transparent.png new file mode 100644 index 0000000..2dc0e3d Binary files /dev/null and b/mods/beds/textures/beds_transparent.png differ diff --git a/mods/binoculars/README.txt b/mods/binoculars/README.txt new file mode 100644 index 0000000..0c65f6e --- /dev/null +++ b/mods/binoculars/README.txt @@ -0,0 +1,37 @@ +Minetest Game mod: binoculars +============================= +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) + +Authors of media (textures) +--------------------------- +paramat (CC BY-SA 3.0): + binoculars_binoculars.png + +Crafting +-------- +binoculars:binoculars + +default:obsidian_glass O +default:bronze_ingot B + +O_O +BBB +O_O + +Usage +----- +In survival mode, use of zoom requires the binoculars item in your inventory, +they will allow a 10 degree field of view. +It can take up to 5 seconds for adding to or removal from inventory to have an +effect, however to instantly allow the use of this zoom 'use' (leftclick) the +item. + +Zoom with a field of view of 15 degrees is automatically allowed in creative +mode and for any player with the 'creative' privilege. + +The 'binoculars.update_player_property()' function is global so can be +redefined by a mod for alternative behaviour. diff --git a/mods/binoculars/init.lua b/mods/binoculars/init.lua new file mode 100644 index 0000000..7685897 --- /dev/null +++ b/mods/binoculars/init.lua @@ -0,0 +1,81 @@ +-- binoculars/init.lua + +-- Mod global namespace + +binoculars = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("binoculars") + + +-- Detect creative mod +local creative_mod = minetest.get_modpath("creative") +-- Cache creative mode setting as fallback if creative mod not present +local creative_mode_cache = minetest.settings:get_bool("creative_mode") + + +-- Update player property +-- Global to allow overriding + +function binoculars.update_player_property(player) + local creative_enabled = + (creative_mod and creative.is_enabled_for(player:get_player_name())) or + creative_mode_cache + local new_zoom_fov = 0 + + if player:get_inventory():contains_item( + "main", "binoculars:binoculars") then + new_zoom_fov = 10 + elseif creative_enabled then + new_zoom_fov = 15 + end + + -- Only set property if necessary to avoid player mesh reload + if player:get_properties().zoom_fov ~= new_zoom_fov then + player:set_properties({zoom_fov = new_zoom_fov}) + end +end + + +-- Set player property 'on joinplayer' + +minetest.register_on_joinplayer(function(player) + binoculars.update_player_property(player) +end) + + +-- Cyclic update of player property + +local function cyclic_update() + for _, player in ipairs(minetest.get_connected_players()) do + binoculars.update_player_property(player) + end + minetest.after(4.7, cyclic_update) +end + +minetest.after(4.7, cyclic_update) + + +-- Binoculars item + +minetest.register_craftitem("binoculars:binoculars", { + description = S("Binoculars") .. "\n" .. S("Use with 'Zoom' key"), + inventory_image = "binoculars_binoculars.png", + stack_max = 1, + + on_use = function(itemstack, user, pointed_thing) + binoculars.update_player_property(user) + end, +}) + + +-- Crafting + +minetest.register_craft({ + output = "binoculars:binoculars", + recipe = { + {"default:obsidian_glass", "", "default:obsidian_glass"}, + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + {"default:obsidian_glass", "", "default:obsidian_glass"}, + } +}) diff --git a/mods/binoculars/license.txt b/mods/binoculars/license.txt new file mode 100644 index 0000000..f3aefda --- /dev/null +++ b/mods/binoculars/license.txt @@ -0,0 +1,59 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017 paramat + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2017 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/binoculars/locale/binoculars.de.tr b/mods/binoculars/locale/binoculars.de.tr new file mode 100644 index 0000000..7bd9b9d --- /dev/null +++ b/mods/binoculars/locale/binoculars.de.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Fernglas +Use with 'Zoom' key=Mit „Zoom“-Taste benutzen diff --git a/mods/binoculars/locale/binoculars.es.tr b/mods/binoculars/locale/binoculars.es.tr new file mode 100644 index 0000000..7b7e77d --- /dev/null +++ b/mods/binoculars/locale/binoculars.es.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Prismáticos +Use with 'Zoom' key=Usar con la tecla 'Zoom' diff --git a/mods/binoculars/locale/binoculars.fr.tr b/mods/binoculars/locale/binoculars.fr.tr new file mode 100644 index 0000000..3f8b0bc --- /dev/null +++ b/mods/binoculars/locale/binoculars.fr.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Jumelles +Use with 'Zoom' key=Utiliser avec le bouton « Zoom » diff --git a/mods/binoculars/locale/binoculars.id.tr b/mods/binoculars/locale/binoculars.id.tr new file mode 100644 index 0000000..b1eb6d5 --- /dev/null +++ b/mods/binoculars/locale/binoculars.id.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Binokular +Use with 'Zoom' key=Pakai dengan tombol 'Zum' diff --git a/mods/binoculars/locale/binoculars.it.tr b/mods/binoculars/locale/binoculars.it.tr new file mode 100644 index 0000000..f8e98d6 --- /dev/null +++ b/mods/binoculars/locale/binoculars.it.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Binocolo +Use with 'Zoom' key=Usalo col tasto 'Ingrandimento' \ No newline at end of file diff --git a/mods/binoculars/locale/binoculars.ms.tr b/mods/binoculars/locale/binoculars.ms.tr new file mode 100644 index 0000000..d38e64f --- /dev/null +++ b/mods/binoculars/locale/binoculars.ms.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Binokular +Use with 'Zoom' key=Guna dengan kekunci 'Zum' diff --git a/mods/binoculars/locale/binoculars.ru.tr b/mods/binoculars/locale/binoculars.ru.tr new file mode 100644 index 0000000..6b3aa9e --- /dev/null +++ b/mods/binoculars/locale/binoculars.ru.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Бинокль +Use with 'Zoom' key=Используется с привилегией 'Zoom' diff --git a/mods/binoculars/locale/binoculars.se.tr b/mods/binoculars/locale/binoculars.se.tr new file mode 100644 index 0000000..291afd5 --- /dev/null +++ b/mods/binoculars/locale/binoculars.se.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Kikare +Use with 'Zoom' key=Används med 'Zoom' knappen \ No newline at end of file diff --git a/mods/binoculars/locale/binoculars.sk.tr b/mods/binoculars/locale/binoculars.sk.tr new file mode 100644 index 0000000..5008311 --- /dev/null +++ b/mods/binoculars/locale/binoculars.sk.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Ďalekohľad +Use with 'Zoom' key=Použi s klávesou "Priblíž" diff --git a/mods/binoculars/locale/binoculars.zh_CN.tr b/mods/binoculars/locale/binoculars.zh_CN.tr new file mode 100644 index 0000000..ec46cf8 --- /dev/null +++ b/mods/binoculars/locale/binoculars.zh_CN.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=望远镜 +Use with 'Zoom' key=与“缩放”键一起使用 diff --git a/mods/binoculars/locale/binoculars.zh_TW.tr b/mods/binoculars/locale/binoculars.zh_TW.tr new file mode 100644 index 0000000..bbe3b39 --- /dev/null +++ b/mods/binoculars/locale/binoculars.zh_TW.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=望遠鏡 +Use with 'Zoom' key=與“縮放”鍵一起使用 diff --git a/mods/binoculars/locale/template.txt b/mods/binoculars/locale/template.txt new file mode 100644 index 0000000..a526462 --- /dev/null +++ b/mods/binoculars/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars= +Use with 'Zoom' key= diff --git a/mods/binoculars/mod.conf b/mods/binoculars/mod.conf new file mode 100644 index 0000000..7d73741 --- /dev/null +++ b/mods/binoculars/mod.conf @@ -0,0 +1,4 @@ +name = binoculars +description = Minetest Game mod: binoculars +depends = default +optional_depends = creative diff --git a/mods/binoculars/textures/binoculars_binoculars.png b/mods/binoculars/textures/binoculars_binoculars.png new file mode 100644 index 0000000..5803d48 Binary files /dev/null and b/mods/binoculars/textures/binoculars_binoculars.png differ diff --git a/mods/boats/README.txt b/mods/boats/README.txt new file mode 100644 index 0000000..a2ccb48 --- /dev/null +++ b/mods/boats/README.txt @@ -0,0 +1,31 @@ +Minetest Game mod: boats +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures and model) +------------------------------------- +Textures: Zeg9 (CC BY-SA 3.0) +Model: thetoon and Zeg9 (CC BY-SA 3.0), + modified by PavelS(SokolovPavel) (CC BY-SA 3.0), + modified by sofar (CC BY-SA 3.0) + +Controls +-------- +Right mouse button = Enter or exit boat when pointing at boat. +Forward = Speed up. + Slow down when moving backwards. +Forward + backward = Enable cruise mode: Boat will accelerate to maximum forward + speed and remain at that speed without needing to hold the + forward key. +Backward = Slow down. + Speed up when moving backwards. + Disable cruise mode. +Left = Turn to the left. + Turn to the right when moving backwards. +Right = Turn to the right. + Turn to the left when moving backwards. diff --git a/mods/boats/init.lua b/mods/boats/init.lua new file mode 100644 index 0000000..f9ae8e0 --- /dev/null +++ b/mods/boats/init.lua @@ -0,0 +1,294 @@ +-- boats/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("boats") + +-- +-- Helper functions +-- + +local function is_water(pos) + local nn = minetest.get_node(pos).name + return minetest.get_item_group(nn, "water") ~= 0 +end + + +local function get_velocity(v, yaw, y) + local x = -math.sin(yaw) * v + local z = math.cos(yaw) * v + return {x = x, y = y, z = z} +end + + +local function get_v(v) + return math.sqrt(v.x ^ 2 + v.z ^ 2) +end + +-- +-- Boat entity +-- + +local boat = { + initial_properties = { + physical = true, + -- Warning: Do not change the position of the collisionbox top surface, + -- lowering it causes the boat to fall through the world if underwater + collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5}, + visual = "mesh", + mesh = "boats_boat.obj", + textures = {"default_wood.png"}, + }, + + driver = nil, + v = 0, + last_v = 0, + removed = false, + auto = false +} + + +function boat.on_rightclick(self, clicker) + if not clicker or not clicker:is_player() then + return + end + local name = clicker:get_player_name() + if self.driver and name == self.driver then + self.driver = nil + self.auto = false + clicker:set_detach() + player_api.player_attached[name] = false + player_api.set_animation(clicker, "stand" , 30) + local pos = clicker:get_pos() + pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} + minetest.after(0.1, function() + clicker:set_pos(pos) + end) + elseif not self.driver then + local attach = clicker:get_attach() + if attach and attach:get_luaentity() then + local luaentity = attach:get_luaentity() + if luaentity.driver then + luaentity.driver = nil + end + clicker:set_detach() + end + self.driver = name + clicker:set_attach(self.object, "", + {x = 0.5, y = 1, z = -3}, {x = 0, y = 0, z = 0}) + player_api.player_attached[name] = true + minetest.after(0.2, function() + player_api.set_animation(clicker, "sit" , 30) + end) + clicker:set_look_horizontal(self.object:get_yaw()) + end +end + + +-- If driver leaves server while driving boat +function boat.on_detach_child(self, child) + self.driver = nil + self.auto = false +end + + +function boat.on_activate(self, staticdata, dtime_s) + self.object:set_armor_groups({immortal = 1}) + if staticdata then + self.v = tonumber(staticdata) + end + self.last_v = self.v +end + + +function boat.get_staticdata(self) + return tostring(self.v) +end + + +function boat.on_punch(self, puncher) + if not puncher or not puncher:is_player() or self.removed then + return + end + + local name = puncher:get_player_name() + if self.driver and name == self.driver then + self.driver = nil + puncher:set_detach() + player_api.player_attached[name] = false + end + if not self.driver then + self.removed = true + local inv = puncher:get_inventory() + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(name)) + or not inv:contains_item("main", "boats:boat") then + local leftover = inv:add_item("main", "boats:boat") + -- if no room in inventory add a replacement boat to the world + if not leftover:is_empty() then + minetest.add_item(self.object:get_pos(), leftover) + end + end + -- delay remove to ensure player is detached + minetest.after(0.1, function() + self.object:remove() + end) + end +end + + +function boat.on_step(self, dtime) + self.v = get_v(self.object:get_velocity()) * math.sign(self.v) + if self.driver then + local driver_objref = minetest.get_player_by_name(self.driver) + if driver_objref then + local ctrl = driver_objref:get_player_control() + if ctrl.up and ctrl.down then + if not self.auto then + self.auto = true + minetest.chat_send_player(self.driver, S("Boat cruise mode on")) + end + elseif ctrl.down then + self.v = self.v - dtime * 2.0 + if self.auto then + self.auto = false + minetest.chat_send_player(self.driver, S("Boat cruise mode off")) + end + elseif ctrl.up or self.auto then + self.v = self.v + dtime * 2.0 + end + if ctrl.left then + if self.v < -0.001 then + self.object:set_yaw(self.object:get_yaw() - dtime * 0.9) + else + self.object:set_yaw(self.object:get_yaw() + dtime * 0.9) + end + elseif ctrl.right then + if self.v < -0.001 then + self.object:set_yaw(self.object:get_yaw() + dtime * 0.9) + else + self.object:set_yaw(self.object:get_yaw() - dtime * 0.9) + end + end + end + end + local velo = self.object:get_velocity() + if self.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then + self.object:set_pos(self.object:get_pos()) + return + end + -- We need to preserve velocity sign to properly apply drag force + -- while moving backward + local drag = dtime * math.sign(self.v) * (0.01 + 0.0796 * self.v * self.v) + -- If drag is larger than velocity, then stop horizontal movement + if math.abs(self.v) <= math.abs(drag) then + self.v = 0 + else + self.v = self.v - drag + end + + local p = self.object:get_pos() + p.y = p.y - 0.5 + local new_velo + local new_acce = {x = 0, y = 0, z = 0} + if not is_water(p) then + local nodedef = minetest.registered_nodes[minetest.get_node(p).name] + if (not nodedef) or nodedef.walkable then + self.v = 0 + new_acce = {x = 0, y = 1, z = 0} + else + new_acce = {x = 0, y = -9.8, z = 0} + end + new_velo = get_velocity(self.v, self.object:get_yaw(), + self.object:get_velocity().y) + self.object:set_pos(self.object:get_pos()) + else + p.y = p.y + 1 + if is_water(p) then + local y = self.object:get_velocity().y + if y >= 5 then + y = 5 + elseif y < 0 then + new_acce = {x = 0, y = 20, z = 0} + else + new_acce = {x = 0, y = 5, z = 0} + end + new_velo = get_velocity(self.v, self.object:get_yaw(), y) + self.object:set_pos(self.object:get_pos()) + else + new_acce = {x = 0, y = 0, z = 0} + if math.abs(self.object:get_velocity().y) < 1 then + local pos = self.object:get_pos() + pos.y = math.floor(pos.y) + 0.5 + self.object:set_pos(pos) + new_velo = get_velocity(self.v, self.object:get_yaw(), 0) + else + new_velo = get_velocity(self.v, self.object:get_yaw(), + self.object:get_velocity().y) + self.object:set_pos(self.object:get_pos()) + end + end + end + self.object:set_velocity(new_velo) + self.object:set_acceleration(new_acce) +end + + +minetest.register_entity("boats:boat", boat) + + +minetest.register_craftitem("boats:boat", { + description = S("Boat"), + inventory_image = "boats_inventory.png", + wield_image = "boats_wield.png", + wield_scale = {x = 2, y = 2, z = 1}, + liquids_pointable = true, + groups = {flammable = 2}, + + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + if pointed_thing.type ~= "node" then + return itemstack + end + if not is_water(pointed_thing.under) then + return itemstack + end + pointed_thing.under.y = pointed_thing.under.y + 0.5 + boat = minetest.add_entity(pointed_thing.under, "boats:boat") + if boat then + if placer then + boat:set_yaw(placer:get_look_horizontal()) + end + local player_name = placer and placer:get_player_name() or "" + if not (creative and creative.is_enabled_for and + creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + end + return itemstack + end, +}) + + +minetest.register_craft({ + output = "boats:boat", + recipe = { + {"", "", "" }, + {"group:wood", "", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + }, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "boats:boat", + burntime = 20, +}) diff --git a/mods/boats/license.txt b/mods/boats/license.txt new file mode 100644 index 0000000..d4afe75 --- /dev/null +++ b/mods/boats/license.txt @@ -0,0 +1,63 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures and model) +-------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Zeg9 +Copyright (C) 2012-2016 thetoon +Copyright (C) 2012-2016 PavelS(SokolovPavel) +Copyright (C) 2016 sofar (sofar@foo-projects.org) + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/boats/locale/boats.de.tr b/mods/boats/locale/boats.de.tr new file mode 100644 index 0000000..d8eb8d7 --- /dev/null +++ b/mods/boats/locale/boats.de.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Schneller Bootsmodus an +Boat cruise mode off=Schneller Bootsmodus aus +Boat=Boot diff --git a/mods/boats/locale/boats.es.tr b/mods/boats/locale/boats.es.tr new file mode 100644 index 0000000..b9adb72 --- /dev/null +++ b/mods/boats/locale/boats.es.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Modo crucero en bote activado +Boat cruise mode off=Modo crucero en bote desactivado +Boat=Bote diff --git a/mods/boats/locale/boats.fr.tr b/mods/boats/locale/boats.fr.tr new file mode 100644 index 0000000..f469a0b --- /dev/null +++ b/mods/boats/locale/boats.fr.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Bateau mode rapide activé +Boat cruise mode off=Bateau mode rapide désactivé +Boat=Bateau diff --git a/mods/boats/locale/boats.id.tr b/mods/boats/locale/boats.id.tr new file mode 100644 index 0000000..cf37f47 --- /dev/null +++ b/mods/boats/locale/boats.id.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Mode perahu jelajah nyala +Boat cruise mode off=Mode perahu jelajah mati +Boat=Perahu diff --git a/mods/boats/locale/boats.it.tr b/mods/boats/locale/boats.it.tr new file mode 100644 index 0000000..5bd7125 --- /dev/null +++ b/mods/boats/locale/boats.it.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Modalità movimento automatico barca attivata +Boat cruise mode off=Modalità movimento automatico barca disattivata +Boat=Barca \ No newline at end of file diff --git a/mods/boats/locale/boats.ms.tr b/mods/boats/locale/boats.ms.tr new file mode 100644 index 0000000..d11a68b --- /dev/null +++ b/mods/boats/locale/boats.ms.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Mod bot layar makan angin dibolehkan +Boat cruise mode off=Mod bot layar makan angin dilumpuhkan +Boat=Bot diff --git a/mods/boats/locale/boats.ru.tr b/mods/boats/locale/boats.ru.tr new file mode 100644 index 0000000..4327098 --- /dev/null +++ b/mods/boats/locale/boats.ru.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Режим путешествия на лодке включен +Boat cruise mode off=Режим путешествия на лодке выключен +Boat=Лодка diff --git a/mods/boats/locale/boats.se.tr b/mods/boats/locale/boats.se.tr new file mode 100644 index 0000000..4ca7c80 --- /dev/null +++ b/mods/boats/locale/boats.se.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Båtkryssningsläge på +Boat cruise mode off=Båtkryssningsläge av +Boat=Båt \ No newline at end of file diff --git a/mods/boats/locale/boats.sk.tr b/mods/boats/locale/boats.sk.tr new file mode 100644 index 0000000..b6ed722 --- /dev/null +++ b/mods/boats/locale/boats.sk.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Cestovný režim loďky zapnutý +Boat cruise mode off=Cestovný režim loďky vypnutý +Boat=Loďka diff --git a/mods/boats/locale/boats.zh_CN.tr b/mods/boats/locale/boats.zh_CN.tr new file mode 100644 index 0000000..254f2df --- /dev/null +++ b/mods/boats/locale/boats.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=巡航模式开启 +Boat cruise mode off=巡航模式关闭 +Boat=船 diff --git a/mods/boats/locale/boats.zh_TW.tr b/mods/boats/locale/boats.zh_TW.tr new file mode 100644 index 0000000..97b3471 --- /dev/null +++ b/mods/boats/locale/boats.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=巡航模式開啟 +Boat cruise mode off=巡航模式關閉 +Boat=船 diff --git a/mods/boats/locale/template.txt b/mods/boats/locale/template.txt new file mode 100644 index 0000000..17aedc8 --- /dev/null +++ b/mods/boats/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on= +Boat cruise mode off= +Boat= diff --git a/mods/boats/mod.conf b/mods/boats/mod.conf new file mode 100644 index 0000000..a727f8f --- /dev/null +++ b/mods/boats/mod.conf @@ -0,0 +1,3 @@ +name = boats +description = Minetest Game mod: boats +depends = default, player_api diff --git a/mods/boats/models/boats_boat.obj b/mods/boats/models/boats_boat.obj new file mode 100644 index 0000000..0f21e47 --- /dev/null +++ b/mods/boats/models/boats_boat.obj @@ -0,0 +1,358 @@ +# Blender v2.76 (sub 11) OBJ File: 'boat.blend' +# www.blender.org +mtllib boat.mtl +o boats_boat +v -6.786140 -3.033999 -9.415440 +v -6.786140 -1.967150 -9.415440 +v -6.786140 -1.967150 8.793510 +v -6.786140 -3.033999 8.793510 +v 5.732520 -1.967150 -9.415440 +v 5.732520 -3.033999 -9.415440 +v 5.732520 -3.033999 8.793510 +v 5.732520 -1.967150 8.793510 +v -2.233900 -3.033999 -9.415440 +v -2.233900 -1.967150 -9.415440 +v -2.233900 -1.967150 8.793510 +v -2.233900 -3.033999 8.793510 +v 2.318340 -3.033999 -9.415440 +v 2.318340 -1.967150 -9.415440 +v 2.318340 -1.967150 8.793510 +v 2.318340 -3.033999 8.793510 +v -3.371960 -3.033999 8.793510 +v -3.371960 -1.967150 8.793510 +v -3.371960 -1.967150 -9.415440 +v -3.371960 -3.033999 -9.415440 +v 2.318340 0.276645 8.793510 +v 1.180280 -1.967150 8.793510 +v 5.732520 0.276645 8.793510 +v 5.732520 1.039180 8.793510 +v 6.870580 0.276645 8.793510 +v 6.870580 -1.967150 8.793510 +v 2.318340 1.039180 8.793510 +v 1.180280 0.276645 8.793510 +v 1.180280 1.039180 8.793510 +v 1.180280 -3.033999 8.793510 +v -2.233900 0.276645 8.793510 +v -3.371960 0.276645 8.793510 +v -2.233900 1.039180 8.793510 +v -3.371960 1.039180 8.793510 +v -6.786140 0.276645 8.793510 +v -7.786200 0.276645 8.793510 +v -7.786200 -1.967150 8.793510 +v -6.786140 1.039180 8.793510 +v 1.180280 -1.967150 -9.415440 +v 1.180280 -3.033999 -9.415440 +v 2.318340 0.276645 -9.415440 +v 1.180280 0.276645 -9.415440 +v 2.318340 1.039180 -9.415440 +v 5.732520 0.276645 -9.415440 +v 6.870580 -1.967150 -9.415440 +v 5.732520 1.039180 -9.415440 +v 6.870580 0.276645 -9.415440 +v 0.042220 1.039180 -9.415440 +v 1.180280 1.039180 -9.415440 +v 0.042220 -1.967150 -9.415440 +v -1.095840 -1.967150 -9.415440 +v -2.233900 0.276645 -9.415440 +v -3.371960 0.276645 -9.415440 +v -2.233900 1.039180 -9.415440 +v -1.095840 1.039180 -9.415440 +v -3.371960 1.039180 -9.415440 +v -6.786140 0.276645 -9.415440 +v -6.786140 1.039180 -9.415440 +v -7.786200 -1.967150 -9.415440 +v -7.786200 0.276645 -9.415440 +v -1.095840 0.156645 -12.044100 +v -1.095840 -4.601110 -9.415440 +v -1.095840 1.039181 -10.802900 +v -1.095840 2.868579 -10.802900 +v -1.095840 2.868580 -7.883420 +v -1.095840 3.746069 -12.034100 +v -1.095840 3.746070 -7.883420 +v -1.095840 0.156645 -14.294900 +v -1.095840 -4.601110 -14.284900 +v 0.042220 -4.601110 -14.284900 +v 0.042220 -4.601110 -9.415440 +v 0.042220 1.039181 -10.802900 +v 0.042220 0.156645 -12.044100 +v 0.042220 2.868579 -10.802900 +v 0.042220 0.156645 -14.294900 +v 0.042220 3.746069 -12.034100 +v 0.042220 3.746070 -7.883420 +v 0.042220 2.868580 -7.883420 +v -1.096322 -3.033999 -9.415440 +v 0.044046 -3.035397 -9.415440 +vt 1.000000 0.187500 +vt -1.000000 0.312500 +vt 1.000000 0.312500 +vt 0.687500 1.000000 +vt 0.500000 0.875000 +vt 0.500000 0.625000 +vt -1.000000 0.062500 +vt 1.000000 0.062500 +vt 1.000000 -0.000000 +vt -1.000000 0.125000 +vt 1.000000 0.125000 +vt 0.437500 0.125000 +vt 0.312500 0.500000 +vt 0.312500 0.125000 +vt 1.000000 0.625000 +vt -1.000000 0.500000 +vt 1.000000 0.500000 +vt 0.187500 0.687500 +vt -0.187500 0.687500 +vt -0.187500 0.312500 +vt 1.000000 0.812500 +vt -1.000000 0.937500 +vt -1.000000 0.812500 +vt 0.812500 0.687500 +vt 1.187500 0.687500 +vt 0.812500 0.312500 +vt 1.000000 0.562500 +vt 0.312500 0.437500 +vt 1.000000 0.437500 +vt 1.000000 0.750000 +vt -1.000000 0.875000 +vt -1.000000 0.750000 +vt -1.000000 1.000000 +vt 1.000000 1.000000 +vt 0.437500 0.625000 +vt 0.562500 0.437500 +vt 0.562500 0.625000 +vt -1.000000 0.437500 +vt -1.000000 0.000000 +vt 0.500000 0.062500 +vt 0.375000 0.750000 +vt 0.500000 0.750000 +vt -1.000000 0.250000 +vt -1.000000 0.687500 +vt 1.000000 0.687500 +vt 0.625000 0.375000 +vt 1.000000 0.375000 +vt 1.000000 0.250000 +vt 1.000000 0.937500 +vt 0.437500 0.812500 +vt 0.312500 0.312500 +vt 0.312500 0.812500 +vt 0.437500 0.312500 +vt 0.437500 0.437500 +vt 0.687500 0.812500 +vt 0.000000 0.687500 +vt 0.000000 0.812500 +vt -1.000000 0.562500 +vt 0.875000 0.812500 +vt 0.875000 0.687500 +vt 0.250000 0.312500 +vt 0.562500 0.187500 +vt 0.250000 0.187500 +vt -1.000000 0.187500 +vt 0.312500 0.625000 +vt 0.312500 0.187500 +vt 0.312500 -0.187500 +vt 1.000000 -0.187500 +vt 0.687500 0.500000 +vt -0.000000 1.000000 +vt 0.000000 0.875000 +vt 0.437500 0.500000 +vt -1.000000 0.625000 +vt 0.812500 0.187500 +vt 1.187500 0.187500 +vt 1.187500 0.312500 +vt 1.312500 0.312500 +vt 1.312500 0.687500 +vt 0.687500 0.187500 +vt 0.687500 0.312500 +vt 1.187500 0.812500 +vt 0.812500 0.812500 +vt 0.187500 0.312500 +vt 0.312500 0.687500 +vt 0.687500 0.687500 +vt -0.187500 0.187500 +vt 0.187500 0.187500 +vt -0.312500 0.687500 +vt -0.312500 0.312500 +vt 0.187500 0.812500 +vt -0.187500 0.812500 +vt 0.437500 0.687500 +vt 0.437500 0.187500 +vt 0.562500 0.812500 +vt 0.562500 0.687500 +vt 0.312500 0.562500 +vt 1.000000 0.875000 +vt 0.375000 0.062500 +vt -1.000000 0.375000 +vt 0.625000 0.500000 +vt 0.875000 0.562500 +vt 0.937500 0.812500 +vt 0.937500 0.687500 +vt 0.875000 0.937500 +vt 0.562500 0.312500 +vn -1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -0.002100 -1.000000 +vn 0.001200 -1.000000 0.000000 +vn 0.000000 0.002800 -1.000000 +vn -0.001200 -1.000000 0.000200 +g boats_boat_boats_boat_None +usemtl None +s off +f 41/1/1 27/2/1 43/3/1 +f 76/4/2 74/5/2 72/6/2 +f 8/7/2 6/1/2 5/8/2 +f 15/9/1 13/10/1 16/11/1 +f 51/12/3 71/13/3 50/14/3 +f 56/15/2 32/16/2 53/17/2 +f 15/18/3 8/19/3 23/20/3 +f 22/21/2 40/22/2 39/23/2 +f 19/24/4 2/25/4 53/26/4 +f 70/27/5 62/28/5 69/29/5 +f 11/30/5 19/31/5 10/32/5 +f 4/15/5 20/33/5 17/34/5 +f 72/35/3 64/36/3 63/37/3 +f 13/8/5 7/38/5 16/7/5 +f 23/39/6 47/11/6 44/9/6 +f 68/40/7 70/41/7 69/42/7 +f 80/43/8 40/10/8 30/11/8 +f 3/15/1 1/32/1 4/30/1 +f 20/44/2 18/27/2 17/45/2 +f 74/17/5 65/46/5 64/47/5 +f 31/43/1 54/47/1 52/48/1 +f 22/47/5 14/43/5 15/48/5 +f 46/1/2 23/7/2 44/8/2 +f 57/21/1 38/22/1 58/49/1 +f 61/50/9 76/51/9 73/52/9 +f 37/45/5 2/23/5 3/21/5 +f 78/28/3 67/53/3 65/54/3 +f 64/5/1 66/4/1 63/6/1 +f 76/55/6 67/56/6 77/57/6 +f 47/17/2 26/10/2 45/11/2 +f 5/16/5 26/47/5 8/17/5 +f 33/58/6 48/59/6 55/60/6 +f 29/38/2 42/3/2 49/29/2 +f 32/44/6 52/21/6 53/45/6 +f 58/15/6 34/33/6 56/34/6 +f 27/7/6 46/29/6 43/8/6 +f 73/61/6 68/62/6 61/63/6 +f 21/58/6 42/29/6 28/38/6 +f 11/29/1 9/58/1 12/27/1 +f 59/45/1 36/2/1 60/3/1 +f 60/9/6 35/10/6 57/11/6 +f 41/1/1 21/64/1 27/2/1 +f 72/6/2 48/65/2 50/66/2 +f 50/66/2 71/67/2 70/68/2 +f 70/68/2 75/17/2 73/69/2 +f 76/4/2 77/70/2 74/5/2 +f 77/70/2 78/71/2 74/5/2 +f 50/66/2 70/68/2 73/69/2 +f 73/69/2 76/4/2 72/6/2 +f 72/6/2 50/66/2 73/69/2 +f 8/7/2 7/64/2 6/1/2 +f 15/9/1 14/39/1 13/10/1 +f 51/12/3 62/72/3 71/13/3 +f 56/15/2 34/73/2 32/16/2 +f 32/26/3 34/74/3 38/75/3 +f 35/76/3 36/77/3 37/78/3 +f 32/26/3 38/75/3 35/76/3 +f 29/66/3 33/79/3 31/80/3 +f 32/26/3 35/76/3 3/25/3 +f 28/51/3 29/66/3 31/80/3 +f 31/80/3 32/26/3 18/24/3 +f 3/25/3 4/81/3 17/82/3 +f 35/76/3 37/78/3 3/25/3 +f 21/83/3 28/51/3 22/84/3 +f 3/25/3 17/82/3 18/24/3 +f 11/85/3 12/55/3 30/52/3 +f 32/26/3 3/25/3 18/24/3 +f 11/85/3 30/52/3 22/84/3 +f 31/80/3 18/24/3 11/85/3 +f 24/86/3 27/87/3 21/83/3 +f 28/51/3 31/80/3 11/85/3 +f 11/85/3 22/84/3 28/51/3 +f 24/86/3 21/83/3 23/20/3 +f 26/88/3 25/89/3 23/20/3 +f 23/20/3 21/83/3 15/18/3 +f 15/18/3 16/90/3 7/91/3 +f 21/83/3 22/84/3 15/18/3 +f 8/19/3 26/88/3 23/20/3 +f 15/18/3 7/91/3 8/19/3 +f 22/21/2 30/49/2 40/22/2 +f 47/89/4 45/88/4 5/19/4 +f 5/19/4 6/91/4 13/90/4 +f 5/19/4 13/90/4 14/18/4 +f 44/20/4 47/89/4 5/19/4 +f 43/87/4 46/86/4 44/20/4 +f 41/83/4 43/87/4 44/20/4 +f 44/20/4 5/19/4 14/18/4 +f 39/84/4 40/52/4 80/50/4 +f 44/20/4 14/18/4 41/83/4 +f 42/51/4 41/83/4 39/84/4 +f 39/84/4 80/50/4 50/92/4 +f 41/83/4 14/18/4 39/84/4 +f 48/93/4 49/66/4 42/51/4 +f 50/92/4 48/93/4 42/51/4 +f 80/50/4 79/94/4 50/92/4 +f 50/92/4 42/51/4 39/84/4 +f 54/79/4 55/62/4 52/80/4 +f 50/92/4 79/94/4 51/95/4 +f 52/80/4 55/62/4 51/95/4 +f 51/95/4 79/94/4 10/85/4 +f 79/94/4 9/55/4 10/85/4 +f 53/26/4 52/80/4 10/85/4 +f 58/75/4 56/74/4 53/26/4 +f 59/78/4 60/77/4 57/76/4 +f 57/76/4 58/75/4 53/26/4 +f 52/80/4 51/95/4 10/85/4 +f 19/24/4 20/82/4 1/81/4 +f 53/26/4 10/85/4 19/24/4 +f 59/78/4 57/76/4 2/25/4 +f 19/24/4 1/81/4 2/25/4 +f 2/25/4 57/76/4 53/26/4 +f 70/27/5 71/96/5 62/28/5 +f 11/30/5 18/97/5 19/31/5 +f 4/15/5 1/73/5 20/33/5 +f 72/35/3 74/54/3 64/36/3 +f 13/8/5 6/29/5 7/38/5 +f 23/39/6 25/10/6 47/11/6 +f 68/40/7 75/98/7 70/41/7 +f 30/11/5 12/17/5 79/99/5 +f 79/99/10 80/43/10 30/11/10 +f 12/17/5 9/16/5 79/99/5 +f 3/15/1 2/73/1 1/32/1 +f 20/44/2 19/58/2 18/27/2 +f 74/17/5 78/100/5 65/46/5 +f 31/43/1 33/99/1 54/47/1 +f 22/47/5 39/99/5 14/43/5 +f 46/1/2 24/64/2 23/7/2 +f 57/21/1 35/23/1 38/22/1 +f 61/50/9 66/53/9 76/51/9 +f 37/45/5 59/44/5 2/23/5 +f 78/28/3 77/51/3 67/53/3 +f 62/67/1 51/66/1 69/68/1 +f 51/66/1 55/65/1 63/6/1 +f 68/17/1 69/68/1 61/69/1 +f 61/69/1 69/68/1 51/66/1 +f 61/69/1 51/66/1 63/6/1 +f 65/71/1 67/70/1 64/5/1 +f 61/69/1 63/6/1 66/4/1 +f 64/5/1 67/70/1 66/4/1 +f 76/55/6 66/85/6 67/56/6 +f 47/17/2 25/16/2 26/10/2 +f 5/16/5 45/99/5 26/47/5 +f 55/60/6 54/101/6 33/58/6 +f 33/58/6 29/22/6 48/59/6 +f 48/59/6 72/102/6 63/103/6 +f 29/22/6 49/104/6 48/59/6 +f 48/59/6 63/103/6 55/60/6 +f 29/38/2 28/2/2 42/3/2 +f 32/44/6 31/23/6 52/21/6 +f 58/15/6 38/73/6 34/33/6 +f 27/7/6 24/38/6 46/29/6 +f 73/61/6 75/105/6 68/62/6 +f 21/58/6 41/27/6 42/29/6 +f 11/29/1 10/38/1 9/58/1 +f 59/45/1 37/44/1 36/2/1 +f 60/9/6 36/39/6 35/10/6 diff --git a/mods/boats/textures/boats_inventory.png b/mods/boats/textures/boats_inventory.png new file mode 100644 index 0000000..f9d082e Binary files /dev/null and b/mods/boats/textures/boats_inventory.png differ diff --git a/mods/boats/textures/boats_wield.png b/mods/boats/textures/boats_wield.png new file mode 100644 index 0000000..f998b5b Binary files /dev/null and b/mods/boats/textures/boats_wield.png differ diff --git a/mods/bones/README.txt b/mods/bones/README.txt new file mode 100644 index 0000000..91bcd10 --- /dev/null +++ b/mods/bones/README.txt @@ -0,0 +1,12 @@ +Minetest Game mod: bones +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +All textures: paramat (CC BY-SA 3.0) diff --git a/mods/bones/init.lua b/mods/bones/init.lua new file mode 100644 index 0000000..5e54259 --- /dev/null +++ b/mods/bones/init.lua @@ -0,0 +1,284 @@ +-- bones/init.lua + +-- Minetest 0.4 mod: bones +-- See README.txt for licensing and other information. + +-- Load support for MT game translation. +local S = minetest.get_translator("bones") + +bones = {} + +local function is_owner(pos, name) + local owner = minetest.get_meta(pos):get_string("owner") + if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then + return true + end + return false +end + +local bones_formspec = + "size[8,9]" .. + "list[current_name;main;0,0.3;8,4;]" .. + "list[current_player;main;0,4.85;8,1;]" .. + "list[current_player;main;0,6.08;8,3;8]" .. + "listring[current_name;main]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,4.85) + +local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200 +local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4 + +minetest.register_node("bones:bones", { + description = S("Bones"), + tiles = { + "bones_top.png^[transform2", + "bones_bottom.png", + "bones_side.png", + "bones_side.png", + "bones_rear.png", + "bones_front.png" + }, + paramtype2 = "facedir", + groups = {dig_immediate = 2}, + sounds = default.node_sound_gravel_defaults(), + + can_dig = function(pos, player) + local inv = minetest.get_meta(pos):get_inventory() + local name = "" + if player then + name = player:get_player_name() + end + return is_owner(pos, name) and inv:is_empty("main") + end, + + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + if is_owner(pos, player:get_player_name()) then + return count + end + return 0 + end, + + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + return 0 + end, + + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if is_owner(pos, player:get_player_name()) then + return stack:get_count() + end + return 0 + end, + + on_metadata_inventory_take = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if meta:get_inventory():is_empty("main") then + local inv = player:get_inventory() + if inv:room_for_item("main", {name = "bones:bones"}) then + inv:add_item("main", {name = "bones:bones"}) + else + minetest.add_item(pos, "bones:bones") + end + minetest.remove_node(pos) + end + end, + + on_punch = function(pos, node, player) + if not is_owner(pos, player:get_player_name()) then + return + end + + if minetest.get_meta(pos):get_string("infotext") == "" then + return + end + + local inv = minetest.get_meta(pos):get_inventory() + local player_inv = player:get_inventory() + local has_space = true + + for i = 1, inv:get_size("main") do + local stk = inv:get_stack("main", i) + if player_inv:room_for_item("main", stk) then + inv:set_stack("main", i, nil) + player_inv:add_item("main", stk) + else + has_space = false + break + end + end + + -- remove bones if player emptied them + if has_space then + if player_inv:room_for_item("main", {name = "bones:bones"}) then + player_inv:add_item("main", {name = "bones:bones"}) + else + minetest.add_item(pos,"bones:bones") + end + minetest.remove_node(pos) + end + end, + + on_timer = function(pos, elapsed) + local meta = minetest.get_meta(pos) + local time = meta:get_int("time") + elapsed + if time >= share_bones_time then + meta:set_string("infotext", S("@1's old bones", meta:get_string("owner"))) + meta:set_string("owner", "") + else + meta:set_int("time", time) + return true + end + end, + on_blast = function(pos) + end, +}) + +local function may_replace(pos, player) + local node_name = minetest.get_node(pos).name + local node_definition = minetest.registered_nodes[node_name] + + -- if the node is unknown, we return false + if not node_definition then + return false + end + + -- allow replacing air and liquids + if node_name == "air" or node_definition.liquidtype ~= "none" then + return true + end + + -- don't replace filled chests and other nodes that don't allow it + local can_dig_func = node_definition.can_dig + if can_dig_func and not can_dig_func(pos, player) then + return false + end + + -- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones? + -- flowers being squished by bones are more realistical than a squished stone, too + -- exception are of course any protected buildable_to + return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name()) +end + +local drop = function(pos, itemstack) + local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count())) + if obj then + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 5, + z = math.random(-10, 10) / 9, + }) + end +end + +local player_inventory_lists = { "main", "craft" } +bones.player_inventory_lists = player_inventory_lists + +local function is_all_empty(player_inv) + for _, list_name in ipairs(player_inventory_lists) do + if not player_inv:is_empty(list_name) then + return false + end + end + return true +end + +minetest.register_on_dieplayer(function(player) + + local bones_mode = minetest.settings:get("bones_mode") or "bones" + if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then + bones_mode = "bones" + end + + local bones_position_message = minetest.settings:get_bool("bones_position_message") == true + local player_name = player:get_player_name() + local pos = vector.round(player:get_pos()) + local pos_string = minetest.pos_to_string(pos) + + -- return if keep inventory set or in creative mode + if bones_mode == "keep" or (creative and creative.is_enabled_for + and creative.is_enabled_for(player:get_player_name())) then + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". No bones placed") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string)) + end + return + end + + local player_inv = player:get_inventory() + if is_all_empty(player_inv) then + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". No bones placed") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string)) + end + return + end + + -- check if it's possible to place bones, if not find space near player + if bones_mode == "bones" and not may_replace(pos, player) then + local air = minetest.find_node_near(pos, 1, {"air"}) + if air and not minetest.is_protected(air, player_name) then + pos = air + else + bones_mode = "drop" + end + end + + if bones_mode == "drop" then + for _, list_name in ipairs(player_inventory_lists) do + for i = 1, player_inv:get_size(list_name) do + drop(pos, player_inv:get_stack(list_name, i)) + end + player_inv:set_list(list_name, {}) + end + drop(pos, ItemStack("bones:bones")) + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". Inventory dropped") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2, and dropped their inventory.", player_name, pos_string)) + end + return + end + + local param2 = minetest.dir_to_facedir(player:get_look_dir()) + minetest.set_node(pos, {name = "bones:bones", param2 = param2}) + + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". Bones placed") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2, and bones were placed.", player_name, pos_string)) + end + + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("main", 8 * 4) + + for _, list_name in ipairs(player_inventory_lists) do + for i = 1, player_inv:get_size(list_name) do + local stack = player_inv:get_stack(list_name, i) + if inv:room_for_item("main", stack) then + inv:add_item("main", stack) + else -- no space left + drop(pos, stack) + end + end + player_inv:set_list(list_name, {}) + end + + meta:set_string("formspec", bones_formspec) + meta:set_string("owner", player_name) + + if share_bones_time ~= 0 then + meta:set_string("infotext", S("@1's fresh bones", player_name)) + + if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then + meta:set_int("time", 0) + else + meta:set_int("time", (share_bones_time - share_bones_time_early)) + end + + minetest.get_node_timer(pos):start(10) + else + meta:set_string("infotext", S("@1's bones", player_name)) + end +end) diff --git a/mods/bones/license.txt b/mods/bones/license.txt new file mode 100644 index 0000000..fe52584 --- /dev/null +++ b/mods/bones/license.txt @@ -0,0 +1,58 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2016 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + diff --git a/mods/bones/locale/bones.de.tr b/mods/bones/locale/bones.de.tr new file mode 100644 index 0000000..83f5c28 --- /dev/null +++ b/mods/bones/locale/bones.de.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Knochen +@1's old bones=Alte Knochen von @1 +@1 died at @2.=@1 starb bei @2. +@1 died at @2, and dropped their inventory.=@1 starb bei @2 und ließ das Inventar fallen. +@1 died at @2, and bones were placed.=@1 starb bei @2 und Knochen wurden platziert. +@1's fresh bones=Frische Knochen von @1 +@1's bones=Knochen von @1 diff --git a/mods/bones/locale/bones.es.tr b/mods/bones/locale/bones.es.tr new file mode 100644 index 0000000..9c45513 --- /dev/null +++ b/mods/bones/locale/bones.es.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Huesos +@1's old bones=Huesos antiguos de @1 +@1 died at @2.=@1 murió en @2. +@1 died at @2, and dropped their inventory.=@1 murió en @2, y su inventario se desprendió. +@1 died at @2, and bones were placed.=@1 murió en @2, y sus huesos fueron depositados. +@1's fresh bones=Huesos recientes de @1 +@1's bones=Huesos de @1 diff --git a/mods/bones/locale/bones.fr.tr b/mods/bones/locale/bones.fr.tr new file mode 100644 index 0000000..cfe01ee --- /dev/null +++ b/mods/bones/locale/bones.fr.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Os +@1's old bones=Vieux os de @1 +@1 died at @2.=@1 est mort à @2. +@1 died at @2, and dropped their inventory.=@1 est mort à @2 et a laissé tomber son inventaire. +@1 died at @2, and bones were placed.=@1 est mort à @2 et ses os ont été placés. +@1's fresh bones=Os frais de @1 +@1's bones=Os de @1 diff --git a/mods/bones/locale/bones.id.tr b/mods/bones/locale/bones.id.tr new file mode 100644 index 0000000..3c81acc --- /dev/null +++ b/mods/bones/locale/bones.id.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Tulang +@1's old bones=Tulang lama @1 +@1 died at @2.=@1 mati di @2. +@1 died at @2, and dropped their inventory.=@1 mati di @2 dan meninggalkan barangnya. +@1 died at @2, and bones were placed.=@1 mati di @2 dan tulangnya diletakkan. +@1's fresh bones=Tulang segar @1 +@1's bones=Tulang @1 diff --git a/mods/bones/locale/bones.it.tr b/mods/bones/locale/bones.it.tr new file mode 100644 index 0000000..486b6d3 --- /dev/null +++ b/mods/bones/locale/bones.it.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Ossa +@1's old bones=Ossa vecchie di @1 +@1 died at @2.=@1 è morto alla posizione @2. +@1 died at @2, and dropped their inventory.=@1 è morto alla posizione @2, e ha lasciato a terra il contenuto del suo inventario. +@1 died at @2, and bones were placed.=@1 è morto alla posizione @2, e vi sono state posizionate delle ossa. +@1's fresh bones=Ossa fresche di @1 +@1's bones=Ossa di @1 \ No newline at end of file diff --git a/mods/bones/locale/bones.ms.tr b/mods/bones/locale/bones.ms.tr new file mode 100644 index 0000000..e4b8712 --- /dev/null +++ b/mods/bones/locale/bones.ms.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Tulang +@1's old bones=Tulang lama @1 +@1 died at @2.=@1 mati di @2. +@1 died at @2, and dropped their inventory.=@1 mati di @2, dan menjatuhkan inventorinya. +@1 died at @2, and bones were placed.=@1 mati di @2, dan tulang diletakkan. +@1's fresh bones=Tulang segar @1 +@1's bones=Tulang @1 diff --git a/mods/bones/locale/bones.ru.tr b/mods/bones/locale/bones.ru.tr new file mode 100644 index 0000000..98691c5 --- /dev/null +++ b/mods/bones/locale/bones.ru.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Кости +@1's old bones=Старые кости @1 +@1 died at @2.=@1 умер в @2. +@1 died at @2, and dropped their inventory.=@1 умер в @2 и потерял содержимое своего инвентаря. +@1 died at @2, and bones were placed.=@1 умер в @2, помещены кости. +@1's fresh bones=новые кости @1 +@1's bones=кости @1 diff --git a/mods/bones/locale/bones.se.tr b/mods/bones/locale/bones.se.tr new file mode 100644 index 0000000..1323c59 --- /dev/null +++ b/mods/bones/locale/bones.se.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Ben +@1's old bones=@1s Gamla ben +@1 died at @2.=@1 dog på @a. +@1 died at @2, and dropped their inventory.=@1 dog på @a, och tappade deras saker. +@1 died at @2, and bones were placed.=@1 dog på @2, och deras ben var placerade. +@1's fresh bones=@1s färska ben +@1's bones=@1s ben diff --git a/mods/bones/locale/bones.sk.tr b/mods/bones/locale/bones.sk.tr new file mode 100644 index 0000000..a32c17d --- /dev/null +++ b/mods/bones/locale/bones.sk.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Kosti +@1's old bones=Staré kosti hráča @1 +@1 died at @2.=@1 zomrel na pozícií @2. +@1 died at @2, and dropped their inventory.=@1 zomrel na pozícií @2 a vysypal svoj inventár. +@1 died at @2, and bones were placed.=@1 zomrel na pozícií @2 a ostali po ňom kosti. +@1's fresh bones=Čerstvé kosti hráča @1 +@1's bones=Kosti hráča @1 diff --git a/mods/bones/locale/bones.zh_CN.tr b/mods/bones/locale/bones.zh_CN.tr new file mode 100644 index 0000000..dadf55e --- /dev/null +++ b/mods/bones/locale/bones.zh_CN.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=骨骸 +@1's old bones=@1的旧骨骸 +@1 died at @2.=@1在@2死亡。 +@1 died at @2, and dropped their inventory.=@1在@2死亡,丢掉了物品栏。 +@1 died at @2, and bones were placed.=@1在@2死亡,骨骸被放置。 +@1's fresh bones=@1的新鲜骨骸 +@1's bones=@1的骨骸 diff --git a/mods/bones/locale/bones.zh_TW.tr b/mods/bones/locale/bones.zh_TW.tr new file mode 100644 index 0000000..1a94d2f --- /dev/null +++ b/mods/bones/locale/bones.zh_TW.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=骨骸 +@1's old bones=@1的舊骨骸 +@1 died at @2.=@1在@2死亡。 +@1 died at @2, and dropped their inventory.=@1在@2死亡,丟掉了物品欄。 +@1 died at @2, and bones were placed.=@1在@2死亡,骨骸被放置。 +@1's fresh bones=@1的新鮮骨骸 +@1's bones=@1的骨骸 diff --git a/mods/bones/locale/template.txt b/mods/bones/locale/template.txt new file mode 100644 index 0000000..4ac8d45 --- /dev/null +++ b/mods/bones/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: bones +Bones= +@1's old bones= +@1 died at @2.= +@1 died at @2, and dropped their inventory.= +@1 died at @2, and bones were placed.= +@1's fresh bones= +@1's bones= diff --git a/mods/bones/mod.conf b/mods/bones/mod.conf new file mode 100644 index 0000000..371997b --- /dev/null +++ b/mods/bones/mod.conf @@ -0,0 +1,3 @@ +name = bones +description = Minetest Game mod: bones +depends = default diff --git a/mods/bones/textures/bones_bottom.png b/mods/bones/textures/bones_bottom.png new file mode 100644 index 0000000..859c6bb Binary files /dev/null and b/mods/bones/textures/bones_bottom.png differ diff --git a/mods/bones/textures/bones_front.png b/mods/bones/textures/bones_front.png new file mode 100644 index 0000000..1e52437 Binary files /dev/null and b/mods/bones/textures/bones_front.png differ diff --git a/mods/bones/textures/bones_rear.png b/mods/bones/textures/bones_rear.png new file mode 100644 index 0000000..4cfe236 Binary files /dev/null and b/mods/bones/textures/bones_rear.png differ diff --git a/mods/bones/textures/bones_side.png b/mods/bones/textures/bones_side.png new file mode 100644 index 0000000..a07595f Binary files /dev/null and b/mods/bones/textures/bones_side.png differ diff --git a/mods/bones/textures/bones_top.png b/mods/bones/textures/bones_top.png new file mode 100644 index 0000000..198a8a2 Binary files /dev/null and b/mods/bones/textures/bones_top.png differ diff --git a/mods/bucket/README.txt b/mods/bucket/README.txt new file mode 100644 index 0000000..58997b2 --- /dev/null +++ b/mods/bucket/README.txt @@ -0,0 +1,13 @@ +Minetest Game mod: bucket +========================= +See license.txt for license information. + +Authors of source code +---------------------- +Kahrl (LGPLv2.1+) +celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures) +--------------------------- +ElementW (CC BY-SA 3.0) diff --git a/mods/bucket/init.lua b/mods/bucket/init.lua new file mode 100644 index 0000000..ebdf2e7 --- /dev/null +++ b/mods/bucket/init.lua @@ -0,0 +1,240 @@ +-- Minetest 0.4 mod: bucket +-- See README.txt for licensing and other information. + +-- Load support for MT game translation. +local S = minetest.get_translator("bucket") + + +minetest.register_alias("bucket", "bucket:bucket_empty") +minetest.register_alias("bucket_water", "bucket:bucket_water") +minetest.register_alias("bucket_lava", "bucket:bucket_lava") + +minetest.register_craft({ + output = "bucket:bucket_empty 1", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"", "default:steel_ingot", ""}, + } +}) + +bucket = {} +bucket.liquids = {} + +local function check_protection(pos, name, text) + if minetest.is_protected(pos, name) then + minetest.log("action", (name ~= "" and name or "A mod") + .. " tried to " .. text + .. " at protected position " + .. minetest.pos_to_string(pos) + .. " with a bucket") + minetest.record_protection_violation(pos, name) + return true + end + return false +end + +-- Register a new liquid +-- source = name of the source node +-- flowing = name of the flowing node +-- itemname = name of the new bucket item (or nil if liquid is not takeable) +-- inventory_image = texture of the new bucket item (ignored if itemname == nil) +-- name = text description of the bucket item +-- groups = (optional) groups of the bucket item, for example {water_bucket = 1} +-- force_renew = (optional) bool. Force the liquid source to renew if it has a +-- source neighbour, even if defined as 'liquid_renewable = false'. +-- Needed to avoid creating holes in sloping rivers. +-- This function can be called from any mod (that depends on bucket). +function bucket.register_liquid(source, flowing, itemname, inventory_image, name, + groups, force_renew) + bucket.liquids[source] = { + source = source, + flowing = flowing, + itemname = itemname, + force_renew = force_renew, + } + bucket.liquids[flowing] = bucket.liquids[source] + + if itemname ~= nil then + minetest.register_craftitem(itemname, { + description = name, + inventory_image = inventory_image, + stack_max = 1, + liquids_pointable = true, + groups = groups, + + on_place = function(itemstack, user, pointed_thing) + -- Must be pointing to node + if pointed_thing.type ~= "node" then + return + end + + local node = minetest.get_node_or_nil(pointed_thing.under) + local ndef = node and minetest.registered_nodes[node.name] + + -- Call on_rightclick if the pointed node defines it + if ndef and ndef.on_rightclick and + not (user and user:is_player() and + user:get_player_control().sneak) then + return ndef.on_rightclick( + pointed_thing.under, + node, user, + itemstack) + end + + local lpos + + -- Check if pointing to a buildable node + if ndef and ndef.buildable_to then + -- buildable; replace the node + lpos = pointed_thing.under + else + -- not buildable to; place the liquid above + -- check if the node above can be replaced + + lpos = pointed_thing.above + node = minetest.get_node_or_nil(lpos) + local above_ndef = node and minetest.registered_nodes[node.name] + + if not above_ndef or not above_ndef.buildable_to then + -- do not remove the bucket with the liquid + return itemstack + end + end + + if check_protection(lpos, user + and user:get_player_name() + or "", "place "..source) then + return + end + + minetest.set_node(lpos, {name = source}) + return ItemStack("bucket:bucket_empty") + end + }) + end +end + +minetest.register_craftitem("bucket:bucket_empty", { + description = S("Empty Bucket"), + inventory_image = "bucket.png", + groups = {tool = 1}, + liquids_pointable = true, + on_use = function(itemstack, user, pointed_thing) + if pointed_thing.type == "object" then + pointed_thing.ref:punch(user, 1.0, { full_punch_interval=1.0 }, nil) + return user:get_wielded_item() + elseif pointed_thing.type ~= "node" then + -- do nothing if it's neither object nor node + return + end + -- Check if pointing to a liquid source + local node = minetest.get_node(pointed_thing.under) + local liquiddef = bucket.liquids[node.name] + local item_count = user:get_wielded_item():get_count() + + if liquiddef ~= nil + and liquiddef.itemname ~= nil + and node.name == liquiddef.source then + if check_protection(pointed_thing.under, + user:get_player_name(), + "take ".. node.name) then + return + end + + -- default set to return filled bucket + local giving_back = liquiddef.itemname + + -- check if holding more than 1 empty bucket + if item_count > 1 then + + -- if space in inventory add filled bucked, otherwise drop as item + local inv = user:get_inventory() + if inv:room_for_item("main", {name=liquiddef.itemname}) then + inv:add_item("main", liquiddef.itemname) + else + local pos = user:get_pos() + pos.y = math.floor(pos.y + 0.5) + minetest.add_item(pos, liquiddef.itemname) + end + + -- set to return empty buckets minus 1 + giving_back = "bucket:bucket_empty "..tostring(item_count-1) + + end + + -- force_renew requires a source neighbour + local source_neighbor = false + if liquiddef.force_renew then + source_neighbor = + minetest.find_node_near(pointed_thing.under, 1, liquiddef.source) + end + if not (source_neighbor and liquiddef.force_renew) then + minetest.add_node(pointed_thing.under, {name = "air"}) + end + + return ItemStack(giving_back) + else + -- non-liquid nodes will have their on_punch triggered + local node_def = minetest.registered_nodes[node.name] + if node_def then + node_def.on_punch(pointed_thing.under, node, user, pointed_thing) + end + return user:get_wielded_item() + end + end, +}) + +bucket.register_liquid( + "default:water_source", + "default:water_flowing", + "bucket:bucket_water", + "bucket_water.png", + S("Water Bucket"), + {tool = 1, water_bucket = 1} +) + +-- River water source is 'liquid_renewable = false' to avoid horizontal spread +-- of water sources in sloping rivers that can cause water to overflow +-- riverbanks and cause floods. +-- River water source is instead made renewable by the 'force renew' option +-- used here. + +bucket.register_liquid( + "default:river_water_source", + "default:river_water_flowing", + "bucket:bucket_river_water", + "bucket_river_water.png", + S("River Water Bucket"), + {tool = 1, water_bucket = 1}, + true +) + +bucket.register_liquid( + "default:lava_source", + "default:lava_flowing", + "bucket:bucket_lava", + "bucket_lava.png", + S("Lava Bucket"), + {tool = 1} +) + +minetest.register_craft({ + type = "fuel", + recipe = "bucket:bucket_lava", + burntime = 60, + replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}}, +}) + +-- Register buckets as dungeon loot +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + {name = "bucket:bucket_empty", chance = 0.55}, + -- water in deserts/ice or above ground, lava otherwise + {name = "bucket:bucket_water", chance = 0.45, + types = {"sandstone", "desert", "ice"}}, + {name = "bucket:bucket_water", chance = 0.45, y = {0, 32768}, + types = {"normal"}}, + {name = "bucket:bucket_lava", chance = 0.45, y = {-32768, -1}, + types = {"normal"}}, + }) +end diff --git a/mods/bucket/license.txt b/mods/bucket/license.txt new file mode 100644 index 0000000..a5156ae --- /dev/null +++ b/mods/bucket/license.txt @@ -0,0 +1,51 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011-2016 Kahrl +Copyright (C) 2011-2016 celeron55, Perttu Ahola +Copyright (C) 2011-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2015-2016 ElementW + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/bucket/locale/bucket.de.tr b/mods/bucket/locale/bucket.de.tr new file mode 100644 index 0000000..570dff1 --- /dev/null +++ b/mods/bucket/locale/bucket.de.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Leerer Eimer +Water Bucket=Wassereimer +River Water Bucket=Flusswassereimer +Lava Bucket=Lavaeimer diff --git a/mods/bucket/locale/bucket.es.tr b/mods/bucket/locale/bucket.es.tr new file mode 100644 index 0000000..91a0623 --- /dev/null +++ b/mods/bucket/locale/bucket.es.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Cubo vacío +Water Bucket=Cubo con agua +River Water Bucket=Cubo con agua de río +Lava Bucket=Cubo con lava diff --git a/mods/bucket/locale/bucket.fr.tr b/mods/bucket/locale/bucket.fr.tr new file mode 100644 index 0000000..5065150 --- /dev/null +++ b/mods/bucket/locale/bucket.fr.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Seau vide +Water Bucket=Seau d'eau +River Water Bucket=Seau d'eau de rivière +Lava Bucket=Seau de lave diff --git a/mods/bucket/locale/bucket.id.tr b/mods/bucket/locale/bucket.id.tr new file mode 100644 index 0000000..5662563 --- /dev/null +++ b/mods/bucket/locale/bucket.id.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Ember Kosong +Water Bucket=Ember Air +River Water Bucket=Ember Air Sungai +Lava Bucket=Ember Lava diff --git a/mods/bucket/locale/bucket.it.tr b/mods/bucket/locale/bucket.it.tr new file mode 100644 index 0000000..a9a1335 --- /dev/null +++ b/mods/bucket/locale/bucket.it.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Secchio vuoto +Water Bucket=Secchio d'acqua +River Water Bucket=Secchio d'acqua di fiume +Lava Bucket=Secchio di lava \ No newline at end of file diff --git a/mods/bucket/locale/bucket.ms.tr b/mods/bucket/locale/bucket.ms.tr new file mode 100644 index 0000000..02ba38a --- /dev/null +++ b/mods/bucket/locale/bucket.ms.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Baldi Kosong +Water Bucket=Baldi Air +River Water Bucket=Baldi Air Sungai +Lava Bucket=Baldi Lava diff --git a/mods/bucket/locale/bucket.ru.tr b/mods/bucket/locale/bucket.ru.tr new file mode 100644 index 0000000..8ede280 --- /dev/null +++ b/mods/bucket/locale/bucket.ru.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Пустое Ведро +Water Bucket=Ведро с Водой +River Water Bucket=Ведро с Речной Водой +Lava Bucket=Ведро с Лавой diff --git a/mods/bucket/locale/bucket.se.tr b/mods/bucket/locale/bucket.se.tr new file mode 100644 index 0000000..06e9ea3 --- /dev/null +++ b/mods/bucket/locale/bucket.se.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Tom hink +Water Bucket=Vatten hink +River Water Bucket=Flodvatten hink +Lava Bucket=Lava hink \ No newline at end of file diff --git a/mods/bucket/locale/bucket.sk.tr b/mods/bucket/locale/bucket.sk.tr new file mode 100644 index 0000000..0327b20 --- /dev/null +++ b/mods/bucket/locale/bucket.sk.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Prázdne vedro +Water Bucket=Vedro s vodou +River Water Bucket=Vedro s vodou z rieky +Lava Bucket=Vedro s lávou diff --git a/mods/bucket/locale/bucket.zh_CN.tr b/mods/bucket/locale/bucket.zh_CN.tr new file mode 100644 index 0000000..fda5bfc --- /dev/null +++ b/mods/bucket/locale/bucket.zh_CN.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=空桶 +Water Bucket=水桶 +River Water Bucket=河水桶 +Lava Bucket=岩浆桶 diff --git a/mods/bucket/locale/bucket.zh_TW.tr b/mods/bucket/locale/bucket.zh_TW.tr new file mode 100644 index 0000000..965d657 --- /dev/null +++ b/mods/bucket/locale/bucket.zh_TW.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=空桶 +Water Bucket=水桶 +River Water Bucket=河水桶 +Lava Bucket=岩漿桶 diff --git a/mods/bucket/locale/template.txt b/mods/bucket/locale/template.txt new file mode 100644 index 0000000..a37c103 --- /dev/null +++ b/mods/bucket/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket= +Water Bucket= +River Water Bucket= +Lava Bucket= diff --git a/mods/bucket/mod.conf b/mods/bucket/mod.conf new file mode 100644 index 0000000..fef4687 --- /dev/null +++ b/mods/bucket/mod.conf @@ -0,0 +1,4 @@ +name = bucket +description = Minetest Game mod: bucket +depends = default +optional_depends = dungeon_loot diff --git a/mods/bucket/textures/bucket.png b/mods/bucket/textures/bucket.png new file mode 100644 index 0000000..17b0c49 Binary files /dev/null and b/mods/bucket/textures/bucket.png differ diff --git a/mods/bucket/textures/bucket_lava.png b/mods/bucket/textures/bucket_lava.png new file mode 100644 index 0000000..ac6108d Binary files /dev/null and b/mods/bucket/textures/bucket_lava.png differ diff --git a/mods/bucket/textures/bucket_river_water.png b/mods/bucket/textures/bucket_river_water.png new file mode 100644 index 0000000..d4648bb Binary files /dev/null and b/mods/bucket/textures/bucket_river_water.png differ diff --git a/mods/bucket/textures/bucket_water.png b/mods/bucket/textures/bucket_water.png new file mode 100644 index 0000000..5af836b Binary files /dev/null and b/mods/bucket/textures/bucket_water.png differ diff --git a/mods/butterflies/README.txt b/mods/butterflies/README.txt new file mode 100644 index 0000000..a7f52a0 --- /dev/null +++ b/mods/butterflies/README.txt @@ -0,0 +1,14 @@ +Minetest Game mod: Butterflies +============================== +Adds butterflies to the world on mapgen, which can be caught in a net if the +fireflies mod is also enabled. + +Authors of source code +---------------------- +Shara RedCat (MIT) + +Authors of media (textures) +--------------------------- +Shara RedCat (CC BY-SA 3.0): + butterflies_butterfly_*.png + butterflies_butterfly_*_animated.png \ No newline at end of file diff --git a/mods/butterflies/init.lua b/mods/butterflies/init.lua new file mode 100644 index 0000000..49240ee --- /dev/null +++ b/mods/butterflies/init.lua @@ -0,0 +1,137 @@ +-- butterflies/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("butterflies") + +-- register butterflies +local butter_list = { + {"white", S("White Butterfly")}, + {"red", S("Red Butterfly")}, + {"violet", S("Violet Butterfly")} +} + +for i in ipairs (butter_list) do + local name = butter_list[i][1] + local desc = butter_list[i][2] + + minetest.register_node("butterflies:butterfly_"..name, { + description = desc, + drawtype = "plantlike", + tiles = {{ + name = "butterflies_butterfly_"..name.."_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3 + }, + }}, + inventory_image = "butterflies_butterfly_"..name..".png", + wield_image = "butterflies_butterfly_"..name..".png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "butterflies:butterfly_"..name}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) < 11 then + minetest.set_node(pos, {name = "butterflies:hidden_butterfly_"..name}) + end + minetest.get_node_timer(pos):start(30) + end + }) + + minetest.register_node("butterflies:hidden_butterfly_"..name, { + drawtype = "airlike", + inventory_image = "butterflies_butterfly_"..name..".png^default_invisible_node_overlay.png", + wield_image = "butterflies_butterfly_"..name..".png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "butterflies:hidden_butterfly_"..name}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) >= 11 then + minetest.set_node(pos, {name = "butterflies:butterfly_"..name}) + end + minetest.get_node_timer(pos):start(30) + end + }) +end + +-- register decoration +minetest.register_decoration({ + name = "butterflies:butterfly", + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + place_offset_y = 2, + sidelen = 80, + fill_ratio = 0.005, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = { + "butterflies:butterfly_white", + "butterflies:butterfly_red", + "butterflies:butterfly_violet" + }, + spawn_by = "group:flower", + num_spawn_by = 1 +}) + +-- get decoration ID +local butterflies = minetest.get_decoration_id("butterflies:butterfly") +minetest.set_gen_notify({decoration = true}, {butterflies}) + +-- start nodetimers +minetest.register_on_generated(function(minp, maxp, blockseed) + local gennotify = minetest.get_mapgen_object("gennotify") + local poslist = {} + + for _, pos in ipairs(gennotify["decoration#"..butterflies] or {}) do + local deco_pos = {x = pos.x, y = pos.y + 3, z = pos.z} + table.insert(poslist, deco_pos) + end + + if #poslist ~= 0 then + for i = 1, #poslist do + local pos = poslist[i] + minetest.get_node_timer(pos):start(1) + end + end +end) diff --git a/mods/butterflies/license.txt b/mods/butterflies/license.txt new file mode 100644 index 0000000..eebdad6 --- /dev/null +++ b/mods/butterflies/license.txt @@ -0,0 +1,58 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (c) 2018 Shara RedCat + +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. + +For more details: +https://opensource.org/licenses/MIT + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2018 Shara RedCat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ \ No newline at end of file diff --git a/mods/butterflies/locale/butterflies.de.tr b/mods/butterflies/locale/butterflies.de.tr new file mode 100644 index 0000000..2f1b982 --- /dev/null +++ b/mods/butterflies/locale/butterflies.de.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Weißer Schmetterling +Red Butterfly=Roter Schmetterling +Violet Butterfly=Violetter Schmetterling diff --git a/mods/butterflies/locale/butterflies.es.tr b/mods/butterflies/locale/butterflies.es.tr new file mode 100644 index 0000000..59a28eb --- /dev/null +++ b/mods/butterflies/locale/butterflies.es.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Mariposa blanca +Red Butterfly=Mariposa roja +Violet Butterfly=Mariposa violeta diff --git a/mods/butterflies/locale/butterflies.fr.tr b/mods/butterflies/locale/butterflies.fr.tr new file mode 100644 index 0000000..8f5c094 --- /dev/null +++ b/mods/butterflies/locale/butterflies.fr.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Papillon blanc +Red Butterfly=Papillon rouge +Violet Butterfly=Papillon violet diff --git a/mods/butterflies/locale/butterflies.id.tr b/mods/butterflies/locale/butterflies.id.tr new file mode 100644 index 0000000..d4429a6 --- /dev/null +++ b/mods/butterflies/locale/butterflies.id.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Kupu-Kupu Putih +Red Butterfly=Kupu-Kupu Merah +Violet Butterfly=Kupu-Kupu Ungu diff --git a/mods/butterflies/locale/butterflies.it.tr b/mods/butterflies/locale/butterflies.it.tr new file mode 100644 index 0000000..104ec88 --- /dev/null +++ b/mods/butterflies/locale/butterflies.it.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Farfalla bianca +Red Butterfly=Farfalla rossa +Violet Butterfly=Farfalla viola \ No newline at end of file diff --git a/mods/butterflies/locale/butterflies.ms.tr b/mods/butterflies/locale/butterflies.ms.tr new file mode 100644 index 0000000..b8bde85 --- /dev/null +++ b/mods/butterflies/locale/butterflies.ms.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Rama-Rama Putih +Red Butterfly=Rama-Rama Merah +Violet Butterfly=Rama-Rama Ungu diff --git a/mods/butterflies/locale/butterflies.ru.tr b/mods/butterflies/locale/butterflies.ru.tr new file mode 100644 index 0000000..7a79ed8 --- /dev/null +++ b/mods/butterflies/locale/butterflies.ru.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Белая Бабочка +Red Butterfly=Красная Бабочка +Violet Butterfly=Фиолетовая Бабочка diff --git a/mods/butterflies/locale/butterflies.se.tr b/mods/butterflies/locale/butterflies.se.tr new file mode 100644 index 0000000..08cb94c --- /dev/null +++ b/mods/butterflies/locale/butterflies.se.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Vit fjäril +Red Butterfly=Röd fjäril +Violet Butterfly=Violett fjäril \ No newline at end of file diff --git a/mods/butterflies/locale/butterflies.sk.tr b/mods/butterflies/locale/butterflies.sk.tr new file mode 100644 index 0000000..c3086e7 --- /dev/null +++ b/mods/butterflies/locale/butterflies.sk.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Biely motýlik +Red Butterfly=Červený motýlik +Violet Butterfly=Fialový motýlik diff --git a/mods/butterflies/locale/butterflies.zh_CN.tr b/mods/butterflies/locale/butterflies.zh_CN.tr new file mode 100644 index 0000000..24e0bd1 --- /dev/null +++ b/mods/butterflies/locale/butterflies.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=白蝴蝶 +Red Butterfly=红蝴蝶 +Violet Butterfly=紫蝴蝶 diff --git a/mods/butterflies/locale/butterflies.zh_TW.tr b/mods/butterflies/locale/butterflies.zh_TW.tr new file mode 100644 index 0000000..8d927c1 --- /dev/null +++ b/mods/butterflies/locale/butterflies.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=白蝴蝶 +Red Butterfly=紅蝴蝶 +Violet Butterfly=紫蝴蝶 diff --git a/mods/butterflies/locale/template.txt b/mods/butterflies/locale/template.txt new file mode 100644 index 0000000..d89503a --- /dev/null +++ b/mods/butterflies/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly= +Red Butterfly= +Violet Butterfly= diff --git a/mods/butterflies/mod.conf b/mods/butterflies/mod.conf new file mode 100644 index 0000000..1c66497 --- /dev/null +++ b/mods/butterflies/mod.conf @@ -0,0 +1,3 @@ +name = butterflies +description = Minetest Game mod: Butterflies +depends = default, flowers diff --git a/mods/butterflies/textures/butterflies_butterfly_red.png b/mods/butterflies/textures/butterflies_butterfly_red.png new file mode 100644 index 0000000..8edfc36 Binary files /dev/null and b/mods/butterflies/textures/butterflies_butterfly_red.png differ diff --git a/mods/butterflies/textures/butterflies_butterfly_red_animated.png b/mods/butterflies/textures/butterflies_butterfly_red_animated.png new file mode 100644 index 0000000..4a2097b Binary files /dev/null and b/mods/butterflies/textures/butterflies_butterfly_red_animated.png differ diff --git a/mods/butterflies/textures/butterflies_butterfly_violet.png b/mods/butterflies/textures/butterflies_butterfly_violet.png new file mode 100644 index 0000000..8b8c29d Binary files /dev/null and b/mods/butterflies/textures/butterflies_butterfly_violet.png differ diff --git a/mods/butterflies/textures/butterflies_butterfly_violet_animated.png b/mods/butterflies/textures/butterflies_butterfly_violet_animated.png new file mode 100644 index 0000000..3f9d72e Binary files /dev/null and b/mods/butterflies/textures/butterflies_butterfly_violet_animated.png differ diff --git a/mods/butterflies/textures/butterflies_butterfly_white.png b/mods/butterflies/textures/butterflies_butterfly_white.png new file mode 100644 index 0000000..db4eaec Binary files /dev/null and b/mods/butterflies/textures/butterflies_butterfly_white.png differ diff --git a/mods/butterflies/textures/butterflies_butterfly_white_animated.png b/mods/butterflies/textures/butterflies_butterfly_white_animated.png new file mode 100644 index 0000000..e7cada3 Binary files /dev/null and b/mods/butterflies/textures/butterflies_butterfly_white_animated.png differ diff --git a/mods/carts/README.txt b/mods/carts/README.txt new file mode 100644 index 0000000..c0be2d7 --- /dev/null +++ b/mods/carts/README.txt @@ -0,0 +1,23 @@ +Carts (formerly boost_cart) +========================== + +Carts, based almost entirely on the mod boost_cart [1], which +itself is based on (and fully compatible with) the carts mod [2]. + +The model was originally designed by stujones11 [3] (CC-0). + +Cart textures are based on original work from PixelBOX by Gambit (permissive +license). + + +[1] https://github.com/SmallJoker/boost_cart/ +[2] https://github.com/PilzAdam/carts/ +[3] https://github.com/stujones11/railcart/ + + +Features +---------- +- A fast cart for your railway or roller coaster (up to 7 m/s!) +- Boost and brake rails +- Rail junction switching with the 'right-left' walking keys +- Handbrake with the 'back' key diff --git a/mods/carts/cart_entity.lua b/mods/carts/cart_entity.lua new file mode 100644 index 0000000..4ff87d2 --- /dev/null +++ b/mods/carts/cart_entity.lua @@ -0,0 +1,433 @@ +-- carts/cart_entity.lua + +-- support for MT game translation. +local S = carts.get_translator + +local cart_entity = { + initial_properties = { + physical = false, -- otherwise going uphill breaks + collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + visual = "mesh", + mesh = "carts_cart.b3d", + visual_size = {x=1, y=1}, + textures = {"carts_cart.png"}, + }, + + driver = nil, + punched = false, -- used to re-send velocity and position + velocity = {x=0, y=0, z=0}, -- only used on punch + old_dir = {x=1, y=0, z=0}, -- random value to start the cart on punch + old_pos = nil, + old_switch = 0, + railtype = nil, + attached_items = {} +} + +function cart_entity:on_rightclick(clicker) + if not clicker or not clicker:is_player() then + return + end + local player_name = clicker:get_player_name() + if self.driver and player_name == self.driver then + self.driver = nil + carts:manage_attachment(clicker, nil) + elseif not self.driver then + self.driver = player_name + carts:manage_attachment(clicker, self.object) + + -- player_api does not update the animation + -- when the player is attached, reset to default animation + player_api.set_animation(clicker, "stand") + end +end + +function cart_entity:on_activate(staticdata, dtime_s) + self.object:set_armor_groups({immortal=1}) + if string.sub(staticdata, 1, string.len("return")) ~= "return" then + return + end + local data = minetest.deserialize(staticdata) + if type(data) ~= "table" then + return + end + self.railtype = data.railtype + if data.old_dir then + self.old_dir = data.old_dir + end +end + +function cart_entity:get_staticdata() + return minetest.serialize({ + railtype = self.railtype, + old_dir = self.old_dir + }) +end + +-- 0.5.x and later: When the driver leaves +function cart_entity:on_detach_child(child) + if child and child:get_player_name() == self.driver then + self.driver = nil + carts:manage_attachment(child, nil) + end +end + +function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction) + local pos = self.object:get_pos() + local vel = self.object:get_velocity() + if not self.railtype or vector.equals(vel, {x=0, y=0, z=0}) then + local node = minetest.get_node(pos).name + self.railtype = minetest.get_item_group(node, "connect_to_raillike") + end + -- Punched by non-player + if not puncher or not puncher:is_player() then + local cart_dir = carts:get_rail_direction(pos, self.old_dir, nil, nil, self.railtype) + if vector.equals(cart_dir, {x=0, y=0, z=0}) then + return + end + self.velocity = vector.multiply(cart_dir, 2) + self.punched = true + return + end + -- Player digs cart by sneak-punch + if puncher:get_player_control().sneak then + if self.sound_handle then + minetest.sound_stop(self.sound_handle) + end + -- Detach driver and items + if self.driver then + if self.old_pos then + self.object:set_pos(self.old_pos) + end + local player = minetest.get_player_by_name(self.driver) + carts:manage_attachment(player, nil) + end + for _, obj_ in ipairs(self.attached_items) do + if obj_ then + obj_:set_detach() + end + end + -- Pick up cart + local inv = puncher:get_inventory() + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(puncher:get_player_name())) + or not inv:contains_item("main", "carts:cart") then + local leftover = inv:add_item("main", "carts:cart") + -- If no room in inventory add a replacement cart to the world + if not leftover:is_empty() then + minetest.add_item(self.object:get_pos(), leftover) + end + end + self.object:remove() + return + end + -- Player punches cart to alter velocity + if puncher:get_player_name() == self.driver then + if math.abs(vel.x + vel.z) > carts.punch_speed_max then + return + end + end + + local punch_dir = carts:velocity_to_dir(puncher:get_look_dir()) + punch_dir.y = 0 + local cart_dir = carts:get_rail_direction(pos, punch_dir, nil, nil, self.railtype) + if vector.equals(cart_dir, {x=0, y=0, z=0}) then + return + end + + local punch_interval = 1 + if tool_capabilities and tool_capabilities.full_punch_interval then + punch_interval = tool_capabilities.full_punch_interval + end + time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval) + local f = 2 * (time_from_last_punch / punch_interval) + + self.velocity = vector.multiply(cart_dir, f) + self.old_dir = cart_dir + self.punched = true +end + +local function rail_on_step_event(handler, obj, dtime) + if handler then + handler(obj, dtime) + end +end + +-- sound refresh interval = 1.0sec +local function rail_sound(self, dtime) + if not self.sound_ttl then + self.sound_ttl = 1.0 + return + elseif self.sound_ttl > 0 then + self.sound_ttl = self.sound_ttl - dtime + return + end + self.sound_ttl = 1.0 + if self.sound_handle then + local handle = self.sound_handle + self.sound_handle = nil + minetest.after(0.2, minetest.sound_stop, handle) + end + local vel = self.object:get_velocity() + local speed = vector.length(vel) + if speed > 0 then + self.sound_handle = minetest.sound_play( + "carts_cart_moving", { + object = self.object, + gain = (speed / carts.speed_max) / 2, + loop = true, + }) + end +end + +local function get_railparams(pos) + local node = minetest.get_node(pos) + return carts.railparams[node.name] or {} +end + +local v3_len = vector.length +local function rail_on_step(self, dtime) + local vel = self.object:get_velocity() + if self.punched then + vel = vector.add(vel, self.velocity) + self.object:set_velocity(vel) + self.old_dir.y = 0 + elseif vector.equals(vel, {x=0, y=0, z=0}) then + return + end + + local pos = self.object:get_pos() + local cart_dir = carts:velocity_to_dir(vel) + local same_dir = vector.equals(cart_dir, self.old_dir) + local update = {} + + if self.old_pos and not self.punched and same_dir then + local flo_pos = vector.round(pos) + local flo_old = vector.round(self.old_pos) + if vector.equals(flo_pos, flo_old) then + -- Do not check one node multiple times + return + end + end + + local ctrl, player + + -- Get player controls + if self.driver then + player = minetest.get_player_by_name(self.driver) + if player then + ctrl = player:get_player_control() + end + end + + local stop_wiggle = false + if self.old_pos and same_dir then + -- Detection for "skipping" nodes (perhaps use average dtime?) + -- It's sophisticated enough to take the acceleration in account + local acc = self.object:get_acceleration() + local distance = dtime * (v3_len(vel) + 0.5 * dtime * v3_len(acc)) + + local new_pos, new_dir = carts:pathfinder( + pos, self.old_pos, self.old_dir, distance, ctrl, + self.old_switch, self.railtype + ) + + if new_pos then + -- No rail found: set to the expected position + pos = new_pos + update.pos = true + cart_dir = new_dir + end + elseif self.old_pos and self.old_dir.y ~= 1 and not self.punched then + -- Stop wiggle + stop_wiggle = true + end + + local railparams + + -- dir: New moving direction of the cart + -- switch_keys: Currently pressed L/R key, used to ignore the key on the next rail node + local dir, switch_keys = carts:get_rail_direction( + pos, cart_dir, ctrl, self.old_switch, self.railtype + ) + local dir_changed = not vector.equals(dir, self.old_dir) + + local new_acc = {x=0, y=0, z=0} + if stop_wiggle or vector.equals(dir, {x=0, y=0, z=0}) then + vel = {x = 0, y = 0, z = 0} + local pos_r = vector.round(pos) + if not carts:is_rail(pos_r, self.railtype) + and self.old_pos then + pos = self.old_pos + elseif not stop_wiggle then + pos = pos_r + else + pos.y = math.floor(pos.y + 0.5) + end + update.pos = true + update.vel = true + else + -- Direction change detected + if dir_changed then + vel = vector.multiply(dir, math.abs(vel.x + vel.z)) + update.vel = true + if dir.y ~= self.old_dir.y then + pos = vector.round(pos) + update.pos = true + end + end + -- Center on the rail + if dir.z ~= 0 and math.floor(pos.x + 0.5) ~= pos.x then + pos.x = math.floor(pos.x + 0.5) + update.pos = true + end + if dir.x ~= 0 and math.floor(pos.z + 0.5) ~= pos.z then + pos.z = math.floor(pos.z + 0.5) + update.pos = true + end + + -- Slow down or speed up.. + local acc = dir.y * -4.0 + + -- Get rail for corrected position + railparams = get_railparams(pos) + + -- no need to check for railparams == nil since we always make it exist. + local speed_mod = railparams.acceleration + if speed_mod and speed_mod ~= 0 then + -- Try to make it similar to the original carts mod + acc = acc + speed_mod + else + -- Handbrake or coast + if ctrl and ctrl.down then + acc = acc - 3 + else + acc = acc - 0.4 + end + end + + new_acc = vector.multiply(dir, acc) + end + + -- Limits + local max_vel = carts.speed_max + for _, v in pairs({"x","y","z"}) do + if math.abs(vel[v]) > max_vel then + vel[v] = carts:get_sign(vel[v]) * max_vel + new_acc[v] = 0 + update.vel = true + end + end + + self.object:set_acceleration(new_acc) + self.old_pos = vector.round(pos) + if not vector.equals(dir, {x=0, y=0, z=0}) and not stop_wiggle then + self.old_dir = vector.new(dir) + end + self.old_switch = switch_keys + + if self.punched then + -- Collect dropped items + for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do + local ent = obj_:get_luaentity() + -- Careful here: physical_state and disable_physics are item-internal APIs + if ent and ent.name == "__builtin:item" and ent.physical_state then + ent:disable_physics() + obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0}) + self.attached_items[#self.attached_items + 1] = obj_ + end + end + self.punched = false + update.vel = true + end + + railparams = railparams or get_railparams(pos) + + if not (update.vel or update.pos) then + rail_on_step_event(railparams.on_step, self, dtime) + return + end + + local yaw = 0 + if self.old_dir.x < 0 then + yaw = 0.5 + elseif self.old_dir.x > 0 then + yaw = 1.5 + elseif self.old_dir.z < 0 then + yaw = 1 + end + self.object:set_yaw(yaw * math.pi) + + local anim = {x=0, y=0} + if dir.y == -1 then + anim = {x=1, y=1} + elseif dir.y == 1 then + anim = {x=2, y=2} + end + self.object:set_animation(anim, 1, 0) + + if update.vel then + self.object:set_velocity(vel) + end + if update.pos then + if dir_changed then + self.object:set_pos(pos) + else + self.object:move_to(pos) + end + end + + -- call event handler + rail_on_step_event(railparams.on_step, self, dtime) +end + +function cart_entity:on_step(dtime) + rail_on_step(self, dtime) + rail_sound(self, dtime) +end + +minetest.register_entity("carts:cart", cart_entity) + +minetest.register_craftitem("carts:cart", { + description = S("Cart") .. "\n" .. S("(Sneak+Click to pick up)"), + inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_front.png", "carts_cart_side.png"), + wield_image = "carts_cart_front.png", + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + if not pointed_thing.type == "node" then + return + end + if carts:is_rail(pointed_thing.under) then + minetest.add_entity(pointed_thing.under, "carts:cart") + elseif carts:is_rail(pointed_thing.above) then + minetest.add_entity(pointed_thing.above, "carts:cart") + else + return + end + + minetest.sound_play({name = "default_place_node_metal", gain = 0.5}, + {pos = pointed_thing.above}, true) + + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(placer:get_player_name())) then + itemstack:take_item() + end + return itemstack + end, +}) + +minetest.register_craft({ + output = "carts:cart", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + }, +}) diff --git a/mods/carts/functions.lua b/mods/carts/functions.lua new file mode 100644 index 0000000..a54b594 --- /dev/null +++ b/mods/carts/functions.lua @@ -0,0 +1,248 @@ +function carts:get_sign(z) + if z == 0 then + return 0 + else + return z / math.abs(z) + end +end + +function carts:manage_attachment(player, obj) + if not player then + return + end + local status = obj ~= nil + local player_name = player:get_player_name() + if player_api.player_attached[player_name] == status then + return + end + player_api.player_attached[player_name] = status + + if status then + player:set_attach(obj, "", {x=0, y=-4.5, z=0}, {x=0, y=0, z=0}) + player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0}) + else + player:set_detach() + player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0}) + end +end + +function carts:velocity_to_dir(v) + if math.abs(v.x) > math.abs(v.z) then + return {x=carts:get_sign(v.x), y=carts:get_sign(v.y), z=0} + else + return {x=0, y=carts:get_sign(v.y), z=carts:get_sign(v.z)} + end +end + +function carts:is_rail(pos, railtype) + local node = minetest.get_node(pos).name + if node == "ignore" then + local vm = minetest.get_voxel_manip() + local emin, emax = vm:read_from_map(pos, pos) + local area = VoxelArea:new{ + MinEdge = emin, + MaxEdge = emax, + } + local data = vm:get_data() + local vi = area:indexp(pos) + node = minetest.get_name_from_content_id(data[vi]) + end + if minetest.get_item_group(node, "rail") == 0 then + return false + end + if not railtype then + return true + end + return minetest.get_item_group(node, "connect_to_raillike") == railtype +end + +function carts:check_front_up_down(pos, dir_, check_up, railtype) + local dir = vector.new(dir_) + local cur + + -- Front + dir.y = 0 + cur = vector.add(pos, dir) + if carts:is_rail(cur, railtype) then + return dir + end + -- Up + if check_up then + dir.y = 1 + cur = vector.add(pos, dir) + if carts:is_rail(cur, railtype) then + return dir + end + end + -- Down + dir.y = -1 + cur = vector.add(pos, dir) + if carts:is_rail(cur, railtype) then + return dir + end + return nil +end + +function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype) + local pos = vector.round(pos_) + local cur + local left_check, right_check = true, true + + -- Check left and right + local left = {x=0, y=0, z=0} + local right = {x=0, y=0, z=0} + if dir.z ~= 0 and dir.x == 0 then + left.x = -dir.z + right.x = dir.z + elseif dir.x ~= 0 and dir.z == 0 then + left.z = dir.x + right.z = -dir.x + end + + local straight_priority = ctrl and dir.y ~= 0 + + -- Normal, to disallow rail switching up- & downhill + if straight_priority then + cur = self:check_front_up_down(pos, dir, true, railtype) + if cur then + return cur + end + end + + if ctrl then + if old_switch == 1 then + left_check = false + elseif old_switch == 2 then + right_check = false + end + if ctrl.left and left_check then + cur = self:check_front_up_down(pos, left, false, railtype) + if cur then + return cur, 1 + end + left_check = false + end + if ctrl.right and right_check then + cur = self:check_front_up_down(pos, right, false, railtype) + if cur then + return cur, 2 + end + right_check = true + end + end + + -- Normal + if not straight_priority then + cur = self:check_front_up_down(pos, dir, true, railtype) + if cur then + return cur + end + end + + -- Left, if not already checked + if left_check then + cur = carts:check_front_up_down(pos, left, false, railtype) + if cur then + return cur + end + end + + -- Right, if not already checked + if right_check then + cur = carts:check_front_up_down(pos, right, false, railtype) + if cur then + return cur + end + end + + -- Backwards + if not old_switch then + cur = carts:check_front_up_down(pos, { + x = -dir.x, + y = dir.y, + z = -dir.z + }, true, railtype) + if cur then + return cur + end + end + + return {x=0, y=0, z=0} +end + +function carts:pathfinder(pos_, old_pos, old_dir, distance, ctrl, + pf_switch, railtype) + + local pos = vector.round(pos_) + if vector.equals(old_pos, pos) then + return + end + + local pf_pos = vector.round(old_pos) + local pf_dir = vector.new(old_dir) + distance = math.min(carts.path_distance_max, + math.floor(distance + 1)) + + for i = 1, distance do + pf_dir, pf_switch = self:get_rail_direction( + pf_pos, pf_dir, ctrl, pf_switch or 0, railtype) + + if vector.equals(pf_dir, {x=0, y=0, z=0}) then + -- No way forwards + return pf_pos, pf_dir + end + + pf_pos = vector.add(pf_pos, pf_dir) + + if vector.equals(pf_pos, pos) then + -- Success! Cart moved on correctly + return + end + end + -- Not found. Put cart to predicted position + return pf_pos, pf_dir +end + +function carts:register_rail(name, def_overwrite, railparams) + local def = { + drawtype = "raillike", + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sounds = default.node_sound_metal_defaults() + } + for k, v in pairs(def_overwrite) do + def[k] = v + end + if not def.inventory_image then + def.wield_image = def.tiles[1] + def.inventory_image = def.tiles[1] + end + + if railparams then + carts.railparams[name] = table.copy(railparams) + end + + minetest.register_node(name, def) +end + +function carts:get_rail_groups(additional_groups) + -- Get the default rail groups and add more when a table is given + local groups = { + dig_immediate = 2, + attached_node = 1, + rail = 1, + connect_to_raillike = minetest.raillike_group("rail") + } + if type(additional_groups) == "table" then + for k, v in pairs(additional_groups) do + groups[k] = v + end + end + return groups +end diff --git a/mods/carts/init.lua b/mods/carts/init.lua new file mode 100644 index 0000000..69d59d9 --- /dev/null +++ b/mods/carts/init.lua @@ -0,0 +1,28 @@ +-- carts/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("carts") + +carts = {} +carts.modpath = minetest.get_modpath("carts") +carts.railparams = {} +carts.get_translator = S + +-- Maximal speed of the cart in m/s (min = -1) +carts.speed_max = 7 +-- Set to -1 to disable punching the cart from inside (min = -1) +carts.punch_speed_max = 5 +-- Maximal distance for the path correction (for dtime peaks) +carts.path_distance_max = 3 + + +dofile(carts.modpath.."/functions.lua") +dofile(carts.modpath.."/rails.lua") +dofile(carts.modpath.."/cart_entity.lua") + +-- Register rails as dungeon loot +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + name = "carts:rail", chance = 0.35, count = {1, 6} + }) +end diff --git a/mods/carts/license.txt b/mods/carts/license.txt new file mode 100644 index 0000000..6c5beb4 --- /dev/null +++ b/mods/carts/license.txt @@ -0,0 +1,54 @@ + +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 SmallJoker +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media +----------------- + +CC-0, see: https://creativecommons.org/share-your-work/public-domain/cc0/, except +if other license is mentioned. + + +Authors +--------- +Originally from PixelBOX (Gambit): + carts_cart_side.png + carts_cart_top.png + carts_cart_front.png* + carts_cart.png* + +sofar + stujones11: + carts_cart.b3d and carts_cart.blend + +hexafraction, modified by sofar + carts_rail_*.png + +http://www.freesound.org/people/YleArkisto/sounds/253159/ - YleArkisto - CC-BY-3.0 + carts_cart_moving.*.ogg diff --git a/mods/carts/locale/carts.de.tr b/mods/carts/locale/carts.de.tr new file mode 100644 index 0000000..89a33ac --- /dev/null +++ b/mods/carts/locale/carts.de.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Lore +(Sneak+Click to pick up)=(Schleichen u. Klicken zum Aufheben) +Rail=Schiene +Powered Rail=Antriebsschiene +Brake Rail=Bremsschiene diff --git a/mods/carts/locale/carts.es.tr b/mods/carts/locale/carts.es.tr new file mode 100644 index 0000000..c0857a1 --- /dev/null +++ b/mods/carts/locale/carts.es.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vagoneta +(Sneak+Click to pick up)=(Agacharse+Clic para recoger) +Rail=Raíl +Powered Rail=Raíl energizado +Brake Rail=Raíl de frenado diff --git a/mods/carts/locale/carts.fr.tr b/mods/carts/locale/carts.fr.tr new file mode 100644 index 0000000..b092f14 --- /dev/null +++ b/mods/carts/locale/carts.fr.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Chariot +(Sneak+Click to pick up)=(Se baisser + clic pour ramasser) +Rail=Rail +Powered Rail=Rail de traction +Brake Rail=Rail de freinage diff --git a/mods/carts/locale/carts.id.tr b/mods/carts/locale/carts.id.tr new file mode 100644 index 0000000..17edc80 --- /dev/null +++ b/mods/carts/locale/carts.id.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Rail=Rel +Powered Rail=Rel Bertenaga +Brake Rail=Rel Rem +Cart=Kereta +(Sneak+Click to pick up)=(selinap + klik untuk ambil) diff --git a/mods/carts/locale/carts.it.tr b/mods/carts/locale/carts.it.tr new file mode 100644 index 0000000..546471c --- /dev/null +++ b/mods/carts/locale/carts.it.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vagone +(Sneak+Click to pick up)=(Strisciare+Click per raccoglierlo) +Rail=Binario +Powered Rail=Binario alimentato +Brake Rail=Binario freno \ No newline at end of file diff --git a/mods/carts/locale/carts.ms.tr b/mods/carts/locale/carts.ms.tr new file mode 100644 index 0000000..e8944e9 --- /dev/null +++ b/mods/carts/locale/carts.ms.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Pedati +(Sneak+Click to pick up)=(Selinap+Klik untuk ambil balik) +Rail=Landasan +Powered Rail=Landasan Berkuasa +Brake Rail=Landasan Brek diff --git a/mods/carts/locale/carts.ru.tr b/mods/carts/locale/carts.ru.tr new file mode 100644 index 0000000..6ff5be6 --- /dev/null +++ b/mods/carts/locale/carts.ru.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Вагонетка +(Sneak+Click to pick up)=(Пригнитесь и кликните по вагонетке, чтобы забрать) +Rail=Рельса +Powered Rail=Механизированная Рельса +Brake Rail=Рельса с тормозом diff --git a/mods/carts/locale/carts.se.tr b/mods/carts/locale/carts.se.tr new file mode 100644 index 0000000..e40f8ca --- /dev/null +++ b/mods/carts/locale/carts.se.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vagn +(Sneak+Click to pick up)=(Shift+Klicka för att plocka upp) +Rail=Räls +Powered Rail=Aktiverad räls +Brake Rail=Broms räls \ No newline at end of file diff --git a/mods/carts/locale/carts.sk.tr b/mods/carts/locale/carts.sk.tr new file mode 100644 index 0000000..6303a49 --- /dev/null +++ b/mods/carts/locale/carts.sk.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vozík +(Sneak+Click to pick up)=(Zakrádanie sa + Klik pre zdvihnutie) +Rail=Koľajnica +Powered Rail=Koľajnica s pohonom +Brake Rail=Brzdná koľajnica diff --git a/mods/carts/locale/carts.zh_CN.tr b/mods/carts/locale/carts.zh_CN.tr new file mode 100644 index 0000000..953cdef --- /dev/null +++ b/mods/carts/locale/carts.zh_CN.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=矿车 +(Sneak+Click to pick up)=(潜行+单击以捡起) +Rail=铁轨 +Powered Rail=动力铁轨 +Brake Rail=制动铁轨 diff --git a/mods/carts/locale/carts.zh_TW.tr b/mods/carts/locale/carts.zh_TW.tr new file mode 100644 index 0000000..f6300d4 --- /dev/null +++ b/mods/carts/locale/carts.zh_TW.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=礦車 +(Sneak+Click to pick up)=(潛行+單擊以撿起) +Rail=鐵軌 +Powered Rail=動力鐵軌 +Brake Rail=制動鐵軌 diff --git a/mods/carts/locale/template.txt b/mods/carts/locale/template.txt new file mode 100644 index 0000000..d7fd9f4 --- /dev/null +++ b/mods/carts/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: carts +Rail= +Powered Rail= +Brake Rail= +Cart= +(Sneak+Click to pick up)= diff --git a/mods/carts/mod.conf b/mods/carts/mod.conf new file mode 100644 index 0000000..0eab35c --- /dev/null +++ b/mods/carts/mod.conf @@ -0,0 +1,4 @@ +name = carts +description = Carts (formerly boost_cart) +depends = default, player_api +optional_depends = dungeon_loot diff --git a/mods/carts/models/carts_cart.b3d b/mods/carts/models/carts_cart.b3d new file mode 100644 index 0000000..b8b7c3a Binary files /dev/null and b/mods/carts/models/carts_cart.b3d differ diff --git a/mods/carts/models/carts_cart.blend b/mods/carts/models/carts_cart.blend new file mode 100644 index 0000000..3446fb1 Binary files /dev/null and b/mods/carts/models/carts_cart.blend differ diff --git a/mods/carts/rails.lua b/mods/carts/rails.lua new file mode 100644 index 0000000..8bd2ba1 --- /dev/null +++ b/mods/carts/rails.lua @@ -0,0 +1,64 @@ +-- carts/rails.lua + +-- support for MT game translation. +local S = carts.get_translator + +carts:register_rail("carts:rail", { + description = S("Rail"), + tiles = { + "carts_rail_straight.png", "carts_rail_curved.png", + "carts_rail_t_junction.png", "carts_rail_crossing.png" + }, + inventory_image = "carts_rail_straight.png", + wield_image = "carts_rail_straight.png", + groups = carts:get_rail_groups(), +}, {}) + +minetest.register_craft({ + output = "carts:rail 18", + recipe = { + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + } +}) + +minetest.register_alias("default:rail", "carts:rail") + + +carts:register_rail("carts:powerrail", { + description = S("Powered Rail"), + tiles = { + "carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png", + "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png" + }, + groups = carts:get_rail_groups(), +}, {acceleration = 5}) + +minetest.register_craft({ + output = "carts:powerrail 18", + recipe = { + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + {"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"}, + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + } +}) + + +carts:register_rail("carts:brakerail", { + description = S("Brake Rail"), + tiles = { + "carts_rail_straight_brk.png", "carts_rail_curved_brk.png", + "carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png" + }, + groups = carts:get_rail_groups(), +}, {acceleration = -3}) + +minetest.register_craft({ + output = "carts:brakerail 18", + recipe = { + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + {"default:steel_ingot", "default:coal_lump", "default:steel_ingot"}, + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + } +}) diff --git a/mods/carts/sounds/carts_cart_moving.1.ogg b/mods/carts/sounds/carts_cart_moving.1.ogg new file mode 100644 index 0000000..869e765 Binary files /dev/null and b/mods/carts/sounds/carts_cart_moving.1.ogg differ diff --git a/mods/carts/sounds/carts_cart_moving.2.ogg b/mods/carts/sounds/carts_cart_moving.2.ogg new file mode 100644 index 0000000..b4cc508 Binary files /dev/null and b/mods/carts/sounds/carts_cart_moving.2.ogg differ diff --git a/mods/carts/sounds/carts_cart_moving.3.ogg b/mods/carts/sounds/carts_cart_moving.3.ogg new file mode 100644 index 0000000..e19a782 Binary files /dev/null and b/mods/carts/sounds/carts_cart_moving.3.ogg differ diff --git a/mods/carts/textures/carts_cart.png b/mods/carts/textures/carts_cart.png new file mode 100644 index 0000000..29e21de Binary files /dev/null and b/mods/carts/textures/carts_cart.png differ diff --git a/mods/carts/textures/carts_cart_front.png b/mods/carts/textures/carts_cart_front.png new file mode 100644 index 0000000..38955b2 Binary files /dev/null and b/mods/carts/textures/carts_cart_front.png differ diff --git a/mods/carts/textures/carts_cart_side.png b/mods/carts/textures/carts_cart_side.png new file mode 100644 index 0000000..f53808c Binary files /dev/null and b/mods/carts/textures/carts_cart_side.png differ diff --git a/mods/carts/textures/carts_cart_top.png b/mods/carts/textures/carts_cart_top.png new file mode 100644 index 0000000..d9a31a9 Binary files /dev/null and b/mods/carts/textures/carts_cart_top.png differ diff --git a/mods/carts/textures/carts_rail_crossing.png b/mods/carts/textures/carts_rail_crossing.png new file mode 100644 index 0000000..e10f3b1 Binary files /dev/null and b/mods/carts/textures/carts_rail_crossing.png differ diff --git a/mods/carts/textures/carts_rail_crossing_brk.png b/mods/carts/textures/carts_rail_crossing_brk.png new file mode 100644 index 0000000..14d4e1a Binary files /dev/null and b/mods/carts/textures/carts_rail_crossing_brk.png differ diff --git a/mods/carts/textures/carts_rail_crossing_pwr.png b/mods/carts/textures/carts_rail_crossing_pwr.png new file mode 100644 index 0000000..d763d50 Binary files /dev/null and b/mods/carts/textures/carts_rail_crossing_pwr.png differ diff --git a/mods/carts/textures/carts_rail_curved.png b/mods/carts/textures/carts_rail_curved.png new file mode 100644 index 0000000..b320f0d Binary files /dev/null and b/mods/carts/textures/carts_rail_curved.png differ diff --git a/mods/carts/textures/carts_rail_curved_brk.png b/mods/carts/textures/carts_rail_curved_brk.png new file mode 100644 index 0000000..c5affd8 Binary files /dev/null and b/mods/carts/textures/carts_rail_curved_brk.png differ diff --git a/mods/carts/textures/carts_rail_curved_pwr.png b/mods/carts/textures/carts_rail_curved_pwr.png new file mode 100644 index 0000000..781bbd0 Binary files /dev/null and b/mods/carts/textures/carts_rail_curved_pwr.png differ diff --git a/mods/carts/textures/carts_rail_straight.png b/mods/carts/textures/carts_rail_straight.png new file mode 100644 index 0000000..30dcafe Binary files /dev/null and b/mods/carts/textures/carts_rail_straight.png differ diff --git a/mods/carts/textures/carts_rail_straight_brk.png b/mods/carts/textures/carts_rail_straight_brk.png new file mode 100644 index 0000000..7853ac8 Binary files /dev/null and b/mods/carts/textures/carts_rail_straight_brk.png differ diff --git a/mods/carts/textures/carts_rail_straight_pwr.png b/mods/carts/textures/carts_rail_straight_pwr.png new file mode 100644 index 0000000..e067ff1 Binary files /dev/null and b/mods/carts/textures/carts_rail_straight_pwr.png differ diff --git a/mods/carts/textures/carts_rail_t_junction.png b/mods/carts/textures/carts_rail_t_junction.png new file mode 100644 index 0000000..8b1b946 Binary files /dev/null and b/mods/carts/textures/carts_rail_t_junction.png differ diff --git a/mods/carts/textures/carts_rail_t_junction_brk.png b/mods/carts/textures/carts_rail_t_junction_brk.png new file mode 100644 index 0000000..8e3f620 Binary files /dev/null and b/mods/carts/textures/carts_rail_t_junction_brk.png differ diff --git a/mods/carts/textures/carts_rail_t_junction_pwr.png b/mods/carts/textures/carts_rail_t_junction_pwr.png new file mode 100644 index 0000000..dd0eede Binary files /dev/null and b/mods/carts/textures/carts_rail_t_junction_pwr.png differ diff --git a/mods/creative/README.txt b/mods/creative/README.txt new file mode 100644 index 0000000..32e8d22 --- /dev/null +++ b/mods/creative/README.txt @@ -0,0 +1,17 @@ +Minetest Game mod: creative +=========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (MIT) +Jean-Patrick G. (kilbith) (MIT) + +Author of media (textures) +-------------------------- +paramat (CC BY-SA 3.0): +* creative_prev_icon.png +* creative_next_icon.png +* creative_search_icon.png +* creative_clear_icon.png +* creative_trash_icon.png derived from a texture by kilbith (CC BY-SA 3.0) diff --git a/mods/creative/init.lua b/mods/creative/init.lua new file mode 100644 index 0000000..31af37c --- /dev/null +++ b/mods/creative/init.lua @@ -0,0 +1,101 @@ +-- creative/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("creative") + +creative = {} +creative.get_translator = S + +local function update_sfinv(name) + minetest.after(0, function() + local player = minetest.get_player_by_name(name) + if player then + if sfinv.get_page(player):sub(1, 9) == "creative:" then + sfinv.set_page(player, sfinv.get_homepage_name(player)) + else + sfinv.set_player_inventory_formspec(player) + end + end + end) +end + +minetest.register_privilege("creative", { + description = S("Allow player to use creative inventory"), + give_to_singleplayer = false, + give_to_admin = false, + on_grant = update_sfinv, + on_revoke = update_sfinv, +}) + +-- Override the engine's creative mode function +local old_is_creative_enabled = minetest.is_creative_enabled + +function minetest.is_creative_enabled(name) + if name == "" then + return old_is_creative_enabled(name) + end + return minetest.check_player_privs(name, {creative = true}) or + old_is_creative_enabled(name) +end + +-- For backwards compatibility: +function creative.is_enabled_for(name) + return minetest.is_creative_enabled(name) +end + +dofile(minetest.get_modpath("creative") .. "/inventory.lua") + +if minetest.is_creative_enabled("") then + -- Dig time is modified according to difference (leveldiff) between tool + -- 'maxlevel' and node 'level'. Digtime is divided by the larger of + -- leveldiff and 1. + -- To speed up digging in creative, hand 'maxlevel' and 'digtime' have been + -- increased such that nodes of differing levels have an insignificant + -- effect on digtime. + local digtime = 42 + local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256} + + -- Override the hand tool + minetest.override_item("", { + range = 10, + tool_capabilities = { + full_punch_interval = 0.5, + max_drop_level = 3, + groupcaps = { + crumbly = caps, + cracky = caps, + snappy = caps, + choppy = caps, + oddly_breakable_by_hand = caps, + -- dig_immediate group doesn't use value 1. Value 3 is instant dig + dig_immediate = + {times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256}, + }, + damage_groups = {fleshy = 10}, + } + }) +end + +-- Unlimited node placement +minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) + if placer and placer:is_player() then + return creative.is_enabled_for(placer:get_player_name()) + end +end) + +-- Don't pick up if the item is already in the inventory +local old_handle_node_drops = minetest.handle_node_drops +function minetest.handle_node_drops(pos, drops, digger) + if not digger or not digger:is_player() or + not creative.is_enabled_for(digger:get_player_name()) then + return old_handle_node_drops(pos, drops, digger) + end + local inv = digger:get_inventory() + if inv then + for _, item in ipairs(drops) do + if not inv:contains_item("main", item, true) then + inv:add_item("main", item) + end + end + end +end diff --git a/mods/creative/inventory.lua b/mods/creative/inventory.lua new file mode 100644 index 0000000..e22cfc1 --- /dev/null +++ b/mods/creative/inventory.lua @@ -0,0 +1,256 @@ +-- creative/inventory.lua + +-- support for MT game translation. +local S = creative.get_translator + +local player_inventory = {} +local inventory_cache = {} + +local function init_creative_cache(items) + inventory_cache[items] = {} + local i_cache = inventory_cache[items] + + for name, def in pairs(items) do + if def.groups.not_in_creative_inventory ~= 1 and + def.description and def.description ~= "" then + i_cache[name] = def + end + end + table.sort(i_cache) + return i_cache +end + +function creative.init_creative_inventory(player) + local player_name = player:get_player_name() + player_inventory[player_name] = { + size = 0, + filter = "", + start_i = 0, + old_filter = nil, -- use only for caching in update_creative_inventory + old_content = nil + } + + minetest.create_detached_inventory("creative_" .. player_name, { + allow_move = function(inv, from_list, from_index, to_list, to_index, count, player2) + local name = player2 and player2:get_player_name() or "" + if not creative.is_enabled_for(name) or + to_list == "main" then + return 0 + end + return count + end, + allow_put = function(inv, listname, index, stack, player2) + return 0 + end, + allow_take = function(inv, listname, index, stack, player2) + local name = player2 and player2:get_player_name() or "" + if not creative.is_enabled_for(name) then + return 0 + end + return -1 + end, + on_move = function(inv, from_list, from_index, to_list, to_index, count, player2) + end, + on_take = function(inv, listname, index, stack, player2) + if stack and stack:get_count() > 0 then + minetest.log("action", player_name .. " takes " .. stack:get_name().. " from creative inventory") + end + end, + }, player_name) + + return player_inventory[player_name] +end + +local NO_MATCH = 999 +local function match(s, filter) + if filter == "" then + return 0 + end + if s:lower():find(filter, 1, true) then + return #s - #filter + end + return NO_MATCH +end + +local function description(def, lang_code) + local s = def.description + if lang_code then + s = minetest.get_translated_string(lang_code, s) + end + return s:gsub("\n.*", "") -- First line only +end + +function creative.update_creative_inventory(player_name, tab_content) + local inv = player_inventory[player_name] or + creative.init_creative_inventory(minetest.get_player_by_name(player_name)) + local player_inv = minetest.get_inventory({type = "detached", name = "creative_" .. player_name}) + + if inv.filter == inv.old_filter and tab_content == inv.old_content then + return + end + inv.old_filter = inv.filter + inv.old_content = tab_content + + local items = inventory_cache[tab_content] or init_creative_cache(tab_content) + + local lang + local player_info = minetest.get_player_information(player_name) + if player_info and player_info.lang_code ~= "" then + lang = player_info.lang_code + end + + local creative_list = {} + local order = {} + for name, def in pairs(items) do + local m = match(description(def), inv.filter) + if m > 0 then + m = math.min(m, match(description(def, lang), inv.filter)) + end + if m > 0 then + m = math.min(m, match(name, inv.filter)) + end + + if m < NO_MATCH then + creative_list[#creative_list+1] = name + -- Sort by match value first so closer matches appear earlier + order[name] = string.format("%02d", m) .. name + end + end + + table.sort(creative_list, function(a, b) return order[a] < order[b] end) + + player_inv:set_size("main", #creative_list) + player_inv:set_list("main", creative_list) + inv.size = #creative_list +end + +-- Create the trash field +local trash = minetest.create_detached_inventory("creative_trash", { + -- Allow the stack to be placed and remove it in on_put() + -- This allows the creative inventory to restore the stack + allow_put = function(inv, listname, index, stack, player) + return stack:get_count() + end, + on_put = function(inv, listname) + inv:set_list(listname, {}) + end, +}) +trash:set_size("main", 1) + +creative.formspec_add = "" + +function creative.register_tab(name, title, items) + sfinv.register_page("creative:" .. name, { + title = title, + is_in_nav = function(self, player, context) + return creative.is_enabled_for(player:get_player_name()) + end, + get = function(self, player, context) + local player_name = player:get_player_name() + creative.update_creative_inventory(player_name, items) + local inv = player_inventory[player_name] + local pagenum = math.floor(inv.start_i / (4*8) + 1) + local pagemax = math.ceil(inv.size / (4*8)) + local esc = minetest.formspec_escape + return sfinv.make_formspec(player, context, + "label[5.8,4.15;" .. minetest.colorize("#FFFF00", tostring(pagenum)) .. " / " .. tostring(pagemax) .. "]" .. + [[ + image[4.08,4.2;0.8,0.8;creative_trash_icon.png] + listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] + list[detached:creative_trash;main;4.02,4.1;1,1;] + listring[] + image_button[5,4.05;0.8,0.8;creative_prev_icon.png;creative_prev;] + image_button[7.2,4.05;0.8,0.8;creative_next_icon.png;creative_next;] + image_button[2.63,4.05;0.8,0.8;creative_search_icon.png;creative_search;] + image_button[3.25,4.05;0.8,0.8;creative_clear_icon.png;creative_clear;] + ]] .. + "tooltip[creative_search;" .. esc(S("Search")) .. "]" .. + "tooltip[creative_clear;" .. esc(S("Reset")) .. "]" .. + "tooltip[creative_prev;" .. esc(S("Previous page")) .. "]" .. + "tooltip[creative_next;" .. esc(S("Next page")) .. "]" .. + "listring[current_player;main]" .. + "field_close_on_enter[creative_filter;false]" .. + "field[0.3,4.2;2.8,1.2;creative_filter;;" .. esc(inv.filter) .. "]" .. + "listring[detached:creative_" .. player_name .. ";main]" .. + "list[detached:creative_" .. player_name .. ";main;0,0;8,4;" .. tostring(inv.start_i) .. "]" .. + creative.formspec_add, true) + end, + on_enter = function(self, player, context) + local player_name = player:get_player_name() + local inv = player_inventory[player_name] + if inv then + inv.start_i = 0 + end + end, + on_player_receive_fields = function(self, player, context, fields) + local player_name = player:get_player_name() + local inv = player_inventory[player_name] + assert(inv) + + if fields.creative_clear then + inv.start_i = 0 + inv.filter = "" + sfinv.set_player_inventory_formspec(player, context) + elseif fields.creative_search or + fields.key_enter_field == "creative_filter" then + inv.start_i = 0 + inv.filter = fields.creative_filter:lower() + sfinv.set_player_inventory_formspec(player, context) + elseif not fields.quit then + local start_i = inv.start_i or 0 + + if fields.creative_prev then + start_i = start_i - 4*8 + if start_i < 0 then + start_i = inv.size - (inv.size % (4*8)) + if inv.size == start_i then + start_i = math.max(0, inv.size - (4*8)) + end + end + elseif fields.creative_next then + start_i = start_i + 4*8 + if start_i >= inv.size then + start_i = 0 + end + end + + inv.start_i = start_i + sfinv.set_player_inventory_formspec(player, context) + end + end + }) +end + +-- Sort registered items +local registered_nodes = {} +local registered_tools = {} +local registered_craftitems = {} + +minetest.register_on_mods_loaded(function() + for name, def in pairs(minetest.registered_items) do + local group = def.groups or {} + + local nogroup = not (group.node or group.tool or group.craftitem) + if group.node or (nogroup and minetest.registered_nodes[name]) then + registered_nodes[name] = def + elseif group.tool or (nogroup and minetest.registered_tools[name]) then + registered_tools[name] = def + elseif group.craftitem or (nogroup and minetest.registered_craftitems[name]) then + registered_craftitems[name] = def + end + end +end) + +creative.register_tab("all", S("All"), minetest.registered_items) +creative.register_tab("nodes", S("Nodes"), registered_nodes) +creative.register_tab("tools", S("Tools"), registered_tools) +creative.register_tab("craftitems", S("Items"), registered_craftitems) + +local old_homepage_name = sfinv.get_homepage_name +function sfinv.get_homepage_name(player) + if creative.is_enabled_for(player:get_player_name()) then + return "creative:all" + else + return old_homepage_name(player) + end +end diff --git a/mods/creative/license.txt b/mods/creative/license.txt new file mode 100644 index 0000000..50ff9c7 --- /dev/null +++ b/mods/creative/license.txt @@ -0,0 +1,61 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2015-2016 Jean-Patrick G. (kilbith) + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2016 Jean-Patrick G. (kilbith) +Copyright (C) 2018 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/creative/locale/creative.de.tr b/mods/creative/locale/creative.de.tr new file mode 100644 index 0000000..02b0277 --- /dev/null +++ b/mods/creative/locale/creative.de.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Spieler erlauben, das Kreativinventar zu benutzen +Search=Suchen +Reset=Zurücksetzen +Previous page=Vorherige Seite +Next page=Nächste Seite +All=Alles +Nodes=Blöcke +Tools=Werkzeuge +Items=Gegenstände diff --git a/mods/creative/locale/creative.es.tr b/mods/creative/locale/creative.es.tr new file mode 100644 index 0000000..f4e39a7 --- /dev/null +++ b/mods/creative/locale/creative.es.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Permitir al jugador usar el inventario creativo +Search=Buscar +Reset=Resetear +Previous page=Pág. siguiente +Next page=Pág. anterior +All=Todos +Nodes=Nodos +Tools=Herramientas +Items=Objetos diff --git a/mods/creative/locale/creative.fr.tr b/mods/creative/locale/creative.fr.tr new file mode 100644 index 0000000..695c0a1 --- /dev/null +++ b/mods/creative/locale/creative.fr.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Permettre aux joueurs d'utiliser l'inventaire du mode créatif +Search=Rechercher +Reset=Réinitialiser +Previous page=Page précédente +Next page=Page suivante +All=Tout +Nodes=Nœuds +Tools=Outils +Items=Article diff --git a/mods/creative/locale/creative.id.tr b/mods/creative/locale/creative.id.tr new file mode 100644 index 0000000..eaf3405 --- /dev/null +++ b/mods/creative/locale/creative.id.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Search=Cari +Reset=Atur ulang +Previous page=Halaman sebelumnya +Next page=Halaman selanjutnya +All=Semua +Nodes=Nodus +Tools=Perkakas +Items=Barang +Allow player to use creative inventory=Bolehkan pemain memakai inventaris kreatif diff --git a/mods/creative/locale/creative.it.tr b/mods/creative/locale/creative.it.tr new file mode 100644 index 0000000..1c82189 --- /dev/null +++ b/mods/creative/locale/creative.it.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Permette al giocatore di usare l'inventario creativo +Search=Cerca +Reset=Azzera +Previous page=Pagina precedente +Next page=Pagina successiva +All=Tutto +Nodes=Nodi +Tools=Strumenti +Items=Oggetti \ No newline at end of file diff --git a/mods/creative/locale/creative.ms.tr b/mods/creative/locale/creative.ms.tr new file mode 100644 index 0000000..a2aef80 --- /dev/null +++ b/mods/creative/locale/creative.ms.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Benarkan pemain menggunakan inventori kreatif +Search=Cari +Reset=Set semula +Previous page=Halaman sebelumnya +Next page=Halaman seterusnya +All=Semua +Nodes=Nod +Tools=Alatan +Items=Item diff --git a/mods/creative/locale/creative.ru.tr b/mods/creative/locale/creative.ru.tr new file mode 100644 index 0000000..f649dbc --- /dev/null +++ b/mods/creative/locale/creative.ru.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Разрешить игроку использовать творческий инвентарь +Search=Поиск +Reset=Сброс +Previous page=Предыдущая страница +Next page=Следующая страница +All=Всё +Nodes=Ноды +Tools=Инструменты +Items=Предметы diff --git a/mods/creative/locale/creative.se.tr b/mods/creative/locale/creative.se.tr new file mode 100644 index 0000000..e78bc2c --- /dev/null +++ b/mods/creative/locale/creative.se.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Tilllåt spelare att används kreativa saker +Search=Sök +Reset=Återställ +Previous page=Förra sidan +Next page=Nästa sidan +All=Alla +Nodes=Noder +Tools=Verktyg +Items=Saker \ No newline at end of file diff --git a/mods/creative/locale/creative.sk.tr b/mods/creative/locale/creative.sk.tr new file mode 100644 index 0000000..935c780 --- /dev/null +++ b/mods/creative/locale/creative.sk.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Povolí hráčovi použivať kreatívny inventár +Search=Hľadaj +Reset=Vrátiť späť +Previous page=Predchádzajúca stránka +Next page=Nasledujúca stránka +All=Všetko +Nodes=Kocky +Tools=Nástroje +Items=Veci diff --git a/mods/creative/locale/creative.zh_CN.tr b/mods/creative/locale/creative.zh_CN.tr new file mode 100644 index 0000000..1ca424e --- /dev/null +++ b/mods/creative/locale/creative.zh_CN.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=允许玩家使用创造模式物品栏 +Search=搜索 +Reset=重置 +Previous page=上一页 +Next page=下一页 +All=所有 +Nodes=节点 +Tools=工具 +Items=物品 diff --git a/mods/creative/locale/creative.zh_TW.tr b/mods/creative/locale/creative.zh_TW.tr new file mode 100644 index 0000000..c5746d4 --- /dev/null +++ b/mods/creative/locale/creative.zh_TW.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=允許玩家使用創造模式物品欄 +Search=搜索 +Reset=重置 +Previous page=上一頁 +Next page=下一頁 +All=所有 +Nodes=節點 +Tools=工具 +Items=物品 diff --git a/mods/creative/locale/template.txt b/mods/creative/locale/template.txt new file mode 100644 index 0000000..356102d --- /dev/null +++ b/mods/creative/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: creative +Search= +Reset= +Previous page= +Next page= +All= +Nodes= +Tools= +Items= +Allow player to use creative inventory= diff --git a/mods/creative/mod.conf b/mods/creative/mod.conf new file mode 100644 index 0000000..0b3f745 --- /dev/null +++ b/mods/creative/mod.conf @@ -0,0 +1,3 @@ +name = creative +description = Minetest Game mod: creative +depends = default, sfinv diff --git a/mods/creative/textures/creative_clear_icon.png b/mods/creative/textures/creative_clear_icon.png new file mode 100644 index 0000000..9244264 Binary files /dev/null and b/mods/creative/textures/creative_clear_icon.png differ diff --git a/mods/creative/textures/creative_next_icon.png b/mods/creative/textures/creative_next_icon.png new file mode 100644 index 0000000..82cf3d3 Binary files /dev/null and b/mods/creative/textures/creative_next_icon.png differ diff --git a/mods/creative/textures/creative_prev_icon.png b/mods/creative/textures/creative_prev_icon.png new file mode 100644 index 0000000..b26cd15 Binary files /dev/null and b/mods/creative/textures/creative_prev_icon.png differ diff --git a/mods/creative/textures/creative_search_icon.png b/mods/creative/textures/creative_search_icon.png new file mode 100644 index 0000000..aace804 Binary files /dev/null and b/mods/creative/textures/creative_search_icon.png differ diff --git a/mods/creative/textures/creative_trash_icon.png b/mods/creative/textures/creative_trash_icon.png new file mode 100644 index 0000000..7d7a0a6 Binary files /dev/null and b/mods/creative/textures/creative_trash_icon.png differ diff --git a/mods/default/README.txt b/mods/default/README.txt new file mode 100644 index 0000000..a2eaebd --- /dev/null +++ b/mods/default/README.txt @@ -0,0 +1,410 @@ +Minetest Game mod: default +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +The torch code was derived by sofar from the 'torches' mod by +BlockMen (LGPLv2.1+) + +Authors of media (textures, sounds, models and schematics) +---------------------------------------------------------- +Everything not listed in here: +celeron55, Perttu Ahola (CC BY-SA 3.0) + + +Textures +-------- +Cisoun's texture pack (CC BY-SA 3.0): + default_jungletree.png + default_lava.png + default_leaves.png + default_sapling.png + default_bush_sapling.png + default_stone.png + default_tree.png + default_tree_top.png + default_water.png + +RealBadAngel's animated water (CC BY-SA 3.0): + default_water_source_animated.png + default_water_flowing_animated.png + +VanessaE (CC BY-SA 3.0): + default_torch_animated.png + default_torch_on_ceiling_animated.png + default_torch_on_floor_animated.png + default_torch_on_floor.png + default_desert_sand.png + default_desert_stone.png + default_sand.png + default_mese_crystal.png + default_mese_crystal_fragment.png + +Calinou (CC BY-SA 3.0): + default_brick.png + default_papyrus.png + default_mineral_copper.png + +PilzAdam (CC BY-SA 3.0): + default_jungleleaves.png + default_junglesapling.png + default_obsidian_glass.png + default_obsidian_shard.png + default_mineral_gold.png + +jojoa1997 (CC BY-SA 3.0): + default_obsidian.png + +InfinityProject (CC BY-SA 3.0): + default_mineral_diamond.png + +Splizard (CC BY-SA 3.0): + default_pine_sapling.png + default_pine_needles.png + +Zeg9 (CC BY-SA 3.0): + default_coal_block.png + +paramat (CC BY-SA 3.0): + wieldhand.png -- Copied from character.png by Jordach (CC BY-SA 3.0) + default_pinetree.png + default_pinetree_top.png + default_pinewood.png + default_acacia_leaves.png + default_acacia_leaves_simple.png + default_acacia_sapling.png + default_acacia_bush_sapling.png + default_pine_bush_sapling.png + default_acacia_tree.png + default_acacia_tree_top.png + default_acacia_wood.png + default_acacia_bush_stem.png + default_bush_stem.png + default_pine_bush_stem.png + default_junglewood.png + default_jungletree_top.png + default_sandstone_brick.png + default_obsidian_brick.png + default_stone_brick.png + default_desert_stone_brick.png + default_sandstone_block.png + default_obsidian_block.png + default_stone_block.png + default_desert_stone_block.png + default_river_water.png + default_river_water_source_animated.png + default_river_water_flowing_animated.png + default_dry_grass.png + default_dry_grass_side.png + default_dry_grass_*.png + default_grass_side.png -- Derived from a texture by TumeniNodes (CC-BY-SA 3.0) + default_mese_block.png + default_silver_sand.png + default_mese_post_light_side.png + default_mese_post_light_side_dark.png + default_mese_post_light_top.png + default_silver_sandstone.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0) + default_silver_sandstone_brick.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0) + default_silver_sandstone_block.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0) + default_bookshelf_slot.png -- Derived from a texture by Gambit (CC-BY-SA 3.0) + default_marram_grass_*.png -- Derived from textures by TumeniNodes (CC-BY-SA 3.0) + default_emergent_jungle_sapling.png + default_permafrost.png -- Derived from a texture by Neuromancer (CC BY-SA 3.0) + default_stones.png -- Derived from a texture by sofar (CC0 1.0) + default_stones_side.png -- Derived from a texture by sofar (CC0 1.0) + default_moss.png + default_moss_side.png + default_fence_rail_acacia_wood + default_fence_rail_aspen_wood -- Derived from a texture by sofar (CC BY-SA 3.0) + default_fence_rail_junglewood + default_fence_rail_pine_wood + default_fence_rail_wood -- Derived from a texture by BlockMen (CC BY-SA 3.0) + gui_hotbar.png + gui_hotbar_selected.png + +TumeniNodes (CC BY-SA 3.0): + default_desert_cobble.png -- Derived from a texture by brunob.santos (CC BY-SA 3.0) + default_coniferous_litter.png + default_coniferous_litter_side.png + default_grass.png + default_dry_dirt.png + +BlockMen (CC BY-SA 3.0): + default_aspen_leaves.png -- Derived from Sofar's texture + default_wood.png + default_clay_brick.png + default_iron_ingot.png + default_gold_ingot.png + default_tool_steelsword.png + default_diamond.png + default_tool_*.png + default_lava_source_animated.png + default_lava_flowing_animated.png + default_stick.png + default_chest_front.png + default_chest_lock.png + default_chest_side.png + default_chest_top.png + default_mineral_mese.png + default_meselamp.png + gui_formbg.png + gui_furnace_arrow_bg.png + gui_furnace_arrow_fg.png + gui_hb_bg.png + +sofar (CC BY-SA 3.0): + default_aspen_sapling + default_aspen_tree + default_aspen_tree_top, derived from default_pine_tree_top (by paramat) + default_aspen_wood, derived from default_pine_wood (by paramat) + default_chest_inside + +sofar (CC0 1.0): + default_gravel.png -- Derived from Gambit's PixelBOX texture pack light gravel + +Neuromancer (CC BY-SA 3.0): + default_cobble.png, based on texture by Brane praefect + default_mossycobble.png, based on texture by Brane praefect + default_furnace_*.png + +Gambit (CC BY-SA 3.0): + default_bronze_ingot.png + default_copper_ingot.png + default_copper_lump.png + default_iron_lump.png + default_gold_lump.png + default_clay_lump.png + default_coal.png + default_grass_*.png + default_paper.png + default_diamond_block.png + default_ladder_steel.png + default_sign_wall_wood.png + default_flint.png + default_snow.png + default_snow_side.png + default_snowball.png + default_key.png + default_key_skeleton.png + default_book.png + +asl97 (CC BY-SA 3.0): + default_ice.png + +Pithydon (CC BY-SA 3.0) + default_coral_brown.png + default_coral_orange.png + default_coral_skeleton.png + +Ferk (CC0 1.0): + default_item_smoke.png + +npx (CC BY-SA 3.0): + default_rainforest_litter.png + default_rainforest_litter_side.png + +kaeza (CC-BY-SA 3.0): + default_desert_sandstone.png + default_desert_sandstone_brick.png + default_desert_sandstone_block.png + +kilbith (CC BY-SA 3.0): + default_steel_block.png + default_copper_block.png + default_bronze_block.png + default_gold_block.png + default_tin_block.png + default_mineral_tin.png + default_tin_ingot.png + default_tin_lump.png + +tobyplowy (CC BY-SA 3.0): + default_kelp.png + +CloudyProton (CC BY-SA 3.0): + default_book_written.png, based on default_book.png by Gambit + +Mossmanikin (CC BY-SA 3.0): + default_fern_*.png + +random-geek (CC BY-SA 3.0): + default_blueberries.png + default_blueberry_overlay.png + default_blueberry_bush_leaves.png, derived from default_bush_leaves (by paramat) + default_blueberry_bush_sapling.png + default_dirt.png -- Derived from a texture by Neuromancer (CC BY-SA 3.0) + +Krock (CC0 1.0): + default_glass.png + default_glass_detail.png + +Topywo (CC BY-SA 3.0) + default_coral_cyan.png + default_coral_green.png + default_coral_pink.png + +Extex101 (CC BY-SA 3.0) + default_large_cactus_seedling.png + default_dry_shrub.png -- Derived from the original texture by celeron55 + +An0n3m0us (CC BY-SA 3.0): + heart.png -- Derived from a texture by KevDoy (CC BY-SA 3.0) + bubble.png -- Derived from a texture by BlockMen (CC BY-SA 3.0) + + +Sounds +------ +Glass breaking sounds (CC BY 3.0): + 1: http://www.freesound.org/people/cmusounddesign/sounds/71947/ + 2: http://www.freesound.org/people/Tomlija/sounds/97669/ + 3: http://www.freesound.org/people/lsprice/sounds/88808/ + +Mito551 (sounds) (CC BY-SA 3.0): + default_dig_crumbly.*.ogg + default_dig_dig_immediate.ogg + default_dig_oddly_breakable_by_hand.ogg + default_dug_node.*.ogg + default_grass_footstep.1.ogg + default_grass_footstep.2.ogg + default_grass_footstep.3.ogg + default_gravel_footstep.*.ogg + default_place_node.*.ogg + default_place_node_hard.*.ogg + default_glass_footstep.ogg + default_wood_footstep.1.ogg + default_wood_footstep.2.ogg + default_dirt_footstep.1.ogg + default_dirt_footstep.2.ogg + default_glass_footstep.ogg + +Metal sounds: + default_dig_metal.ogg - yadronoff - CC-BY-3.0 + - https://www.freesound.org/people/yadronoff/sounds/320397/ + default_dug_metal.*.ogg - Iwan Gabovitch - qubodup - CC0 + - http://opengameart.org/users/qubodup + default_metal_footstep.*.ogg - (CC0 1.0) - CC0 1.0 + - https://freesound.org/people/mypantsfelldown/sounds/398937/ + default_place_node_metal.*.ogg - Ogrebane - CC0 + - http://opengameart.org/content/wood-and-metal-sound-effects-volume-2 + +Tool breaking sounds added by sofar: CC-BY-3.0 + default_tool_breaks.* - http://www.freesound.org/people/HerbertBoland/sounds/33206/ + +AGFX (CC BY 3.0): +https://www.freesound.org/people/AGFX/packs/1253/ + default_water_footstep.1.ogg + default_water_footstep.2.ogg + default_water_footstep.3.ogg +(default_water_footstep.4.ogg is silent) + +blukotek (CC0 1.0): +https://www.freesound.org/people/blukotek/sounds/251660/ + default_dig_snappy.ogg + +Chests sounds added by sofar, derived of several files mixed together: + default_chest_open.ogg + default_chest_close.ogg + - http://www.freesound.org/people/Sevin7/sounds/269722/ CC0 + - http://www.freesound.org/people/Percy%20Duke/sounds/23448/ CC-BY-3.0 + - http://www.freesound.org/people/kingsamas/sounds/135576/ CC-BY-3.0 + - http://www.freesound.org/people/bulbastre/sounds/126887/ CC-BY-3.0 + - http://www.freesound.org/people/Yoyodaman234/sounds/183541/ CC0 + +Ryding (CC0 1.0): +http://freesound.org/people/Ryding/sounds/94337/ + default_snow_footstep.*.ogg + +Ferk (CC0 1.0): + default_item_smoke.ogg, based on a sound by http://opengameart.org/users/bart + +sonictechtonic (CC BY 3.0): +https://www.freesound.org/people/sonictechtonic/sounds/241872/ + player_damage.ogg + +Sheyvan (CC0 1.0): +https://freesound.org/people/Sheyvan/sounds/476113/ + default_dig_choppy.*.ogg + +lolamadeus (CC0 1.0): +https://freesound.org/people/lolamadeus/sounds/179341/ + default_gravel_dig.*.ogg + default_gravel_dug.*.ogg + +Benboncan (CC BY 3.0): +https://freesound.org/people/Benboncan/sounds/71823/ + default_dig_cracky.*.ogg + +Erdie (CC BY 3.0): +https://freesound.org/people/Erdie/sounds/41579/ + default_hard_footstep.*.ogg + +worthahep88 (CC0 1.0): +https://freesound.org/people/worthahep88/sounds/319224/ + default_sand_footstep.*.ogg + +dheming (CC BY 3.0): +https://freesound.org/people/dheming/sounds/268023/ + default_ice_dig.*.ogg + +InspectorJ (CC BY 3.0): +https://freesound.org/people/InspectorJ/sounds/416967/ + default_ice_footstep.*.ogg + +Angel_Perez_Grandi (CC BY 3.0): +https://freesound.org/people/Angel_Perez_Grandi/sounds/49190/ + default_ice_dug.ogg + +iankath (CC0 1.0) +https://freesound.org/people/iankath/sounds/173991/ + default_furnace_active.ogg + + +Models +------ +sofar (CC BY-SA 3.0): + chest_open.obj + torch_ceiling.obj + torch_floor.obj + torch_wall.obj + + +Schematics +---------- +paramat (CC BY-SA 3.0): + acacia_bush.mts + acacia_tree.mts + acacia_tree_from_sapling.mts + apple_tree.mts + apple_tree_from_sapling.mts + aspen_tree.mts + aspen_tree_from_sapling.mts + bush.mts + emergent_jungle_tree.mts + emergent_jungle_tree_from_sapling.mts + jungle_tree.mts + jungle_tree_from_sapling.mts + large_cactus.mts + papyrus.mts + pine_tree.mts + pine_tree_from_sapling.mts + snowy_pine_tree_from_sapling.mts + small_pine_tree.mts + small_pine_tree_from_sapling.mts + snowy_small_pine_tree_from_sapling.mts + +Shara RedCat (CC BY-SA 3.0): + acacia_log.mts + apple_log.mts + aspen_log.mts + jungle_log.mts + pine_log.mts + +TumeniNodes (CC BY-SA 3.0): + pine_bush.mts + +random-geek (CC BY-SA 3.0): + blueberry_bush.mts diff --git a/mods/default/aliases.lua b/mods/default/aliases.lua new file mode 100644 index 0000000..6db3fc8 --- /dev/null +++ b/mods/default/aliases.lua @@ -0,0 +1,77 @@ +-- mods/default/aliases.lua + +-- Aliases to support loading worlds using nodes following the old naming convention +-- These can also be helpful when using chat commands, for example /giveme +minetest.register_alias("stone", "default:stone") +minetest.register_alias("stone_with_coal", "default:stone_with_coal") +minetest.register_alias("stone_with_iron", "default:stone_with_iron") +minetest.register_alias("dirt_with_grass", "default:dirt_with_grass") +minetest.register_alias("dirt_with_grass_footsteps", "default:dirt_with_grass_footsteps") +minetest.register_alias("dirt", "default:dirt") +minetest.register_alias("sand", "default:sand") +minetest.register_alias("gravel", "default:gravel") +minetest.register_alias("sandstone", "default:sandstone") +minetest.register_alias("clay", "default:clay") +minetest.register_alias("brick", "default:brick") +minetest.register_alias("tree", "default:tree") +minetest.register_alias("jungletree", "default:jungletree") +minetest.register_alias("junglegrass", "default:junglegrass") +minetest.register_alias("leaves", "default:leaves") +minetest.register_alias("cactus", "default:cactus") +minetest.register_alias("papyrus", "default:papyrus") +minetest.register_alias("bookshelf", "default:bookshelf") +minetest.register_alias("glass", "default:glass") +minetest.register_alias("wooden_fence", "default:fence_wood") +minetest.register_alias("rail", "carts:rail") +minetest.register_alias("ladder", "default:ladder_wood") +minetest.register_alias("wood", "default:wood") +minetest.register_alias("mese", "default:mese") +minetest.register_alias("cloud", "default:cloud") +minetest.register_alias("water_flowing", "default:water_flowing") +minetest.register_alias("water_source", "default:water_source") +minetest.register_alias("lava_flowing", "default:lava_flowing") +minetest.register_alias("lava_source", "default:lava_source") +minetest.register_alias("torch", "default:torch") +minetest.register_alias("sign_wall", "default:sign_wall_wood") +minetest.register_alias("furnace", "default:furnace") +minetest.register_alias("chest", "default:chest") +minetest.register_alias("locked_chest", "default:chest_locked") +minetest.register_alias("cobble", "default:cobble") +minetest.register_alias("mossycobble", "default:mossycobble") +minetest.register_alias("steelblock", "default:steelblock") +minetest.register_alias("sapling", "default:sapling") +minetest.register_alias("apple", "default:apple") + +minetest.register_alias("WPick", "default:pick_wood") +minetest.register_alias("STPick", "default:pick_stone") +minetest.register_alias("SteelPick", "default:pick_steel") +minetest.register_alias("MesePick", "default:pick_mese") +minetest.register_alias("WShovel", "default:shovel_wood") +minetest.register_alias("STShovel", "default:shovel_stone") +minetest.register_alias("SteelShovel", "default:shovel_steel") +minetest.register_alias("WAxe", "default:axe_wood") +minetest.register_alias("STAxe", "default:axe_stone") +minetest.register_alias("SteelAxe", "default:axe_steel") +minetest.register_alias("WSword", "default:sword_wood") +minetest.register_alias("STSword", "default:sword_stone") +minetest.register_alias("SteelSword", "default:sword_steel") + +minetest.register_alias("Stick", "default:stick") +minetest.register_alias("paper", "default:paper") +minetest.register_alias("book", "default:book") +minetest.register_alias("lump_of_coal", "default:coal_lump") +minetest.register_alias("lump_of_iron", "default:iron_lump") +minetest.register_alias("lump_of_clay", "default:clay_lump") +minetest.register_alias("steel_ingot", "default:steel_ingot") +minetest.register_alias("clay_brick", "default:clay_brick") +minetest.register_alias("snow", "default:snow") + +-- 'mese_block' was used for a while for the block form of mese +minetest.register_alias("default:mese_block", "default:mese") + +-- Aliases for corrected pine node names +minetest.register_alias("default:pinetree", "default:pine_tree") +minetest.register_alias("default:pinewood", "default:pine_wood") + +minetest.register_alias("default:ladder", "default:ladder_wood") +minetest.register_alias("default:sign_wall", "default:sign_wall_wood") diff --git a/mods/default/chests.lua b/mods/default/chests.lua new file mode 100644 index 0000000..f4462ae --- /dev/null +++ b/mods/default/chests.lua @@ -0,0 +1,360 @@ +default.chest = {} + +-- support for MT game translation. +local S = default.get_translator + +function default.chest.get_chest_formspec(pos) + local spos = pos.x .. "," .. pos.y .. "," .. pos.z + local formspec = + "size[8,9]" .. + "list[nodemeta:" .. spos .. ";main;0,0.3;8,4;]" .. + "list[current_player;main;0,4.85;8,1;]" .. + "list[current_player;main;0,6.08;8,3;8]" .. + "listring[nodemeta:" .. spos .. ";main]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,4.85) + return formspec +end + +function default.chest.chest_lid_obstructed(pos) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + local def = minetest.registered_nodes[minetest.get_node(above).name] + -- allow ladders, signs, wallmounted things and torches to not obstruct + if def and + (def.drawtype == "airlike" or + def.drawtype == "signlike" or + def.drawtype == "torchlike" or + (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then + return false + end + return true +end + +function default.chest.chest_lid_close(pn) + local chest_open_info = default.chest.open_chests[pn] + local pos = chest_open_info.pos + local sound = chest_open_info.sound + local swap = chest_open_info.swap + + default.chest.open_chests[pn] = nil + for k, v in pairs(default.chest.open_chests) do + if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then + return true + end + end + + local node = minetest.get_node(pos) + minetest.after(0.2, minetest.swap_node, pos, { name = swap, + param2 = node.param2 }) + minetest.sound_play(sound, {gain = 0.3, pos = pos, + max_hear_distance = 10}, true) +end + +default.chest.open_chests = {} + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "default:chest" then + return + end + if not player or not fields.quit then + return + end + local pn = player:get_player_name() + + if not default.chest.open_chests[pn] then + return + end + + default.chest.chest_lid_close(pn) + return true +end) + +minetest.register_on_leaveplayer(function(player) + local pn = player:get_player_name() + if default.chest.open_chests[pn] then + default.chest.chest_lid_close(pn) + end +end) + +function default.chest.register_chest(prefixed_name, d) + local name = prefixed_name:sub(1,1) == ':' and prefixed_name:sub(2,-1) or prefixed_name + local def = table.copy(d) + def.drawtype = "mesh" + def.visual = "mesh" + def.paramtype = "light" + def.paramtype2 = "facedir" + def.legacy_facedir_simple = true + def.is_ground_content = false + + if def.protected then + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("Locked Chest")) + meta:set_string("owner", "") + local inv = meta:get_inventory() + inv:set_size("main", 8*4) + end + def.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", S("Locked Chest (owned by @1)", meta:get_string("owner"))) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") and + default.can_interact_with_node(player, pos) + end + def.allow_metadata_inventory_move = function(pos, from_list, from_index, + to_list, to_index, count, player) + if not default.can_interact_with_node(player, pos) then + return 0 + end + return count + end + def.allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if not default.can_interact_with_node(player, pos) then + return 0 + end + return stack:get_count() + end + def.allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if not default.can_interact_with_node(player, pos) then + return 0 + end + return stack:get_count() + end + def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + if not default.can_interact_with_node(clicker, pos) then + return itemstack + end + + minetest.sound_play(def.sound_open, {gain = 0.3, + pos = pos, max_hear_distance = 10}, true) + if not default.chest.chest_lid_obstructed(pos) then + minetest.swap_node(pos, + { name = name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "default:chest", default.chest.get_chest_formspec(pos)) + default.chest.open_chests[clicker:get_player_name()] = { pos = pos, + sound = def.sound_close, swap = name } + end + def.on_blast = function() end + def.on_key_use = function(pos, player) + local secret = minetest.get_meta(pos):get_string("key_lock_secret") + local itemstack = player:get_wielded_item() + local key_meta = itemstack:get_meta() + + if itemstack:get_metadata() == "" then + return + end + + if key_meta:get_string("secret") == "" then + key_meta:set_string("secret", minetest.parse_json(itemstack:get_metadata()).secret) + itemstack:set_metadata("") + end + + if secret ~= key_meta:get_string("secret") then + return + end + + minetest.show_formspec( + player:get_player_name(), + "default:chest_locked", + default.chest.get_chest_formspec(pos) + ) + end + def.on_skeleton_key_use = function(pos, player, newsecret) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + local pn = player:get_player_name() + + -- verify placer is owner of lockable chest + if owner ~= pn then + minetest.record_protection_violation(pos, pn) + minetest.chat_send_player(pn, S("You do not own this chest.")) + return nil + end + + local secret = meta:get_string("key_lock_secret") + if secret == "" then + secret = newsecret + meta:set_string("key_lock_secret", secret) + end + + return secret, S("a locked chest"), owner + end + else + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("Chest")) + local inv = meta:get_inventory() + inv:set_size("main", 8*4) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end + def.on_rightclick = function(pos, node, clicker) + minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos, + max_hear_distance = 10}, true) + if not default.chest.chest_lid_obstructed(pos) then + minetest.swap_node(pos, { + name = name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "default:chest", default.chest.get_chest_formspec(pos)) + default.chest.open_chests[clicker:get_player_name()] = { pos = pos, + sound = def.sound_close, swap = name } + end + def.on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "main", drops) + drops[#drops+1] = name + minetest.remove_node(pos) + return drops + end + end + + def.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 chest at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves " .. stack:get_name() .. + " to chest at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes " .. stack:get_name() .. + " from chest at " .. minetest.pos_to_string(pos)) + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_opened.mesh = "chest_open.obj" + for i = 1, #def_opened.tiles do + if type(def_opened.tiles[i]) == "string" then + def_opened.tiles[i] = {name = def_opened.tiles[i], backface_culling = true} + elseif def_opened.tiles[i].backface_culling == nil then + def_opened.tiles[i].backface_culling = true + end + end + def_opened.drop = name + def_opened.groups.not_in_creative_inventory = 1 + def_opened.selection_box = { + type = "fixed", + fixed = { -1/2, -1/2, -1/2, 1/2, 3/16, 1/2 }, + } + def_opened.can_dig = function() + return false + end + def_opened.on_blast = function() end + + def_closed.mesh = nil + def_closed.drawtype = nil + def_closed.tiles[6] = def.tiles[5] -- swap textures around for "normal" + def_closed.tiles[5] = def.tiles[3] -- drawtype to make them match the mesh + def_closed.tiles[3] = def.tiles[3].."^[transformFX" + + minetest.register_node(prefixed_name, def_closed) + minetest.register_node(prefixed_name .. "_open", def_opened) + + -- convert old chests to this new variant + if name == "default:chest" or name == "default:chest_locked" then + minetest.register_lbm({ + label = "update chests to opening chests", + name = "default:upgrade_" .. name:sub(9,-1) .. "_v2", + nodenames = {name}, + action = function(pos, node) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", nil) + local inv = meta:get_inventory() + local list = inv:get_list("default:chest") + if list then + inv:set_size("main", 8*4) + inv:set_list("main", list) + inv:set_list("default:chest", nil) + end + end + }) + end +end + +default.chest.register_chest("default:chest", { + description = S("Chest"), + tiles = { + "default_chest_top.png", + "default_chest_top.png", + "default_chest_side.png", + "default_chest_side.png", + "default_chest_front.png", + "default_chest_inside.png" + }, + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, +}) + +default.chest.register_chest("default:chest_locked", { + description = S("Locked Chest"), + tiles = { + "default_chest_top.png", + "default_chest_top.png", + "default_chest_side.png", + "default_chest_side.png", + "default_chest_lock.png", + "default_chest_inside.png" + }, + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, + protected = true, +}) + +minetest.register_craft({ + output = "default:chest", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_craft({ + output = "default:chest_locked", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "default:steel_ingot", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_craft( { + type = "shapeless", + output = "default:chest_locked", + recipe = {"default:chest", "default:steel_ingot"}, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:chest", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:chest_locked", + burntime = 30, +}) diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua new file mode 100644 index 0000000..ecbe9d1 --- /dev/null +++ b/mods/default/crafting.lua @@ -0,0 +1,737 @@ +-- mods/default/crafting.lua + +minetest.register_craft({ + output = "default:wood 4", + recipe = { + {"default:tree"}, + } +}) + +minetest.register_craft({ + output = "default:junglewood 4", + recipe = { + {"default:jungletree"}, + } +}) + +minetest.register_craft({ + output = "default:pine_wood 4", + recipe = { + {"default:pine_tree"}, + } +}) + +minetest.register_craft({ + output = "default:acacia_wood 4", + recipe = { + {"default:acacia_tree"}, + } +}) + +minetest.register_craft({ + output = "default:aspen_wood 4", + recipe = { + {"default:aspen_tree"}, + } +}) + +minetest.register_craft({ + output = "default:wood", + recipe = { + {"default:bush_stem"}, + } +}) + +minetest.register_craft({ + output = "default:acacia_wood", + recipe = { + {"default:acacia_bush_stem"}, + } +}) + +minetest.register_craft({ + output = "default:pine_wood", + recipe = { + {"default:pine_bush_stem"}, + } +}) + +minetest.register_craft({ + output = "default:sign_wall_steel 3", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"", "group:stick", ""}, + } +}) + +minetest.register_craft({ + output = "default:sign_wall_wood 3", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + {"", "group:stick", ""}, + } +}) + +minetest.register_craft({ + output = "default:coalblock", + recipe = { + {"default:coal_lump", "default:coal_lump", "default:coal_lump"}, + {"default:coal_lump", "default:coal_lump", "default:coal_lump"}, + {"default:coal_lump", "default:coal_lump", "default:coal_lump"}, + } +}) + +minetest.register_craft({ + output = "default:steelblock", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:copperblock", + recipe = { + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:tinblock", + recipe = { + {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"}, + {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"}, + {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:bronzeblock", + recipe = { + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:bronze_ingot 9", + recipe = { + {"default:bronzeblock"}, + } +}) + +minetest.register_craft({ + output = "default:goldblock", + recipe = { + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:diamondblock", + recipe = { + {"default:diamond", "default:diamond", "default:diamond"}, + {"default:diamond", "default:diamond", "default:diamond"}, + {"default:diamond", "default:diamond", "default:diamond"}, + } +}) + +minetest.register_craft({ + output = "default:sandstone", + recipe = { + {"default:sand", "default:sand"}, + {"default:sand", "default:sand"}, + } +}) + +minetest.register_craft({ + output = "default:sand 4", + recipe = { + {"default:sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:sandstonebrick 4", + recipe = { + {"default:sandstone", "default:sandstone"}, + {"default:sandstone", "default:sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:sandstone_block 9", + recipe = { + {"default:sandstone", "default:sandstone", "default:sandstone"}, + {"default:sandstone", "default:sandstone", "default:sandstone"}, + {"default:sandstone", "default:sandstone", "default:sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sandstone", + recipe = { + {"default:desert_sand", "default:desert_sand"}, + {"default:desert_sand", "default:desert_sand"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sand 4", + recipe = { + {"default:desert_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sandstone_brick 4", + recipe = { + {"default:desert_sandstone", "default:desert_sandstone"}, + {"default:desert_sandstone", "default:desert_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sandstone_block 9", + recipe = { + {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"}, + {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"}, + {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sandstone", + recipe = { + {"default:silver_sand", "default:silver_sand"}, + {"default:silver_sand", "default:silver_sand"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sand 4", + recipe = { + {"default:silver_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sandstone_brick 4", + recipe = { + {"default:silver_sandstone", "default:silver_sandstone"}, + {"default:silver_sandstone", "default:silver_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sandstone_block 9", + recipe = { + {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"}, + {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"}, + {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:clay", + recipe = { + {"default:clay_lump", "default:clay_lump"}, + {"default:clay_lump", "default:clay_lump"}, + } +}) + +minetest.register_craft({ + output = "default:brick", + recipe = { + {"default:clay_brick", "default:clay_brick"}, + {"default:clay_brick", "default:clay_brick"}, + } +}) + +minetest.register_craft({ + output = "default:bookshelf", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"default:book", "default:book", "default:book"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_craft({ + output = "default:ladder_wood 5", + recipe = { + {"group:stick", "", "group:stick"}, + {"group:stick", "group:stick", "group:stick"}, + {"group:stick", "", "group:stick"}, + } +}) + +minetest.register_craft({ + output = "default:ladder_steel 15", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:mese", + recipe = { + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}, + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}, + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}, + } +}) + +minetest.register_craft({ + output = "default:meselamp", + recipe = { + {"default:glass"}, + {"default:mese_crystal"}, + } +}) + +minetest.register_craft({ + output = "default:obsidian", + recipe = { + {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"}, + {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"}, + {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"}, + } +}) + +minetest.register_craft({ + output = "default:obsidianbrick 4", + recipe = { + {"default:obsidian", "default:obsidian"}, + {"default:obsidian", "default:obsidian"} + } +}) + +minetest.register_craft({ + output = "default:obsidian_block 9", + recipe = { + {"default:obsidian", "default:obsidian", "default:obsidian"}, + {"default:obsidian", "default:obsidian", "default:obsidian"}, + {"default:obsidian", "default:obsidian", "default:obsidian"}, + } +}) + +minetest.register_craft({ + output = "default:stonebrick 4", + recipe = { + {"default:stone", "default:stone"}, + {"default:stone", "default:stone"}, + } +}) + +minetest.register_craft({ + output = "default:stone_block 9", + recipe = { + {"default:stone", "default:stone", "default:stone"}, + {"default:stone", "default:stone", "default:stone"}, + {"default:stone", "default:stone", "default:stone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_stonebrick 4", + recipe = { + {"default:desert_stone", "default:desert_stone"}, + {"default:desert_stone", "default:desert_stone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_stone_block 9", + recipe = { + {"default:desert_stone", "default:desert_stone", "default:desert_stone"}, + {"default:desert_stone", "default:desert_stone", "default:desert_stone"}, + {"default:desert_stone", "default:desert_stone", "default:desert_stone"}, + } +}) + +minetest.register_craft({ + output = "default:snowblock", + recipe = { + {"default:snow", "default:snow", "default:snow"}, + {"default:snow", "default:snow", "default:snow"}, + {"default:snow", "default:snow", "default:snow"}, + } +}) + +minetest.register_craft({ + output = "default:snow 9", + recipe = { + {"default:snowblock"}, + } +}) + +minetest.register_craft({ + output = "default:emergent_jungle_sapling", + recipe = { + {"default:junglesapling", "default:junglesapling", "default:junglesapling"}, + {"default:junglesapling", "default:junglesapling", "default:junglesapling"}, + {"default:junglesapling", "default:junglesapling", "default:junglesapling"}, + } +}) + +minetest.register_craft({ + output = "default:large_cactus_seedling", + recipe = { + {"", "default:cactus", ""}, + {"default:cactus", "default:cactus", "default:cactus"}, + {"", "default:cactus", ""}, + } +}) + + +-- +-- Crafting (tool repair) +-- + +minetest.register_craft({ + type = "toolrepair", + additional_wear = -0.02, +}) + + +-- +-- Cooking recipes +-- + +minetest.register_craft({ + type = "cooking", + output = "default:glass", + recipe = "group:sand", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:obsidian_glass", + recipe = "default:obsidian_shard", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:stone", + recipe = "default:cobble", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:stone", + recipe = "default:mossycobble", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:desert_stone", + recipe = "default:desert_cobble", +}) + + +-- +-- Fuels +-- + +-- Support use of group:tree, includes default:tree which has the same burn time +minetest.register_craft({ + type = "fuel", + recipe = "group:tree", + burntime = 30, +}) + +-- Burn time for all woods are in order of wood density, +-- which is also the order of wood colour darkness: +-- aspen, pine, apple, acacia, jungle + +minetest.register_craft({ + type = "fuel", + recipe = "default:aspen_tree", + burntime = 22, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_tree", + burntime = 26, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_tree", + burntime = 34, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:jungletree", + burntime = 38, +}) + + +-- Support use of group:wood, includes default:wood which has the same burn time +minetest.register_craft({ + type = "fuel", + recipe = "group:wood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:aspen_wood", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_wood", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:junglewood", + burntime = 9, +}) + + +-- Support use of group:sapling, includes default:sapling which has the same burn time +minetest.register_craft({ + type = "fuel", + recipe = "group:sapling", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:bush_sapling", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_bush_sapling", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_bush_sapling", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:aspen_sapling", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_sapling", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_sapling", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:junglesapling", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:emergent_jungle_sapling", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_aspen_wood", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_pine_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_wood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_acacia_wood", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_junglewood", + burntime = 9, +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_aspen_wood", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_pine_wood", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_wood", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_acacia_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_junglewood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:bush_stem", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_bush_stem", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_bush_stem", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:junglegrass", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "group:leaves", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:cactus", + burntime = 15, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:large_cactus_seedling", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:papyrus", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:bookshelf", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:ladder_wood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:lava_source", + burntime = 60, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:sign_wall_wood", + burntime = 10, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:coalblock", + burntime = 370, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:grass_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:dry_grass_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fern_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:marram_grass_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:dry_shrub", + burntime = 2, +}) diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua new file mode 100644 index 0000000..923d754 --- /dev/null +++ b/mods/default/craftitems.lua @@ -0,0 +1,538 @@ +-- mods/default/craftitems.lua + +-- support for MT game translation. +local S = default.get_translator + +local lpp = 14 -- Lines per book's page +local function book_on_use(itemstack, user) + local player_name = user:get_player_name() + local meta = itemstack:get_meta() + local title, text, owner = "", "", player_name + local page, page_max, lines, string = 1, 1, {}, "" + + -- Backwards compatibility + local old_data = minetest.deserialize(itemstack:get_metadata()) + if old_data then + meta:from_table({ fields = old_data }) + end + + local data = meta:to_table().fields + + if data.owner then + title = data.title + text = data.text + owner = data.owner + + for str in (text .. "\n"):gmatch("([^\n]*)[\n]") do + lines[#lines+1] = str + end + + if data.page then + page = data.page + page_max = data.page_max + + for i = ((lpp * page) - lpp) + 1, lpp * page do + if not lines[i] then break end + string = string .. lines[i] .. "\n" + end + end + end + + local formspec + local esc = minetest.formspec_escape + if owner == player_name then + formspec = "size[8,8]" .. + "field[0.5,1;7.5,0;title;" .. esc(S("Title:")) .. ";" .. + esc(title) .. "]" .. + "textarea[0.5,1.5;7.5,7;text;" .. esc(S("Contents:")) .. ";" .. + esc(text) .. "]" .. + "button_exit[2.5,7.5;3,1;save;" .. esc(S("Save")) .. "]" + else + formspec = "size[8,8]" .. + "label[0.5,0.5;" .. esc(S("by @1", owner)) .. "]" .. + "tablecolumns[color;text]" .. + "tableoptions[background=#00000000;highlight=#00000000;border=false]" .. + "table[0.4,0;7,0.5;title;#FFFF00," .. esc(title) .. "]" .. + "textarea[0.5,1.5;7.5,7;;" .. + minetest.formspec_escape(string ~= "" and string or text) .. ";]" .. + "button[2.4,7.6;0.8,0.8;book_prev;<]" .. + "label[3.2,7.7;" .. esc(S("Page @1 of @2", page, page_max)) .. "]" .. + "button[4.9,7.6;0.8,0.8;book_next;>]" + end + + minetest.show_formspec(player_name, "default:book", formspec) + return itemstack +end + +local max_text_size = 10000 +local max_title_size = 80 +local short_title_size = 35 +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "default:book" then return end + local inv = player:get_inventory() + local stack = player:get_wielded_item() + + if fields.save and fields.title and fields.text + and fields.title ~= "" and fields.text ~= "" then + local new_stack, data + if stack:get_name() ~= "default:book_written" then + local count = stack:get_count() + if count == 1 then + stack:set_name("default:book_written") + else + stack:set_count(count - 1) + new_stack = ItemStack("default:book_written") + end + else + data = stack:get_meta():to_table().fields + end + + if data and data.owner and data.owner ~= player:get_player_name() then + return + end + + if not data then data = {} end + data.title = fields.title:sub(1, max_title_size) + data.owner = player:get_player_name() + local short_title = data.title + -- Don't bother triming the title if the trailing dots would make it longer + if #short_title > short_title_size + 3 then + short_title = short_title:sub(1, short_title_size) .. "..." + end + data.description = S("\"@1\" by @2", short_title, data.owner) + data.text = fields.text:sub(1, max_text_size) + data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n") + data.page = 1 + data.page_max = math.ceil((#data.text:gsub("[^\n]", "") + 1) / lpp) + + if new_stack then + new_stack:get_meta():from_table({ fields = data }) + if inv:room_for_item("main", new_stack) then + inv:add_item("main", new_stack) + else + minetest.add_item(player:get_pos(), new_stack) + end + else + stack:get_meta():from_table({ fields = data }) + end + + elseif fields.book_next or fields.book_prev then + local data = stack:get_meta():to_table().fields + if not data or not data.page then + return + end + + data.page = tonumber(data.page) + data.page_max = tonumber(data.page_max) + + if fields.book_next then + data.page = data.page + 1 + if data.page > data.page_max then + data.page = 1 + end + else + data.page = data.page - 1 + if data.page == 0 then + data.page = data.page_max + end + end + + stack:get_meta():from_table({fields = data}) + stack = book_on_use(stack, player) + end + + -- Update stack + player:set_wielded_item(stack) +end) + +minetest.register_craftitem("default:skeleton_key", { + description = S("Skeleton Key"), + inventory_image = "default_key_skeleton.png", + on_use = function(itemstack, user, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + local pos = pointed_thing.under + local node = minetest.get_node(pos) + + if not node then + return itemstack + end + + local on_skeleton_key_use = minetest.registered_nodes[node.name].on_skeleton_key_use + if not on_skeleton_key_use then + return itemstack + end + + -- make a new key secret in case the node callback needs it + local random = math.random + local newsecret = string.format( + "%04x%04x%04x%04x", + random(2^16) - 1, random(2^16) - 1, + random(2^16) - 1, random(2^16) - 1) + + local secret, _, _ = on_skeleton_key_use(pos, user, newsecret) + + if secret then + local inv = minetest.get_inventory({type="player", name=user:get_player_name()}) + + -- update original itemstack + itemstack:take_item() + + -- finish and return the new key + local new_stack = ItemStack("default:key") + local meta = new_stack:get_meta() + meta:set_string("secret", secret) + meta:set_string("description", S("Key to @1's @2", user:get_player_name(), + minetest.registered_nodes[node.name].description)) + + if itemstack:get_count() == 0 then + itemstack = new_stack + else + if inv:add_item("main", new_stack):get_count() > 0 then + minetest.add_item(user:get_pos(), new_stack) + end -- else: added to inventory successfully + end + + return itemstack + end + end +}) + +-- +-- Craftitem registry +-- + +minetest.register_craftitem("default:blueberries", { + description = S("Blueberries"), + inventory_image = "default_blueberries.png", + groups = {food_blueberries = 1, food_berry = 1}, + on_use = minetest.item_eat(2), +}) + +minetest.register_craftitem("default:book", { + description = S("Book"), + inventory_image = "default_book.png", + groups = {book = 1, flammable = 3}, + on_use = book_on_use, +}) + +minetest.register_craftitem("default:book_written", { + description = S("Book with Text"), + inventory_image = "default_book_written.png", + groups = {book = 1, not_in_creative_inventory = 1, flammable = 3}, + stack_max = 1, + on_use = book_on_use, +}) + +minetest.register_craftitem("default:bronze_ingot", { + description = S("Bronze Ingot"), + inventory_image = "default_bronze_ingot.png" +}) + +minetest.register_craftitem("default:clay_brick", { + description = S("Clay Brick"), + inventory_image = "default_clay_brick.png", +}) + +minetest.register_craftitem("default:clay_lump", { + description = S("Clay Lump"), + inventory_image = "default_clay_lump.png", +}) + +minetest.register_craftitem("default:coal_lump", { + description = S("Coal Lump"), + inventory_image = "default_coal_lump.png", + groups = {coal = 1, flammable = 1} +}) + +minetest.register_craftitem("default:copper_ingot", { + description = S("Copper Ingot"), + inventory_image = "default_copper_ingot.png" +}) + +minetest.register_craftitem("default:copper_lump", { + description = S("Copper Lump"), + inventory_image = "default_copper_lump.png" +}) + +minetest.register_craftitem("default:diamond", { + description = S("Diamond"), + inventory_image = "default_diamond.png", +}) + +minetest.register_craftitem("default:flint", { + description = S("Flint"), + inventory_image = "default_flint.png" +}) + +minetest.register_craftitem("default:gold_ingot", { + description = S("Gold Ingot"), + inventory_image = "default_gold_ingot.png" +}) + +minetest.register_craftitem("default:gold_lump", { + description = S("Gold Lump"), + inventory_image = "default_gold_lump.png" +}) + +minetest.register_craftitem("default:iron_lump", { + description = S("Iron Lump"), + inventory_image = "default_iron_lump.png" +}) + +minetest.register_craftitem("default:mese_crystal", { + description = S("Mese Crystal"), + inventory_image = "default_mese_crystal.png", +}) + +minetest.register_craftitem("default:mese_crystal_fragment", { + description = S("Mese Crystal Fragment"), + inventory_image = "default_mese_crystal_fragment.png", +}) + +minetest.register_craftitem("default:obsidian_shard", { + description = S("Obsidian Shard"), + inventory_image = "default_obsidian_shard.png", +}) + +minetest.register_craftitem("default:paper", { + description = S("Paper"), + inventory_image = "default_paper.png", + groups = {flammable = 3}, +}) + +minetest.register_craftitem("default:steel_ingot", { + description = S("Steel Ingot"), + inventory_image = "default_steel_ingot.png" +}) + +minetest.register_craftitem("default:stick", { + description = S("Stick"), + inventory_image = "default_stick.png", + groups = {stick = 1, flammable = 2}, +}) + +minetest.register_craftitem("default:tin_ingot", { + description = S("Tin Ingot"), + inventory_image = "default_tin_ingot.png" +}) + +minetest.register_craftitem("default:tin_lump", { + description = S("Tin Lump"), + inventory_image = "default_tin_lump.png" +}) + +-- +-- Crafting recipes +-- + +minetest.register_craft({ + output = "default:book", + recipe = { + {"default:paper"}, + {"default:paper"}, + {"default:paper"}, + } +}) + +default.register_craft_metadata_copy("default:book", "default:book_written") + +minetest.register_craft({ + output = "default:bronze_ingot 9", + recipe = { + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:clay_brick 4", + recipe = { + {"default:brick"}, + } +}) + +minetest.register_craft({ + output = "default:clay_lump 4", + recipe = { + {"default:clay"}, + } +}) + +minetest.register_craft({ + output = "default:coal_lump 9", + recipe = { + {"default:coalblock"}, + } +}) + +minetest.register_craft({ + output = "default:copper_ingot 9", + recipe = { + {"default:copperblock"}, + } +}) + +minetest.register_craft({ + output = "default:diamond 9", + recipe = { + {"default:diamondblock"}, + } +}) + +minetest.register_craft({ + output = "default:gold_ingot 9", + recipe = { + {"default:goldblock"}, + } +}) + +minetest.register_craft({ + output = "default:mese_crystal", + recipe = { + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + } +}) + +minetest.register_craft({ + output = "default:mese_crystal 9", + recipe = { + {"default:mese"}, + } +}) + +minetest.register_craft({ + output = "default:mese_crystal_fragment 9", + recipe = { + {"default:mese_crystal"}, + } +}) + +minetest.register_craft({ + output = "default:obsidian_shard 9", + recipe = { + {"default:obsidian"} + } +}) + +minetest.register_craft({ + output = "default:paper", + recipe = { + {"default:papyrus", "default:papyrus", "default:papyrus"}, + } +}) + +minetest.register_craft({ + output = "default:skeleton_key", + recipe = { + {"default:gold_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:steel_ingot 9", + recipe = { + {"default:steelblock"}, + } +}) + +minetest.register_craft({ + output = "default:stick 4", + recipe = { + {"group:wood"}, + } +}) + +minetest.register_craft({ + output = "default:tin_ingot 9", + recipe = { + {"default:tinblock"}, + } +}) + +-- +-- Cooking recipes +-- + +minetest.register_craft({ + type = "cooking", + output = "default:clay_brick", + recipe = "default:clay_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:copper_ingot", + recipe = "default:copper_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:gold_ingot", + recipe = "default:gold_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:gold_ingot", + recipe = "default:key", + cooktime = 5, +}) + +minetest.register_craft({ + type = "cooking", + output = "default:gold_ingot", + recipe = "default:skeleton_key", + cooktime = 5, +}) + +minetest.register_craft({ + type = "cooking", + output = "default:steel_ingot", + recipe = "default:iron_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:tin_ingot", + recipe = "default:tin_lump", +}) + +-- +-- Fuels +-- + +minetest.register_craft({ + type = "fuel", + recipe = "default:book", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:book_written", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:coal_lump", + burntime = 40, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:paper", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "group:stick", + burntime = 1, +}) diff --git a/mods/default/functions.lua b/mods/default/functions.lua new file mode 100644 index 0000000..41a943b --- /dev/null +++ b/mods/default/functions.lua @@ -0,0 +1,754 @@ +-- +-- Sounds +-- + +function default.node_sound_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "", gain = 1.0} + table.dug = table.dug or + {name = "default_dug_node", gain = 0.25} + table.place = table.place or + {name = "default_place_node_hard", gain = 1.0} + return table +end + +function default.node_sound_stone_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_hard_footstep", gain = 0.3} + table.dug = table.dug or + {name = "default_hard_footstep", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_dirt_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_dirt_footstep", gain = 0.4} + table.dug = table.dug or + {name = "default_dirt_footstep", gain = 1.0} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_sand_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_sand_footstep", gain = 0.05} + table.dug = table.dug or + {name = "default_sand_footstep", gain = 0.15} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_gravel_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_gravel_footstep", gain = 0.1} + table.dig = table.dig or + {name = "default_gravel_dig", gain = 0.35} + table.dug = table.dug or + {name = "default_gravel_dug", gain = 1.0} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_wood_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_wood_footstep", gain = 0.3} + table.dug = table.dug or + {name = "default_wood_footstep", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_leaves_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_grass_footstep", gain = 0.45} + table.dug = table.dug or + {name = "default_grass_footstep", gain = 0.7} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_glass_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_glass_footstep", gain = 0.3} + table.dig = table.dig or + {name = "default_glass_footstep", gain = 0.5} + table.dug = table.dug or + {name = "default_break_glass", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_ice_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_ice_footstep", gain = 0.3} + table.dig = table.dig or + {name = "default_ice_dig", gain = 0.5} + table.dug = table.dug or + {name = "default_ice_dug", gain = 0.5} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_metal_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_metal_footstep", gain = 0.4} + table.dig = table.dig or + {name = "default_dig_metal", gain = 0.5} + table.dug = table.dug or + {name = "default_dug_metal", gain = 0.5} + table.place = table.place or + {name = "default_place_node_metal", gain = 0.5} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_water_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_water_footstep", gain = 0.2} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_snow_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_snow_footstep", gain = 0.2} + table.dig = table.dig or + {name = "default_snow_footstep", gain = 0.3} + table.dug = table.dug or + {name = "default_snow_footstep", gain = 0.3} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + + +-- +-- Lavacooling +-- + +default.cool_lava = function(pos, node) + if node.name == "default:lava_source" then + minetest.set_node(pos, {name = "default:obsidian"}) + else -- Lava flowing + minetest.set_node(pos, {name = "default:stone"}) + end + minetest.sound_play("default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.25}, true) +end + +if minetest.settings:get_bool("enable_lavacooling") ~= false then + minetest.register_abm({ + label = "Lava cooling", + nodenames = {"default:lava_source", "default:lava_flowing"}, + neighbors = {"group:cools_lava", "group:water"}, + interval = 2, + chance = 2, + catch_up = false, + action = function(...) + default.cool_lava(...) + end, + }) +end + + +-- +-- Optimized helper to put all items in an inventory into a drops list +-- + +function default.get_inventory_drops(pos, inventory, drops) + local inv = minetest.get_meta(pos):get_inventory() + local n = #drops + for i = 1, inv:get_size(inventory) do + local stack = inv:get_stack(inventory, i) + if stack:get_count() > 0 then + drops[n+1] = stack:to_table() + n = n + 1 + end + end +end + + +-- +-- Papyrus and cactus growing +-- + +-- Wrapping the functions in ABM action is necessary to make overriding them possible + +function default.grow_cactus(pos, node) + if node.param2 >= 4 then + return + end + pos.y = pos.y - 1 + if minetest.get_item_group(minetest.get_node(pos).name, "sand") == 0 then + return + end + pos.y = pos.y + 1 + local height = 0 + while node.name == "default:cactus" and height < 4 do + height = height + 1 + pos.y = pos.y + 1 + node = minetest.get_node(pos) + end + if height == 4 or node.name ~= "air" then + return + end + if minetest.get_node_light(pos) < 13 then + return + end + minetest.set_node(pos, {name = "default:cactus"}) + return true +end + +function default.grow_papyrus(pos, node) + pos.y = pos.y - 1 + local name = minetest.get_node(pos).name + if name ~= "default:dirt" and + name ~= "default:dirt_with_grass" and + name ~= "default:dirt_with_dry_grass" and + name ~= "default:dirt_with_rainforest_litter" and + name ~= "default:dry_dirt" and + name ~= "default:dry_dirt_with_dry_grass" then + return + end + if not minetest.find_node_near(pos, 3, {"group:water"}) then + return + end + pos.y = pos.y + 1 + local height = 0 + while node.name == "default:papyrus" and height < 4 do + height = height + 1 + pos.y = pos.y + 1 + node = minetest.get_node(pos) + end + if height == 4 or node.name ~= "air" then + return + end + if minetest.get_node_light(pos) < 13 then + return + end + minetest.set_node(pos, {name = "default:papyrus"}) + return true +end + +minetest.register_abm({ + label = "Grow cactus", + nodenames = {"default:cactus"}, + neighbors = {"group:sand"}, + interval = 12, + chance = 83, + action = function(...) + default.grow_cactus(...) + end +}) + +minetest.register_abm({ + label = "Grow papyrus", + nodenames = {"default:papyrus"}, + -- Grows on the dirt and surface dirt nodes of the biomes papyrus appears in, + -- including the old savanna nodes. + -- 'default:dirt_with_grass' is here only because it was allowed before. + neighbors = { + "default:dirt", + "default:dirt_with_grass", + "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", + "default:dry_dirt", + "default:dry_dirt_with_dry_grass", + }, + interval = 14, + chance = 71, + action = function(...) + default.grow_papyrus(...) + end +}) + + +-- +-- Dig upwards +-- + +function default.dig_up(pos, node, digger) + if digger == nil then return end + local np = {x = pos.x, y = pos.y + 1, z = pos.z} + local nn = minetest.get_node(np) + if nn.name == node.name then + minetest.node_dig(np, nn, digger) + end +end + + +-- +-- Fence registration helper +-- +local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0 + +function default.register_fence(name, def) + minetest.register_craft({ + output = name .. " 4", + recipe = { + { def.material, 'group:stick', def.material }, + { def.material, 'group:stick', def.material }, + } + }) + + local fence_texture = "default_fence_overlay.png^" .. def.texture .. + "^default_fence_overlay.png^[makealpha:255,126,126" + -- Allow almost everything to be overridden + local default_fields = { + paramtype = "light", + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}, + -- connect_top = + -- connect_bottom = + connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/8 }, + {-1/16, -5/16, -1/2, 1/16, -3/16, -1/8 }}, + connect_left = {{-1/2, 3/16, -1/16, -1/8, 5/16, 1/16}, + {-1/2, -5/16, -1/16, -1/8, -3/16, 1/16}}, + connect_back = {{-1/16, 3/16, 1/8, 1/16, 5/16, 1/2 }, + {-1/16, -5/16, 1/8, 1/16, -3/16, 1/2 }}, + connect_right = {{ 1/8, 3/16, -1/16, 1/2, 5/16, 1/16}, + { 1/8, -5/16, -1/16, 1/2, -3/16, 1/16}} + }, + collision_box = { + type = "connected", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8}, + -- connect_top = + -- connect_bottom = + connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8}, + connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8}, + connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2}, + connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8} + }, + connects_to = {"group:fence", "group:wood", "group:tree", "group:wall"}, + inventory_image = fence_texture, + wield_image = fence_texture, + tiles = {def.texture}, + sunlight_propagates = true, + is_ground_content = false, + groups = {}, + } + for k, v in pairs(default_fields) do + if def[k] == nil then + def[k] = v + end + end + + -- Always add to the fence group, even if no group provided + def.groups.fence = 1 + + def.texture = nil + def.material = nil + + minetest.register_node(name, def) +end + + +-- +-- Fence rail registration helper +-- + +function default.register_fence_rail(name, def) + minetest.register_craft({ + output = name .. " 16", + recipe = { + { def.material, def.material }, + { "", ""}, + { def.material, def.material }, + } + }) + + local fence_rail_texture = "default_fence_rail_overlay.png^" .. def.texture .. + "^default_fence_rail_overlay.png^[makealpha:255,126,126" + -- Allow almost everything to be overridden + local default_fields = { + paramtype = "light", + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {{-1/16, 3/16, -1/16, 1/16, 5/16, 1/16}, + {-1/16, -3/16, -1/16, 1/16, -5/16, 1/16}}, + -- connect_top = + -- connect_bottom = + connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/16}, + {-1/16, -5/16, -1/2, 1/16, -3/16, -1/16}}, + connect_left = {{-1/2, 3/16, -1/16, -1/16, 5/16, 1/16}, + {-1/2, -5/16, -1/16, -1/16, -3/16, 1/16}}, + connect_back = {{-1/16, 3/16, 1/16, 1/16, 5/16, 1/2 }, + {-1/16, -5/16, 1/16, 1/16, -3/16, 1/2 }}, + connect_right = {{ 1/16, 3/16, -1/16, 1/2, 5/16, 1/16}, + { 1/16, -5/16, -1/16, 1/2, -3/16, 1/16}} + }, + collision_box = { + type = "connected", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8}, + -- connect_top = + -- connect_bottom = + connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8}, + connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8}, + connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2}, + connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8} + }, + connects_to = {"group:fence", "group:wall"}, + inventory_image = fence_rail_texture, + wield_image = fence_rail_texture, + tiles = {def.texture}, + sunlight_propagates = true, + is_ground_content = false, + groups = {}, + } + for k, v in pairs(default_fields) do + if def[k] == nil then + def[k] = v + end + end + + -- Always add to the fence group, even if no group provided + def.groups.fence = 1 + + def.texture = nil + def.material = nil + + minetest.register_node(name, def) +end + +-- +-- Mese post registration helper +-- + +function default.register_mesepost(name, def) + minetest.register_craft({ + output = name .. " 4", + recipe = { + {'', 'default:glass', ''}, + {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'}, + {'', def.material, ''}, + } + }) + + local post_texture = def.texture .. "^default_mese_post_light_side.png^[makealpha:0,0,0" + local post_texture_dark = def.texture .. "^default_mese_post_light_side_dark.png^[makealpha:0,0,0" + -- Allow almost everything to be overridden + local default_fields = { + wield_image = post_texture, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16}, + }, + }, + paramtype = "light", + tiles = {def.texture, def.texture, post_texture_dark, post_texture_dark, post_texture, post_texture}, + light_source = default.LIGHT_MAX, + sunlight_propagates = true, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + for k, v in pairs(default_fields) do + if def[k] == nil then + def[k] = v + end + end + + def.texture = nil + def.material = nil + + minetest.register_node(name, def) +end + +-- +-- Leafdecay +-- + +-- Prevent decay of placed leaves + +default.after_place_leaves = function(pos, placer, itemstack, pointed_thing) + if placer and placer:is_player() then + local node = minetest.get_node(pos) + node.param2 = 1 + minetest.set_node(pos, node) + end +end + +-- Leafdecay +local function leafdecay_after_destruct(pos, oldnode, def) + for _, v in pairs(minetest.find_nodes_in_area(vector.subtract(pos, def.radius), + vector.add(pos, def.radius), def.leaves)) do + local node = minetest.get_node(v) + local timer = minetest.get_node_timer(v) + if node.param2 ~= 1 and not timer:is_started() then + timer:start(math.random(20, 120) / 10) + end + end +end + +local movement_gravity = tonumber( + minetest.settings:get("movement_gravity")) or 9.81 + +local function leafdecay_on_timer(pos, def) + if minetest.find_node_near(pos, def.radius, def.trunks) then + return false + end + + local node = minetest.get_node(pos) + local drops = minetest.get_node_drops(node.name) + for _, item in ipairs(drops) do + local is_leaf + for _, v in pairs(def.leaves) do + if v == item then + is_leaf = true + end + end + if minetest.get_item_group(item, "leafdecay_drop") ~= 0 or + not is_leaf then + minetest.add_item({ + x = pos.x - 0.5 + math.random(), + y = pos.y - 0.5 + math.random(), + z = pos.z - 0.5 + math.random(), + }, item) + end + end + + minetest.remove_node(pos) + minetest.check_for_falling(pos) + + -- spawn a few particles for the removed node + minetest.add_particlespawner({ + amount = 8, + time = 0.001, + minpos = vector.subtract(pos, {x=0.5, y=0.5, z=0.5}), + maxpos = vector.add(pos, {x=0.5, y=0.5, z=0.5}), + minvel = vector.new(-0.5, -1, -0.5), + maxvel = vector.new(0.5, 0, 0.5), + minacc = vector.new(0, -movement_gravity, 0), + maxacc = vector.new(0, -movement_gravity, 0), + minsize = 0, + maxsize = 0, + node = node, + }) +end + +function default.register_leafdecay(def) + assert(def.leaves) + assert(def.trunks) + assert(def.radius) + for _, v in pairs(def.trunks) do + minetest.override_item(v, { + after_destruct = function(pos, oldnode) + leafdecay_after_destruct(pos, oldnode, def) + end, + }) + end + for _, v in pairs(def.leaves) do + minetest.override_item(v, { + on_timer = function(pos) + leafdecay_on_timer(pos, def) + end, + }) + end +end + + +-- +-- Convert default:dirt to something that fits the environment +-- + +minetest.register_abm({ + label = "Grass spread", + nodenames = {"default:dirt"}, + neighbors = { + "air", + "group:grass", + "group:dry_grass", + "default:snow", + }, + interval = 6, + chance = 50, + catch_up = false, + action = function(pos, node) + -- Check for darkness: night, shadow or under a light-blocking node + -- Returns if ignore above + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + if (minetest.get_node_light(above) or 0) < 13 then + return + end + + -- Look for spreading dirt-type neighbours + local p2 = minetest.find_node_near(pos, 1, "group:spreading_dirt_type") + if p2 then + local n3 = minetest.get_node(p2) + minetest.set_node(pos, {name = n3.name}) + return + end + + -- Else, any seeding nodes on top? + local name = minetest.get_node(above).name + -- Snow check is cheapest, so comes first + if name == "default:snow" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + elseif minetest.get_item_group(name, "grass") ~= 0 then + minetest.set_node(pos, {name = "default:dirt_with_grass"}) + elseif minetest.get_item_group(name, "dry_grass") ~= 0 then + minetest.set_node(pos, {name = "default:dirt_with_dry_grass"}) + end + end +}) + + +-- +-- Grass and dry grass removed in darkness +-- + +minetest.register_abm({ + label = "Grass covered", + nodenames = {"group:spreading_dirt_type", "default:dry_dirt_with_dry_grass"}, + interval = 8, + chance = 50, + catch_up = false, + action = function(pos, node) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + local name = minetest.get_node(above).name + local nodedef = minetest.registered_nodes[name] + if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or + nodedef.paramtype == "light") and + nodedef.liquidtype == "none") then + if node.name == "default:dry_dirt_with_dry_grass" then + minetest.set_node(pos, {name = "default:dry_dirt"}) + else + minetest.set_node(pos, {name = "default:dirt"}) + end + end + end +}) + + +-- +-- Moss growth on cobble near water +-- + +local moss_correspondences = { + ["default:cobble"] = "default:mossycobble", + ["stairs:slab_cobble"] = "stairs:slab_mossycobble", + ["stairs:stair_cobble"] = "stairs:stair_mossycobble", + ["stairs:stair_inner_cobble"] = "stairs:stair_inner_mossycobble", + ["stairs:stair_outer_cobble"] = "stairs:stair_outer_mossycobble", + ["walls:cobble"] = "walls:mossycobble", +} +minetest.register_abm({ + label = "Moss growth", + nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble", + "stairs:stair_inner_cobble", "stairs:stair_outer_cobble", + "walls:cobble"}, + neighbors = {"group:water"}, + interval = 16, + chance = 200, + catch_up = false, + action = function(pos, node) + node.name = moss_correspondences[node.name] + if node.name then + minetest.set_node(pos, node) + end + end +}) + +-- +-- Register a craft to copy the metadata of items +-- + +function default.register_craft_metadata_copy(ingredient, result) + minetest.register_craft({ + type = "shapeless", + output = result, + recipe = {ingredient, result} + }) + + minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv) + if itemstack:get_name() ~= result then + return + end + + local original + local index + for i = 1, #old_craft_grid do + if old_craft_grid[i]:get_name() == result then + original = old_craft_grid[i] + index = i + end + end + if not original then + return + end + local copymeta = original:get_meta():to_table() + itemstack:get_meta():from_table(copymeta) + -- put the book with metadata back in the craft grid + craft_inv:set_stack("craft", index, original) + end) +end + + +-- +-- NOTICE: This method is not an official part of the API yet. +-- This method may change in future. +-- + +function default.can_interact_with_node(player, pos) + if player and player:is_player() then + if minetest.check_player_privs(player, "protection_bypass") then + return true + end + else + return false + end + + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + + if not owner or owner == "" or owner == player:get_player_name() then + return true + end + + -- Is player wielding the right key? + local item = player:get_wielded_item() + if minetest.get_item_group(item:get_name(), "key") == 1 then + local key_meta = item:get_meta() + + if key_meta:get_string("secret") == "" then + local key_oldmeta = item:get_metadata() + if key_oldmeta == "" or not minetest.parse_json(key_oldmeta) then + return false + end + + key_meta:set_string("secret", minetest.parse_json(key_oldmeta).secret) + item:set_metadata("") + end + + return meta:get_string("key_lock_secret") == key_meta:get_string("secret") + end + + return false +end diff --git a/mods/default/furnace.lua b/mods/default/furnace.lua new file mode 100644 index 0000000..d5703cd --- /dev/null +++ b/mods/default/furnace.lua @@ -0,0 +1,380 @@ +-- default/furnace.lua + +-- support for MT game translation. +local S = default.get_translator + +-- +-- Formspecs +-- + +function default.get_furnace_active_formspec(fuel_percent, item_percent) + return "size[8,8.5]".. + "list[context;src;2.75,0.5;1,1;]".. + "list[context;fuel;2.75,2.5;1,1;]".. + "image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:".. + (fuel_percent)..":default_furnace_fire_fg.png]".. + "image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:".. + (item_percent)..":gui_furnace_arrow_fg.png^[transformR270]".. + "list[context;dst;4.75,0.96;2,2;]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "listring[context;dst]".. + "listring[current_player;main]".. + "listring[context;src]".. + "listring[current_player;main]".. + "listring[context;fuel]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0, 4.25) +end + +function default.get_furnace_inactive_formspec() + return "size[8,8.5]".. + "list[context;src;2.75,0.5;1,1;]".. + "list[context;fuel;2.75,2.5;1,1;]".. + "image[2.75,1.5;1,1;default_furnace_fire_bg.png]".. + "image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "list[context;dst;4.75,0.96;2,2;]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "listring[context;dst]".. + "listring[current_player;main]".. + "listring[context;src]".. + "listring[current_player;main]".. + "listring[context;fuel]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0, 4.25) +end + +-- +-- Node callback functions that are the same for active and inactive furnace +-- + +local function can_dig(pos, player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("fuel") and inv:is_empty("dst") and inv:is_empty("src") +end + +local function allow_metadata_inventory_put(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if listname == "fuel" then + if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then + if inv:is_empty("src") then + meta:set_string("infotext", S("Furnace is empty")) + end + return stack:get_count() + else + return 0 + end + elseif listname == "src" then + return stack:get_count() + elseif listname == "dst" then + return 0 + end +end + +local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local stack = inv:get_stack(from_list, from_index) + return allow_metadata_inventory_put(pos, to_list, to_index, stack, player) +end + +local function allow_metadata_inventory_take(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + return stack:get_count() +end + +local function swap_node(pos, name) + local node = minetest.get_node(pos) + if node.name == name then + return + end + node.name = name + minetest.swap_node(pos, node) +end + +local function furnace_node_timer(pos, elapsed) + -- + -- Initialize metadata + -- + local meta = minetest.get_meta(pos) + local fuel_time = meta:get_float("fuel_time") or 0 + local src_time = meta:get_float("src_time") or 0 + local fuel_totaltime = meta:get_float("fuel_totaltime") or 0 + + local inv = meta:get_inventory() + local srclist, fuellist + local dst_full = false + + local timer_elapsed = meta:get_int("timer_elapsed") or 0 + meta:set_int("timer_elapsed", timer_elapsed + 1) + + local cookable, cooked + local fuel + + local update = true + while elapsed > 0 and update do + update = false + + srclist = inv:get_list("src") + fuellist = inv:get_list("fuel") + + -- + -- Cooking + -- + + -- Check if we have cookable content + local aftercooked + cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) + cookable = cooked.time ~= 0 + + local el = math.min(elapsed, fuel_totaltime - fuel_time) + if cookable then -- fuel lasts long enough, adjust el to cooking duration + el = math.min(el, cooked.time - src_time) + end + + -- Check if we have enough fuel to burn + if fuel_time < fuel_totaltime then + -- The furnace is currently active and has enough fuel + fuel_time = fuel_time + el + -- If there is a cookable item then check if it is ready yet + if cookable then + src_time = src_time + el + if src_time >= cooked.time then + -- Place result in dst list if possible + if inv:room_for_item("dst", cooked.item) then + inv:add_item("dst", cooked.item) + inv:set_stack("src", 1, aftercooked.items[1]) + src_time = src_time - cooked.time + update = true + else + dst_full = true + end + -- Play cooling sound + minetest.sound_play("default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.1}, true) + else + -- Item could not be cooked: probably missing fuel + update = true + end + end + else + -- Furnace ran out of fuel + if cookable then + -- We need to get new fuel + local afterfuel + fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) + + if fuel.time == 0 then + -- No valid fuel in fuel list + fuel_totaltime = 0 + src_time = 0 + else + -- Take fuel from fuel list + inv:set_stack("fuel", 1, afterfuel.items[1]) + -- Put replacements in dst list or drop them on the furnace. + local replacements = fuel.replacements + if replacements[1] then + local leftover = inv:add_item("dst", replacements[1]) + if not leftover:is_empty() then + local above = vector.new(pos.x, pos.y + 1, pos.z) + local drop_pos = minetest.find_node_near(above, 1, {"air"}) or above + minetest.item_drop(replacements[1], nil, drop_pos) + end + end + update = true + fuel_totaltime = fuel.time + (fuel_totaltime - fuel_time) + end + else + -- We don't need to get new fuel since there is no cookable item + fuel_totaltime = 0 + src_time = 0 + end + fuel_time = 0 + end + + elapsed = elapsed - el + end + + if fuel and fuel_totaltime > fuel.time then + fuel_totaltime = fuel.time + end + if srclist and srclist[1]:is_empty() then + src_time = 0 + end + + -- + -- Update formspec, infotext and node + -- + local formspec + local item_state + local item_percent = 0 + if cookable then + item_percent = math.floor(src_time / cooked.time * 100) + if dst_full then + item_state = S("100% (output full)") + else + item_state = S("@1%", item_percent) + end + else + if srclist and not srclist[1]:is_empty() then + item_state = S("Not cookable") + else + item_state = S("Empty") + end + end + + local fuel_state = S("Empty") + local active = false + local result = false + + if fuel_totaltime ~= 0 then + active = true + local fuel_percent = 100 - math.floor(fuel_time / fuel_totaltime * 100) + fuel_state = S("@1%", fuel_percent) + formspec = default.get_furnace_active_formspec(fuel_percent, item_percent) + swap_node(pos, "default:furnace_active") + -- make sure timer restarts automatically + result = true + + -- Play sound every 5 seconds while the furnace is active + if timer_elapsed == 0 or (timer_elapsed+1) % 5 == 0 then + minetest.sound_play("default_furnace_active", + {pos = pos, max_hear_distance = 16, gain = 0.5}, true) + end + else + if fuellist and not fuellist[1]:is_empty() then + fuel_state = S("@1%", 0) + end + formspec = default.get_furnace_inactive_formspec() + swap_node(pos, "default:furnace") + -- stop timer on the inactive furnace + minetest.get_node_timer(pos):stop() + meta:set_int("timer_elapsed", 0) + end + + + local infotext + if active then + infotext = S("Furnace active") + else + infotext = S("Furnace inactive") + end + infotext = infotext .. "\n" .. S("(Item: @1; Fuel: @2)", item_state, fuel_state) + + -- + -- Set meta values + -- + meta:set_float("fuel_totaltime", fuel_totaltime) + meta:set_float("fuel_time", fuel_time) + meta:set_float("src_time", src_time) + meta:set_string("formspec", formspec) + meta:set_string("infotext", infotext) + + return result +end + +-- +-- Node definitions +-- + +minetest.register_node("default:furnace", { + description = S("Furnace"), + tiles = { + "default_furnace_top.png", "default_furnace_bottom.png", + "default_furnace_side.png", "default_furnace_side.png", + "default_furnace_side.png", "default_furnace_front.png" + }, + paramtype2 = "facedir", + groups = {cracky=2}, + legacy_facedir_simple = true, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + + can_dig = can_dig, + + on_timer = furnace_node_timer, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size('src', 1) + inv:set_size('fuel', 1) + inv:set_size('dst', 4) + furnace_node_timer(pos, 0) + end, + + on_metadata_inventory_move = function(pos) + minetest.get_node_timer(pos):start(1.0) + end, + on_metadata_inventory_put = function(pos) + -- start timer function, it will sort out whether furnace can burn or not. + minetest.get_node_timer(pos):start(1.0) + end, + on_metadata_inventory_take = function(pos) + -- check whether the furnace is empty or not. + minetest.get_node_timer(pos):start(1.0) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "src", drops) + default.get_inventory_drops(pos, "fuel", drops) + default.get_inventory_drops(pos, "dst", drops) + drops[#drops+1] = "default:furnace" + minetest.remove_node(pos) + return drops + end, + + allow_metadata_inventory_put = allow_metadata_inventory_put, + allow_metadata_inventory_move = allow_metadata_inventory_move, + allow_metadata_inventory_take = allow_metadata_inventory_take, +}) + +minetest.register_node("default:furnace_active", { + description = S("Furnace"), + tiles = { + "default_furnace_top.png", "default_furnace_bottom.png", + "default_furnace_side.png", "default_furnace_side.png", + "default_furnace_side.png", + { + image = "default_furnace_front_active.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + } + }, + paramtype2 = "facedir", + light_source = 8, + drop = "default:furnace", + groups = {cracky=2, not_in_creative_inventory=1}, + legacy_facedir_simple = true, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + on_timer = furnace_node_timer, + + can_dig = can_dig, + + allow_metadata_inventory_put = allow_metadata_inventory_put, + allow_metadata_inventory_move = allow_metadata_inventory_move, + allow_metadata_inventory_take = allow_metadata_inventory_take, +}) + +minetest.register_craft({ + output = "default:furnace", + recipe = { + {"group:stone", "group:stone", "group:stone"}, + {"group:stone", "", "group:stone"}, + {"group:stone", "group:stone", "group:stone"}, + } +}) diff --git a/mods/default/init.lua b/mods/default/init.lua new file mode 100644 index 0000000..d4388e5 --- /dev/null +++ b/mods/default/init.lua @@ -0,0 +1,68 @@ +-- Minetest 0.4 mod: default +-- See README.txt for licensing and other information. + +-- The API documentation in here was moved into game_api.txt + +-- Load support for MT game translation. +local S = minetest.get_translator("default") + +-- Definitions made by this mod that other mods can use too +default = {} + +default.LIGHT_MAX = 14 +default.get_translator = S + +-- GUI related stuff +minetest.register_on_joinplayer(function(player) + -- Set formspec prepend + local formspec = [[ + bgcolor[#080808BB;true] + listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]] + local name = player:get_player_name() + local info = minetest.get_player_information(name) + if info.formspec_version > 1 then + formspec = formspec .. "background9[5,5;1,1;gui_formbg.png;true;10]" + else + formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]" + end + player:set_formspec_prepend(formspec) + + -- Set hotbar textures + player:hud_set_hotbar_image("gui_hotbar.png") + player:hud_set_hotbar_selected_image("gui_hotbar_selected.png") +end) + +function default.get_hotbar_bg(x,y) + local out = "" + for i=0,7,1 do + out = out .."image["..x+i..","..y..";1,1;gui_hb_bg.png]" + end + return out +end + +default.gui_survival_form = "size[8,8.5]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "list[current_player;craft;1.75,0.5;3,3;]".. + "list[current_player;craftpreview;5.75,1.5;1,1;]".. + "image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "listring[current_player;main]".. + "listring[current_player;craft]".. + default.get_hotbar_bg(0,4.25) + +-- Load files +local default_path = minetest.get_modpath("default") + +dofile(default_path.."/functions.lua") +dofile(default_path.."/trees.lua") +dofile(default_path.."/nodes.lua") +dofile(default_path.."/chests.lua") +dofile(default_path.."/furnace.lua") +dofile(default_path.."/torch.lua") +dofile(default_path.."/tools.lua") +dofile(default_path.."/item_entity.lua") +dofile(default_path.."/craftitems.lua") +dofile(default_path.."/crafting.lua") +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/aliases.lua") +dofile(default_path.."/legacy.lua") diff --git a/mods/default/item_entity.lua b/mods/default/item_entity.lua new file mode 100644 index 0000000..25fb832 --- /dev/null +++ b/mods/default/item_entity.lua @@ -0,0 +1,78 @@ +-- mods/default/item_entity.lua + +local builtin_item = minetest.registered_entities["__builtin:item"] + +local item = { + set_item = function(self, itemstring) + builtin_item.set_item(self, itemstring) + + local stack = ItemStack(itemstring) + local itemdef = minetest.registered_items[stack:get_name()] + if itemdef and itemdef.groups.flammable ~= 0 then + self.flammable = itemdef.groups.flammable + end + end, + + burn_up = function(self) + -- disappear in a smoke puff + local p = self.object:get_pos() + self.object:remove() + minetest.sound_play("default_item_smoke", { + pos = p, + max_hear_distance = 8, + }, true) + minetest.add_particlespawner({ + amount = 3, + time = 0.1, + minpos = {x = p.x - 0.1, y = p.y + 0.1, z = p.z - 0.1 }, + maxpos = {x = p.x + 0.1, y = p.y + 0.2, z = p.z + 0.1 }, + minvel = {x = 0, y = 2.5, z = 0}, + maxvel = {x = 0, y = 2.5, z = 0}, + minacc = {x = -0.15, y = -0.02, z = -0.15}, + maxacc = {x = 0.15, y = -0.01, z = 0.15}, + minexptime = 4, + maxexptime = 6, + minsize = 5, + maxsize = 5, + collisiondetection = true, + texture = "default_item_smoke.png" + }) + end, + + on_step = function(self, dtime, ...) + builtin_item.on_step(self, dtime, ...) + + if self.flammable then + -- flammable, check for igniters every 10 s + self.ignite_timer = (self.ignite_timer or 0) + dtime + if self.ignite_timer > 10 then + self.ignite_timer = 0 + + local pos = self.object:get_pos() + if pos == nil then + return -- object already deleted + end + local node = minetest.get_node_or_nil(pos) + if not node then + return + end + + -- Immediately burn up flammable items in lava + if minetest.get_item_group(node.name, "lava") > 0 then + self:burn_up() + else + -- otherwise there'll be a chance based on its igniter value + local burn_chance = self.flammable + * minetest.get_item_group(node.name, "igniter") + if burn_chance > 0 and math.random(0, burn_chance) ~= 0 then + self:burn_up() + end + end + end + end + end, +} + +-- set defined item as new __builtin:item, with the old one as fallback table +setmetatable(item, { __index = builtin_item }) +minetest.register_entity(":__builtin:item", item) diff --git a/mods/default/legacy.lua b/mods/default/legacy.lua new file mode 100644 index 0000000..a2d812d --- /dev/null +++ b/mods/default/legacy.lua @@ -0,0 +1,49 @@ +-- mods/default/legacy.lua + +-- Horrible stuff to support old code registering falling nodes +-- Don't use this and never do what this does, it's completely wrong! +-- (More specifically, the client and the C++ code doesn't get the group) +function default.register_falling_node(nodename, texture) + minetest.log("error", debug.traceback()) + minetest.log('error', "WARNING: default.register_falling_node is deprecated") + if minetest.registered_nodes[nodename] then + minetest.registered_nodes[nodename].groups.falling_node = 1 + end +end + +function default.spawn_falling_node(p, nodename) + spawn_falling_node(p, nodename) +end + +-- Liquids +WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha +WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity +LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity +LIGHT_MAX = default.LIGHT_MAX + +-- Formspecs +default.gui_suvival_form = default.gui_survival_form +default.gui_bg = "" +default.gui_bg_img = "" +default.gui_slots = "" + +-- Players +if minetest.get_modpath("player_api") then + default.registered_player_models = player_api.registered_models + default.player_register_model = player_api.register_model + default.player_attached = player_api.player_attached + default.player_get_animation = player_api.get_animation + default.player_set_model = player_api.set_model + default.player_set_textures = player_api.set_textures + default.player_set_animation = player_api.set_animation +end + +-- Chests +default.register_chest = default.chest.register_chest + +-- Check for a volume intersecting protection +function default.intersects_protection(minp, maxp, player_name, interval) + minetest.log("warning", "default.intersects_protection() is " .. + "deprecated, use minetest.is_area_protected() instead.") + return minetest.is_area_protected(minp, maxp, player_name, interval) +end diff --git a/mods/default/license.txt b/mods/default/license.txt new file mode 100644 index 0000000..3c95c1b --- /dev/null +++ b/mods/default/license.txt @@ -0,0 +1,157 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011-2018 celeron55, Perttu Ahola +Copyright (C) 2011-2018 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2010-2018: + + celeron55, Perttu Ahola + Cisoun + G4JC + VanessaE + RealBadAngel + Calinou + MirceaKitsune + Jordach + PilzAdam + jojoa1997 + InfinityProject + Splizard + Zeg9 + paramat + BlockMen + sofar + Neuromancer + Gambit + asl97 + KevDoy + Mito551 + GreenXenith + kaeza + kilbith + tobyplowy + CloudyProton + TumeniNodes + Mossmanikin + random-geek + Extex101 + An0n3m0us + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) + +Copyright (C) 2009 cmusounddesign +Copyright (C) 2010 Tomlija +Copyright (C) 2010 lsprice +Copyright (C) 2014 sonictechtonic +Copyright (C) 2015 yadronoff +Copyright (C) 2007 HerbertBoland +Copyright (C) 2006 AGFX + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication + +Iwan Gabovitch +Ottomaani138 +Ogrebane +blukotek +Sevin7 +Yoyodaman234 +Ryding + +No Copyright + +The person who associated a work with this deed has dedicated the work to the +public domain by waiving all of his or her rights to the work worldwide under +copyright law, including all related and neighboring rights, to the extent +allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial +purposes, all without asking permission. See Other Information below. + +Other Information: + +In no way are the patent or trademark rights of any person affected by CC0, nor +are the rights that other persons may have in the work or in how the work is +used, such as publicity or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this +deed makes no warranties about the work, and disclaims liability for all uses +of the work, to the fullest extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author +or the affirmer. + +For more details: +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/mods/default/locale/default.de.tr b/mods/default/locale/default.de.tr new file mode 100644 index 0000000..9a3b8bd --- /dev/null +++ b/mods/default/locale/default.de.tr @@ -0,0 +1,211 @@ +# textdomain: default +Locked Chest=Abgeschlossene Truhe +Locked Chest (owned by @1)=Abgeschlossene Truhe (Eigentum von @1) +You do not own this chest.=Ihnen gehört diese Truhe nicht. +a locked chest=eine abgeschlossene Truhe +Chest=Truhe +Stick=Stock +Paper=Papier +"@1" by @2=„@1“ von @2 +Book=Buch +Book with Text=Buch mit Text +Skeleton Key=Skelettschlüssel +Key to @1's @2=Schlüssel für @2 von @1 +Coal Lump=Kohleklumpen +Iron Lump=Eisenklumpen +Copper Lump=Kupferklumpen +Tin Lump=Zinnklumpen +Mese Crystal=Mesekristall +Gold Lump=Goldklumpen +Diamond=Diamant +Clay Lump=Tonklumpen +Steel Ingot=Stahlbarren +Copper Ingot=Kupferbarren +Tin Ingot=Zinnbarren +Bronze Ingot=Bronzebarren +Gold Ingot=Goldbarren +Mese Crystal Fragment=Mesekristallfragment +Clay Brick=Tonziegel +Obsidian Shard=Obsidianscherbe +Flint=Feuerstein +Blueberries=Blaubeeren +Furnace is empty=Ofen ist leer +100% (output full)=100% (Ausgabe voll) +@1%=@1% +Empty=Leer +Not cookable=Nicht kochbar +Furnace active=Ofen aktiv +Furnace inactive=Ofen inaktiv +(Item: @1; Fuel: @2)=(Gegenstand: @1; Brennstoff: @2) +Furnace=Ofen +Stone=Stein +Cobblestone=Kopfsteinpflaster +Stone Brick=Steinziegel +Stone Block=Steinblock +Mossy Cobblestone=Mosiges Kopfsteinpflaster +Desert Stone=Wüstenstein +Desert Cobblestone=Wüstenkopfsteinpflaster +Desert Stone Brick=Wüstensteinziegel +Desert Stone Block=Wüstensteinblock +Sandstone=Sandstein +Sandstone Brick=Sandsteinziegel +Sandstone Block=Sandsteinblock +Desert Sandstone=Wüstensandstein +Desert Sandstone Brick=Wüstensandsteinziegel +Desert Sandstone Block=Wüstensandsteinblock +Silver Sandstone=Silbersandstein +Silver Sandstone Brick=Silbersandsteinziegel +Silver Sandstone Block=Silbersandsteinblock +Obsidian=Obsidian +Obsidian Brick=Obsidianziegel +Obsidian Block=Obsidianblock +Dirt=Erde +Dirt with Grass=Erde mit Gras +Dirt with Grass and Footsteps=Erde mit Gras und Fußstapfen +Dirt with Savanna Grass=Erde mit Savannengras +Dirt with Snow=Erde mit Schnee +Dirt with Rainforest Litter=Erde mit Regenwaldboden +Dirt with Coniferous Litter=Erde mit Nadelwaldboden +Savanna Dirt=Savannenerde +Savanna Dirt with Savanna Grass=Savannenerde mit Savannengras +Permafrost=Permafrost +Permafrost with Stones=Permafrost mit Steinen +Permafrost with Moss=Permafrost mit Moos +Sand=Sand +Desert Sand=Wüstensand +Silver Sand=Silbersand +Gravel=Kies +Clay=Ton +Snow=Schnee +Snow Block=Schneeblock +Ice=Eis +Cave Ice=Höhleneis +Apple Tree=Apfelbaum +Apple Wood Planks=Apfelbaumplanken +Apple Tree Sapling=Apfelbaumsetzling +Apple Tree Leaves=Apfelbaumblätter +Apple=Apfel +Apple Marker=Apfelmarkierung +Jungle Tree=Dschungelbaum +Jungle Wood Planks=Dschungelholzplanken +Jungle Tree Leaves=Dschungelbaumblätter +Jungle Tree Sapling=Dschungelbaumsetzling +Emergent Jungle Tree Sapling=Hervorstehender Dschungelbaumsetzling +Pine Tree=Kiefernbaum +Pine Wood Planks=Kiefernholzplanken +Pine Needles=Kiefernnadeln +Pine Tree Sapling=Kiefernbaumsetzling +Acacia Tree=Akazienbaum +Acacia Wood Planks=Akazienholzplanken +Acacia Tree Leaves=Akazienbaumblätter +Acacia Tree Sapling=Akazienbaumsetzling +Aspen Tree=Espenbaum +Aspen Wood Planks=Espenholzplanken +Aspen Tree Leaves=Espenbaumblätter +Aspen Tree Sapling=Esepenbaumsetzling +Coal Ore=Kohleerz +Coal Block=Kohleblock +Iron Ore=Eisenerz +Steel Block=Stahlblock +Copper Ore=Kupfererz +Copper Block=Kupferblock +Tin Ore=Zinnerz +Tin Block=Zinnblock +Bronze Block=Bronzeblock +Mese Ore=Meseerz +Mese Block=Meseblock +Gold Ore=Golderz +Gold Block=Goldblock +Diamond Ore=Diamanterz +Diamond Block=Diamantblock +Cactus=Kaktus +Large Cactus Seedling=Großer Kaktussämling +Papyrus=Papyrus +Dry Shrub=Trockener Busch +Jungle Grass=Dschungelgras +Grass=Gras +Savanna Grass=Savannengras +Fern=Farn +Marram Grass=Dünengras +Bush Stem=Buschstamm +Bush Leaves=Buschblätter +Bush Sapling=Buschsetzling +Blueberry Bush Leaves with Berries=Blaubeerbuschblätter mit Beeren +Blueberry Bush Leaves=Blaubeerbuschblätter +Blueberry Bush Sapling=Blaubeerbuschsetzling +Acacia Bush Stem=Akazienbuschstamm +Acacia Bush Leaves=Akazienbuschblätter +Acacia Bush Sapling=Akazienbuschsetzling +Pine Bush Stem=Kiefernbuschstamm +Pine Bush Needles=Kiefernbuschnadeln +Pine Bush Sapling=Kiefernbuschsetzling +Kelp=Seetang +Green Coral=Grüne Koralle +Pink Coral=Rosa Koralle +Cyan Coral=Türkise Koralle +Brown Coral=Braune Koralle +Orange Coral=Orange Koralle +Coral Skeleton=Korallenskelett +Water Source=Wasserquelle +Flowing Water=Fließendes Wasser +River Water Source=Flusswasserquelle +Flowing River Water=Fließendes Flusswasser +Lava Source=Lavaquelle +Flowing Lava=Fließende Lava +Empty Bookshelf=Leeres Bücherregal +Bookshelf (@1 written, @2 empty books)=Bücherregal (@1 beschriebene, @2 leere Bücher) +Bookshelf=Bücherregal +Text too long=Text zu lang +Wooden Sign=Holzschild +Steel Sign=Stahlschild +Wooden Ladder=Holzleiter +Steel Ladder=Stahlleiter +Apple Wood Fence=Apfelholzzaun +Acacia Wood Fence=Akazienholzzaun +Jungle Wood Fence=Dschungelholzzaun +Pine Wood Fence=Kiefernholzzaun +Aspen Wood Fence=Espenholzzaun +Apple Wood Fence Rail=Apfelholzzaungeländer +Acacia Wood Fence Rail=Akazienholzzaungeländer +Jungle Wood Fence Rail=Dschungelholzzaungeländer +Pine Wood Fence Rail=Kiefernholzzaungeländer +Aspen Wood Fence Rail=Espenholzzaungeländer +Glass=Glas +Obsidian Glass=Obsidianglas +Brick Block=Ziegelblock +Mese Lamp=Meselampe +Mese Post Light=Mesestandlampe +Cloud=Wolke +Wooden Pickaxe=Holzspitzhacke +Stone Pickaxe=Steinspitzhacke +Bronze Pickaxe=Bronzespitzhacke +Steel Pickaxe=Stahlspitzhacke +Mese Pickaxe=Mesespitzhacke +Diamond Pickaxe=Diamantspitzhacke +Wooden Shovel=Holzschaufel +Stone Shovel=Steinschaufel +Bronze Shovel=Bronzeschaufel +Steel Shovel=Stahlschaufel +Mese Shovel=Meseschaufel +Diamond Shovel=Diamantschaufel +Wooden Axe=Holzaxt +Stone Axe=Steinaxt +Bronze Axe=Bronzeaxt +Steel Axe=Stahlaxt +Mese Axe=Meseaxt +Diamond Axe=Diamantaxt +Wooden Sword=Holzschwert +Stone Sword=Steinschwert +Bronze Sword=Bronzeschwert +Steel Sword=Stahlschwert +Mese Sword=Meseschwert +Diamond Sword=Diamantschwert +Key=Schlüssel +Torch=Fackel +@1 will intersect protection on growth.=@1 wird bei Wachstum mit geschützter Zone überlappen. +Title:=Titel: +Contents:=Inhalt: +Save=Speichern +by @1=von @1 +Page @1 of @2=Seite @1 von @2 +"@1"=„@1“ diff --git a/mods/default/locale/default.es.tr b/mods/default/locale/default.es.tr new file mode 100644 index 0000000..e55c133 --- /dev/null +++ b/mods/default/locale/default.es.tr @@ -0,0 +1,211 @@ +# textdomain: default +Locked Chest=Cofre cerrado +Locked Chest (owned by @1)=Cofre cerrado (propiedad de @1) +You do not own this chest.=Este cofre no te pertenece. +a locked chest=un cofre cerrado +Chest=Cofre +Stick=Palo +Paper=Papel +"@1" by @2="@1" por @2 +Book=Libro +Book with Text=Libro escrito +Skeleton Key=Llave esqueleto +Key to @1's @2=Llave para @2 de @1 +Coal Lump=Fragmento de carbón +Iron Lump=Pepita de hierro +Copper Lump=Pepita de cobre +Tin Lump=Pepita de estaño +Mese Crystal=Cristal de mese +Gold Lump=Pepita de oro +Diamond=Diamante +Clay Lump=Fragmento de arcilla +Steel Ingot=Lingote de acero +Copper Ingot=Lingote de cobre +Tin Ingot=Lingote de estaño +Bronze Ingot=Lingote de bronce +Gold Ingot=Lingote de oro +Mese Crystal Fragment=Fragmento de cristal de mese +Clay Brick=Ladrillo de arcilla +Obsidian Shard=Esquirla de obsidiana +Flint=Pedernal +Blueberries=Arándanos +Furnace is empty=El horno está vacío +100% (output full)=100% (salida completa) +@1%=@1% +Empty=Vacío +Not cookable=No se puede cocinar +Furnace active=Horno activado +Furnace inactive=Horno desactivado +(Item: @1; Fuel: @2)=(Objeto: @1; Combustible: @2) +Furnace=Horno +Stone=Piedra +Cobblestone=Adoquín +Stone Brick=Ladrillo de piedra +Stone Block=Bloque de piedra +Mossy Cobblestone=Adoquín musgoso +Desert Stone=Piedra desértica +Desert Cobblestone=Adoquín desértico +Desert Stone Brick=Ladrillo de piedra desértica +Desert Stone Block=Bloque de piedra desértica +Sandstone=Piedra arenisca +Sandstone Brick=Ladrillo de arenisca +Sandstone Block=Bloque de arenisca +Desert Sandstone=Piedra arenisca desértica +Desert Sandstone Brick=Ladrillo de arenisca desértica +Desert Sandstone Block=Bloque de arenisca deśertica +Silver Sandstone=Piedra arenisca plateada +Silver Sandstone Brick=Ladrillo de arenisca plateada +Silver Sandstone Block=Bloque de arenisca plateada +Obsidian=Obsidiana +Obsidian Brick=Ladrillo de obsidiana +Obsidian Block=Bloque de obsidiana +Dirt=Tierra +Dirt with Grass=Tierra con pasto +Dirt with Grass and Footsteps=Tierra con pasto y pisadas +Dirt with Dry Grass=Tierra con pasto seco +Dirt with Snow=Tierra con nieve +Dirt with Rainforest Litter=Tierra con hojarasca de selva tropical +Dirt with Coniferous Litter=Tierra con hojarasca de coníferas +Dry Dirt=Tierra Seca +Dry Dirt with Dry Grass=Tierra seca con pasto seco +Permafrost=Permafrost +Permafrost with Stones=Permafrost pedregoso +Permafrost with Moss=Permafrost musgoso +Sand=Arena +Desert Sand=Arena desértica +Silver Sand=Arena plateada +Gravel=Gravilla +Clay=Arcilla +Snow=Nieve +Snow Block=Bloque de nieve +Ice=Hielo +Cave Ice=Hielo de cueva +Apple Tree=Madera de manzano +Apple Wood Planks=Tablas de manzano +Apple Tree Sapling=Retoño de manzano +Apple Tree Leaves=Hojas de manzano +Apple=Manzana +Apple Marker=Marcador de manzano +Jungle Tree=Madera de árbol tropical +Jungle Wood Planks=Tablas de madera tropical +Jungle Tree Leaves=Hojas de árbol tropical +Jungle Tree Sapling=Retoño de árbol tropical +Emergent Jungle Tree Sapling=Retoño de árbol tropical +Pine Tree=Madera de pino +Pine Wood Planks=Tablas de pino +Pine Needles=Agujas de pino +Pine Tree Sapling=Retoño de pino +Acacia Tree=Madera de acacia +Acacia Wood Planks=Tablas de acacia +Acacia Tree Leaves=Hojas de acacia +Acacia Tree Sapling=Retoño de acacia +Aspen Tree=Madera de álamo +Aspen Wood Planks=Tablas de álamo +Aspen Tree Leaves=Hojas de álamo +Aspen Tree Sapling=Retoño de álamo +Coal Ore=Mineral de carbón +Coal Block=Bloque de carbón +Iron Ore=Mineral de hierro +Steel Block=Bloque de acero +Copper Ore=Mineral de cobre +Copper Block=Bloque de cobre +Tin Ore=Mineral de estaño +Tin Block=Bloque de estaño +Bronze Block=Bloque de bronce +Mese Ore=Mineral de mese +Mese Block=Bloque de mese +Gold Ore=Mineral de oro +Gold Block=Bloque de oro +Diamond Ore=Mineral de diamante +Diamond Block=Bloque de diamante +Cactus=Cáctus +Large Cactus Seedling=Vástago grande de cactus +Papyrus=Papiro +Dry Shrub=Arbusto seco +Jungle Grass=Pasto de jungla +Grass=Pasto +Dry Grass=Pasto seco +Fern=Helecho +Marram Grass=Carrizo +Bush Stem=Tallo de arbusto +Bush Leaves=Hojas de arbusto +Bush Sapling=Retoño de arbusto +Blueberry Bush Leaves with Berries=Hojas de arbusto de arándano con bayas +Blueberry Bush Leaves=Hojas de arbusto de arándano +Blueberry Bush Sapling=Retoño de arbusto de arándano +Acacia Bush Stem=Tallo de arbusto de acacia +Acacia Bush Leaves=Hojas de arbusto de acacia +Acacia Bush Sapling=Retoño de arbusto de acacia +Pine Bush Stem=Tallo de arbusto de pino +Pine Bush Needles=Agujas de arbusto de pino +Pine Bush Sapling=Retoño de arbusto de pino +Kelp=Alga marina +Green Coral=Coral verde +Pink Coral=Coral rosa +Cyan Coral=Coral cián +Brown Coral=Coral café +Orange Coral=Coral naranja +Coral Skeleton=Esqueleto de coral +Water Source=Fuente de agua +Flowing Water=Fluído de agua +River Water Source=Fuente de agua de río +Flowing River Water=Fluído de agua de río +Lava Source=Fuente de lava +Flowing Lava=Fluído de lava +Empty Bookshelf=Librería vacía +Bookshelf (@1 written, @2 empty books)=Librería(@1 escritos, @2 libros en blanco) +Bookshelf=Librería +Text too long=Texto demasiado largo +Wooden Sign=Cartel de madera +Steel Sign=Cartel de acero +Wooden Ladder=Escalera de madera +Steel Ladder=Escalera de acero +Apple Wood Fence=Cerca de manzano +Acacia Wood Fence=Cerca de acacia +Jungle Wood Fence=Cerca de madera tropical +Pine Wood Fence=Cerca de pino +Aspen Wood Fence=Cerca de álamo +Apple Wood Fence Rail=Listones de manzano para cerca +Acacia Wood Fence Rail=Listones de acacia para cerca +Jungle Wood Fence Rail=Listones de madera tropical para cerca +Pine Wood Fence Rail=Listones de pino para cerca +Aspen Wood Fence Rail=Listones de álamo para cerca +Glass=Vidrio +Obsidian Glass=Vidrio de obsidiana +Brick Block=Bloque de ladrillo +Mese Lamp=Lámpara de mese +Mese Post Light=Poste de luz de mese +Cloud=Nube +Wooden Pickaxe=Pico de madera +Stone Pickaxe=Pico de piedra +Bronze Pickaxe=Pico de bronce +Steel Pickaxe=Pico de acero +Mese Pickaxe=Pico de mese +Diamond Pickaxe=Pico de diamante +Wooden Shovel=Pala de madera +Stone Shovel=Pala de piedra +Bronze Shovel=Pala de bronce +Steel Shovel=Pala de acero +Mese Shovel=Pala de mese +Diamond Shovel=Pala de diamante +Wooden Axe=Hacha de madera +Stone Axe=Hacha de piedra +Bronze Axe=Hacha de bronce +Steel Axe=Hacha de acero +Mese Axe=Hacha de mese +Diamond Axe=Hacha de diamante +Wooden Sword=Espada de madera +Stone Sword=Espada de piedra +Bronze Sword=Espada de bronce +Steel Sword=Espada de acero +Mese Sword=Espada de mese +Diamond Sword=Espada de diamante +Key=Llave +Torch=Antorcha +@1 will intersect protection on growth.=@1 intersectará con protección cuando crezca. +Title:=Título: +Contents:=Contenidos: +Save=Guardar +by @1=por @1 +Page @1 of @2=Página @1 de @2 +"@1"="@1" diff --git a/mods/default/locale/default.fr.tr b/mods/default/locale/default.fr.tr new file mode 100644 index 0000000..2214e37 --- /dev/null +++ b/mods/default/locale/default.fr.tr @@ -0,0 +1,211 @@ +# textdomain: default +Locked Chest=Coffre verrouillé +Locked Chest (owned by @1)=Coffre verrouillé (possédé par @1) +You do not own this chest.=Ce coffre ne vous appartient pas. +a locked chest=un coffre verrouillé +Chest=Coffre +Stick=Baton +Paper=Papier +"@1" by @2=« @1 » de @2 +Book=Livre +Book with Text=Livre avec du texte +Skeleton Key=Squelette +Key to @1's @2=Clé pour @2 de @1 +Coal Lump=Morceau de charbon +Iron Lump=Morceau de fer +Copper Lump=Morceau de cuivre +Tin Lump=Morceau d'étain +Mese Crystal=Cristal de Mese +Gold Lump=Morceau d'or +Diamond=Diamant +Clay Lump=Morceau d'argile +Steel Ingot=Lingot d'acier +Copper Ingot=Lingot de cuivre +Tin Ingot=Lingot d'étain +Bronze Ingot=Lingot de bronze +Gold Ingot=Lingot d'or +Mese Crystal Fragment=Fragment de cristal de Mese +Clay Brick=Brique d'argile +Obsidian Shard=Tesson d'obsidienne +Flint=Silex +Blueberries=Myrtille +Furnace is empty=Le four est vide +100% (output full)=100% (Sortie pleine) +@1%=@1% +Empty=Vide +Not cookable=Ne se cuit pas +Furnace active=Four actif +Furnace inactive=Four inactif +(Item: @1; Fuel: @2)=(Article: @1; Carburant: @2) +Furnace=Four +Stone=Pierre +Cobblestone=Pavé +Stone Brick=Brique de pierre +Stone Block=Bloc de pierre +Mossy Cobblestone=Pavé moussu +Desert Stone=Pierre du désert +Desert Cobblestone=Pavé de pierre du désert +Desert Stone Brick=Brique de pierre du désert +Desert Stone Block=Bloc de pierre du désert +Sandstone=Grès +Sandstone Brick=Brique de grès +Sandstone Block=Bloc de grès +Desert Sandstone=Grès du désert +Desert Sandstone Brick=Brique de grès du désert +Desert Sandstone Block=Bloc de grès du désert +Silver Sandstone=Grès argenté +Silver Sandstone Brick=Brique de grès argenté +Silver Sandstone Block=Bloc de grès argenté +Obsidian=Obsidienne +Obsidian Brick=Brique d'obsidienne +Obsidian Block=Block d'obsidienne +Dirt=Terre +Dirt with Grass=Terre avec de l'herbe +Dirt with Grass and Footsteps=Terre avec de l'herbe et des traces de pas +Dirt with Dry Grass=Terre avec de l'herbe sèche +Dirt with Snow=Terre avec de la neige +Dirt with Rainforest Litter=Terre avec sol de forêt humide +Dirt with Coniferous Litter=Terre avec sol de forêt de conifère +Dry Dirt=Terre sèche +Dry Dirt with Dry Grass=Terre sèche avec de l'herbe sèche +Permafrost=Pergélisol +Permafrost with Stones=Pergélisol avec de la pierre +Permafrost with Moss=Pergélisol avec de la mousse +Sand=Sable +Desert Sand=Sable du désert +Silver Sand=Sable argenté +Gravel=Gravier +Clay=Argile +Snow=Neige +Snow Block=Bloc de neige +Ice=Glace +Cave Ice=Glace de grotte +Apple Tree=Pommier +Apple Wood Planks=Planche de pommier +Apple Tree Sapling=Pousse de pommier +Apple Tree Leaves=Feuilles de pommier +Apple=Pomme +Apple Marker=Marqueur de pomme +Jungle Tree=Arbre de la jungle +Jungle Wood Planks=Planche d'arbre de la jungle +Jungle Tree Leaves=Feuilles d'arbre de la jungle +Jungle Tree Sapling=Pousse d'arbre de la jungle +Emergent Jungle Tree Sapling=Pousse d'arbre de la jungle émergent +Pine Tree=Pin +Pine Wood Planks=Planche de pin +Pine Needles=Aiguilles de pin +Pine Tree Sapling=Pousse de pin +Acacia Tree=Acacia +Acacia Wood Planks=Planche d'acacia +Acacia Tree Leaves=Feuilles d'acacia +Acacia Tree Sapling=Pousse d'acacia +Aspen Tree=Tremble +Aspen Wood Planks=Planche de tremble +Aspen Tree Leaves=Feuilles de tremble +Aspen Tree Sapling=Pousse de tremble +Coal Ore=Minerai de charbon +Coal Block=Bloc de charbon +Iron Ore=Bloc de fer +Steel Block=Bloc d'acier +Copper Ore=Minerai de cuivre +Copper Block=Bloc de cuivre +Tin Ore=Minerai d'étain +Tin Block=Bloc d'étain +Bronze Block=Bloc de bronze +Mese Ore=Minerai de Mese +Mese Block=Bloc de Mese +Gold Ore=Minerai d'or +Gold Block=Bloc d'or +Diamond Ore=Minerai de diamant +Diamond Block=Bloc de diamant +Cactus=Cactus +Large Cactus Seedling=Grand plan de cactus +Papyrus=Papyrus +Dry Shrub=Arbuste sec +Jungle Grass=Herbe de la jungle +Grass=Herbe +Dry Grass=Herbe sèche +Fern=Fougère +Marram Grass=Ammophile +Bush Stem=Tige de buisson +Bush Leaves=Feuilles de buisson +Bush Sapling=Pousse de buisson +Blueberry Bush Leaves with Berries=Buisson de myrtille avec des myrtilles +Blueberry Bush Leaves=Feuilles de buisson à myrtilles +Blueberry Bush Sapling=Pousse de buisson à myrtilles +Acacia Bush Stem=Tige de buisson d'acacia +Acacia Bush Leaves=Feuilles de buisson d'acacia +Acacia Bush Sapling=Pousses de buisson d'acacia +Pine Bush Stem=Tige de buisson de pin +Pine Bush Needles=Aiguilles de buisson de pin +Pine Bush Sapling=Pousse de buisson de pin +Kelp=Varech +Green Coral=Corail vert +Pink Coral=Corail rose +Cyan Coral=Corail cyan +Brown Coral=Corail marron +Orange Coral=Corail orange +Coral Skeleton=Squelette de corail +Water Source=Source d'eau +Flowing Water=Ecoulement d'eau +River Water Source=Source d'eau de rivière +Flowing River Water=Ecoulement d'eau de rivière +Lava Source=Source de lave +Flowing Lava=Ecoulement de lave +Empty Bookshelf=Bibliothèque vide +Bookshelf (@1 written, @2 empty books)=Bibliothèque (@1 écrits, @2 livres vides) +Bookshelf=Bibliothèque +Text too long=Texte trop longue +Wooden Sign=Panneau en bois +Steel Sign=Panneau en acier +Wooden Ladder=Echelle en bois +Steel Ladder=Echelle en acier +Apple Wood Fence=Barrière de bois de pommier +Acacia Wood Fence=Barrière de bois d'acacia +Jungle Wood Fence=Barrière de bois de la jungle +Pine Wood Fence=Barrière de bois de pin +Aspen Wood Fence=Barrière de bois de tremble +Apple Wood Fence Rail=Clôture de bois de pommier +Acacia Wood Fence Rail=Clôture de bois d'acacia +Jungle Wood Fence Rail=Clôture de bois de la jungle +Pine Wood Fence Rail=Clôture de bois de pin +Aspen Wood Fence Rail=Clôture de bois de tremble +Glass=Verre +Obsidian Glass=Verre d'obsidienne +Brick Block=Bloc de brique +Mese Lamp=Lampe de Mese +Mese Post Light=Réverbère de Mese +Cloud=Nuage +Wooden Pickaxe=Pioche en bois +Stone Pickaxe=Pioche en pierre +Bronze Pickaxe=Pioche en bronze +Steel Pickaxe=Pioche en acier +Mese Pickaxe=Pioche de Mese +Diamond Pickaxe=Pioche en diamant +Wooden Shovel=Pelle en bois +Stone Shovel=Pelle en pierre +Bronze Shovel=Pelle en bronze +Steel Shovel=Pelle en acier +Mese Shovel=Pelle en Mese +Diamond Shovel=Pelle en diamant +Wooden Axe=Hache en bois +Stone Axe=Hache en pierre +Bronze Axe=Hache en bronze +Steel Axe=Hache en acier +Mese Axe=Hache en Mese +Diamond Axe=Hache en diamant +Wooden Sword=Epée en bois +Stone Sword=Epée en pierre +Bronze Sword=Epée en bronze +Steel Sword=Epée en acier +Mese Sword=Epée en Mese +Diamond Sword=Epée en diamant +Key=Clé +Torch=Torche +@1 will intersect protection on growth.=@1 chevauchera la zone protégée avec la croissance. +Title:=Titre : +Contents:=Contenu : +Save=Sauvegarder +by @1=de @1 +Page @1 of @2=Page @1 sur @2 +"@1"=« @1 » diff --git a/mods/default/locale/default.id.tr b/mods/default/locale/default.id.tr new file mode 100644 index 0000000..7a0406c --- /dev/null +++ b/mods/default/locale/default.id.tr @@ -0,0 +1,211 @@ +# textdomain: default +Stone=Batu +Cobblestone=Bongkahan Batu +Stone Brick=Tembok Batu +Stone Block=Balok Batu +Mossy Cobblestone=Bongkahan Batu Berlumut +Desert Stone=Batu Gurun +Desert Cobblestone=Bongkahan Batu Gurun +Desert Stone Brick=Tembok Batu Gurun +Desert Stone Block=Balok Batu Gurun +Sandstone=Batu Pasir +Sandstone Brick=Tembok Batu Pasir +Sandstone Block=Balok Batu Pasir +Desert Sandstone=Batu Pasir Gurun +Desert Sandstone Brick=Tembok Batu Pasir Gurun +Desert Sandstone Block=Balok Batu Pasir Gurun +Silver Sandstone=Batu Pasir Perak +Silver Sandstone Brick=Tembok Batu Pasir Perak +Silver Sandstone Block=Balok Batu Pasir Perak +Obsidian=Obsidian +Obsidian Brick=Tembok Obsidian +Obsidian Block=Balok Obsidian +Dirt=Tanah +Dirt with Grass=Tanah Berumput +Dirt with Grass and Footsteps=Tanah Berumput dan Tapak Kaki +Dirt with Savanna Grass=Tanah Berumput Sabana +Dirt with Snow=Tanah Bersalju +Dirt with Rainforest Litter=Tanah Berserasah Hutan Hujan +Dirt with Coniferous Litter=Tanah Berserasah Hutan Konifer +Savanna Dirt=Tanah Sabana +Savanna Dirt with Savanna Grass=Tanah Sabana Berumput Sabana +Permafrost=Ibun Abadi +Permafrost with Stones=Ibun Abadi Berbatu +Permafrost with Moss=Ibun Abadi Berlumut +Sand=Pasir +Desert Sand=Pasir Gurun +Silver Sand=Pasir Perak +Gravel=Kerikil +Clay=Semen +Snow=Salju +Snow Block=Balok Salju +Ice=Es +Cave Ice=Es Gua +Apple Tree=Pohon Apel +Apple Wood Planks=Papan Kayu Pohon Apel +Apple Tree Sapling=Bibit Apel +Apple Tree Leaves=Daun Pohon Apel +Apple=Apel +Apple Marker=Penanda Apel +Jungle Tree=Pohon Hutan Rimba +Jungle Wood Planks=Papan Kayu Pohon Rimba +Jungle Tree Leaves=Daun Pohon Rimba +Jungle Tree Sapling=Bibit Pohon Rimba +Emergent Jungle Tree Sapling=Bibit Bertumbuh Pohon Rimba +Pine Tree=Pohon Pinus +Pine Wood Planks=Papan Kayu Pinus +Pine Needles=Daun Pinus +Pine Tree Sapling=Bibit Pinus +Acacia Tree=Pohon Akasia +Acacia Wood Planks=Papan Kayu Akasia +Acacia Tree Leaves=Daun Akasia +Acacia Tree Sapling=Bibit Akasia +Aspen Tree=Pohon Aspen +Aspen Wood Planks=Papan Kayu Aspen +Aspen Tree Leaves=Daun Aspen +Aspen Tree Sapling=Bibit Aspen +Coal Ore=Bijih Batu Bara +Coal Block=Balok Batu Bara +Iron Ore=Biji Besi +Steel Block=Balok Baja +Copper Ore=Bijih Tembaga +Copper Block=Balok Tembaga +Tin Ore=Bijih Timah +Tin Block=Balok Timah +Bronze Block=Balok Perunggu +Mese Ore=Bijih Mese +Mese Block=Balok Mese +Gold Ore=Bijih Emas +Gold Block=Balok Emas +Diamond Ore=Bijih Berlian +Diamond Block=Balok Berlian +Cactus=Kaktus +Large Cactus Seedling=Bibit Kaktus Besar +Papyrus=Papirus +Dry Shrub=Semak Kering +Jungle Grass=Rumput Rimba +Grass=Rumput +Savanna Grass=Rumput Sabana +Fern=Pakis +Marram Grass=Rumput Pantai +Bush Stem=Batang Semak +Bush Leaves=Daun Semak +Bush Sapling=Bibit Semak +Blueberry Bush Leaves with Berries=Daun Bluberi Berbuah +Blueberry Bush Leaves=Daun Bluberi +Blueberry Bush Sapling=Bibit Bluberi +Acacia Bush Stem=Batang Semak Akasia +Acacia Bush Leaves=Daun Semak Akasia +Acacia Bush Sapling=Bibit Semak Akasia +Pine Bush Stem=Batang Semak Pinus +Pine Bush Needles=Daun Semak Pinus +Pine Bush Sapling=Bibit Semak Pinus +Kelp=Kelp +Green Coral=Koral Hijau +Pink Coral=Koral Jambon +Cyan Coral=Koral Sian +Brown Coral=Koral Cokelat +Orange Coral=Koral Oranye +Coral Skeleton=Kerangka Koral +Water Source=Mata Air +Flowing Water=Aliran Air +River Water Source=Mata Air Sungai +Flowing River Water=Aliran Air Sungai +Lava Source=Sumber Lava +Flowing Lava=Aliran Lava +Empty Bookshelf=Rak Buku Kosong +Bookshelf (@1 written, @2 empty books)=Rak Buku (@1 buku tertulis, @2 buku kosong) +Bookshelf=Rak Buku +Text too long=Teks terlalu panjang +Wooden Sign=Penanda Kayu +Steel Sign=Penanda Baja +Wooden Ladder=Tangga Kayu +Steel Ladder=Tangga Baja +Apple Wood Fence=Pagar Kayu Apel +Acacia Wood Fence=Pagar Akasia +Jungle Wood Fence=Pagar Kayu Rimba +Pine Wood Fence=Pagar Pinus +Aspen Wood Fence=Pagar Aspen +Apple Wood Fence Rail=Rel Pagar Kayu Apel +Acacia Wood Fence Rail=Rel Pagar Akasia +Jungle Wood Fence Rail=Rel Pagar Kayu Rimba +Pine Wood Fence Rail=Rel Pagar Pinus +Aspen Wood Fence Rail=Rel Pagar Aspen +Glass=Kaca +Obsidian Glass=Kaca Obsidian +Brick Block=Balok Bata +Mese Lamp=Lampu Mese +Mese Post Light=Lampu Taman Mese +Cloud=Awan +@1 will intersect protection on growth.=@1 akan memotong perlindungan ketika tumbuh. +Torch=Obor +Wooden Pickaxe=Beliung Kayu +Stone Pickaxe=Beliung Batu +Bronze Pickaxe=Beliung Perunggu +Steel Pickaxe=Beliung Baja +Mese Pickaxe=Beliung Mese +Diamond Pickaxe=Beliung Berlian +Wooden Shovel=Sekop Kayu +Stone Shovel=Sekop Batu +Bronze Shovel=Sekop Perunggu +Steel Shovel=Sekop Baja +Mese Shovel=Sekop Mese +Diamond Shovel=Sekop Berlian +Wooden Axe=Kapak Kayu +Stone Axe=Kapak Batu +Bronze Axe=Kapak Perunggu +Steel Axe=Kapak Baja +Mese Axe=Kapak Mese +Diamond Axe=Kapak Berlian +Wooden Sword=Pedang Kayu +Stone Sword=Pedang Batu +Bronze Sword=Pedang Perunggu +Steel Sword=Pedang Baja +Mese Sword=Pedang Mese +Diamond Sword=Pedang Berlian +Key=Kunci +Furnace is empty=Tungku kosong +100% (output full)=100% (keluaran penuh) +@1%=@1% +Not cookable=Tidak bisa dimasak +Empty=Kosong +Furnace active=Tungku nyala +Furnace inactive=Tungku mati +(Item: @1; Fuel: @2)=(Barang: @1; Bahan Bakar: @2) +Furnace=Tungku +Title:=Judul: +Contents:=Isi: +Save=Simpan +by @1=oleh @1 +Page @1 of @2=Halaman @1 dari @2 +"@1"="@1" +"@1" by @2="@1" oleh @2 +Skeleton Key=Kunci Induk +Key to @1's @2=Kunci @2 milik @1 +Blueberries=Bluberi +Book=Buku +Book with Text=Buku Tertulis +Bronze Ingot=Perunggu Batangan +Clay Brick=Bata +Clay Lump=Bongkahan Semen +Coal Lump=Bongkahan Batu Bara +Copper Ingot=Tembaga Batangan +Copper Lump=Bongkahan Tembaga +Diamond=Berlian +Flint=Batu Api +Gold Ingot=Emas Batangan +Gold Lump=Bongkahan Emas +Iron Lump=Bongkahan Besi +Mese Crystal=Kristal Mese +Mese Crystal Fragment=Pecahan Kristal Mese +Obsidian Shard=Pecahan Obsidian +Paper=Kertas +Steel Ingot=Baja Batangan +Stick=Tongkat +Tin Ingot=Timah Batangan +Tin Lump=Bongkahan Timah +Locked Chest=Peti Terkunci +Locked Chest (owned by @1)=Peti Terkunci (milik @1) +You do not own this chest.=Anda bukan pemilik peti ini. +a locked chest=suatu peti terkunci +Chest=Peti diff --git a/mods/default/locale/default.it.tr b/mods/default/locale/default.it.tr new file mode 100644 index 0000000..ea3ee20 --- /dev/null +++ b/mods/default/locale/default.it.tr @@ -0,0 +1,205 @@ +# textdomain: default +Locked Chest=Baule chiuso a chiave +Locked Chest (owned by @1)=Baule chiuso a chiave (di proprietà di @1) +You do not own this chest.=Questo baule non ti appartiene. +a locked chest=un baule chiuso a chiave +Chest=Baule +Stick=Bastone +Paper=Carta +"@1" by @2="@1" di @2 +Book=Libro +Book with Text=Libro con testo +Skeleton Key=Chiave dello Scheletro +Key to @1's @2=Chiave per @2 di @1 +Coal Lump=Grumo di carbone +Iron Lump=Grumo di ferro +Copper Lump=Grumo di rame +Tin Lump=Grumo di stagno +Mese Crystal=Cristallo di mese +Gold Lump=Grumo d'oro +Diamond=Diamante +Clay Lump=Grumo d'argilla +Steel Ingot=Lingotto d'acciaio +Copper Ingot=Lingotto di rame +Tin Ingot=Lingotto di stagno +Bronze Ingot=Lingotto di bronzo +Gold Ingot=Lingotto d'oro +Mese Crystal Fragment=Frammento di cristallo di mese +Clay Brick=Mattone d'argilla +Obsidian Shard=Scheggia d'ossidiana +Flint=Selce +Blueberries=Mirtilli +Furnace is empty=La fornace è vuota +100% (output full)=100% (uscita piena) +@1%=@1% +Empty=Vuota +Not cookable=Non cucinabile +Furnace active=Fornace attiva +Furnace inactive=Fornace inattiva +(Item: @1; Fuel: @2)=(Oggetto: @1; Combustibile: @2) +Furnace=Fornace +Stone=Pietra +Cobblestone=Ciottoli +Stone Brick=Mattone di pietra +Stone Block=Blocco di pietra +Mossy Cobblestone=Ciottoli muschiosi +Desert Stone=Pietra del deserto +Desert Cobblestone=Ciottoli del deserto +Desert Stone Brick=Mattone di pietra del deserto +Desert Stone Block=Blocco di pietra del deserto +Sandstone=Arenaria +Sandstone Brick=Mattone d'arenaria +Sandstone Block=Blocco d'arenaria +Desert Sandstone=Arenaria del deserto +Desert Sandstone Brick=Mattone d'arenaria del deserto +Desert Sandstone Block=Blocco d'arenaria del deserto +Silver Sandstone=Arenaria argentata +Silver Sandstone Brick=Mattone d'arenaria argentata +Silver Sandstone Block=Blocco d'arenaria argentata +Obsidian=Ossidiana +Obsidian Brick=Mattone d'ossidiana +Obsidian Block=Blocco d'ossidiana +Dirt=Terra +Dirt with Grass=Terra con erba +Dirt with Grass and Footsteps=Terra con erba e impronte +Dirt with Dry Grass=Terra con erba secca +Dirt with Snow=Terra con neve +Dirt with Rainforest Litter=Terra con detriti della foresta pluviale +Dirt with Coniferous Litter=Terra con detriti di conifera +Dry Dirt=Terra asciutta +Dry Dirt with Dry Grass=Terra asciutta con erba secca +Permafrost=Permafrost +Permafrost with Stones=Permafrost con pietra +Permafrost with Moss=Permafrost con muschio +Sand=Sabbia +Desert Sand=Sabbia del deserto +Silver Sand=Sabbia argentata +Gravel=Ghiaia +Clay=Argilla +Snow=Neve +Snow Block=Blocco di neve +Ice=Ghiaccio +Cave Ice=Ghiaccio di caverna +Apple Tree=Melo +Apple Wood Planks=Assi di melo +Apple Tree Sapling=Alberello di melo +Apple Tree Leaves=Foglie di melo +Apple=Mela +Apple Marker=Marcatore mela +Jungle Tree=Albero della giungla +Jungle Wood Planks=Assi di legno della giungla +Jungle Tree Leaves=Foglie di albero della giungla +Jungle Tree Sapling=Alberello della giungla +Emergent Jungle Tree Sapling=Alberello della giungla emergente +Pine Tree=Pino +Pine Wood Planks=Assi di legno di pino +Pine Needles=Aghi di pino +Pine Tree Sapling=Alberello di pino +Acacia Tree=Acacia +Acacia Wood Planks=Assi di legno d'acacia +Acacia Tree Leaves=Foglie d'acacia +Acacia Tree Sapling=Alberello d'acacia +Aspen Tree=Pioppo +Aspen Wood Planks=Assi di legno di pioppo +Aspen Tree Leaves=Foglie di pioppo +Aspen Tree Sapling=Alberello di pioppo +Coal Ore=Minerale di carbone +Coal Block=Blocco di carbone +Iron Ore=Minerale di ferro +Steel Block=Blocco d'acciaio +Copper Ore=Minerale di rame +Copper Block=Blocco di rame +Tin Ore=Minerale di stagno +Tin Block=Blocco di stagno +Bronze Block=Blocco di bronzo +Mese Ore=Minerale di mese +Mese Block=Blocco di mese +Gold Ore=Minerale d'oro +Gold Block=Blocco d'oro +Diamond Ore=Minerale di diamante +Diamond Block=Blocco di diamante +Cactus=Cactus +Large Cactus Seedling=Piantina di cactus grande +Papyrus=Papiro +Dry Shrub=Arbusto secco +Jungle Grass=Erba della giungla +Grass=Erba +Dry Grass=Erba secca +Fern=Felce +Marram Grass=Ammofila arenaria +Bush Stem=Fusto di cespuglio +Bush Leaves=Foglie di cespuglio +Bush Sapling=Alberello di cespuglio +Blueberry Bush Leaves with Berries=Foglie di cespuglio di mirtilli con bacche +Blueberry Bush Leaves=Foglie di cespuglio di mirtilli +Blueberry Bush Sapling=Alberello di cespuglio di mirtilli +Acacia Bush Stem=Fusto di cespuglio d'acacia +Acacia Bush Leaves=Foglie di cespuglio d'acacia +Acacia Bush Sapling=Alberello di cespuglio d'acacia +Pine Bush Stem=Fusto di cespuglio di pino +Pine Bush Needles=Aghi di cespuglio di pino +Pine Bush Sapling=Alberello di cespuglio di pino +Kelp=Alga +Green Coral=Corallo verde +Pink Coral=Corallo rosa +Cyan Coral=Corallo ciano +Brown Coral=Corallo marrone +Orange Coral=Corallo arancione +Coral Skeleton=Scheletro di corallo +Water Source=Fonte d'acqua +Flowing Water=Acqua corrente +River Water Source=Fonte d'acqua di fiume +Flowing River Water=Acqua corrente di fiume +Lava Source=Fonte di lava +Flowing Lava=Lava corrente +Empty Bookshelf=Libreria vuota +Bookshelf (@1 written, @2 empty books)=Libreria (@1 scritti, @2 vuoti) +Bookshelf=Libreria +Text too long=Testo troppo lungo +Wooden Sign=Cartello di legno +Steel Sign=Cartello d'acciaio +Wooden Ladder=Scala a pioli di legno +Steel Ladder=Scala a pioli d'acciaio +Apple Wood Fence=Recinzione di legno di melo +Acacia Wood Fence=Recinzione di legno d'acacia +Jungle Wood Fence=Recinzione di legno della giungla +Pine Wood Fence=Recinzione di legno di pino +Aspen Wood Fence=Recinzione di legno di pioppo +Apple Wood Fence Rail=Ringhiera della recinzione di legno di melo +Acacia Wood Fence Rail=Ringhiera della recinzione di legno d'acacia +Jungle Wood Fence Rail=Ringhiera della recinzione di legno della giungla +Pine Wood Fence Rail=Ringhiera della recinzione di legno di pino +Aspen Wood Fence Rail=Ringhiera della recinzione di legno di pioppo +Glass=Vetro +Obsidian Glass=Vetro d'ossidiana +Brick Block=Blocco di mattone +Mese Lamp=Lampada di mese +Mese Post Light=Lampioncino di mese +Cloud=Nuvola +Wooden Pickaxe=Piccone di legno +Stone Pickaxe=Piccone di pietra +Bronze Pickaxe=Piccone di bronzo +Steel Pickaxe=Piccone d'acciaio +Mese Pickaxe=Piccone di mese +Diamond Pickaxe=Piccone di diamante +Wooden Shovel=Pala di legno +Stone Shovel=Pala di pietra +Bronze Shovel=Pala di bronzo +Steel Shovel=Pala d'acciaio +Mese Shovel=Pala di mese +Diamond Shovel=Pala di diamante +Wooden Axe=Ascia di legno +Stone Axe=Ascia di pietra +Bronze Axe=Ascia di bronzo +Steel Axe=Ascia d'acciaio +Mese Axe=Ascia di mese +Diamond Axe=Ascia di diamante +Wooden Sword=Spada di legno +Stone Sword=Spada di pietra +Bronze Sword=Spada di bronzo +Steel Sword=Spada d'acciaio +Mese Sword=Spada di mese +Diamond Sword=Spada di diamante +Key=Chiave +Torch=Torcia +@1 will intersect protection on growth.=@1 crescendo attraverserà la protezione. diff --git a/mods/default/locale/default.ms.tr b/mods/default/locale/default.ms.tr new file mode 100644 index 0000000..b82c201 --- /dev/null +++ b/mods/default/locale/default.ms.tr @@ -0,0 +1,211 @@ +# textdomain: default +Locked Chest=Peti Berkunci +Locked Chest (owned by @1)=Peti Berkunci (milik @1) +You do not own this chest.=Ini bukan peti milik anda. +a locked chest=peti berkunci +Chest=Peti +Stick=Serpihan Kayu +Paper=Kertas +"@1" by @2="@1" oleh @2 +Book=Buku +Book with Text=Buku Bertulisan +Skeleton Key=Kunci Induk +Key to @1's @2=Kunci @2 milik @1 +Coal Lump=Longgokan Batu Arang +Iron Lump=Longgokan Besi +Copper Lump=Longgokan Tembaga +Tin Lump=Longgokan Timah +Mese Crystal=Kristal Mese +Gold Lump=Longgokan Emas +Diamond=Berlian +Clay Lump=Longgokan Tanah Liat +Steel Ingot=Jongkong Keluli +Copper Ingot=Jongkong Tembaga +Tin Ingot=Jongkong Timah +Bronze Ingot=Jongkong Gangsa +Gold Ingot=Jongkong Emas +Mese Crystal Fragment=Serpihan Mese +Clay Brick=Bata Tanah Liat +Obsidian Shard=Serpihan Obsidia +Flint=Batu Api +Blueberries=Beri Biru +Furnace is empty=Relau masih kosong +100% (output full)=100% (keluaran penuh) +@1%=@1% +Empty=Kosong +Not cookable=Tidak boleh dimasak +Furnace active=Relau aktif +Furnace inactive=Relau tidak aktif +(Item: @1; Fuel: @2)=(Item: @1; Bahan api: @2) +Furnace=Relau +Stone=Batu +Cobblestone=Batu Buntar +Stone Brick=Bata Batu +Stone Block=Bongkah Batu +Mossy Cobblestone=Batu Buntar Berlumut +Desert Stone=Batu Gurun +Desert Cobblestone=Batu Buntar Gurun +Desert Stone Brick=Bata Batu Gurun +Desert Stone Block=Bongkah Batu Gurun +Sandstone=Batu Pasir +Sandstone Brick=Bata Batu Pasir +Sandstone Block=Bongkah Batu Pasir +Desert Sandstone=Batu Pasir Gurun +Desert Sandstone Brick=Bata Batu Pasir Gurun +Desert Sandstone Block=Bongkah Batu Pasir Gurun +Silver Sandstone=Batu Pasir Perak +Silver Sandstone Brick=Bata Batu Pasir Perak +Silver Sandstone Block=Bongkah Batu Pasir Perak +Obsidian=Obsidia +Obsidian Brick=Bata Obsidia +Obsidian Block=Bongkah Obsidia +Dirt=Tanah +Dirt with Grass=Tanah Berumput +Dirt with Grass and Footsteps=Tanah Berumput dan Tapak Kaki +Dirt with Dry Grass=Tanah Berumput Kering +Dirt with Snow=Tanah Bersalji +Dirt with Rainforest Litter=Tanah Bersarap Hutan Hujan +Dirt with Coniferous Litter=Tanah Bersarap Hutan Konifer +Dry Dirt=Tanah Kering +Dry Dirt with Dry Grass=Tanah Kering Berumput Kering +Permafrost=Ibun Abadi +Permafrost with Stones=Ibun Abadi Berbatu +Permafrost with Moss=Ibun Abadi Berlumut +Sand=Pasir +Desert Sand=Pasir Gurun +Silver Sand=Pasir Perak +Gravel=Kelikir +Clay=Tanah Liat +Snow=Salji +Snow Block=Bongkah Salji +Ice=Ais +Cave Ice=Ais Gua +Apple Tree=Kayu Pokok Epal +Apple Wood Planks=Papan Kayu Epal +Apple Tree Sapling=Anak Pokok Epal +Apple Tree Leaves=Daun Pokok Epal +Apple=Epal +Apple Marker=Penanda Epal +Jungle Tree=Kayu Pokok Hutan +Jungle Wood Planks=Papan Kayu Hutan +Jungle Tree Leaves=Daun Pokok Hutan +Jungle Tree Sapling=Anak Pokok Hutan +Emergent Jungle Tree Sapling=Anak Pokok Hutan Kembang +Pine Tree=Kayu Pokok Pain +Pine Wood Planks=Papan Kayu Pain +Pine Needles=Daun Pokok Pain +Pine Tree Sapling=Anak Pokok Pain +Acacia Tree=Kayu Pokok Akasia +Acacia Wood Planks=Papan Kayu Akasia +Acacia Tree Leaves=Daun Pokok Akasia +Acacia Tree Sapling=Anak Pokok Akasia +Aspen Tree=Kayu Pokok Aspen +Aspen Wood Planks=Papan Kayu Aspen +Aspen Tree Leaves=Daun Pokok Aspen +Aspen Tree Sapling=Anak Pokok Aspen +Coal Ore=Bijih Batu Arang +Coal Block=Bongkah Batu Arang +Iron Ore=Bijih Besi +Steel Block=Bongkah Keluli +Copper Ore=Bijih Tembaga +Copper Block=Bongkah Tembaga +Tin Ore=Bijih Timah +Tin Block=Bongkah Timah +Bronze Block=Bongkah Gangsa +Mese Ore=Bijih Mese +Mese Block=Bongkah Mese +Gold Ore=Bijih Emas +Gold Block=Bongkah Emas +Diamond Ore=Bijih Intan +Diamond Block=Bongkah Intan +Cactus=Kaktus +Large Cactus Seedling=Benih Kaktus Besar +Papyrus=Papirus +Dry Shrub=Pokok Renek Kering +Jungle Grass=Rumput Hutan +Grass=Rumput +Dry Grass=Rumput Kering +Fern=Paku Pakis +Marram Grass=Rumput Maram +Bush Stem=Batang Belukar +Bush Leaves=Daun Belukar +Bush Sapling=Anak Belukar +Blueberry Bush Leaves with Berries=Daun Belukar Beri Biru Berberi +Blueberry Bush Leaves=Daun Belukar Beri Biru +Blueberry Bush Sapling=Anak Belukar Beri Biru +Acacia Bush Stem=Batang Belukar Akasia +Acacia Bush Leaves=Daun Belukar Akasia +Acacia Bush Sapling=Anak Belukar Akasia +Pine Bush Stem=Batang Belukar Pain +Pine Bush Needles=Daun Belukar Pain +Pine Bush Sapling=Anak Belukar Pain +Kelp=Kelpa +Green Coral=Batu Karang Hijau +Pink Coral=Batu Karang Merah Jambu +Cyan Coral=Batu Karang Biru Kehijauan +Brown Coral=Batu Karang Perang +Orange Coral=Batu Karang Jingga +Coral Skeleton= Rangka Karang +Water Source=Sumber Air +Flowing Water=Air Mengalir +River Water Source=Sumber Air Sungai +Flowing River Water=Air Sungai Mengalir +Lava Source=Sumber Lava +Flowing Lava=Lava Mengalir +Empty Bookshelf=Rak Buku Kosong +Bookshelf (@1 written, @2 empty books)=Rak Buku (@1 buku bertulis, @2 buku kosong) +Bookshelf=Rak Buku +Text too long=Tulisan terlalu panjang +Wooden Sign=Papan Tanda Kayu +Steel Sign=Papan Tanda Keluli +Wooden Ladder=Tangga Panjat Kayu +Steel Ladder=Tangga Panjat Keluli +Apple Wood Fence=Pagar Kayu Epal +Acacia Wood Fence=Pagar Kayu Akasia +Jungle Wood Fence=Pagar Kayu Hutan +Pine Wood Fence=Pagar Kayu Pain +Aspen Wood Fence=Pagar Kayu Aspen +Apple Wood Fence Rail=Pagar Rel Kayu Epal +Acacia Wood Fence Rail=Pagar Rel Kayu Akasia +Jungle Wood Fence Rail=Pagar Rel Kayu Hutan +Pine Wood Fence Rail=Pagar Rel Kayu Pain +Aspen Wood Fence Rail=Pagar Rel Kayu Aspen +Glass=Kaca +Obsidian Glass=Kaca Obsidia +Brick Block=Bongkah Bata +Mese Lamp=Lampu Mese +Mese Post Light=Lampu Tiang Mese +Cloud=Awan +Wooden Pickaxe=Beliung Kayu +Stone Pickaxe=Beliung Batu +Bronze Pickaxe=Beliung Gangsa +Steel Pickaxe=Beliung Keluli +Mese Pickaxe=Beliung Mese +Diamond Pickaxe=Beliung Intan +Wooden Shovel=Penyodok Kayu +Stone Shovel=Penyodok Batu +Bronze Shovel=Penyodok Gangsa +Steel Shovel=Penyodok Keluli +Mese Shovel=Penyodok Mese +Diamond Shovel=Penyodok Intan +Wooden Axe=Kapak Kayu +Stone Axe=Kapak Batu +Bronze Axe=Kapak Gangsa +Steel Axe=Kapak Keluli +Mese Axe=Kapak Mese +Diamond Axe=Kapak Intan +Wooden Sword=Pedang Kayu +Stone Sword=Pedang Batu +Bronze Sword=Pedang Gangsa +Steel Sword=Pedang Keluli +Mese Sword=Pedang Mese +Diamond Sword=Pedang Intan +Key=Kunci +Torch=Obor +@1 will intersect protection on growth.=@1 akan masuk kawasan perlindungan lain apabila ia tumbuh. +Title:=Tajuk: +Contents:=Kandungan: +Save=Simpan +by @1=oleh @1 +Page @1 of @2=Ms. @1 / @2 +"@1"="@1" diff --git a/mods/default/locale/default.ru.tr b/mods/default/locale/default.ru.tr new file mode 100644 index 0000000..71a032f --- /dev/null +++ b/mods/default/locale/default.ru.tr @@ -0,0 +1,211 @@ +# textdomain: default +Locked Chest=Заблокированный Сундук +Locked Chest (owned by @1)=Заблокированный Сундук (владелец: @1) +You do not own this chest.=Вы не владелец этого сундука. +a locked chest=заблокированный сундук +Chest=Сундук +Stick=Палка +Paper=Бумага +"@1" by @2="@1" @2 +Book=Книга +Book with Text=Книга с Текстом +Skeleton Key=Ключ Скелета +Key to @1's @2=Ключ к @2 от @1 +Coal Lump=Кусок Угля +Iron Lump=Кусок Железа +Copper Lump=Кусок Меди +Tin Lump=Кусок Олова +Mese Crystal=Кристалл Месе +Gold Lump=Кусок Золота +Diamond=Алмаз +Clay Lump=Ком Глины +Steel Ingot=Железный Слиток +Copper Ingot=Медный Слиток +Tin Ingot=Оловянный Слиток +Bronze Ingot=Бронзовый Слиток +Gold Ingot=Золотой Слиток +Mese Crystal Fragment=Осколок Кристалла Месе +Clay Brick=Глиняный Кирпич +Obsidian Shard=Обсидиановый Осколок +Flint=Кремень +Blueberries=Черника +Furnace is empty=Печь пуста +100% (output full)=100% (полное приготовление) +@1%=@1% +Empty=Пустое +Not cookable=Не может быть приготовлено +Furnace active=Печь зажжена +Furnace inactive=Печь не зажжена +(Item: @1; Fuel: @2)=(Предмет: @1; Топливо: @2) +Furnace=Печь +Stone=Камень +Cobblestone=Булыжник +Stone Brick=Каменный Кирпич +Stone Block=Каменный Блок +Mossy Cobblestone=Мшистый Булыжник +Desert Stone=Пустынный Камень +Desert Cobblestone=Пустынный Булыжник +Desert Stone Brick=Пустынный Каменный Кирпич +Desert Stone Block=Пустынный Каменный Блок +Sandstone=Песчаник +Sandstone Brick=Песчаниковый Кирпич +Sandstone Block=Песчаниковый Блок +Desert Sandstone=Пустынный Песчаник +Desert Sandstone Brick=Пустынный Песчаниковый Кирпич +Desert Sandstone Block=Пустынный Песчаниковый Блок +Silver Sandstone=Серебряный Песчаник +Silver Sandstone Brick=Серебряный Песчаниковый Кирпич +Silver Sandstone Block=Серебряный Песчаниковый Блок +Obsidian=Обсидиан +Obsidian Brick=Обсидиановый Кирпич +Obsidian Block=Обсидиановый Блок +Dirt=Земля +Dirt with Grass=Земля с Травой +Dirt with Grass and Footsteps=Земля с Травой и Следами +Dirt with Dry Grass=Земля с Сухой Травой +Dirt with Snow=Земля Со Снегом +Dirt with Rainforest Litter=Земля с Тропической Подстилкой +Dirt with Coniferous Litter=Земля с Сосновой Подстилкой +Dry Dirt=Сухая Земля +Dry Dirt with Dry Grass=Сухая Земля с Сухой Травой +Permafrost=Замороженная Почва +Permafrost with Stones=Замороженная Почва с Камнями +Permafrost with Moss=Замороженная Почва с Мхом +Sand=Песок +Desert Sand=Пустынный Песок +Silver Sand=Серебряный Песок +Gravel=Гравий +Clay=Глиняный Блок +Snow=Снег +Snow Block=Снежный Блок +Ice=Лёд +Cave Ice=Пещерный Лёд +Apple Tree=Ствол Яблони +Apple Wood Planks=Яблоневые Доски +Apple Tree Sapling=Саженец Яблони +Apple Tree Leaves=Яблоневая Листва +Apple=Яблоко +Apple Marker=Яблочная Метка +Jungle Tree=Ствол Тропического Дерева +Jungle Wood Planks=Доски из Тропического Дерева +Jungle Tree Leaves=Листва Тропического Дерева +Jungle Tree Sapling=Саженец Тропического Дерева +Emergent Jungle Tree Sapling=Выросший Саженец Тропического Дерева +Pine Tree=Сосновый Ствол +Pine Wood Planks=Сосновые Доски +Pine Needles=Сосновая Хвоя +Pine Tree Sapling=Саженец Сосны +Acacia Tree=Ствол Акации +Acacia Wood Planks=Доски Акации +Acacia Tree Leaves=Листва Акации +Acacia Tree Sapling=Саженец Акации +Aspen Tree=Ствол Осины +Aspen Wood Planks=Осиновые Доски +Aspen Tree Leaves=Осиновая Листва +Aspen Tree Sapling=Саженец Осины +Coal Ore=Уголь +Coal Block=Угольный Блок +Iron Ore=Железная Руда +Steel Block=Стальной Блок +Copper Ore=Медная Руда +Copper Block=Медный Блок +Tin Ore=Оловянная Руда +Tin Block=Оловянный Блок +Bronze Block=Бронзовый Блок +Mese Ore=Месевая Руда +Mese Block=Месевый Блок +Gold Ore=Золотая Руда +Gold Block=Золотой Блок +Diamond Ore=Алмаз +Diamond Block=Алмазный Блок +Cactus=Кактус +Large Cactus Seedling=Саженец Кактуса +Papyrus=Папирус +Dry Shrub=Сухой Куст +Jungle Grass=Тропическая Трава +Grass=Трава +Dry Grass=Сухая Трава +Fern=Папоротник +Marram Grass=Песколюб +Bush Stem=Стебли Куста +Bush Leaves=Листья Куста +Bush Sapling=Саженец Куста +Blueberry Bush Leaves with Berries=Куст Черники с Ягодами +Blueberry Bush Leaves=Куст Черники +Blueberry Bush Sapling=Саженец Куста Черники +Acacia Bush Stem=Стебли Куста Акации +Acacia Bush Leaves=Листья Куста Акации +Acacia Bush Sapling=Саженец Куста Акации +Pine Bush Stem=Стебли Хвойного Куста +Pine Bush Needles=Хвоя Куста +Pine Bush Sapling=Саженец Хвойного Куста +Kelp=Ламинария +Green Coral=Зеленый Коралл +Pink Coral=Розовый Коралл +Cyan Coral=Голубой Коралл +Brown Coral=Коричневый Коралл +Orange Coral=Оранжевый Коралл +Coral Skeleton=Коралловый Остов +Water Source=Водный Источник +Flowing Water=Текущая Вода +River Water Source=Речной Водный Источник +Flowing River Water=Текущая Речная Вода +Lava Source=Лавовый Источник +Flowing Lava=Текущая Лава +Empty Bookshelf=Пустая Книжная Полка +Bookshelf (@1 written, @2 empty books)=Книжная Полка (@1 написано, @2 чистые книги) +Bookshelf=Книжная Полка +Text too long=Текст слишком длинный +Wooden Sign=Деревянная Табличка +Steel Sign=Стальная Табличка +Wooden Ladder=Деревянная Лестница +Steel Ladder=Стальная Лестница +Apple Wood Fence=Яблоневый Деревянный Забор +Acacia Wood Fence=Деревянный Забор Из Акации +Jungle Wood Fence=Деревянный Забор Из Тропического Дерева +Pine Wood Fence=Сосновый Деревянный Забор +Aspen Wood Fence=Осиновый Деревянный Забор +Apple Wood Fence Rail=Яблоневый Деревянный Реечный Забор +Acacia Wood Fence Rail=Деревянный Реечный Забор Из Акации +Jungle Wood Fence Rail=Деревянный Реечный Забор Из Тропического Дерева +Pine Wood Fence Rail=Сосновый Деревянный Реечный Забор +Aspen Wood Fence Rail=Осиновый Деревянный Реечный Забор +Glass=Стекло +Obsidian Glass=Обсидиановое Стекло +Brick Block=Кирпичный Блок +Mese Lamp=Месе Лампа +Mese Post Light=Столб с Месе Фонарем +Cloud=Облако +Wooden Pickaxe=Деревянная Кирка +Stone Pickaxe=Каменная Кирка +Bronze Pickaxe=Бронзовая Кирка +Steel Pickaxe=Стальная Кирка +Mese Pickaxe=Месе Кирка +Diamond Pickaxe=Алмазная Кирка +Wooden Shovel=Деревянная Лопата +Stone Shovel=Каменная Лопата +Bronze Shovel=Бронзовая Лопата +Steel Shovel=Стальная Лопата +Mese Shovel=Месе Лопата +Diamond Shovel=Алмазная Лопата +Wooden Axe=Деревянный Топор +Stone Axe=Каменный Топор +Bronze Axe=Бронзовый Топор +Steel Axe=Стальной Топор +Mese Axe=Месе Топор +Diamond Axe=Алмазный Топор +Wooden Sword=Деревянный Меч +Stone Sword=Каменный Меч +Bronze Sword=Бронзовый Меч +Steel Sword=Стальной Меч +Mese Sword=Месе Меч +Diamond Sword=Алмазный Меч +Key=Ключ +Torch=Факел +@1 will intersect protection on growth.=@1 пересечёт защиту по росту. +Title:=Заголовок: +Contents:=Содержимое: +Save=Сохранить +by @1=@1 +Page @1 of @2=Страница @1 из @2 +"@1"="@1" diff --git a/mods/default/locale/default.se.tr b/mods/default/locale/default.se.tr new file mode 100644 index 0000000..d123530 --- /dev/null +++ b/mods/default/locale/default.se.tr @@ -0,0 +1,211 @@ +## textdomain: default +Locked Chest=Låst kista +Locked Chest (owned by @1)=Låst kista (Ägd av @1) +You do not own this chest.=Du äger inte denna kistan. +a locked chest=en låst kista +Chest=Kista +Stick=Pinne +Paper=Papper +"@1" by @2="@1" av @2 +Book=Bok +Book with Text=Bok med text +Skeleton Key=Skelett Nyckel +Key to @1's @2=Nyckel till @1s @2 +Coal Lump=Kol Klumo +Iron Lump=Järn Klump +Copper Lump=Koppar Klump +Tin Lump=Tenn Klump +Mese Crystal=Mese Kristall +Gold Lump=Guld Klump +Diamond=Diamant +Clay Lump=Lerklump +Steel Ingot=Stål tacka +Copper Ingot=Koppar tacka +Tin Ingot=Tenn tacka +Bronze Ingot=Brons tacka +Gold Ingot=Guld tacka +Mese Crystal Fragment=Mese Kristall Fragment +Clay Brick=Tegelsten +Obsidian Shard=Obsidian Skärva +Flint=Flinta +Blueberries=Blåbär +Furnace is empty=Ugnen är tom +100% (output full)=100% (utgången full) +@1%=@1% +Empty=Tom +Not cookable=Inte kokbar +Furnace active=Ugn aktiv +Furnace inactive=Ugn inaktiv +(Item: @1; Fuel: @2)=(Sak: @1; Bränsle: @2) +Furnace=Ugn +Stone=Sten +Cobblestone=Kullersten +Stone Brick=Stentegel +Stone Block=Sten block +Mossy Cobblestone=Mossig kullersten +Desert Stone=Öken sten +Desert Cobblestone=Öken kullersten +Desert Stone Brick=Öken stentegel +Desert Stone Block=Öken sten block +Sandstone=Sandsten +Sandstone Brick=Sandstenstegel +Sandstone Block=Sandsten block +Desert Sandstone=Öken sandsten +Desert Sandstone Brick=Öken Sandstenstegel +Desert Sandstone Block=Öken sandsten block +Silver Sandstone=Silver sandsten +Silver Sandstone Brick=Silver Sandstenstegel +Silver Sandstone Block=Silver sandsten block +Obsidian=Obsidian +Obsidian Brick=Obsidiantegel +Obsidian Block=Obsidian block +Dirt=Jord +Dirt with Grass=Jord med gräs +Dirt with Grass and Footsteps=Jord med gräs och fotsteg +Dirt with Dry Grass=Jord med torrt gräs +Dirt with Snow=Jord med snö +Dirt with Rainforest Litter=Jord med regnskogströ +Dirt with Coniferous Litter=Jord med Barrträd +Dry Dirt=Torr jord +Dry Dirt with Dry Grass=Torr jord med torrt gräs +Permafrost=Permafrost +Permafrost with Stones=Permafrost med sten +Permafrost with Moss=Permafrost med mossa +Sand=Sand +Desert Sand=Öken sand +Silver Sand=Silver sand +Gravel=Grus +Clay=Lera +Snow=Snö +Snow Block=Snö block +Ice=Is +Cave Ice=Grott Is +Apple Tree=Äpple Träd +Apple Wood Planks=Äpple Plankor +Apple Tree Sapling=Äpple Planta +Apple Tree Leaves=Äpple Löv +Apple=Äpple +Apple Marker=Äpple Markör +Jungle Tree=Djungel Träd +Jungle Wood Planks=Djungel Plankor +Jungle Tree Leaves=Djungel Löv +Jungle Tree Sapling=Djungel Planta +Emergent Jungle Tree Sapling=Nybliven Djungel Planta +Pine Tree=Tall +Pine Wood Planks= Tall Plankor +Pine Needles=Granbarr +Pine Tree Sapling=Tall Planta +Acacia Tree=Akacia Träd +Acacia Wood Planks=Akacia Plankor +Acacia Tree Leaves=Akacia Löv +Acacia Tree Sapling=Akacia Planta +Aspen Tree=Asp +Aspen Wood Planks=Asp Plankor +Aspen Tree Leaves=Asp Löv +Aspen Tree Sapling=Asp Planta +Coal Ore=Kol Malm +Coal Block=Kol Block +Iron Ore=Järn Malm +Steel Block=Stål Block +Copper Ore=Koppar Malm +Copper Block=Koppar Block +Tin Ore=Tenn Malm +Tin Block=Tenn Block +Bronze Block=Brons Block +Mese Ore=Mese Malm +Mese Block=Mese Block +Gold Ore=Guld Malm +Gold Block=Guld Block +Diamond Ore=Diamant Malm +Diamond Block=Diamant Block +Cactus=Kaktus +Large Cactus Seedling=Stor kaktusplanta +Papyrus=Papyrus +Dry Shrub=Torr Buske +Jungle Grass=Djungel Gräs +Grass=Gräs +Dry Grass=Torrt Gräs +Fern=Ormbunke +Marram Grass=Marram Gräs +Bush Stem=Busk Stam +Bush Leaves=Busk Löv +Bush Sapling=Busk Planta +Blueberry Bush Leaves with Berries=Blåbärsbusks Löv med Bär +Blueberry Bush Leaves=Blåbärsbusks Löv +Blueberry Bush Sapling=Blåbärsbusks Plantga +Acacia Bush Stem=Akacia Busks Stam +Acacia Bush Leaves=Akacia Busks Löv +Acacia Bush Sapling=Akacia Busks Planta +Pine Bush Stem=Tall Busks Stam +Pine Bush Needles=Tall Busks Granbarr +Pine Bush Sapling=Tall Busks Planta +Kelp=Brunalg +Green Coral=Grön Korall +Pink Coral=Rosa Korall +Cyan Coral=Cyan Korall +Brown Coral=Brun Korall +Orange Coral=Orange Korall +Coral Skeleton=Korall Skelett +Water Source=Vattenkälla +Flowing Water=Flödande Vatten +River Water Source=Flodvattenkälla +Flowing River Water=Flödande Flodvatten +Lava Source=Lavakälla +Flowing Lava=Flödande Lava +Empty Bookshelf=Tom Bokhylla +Bookshelf (@1 written, @2 empty books)=Bokhylla (@1 skriva, @2 tomma böcker) +Bookshelf=Bokhylla +Text too long=Text för lång +Wooden Sign=Trä Skylt +Steel Sign=Stål Skylt +Wooden Ladder=Trä Stege +Steel Ladder=Stål Stege +Apple Wood Fence=Äpple Trä Staket +Acacia Wood Fence=Akacia Trä Staket +Jungle Wood Fence=Djungel Trä Staket +Pine Wood Fence=Tall Trä Staket +Aspen Wood Fence=Asp Trä Staket +Apple Wood Fence Rail=Äpple Trä Staket Pinne +Acacia Wood Fence Rail=Akacia Trä Staket Pinne +Jungle Wood Fence Rail=Djungel Trä Staket Pinne +Pine Wood Fence Rail=Tall Trä Staket Pinne +Aspen Wood Fence Rail=Asp Trä Staket Pinne +Glass=Glas +Obsidian Glass=Obsidian Glas +Brick Block=Tegelstens Block +Mese Lamp=Mese Lampa +Mese Post Light=Mese Postljus +Cloud=Moln +Wooden Pickaxe=Trä Hacka +Stone Pickaxe=Sten Hacka +Bronze Pickaxe=Brons Hacka +Steel Pickaxe=Stål Hacka +Mese Pickaxe=Mese Hacka +Diamond Pickaxe=Diamant Hacka +Wooden Shovel=Trä Spade +Stone Shovel=Sten Spade +Bronze Shovel=Brons Spade +Steel Shovel=Stål Spade +Mese Shovel=Mese Spade +Diamond Shovel=Diamant Spade +Wooden Axe=Trä Yxa +Stone Axe=Sten Yxa +Bronze Axe=Brons Yxa +Steel Axe=Stål Yxa +Mese Axe=Mese Yxa +Diamond Axe=Diamant Yxa +Wooden Sword=Trä Svärd +Stone Sword=Sten Svärd +Bronze Sword=Brons Svärd +Steel Sword=Stål Svärd +Mese Sword=Mese Svärd +Diamond Sword=Diamant Svärd +Key=Nyckel +Torch=Fakla +@1 will intersect protection on growth.=@1 kommer korsa skyddet mot tillväxt. +Title:=Titel: +Contents:=Innehåll: +Save=Spara +by @1=av @1 +Page @1 of @2=Sida @1 av @2 +"@1"="@1" \ No newline at end of file diff --git a/mods/default/locale/default.sk.tr b/mods/default/locale/default.sk.tr new file mode 100644 index 0000000..8e8cfcc --- /dev/null +++ b/mods/default/locale/default.sk.tr @@ -0,0 +1,211 @@ +# textdomain: default +Locked Chest=Uzamknutá truhlica +Locked Chest (owned by @1)=Uzamknutá truhlica (Vlastník - @1) +You do not own this chest.=Túto truhlicu nevlastníš. +a locked chest=zamknutá truhlica +Chest=Truhlica +Stick=Palica +Paper=Papier +"@1" by @2=„@1“ z @2 +Book=Kniha +Book with Text=Kniha s textom +Skeleton Key=Základný kľuč +Key to @1's @2=Kľuč pre @2 hráča @1 +Coal Lump=Hruda uhlia +Iron Lump=Hruda železa +Copper Lump=Hruda medi +Tin Lump=Hruda cínu +Mese Crystal=Mese Krištáľ +Gold Lump=Hruda zlata +Diamond=Diamant +Clay Lump=Hruda ílu +Steel Ingot=Oceľový ingot +Copper Ingot=Medený ingot +Tin Ingot=Cínový ingot +Bronze Ingot=Bronzový ingot +Gold Ingot=Zlatý ingot +Mese Crystal Fragment=Fragment Mese krištáľu +Clay Brick=Nepálená tehla +Obsidian Shard=Úlomok obsidiánu +Flint=Kresací kamienok +Blueberries=Čučoriedky +Furnace is empty=Pec je prázdna +100% (output full)=100% (Výstup je plný) +@1%=@1% +Empty=Prázdne +Not cookable=Nie je variteľné +Furnace active=Pec je aktívna +Furnace inactive=Pec je neaktívna +(Item: @1; Fuel: @2)=(Vec: @1; Palivo: @2) +Furnace=Pec +Stone=Kameň +Cobblestone=Dlažbový kameň +Stone Brick=Tehla z kameňa +Stone Block=Blok kameňa +Mossy Cobblestone=Dlažbový kameň obrastený machom +Desert Stone=Púštny kameň +Desert Cobblestone=Púštny dlažbový kameň +Desert Stone Brick=Tehla z púštneho kameňa +Desert Stone Block=Blok púštneho kameňa +Sandstone=Pieskovec +Sandstone Brick=Tehla z pieskovca +Sandstone Block=Blok pieskovca +Desert Sandstone=Púštny pieskovec +Desert Sandstone Brick=Tehla z púštneho pieskovca +Desert Sandstone Block=Blok púštneho pieskovca +Silver Sandstone=Strieborný pieskovec +Silver Sandstone Brick=Tehla zo strieborného pieskovca +Silver Sandstone Block=Blok strieborného pieskovca +Obsidian=Obsidián +Obsidian Brick=Tehla z obsidiánu +Obsidian Block=Blok obsidiánu +Dirt=Hlina +Dirt with Grass=Hlina s trávou +Dirt with Grass and Footsteps=Hlina s trávou a stopami +Dirt with Savanna Grass=Hlina s trávou zo savany +Dirt with Snow=Hlina so snehom +Dirt with Rainforest Litter=Hlina s povrchom dažďového pralesa +Dirt with Coniferous Litter=Hlina s ihličnatým povrchom +Savanna Dirt=Hlina zo savany +Savanna Dirt with Savanna Grass=Hlina zo savany s trávou +Permafrost=Permafrost +Permafrost with Stones=Permafrost s kameňmi +Permafrost with Moss=Permafrost s machom +Sand=Piesok +Desert Sand=Púštny piesok +Silver Sand=Strieborný piesok +Gravel=Štrk +Clay=Íl +Snow=Sneh +Snow Block=Blok snehu +Ice=Ľad +Cave Ice=Jaskynný ľad +Apple Tree=Jabloň +Apple Wood Planks=Drevené dosky z jablone +Apple Tree Sapling=Stromček jablone +Apple Tree Leaves=Listy z jablone +Apple=Jablko +Apple Marker=Jablková značka +Jungle Tree=Ďungľový strom +Jungle Wood Planks=Drevené dosky z džungľového stromu +Jungle Tree Leaves=Listy z džungľového stromu +Jungle Tree Sapling=Džungľový stromček +Emergent Jungle Tree Sapling=Vznikajúci džungľový stromček +Pine Tree=Borovica +Pine Wood Planks=Drevené dosky z borovice +Pine Needles=Ihličie z borovice +Pine Tree Sapling=Borovicový stromček +Acacia Tree=Akácia +Acacia Wood Planks=Drevené dosky z akácie +Acacia Tree Leaves=Listy z akácie +Acacia Tree Sapling=Stromček akácie +Aspen Tree=Osika +Aspen Wood Planks=Drevené dosky z osiky +Aspen Tree Leaves=Listy z osiky +Aspen Tree Sapling=Stromček osiky +Coal Ore=Uhoľná ruda +Coal Block=Blok uhlia +Iron Ore=Železná ruda +Steel Block=Blok ocele +Copper Ore=Medená ruda +Copper Block=Blok medi +Tin Ore=Cínová ruda +Tin Block=Blok cínu +Bronze Block=Blok bronzu +Mese Ore=Mese Ruda +Mese Block=Blok Mese +Gold Ore=Zlatá ruda +Gold Block=Blok zlata +Diamond Ore=Diamantová ruda +Diamond Block=Blok diamantu +Cactus=Kaktus +Large Cactus Seedling=Vaľká sadenica kaktusu +Papyrus=Papyrus +Dry Shrub=Suchý ker +Jungle Grass=Džungľová tráva +Grass=Tráva +Savanna Grass=Tráva zo savany +Fern=Papraď +Marram Grass=Pobrežná tráva +Bush Stem=Stonka z kríka +Bush Leaves=Listy z kríka +Bush Sapling=Sadenica kríka +Blueberry Bush Leaves with Berries=Čučoriedkové listy s čučoriedkami +Blueberry Bush Leaves=Čučoriedkové listy +Blueberry Bush Sapling=Sadenica čučoriedky +Acacia Bush Stem=Stonka z kríka akácie +Acacia Bush Leaves=Listy z kríka akácie +Acacia Bush Sapling=Sadenica kríka akácie +Pine Bush Stem=Stonka kríka borovice +Pine Bush Needles=Ihličie kríka borovice +Pine Bush Sapling=Sadenica kríka borovice +Kelp=Riasa +Green Coral=Zelený koral +Pink Coral=Ružový koral +Cyan Coral=Tyrkysový koral +Brown Coral=Hnedý koral +Orange Coral=Oranžový koral +Coral Skeleton=Koralová kostra +Water Source=Zdroj vody +Flowing Water=Tečúca voda +River Water Source=Zdroj riečnej voda +Flowing River Water=Tečúca riečna voda +Lava Source=Zdroj lávy +Flowing Lava=Tečúca láva +Empty Bookshelf=Prázdna knižnica +Bookshelf (@1 written, @2 empty books)=Knižnica (@1 popísané, @2 prázdne knihy) +Bookshelf=Knižnica +Text too long=Text je príliš dlhý +Wooden Sign=Drevená tabuľka +Steel Sign=Oceľová tabuľka +Wooden Ladder=Drevený rebrík +Steel Ladder=Oceľový rebrík +Apple Wood Fence=Drevený plot z jablone +Acacia Wood Fence=Drevený plot z akácie +Jungle Wood Fence=Drevený plot z džungľového dreva +Pine Wood Fence=Drevený plot z borovice +Aspen Wood Fence=Drevený plot z osiky +Apple Wood Fence Rail=Drevené zábradlie z jablone +Acacia Wood Fence Rail=Drevené zábradlie z akácie +Jungle Wood Fence Rail=Drevené zábradlie z džungľového dreva +Pine Wood Fence Rail=Drevené zábradlie z borovice +Aspen Wood Fence Rail=Drevené zábradlie z osiky +Glass=Sklo +Obsidian Glass=Obsidiánové sklo +Brick Block=Blok z tehál +Mese Lamp=Mese lampa +Mese Post Light=Mese stĺpová lampa +Cloud=Oblak +Wooden Pickaxe=Drevený krompáč +Stone Pickaxe=Kamenný krompáč +Bronze Pickaxe=Bronzový krompáč +Steel Pickaxe=Oceľový krompáč +Mese Pickaxe=Mese krompáč +Diamond Pickaxe=Diamantový krompáč +Wooden Shovel=Drevená lopata +Stone Shovel=Kamenná lopata +Bronze Shovel=Bronzová lopata +Steel Shovel=Oceľová lopata +Mese Shovel=Mese lopata +Diamond Shovel=Diamantová lopata +Wooden Axe=Drevená sekera +Stone Axe=Kamenná sekera +Bronze Axe=Bronzová sekera +Steel Axe=Oceľová sekera +Mese Axe=Mese sekera +Diamond Axe=Diamantová sekera +Wooden Sword=Drevený meč +Stone Sword=Kamenný meč +Bronze Sword=Bronzový meč +Steel Sword=Oceľový meč +Mese Sword=Mese meč +Diamond Sword=Diamantový meč +Key=Kľúč +Torch=Fakľa +@1 will intersect protection on growth.=@1 prekročí pri raste chránenú zónu. +Title:=Názov: +Contents:=Obsah: +Save=Uložiť +by @1=od @1 +Page @1 of @2=Strana @1 z @2 +"@1"=„@1“ diff --git a/mods/default/locale/default.zh_CN.tr b/mods/default/locale/default.zh_CN.tr new file mode 100644 index 0000000..4694b3c --- /dev/null +++ b/mods/default/locale/default.zh_CN.tr @@ -0,0 +1,220 @@ +# textdomain: default +Locked Chest=已上锁的箱子 +Locked Chest (owned by @1)=已上锁的箱子(属于@1所有) +You do not own this chest.=这个箱子不属于你所有。 +a locked chest=一个已上锁的箱子 +Chest=箱子 +Stick=棒 +Paper=纸 +"@1" by @2="@1" by @2 +Book=书 +Book with Text=带文字的书 +Skeleton Key=万能钥匙 +Key to @1's @2=@1的@2的钥匙 +Coal Lump=煤块 +Iron Lump=铁块 +Copper Lump=铜块 +Tin Lump=锡块 +Mese Crystal=黄石晶体 +Gold Lump=金块 +Diamond=钻石 +Clay Lump=粘土块 +Steel Ingot=铁锭 +Copper Ingot=铜锭 +Tin Ingot=锡锭 +Bronze Ingot=青铜锭 +Gold Ingot=金锭 +Mese Crystal Fragment=黄石晶体碎片 +Clay Brick=粘土砖 +Obsidian Shard=黑曜石碎片 +Flint=燧石 +Blueberries=蓝莓 +Furnace is empty=熔炉是空的 +100% (output full)=100%(输出已满) +@1%=@1% +Empty=空 +Not cookable=不可烹饪 +Furnace active=熔炉正在运转 +Furnace inactive=熔炉未使用 +(Item: @1; Fuel: @2)=(项目:@1;燃料:@2) +Furnace=熔炉 +Stone=石 +Cobblestone=鹅卵石 +Stone Brick=石砖 +Stone Block=石方块 +Mossy Cobblestone=苔藓覆盖的鹅卵石 +Desert Stone=沙漠石 +Desert Cobblestone=沙漠鹅卵石 +Desert Stone Brick=沙漠鹅卵石砖 +Desert Stone Block=沙漠鹅卵石方块 +Sandstone=砂岩 +Sandstone Brick=砂岩砖 +Sandstone Block=砂岩方块 +Desert Sandstone=沙漠砂岩 +Desert Sandstone Brick=沙漠砂岩砖 +Desert Sandstone Block=沙漠砂岩方块 +Silver Sandstone=银砂岩 +Silver Sandstone Brick=银砂岩砖 +Silver Sandstone Block=银砂岩方块 +Obsidian=黑曜石 +Obsidian Brick=黑曜石砖 +Obsidian Block=黑曜石方块 + +Dirt=土方块 +Dirt with Grass=草方块 +Dirt with Grass and Footsteps=草方块及脚印 +Dirt with Dry Grass=干草土方块 +Dirt with Snow=雪土方块 +Dirt with Rainforest Litter=雨林腐土 +Dirt with Coniferous Litter=针叶林腐土 +Savanna Dirt=草原土 +Dirt with Savanna Grass=草原草方块 +Savanna Dirt with Savanna Grass=草原草方块(草原土) + +Permafrost=多年冻土 +Permafrost with Stones=带石头的多年冻土 +Permafrost with Moss=生苔的多年冻土 +Sand=沙 +Desert Sand=沙漠沙 +Silver Sand=银沙 +Gravel=沙砾 +Clay=粘土 +Snow=雪 +Snow Block=雪方块 +Ice=冰 +Cave Ice=洞穴冰 +Apple Tree=苹果树 +Apple Wood Planks=苹果树木板 +Apple Tree Sapling=苹果树苗 +Apple Tree Leaves=苹果树叶 +Apple=苹果 +Apple Marker=苹果标记 +Jungle Tree=丛林树 +Jungle Wood Planks=丛林树木板 +Jungle Tree Leaves=丛林树叶 +Jungle Tree Sapling=丛林树苗 +Emergent Jungle Tree Sapling=应急丛林树苗 +Pine Tree=松树 +Pine Wood Planks=松树木板 +Pine Needles=松针 +Pine Tree Sapling=松树树苗 +Acacia Tree=相思树 +Acacia Wood Planks=相思树木板 +Acacia Tree Leaves=相思树叶 +Acacia Tree Sapling=相思树树苗 +Aspen Tree=白杨树 +Aspen Wood Planks=白杨树木板 +Aspen Tree Leaves=白杨树叶 +Aspen Tree Sapling=白杨树树苗 +Coal Ore=煤炭矿石 +Coal Block=煤炭方块 +Iron Ore=铁矿石 +Steel Block=钢方块 +Copper Ore=铜矿石 +Copper Block=铜方块 +Tin Ore=锡矿石 +Tin Block=锡方块 +Bronze Block=青铜方块 +Mese Ore=黄石矿石 +Mese Block=黄石方块 +Gold Ore=金矿石 +Gold Block=金方块 +Diamond Ore=钻石矿石 +Diamond Block=钻石方块 +Cactus=仙人掌 +Large Cactus Seedling=大仙人掌苗 +Papyrus=莎草纸 +Dry Shrub=干灌木 +Jungle Grass=丛林草 +Grass=草 +Dry Grass=干草 +Fern=蕨 +Marram Grass=滨草 +Bush Stem=灌木 +Bush Leaves=灌木叶 +Bush Sapling=灌木苗 +Blueberry Bush Leaves with Berries=蓝莓灌木叶与浆果 +Blueberry Bush Leaves=蓝莓灌木叶 +Blueberry Bush Sapling=蓝莓灌木苗 +Acacia Bush Stem=相思灌木 +Acacia Bush Leaves=相思灌木叶 +Acacia Bush Sapling=相思灌木苗 +Pine Bush Stem=松树灌木 +Pine Bush Needles=松树灌木针 +Pine Bush Sapling=松树灌木苗 +Kelp=海带 +Green Coral=绿珊瑚 +Pink Coral=淡红珊瑚 +Cyan Coral=青珊瑚 +Brown Coral=棕珊瑚 +Orange Coral=橙珊瑚 +Coral Skeleton=珊瑚骨架 +Water Source=水方块 +Flowing Water=流动的水 +River Water Source=河水方块 +Flowing River Water=流动的河水 +Lava Source=岩浆方块 +Flowing Lava=流动的岩浆 +Empty Bookshelf=空书架 +Bookshelf (@1 written, @2 empty books)=书架(@1本有字的书,@2本空书) +Bookshelf=书架 +Text too long=文字太长 +Wooden Sign=木牌 +Steel Sign=铁牌 +Wooden Ladder=木梯子 +Steel Ladder=铁梯子 +Apple Wood Fence=苹果木栅栏 +Acacia Wood Fence=相思木栅栏 +Jungle Wood Fence=丛林木栅栏 +Pine Wood Fence=松木栅栏 +Aspen Wood Fence=白杨木栅栏 +Apple Wood Fence Rail=苹果木栏杆 +Acacia Wood Fence Rail=相思木栏杆 +Jungle Wood Fence Rail=丛林木栏杆 +Pine Wood Fence Rail=松木栏杆 +Aspen Wood Fence Rail=白杨木栏杆 +Glass=玻璃 +Obsidian Glass=黑曜石玻璃 +Brick Block=砖方块 +Mese Lamp=黄石灯 + +Apple Wood Mese Post Light=苹果木黄石灯柱 +Acacia Wood Mese Post Light=金合欢木黄石灯柱 +Aspen Wood Mese Post Light=白杨木黄石灯柱 +Jungle Wood Mese Post Light=丛林木黄石灯柱 +Pine Wood Mese Post Light=松木黄石灯柱 + +Cloud=云 +Wooden Pickaxe=木镐 +Stone Pickaxe=石镐 +Bronze Pickaxe=青铜镐 +Steel Pickaxe=铁镐 +Mese Pickaxe=黄石镐 +Diamond Pickaxe=钻石镐 +Wooden Shovel=木铲 +Stone Shovel=石铲 +Bronze Shovel=青铜铲 +Steel Shovel=铁铲 +Mese Shovel=黄石铲 +Diamond Shovel=钻石铲 +Wooden Axe=木斧 +Stone Axe=石斧 +Bronze Axe=青铜斧 +Steel Axe=铁斧 +Mese Axe=黄石斧 +Diamond Axe=钻石斧 +Wooden Sword=木剑 +Stone Sword=石剑 +Bronze Sword=青铜剑 +Steel Sword=铁剑 +Mese Sword=黄石剑 +Diamond Sword=钻石剑 +Key=钥匙 +Torch=火把 +@1 will intersect protection on growth.=@1将与增长的保护相交。 +Title:=标题: +Contents:=内容: +Save=保存 +by @1=由@1 +Page @1 of @2=第@1页,共@2页。 +"@1"="@1" diff --git a/mods/default/locale/default.zh_TW.tr b/mods/default/locale/default.zh_TW.tr new file mode 100644 index 0000000..5512832 --- /dev/null +++ b/mods/default/locale/default.zh_TW.tr @@ -0,0 +1,220 @@ +# textdomain: default +Locked Chest=已上鎖的箱子 +Locked Chest (owned by @1)=已上鎖的箱子(屬於@1所有) +You do not own this chest.=這個箱子不屬於你所有。 +a locked chest=一個已上鎖的箱子 +Chest=箱子 +Stick=棒 +Paper=紙 +"@1" by @2="@1" by @2 +Book=書 +Book with Text=帶文字的書 +Skeleton Key=萬能鑰匙 +Key to @1's @2=@1的@2的鑰匙 +Coal Lump=煤塊 +Iron Lump=鐵塊 +Copper Lump=銅塊 +Tin Lump=錫塊 +Mese Crystal=黃石晶體 +Gold Lump=金塊 +Diamond=鑽石 +Clay Lump=粘土塊 +Steel Ingot=鐵錠 +Copper Ingot=銅錠 +Tin Ingot=錫錠 +Bronze Ingot=青銅錠 +Gold Ingot=金錠 +Mese Crystal Fragment=黃石晶體碎片 +Clay Brick=粘土磚 +Obsidian Shard=黑曜石碎片 +Flint=燧石 +Blueberries=藍莓 +Furnace is empty=熔爐是空的 +100% (output full)=100%(輸出已滿) +@1%=@1% +Empty=空 +Not cookable=不可烹飪 +Furnace active=熔爐正在運轉 +Furnace inactive=熔爐未使用 +(Item: @1; Fuel: @2)=(項目:@1;燃料:@2) +Furnace=熔爐 +Stone=石 +Cobblestone=鵝卵石 +Stone Brick=石磚 +Stone Block=石方塊 +Mossy Cobblestone=苔蘚覆蓋的鵝卵石 +Desert Stone=沙漠石 +Desert Cobblestone=沙漠鵝卵石 +Desert Stone Brick=沙漠鵝卵石磚 +Desert Stone Block=沙漠鵝卵石方塊 +Sandstone=砂岩 +Sandstone Brick=砂岩磚 +Sandstone Block=砂岩方塊 +Desert Sandstone=沙漠砂岩 +Desert Sandstone Brick=沙漠砂岩磚 +Desert Sandstone Block=沙漠砂岩方塊 +Silver Sandstone=銀砂岩 +Silver Sandstone Brick=銀砂岩磚 +Silver Sandstone Block=銀砂岩方塊 +Obsidian=黑曜石 +Obsidian Brick=黑曜石磚 +Obsidian Block=黑曜石方塊 + +Dirt=土方塊 +Dirt with Grass=草方塊 +Dirt with Grass and Footsteps=草方塊及腳印 +Dirt with Dry Grass=乾草土方塊 +Dirt with Snow=雪土方塊 +Dirt with Rainforest Litter=雨林腐土 +Dirt with Coniferous Litter=針葉林腐土 +Savanna Dirt=草原土 +Dirt with Savanna Grass=草原草方塊 +Savanna Dirt with Savanna Grass=草原草方塊(草原土) + +Permafrost=多年凍土 +Permafrost with Stones=帶石頭的多年凍土 +Permafrost with Moss=生苔的多年凍土 +Sand=沙 +Desert Sand=沙漠沙 +Silver Sand=銀沙 +Gravel=沙礫 +Clay=粘土 +Snow=雪 +Snow Block=雪方塊 +Ice=冰 +Cave Ice=洞穴冰 +Apple Tree=蘋果樹 +Apple Wood Planks=蘋果樹木板 +Apple Tree Sapling=蘋果樹苗 +Apple Tree Leaves=蘋果樹葉 +Apple=蘋果 +Apple Marker=蘋果標記 +Jungle Tree=叢林樹 +Jungle Wood Planks=叢林樹木板 +Jungle Tree Leaves=叢林樹葉 +Jungle Tree Sapling=叢林樹苗 +Emergent Jungle Tree Sapling=應急叢林樹苗 +Pine Tree=松樹 +Pine Wood Planks=松樹木板 +Pine Needles=松針 +Pine Tree Sapling=松樹樹苗 +Acacia Tree=相思樹 +Acacia Wood Planks=相思樹木板 +Acacia Tree Leaves=相思樹葉 +Acacia Tree Sapling=相思樹樹苗 +Aspen Tree=白楊樹 +Aspen Wood Planks=白楊樹木板 +Aspen Tree Leaves=白楊樹葉 +Aspen Tree Sapling=白楊樹樹苗 +Coal Ore=煤炭礦石 +Coal Block=煤炭方塊 +Iron Ore=鐵礦石 +Steel Block=鋼方塊 +Copper Ore=銅礦石 +Copper Block=銅方塊 +Tin Ore=錫礦石 +Tin Block=錫方塊 +Bronze Block=青銅方塊 +Mese Ore=黃石礦石 +Mese Block=黃石方塊 +Gold Ore=金礦石 +Gold Block=金方塊 +Diamond Ore=鑽石礦石 +Diamond Block=鑽石方塊 +Cactus=仙人掌 +Large Cactus Seedling=大仙人掌苗 +Papyrus=莎草紙 +Dry Shrub=幹灌木 +Jungle Grass=叢林草 +Grass=草 +Dry Grass=乾草 +Fern=蕨 +Marram Grass=濱草 +Bush Stem=灌木 +Bush Leaves=灌木葉 +Bush Sapling=灌木苗 +Blueberry Bush Leaves with Berries=藍莓灌木葉與漿果 +Blueberry Bush Leaves=藍莓灌木葉 +Blueberry Bush Sapling=藍莓灌木苗 +Acacia Bush Stem=相思灌木 +Acacia Bush Leaves=相思灌木葉 +Acacia Bush Sapling=相思灌木苗 +Pine Bush Stem=松樹灌木 +Pine Bush Needles=松樹灌木針 +Pine Bush Sapling=松樹灌木苗 +Kelp=海帶 +Green Coral=綠珊瑚 +Pink Coral=淡紅珊瑚 +Cyan Coral=青珊瑚 +Brown Coral=棕珊瑚 +Orange Coral=橙珊瑚 +Coral Skeleton=珊瑚骨架 +Water Source=水方塊 +Flowing Water=流動的水 +River Water Source=河水方塊 +Flowing River Water=流動的河水 +Lava Source=岩漿方塊 +Flowing Lava=流動的岩漿 +Empty Bookshelf=空書架 +Bookshelf (@1 written, @2 empty books)=書架(@1本有字的書,@2本空書) +Bookshelf=書架 +Text too long=文字太長 +Wooden Sign=木牌 +Steel Sign=鐵牌 +Wooden Ladder=木梯子 +Steel Ladder=鐵梯子 +Apple Wood Fence=蘋果木柵欄 +Acacia Wood Fence=相思木柵欄 +Jungle Wood Fence=叢林木柵欄 +Pine Wood Fence=松木柵欄 +Aspen Wood Fence=白楊木柵欄 +Apple Wood Fence Rail=蘋果木欄杆 +Acacia Wood Fence Rail=相思木欄杆 +Jungle Wood Fence Rail=叢林木欄杆 +Pine Wood Fence Rail=松木欄杆 +Aspen Wood Fence Rail=白楊木欄杆 +Glass=玻璃 +Obsidian Glass=黑曜石玻璃 +Brick Block=磚方塊 +Mese Lamp=黃石燈 + +Apple Wood Mese Post Light=蘋果木黃石燈柱 +Acacia Wood Mese Post Light=金合歡木黃石燈柱 +Aspen Wood Mese Post Light=白楊木黃石燈柱 +Jungle Wood Mese Post Light=叢林木黃石燈柱 +Pine Wood Mese Post Light=松木黃石燈柱 + +Cloud=雲 +Wooden Pickaxe=木鎬 +Stone Pickaxe=石鎬 +Bronze Pickaxe=青銅鎬 +Steel Pickaxe=鐵鎬 +Mese Pickaxe=黃石鎬 +Diamond Pickaxe=鑽石鎬 +Wooden Shovel=木鏟 +Stone Shovel=石鏟 +Bronze Shovel=青銅鏟 +Steel Shovel=鐵鏟 +Mese Shovel=黃石鏟 +Diamond Shovel=鑽石鏟 +Wooden Axe=木斧 +Stone Axe=石斧 +Bronze Axe=青銅斧 +Steel Axe=鐵斧 +Mese Axe=黃石斧 +Diamond Axe=鑽石斧 +Wooden Sword=木劍 +Stone Sword=石劍 +Bronze Sword=青銅劍 +Steel Sword=鐵劍 +Mese Sword=黃石劍 +Diamond Sword=鑽石劍 +Key=鑰匙 +Torch=火把 +@1 will intersect protection on growth.=@1將與增長的保護相交。 +Title:=標題: +Contents:=內容: +Save=保存 +by @1=由@1 +Page @1 of @2=第@1頁,共@2頁。 +"@1"="@1" diff --git a/mods/default/locale/template.txt b/mods/default/locale/template.txt new file mode 100644 index 0000000..dd554d4 --- /dev/null +++ b/mods/default/locale/template.txt @@ -0,0 +1,211 @@ +# textdomain: default +Stone= +Cobblestone= +Stone Brick= +Stone Block= +Mossy Cobblestone= +Desert Stone= +Desert Cobblestone= +Desert Stone Brick= +Desert Stone Block= +Sandstone= +Sandstone Brick= +Sandstone Block= +Desert Sandstone= +Desert Sandstone Brick= +Desert Sandstone Block= +Silver Sandstone= +Silver Sandstone Brick= +Silver Sandstone Block= +Obsidian= +Obsidian Brick= +Obsidian Block= +Dirt= +Dirt with Grass= +Dirt with Grass and Footsteps= +Dirt with Savanna Grass= +Dirt with Snow= +Dirt with Rainforest Litter= +Dirt with Coniferous Litter= +Savanna Dirt= +Savanna Dirt with Savanna Grass= +Permafrost= +Permafrost with Stones= +Permafrost with Moss= +Sand= +Desert Sand= +Silver Sand= +Gravel= +Clay= +Snow= +Snow Block= +Ice= +Cave Ice= +Apple Tree= +Apple Wood Planks= +Apple Tree Sapling= +Apple Tree Leaves= +Apple= +Apple Marker= +Jungle Tree= +Jungle Wood Planks= +Jungle Tree Leaves= +Jungle Tree Sapling= +Emergent Jungle Tree Sapling= +Pine Tree= +Pine Wood Planks= +Pine Needles= +Pine Tree Sapling= +Acacia Tree= +Acacia Wood Planks= +Acacia Tree Leaves= +Acacia Tree Sapling= +Aspen Tree= +Aspen Wood Planks= +Aspen Tree Leaves= +Aspen Tree Sapling= +Coal Ore= +Coal Block= +Iron Ore= +Steel Block= +Copper Ore= +Copper Block= +Tin Ore= +Tin Block= +Bronze Block= +Mese Ore= +Mese Block= +Gold Ore= +Gold Block= +Diamond Ore= +Diamond Block= +Cactus= +Large Cactus Seedling= +Papyrus= +Dry Shrub= +Jungle Grass= +Grass= +Savanna Grass= +Fern= +Marram Grass= +Bush Stem= +Bush Leaves= +Bush Sapling= +Blueberry Bush Leaves with Berries= +Blueberry Bush Leaves= +Blueberry Bush Sapling= +Acacia Bush Stem= +Acacia Bush Leaves= +Acacia Bush Sapling= +Pine Bush Stem= +Pine Bush Needles= +Pine Bush Sapling= +Kelp= +Green Coral= +Pink Coral= +Cyan Coral= +Brown Coral= +Orange Coral= +Coral Skeleton= +Water Source= +Flowing Water= +River Water Source= +Flowing River Water= +Lava Source= +Flowing Lava= +Empty Bookshelf= +Bookshelf (@1 written, @2 empty books)= +Bookshelf= +Text too long= +Wooden Sign= +Steel Sign= +Wooden Ladder= +Steel Ladder= +Apple Wood Fence= +Acacia Wood Fence= +Jungle Wood Fence= +Pine Wood Fence= +Aspen Wood Fence= +Apple Wood Fence Rail= +Acacia Wood Fence Rail= +Jungle Wood Fence Rail= +Pine Wood Fence Rail= +Aspen Wood Fence Rail= +Glass= +Obsidian Glass= +Brick Block= +Mese Lamp= +Mese Post Light= +Cloud= +@1 will intersect protection on growth.= +Torch= +Wooden Pickaxe= +Stone Pickaxe= +Bronze Pickaxe= +Steel Pickaxe= +Mese Pickaxe= +Diamond Pickaxe= +Wooden Shovel= +Stone Shovel= +Bronze Shovel= +Steel Shovel= +Mese Shovel= +Diamond Shovel= +Wooden Axe= +Stone Axe= +Bronze Axe= +Steel Axe= +Mese Axe= +Diamond Axe= +Wooden Sword= +Stone Sword= +Bronze Sword= +Steel Sword= +Mese Sword= +Diamond Sword= +Key= +Furnace is empty= +100% (output full)= +@1%= +Not cookable= +Empty= +Furnace active= +Furnace inactive= +(Item: @1; Fuel: @2)= +Furnace= +Title:= +Contents:= +Save= +by @1= +Page @1 of @2= +"@1"= +"@1" by @2= +Skeleton Key= +Key to @1's @2= +Blueberries= +Book= +Book with Text= +Bronze Ingot= +Clay Brick= +Clay Lump= +Coal Lump= +Copper Ingot= +Copper Lump= +Diamond= +Flint= +Gold Ingot= +Gold Lump= +Iron Lump= +Mese Crystal= +Mese Crystal Fragment= +Obsidian Shard= +Paper= +Steel Ingot= +Stick= +Tin Ingot= +Tin Lump= +Locked Chest= +Locked Chest (owned by @1)= +You do not own this chest.= +a locked chest= +Chest= diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua new file mode 100644 index 0000000..8c161d1 --- /dev/null +++ b/mods/default/mapgen.lua @@ -0,0 +1,2492 @@ +-- +-- Aliases for map generators +-- + +-- All mapgens + +minetest.register_alias("mapgen_stone", "default:stone") +minetest.register_alias("mapgen_water_source", "default:water_source") +minetest.register_alias("mapgen_river_water_source", "default:river_water_source") + +-- Additional aliases needed for mapgen v6 + +minetest.register_alias("mapgen_lava_source", "default:lava_source") +minetest.register_alias("mapgen_dirt", "default:dirt") +minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass") +minetest.register_alias("mapgen_sand", "default:sand") +minetest.register_alias("mapgen_gravel", "default:gravel") +minetest.register_alias("mapgen_desert_stone", "default:desert_stone") +minetest.register_alias("mapgen_desert_sand", "default:desert_sand") +minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow") +minetest.register_alias("mapgen_snowblock", "default:snowblock") +minetest.register_alias("mapgen_snow", "default:snow") +minetest.register_alias("mapgen_ice", "default:ice") + +minetest.register_alias("mapgen_tree", "default:tree") +minetest.register_alias("mapgen_leaves", "default:leaves") +minetest.register_alias("mapgen_apple", "default:apple") +minetest.register_alias("mapgen_jungletree", "default:jungletree") +minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves") +minetest.register_alias("mapgen_junglegrass", "default:junglegrass") +minetest.register_alias("mapgen_pine_tree", "default:pine_tree") +minetest.register_alias("mapgen_pine_needles", "default:pine_needles") + +minetest.register_alias("mapgen_cobble", "default:cobble") +minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble") +minetest.register_alias("mapgen_mossycobble", "default:mossycobble") +minetest.register_alias("mapgen_stair_desert_stone", "stairs:stair_desert_stone") + + +-- +-- Register ores +-- + +-- Mgv6 + +function default.register_mgv6_ores() + + -- Blob ore + -- These first to avoid other ores in blobs + + -- Clay + -- This first to avoid clay in sand blobs + + minetest.register_ore({ + ore_type = "blob", + ore = "default:clay", + wherein = {"default:sand"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 0, + y_min = -15, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = -316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Sand + + minetest.register_ore({ + ore_type = "blob", + ore = "default:sand", + wherein = {"default:stone", "default:desert_stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 0, + y_min = -31, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 2316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Dirt + + minetest.register_ore({ + ore_type = "blob", + ore = "default:dirt", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 17676, + octaves = 1, + persist = 0.0 + }, + }) + + -- Gravel + + minetest.register_ore({ + ore_type = "blob", + ore = "default:gravel", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 766, + octaves = 1, + persist = 0.0 + }, + }) + + -- Scatter ores + + -- Coal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 9, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 8, + clust_size = 3, + y_max = 64, + y_min = -31000, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 24 * 24 * 24, + clust_num_ores = 27, + clust_size = 6, + y_max = 0, + y_min = -31000, + }) + + -- Iron + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 12, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 7 * 7 * 7, + clust_num_ores = 5, + clust_size = 3, + y_max = 0, + y_min = -31000, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 24 * 24 * 24, + clust_num_ores = 27, + clust_size = 6, + y_max = -64, + y_min = -31000, + }) + + -- Copper + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 4, + clust_size = 3, + y_max = -16, + y_min = -63, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = -64, + y_min = -31000, + }) + + -- Tin + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 4, + clust_size = 3, + y_max = -32, + y_min = -127, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = -128, + y_min = -31000, + }) + + -- Gold + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 3, + clust_size = 2, + y_max = -64, + y_min = -255, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = -256, + y_min = -31000, + }) + + -- Mese crystal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 18 * 18 * 18, + clust_num_ores = 3, + clust_size = 2, + y_max = -64, + y_min = -255, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = -256, + y_min = -31000, + }) + + -- Diamond + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 17 * 17 * 17, + clust_num_ores = 4, + clust_size = 3, + y_max = -128, + y_min = -255, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = -256, + y_min = -31000, + }) + + -- Mese block + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = -1024, + y_min = -31000, + }) +end + + +-- All mapgens except mgv6 + +function default.register_ores() + + -- Stratum ores. + -- These obviously first. + + -- Silver sandstone + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:silver_sandstone", + wherein = {"default:stone"}, + clust_scarcity = 1, + y_max = 46, + y_min = 10, + noise_params = { + offset = 28, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 4, + biomes = {"cold_desert"}, + }) + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:silver_sandstone", + wherein = {"default:stone"}, + clust_scarcity = 1, + y_max = 42, + y_min = 6, + noise_params = { + offset = 24, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 2, + biomes = {"cold_desert"}, + }) + + -- Desert sandstone + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:desert_sandstone", + wherein = {"default:desert_stone"}, + clust_scarcity = 1, + y_max = 46, + y_min = 10, + noise_params = { + offset = 28, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 4, + biomes = {"desert"}, + }) + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:desert_sandstone", + wherein = {"default:desert_stone"}, + clust_scarcity = 1, + y_max = 42, + y_min = 6, + noise_params = { + offset = 24, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 2, + biomes = {"desert"}, + }) + + -- Sandstone + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:sandstone", + wherein = {"default:desert_stone"}, + clust_scarcity = 1, + y_max = 39, + y_min = 3, + noise_params = { + offset = 21, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 2, + biomes = {"desert"}, + }) + + -- Blob ore. + -- These before scatter ores to avoid other ores in blobs. + + -- Clay + + minetest.register_ore({ + ore_type = "blob", + ore = "default:clay", + wherein = {"default:sand"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 0, + y_min = -15, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = -316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Silver sand + + minetest.register_ore({ + ore_type = "blob", + ore = "default:silver_sand", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 2316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Dirt + + minetest.register_ore({ + ore_type = "blob", + ore = "default:dirt", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 17676, + octaves = 1, + persist = 0.0 + }, + -- Only where default:dirt is present as surface material + biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest", + "deciduous_forest", "deciduous_forest_shore", "rainforest", + "rainforest_swamp"} + }) + + -- Gravel + + minetest.register_ore({ + ore_type = "blob", + ore = "default:gravel", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 766, + octaves = 1, + persist = 0.0 + }, + }) + + -- Scatter ores + + -- Coal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 9, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 8, + clust_size = 3, + y_max = 64, + y_min = -127, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 30, + clust_size = 5, + y_max = -128, + y_min = -31000, + }) + + -- Tin + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 4, + clust_size = 3, + y_max = -64, + y_min = -127, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = -128, + y_min = -31000, + }) + + -- Copper + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 4, + clust_size = 3, + y_max = -64, + y_min = -127, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = -128, + y_min = -31000, + }) + + -- Iron + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 12, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 7 * 7 * 7, + clust_num_ores = 5, + clust_size = 3, + y_max = -128, + y_min = -255, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 29, + clust_size = 5, + y_max = -256, + y_min = -31000, + }) + + -- Gold + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 3, + clust_size = 2, + y_max = -256, + y_min = -511, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = -512, + y_min = -31000, + }) + + -- Mese crystal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 18 * 18 * 18, + clust_num_ores = 3, + clust_size = 2, + y_max = -512, + y_min = -1023, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = -1024, + y_min = -31000, + }) + + -- Diamond + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 17 * 17 * 17, + clust_num_ores = 4, + clust_size = 3, + y_max = -1024, + y_min = -2047, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = -2048, + y_min = -31000, + }) + + -- Mese block + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = -2048, + y_min = -4095, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 28 * 28 * 28, + clust_num_ores = 5, + clust_size = 3, + y_max = -4096, + y_min = -31000, + }) +end + + +-- +-- Register biomes +-- + +-- All mapgens except mgv6 + +function default.register_biomes() + + -- Icesheet + + minetest.register_biome({ + name = "icesheet", + node_dust = "default:snowblock", + node_top = "default:snowblock", + depth_top = 1, + node_filler = "default:snowblock", + depth_filler = 3, + node_stone = "default:cave_ice", + node_water_top = "default:ice", + depth_water_top = 10, + node_river_water = "default:ice", + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:ice", + node_dungeon_stair = "stairs:stair_ice", + y_max = 31000, + y_min = -8, + heat_point = 0, + humidity_point = 73, + }) + + minetest.register_biome({ + name = "icesheet_ocean", + node_dust = "default:snowblock", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_water_top = "default:ice", + depth_water_top = 10, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -9, + y_min = -255, + heat_point = 0, + humidity_point = 73, + }) + + minetest.register_biome({ + name = "icesheet_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 0, + humidity_point = 73, + }) + + -- Tundra + + minetest.register_biome({ + name = "tundra_highland", + node_dust = "default:snow", + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 47, + heat_point = 0, + humidity_point = 40, + }) + + minetest.register_biome({ + name = "tundra", + node_top = "default:permafrost_with_stones", + depth_top = 1, + node_filler = "default:permafrost", + depth_filler = 1, + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 4, + y_max = 46, + y_min = 2, + heat_point = 0, + humidity_point = 40, + }) + + minetest.register_biome({ + name = "tundra_beach", + node_top = "default:gravel", + depth_top = 1, + node_filler = "default:gravel", + depth_filler = 2, + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 1, + y_min = -3, + heat_point = 0, + humidity_point = 40, + }) + + minetest.register_biome({ + name = "tundra_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -4, + y_min = -255, + heat_point = 0, + humidity_point = 40, + }) + + minetest.register_biome({ + name = "tundra_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 0, + humidity_point = 40, + }) + + -- Taiga + + minetest.register_biome({ + name = "taiga", + node_dust = "default:snow", + node_top = "default:dirt_with_snow", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 25, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "taiga_ocean", + node_dust = "default:snow", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 3, + y_min = -255, + heat_point = 25, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "taiga_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 25, + humidity_point = 70, + }) + + -- Snowy grassland + + minetest.register_biome({ + name = "snowy_grassland", + node_dust = "default:snow", + node_top = "default:dirt_with_snow", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 20, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "snowy_grassland_ocean", + node_dust = "default:snow", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 3, + y_min = -255, + heat_point = 20, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "snowy_grassland_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 20, + humidity_point = 35, + }) + + -- Grassland + + minetest.register_biome({ + name = "grassland", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 6, + heat_point = 50, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "grassland_dunes", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 2, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 5, + y_min = 4, + heat_point = 50, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "grassland_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 3, + y_min = -255, + heat_point = 50, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "grassland_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 50, + humidity_point = 35, + }) + + -- Coniferous forest + + minetest.register_biome({ + name = "coniferous_forest", + node_top = "default:dirt_with_coniferous_litter", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 6, + heat_point = 45, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "coniferous_forest_dunes", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 5, + y_min = 4, + heat_point = 45, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "coniferous_forest_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 3, + y_min = -255, + heat_point = 45, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "coniferous_forest_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 45, + humidity_point = 70, + }) + + -- Deciduous forest + + minetest.register_biome({ + name = "deciduous_forest", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 1, + heat_point = 60, + humidity_point = 68, + }) + + minetest.register_biome({ + name = "deciduous_forest_shore", + node_top = "default:dirt", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 0, + y_min = -1, + heat_point = 60, + humidity_point = 68, + }) + + minetest.register_biome({ + name = "deciduous_forest_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -2, + y_min = -255, + heat_point = 60, + humidity_point = 68, + }) + + minetest.register_biome({ + name = "deciduous_forest_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 60, + humidity_point = 68, + }) + + -- Desert + + minetest.register_biome({ + name = "desert", + node_top = "default:desert_sand", + depth_top = 1, + node_filler = "default:desert_sand", + depth_filler = 1, + node_stone = "default:desert_stone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:desert_stone", + node_dungeon_stair = "stairs:stair_desert_stone", + y_max = 31000, + y_min = 4, + heat_point = 92, + humidity_point = 16, + }) + + minetest.register_biome({ + name = "desert_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_stone = "default:desert_stone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:desert_stone", + node_dungeon_stair = "stairs:stair_desert_stone", + vertical_blend = 1, + y_max = 3, + y_min = -255, + heat_point = 92, + humidity_point = 16, + }) + + minetest.register_biome({ + name = "desert_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 92, + humidity_point = 16, + }) + + -- Sandstone desert + + minetest.register_biome({ + name = "sandstone_desert", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 1, + node_stone = "default:sandstone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:sandstonebrick", + node_dungeon_stair = "stairs:stair_sandstone_block", + y_max = 31000, + y_min = 4, + heat_point = 60, + humidity_point = 0, + }) + + minetest.register_biome({ + name = "sandstone_desert_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_stone = "default:sandstone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:sandstonebrick", + node_dungeon_stair = "stairs:stair_sandstone_block", + y_max = 3, + y_min = -255, + heat_point = 60, + humidity_point = 0, + }) + + minetest.register_biome({ + name = "sandstone_desert_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 60, + humidity_point = 0, + }) + + -- Cold desert + + minetest.register_biome({ + name = "cold_desert", + node_top = "default:silver_sand", + depth_top = 1, + node_filler = "default:silver_sand", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 40, + humidity_point = 0, + }) + + minetest.register_biome({ + name = "cold_desert_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 3, + y_min = -255, + heat_point = 40, + humidity_point = 0, + }) + + minetest.register_biome({ + name = "cold_desert_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 40, + humidity_point = 0, + }) + + -- Savanna + + minetest.register_biome({ + name = "savanna", + node_top = "default:dry_dirt_with_dry_grass", + depth_top = 1, + node_filler = "default:dry_dirt", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 1, + heat_point = 89, + humidity_point = 42, + }) + + minetest.register_biome({ + name = "savanna_shore", + node_top = "default:dry_dirt", + depth_top = 1, + node_filler = "default:dry_dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 0, + y_min = -1, + heat_point = 89, + humidity_point = 42, + }) + + minetest.register_biome({ + name = "savanna_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -2, + y_min = -255, + heat_point = 89, + humidity_point = 42, + }) + + minetest.register_biome({ + name = "savanna_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 89, + humidity_point = 42, + }) + + -- Rainforest + + minetest.register_biome({ + name = "rainforest", + node_top = "default:dirt_with_rainforest_litter", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 1, + heat_point = 86, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "rainforest_swamp", + node_top = "default:dirt", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 0, + y_min = -1, + heat_point = 86, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "rainforest_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -2, + y_min = -255, + heat_point = 86, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "rainforest_under", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -31000, + heat_point = 86, + humidity_point = 65, + }) +end + + +-- +-- Register decorations +-- + +-- Mgv6 + +function default.register_mgv6_decorations() + + -- Papyrus + + minetest.register_decoration({ + name = "default:papyrus", + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + y_max = 1, + y_min = 1, + decoration = "default:papyrus", + height = 2, + height_max = 4, + spawn_by = "default:water_source", + num_spawn_by = 1, + }) + + -- Cacti + + minetest.register_decoration({ + name = "default:cactus", + deco_type = "simple", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.012, + scale = 0.024, + spread = {x = 100, y = 100, z = 100}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "default:cactus", + height = 3, + height_max = 4, + }) + + -- Long grasses + + for length = 1, 5 do + minetest.register_decoration({ + name = "default:grass_"..length, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.007, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "default:grass_"..length, + }) + end + + -- Dry shrubs + + minetest.register_decoration({ + name = "default:dry_shrub", + deco_type = "simple", + place_on = {"default:desert_sand", "default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.035, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "default:dry_shrub", + param2 = 4, + }) +end + + +-- All mapgens except mgv6 + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + name = "default:grass_" .. length, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "default:grass_" .. length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + name = "default:dry_grass_" .. length, + deco_type = "simple", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + decoration = "default:dry_grass_" .. length, + }) +end + +local function register_fern_decoration(seed, length) + minetest.register_decoration({ + name = "default:fern_" .. length, + deco_type = "simple", + place_on = {"default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.2, + spread = {x = 100, y = 100, z = 100}, + seed = seed, + octaves = 3, + persist = 0.7 + }, + biomes = {"coniferous_forest"}, + y_max = 31000, + y_min = 6, + decoration = "default:fern_" .. length, + }) +end + + +function default.register_decorations() + -- Savanna bare dirt patches. + -- Must come before all savanna decorations that are placed on dry grass. + -- Noise is similar to long dry grass noise, but scale inverted, to appear + -- where long dry grass is least dense and shortest. + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 4, + noise_params = { + offset = -1.5, + scale = -1.5, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 4, + persist = 1.0 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + decoration = "default:dry_dirt", + place_offset_y = -1, + flags = "force_placement", + }) + + -- Apple tree and log + + minetest.register_decoration({ + name = "default:apple_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.024, + scale = 0.015, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/apple_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + name = "default:apple_log", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + place_offset_y = 1, + sidelen = 16, + noise_params = { + offset = 0.0012, + scale = 0.0007, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/apple_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dirt_with_grass", + num_spawn_by = 8, + }) + + -- Emergent jungle tree + -- Due to 32 node height, altitude is limited and prescence depends on chunksize + + local chunksize = tonumber(minetest.get_mapgen_setting("chunksize")) + if chunksize >= 5 then + minetest.register_decoration({ + name = "default:emergent_jungle_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 80, + noise_params = { + offset = 0.0, + scale = 0.0025, + spread = {x = 250, y = 250, z = 250}, + seed = 2685, + octaves = 3, + persist = 0.7 + }, + biomes = {"rainforest"}, + y_max = 32, + y_min = 1, + schematic = minetest.get_modpath("default") .. + "/schematics/emergent_jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + place_offset_y = -4, + }) + end + + -- Jungle tree and log + + minetest.register_decoration({ + name = "default:jungle_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 80, + fill_ratio = 0.1, + biomes = {"rainforest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + -- Swamp jungle trees + + minetest.register_decoration({ + name = "default:jungle_tree(swamp)", + deco_type = "schematic", + place_on = {"default:dirt"}, + sidelen = 16, + -- Noise tuned to place swamp trees where papyrus is absent + noise_params = { + offset = 0.0, + scale = -0.1, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 1, + persist = 0.5 + }, + biomes = {"rainforest_swamp"}, + y_max = 0, + y_min = -1, + schematic = minetest.get_modpath("default") .. "/schematics/jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + name = "default:jungle_log", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + place_offset_y = 1, + sidelen = 80, + fill_ratio = 0.005, + biomes = {"rainforest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/jungle_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dirt_with_rainforest_litter", + num_spawn_by = 8, + }) + + -- Taiga and temperate coniferous forest pine tree, small pine tree and log + + minetest.register_decoration({ + name = "default:pine_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0.010, + scale = 0.048, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/pine_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + name = "default:small_pine_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0.010, + scale = -0.048, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/small_pine_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + name = "default:pine_log", + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + place_offset_y = 1, + sidelen = 80, + fill_ratio = 0.0018, + biomes = {"taiga", "coniferous_forest"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/pine_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + num_spawn_by = 8, + }) + + -- Acacia tree and log + + minetest.register_decoration({ + name = "default:acacia_tree", + deco_type = "schematic", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.002, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/acacia_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + name = "default:acacia_log", + deco_type = "schematic", + place_on = {"default:dry_dirt_with_dry_grass"}, + place_offset_y = 1, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/acacia_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dry_dirt_with_dry_grass", + num_spawn_by = 8, + }) + + -- Aspen tree and log + + minetest.register_decoration({ + name = "default:aspen_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.015, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/aspen_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + name = "default:aspen_log", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + place_offset_y = 1, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.0008, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/aspen_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dirt_with_grass", + num_spawn_by = 8, + }) + + -- Large cactus + + minetest.register_decoration({ + name = "default:large_cactus", + deco_type = "schematic", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.0003, + scale = 0.0009, + spread = {x = 200, y = 200, z = 200}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/large_cactus.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + -- Cactus + + minetest.register_decoration({ + name = "default:cactus", + deco_type = "simple", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.0003, + scale = 0.0009, + spread = {x = 200, y = 200, z = 200}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert"}, + y_max = 31000, + y_min = 4, + decoration = "default:cactus", + height = 2, + height_max = 5, + }) + + -- Papyrus + + -- Dirt version for rainforest swamp + + minetest.register_decoration({ + name = "default:papyrus_on_dirt", + deco_type = "schematic", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + biomes = {"rainforest_swamp"}, + y_max = 0, + y_min = 0, + schematic = minetest.get_modpath("default") .. "/schematics/papyrus_on_dirt.mts", + }) + + -- Dry dirt version for savanna shore + + minetest.register_decoration({ + name = "default:papyrus_on_dry_dirt", + deco_type = "schematic", + place_on = {"default:dry_dirt"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + biomes = {"savanna_shore"}, + y_max = 0, + y_min = 0, + schematic = minetest.get_modpath("default") .. + "/schematics/papyrus_on_dry_dirt.mts", + }) + + -- Bush + + minetest.register_decoration({ + name = "default:bush", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 137, + octaves = 3, + persist = 0.7, + }, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Blueberry bush + + minetest.register_decoration({ + name = "default:blueberry_bush", + deco_type = "schematic", + place_on = {"default:dirt_with_grass", "default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 697, + octaves = 3, + persist = 0.7, + }, + biomes = {"grassland", "snowy_grassland"}, + y_max = 31000, + y_min = 1, + place_offset_y = 1, + schematic = minetest.get_modpath("default") .. "/schematics/blueberry_bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Acacia bush + + minetest.register_decoration({ + name = "default:acacia_bush", + deco_type = "schematic", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 90155, + octaves = 3, + persist = 0.7, + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/acacia_bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Pine bush + + minetest.register_decoration({ + name = "default:pine_bush", + deco_type = "schematic", + place_on = {"default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 137, + octaves = 3, + persist = 0.7, + }, + biomes = {"taiga", "snowy_grassland"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/pine_bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Grasses + + register_grass_decoration(-0.03, 0.09, 5) + register_grass_decoration(-0.015, 0.075, 4) + register_grass_decoration(0, 0.06, 3) + register_grass_decoration(0.015, 0.045, 2) + register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses + + register_dry_grass_decoration(0.01, 0.05, 5) + register_dry_grass_decoration(0.03, 0.03, 4) + register_dry_grass_decoration(0.05, 0.01, 3) + register_dry_grass_decoration(0.07, -0.01, 2) + register_dry_grass_decoration(0.09, -0.03, 1) + + -- Ferns + + register_fern_decoration(14936, 3) + register_fern_decoration(801, 2) + register_fern_decoration(5, 1) + + -- Junglegrass + + minetest.register_decoration({ + name = "default:junglegrass", + deco_type = "simple", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 80, + fill_ratio = 0.1, + biomes = {"rainforest"}, + y_max = 31000, + y_min = 1, + decoration = "default:junglegrass", + }) + + -- Dry shrub + + minetest.register_decoration({ + name = "default:dry_shrub", + deco_type = "simple", + place_on = {"default:desert_sand", + "default:sand", "default:silver_sand"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.02, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert", "sandstone_desert", "cold_desert"}, + y_max = 31000, + y_min = 2, + decoration = "default:dry_shrub", + param2 = 4, + }) + + -- Marram grass + + minetest.register_decoration({ + name = "default:marram_grass", + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 4, + noise_params = { + offset = -0.7, + scale = 4.0, + spread = {x = 16, y = 16, z = 16}, + seed = 513337, + octaves = 1, + persist = 0.0, + flags = "absvalue, eased" + }, + biomes = {"coniferous_forest_dunes", "grassland_dunes"}, + y_max = 6, + y_min = 4, + decoration = { + "default:marram_grass_1", + "default:marram_grass_2", + "default:marram_grass_3", + }, + }) + + -- Tundra moss + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:permafrost_with_stones"}, + sidelen = 4, + noise_params = { + offset = -0.8, + scale = 2.0, + spread = {x = 100, y = 100, z = 100}, + seed = 53995, + octaves = 3, + persist = 1.0 + }, + biomes = {"tundra"}, + y_max = 50, + y_min = 2, + decoration = "default:permafrost_with_moss", + place_offset_y = -1, + flags = "force_placement", + }) + + -- Tundra patchy snow + + minetest.register_decoration({ + deco_type = "simple", + place_on = { + "default:permafrost_with_moss", + "default:permafrost_with_stones", + "default:stone", + "default:gravel" + }, + sidelen = 4, + noise_params = { + offset = 0, + scale = 1.0, + spread = {x = 100, y = 100, z = 100}, + seed = 172555, + octaves = 3, + persist = 1.0 + }, + biomes = {"tundra", "tundra_beach"}, + y_max = 50, + y_min = 1, + decoration = "default:snow", + }) + + -- Coral reef + + minetest.register_decoration({ + name = "default:corals", + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 4, + noise_params = { + offset = -4, + scale = 4, + spread = {x = 50, y = 50, z = 50}, + seed = 7013, + octaves = 3, + persist = 0.7, + }, + biomes = { + "desert_ocean", + "savanna_ocean", + "rainforest_ocean", + }, + y_max = -2, + y_min = -8, + flags = "force_placement", + decoration = { + "default:coral_green", "default:coral_pink", + "default:coral_cyan", "default:coral_brown", + "default:coral_orange", "default:coral_skeleton", + }, + }) + + -- Kelp + + minetest.register_decoration({ + name = "default:kelp", + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = -0.04, + scale = 0.1, + spread = {x = 200, y = 200, z = 200}, + seed = 87112, + octaves = 3, + persist = 0.7 + }, + biomes = { + "taiga_ocean", + "snowy_grassland_ocean", + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean", + "sandstone_desert_ocean", + "cold_desert_ocean"}, + y_max = -5, + y_min = -10, + flags = "force_placement", + decoration = "default:sand_with_kelp", + param2 = 48, + param2_max = 96, + }) +end + + +-- +-- Detect mapgen to select functions +-- + +minetest.clear_registered_biomes() +minetest.clear_registered_ores() +minetest.clear_registered_decorations() + +local mg_name = minetest.get_mapgen_setting("mg_name") + +if mg_name == "v6" then + default.register_mgv6_ores() + default.register_mgv6_decorations() +else + default.register_biomes() + default.register_ores() + default.register_decorations() +end diff --git a/mods/default/mod.conf b/mods/default/mod.conf new file mode 100644 index 0000000..c9e7468 --- /dev/null +++ b/mods/default/mod.conf @@ -0,0 +1,3 @@ +name = default +description = Minetest Game mod: default +optional_depends = player_api diff --git a/mods/default/models/chest_open.obj b/mods/default/models/chest_open.obj new file mode 100644 index 0000000..72ba175 --- /dev/null +++ b/mods/default/models/chest_open.obj @@ -0,0 +1,79 @@ +# Blender v2.78 (sub 0) OBJ File: 'chest-open.blend' +# www.blender.org +o Top_Cube.002_None_Top_Cube.002_None_bottom +v -0.500000 0.408471 0.720970 +v -0.500000 1.115578 0.013863 +v -0.500000 0.894607 -0.207108 +v -0.500000 0.187501 0.499999 +v 0.500000 1.115578 0.013863 +v 0.500000 0.408471 0.720970 +v 0.500000 0.187501 0.499999 +v 0.500000 0.894607 -0.207108 +v -0.500000 0.187500 -0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 0.500000 +v 0.500000 0.187500 -0.500000 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 -0.500000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 1.0000 0.0000 +vt 1.0000 1.0000 +vt 1.0000 0.0000 +vt 1.0000 1.0000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 0.0000 1.0000 +vt 1.0000 1.0000 +vt 1.0000 0.6875 +vt 0.0000 0.6875 +vt 1.0000 1.0000 +vt 0.0000 0.6875 +vt 1.0000 0.6875 +vt 1.0000 0.6875 +vt 1.0000 0.0000 +vt 0.0000 0.0000 +vt 1.0000 0.6875 +vt 1.0000 0.0000 +vt 1.0000 1.0000 +vt 1.0000 0.6875 +vt 1.0000 0.0000 +vt 0.0000 1.0000 +vt 0.0000 0.6875 +vt 0.0000 0.6875 +vt 0.0000 0.0000 +vt 1.0000 0.5000 +vt 1.0000 1.0000 +vt 0.0000 1.0000 +vt 0.0000 0.5000 +vt 0.0000 0.0000 +vt 1.0000 0.0000 +vn 0.0000 0.7071 0.7071 +vn -0.0000 -1.0000 -0.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 -0.0000 +vn 0.0000 -0.7071 0.7071 +vn 0.0000 0.0000 1.0000 +vn -0.0000 0.7071 -0.7071 +vn -0.0000 0.0000 -1.0000 +vn -0.0000 -0.7071 -0.7071 +vn -0.0000 1.0000 -0.0000 +g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Top +s off +f 6/1/1 5/2/1 2/3/1 1/4/1 +g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Bottom +f 11/5/2 10/6/2 14/7/2 13/8/2 +g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Right-Left +f 1/9/3 2/10/3 3/11/3 4/12/3 +f 5/13/4 6/1/4 7/14/4 8/15/4 +f 4/12/3 9/16/3 10/17/3 11/18/3 +f 12/19/4 7/14/4 13/8/4 14/20/4 +g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Back +f 6/21/5 1/9/5 4/12/5 7/22/5 +f 7/22/6 4/12/6 11/18/6 13/23/6 +g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Front +f 2/10/7 5/24/7 8/25/7 3/11/7 +f 9/16/8 12/26/8 14/27/8 10/17/8 +g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Inside +f 4/28/9 3/29/9 8/30/9 7/31/9 +f 7/31/10 12/32/10 9/33/10 4/28/10 diff --git a/mods/default/models/torch_ceiling.obj b/mods/default/models/torch_ceiling.obj new file mode 100644 index 0000000..ea51f3c --- /dev/null +++ b/mods/default/models/torch_ceiling.obj @@ -0,0 +1,58 @@ +# Blender v2.77 (sub 0) OBJ File: 'torch_ceiling.blend' +# www.blender.org +mtllib torch_ceiling.mtl +o Cube_Cube.001 +v -0.062469 -0.047331 0.068152 +v -0.062469 -0.559515 -0.164388 +v -0.062469 0.004344 -0.045667 +v -0.062469 -0.507839 -0.278206 +v 0.062531 -0.047331 0.068152 +v 0.062531 -0.559515 -0.164388 +v 0.062531 0.004344 -0.045667 +v 0.062531 -0.507839 -0.278206 +v 0.353584 0.040000 0.363553 +v 0.353584 -0.397500 0.363553 +v -0.353522 0.040000 -0.343553 +v -0.353522 -0.397500 -0.343553 +v 0.353584 0.040000 -0.343553 +v -0.353522 0.040000 0.363553 +v 0.353584 -0.397500 -0.343553 +v -0.353522 -0.397500 0.363553 +vt 0.5625 0.5000 +vt 0.5625 0.6250 +vt 0.4375 0.6250 +vt 0.4375 0.5000 +vt 0.4375 0.0000 +vt 0.5625 0.0000 +vt 0.5625 0.1250 +vt 0.4375 0.1250 +vt 0.5625 0.6250 +vt 0.4375 0.6250 +vt 0.4375 0.6250 +vt 0.4375 0.0000 +vt 0.5625 0.6250 +vt 0.5625 0.0000 +vt 1.0000 0.5625 +vt 1.0000 1.0000 +vt 0.0000 1.0000 +vt 0.0000 0.5625 +vt 0.0000 0.5625 +vt 1.0000 0.5625 +vt 1.0000 1.0000 +vt 0.0000 1.0000 +vn 0.0000 0.9105 0.4134 +vn -0.0000 -0.4134 0.9105 +vn -1.0000 0.0000 0.0000 +vn 0.7071 0.0000 -0.7071 +vn 0.7071 0.0000 0.7071 +usemtl Material.001 +s off +f 3/1/1 1/2/1 5/3/1 7/4/1 +f 8/5/1 4/6/1 2/7/1 6/8/1 +f 3/9/2 4/6/2 8/5/2 7/10/2 +f 1/11/3 3/9/3 4/6/3 2/12/3 +f 5/13/2 1/11/2 2/12/2 6/14/2 +f 7/10/3 8/5/3 6/14/3 5/13/3 +usemtl Material.002 +f 9/15/4 10/16/4 12/17/4 11/18/4 +f 13/19/5 14/20/5 16/21/5 15/22/5 diff --git a/mods/default/models/torch_floor.obj b/mods/default/models/torch_floor.obj new file mode 100644 index 0000000..e2487ef --- /dev/null +++ b/mods/default/models/torch_floor.obj @@ -0,0 +1,50 @@ +# Blender v2.76 (sub 11) OBJ File: 'torch_floor.blend' +# www.blender.org +mtllib torch_floor.mtl +o Cube_Cube.001 +v 0.062500 0.062500 -0.062500 +v 0.062500 -0.500000 -0.062500 +v 0.062500 0.062500 0.062500 +v 0.062500 -0.500000 0.062500 +v -0.062500 0.062500 -0.062500 +v -0.062500 -0.500000 -0.062500 +v -0.062500 0.062500 0.062500 +v -0.062500 -0.500000 0.062500 +v -0.353553 -0.500000 0.353553 +v -0.353553 0.500000 0.353553 +v 0.353553 -0.500000 -0.353553 +v 0.353553 0.500000 -0.353553 +v -0.353553 -0.500000 -0.353553 +v 0.353553 -0.500000 0.353553 +v -0.353553 0.500000 -0.353553 +v 0.353553 0.500000 0.353553 +vt 0.562500 0.500000 +vt 0.562500 0.625000 +vt 0.437500 0.625000 +vt 0.437500 0.500000 +vt 0.437500 0.000000 +vt 0.562500 0.000000 +vt 0.562500 0.125000 +vt 0.437500 0.125000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.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 -0.707100 0.000000 -0.707100 +vn -0.707100 -0.000000 0.707100 +g Cube_Cube.001_Cube_Cube.001_Material.001 +usemtl Material.001 +s off +f 3/1/1 1/2/1 5/3/1 7/4/1 +f 8/5/1 4/6/1 2/7/1 6/8/1 +f 3/2/2 4/6/2 8/5/2 7/3/2 +f 1/3/3 3/2/3 4/6/3 2/5/3 +f 5/2/2 1/3/2 2/5/2 6/6/2 +f 7/3/3 8/5/3 6/6/3 5/2/3 +g Cube_Cube.001_Cube_Cube.001_Material.002 +usemtl Material.002 +f 9/9/4 10/10/4 12/11/4 11/12/4 +f 13/12/5 14/9/5 16/10/5 15/11/5 diff --git a/mods/default/models/torch_wall.obj b/mods/default/models/torch_wall.obj new file mode 100644 index 0000000..57baa9e --- /dev/null +++ b/mods/default/models/torch_wall.obj @@ -0,0 +1,64 @@ +# Blender v2.76 (sub 11) OBJ File: 'torch_wall.blend' +# www.blender.org +mtllib torch_wall.mtl +o Cube_Cube.001 +v 0.062469 -0.195248 0.023570 +v 0.062469 -0.476498 -0.463570 +v 0.062469 -0.303502 0.086070 +v 0.062469 -0.584752 -0.401070 +v -0.062531 -0.195248 0.023570 +v -0.062531 -0.476498 -0.463570 +v -0.062531 -0.303502 0.086070 +v -0.062531 -0.584752 -0.401070 +v -0.353584 -0.613553 0.022500 +v -0.353584 -0.613553 0.460000 +v 0.353522 0.093553 0.022500 +v 0.353522 0.093553 0.460000 +v -0.353584 0.093553 0.022500 +v 0.353522 -0.613553 0.022500 +v -0.353584 0.093553 0.460000 +v 0.353522 -0.613553 0.460000 +v 0.353553 0.056811 -0.121957 +v 0.353553 -0.224439 -0.609096 +v -0.353553 -0.555561 0.231596 +v -0.353553 -0.836811 -0.255543 +v -0.353553 0.056811 -0.121957 +v -0.353553 -0.224439 -0.609096 +v 0.353553 -0.555561 0.231596 +v 0.353553 -0.836811 -0.255543 +vt 0.562500 0.500000 +vt 0.562500 0.625000 +vt 0.437500 0.625000 +vt 0.437500 0.500000 +vt 0.437500 0.000000 +vt 0.562500 0.000000 +vt 0.562500 0.125000 +vt 0.437500 0.125000 +vt 0.000000 0.562500 +vt 0.000000 -0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.562500 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.000000 0.500000 0.866000 +vn -0.000000 0.866000 -0.500000 +vn 1.000000 0.000000 0.000000 +vn -0.707100 0.612400 -0.353600 +vn -0.707100 -0.612400 0.353600 +vn -0.707100 0.707100 -0.000000 +vn -0.707100 -0.707100 -0.000000 +g Cube_Cube.001_Cube_Cube.001_Material.001 +usemtl Material.001 +s off +f 3/1/1 1/2/1 5/3/1 7/4/1 +f 8/5/1 4/6/1 2/7/1 6/8/1 +f 3/2/2 4/6/2 8/5/2 7/3/2 +f 1/3/3 3/2/3 4/6/3 2/5/3 +f 5/2/2 1/3/2 2/5/2 6/6/2 +f 7/3/3 8/5/3 6/6/3 5/2/3 +f 17/9/4 18/10/4 20/11/4 19/12/4 +f 21/9/5 22/10/5 24/11/5 23/12/5 +g Cube_Cube.001_Cube_Cube.001_Material.002 +usemtl Material.002 +f 9/12/6 10/13/6 12/14/6 11/9/6 +f 13/9/7 14/12/7 16/13/7 15/14/7 diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua new file mode 100644 index 0000000..a8413e4 --- /dev/null +++ b/mods/default/nodes.lua @@ -0,0 +1,2947 @@ +-- mods/default/nodes.lua + +-- support for MT game translation. +local S = default.get_translator + +--[[ Node name convention: + +Although many node names are in combined-word form, the required form for new +node names is words separated by underscores. If both forms are used in written +language (for example pinewood and pine wood) the underscore form should be used. + +--]] + + +--[[ Index: + +Stone +----- +(1. Material 2. Cobble variant 3. Brick variant 4. Modified forms) + +default:stone +default:cobble +default:stonebrick +default:stone_block +default:mossycobble + +default:desert_stone +default:desert_cobble +default:desert_stonebrick +default:desert_stone_block + +default:sandstone +default:sandstonebrick +default:sandstone_block +default:desert_sandstone +default:desert_sandstone_brick +default:desert_sandstone_block +default:silver_sandstone +default:silver_sandstone_brick +default:silver_sandstone_block + +default:obsidian +default:obsidianbrick +default:obsidian_block + +Soft / Non-Stone +---------------- +(1. Material 2. Modified forms) + +default:dirt +default:dirt_with_grass +default:dirt_with_grass_footsteps +default:dirt_with_dry_grass +default:dirt_with_snow +default:dirt_with_rainforest_litter +default:dirt_with_coniferous_litter +default:dry_dirt +default:dry_dirt_with_dry_grass + +default:permafrost +default:permafrost_with_stones +default:permafrost_with_moss + +default:sand +default:desert_sand +default:silver_sand + +default:gravel + +default:clay + +default:snow +default:snowblock +default:ice +default:cave_ice + +Trees +----- +(1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits) + +default:tree +default:wood +default:leaves +default:sapling +default:apple + +default:jungletree +default:junglewood +default:jungleleaves +default:junglesapling +default:emergent_jungle_sapling + +default:pine_tree +default:pine_wood +default:pine_needles +default:pine_sapling + +default:acacia_tree +default:acacia_wood +default:acacia_leaves +default:acacia_sapling + +default:aspen_tree +default:aspen_wood +default:aspen_leaves +default:aspen_sapling + +Ores +---- +(1. In stone 2. Blocks) + +default:stone_with_coal +default:coalblock + +default:stone_with_iron +default:steelblock + +default:stone_with_copper +default:copperblock + +default:stone_with_tin +default:tinblock + +default:bronzeblock + +default:stone_with_gold +default:goldblock + +default:stone_with_mese +default:mese + +default:stone_with_diamond +default:diamondblock + +Plantlife +--------- + +default:cactus +default:large_cactus_seedling + +default:papyrus +default:dry_shrub +default:junglegrass + +default:grass_1 +default:grass_2 +default:grass_3 +default:grass_4 +default:grass_5 + +default:dry_grass_1 +default:dry_grass_2 +default:dry_grass_3 +default:dry_grass_4 +default:dry_grass_5 + +default:fern_1 +default:fern_2 +default:fern_3 + +default:marram_grass_1 +default:marram_grass_2 +default:marram_grass_3 + +default:bush_stem +default:bush_leaves +default:bush_sapling +default:acacia_bush_stem +default:acacia_bush_leaves +default:acacia_bush_sapling +default:pine_bush_stem +default:pine_bush_needles +default:pine_bush_sapling +default:blueberry_bush_leaves_with_berries +default:blueberry_bush_leaves +default:blueberry_bush_sapling + +default:sand_with_kelp + +Corals +------ + +default:coral_brown +default:coral_orange +default:coral_skeleton + +Liquids +------- +(1. Source 2. Flowing) + +default:water_source +default:water_flowing + +default:river_water_source +default:river_water_flowing + +default:lava_source +default:lava_flowing + +Tools / "Advanced" crafting / Non-"natural" +------------------------------------------- + +default:bookshelf + +default:sign_wall_wood +default:sign_wall_steel + +default:ladder_wood +default:ladder_steel + +default:fence_wood +default:fence_acacia_wood +default:fence_junglewood +default:fence_pine_wood +default:fence_aspen_wood + +default:glass +default:obsidian_glass + +default:brick + +default:meselamp +default:mese_post_light +default:mese_post_light_acacia_wood +default:mese_post_light_junglewood +default:mese_post_light_pine_wood +default:mese_post_light_aspen_wood + +Misc +---- + +default:cloud + +--]] + +-- Required wrapper to allow customization of default.after_place_leaves +local function after_place_leaves(...) + return default.after_place_leaves(...) +end + +-- Required wrapper to allow customization of default.grow_sapling +local function grow_sapling(...) + return default.grow_sapling(...) +end + +-- +-- Stone +-- + +minetest.register_node("default:stone", { + description = S("Stone"), + tiles = {"default_stone.png"}, + groups = {cracky = 3, stone = 1}, + drop = "default:cobble", + legacy_mineral = true, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:cobble", { + description = S("Cobblestone"), + tiles = {"default_cobble.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:stonebrick", { + description = S("Stone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_stone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:stone_block", { + description = S("Stone Block"), + tiles = {"default_stone_block.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:mossycobble", { + description = S("Mossy Cobblestone"), + tiles = {"default_mossycobble.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("default:desert_stone", { + description = S("Desert Stone"), + tiles = {"default_desert_stone.png"}, + groups = {cracky = 3, stone = 1}, + drop = "default:desert_cobble", + legacy_mineral = true, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_cobble", { + description = S("Desert Cobblestone"), + tiles = {"default_desert_cobble.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_stonebrick", { + description = S("Desert Stone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_desert_stone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_stone_block", { + description = S("Desert Stone Block"), + tiles = {"default_desert_stone_block.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:sandstone", { + description = S("Sandstone"), + tiles = {"default_sandstone.png"}, + groups = {crumbly = 1, cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:sandstonebrick", { + description = S("Sandstone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_sandstone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:sandstone_block", { + description = S("Sandstone Block"), + tiles = {"default_sandstone_block.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_sandstone", { + description = S("Desert Sandstone"), + tiles = {"default_desert_sandstone.png"}, + groups = {crumbly = 1, cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_sandstone_brick", { + description = S("Desert Sandstone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_desert_sandstone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_sandstone_block", { + description = S("Desert Sandstone Block"), + tiles = {"default_desert_sandstone_block.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:silver_sandstone", { + description = S("Silver Sandstone"), + tiles = {"default_silver_sandstone.png"}, + groups = {crumbly = 1, cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:silver_sandstone_brick", { + description = S("Silver Sandstone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_silver_sandstone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:silver_sandstone_block", { + description = S("Silver Sandstone Block"), + tiles = {"default_silver_sandstone_block.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:obsidian", { + description = S("Obsidian"), + tiles = {"default_obsidian.png"}, + sounds = default.node_sound_stone_defaults(), + groups = {cracky = 1, level = 2}, +}) + +minetest.register_node("default:obsidianbrick", { + description = S("Obsidian Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_obsidian_brick.png"}, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + groups = {cracky = 1, level = 2}, +}) + +minetest.register_node("default:obsidian_block", { + description = S("Obsidian Block"), + tiles = {"default_obsidian_block.png"}, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + groups = {cracky = 1, level = 2}, +}) + +-- +-- Soft / Non-Stone +-- + +minetest.register_node("default:dirt", { + description = S("Dirt"), + tiles = {"default_dirt.png"}, + groups = {crumbly = 3, soil = 1}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("default:dirt_with_grass", { + description = S("Dirt with Grass"), + tiles = {"default_grass.png", "default_dirt.png", + {name = "default_dirt.png^default_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("default:dirt_with_grass_footsteps", { + description = S("Dirt with Grass and Footsteps"), + tiles = {"default_grass.png^default_footprint.png", "default_dirt.png", + {name = "default_dirt.png^default_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("default:dirt_with_dry_grass", { + description = S("Dirt with Savanna Grass"), + tiles = {"default_dry_grass.png", + "default_dirt.png", + {name = "default_dirt.png^default_dry_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:dirt_with_snow", { + description = S("Dirt with Snow"), + tiles = {"default_snow.png", "default_dirt.png", + {name = "default_dirt.png^default_snow_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.2}, + }), +}) + +minetest.register_node("default:dirt_with_rainforest_litter", { + description = S("Dirt with Rainforest Litter"), + tiles = { + "default_rainforest_litter.png", + "default_dirt.png", + {name = "default_dirt.png^default_rainforest_litter_side.png", + tileable_vertical = false} + }, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:dirt_with_coniferous_litter", { + description = S("Dirt with Coniferous Litter"), + tiles = { + "default_coniferous_litter.png", + "default_dirt.png", + {name = "default_dirt.png^default_coniferous_litter_side.png", + tileable_vertical = false} + }, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:dry_dirt", { + description = S("Savanna Dirt"), + tiles = {"default_dry_dirt.png"}, + groups = {crumbly = 3, soil = 1}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("default:dry_dirt_with_dry_grass", { + description = S("Savanna Dirt with Savanna Grass"), + tiles = {"default_dry_grass.png", "default_dry_dirt.png", + {name = "default_dry_dirt.png^default_dry_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1}, + drop = "default:dry_dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:permafrost", { + description = S("Permafrost"), + tiles = {"default_permafrost.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("default:permafrost_with_stones", { + description = S("Permafrost with Stones"), + tiles = {"default_permafrost.png^default_stones.png", + "default_permafrost.png", + "default_permafrost.png^default_stones_side.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_gravel_defaults(), +}) + +minetest.register_node("default:permafrost_with_moss", { + description = S("Permafrost with Moss"), + tiles = {"default_moss.png", "default_permafrost.png", + {name = "default_permafrost.png^default_moss_side.png", + tileable_vertical = false}}, + groups = {cracky = 3}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("default:sand", { + description = S("Sand"), + tiles = {"default_sand.png"}, + groups = {crumbly = 3, falling_node = 1, sand = 1}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("default:desert_sand", { + description = S("Desert Sand"), + tiles = {"default_desert_sand.png"}, + groups = {crumbly = 3, falling_node = 1, sand = 1}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("default:silver_sand", { + description = S("Silver Sand"), + tiles = {"default_silver_sand.png"}, + groups = {crumbly = 3, falling_node = 1, sand = 1}, + sounds = default.node_sound_sand_defaults(), +}) + + +minetest.register_node("default:gravel", { + description = S("Gravel"), + tiles = {"default_gravel.png"}, + groups = {crumbly = 2, falling_node = 1}, + sounds = default.node_sound_gravel_defaults(), + drop = { + max_items = 1, + items = { + {items = {"default:flint"}, rarity = 16}, + {items = {"default:gravel"}} + } + } +}) + +minetest.register_node("default:clay", { + description = S("Clay"), + tiles = {"default_clay.png"}, + groups = {crumbly = 3}, + drop = "default:clay_lump 4", + sounds = default.node_sound_dirt_defaults(), +}) + + +minetest.register_node("default:snow", { + description = S("Snow"), + tiles = {"default_snow.png"}, + inventory_image = "default_snowball.png", + wield_image = "default_snowball.png", + paramtype = "light", + buildable_to = true, + floodable = true, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -6 / 16, 0.5}, + }, + }, + groups = {crumbly = 3, falling_node = 1, snowy = 1}, + sounds = default.node_sound_snow_defaults(), + + on_construct = function(pos) + pos.y = pos.y - 1 + if minetest.get_node(pos).name == "default:dirt_with_grass" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + end + end, +}) + +minetest.register_node("default:snowblock", { + description = S("Snow Block"), + tiles = {"default_snow.png"}, + groups = {crumbly = 3, cools_lava = 1, snowy = 1}, + sounds = default.node_sound_snow_defaults(), + + on_construct = function(pos) + pos.y = pos.y - 1 + if minetest.get_node(pos).name == "default:dirt_with_grass" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + end + end, +}) + +-- 'is ground content = false' to avoid tunnels in sea ice or ice rivers +minetest.register_node("default:ice", { + description = S("Ice"), + tiles = {"default_ice.png"}, + is_ground_content = false, + paramtype = "light", + groups = {cracky = 3, cools_lava = 1, slippery = 3}, + sounds = default.node_sound_ice_defaults(), +}) + +-- Mapgen-placed ice with 'is ground content = true' to contain tunnels +minetest.register_node("default:cave_ice", { + description = S("Cave Ice"), + tiles = {"default_ice.png"}, + paramtype = "light", + groups = {cracky = 3, cools_lava = 1, slippery = 3, + not_in_creative_inventory = 1}, + drop = "default:ice", + sounds = default.node_sound_ice_defaults(), +}) + +-- +-- Trees +-- + +minetest.register_node("default:tree", { + description = S("Apple Tree"), + tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:wood", { + description = S("Apple Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:sapling", { + description = S("Apple Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_sapling.png"}, + inventory_image = "default_sapling.png", + wield_image = "default_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -3, y = 1, z = -3}, + {x = 3, y = 6, z = 3}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("default:leaves", { + description = S("Apple Tree Leaves"), + drawtype = "allfaces_optional", + waving = 1, + tiles = {"default_leaves.png"}, + special_tiles = {"default_leaves_simple.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + { + -- player will get sapling with 1/20 chance + items = {"default:sapling"}, + rarity = 20, + }, + { + -- player will get leaves only if he get no saplings, + -- this is because max_items is 1 + items = {"default:leaves"}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:apple", { + description = S("Apple"), + drawtype = "plantlike", + tiles = {"default_apple.png"}, + inventory_image = "default_apple.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1, food_apple = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "default:apple", param2 = 1}) + end, + + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if oldnode.param2 == 0 then + minetest.set_node(pos, {name = "default:apple_mark"}) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end + end, +}) + +minetest.register_node("default:apple_mark", { + description = S("Apple Marker"), + inventory_image = "default_apple.png^default_invisible_node_overlay.png", + wield_image = "default_apple.png^default_invisible_node_overlay.png", + drawtype = "airlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + on_timer = function(pos, elapsed) + if not minetest.find_node_near(pos, 1, "default:leaves") then + minetest.remove_node(pos) + elseif minetest.get_node_light(pos) < 11 then + minetest.get_node_timer(pos):start(200) + else + minetest.set_node(pos, {name = "default:apple"}) + end + end +}) + + +minetest.register_node("default:jungletree", { + description = S("Jungle Tree"), + tiles = {"default_jungletree_top.png", "default_jungletree_top.png", + "default_jungletree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:junglewood", { + description = S("Jungle Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_junglewood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:jungleleaves", { + description = S("Jungle Tree Leaves"), + drawtype = "allfaces_optional", + waving = 1, + tiles = {"default_jungleleaves.png"}, + special_tiles = {"default_jungleleaves_simple.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:junglesapling"}, rarity = 20}, + {items = {"default:jungleleaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:junglesapling", { + description = S("Jungle Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_junglesapling.png"}, + inventory_image = "default_junglesapling.png", + wield_image = "default_junglesapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:junglesapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 15, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("default:emergent_jungle_sapling", { + description = S("Emergent Jungle Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_emergent_jungle_sapling.png"}, + inventory_image = "default_emergent_jungle_sapling.png", + wield_image = "default_emergent_jungle_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:emergent_jungle_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -3, y = -5, z = -3}, + {x = 3, y = 31, z = 3}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + + +minetest.register_node("default:pine_tree", { + description = S("Pine Tree"), + tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png", + "default_pine_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:pine_wood", { + description = S("Pine Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_pine_wood.png"}, + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:pine_needles",{ + description = S("Pine Needles"), + drawtype = "allfaces_optional", + tiles = {"default_pine_needles.png"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:pine_sapling"}, rarity = 20}, + {items = {"default:pine_needles"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:pine_sapling", { + description = S("Pine Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_pine_sapling.png"}, + inventory_image = "default_pine_sapling.png", + wield_image = "default_pine_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 3, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:pine_sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 14, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + + +minetest.register_node("default:acacia_tree", { + description = S("Acacia Tree"), + tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png", + "default_acacia_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:acacia_wood", { + description = S("Acacia Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_acacia_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:acacia_leaves", { + description = S("Acacia Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_acacia_leaves.png"}, + special_tiles = {"default_acacia_leaves_simple.png"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:acacia_sapling"}, rarity = 20}, + {items = {"default:acacia_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:acacia_sapling", { + description = S("Acacia Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_acacia_sapling.png"}, + inventory_image = "default_acacia_sapling.png", + wield_image = "default_acacia_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:acacia_sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -4, y = 1, z = -4}, + {x = 4, y = 7, z = 4}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("default:aspen_tree", { + description = S("Aspen Tree"), + tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png", + "default_aspen_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:aspen_wood", { + description = S("Aspen Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_aspen_wood.png"}, + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:aspen_leaves", { + description = S("Aspen Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_aspen_leaves.png"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:aspen_sapling"}, rarity = 20}, + {items = {"default:aspen_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:aspen_sapling", { + description = S("Aspen Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_aspen_sapling.png"}, + inventory_image = "default_aspen_sapling.png", + wield_image = "default_aspen_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 0.5, 3 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 3, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:aspen_sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 12, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +-- +-- Ores +-- + +minetest.register_node("default:stone_with_coal", { + description = S("Coal Ore"), + tiles = {"default_stone.png^default_mineral_coal.png"}, + groups = {cracky = 3}, + drop = "default:coal_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:coalblock", { + description = S("Coal Block"), + tiles = {"default_coal_block.png"}, + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("default:stone_with_iron", { + description = S("Iron Ore"), + tiles = {"default_stone.png^default_mineral_iron.png"}, + groups = {cracky = 2}, + drop = "default:iron_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:steelblock", { + description = S("Steel Block"), + tiles = {"default_steel_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_copper", { + description = S("Copper Ore"), + tiles = {"default_stone.png^default_mineral_copper.png"}, + groups = {cracky = 2}, + drop = "default:copper_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:copperblock", { + description = S("Copper Block"), + tiles = {"default_copper_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_tin", { + description = S("Tin Ore"), + tiles = {"default_stone.png^default_mineral_tin.png"}, + groups = {cracky = 2}, + drop = "default:tin_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:tinblock", { + description = S("Tin Block"), + tiles = {"default_tin_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:bronzeblock", { + description = S("Bronze Block"), + tiles = {"default_bronze_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_mese", { + description = S("Mese Ore"), + tiles = {"default_stone.png^default_mineral_mese.png"}, + groups = {cracky = 1}, + drop = "default:mese_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:mese", { + description = S("Mese Block"), + tiles = {"default_mese_block.png"}, + paramtype = "light", + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_stone_defaults(), + light_source = 3, +}) + + +minetest.register_node("default:stone_with_gold", { + description = S("Gold Ore"), + tiles = {"default_stone.png^default_mineral_gold.png"}, + groups = {cracky = 2}, + drop = "default:gold_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:goldblock", { + description = S("Gold Block"), + tiles = {"default_gold_block.png"}, + is_ground_content = false, + groups = {cracky = 1}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_diamond", { + description = S("Diamond Ore"), + tiles = {"default_stone.png^default_mineral_diamond.png"}, + groups = {cracky = 1}, + drop = "default:diamond", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:diamondblock", { + description = S("Diamond Block"), + tiles = {"default_diamond_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +-- +-- Plantlife (non-cubic) +-- + +minetest.register_node("default:cactus", { + description = S("Cactus"), + tiles = {"default_cactus_top.png", "default_cactus_top.png", + "default_cactus_side.png"}, + paramtype2 = "facedir", + groups = {choppy = 3}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, +}) + +minetest.register_node("default:large_cactus_seedling", { + description = S("Large Cactus Seedling"), + drawtype = "plantlike", + tiles = {"default_large_cactus_seedling.png"}, + inventory_image = "default_large_cactus_seedling.png", + wield_image = "default_large_cactus_seedling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = { + -5 / 16, -0.5, -5 / 16, + 5 / 16, 0.5, 5 / 16 + } + }, + groups = {choppy = 3, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_wood_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:large_cactus_seedling", + {x = -2, y = -1, z = -2}, + {x = 2, y = 5, z = 2}, + 4) + + return itemstack + end, + + on_construct = function(pos) + -- Normal cactus farming adds 1 cactus node by ABM, + -- interval 12s, chance 83. + -- Consider starting with 5 cactus nodes. We make sure that growing a + -- large cactus is not a faster way to produce new cactus nodes. + -- Confirmed by experiment, when farming 5 cacti, on average 1 new + -- cactus node is added on average every + -- 83 / 5 = 16.6 intervals = 16.6 * 12 = 199.2s. + -- Large cactus contains on average 14 cactus nodes. + -- 14 * 199.2 = 2788.8s. + -- Set random range to average to 2789s. + minetest.get_node_timer(pos):start(math.random(1859, 3719)) + end, + + on_timer = function(pos) + local node_under = minetest.get_node_or_nil( + {x = pos.x, y = pos.y - 1, z = pos.z}) + if not node_under then + -- Node under not yet loaded, try later + minetest.get_node_timer(pos):start(300) + return + end + + if minetest.get_item_group(node_under.name, "sand") == 0 then + -- Seedling dies + minetest.remove_node(pos) + return + end + + local light_level = minetest.get_node_light(pos) + if not light_level or light_level < 13 then + -- Too dark for growth, try later in case it's night + minetest.get_node_timer(pos):start(300) + return + end + + minetest.log("action", "A large cactus seedling grows into a large" .. + "cactus at ".. minetest.pos_to_string(pos)) + default.grow_large_cactus(pos) + end, +}) + +minetest.register_node("default:papyrus", { + description = S("Papyrus"), + drawtype = "plantlike", + tiles = {"default_papyrus.png"}, + inventory_image = "default_papyrus.png", + wield_image = "default_papyrus.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16}, + }, + groups = {snappy = 3, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end, +}) + +minetest.register_node("default:dry_shrub", { + description = S("Dry Shrub"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_dry_shrub.png"}, + inventory_image = "default_dry_shrub.png", + wield_image = "default_dry_shrub.png", + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 4, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16}, + }, +}) + +minetest.register_node("default:junglegrass", { + description = S("Jungle Grass"), + drawtype = "plantlike", + waving = 1, + visual_scale = 1.69, + tiles = {"default_junglegrass.png"}, + inventory_image = "default_junglegrass.png", + wield_image = "default_junglegrass.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16}, + }, +}) + + +minetest.register_node("default:grass_1", { + description = S("Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_1.png"}, + -- Use texture of a taller grass stage in inventory + inventory_image = "default_grass_3.png", + wield_image = "default_grass_3.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random grass node + local stack = ItemStack("default:grass_" .. math.random(1,5)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 5 do + minetest.register_node("default:grass_" .. i, { + description = S("Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_" .. i .. ".png"}, + inventory_image = "default_grass_" .. i .. ".png", + wield_image = "default_grass_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "default:grass_1", + groups = {snappy = 3, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, grass = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:dry_grass_1", { + description = S("Savanna Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_dry_grass_1.png"}, + inventory_image = "default_dry_grass_3.png", + wield_image = "default_dry_grass_3.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, + attached_node = 1, dry_grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random dry grass node + local stack = ItemStack("default:dry_grass_" .. math.random(1, 5)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:dry_grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 5 do + minetest.register_node("default:dry_grass_" .. i, { + description = S("Savanna Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_dry_grass_" .. i .. ".png"}, + inventory_image = "default_dry_grass_" .. i .. ".png", + wield_image = "default_dry_grass_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1, + not_in_creative_inventory=1, dry_grass = 1}, + drop = "default:dry_grass_1", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -1 / 16, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:fern_1", { + description = S("Fern"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_fern_1.png"}, + inventory_image = "default_fern_1.png", + wield_image = "default_fern_1.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random fern node + local stack = ItemStack("default:fern_" .. math.random(1, 3)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:fern_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 3 do + minetest.register_node("default:fern_" .. i, { + description = S("Fern"), + drawtype = "plantlike", + waving = 1, + visual_scale = 2, + tiles = {"default_fern_" .. i .. ".png"}, + inventory_image = "default_fern_" .. i .. ".png", + wield_image = "default_fern_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1, + not_in_creative_inventory=1}, + drop = "default:fern_1", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:marram_grass_1", { + description = S("Marram Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_marram_grass_1.png"}, + inventory_image = "default_marram_grass_1.png", + wield_image = "default_marram_grass_1.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random marram grass node + local stack = ItemStack("default:marram_grass_" .. math.random(1, 3)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:marram_grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 3 do + minetest.register_node("default:marram_grass_" .. i, { + description = S("Marram Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_marram_grass_" .. i .. ".png"}, + inventory_image = "default_marram_grass_" .. i .. ".png", + wield_image = "default_marram_grass_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, attached_node = 1, + not_in_creative_inventory=1}, + drop = "default:marram_grass_1", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:bush_stem", { + description = S("Bush Stem"), + drawtype = "plantlike", + visual_scale = 1.41, + tiles = {"default_bush_stem.png"}, + inventory_image = "default_bush_stem.png", + wield_image = "default_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16}, + }, +}) + +minetest.register_node("default:bush_leaves", { + description = S("Bush Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_leaves_simple.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:bush_sapling"}, rarity = 5}, + {items = {"default:bush_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:bush_sapling", { + description = S("Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_bush_sapling.png"}, + inventory_image = "default_bush_sapling.png", + wield_image = "default_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + +minetest.register_node("default:blueberry_bush_leaves_with_berries", { + description = S("Blueberry Bush Leaves with Berries"), + drawtype = "allfaces_optional", + tiles = {"default_blueberry_bush_leaves.png^default_blueberry_overlay.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 3}, + drop = "default:blueberries", + sounds = default.node_sound_leaves_defaults(), + node_dig_prediction = "default:blueberry_bush_leaves", + + after_dig_node = function(pos, oldnode, oldmetadata, digger) + minetest.set_node(pos, {name = "default:blueberry_bush_leaves"}) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, +}) + +minetest.register_node("default:blueberry_bush_leaves", { + description = S("Blueberry Bush Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_blueberry_bush_leaves.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:blueberry_bush_sapling"}, rarity = 5}, + {items = {"default:blueberry_bush_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) < 11 then + minetest.get_node_timer(pos):start(200) + else + minetest.set_node(pos, {name = "default:blueberry_bush_leaves_with_berries"}) + end + end, + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:blueberry_bush_sapling", { + description = S("Blueberry Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_blueberry_bush_sapling.png"}, + inventory_image = "default_blueberry_bush_sapling.png", + wield_image = "default_blueberry_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:blueberry_bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + +minetest.register_node("default:acacia_bush_stem", { + description = S("Acacia Bush Stem"), + drawtype = "plantlike", + visual_scale = 1.41, + tiles = {"default_acacia_bush_stem.png"}, + inventory_image = "default_acacia_bush_stem.png", + wield_image = "default_acacia_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16}, + }, +}) + +minetest.register_node("default:acacia_bush_leaves", { + description = S("Acacia Bush Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_acacia_leaves_simple.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:acacia_bush_sapling"}, rarity = 5}, + {items = {"default:acacia_bush_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:acacia_bush_sapling", { + description = S("Acacia Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_acacia_bush_sapling.png"}, + inventory_image = "default_acacia_bush_sapling.png", + wield_image = "default_acacia_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 2 / 16, 3 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:acacia_bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + +minetest.register_node("default:pine_bush_stem", { + description = S("Pine Bush Stem"), + drawtype = "plantlike", + visual_scale = 1.41, + tiles = {"default_pine_bush_stem.png"}, + inventory_image = "default_pine_bush_stem.png", + wield_image = "default_pine_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16}, + }, +}) + +minetest.register_node("default:pine_bush_needles", { + description = S("Pine Bush Needles"), + drawtype = "allfaces_optional", + tiles = {"default_pine_needles.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:pine_bush_sapling"}, rarity = 5}, + {items = {"default:pine_bush_needles"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:pine_bush_sapling", { + description = S("Pine Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_pine_bush_sapling.png"}, + inventory_image = "default_pine_bush_sapling.png", + wield_image = "default_pine_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:pine_bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + + +minetest.register_node("default:sand_with_kelp", { + description = S("Kelp"), + drawtype = "plantlike_rooted", + waving = 1, + tiles = {"default_sand.png"}, + special_tiles = {{name = "default_kelp.png", tileable_vertical = true}}, + inventory_image = "default_kelp.png", + paramtype = "light", + paramtype2 = "leveled", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-2/16, 0.5, -2/16, 2/16, 3.5, 2/16}, + }, + }, + node_dig_prediction = "default:sand", + node_placement_prediction = "", + sounds = default.node_sound_sand_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = function(itemstack, placer, pointed_thing) + -- Call on_rightclick if the pointed node defines it + if pointed_thing.type == "node" and placer and + not placer:get_player_control().sneak then + local node_ptu = minetest.get_node(pointed_thing.under) + local def_ptu = minetest.registered_nodes[node_ptu.name] + if def_ptu and def_ptu.on_rightclick then + return def_ptu.on_rightclick(pointed_thing.under, node_ptu, placer, + itemstack, pointed_thing) + end + end + + local pos = pointed_thing.under + if minetest.get_node(pos).name ~= "default:sand" then + return itemstack + end + + local height = math.random(4, 6) + local pos_top = {x = pos.x, y = pos.y + height, z = pos.z} + local node_top = minetest.get_node(pos_top) + local def_top = minetest.registered_nodes[node_top.name] + local player_name = placer:get_player_name() + + if def_top and def_top.liquidtype == "source" and + minetest.get_item_group(node_top.name, "water") > 0 then + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pos_top, player_name) then + minetest.set_node(pos, {name = "default:sand_with_kelp", + param2 = height * 16}) + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, "Node is protected") + minetest.record_protection_violation(pos, player_name) + end + end + + return itemstack + end, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:sand"}) + end +}) + + +-- +-- Corals +-- + +local function coral_on_place(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" or not placer then + return itemstack + end + + local player_name = placer:get_player_name() + local pos_under = pointed_thing.under + local pos_above = pointed_thing.above + local node_under = minetest.get_node(pos_under) + local def_under = minetest.registered_nodes[node_under.name] + + if def_under and def_under.on_rightclick and not placer:get_player_control().sneak then + return def_under.on_rightclick(pos_under, node_under, + placer, itemstack, pointed_thing) or itemstack + end + + if node_under.name ~= "default:coral_skeleton" or + minetest.get_node(pos_above).name ~= "default:water_source" then + return itemstack + end + + if minetest.is_protected(pos_under, player_name) or + minetest.is_protected(pos_above, player_name) then + minetest.log("action", player_name + .. " tried to place " .. itemstack:get_name() + .. " at protected position " + .. minetest.pos_to_string(pos_under)) + minetest.record_protection_violation(pos_under, player_name) + return itemstack + end + + node_under.name = itemstack:get_name() + minetest.set_node(pos_under, node_under) + if not (creative and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + + return itemstack +end + +minetest.register_node("default:coral_green", { + description = S("Green Coral"), + drawtype = "plantlike_rooted", + waving = 1, + paramtype = "light", + tiles = {"default_coral_skeleton.png"}, + special_tiles = {{name = "default_coral_green.png", tileable_vertical = true}}, + inventory_image = "default_coral_green.png", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16}, + }, + }, + node_dig_prediction = "default:coral_skeleton", + node_placement_prediction = "", + sounds = default.node_sound_stone_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = coral_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:coral_skeleton"}) + end, +}) + +minetest.register_node("default:coral_pink", { + description = S("Pink Coral"), + drawtype = "plantlike_rooted", + waving = 1, + paramtype = "light", + tiles = {"default_coral_skeleton.png"}, + special_tiles = {{name = "default_coral_pink.png", tileable_vertical = true}}, + inventory_image = "default_coral_pink.png", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16}, + }, + }, + node_dig_prediction = "default:coral_skeleton", + node_placement_prediction = "", + sounds = default.node_sound_stone_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = coral_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:coral_skeleton"}) + end, +}) + +minetest.register_node("default:coral_cyan", { + description = S("Cyan Coral"), + drawtype = "plantlike_rooted", + waving = 1, + paramtype = "light", + tiles = {"default_coral_skeleton.png"}, + special_tiles = {{name = "default_coral_cyan.png", tileable_vertical = true}}, + inventory_image = "default_coral_cyan.png", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16}, + }, + }, + node_dig_prediction = "default:coral_skeleton", + node_placement_prediction = "", + sounds = default.node_sound_stone_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = coral_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:coral_skeleton"}) + end, +}) + +minetest.register_node("default:coral_brown", { + description = S("Brown Coral"), + tiles = {"default_coral_brown.png"}, + groups = {cracky = 3}, + drop = "default:coral_skeleton", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:coral_orange", { + description = S("Orange Coral"), + tiles = {"default_coral_orange.png"}, + groups = {cracky = 3}, + drop = "default:coral_skeleton", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:coral_skeleton", { + description = S("Coral Skeleton"), + tiles = {"default_coral_skeleton.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + + +-- +-- Liquids +-- + +minetest.register_node("default:water_source", { + description = S("Water Source"), + drawtype = "liquid", + waving = 3, + tiles = { + { + name = "default_water_source_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + { + name = "default_water_source_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + alpha = 191, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "default:water_flowing", + liquid_alternative_source = "default:water_source", + liquid_viscosity = 1, + post_effect_color = {a = 103, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + +minetest.register_node("default:water_flowing", { + description = S("Flowing Water"), + drawtype = "flowingliquid", + waving = 3, + tiles = {"default_water.png"}, + special_tiles = { + { + name = "default_water_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + { + name = "default_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + }, + alpha = 191, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "default:water_flowing", + liquid_alternative_source = "default:water_source", + liquid_viscosity = 1, + post_effect_color = {a = 103, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, + cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + + +minetest.register_node("default:river_water_source", { + description = S("River Water Source"), + drawtype = "liquid", + tiles = { + { + name = "default_river_water_source_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + { + name = "default_river_water_source_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + alpha = 160, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "default:river_water_flowing", + liquid_alternative_source = "default:river_water_source", + liquid_viscosity = 1, + -- Not renewable to avoid horizontal spread of water sources in sloping + -- rivers that can cause water to overflow riverbanks and cause floods. + -- River water source is instead made renewable by the 'force renew' + -- option used in the 'bucket' mod by the river water bucket. + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 103, r = 30, g = 76, b = 90}, + groups = {water = 3, liquid = 3, cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + +minetest.register_node("default:river_water_flowing", { + description = S("Flowing River Water"), + drawtype = "flowingliquid", + tiles = {"default_river_water.png"}, + special_tiles = { + { + name = "default_river_water_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + { + name = "default_river_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + }, + alpha = 160, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "default:river_water_flowing", + liquid_alternative_source = "default:river_water_source", + liquid_viscosity = 1, + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 103, r = 30, g = 76, b = 90}, + groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, + cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + + +minetest.register_node("default:lava_source", { + description = S("Lava Source"), + drawtype = "liquid", + tiles = { + { + name = "default_lava_source_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.0, + }, + }, + { + name = "default_lava_source_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.0, + }, + }, + }, + paramtype = "light", + light_source = default.LIGHT_MAX - 1, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "default:lava_flowing", + liquid_alternative_source = "default:lava_source", + liquid_viscosity = 7, + liquid_renewable = false, + damage_per_second = 4 * 2, + post_effect_color = {a = 191, r = 255, g = 64, b = 0}, + groups = {lava = 3, liquid = 2, igniter = 1}, +}) + +minetest.register_node("default:lava_flowing", { + description = S("Flowing Lava"), + drawtype = "flowingliquid", + tiles = {"default_lava.png"}, + special_tiles = { + { + name = "default_lava_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.3, + }, + }, + { + name = "default_lava_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.3, + }, + }, + }, + paramtype = "light", + paramtype2 = "flowingliquid", + light_source = default.LIGHT_MAX - 1, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "default:lava_flowing", + liquid_alternative_source = "default:lava_source", + liquid_viscosity = 7, + liquid_renewable = false, + damage_per_second = 4 * 2, + post_effect_color = {a = 191, r = 255, g = 64, b = 0}, + groups = {lava = 3, liquid = 2, igniter = 1, + not_in_creative_inventory = 1}, +}) + +-- +-- Tools / "Advanced" crafting / Non-"natural" +-- + +local bookshelf_formspec = + "size[8,7;]" .. + "list[context;books;0,0.3;8,2;]" .. + "list[current_player;main;0,2.85;8,1;]" .. + "list[current_player;main;0,4.08;8,3;8]" .. + "listring[context;books]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,2.85) + +local function update_bookshelf(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local invlist = inv:get_list("books") + + local formspec = bookshelf_formspec + -- Inventory slots overlay + local bx, by = 0, 0.3 + local n_written, n_empty = 0, 0 + for i = 1, 16 do + if i == 9 then + bx = 0 + by = by + 1 + end + local stack = invlist[i] + if stack:is_empty() then + formspec = formspec .. + "image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]" + else + local metatable = stack:get_meta():to_table() or {} + if metatable.fields and metatable.fields.text then + n_written = n_written + stack:get_count() + else + n_empty = n_empty + stack:get_count() + end + end + bx = bx + 1 + end + meta:set_string("formspec", formspec) + if n_written + n_empty == 0 then + meta:set_string("infotext", S("Empty Bookshelf")) + else + meta:set_string("infotext", S("Bookshelf (@1 written, @2 empty books)", n_written, n_empty)) + end +end + +minetest.register_node("default:bookshelf", { + description = S("Bookshelf"), + tiles = {"default_wood.png", "default_wood.png", "default_wood.png", + "default_wood.png", "default_bookshelf.png", "default_bookshelf.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("books", 8 * 2) + update_bookshelf(pos) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("books") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack) + if minetest.get_item_group(stack:get_name(), "book") ~= 0 then + return stack:get_count() + end + return 0 + 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 bookshelf at " .. minetest.pos_to_string(pos)) + update_bookshelf(pos) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " puts stuff to bookshelf at " .. minetest.pos_to_string(pos)) + update_bookshelf(pos) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from bookshelf at " .. minetest.pos_to_string(pos)) + update_bookshelf(pos) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "books", drops) + drops[#drops+1] = "default:bookshelf" + minetest.remove_node(pos) + return drops + end, +}) + +local function register_sign(material, desc, def) + minetest.register_node("default:sign_wall_" .. material, { + description = desc, + drawtype = "nodebox", + tiles = {"default_sign_wall_" .. material .. ".png"}, + inventory_image = "default_sign_" .. material .. ".png", + wield_image = "default_sign_" .. material .. ".png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + node_box = { + type = "wallmounted", + wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125}, + wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125}, + wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375}, + }, + groups = def.groups, + legacy_wallmounted = true, + sounds = def.sounds, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[text;;${text}]") + end, + on_receive_fields = function(pos, formname, fields, sender) + local player_name = sender:get_player_name() + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + return + end + local text = fields.text + if not text then + return + end + if string.len(text) > 512 then + minetest.chat_send_player(player_name, S("Text too long")) + return + end + minetest.log("action", player_name .. " wrote \"" .. text .. + "\" to the sign at " .. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("text", text) + + if #text > 0 then + meta:set_string("infotext", S('"@1"', text)) + else + meta:set_string("infotext", '') + end + end, + }) +end + +register_sign("wood", S("Wooden Sign"), { + sounds = default.node_sound_wood_defaults(), + groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3} +}) + +register_sign("steel", S("Steel Sign"), { + sounds = default.node_sound_metal_defaults(), + groups = {cracky = 2, attached_node = 1} +}) + +minetest.register_node("default:ladder_wood", { + description = S("Wooden Ladder"), + drawtype = "signlike", + tiles = {"default_ladder_wood.png"}, + inventory_image = "default_ladder_wood.png", + wield_image = "default_ladder_wood.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + climbable = true, + is_ground_content = false, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + }, + groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2}, + legacy_wallmounted = true, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:ladder_steel", { + description = S("Steel Ladder"), + drawtype = "signlike", + tiles = {"default_ladder_steel.png"}, + inventory_image = "default_ladder_steel.png", + wield_image = "default_ladder_steel.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + climbable = true, + is_ground_content = false, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + }, + groups = {cracky = 2}, + sounds = default.node_sound_metal_defaults(), +}) + +default.register_fence("default:fence_wood", { + description = S("Apple Wood Fence"), + texture = "default_fence_wood.png", + inventory_image = "default_fence_overlay.png^default_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_acacia_wood", { + description = S("Acacia Wood Fence"), + texture = "default_fence_acacia_wood.png", + inventory_image = "default_fence_overlay.png^default_acacia_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_acacia_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:acacia_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_junglewood", { + description = S("Jungle Wood Fence"), + texture = "default_fence_junglewood.png", + inventory_image = "default_fence_overlay.png^default_junglewood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_junglewood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:junglewood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_pine_wood", { + description = S("Pine Wood Fence"), + texture = "default_fence_pine_wood.png", + inventory_image = "default_fence_overlay.png^default_pine_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_pine_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:pine_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_aspen_wood", { + description = S("Aspen Wood Fence"), + texture = "default_fence_aspen_wood.png", + inventory_image = "default_fence_overlay.png^default_aspen_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_aspen_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:aspen_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_wood", { + description = S("Apple Wood Fence Rail"), + texture = "default_fence_rail_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_acacia_wood", { + description = S("Acacia Wood Fence Rail"), + texture = "default_fence_rail_acacia_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:acacia_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_junglewood", { + description = S("Jungle Wood Fence Rail"), + texture = "default_fence_rail_junglewood.png", + inventory_image = "default_fence_rail_overlay.png^default_junglewood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_junglewood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:junglewood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_pine_wood", { + description = S("Pine Wood Fence Rail"), + texture = "default_fence_rail_pine_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_pine_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_pine_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:pine_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_aspen_wood", { + description = S("Aspen Wood Fence Rail"), + texture = "default_fence_rail_aspen_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:aspen_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +minetest.register_node("default:glass", { + description = S("Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"default_glass.png", "default_glass_detail.png"}, + paramtype = "light", + paramtype2 = "glasslikeliquidlevel", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_node("default:obsidian_glass", { + description = S("Obsidian Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"}, + paramtype = "light", + paramtype2 = "glasslikeliquidlevel", + is_ground_content = false, + sunlight_propagates = true, + sounds = default.node_sound_glass_defaults(), + groups = {cracky = 3}, +}) + + +minetest.register_node("default:brick", { + description = S("Brick Block"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = { + "default_brick.png^[transformFX", + "default_brick.png", + }, + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("default:meselamp", { + description = S("Mese Lamp"), + drawtype = "glasslike", + tiles = {"default_meselamp.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), + light_source = default.LIGHT_MAX, +}) + +default.register_mesepost("default:mese_post_light", { + description = S("Apple Wood Mese Post Light"), + texture = "default_fence_wood.png", + material = "default:wood", +}) + +default.register_mesepost("default:mese_post_light_acacia", { + description = S("Acacia Wood Mese Post Light"), + texture = "default_fence_acacia_wood.png", + material = "default:acacia_wood", +}) + +default.register_mesepost("default:mese_post_light_junglewood", { + description = S("Jungle Wood Mese Post Light"), + texture = "default_fence_junglewood.png", + material = "default:junglewood", +}) + +default.register_mesepost("default:mese_post_light_pine_wood", { + description = S("Pine Wood Mese Post Light"), + texture = "default_fence_pine_wood.png", + material = "default:pine_wood", +}) + +default.register_mesepost("default:mese_post_light_aspen_wood", { + description = S("Aspen Wood Mese Post Light"), + texture = "default_fence_aspen_wood.png", + material = "default:aspen_wood", +}) + +-- +-- Misc +-- + +minetest.register_node("default:cloud", { + description = S("Cloud"), + tiles = {"default_cloud.png"}, + is_ground_content = false, + sounds = default.node_sound_defaults(), + groups = {not_in_creative_inventory = 1}, +}) + +-- +-- register trees for leafdecay +-- + +if minetest.get_mapgen_setting("mg_name") == "v6" then + default.register_leafdecay({ + trunks = {"default:tree"}, + leaves = {"default:apple", "default:leaves"}, + radius = 2, + }) + + default.register_leafdecay({ + trunks = {"default:jungletree"}, + leaves = {"default:jungleleaves"}, + radius = 3, + }) +else + default.register_leafdecay({ + trunks = {"default:tree"}, + leaves = {"default:apple", "default:leaves"}, + radius = 3, + }) + + default.register_leafdecay({ + trunks = {"default:jungletree"}, + leaves = {"default:jungleleaves"}, + radius = 2, + }) +end + +default.register_leafdecay({ + trunks = {"default:pine_tree"}, + leaves = {"default:pine_needles"}, + radius = 3, +}) + +default.register_leafdecay({ + trunks = {"default:acacia_tree"}, + leaves = {"default:acacia_leaves"}, + radius = 2, +}) + +default.register_leafdecay({ + trunks = {"default:aspen_tree"}, + leaves = {"default:aspen_leaves"}, + radius = 3, +}) + +default.register_leafdecay({ + trunks = {"default:bush_stem"}, + leaves = {"default:bush_leaves"}, + radius = 1, +}) + +default.register_leafdecay({ + trunks = {"default:acacia_bush_stem"}, + leaves = {"default:acacia_bush_leaves"}, + radius = 1, +}) + +default.register_leafdecay({ + trunks = {"default:pine_bush_stem"}, + leaves = {"default:pine_bush_needles"}, + radius = 1, +}) diff --git a/mods/default/schematics/acacia_bush.mts b/mods/default/schematics/acacia_bush.mts new file mode 100644 index 0000000..3322e3b Binary files /dev/null and b/mods/default/schematics/acacia_bush.mts differ diff --git a/mods/default/schematics/acacia_log.mts b/mods/default/schematics/acacia_log.mts new file mode 100644 index 0000000..aff3bd6 Binary files /dev/null and b/mods/default/schematics/acacia_log.mts differ diff --git a/mods/default/schematics/acacia_tree.mts b/mods/default/schematics/acacia_tree.mts new file mode 100644 index 0000000..9b23498 Binary files /dev/null and b/mods/default/schematics/acacia_tree.mts differ diff --git a/mods/default/schematics/acacia_tree_from_sapling.mts b/mods/default/schematics/acacia_tree_from_sapling.mts new file mode 100644 index 0000000..c32a995 Binary files /dev/null and b/mods/default/schematics/acacia_tree_from_sapling.mts differ diff --git a/mods/default/schematics/apple_log.mts b/mods/default/schematics/apple_log.mts new file mode 100644 index 0000000..92fb900 Binary files /dev/null and b/mods/default/schematics/apple_log.mts differ diff --git a/mods/default/schematics/apple_tree.mts b/mods/default/schematics/apple_tree.mts new file mode 100644 index 0000000..d56cd54 Binary files /dev/null and b/mods/default/schematics/apple_tree.mts differ diff --git a/mods/default/schematics/apple_tree_from_sapling.mts b/mods/default/schematics/apple_tree_from_sapling.mts new file mode 100644 index 0000000..2325100 Binary files /dev/null and b/mods/default/schematics/apple_tree_from_sapling.mts differ diff --git a/mods/default/schematics/aspen_log.mts b/mods/default/schematics/aspen_log.mts new file mode 100644 index 0000000..d0c723d Binary files /dev/null and b/mods/default/schematics/aspen_log.mts differ diff --git a/mods/default/schematics/aspen_tree.mts b/mods/default/schematics/aspen_tree.mts new file mode 100644 index 0000000..429a831 Binary files /dev/null and b/mods/default/schematics/aspen_tree.mts differ diff --git a/mods/default/schematics/aspen_tree_from_sapling.mts b/mods/default/schematics/aspen_tree_from_sapling.mts new file mode 100644 index 0000000..b7ab3ee Binary files /dev/null and b/mods/default/schematics/aspen_tree_from_sapling.mts differ diff --git a/mods/default/schematics/blueberry_bush.mts b/mods/default/schematics/blueberry_bush.mts new file mode 100644 index 0000000..cf4d8ef Binary files /dev/null and b/mods/default/schematics/blueberry_bush.mts differ diff --git a/mods/default/schematics/bush.mts b/mods/default/schematics/bush.mts new file mode 100644 index 0000000..d08cf5f Binary files /dev/null and b/mods/default/schematics/bush.mts differ diff --git a/mods/default/schematics/emergent_jungle_tree.mts b/mods/default/schematics/emergent_jungle_tree.mts new file mode 100644 index 0000000..b526430 Binary files /dev/null and b/mods/default/schematics/emergent_jungle_tree.mts differ diff --git a/mods/default/schematics/emergent_jungle_tree_from_sapling.mts b/mods/default/schematics/emergent_jungle_tree_from_sapling.mts new file mode 100644 index 0000000..cb4e4e9 Binary files /dev/null and b/mods/default/schematics/emergent_jungle_tree_from_sapling.mts differ diff --git a/mods/default/schematics/jungle_log.mts b/mods/default/schematics/jungle_log.mts new file mode 100644 index 0000000..34dca43 Binary files /dev/null and b/mods/default/schematics/jungle_log.mts differ diff --git a/mods/default/schematics/jungle_tree.mts b/mods/default/schematics/jungle_tree.mts new file mode 100644 index 0000000..fe93c8c Binary files /dev/null and b/mods/default/schematics/jungle_tree.mts differ diff --git a/mods/default/schematics/jungle_tree_from_sapling.mts b/mods/default/schematics/jungle_tree_from_sapling.mts new file mode 100644 index 0000000..f32d312 Binary files /dev/null and b/mods/default/schematics/jungle_tree_from_sapling.mts differ diff --git a/mods/default/schematics/large_cactus.mts b/mods/default/schematics/large_cactus.mts new file mode 100644 index 0000000..cadcdcc Binary files /dev/null and b/mods/default/schematics/large_cactus.mts differ diff --git a/mods/default/schematics/papyrus_on_dirt.mts b/mods/default/schematics/papyrus_on_dirt.mts new file mode 100644 index 0000000..1333a7c Binary files /dev/null and b/mods/default/schematics/papyrus_on_dirt.mts differ diff --git a/mods/default/schematics/papyrus_on_dry_dirt.mts b/mods/default/schematics/papyrus_on_dry_dirt.mts new file mode 100644 index 0000000..3626580 Binary files /dev/null and b/mods/default/schematics/papyrus_on_dry_dirt.mts differ diff --git a/mods/default/schematics/pine_bush.mts b/mods/default/schematics/pine_bush.mts new file mode 100644 index 0000000..ca572a7 Binary files /dev/null and b/mods/default/schematics/pine_bush.mts differ diff --git a/mods/default/schematics/pine_log.mts b/mods/default/schematics/pine_log.mts new file mode 100644 index 0000000..d51a489 Binary files /dev/null and b/mods/default/schematics/pine_log.mts differ diff --git a/mods/default/schematics/pine_tree.mts b/mods/default/schematics/pine_tree.mts new file mode 100644 index 0000000..c80532a Binary files /dev/null and b/mods/default/schematics/pine_tree.mts differ diff --git a/mods/default/schematics/pine_tree_from_sapling.mts b/mods/default/schematics/pine_tree_from_sapling.mts new file mode 100644 index 0000000..0800387 Binary files /dev/null and b/mods/default/schematics/pine_tree_from_sapling.mts differ diff --git a/mods/default/schematics/small_pine_tree.mts b/mods/default/schematics/small_pine_tree.mts new file mode 100644 index 0000000..b283226 Binary files /dev/null and b/mods/default/schematics/small_pine_tree.mts differ diff --git a/mods/default/schematics/small_pine_tree_from_sapling.mts b/mods/default/schematics/small_pine_tree_from_sapling.mts new file mode 100644 index 0000000..a1b1170 Binary files /dev/null and b/mods/default/schematics/small_pine_tree_from_sapling.mts differ diff --git a/mods/default/schematics/snowy_pine_tree_from_sapling.mts b/mods/default/schematics/snowy_pine_tree_from_sapling.mts new file mode 100644 index 0000000..3d502a3 Binary files /dev/null and b/mods/default/schematics/snowy_pine_tree_from_sapling.mts differ diff --git a/mods/default/schematics/snowy_small_pine_tree_from_sapling.mts b/mods/default/schematics/snowy_small_pine_tree_from_sapling.mts new file mode 100644 index 0000000..d017c9e Binary files /dev/null and b/mods/default/schematics/snowy_small_pine_tree_from_sapling.mts differ diff --git a/mods/default/sounds/default_break_glass.1.ogg b/mods/default/sounds/default_break_glass.1.ogg new file mode 100644 index 0000000..b1ccc5f Binary files /dev/null and b/mods/default/sounds/default_break_glass.1.ogg differ diff --git a/mods/default/sounds/default_break_glass.2.ogg b/mods/default/sounds/default_break_glass.2.ogg new file mode 100644 index 0000000..b6cc9e8 Binary files /dev/null and b/mods/default/sounds/default_break_glass.2.ogg differ diff --git a/mods/default/sounds/default_break_glass.3.ogg b/mods/default/sounds/default_break_glass.3.ogg new file mode 100644 index 0000000..ae6a6bf Binary files /dev/null and b/mods/default/sounds/default_break_glass.3.ogg differ diff --git a/mods/default/sounds/default_chest_close.ogg b/mods/default/sounds/default_chest_close.ogg new file mode 100644 index 0000000..068d900 Binary files /dev/null and b/mods/default/sounds/default_chest_close.ogg differ diff --git a/mods/default/sounds/default_chest_open.ogg b/mods/default/sounds/default_chest_open.ogg new file mode 100644 index 0000000..40b0b93 Binary files /dev/null and b/mods/default/sounds/default_chest_open.ogg differ diff --git a/mods/default/sounds/default_cool_lava.1.ogg b/mods/default/sounds/default_cool_lava.1.ogg new file mode 100644 index 0000000..42506dd Binary files /dev/null and b/mods/default/sounds/default_cool_lava.1.ogg differ diff --git a/mods/default/sounds/default_cool_lava.2.ogg b/mods/default/sounds/default_cool_lava.2.ogg new file mode 100644 index 0000000..2747ab8 Binary files /dev/null and b/mods/default/sounds/default_cool_lava.2.ogg differ diff --git a/mods/default/sounds/default_cool_lava.3.ogg b/mods/default/sounds/default_cool_lava.3.ogg new file mode 100644 index 0000000..8baeac3 Binary files /dev/null and b/mods/default/sounds/default_cool_lava.3.ogg differ diff --git a/mods/default/sounds/default_dig_choppy.1.ogg b/mods/default/sounds/default_dig_choppy.1.ogg new file mode 100644 index 0000000..95fa6d4 Binary files /dev/null and b/mods/default/sounds/default_dig_choppy.1.ogg differ diff --git a/mods/default/sounds/default_dig_choppy.2.ogg b/mods/default/sounds/default_dig_choppy.2.ogg new file mode 100644 index 0000000..5d3a044 Binary files /dev/null and b/mods/default/sounds/default_dig_choppy.2.ogg differ diff --git a/mods/default/sounds/default_dig_choppy.3.ogg b/mods/default/sounds/default_dig_choppy.3.ogg new file mode 100644 index 0000000..2bb0ace Binary files /dev/null and b/mods/default/sounds/default_dig_choppy.3.ogg differ diff --git a/mods/default/sounds/default_dig_cracky.1.ogg b/mods/default/sounds/default_dig_cracky.1.ogg new file mode 100644 index 0000000..ffced27 Binary files /dev/null and b/mods/default/sounds/default_dig_cracky.1.ogg differ diff --git a/mods/default/sounds/default_dig_cracky.2.ogg b/mods/default/sounds/default_dig_cracky.2.ogg new file mode 100644 index 0000000..d9e8010 Binary files /dev/null and b/mods/default/sounds/default_dig_cracky.2.ogg differ diff --git a/mods/default/sounds/default_dig_cracky.3.ogg b/mods/default/sounds/default_dig_cracky.3.ogg new file mode 100644 index 0000000..7d19d40 Binary files /dev/null and b/mods/default/sounds/default_dig_cracky.3.ogg differ diff --git a/mods/default/sounds/default_dig_crumbly.ogg b/mods/default/sounds/default_dig_crumbly.ogg new file mode 100644 index 0000000..a0b2a1f Binary files /dev/null and b/mods/default/sounds/default_dig_crumbly.ogg differ diff --git a/mods/default/sounds/default_dig_dig_immediate.ogg b/mods/default/sounds/default_dig_dig_immediate.ogg new file mode 100644 index 0000000..e65d766 Binary files /dev/null and b/mods/default/sounds/default_dig_dig_immediate.ogg differ diff --git a/mods/default/sounds/default_dig_metal.ogg b/mods/default/sounds/default_dig_metal.ogg new file mode 100644 index 0000000..0b58509 Binary files /dev/null and b/mods/default/sounds/default_dig_metal.ogg differ diff --git a/mods/default/sounds/default_dig_oddly_breakable_by_hand.ogg b/mods/default/sounds/default_dig_oddly_breakable_by_hand.ogg new file mode 100644 index 0000000..ef4d7b1 Binary files /dev/null and b/mods/default/sounds/default_dig_oddly_breakable_by_hand.ogg differ diff --git a/mods/default/sounds/default_dig_snappy.ogg b/mods/default/sounds/default_dig_snappy.ogg new file mode 100644 index 0000000..3686fcd Binary files /dev/null and b/mods/default/sounds/default_dig_snappy.ogg differ diff --git a/mods/default/sounds/default_dirt_footstep.1.ogg b/mods/default/sounds/default_dirt_footstep.1.ogg new file mode 100644 index 0000000..201aa3b Binary files /dev/null and b/mods/default/sounds/default_dirt_footstep.1.ogg differ diff --git a/mods/default/sounds/default_dirt_footstep.2.ogg b/mods/default/sounds/default_dirt_footstep.2.ogg new file mode 100644 index 0000000..2667dbc Binary files /dev/null and b/mods/default/sounds/default_dirt_footstep.2.ogg differ diff --git a/mods/default/sounds/default_dug_metal.1.ogg b/mods/default/sounds/default_dug_metal.1.ogg new file mode 100644 index 0000000..5d6cb5b Binary files /dev/null and b/mods/default/sounds/default_dug_metal.1.ogg differ diff --git a/mods/default/sounds/default_dug_metal.2.ogg b/mods/default/sounds/default_dug_metal.2.ogg new file mode 100644 index 0000000..63567fc Binary files /dev/null and b/mods/default/sounds/default_dug_metal.2.ogg differ diff --git a/mods/default/sounds/default_dug_node.1.ogg b/mods/default/sounds/default_dug_node.1.ogg new file mode 100644 index 0000000..c04975d Binary files /dev/null and b/mods/default/sounds/default_dug_node.1.ogg differ diff --git a/mods/default/sounds/default_dug_node.2.ogg b/mods/default/sounds/default_dug_node.2.ogg new file mode 100644 index 0000000..9f20926 Binary files /dev/null and b/mods/default/sounds/default_dug_node.2.ogg differ diff --git a/mods/default/sounds/default_furnace_active.ogg b/mods/default/sounds/default_furnace_active.ogg new file mode 100644 index 0000000..536edc2 Binary files /dev/null and b/mods/default/sounds/default_furnace_active.ogg differ diff --git a/mods/default/sounds/default_glass_footstep.ogg b/mods/default/sounds/default_glass_footstep.ogg new file mode 100644 index 0000000..191287a Binary files /dev/null and b/mods/default/sounds/default_glass_footstep.ogg differ diff --git a/mods/default/sounds/default_grass_footstep.1.ogg b/mods/default/sounds/default_grass_footstep.1.ogg new file mode 100644 index 0000000..a04cdb4 Binary files /dev/null and b/mods/default/sounds/default_grass_footstep.1.ogg differ diff --git a/mods/default/sounds/default_grass_footstep.2.ogg b/mods/default/sounds/default_grass_footstep.2.ogg new file mode 100644 index 0000000..d193068 Binary files /dev/null and b/mods/default/sounds/default_grass_footstep.2.ogg differ diff --git a/mods/default/sounds/default_grass_footstep.3.ogg b/mods/default/sounds/default_grass_footstep.3.ogg new file mode 100644 index 0000000..e1897ea Binary files /dev/null and b/mods/default/sounds/default_grass_footstep.3.ogg differ diff --git a/mods/default/sounds/default_gravel_dig.1.ogg b/mods/default/sounds/default_gravel_dig.1.ogg new file mode 100644 index 0000000..baf8fca Binary files /dev/null and b/mods/default/sounds/default_gravel_dig.1.ogg differ diff --git a/mods/default/sounds/default_gravel_dig.2.ogg b/mods/default/sounds/default_gravel_dig.2.ogg new file mode 100644 index 0000000..e0c0c50 Binary files /dev/null and b/mods/default/sounds/default_gravel_dig.2.ogg differ diff --git a/mods/default/sounds/default_gravel_dug.1.ogg b/mods/default/sounds/default_gravel_dug.1.ogg new file mode 100644 index 0000000..1303433 Binary files /dev/null and b/mods/default/sounds/default_gravel_dug.1.ogg differ diff --git a/mods/default/sounds/default_gravel_dug.2.ogg b/mods/default/sounds/default_gravel_dug.2.ogg new file mode 100644 index 0000000..ee5ed33 Binary files /dev/null and b/mods/default/sounds/default_gravel_dug.2.ogg differ diff --git a/mods/default/sounds/default_gravel_dug.3.ogg b/mods/default/sounds/default_gravel_dug.3.ogg new file mode 100644 index 0000000..add4c54 Binary files /dev/null and b/mods/default/sounds/default_gravel_dug.3.ogg differ diff --git a/mods/default/sounds/default_gravel_footstep.1.ogg b/mods/default/sounds/default_gravel_footstep.1.ogg new file mode 100644 index 0000000..8d260ce Binary files /dev/null and b/mods/default/sounds/default_gravel_footstep.1.ogg differ diff --git a/mods/default/sounds/default_gravel_footstep.2.ogg b/mods/default/sounds/default_gravel_footstep.2.ogg new file mode 100644 index 0000000..2aba2c6 Binary files /dev/null and b/mods/default/sounds/default_gravel_footstep.2.ogg differ diff --git a/mods/default/sounds/default_gravel_footstep.3.ogg b/mods/default/sounds/default_gravel_footstep.3.ogg new file mode 100644 index 0000000..1bcd8a1 Binary files /dev/null and b/mods/default/sounds/default_gravel_footstep.3.ogg differ diff --git a/mods/default/sounds/default_gravel_footstep.4.ogg b/mods/default/sounds/default_gravel_footstep.4.ogg new file mode 100644 index 0000000..696c9ff Binary files /dev/null and b/mods/default/sounds/default_gravel_footstep.4.ogg differ diff --git a/mods/default/sounds/default_hard_footstep.1.ogg b/mods/default/sounds/default_hard_footstep.1.ogg new file mode 100644 index 0000000..0a08efa Binary files /dev/null and b/mods/default/sounds/default_hard_footstep.1.ogg differ diff --git a/mods/default/sounds/default_hard_footstep.2.ogg b/mods/default/sounds/default_hard_footstep.2.ogg new file mode 100644 index 0000000..be52a87 Binary files /dev/null and b/mods/default/sounds/default_hard_footstep.2.ogg differ diff --git a/mods/default/sounds/default_hard_footstep.3.ogg b/mods/default/sounds/default_hard_footstep.3.ogg new file mode 100644 index 0000000..a342787 Binary files /dev/null and b/mods/default/sounds/default_hard_footstep.3.ogg differ diff --git a/mods/default/sounds/default_ice_dig.1.ogg b/mods/default/sounds/default_ice_dig.1.ogg new file mode 100644 index 0000000..97399c8 Binary files /dev/null and b/mods/default/sounds/default_ice_dig.1.ogg differ diff --git a/mods/default/sounds/default_ice_dig.2.ogg b/mods/default/sounds/default_ice_dig.2.ogg new file mode 100644 index 0000000..8a5da11 Binary files /dev/null and b/mods/default/sounds/default_ice_dig.2.ogg differ diff --git a/mods/default/sounds/default_ice_dig.3.ogg b/mods/default/sounds/default_ice_dig.3.ogg new file mode 100644 index 0000000..765fb9b Binary files /dev/null and b/mods/default/sounds/default_ice_dig.3.ogg differ diff --git a/mods/default/sounds/default_ice_dug.ogg b/mods/default/sounds/default_ice_dug.ogg new file mode 100644 index 0000000..ae37673 Binary files /dev/null and b/mods/default/sounds/default_ice_dug.ogg differ diff --git a/mods/default/sounds/default_ice_footstep.1.ogg b/mods/default/sounds/default_ice_footstep.1.ogg new file mode 100644 index 0000000..c235f1e Binary files /dev/null and b/mods/default/sounds/default_ice_footstep.1.ogg differ diff --git a/mods/default/sounds/default_ice_footstep.2.ogg b/mods/default/sounds/default_ice_footstep.2.ogg new file mode 100644 index 0000000..61d2c99 Binary files /dev/null and b/mods/default/sounds/default_ice_footstep.2.ogg differ diff --git a/mods/default/sounds/default_ice_footstep.3.ogg b/mods/default/sounds/default_ice_footstep.3.ogg new file mode 100644 index 0000000..2ecbb43 Binary files /dev/null and b/mods/default/sounds/default_ice_footstep.3.ogg differ diff --git a/mods/default/sounds/default_item_smoke.ogg b/mods/default/sounds/default_item_smoke.ogg new file mode 100644 index 0000000..038a46e Binary files /dev/null and b/mods/default/sounds/default_item_smoke.ogg differ diff --git a/mods/default/sounds/default_metal_footstep.1.ogg b/mods/default/sounds/default_metal_footstep.1.ogg new file mode 100644 index 0000000..49fe89b Binary files /dev/null and b/mods/default/sounds/default_metal_footstep.1.ogg differ diff --git a/mods/default/sounds/default_metal_footstep.2.ogg b/mods/default/sounds/default_metal_footstep.2.ogg new file mode 100644 index 0000000..878711d Binary files /dev/null and b/mods/default/sounds/default_metal_footstep.2.ogg differ diff --git a/mods/default/sounds/default_metal_footstep.3.ogg b/mods/default/sounds/default_metal_footstep.3.ogg new file mode 100644 index 0000000..2a566a8 Binary files /dev/null and b/mods/default/sounds/default_metal_footstep.3.ogg differ diff --git a/mods/default/sounds/default_place_node.1.ogg b/mods/default/sounds/default_place_node.1.ogg new file mode 100644 index 0000000..46b9756 Binary files /dev/null and b/mods/default/sounds/default_place_node.1.ogg differ diff --git a/mods/default/sounds/default_place_node.2.ogg b/mods/default/sounds/default_place_node.2.ogg new file mode 100644 index 0000000..d34c01a Binary files /dev/null and b/mods/default/sounds/default_place_node.2.ogg differ diff --git a/mods/default/sounds/default_place_node.3.ogg b/mods/default/sounds/default_place_node.3.ogg new file mode 100644 index 0000000..fc29365 Binary files /dev/null and b/mods/default/sounds/default_place_node.3.ogg differ diff --git a/mods/default/sounds/default_place_node_hard.1.ogg b/mods/default/sounds/default_place_node_hard.1.ogg new file mode 100644 index 0000000..9f97fac Binary files /dev/null and b/mods/default/sounds/default_place_node_hard.1.ogg differ diff --git a/mods/default/sounds/default_place_node_hard.2.ogg b/mods/default/sounds/default_place_node_hard.2.ogg new file mode 100644 index 0000000..1d3b3de Binary files /dev/null and b/mods/default/sounds/default_place_node_hard.2.ogg differ diff --git a/mods/default/sounds/default_place_node_metal.1.ogg b/mods/default/sounds/default_place_node_metal.1.ogg new file mode 100644 index 0000000..5da085e Binary files /dev/null and b/mods/default/sounds/default_place_node_metal.1.ogg differ diff --git a/mods/default/sounds/default_place_node_metal.2.ogg b/mods/default/sounds/default_place_node_metal.2.ogg new file mode 100644 index 0000000..5ee67fc Binary files /dev/null and b/mods/default/sounds/default_place_node_metal.2.ogg differ diff --git a/mods/default/sounds/default_sand_footstep.1.ogg b/mods/default/sounds/default_sand_footstep.1.ogg new file mode 100644 index 0000000..b92feab Binary files /dev/null and b/mods/default/sounds/default_sand_footstep.1.ogg differ diff --git a/mods/default/sounds/default_sand_footstep.2.ogg b/mods/default/sounds/default_sand_footstep.2.ogg new file mode 100644 index 0000000..6bc5da3 Binary files /dev/null and b/mods/default/sounds/default_sand_footstep.2.ogg differ diff --git a/mods/default/sounds/default_sand_footstep.3.ogg b/mods/default/sounds/default_sand_footstep.3.ogg new file mode 100644 index 0000000..880306f Binary files /dev/null and b/mods/default/sounds/default_sand_footstep.3.ogg differ diff --git a/mods/default/sounds/default_snow_footstep.1.ogg b/mods/default/sounds/default_snow_footstep.1.ogg new file mode 100644 index 0000000..97cc825 Binary files /dev/null and b/mods/default/sounds/default_snow_footstep.1.ogg differ diff --git a/mods/default/sounds/default_snow_footstep.2.ogg b/mods/default/sounds/default_snow_footstep.2.ogg new file mode 100644 index 0000000..97a6baa Binary files /dev/null and b/mods/default/sounds/default_snow_footstep.2.ogg differ diff --git a/mods/default/sounds/default_snow_footstep.3.ogg b/mods/default/sounds/default_snow_footstep.3.ogg new file mode 100644 index 0000000..bde1f21 Binary files /dev/null and b/mods/default/sounds/default_snow_footstep.3.ogg differ diff --git a/mods/default/sounds/default_snow_footstep.4.ogg b/mods/default/sounds/default_snow_footstep.4.ogg new file mode 100644 index 0000000..8ca6a59 Binary files /dev/null and b/mods/default/sounds/default_snow_footstep.4.ogg differ diff --git a/mods/default/sounds/default_snow_footstep.5.ogg b/mods/default/sounds/default_snow_footstep.5.ogg new file mode 100644 index 0000000..220d60c Binary files /dev/null and b/mods/default/sounds/default_snow_footstep.5.ogg differ diff --git a/mods/default/sounds/default_tool_breaks.1.ogg b/mods/default/sounds/default_tool_breaks.1.ogg new file mode 100644 index 0000000..2a571ae Binary files /dev/null and b/mods/default/sounds/default_tool_breaks.1.ogg differ diff --git a/mods/default/sounds/default_tool_breaks.2.ogg b/mods/default/sounds/default_tool_breaks.2.ogg new file mode 100644 index 0000000..1789352 Binary files /dev/null and b/mods/default/sounds/default_tool_breaks.2.ogg differ diff --git a/mods/default/sounds/default_tool_breaks.3.ogg b/mods/default/sounds/default_tool_breaks.3.ogg new file mode 100644 index 0000000..a99c4b7 Binary files /dev/null and b/mods/default/sounds/default_tool_breaks.3.ogg differ diff --git a/mods/default/sounds/default_water_footstep.1.ogg b/mods/default/sounds/default_water_footstep.1.ogg new file mode 100644 index 0000000..63b9744 Binary files /dev/null and b/mods/default/sounds/default_water_footstep.1.ogg differ diff --git a/mods/default/sounds/default_water_footstep.2.ogg b/mods/default/sounds/default_water_footstep.2.ogg new file mode 100644 index 0000000..8d79c1f Binary files /dev/null and b/mods/default/sounds/default_water_footstep.2.ogg differ diff --git a/mods/default/sounds/default_water_footstep.3.ogg b/mods/default/sounds/default_water_footstep.3.ogg new file mode 100644 index 0000000..f889150 Binary files /dev/null and b/mods/default/sounds/default_water_footstep.3.ogg differ diff --git a/mods/default/sounds/default_water_footstep.4.ogg b/mods/default/sounds/default_water_footstep.4.ogg new file mode 100644 index 0000000..6f1eab8 Binary files /dev/null and b/mods/default/sounds/default_water_footstep.4.ogg differ diff --git a/mods/default/sounds/default_wood_footstep.1.ogg b/mods/default/sounds/default_wood_footstep.1.ogg new file mode 100644 index 0000000..34f63a1 Binary files /dev/null and b/mods/default/sounds/default_wood_footstep.1.ogg differ diff --git a/mods/default/sounds/default_wood_footstep.2.ogg b/mods/default/sounds/default_wood_footstep.2.ogg new file mode 100644 index 0000000..124fc29 Binary files /dev/null and b/mods/default/sounds/default_wood_footstep.2.ogg differ diff --git a/mods/default/sounds/player_damage.ogg b/mods/default/sounds/player_damage.ogg new file mode 100644 index 0000000..7888087 Binary files /dev/null and b/mods/default/sounds/player_damage.ogg differ diff --git a/mods/default/textures/bubble.png b/mods/default/textures/bubble.png new file mode 100644 index 0000000..30170d2 Binary files /dev/null and b/mods/default/textures/bubble.png differ diff --git a/mods/default/textures/crack_anylength.png b/mods/default/textures/crack_anylength.png new file mode 100644 index 0000000..297eced Binary files /dev/null and b/mods/default/textures/crack_anylength.png differ diff --git a/mods/default/textures/default_acacia_bush_sapling.png b/mods/default/textures/default_acacia_bush_sapling.png new file mode 100644 index 0000000..940b3aa Binary files /dev/null and b/mods/default/textures/default_acacia_bush_sapling.png differ diff --git a/mods/default/textures/default_acacia_bush_stem.png b/mods/default/textures/default_acacia_bush_stem.png new file mode 100644 index 0000000..2903915 Binary files /dev/null and b/mods/default/textures/default_acacia_bush_stem.png differ diff --git a/mods/default/textures/default_acacia_leaves.png b/mods/default/textures/default_acacia_leaves.png new file mode 100644 index 0000000..626e1b3 Binary files /dev/null and b/mods/default/textures/default_acacia_leaves.png differ diff --git a/mods/default/textures/default_acacia_leaves_simple.png b/mods/default/textures/default_acacia_leaves_simple.png new file mode 100644 index 0000000..3c7015b Binary files /dev/null and b/mods/default/textures/default_acacia_leaves_simple.png differ diff --git a/mods/default/textures/default_acacia_sapling.png b/mods/default/textures/default_acacia_sapling.png new file mode 100644 index 0000000..07170a0 Binary files /dev/null and b/mods/default/textures/default_acacia_sapling.png differ diff --git a/mods/default/textures/default_acacia_tree.png b/mods/default/textures/default_acacia_tree.png new file mode 100644 index 0000000..58bb3c4 Binary files /dev/null and b/mods/default/textures/default_acacia_tree.png differ diff --git a/mods/default/textures/default_acacia_tree_top.png b/mods/default/textures/default_acacia_tree_top.png new file mode 100644 index 0000000..a8a0ce0 Binary files /dev/null and b/mods/default/textures/default_acacia_tree_top.png differ diff --git a/mods/default/textures/default_acacia_wood.png b/mods/default/textures/default_acacia_wood.png new file mode 100644 index 0000000..b5abf1e Binary files /dev/null and b/mods/default/textures/default_acacia_wood.png differ diff --git a/mods/default/textures/default_apple.png b/mods/default/textures/default_apple.png new file mode 100644 index 0000000..7549bfd Binary files /dev/null and b/mods/default/textures/default_apple.png differ diff --git a/mods/default/textures/default_aspen_leaves.png b/mods/default/textures/default_aspen_leaves.png new file mode 100644 index 0000000..7306423 Binary files /dev/null and b/mods/default/textures/default_aspen_leaves.png differ diff --git a/mods/default/textures/default_aspen_sapling.png b/mods/default/textures/default_aspen_sapling.png new file mode 100644 index 0000000..f8d9136 Binary files /dev/null and b/mods/default/textures/default_aspen_sapling.png differ diff --git a/mods/default/textures/default_aspen_tree.png b/mods/default/textures/default_aspen_tree.png new file mode 100644 index 0000000..cfb05fc Binary files /dev/null and b/mods/default/textures/default_aspen_tree.png differ diff --git a/mods/default/textures/default_aspen_tree_top.png b/mods/default/textures/default_aspen_tree_top.png new file mode 100644 index 0000000..fcca038 Binary files /dev/null and b/mods/default/textures/default_aspen_tree_top.png differ diff --git a/mods/default/textures/default_aspen_wood.png b/mods/default/textures/default_aspen_wood.png new file mode 100644 index 0000000..2b584b3 Binary files /dev/null and b/mods/default/textures/default_aspen_wood.png differ diff --git a/mods/default/textures/default_blueberries.png b/mods/default/textures/default_blueberries.png new file mode 100644 index 0000000..1dbb0d6 Binary files /dev/null and b/mods/default/textures/default_blueberries.png differ diff --git a/mods/default/textures/default_blueberry_bush_leaves.png b/mods/default/textures/default_blueberry_bush_leaves.png new file mode 100644 index 0000000..2cd112c Binary files /dev/null and b/mods/default/textures/default_blueberry_bush_leaves.png differ diff --git a/mods/default/textures/default_blueberry_bush_sapling.png b/mods/default/textures/default_blueberry_bush_sapling.png new file mode 100644 index 0000000..5d7393f Binary files /dev/null and b/mods/default/textures/default_blueberry_bush_sapling.png differ diff --git a/mods/default/textures/default_blueberry_overlay.png b/mods/default/textures/default_blueberry_overlay.png new file mode 100644 index 0000000..de9de62 Binary files /dev/null and b/mods/default/textures/default_blueberry_overlay.png differ diff --git a/mods/default/textures/default_book.png b/mods/default/textures/default_book.png new file mode 100644 index 0000000..bcf1e6a Binary files /dev/null and b/mods/default/textures/default_book.png differ diff --git a/mods/default/textures/default_book_written.png b/mods/default/textures/default_book_written.png new file mode 100644 index 0000000..f23d122 Binary files /dev/null and b/mods/default/textures/default_book_written.png differ diff --git a/mods/default/textures/default_bookshelf.png b/mods/default/textures/default_bookshelf.png new file mode 100644 index 0000000..10d6483 Binary files /dev/null and b/mods/default/textures/default_bookshelf.png differ diff --git a/mods/default/textures/default_bookshelf_slot.png b/mods/default/textures/default_bookshelf_slot.png new file mode 100644 index 0000000..cd2c8bc Binary files /dev/null and b/mods/default/textures/default_bookshelf_slot.png differ diff --git a/mods/default/textures/default_brick.png b/mods/default/textures/default_brick.png new file mode 100644 index 0000000..ab19121 Binary files /dev/null and b/mods/default/textures/default_brick.png differ diff --git a/mods/default/textures/default_bronze_block.png b/mods/default/textures/default_bronze_block.png new file mode 100644 index 0000000..1d0c9d5 Binary files /dev/null and b/mods/default/textures/default_bronze_block.png differ diff --git a/mods/default/textures/default_bronze_ingot.png b/mods/default/textures/default_bronze_ingot.png new file mode 100644 index 0000000..6cccdf6 Binary files /dev/null and b/mods/default/textures/default_bronze_ingot.png differ diff --git a/mods/default/textures/default_bush_sapling.png b/mods/default/textures/default_bush_sapling.png new file mode 100644 index 0000000..905ba4b Binary files /dev/null and b/mods/default/textures/default_bush_sapling.png differ diff --git a/mods/default/textures/default_bush_stem.png b/mods/default/textures/default_bush_stem.png new file mode 100644 index 0000000..18b615f Binary files /dev/null and b/mods/default/textures/default_bush_stem.png differ diff --git a/mods/default/textures/default_cactus_side.png b/mods/default/textures/default_cactus_side.png new file mode 100644 index 0000000..8d6c40c Binary files /dev/null and b/mods/default/textures/default_cactus_side.png differ diff --git a/mods/default/textures/default_cactus_top.png b/mods/default/textures/default_cactus_top.png new file mode 100644 index 0000000..cf46aa2 Binary files /dev/null and b/mods/default/textures/default_cactus_top.png differ diff --git a/mods/default/textures/default_chest_front.png b/mods/default/textures/default_chest_front.png new file mode 100644 index 0000000..85227d8 Binary files /dev/null and b/mods/default/textures/default_chest_front.png differ diff --git a/mods/default/textures/default_chest_inside.png b/mods/default/textures/default_chest_inside.png new file mode 100644 index 0000000..5f7b6b1 Binary files /dev/null and b/mods/default/textures/default_chest_inside.png differ diff --git a/mods/default/textures/default_chest_lock.png b/mods/default/textures/default_chest_lock.png new file mode 100644 index 0000000..73f46c7 Binary files /dev/null and b/mods/default/textures/default_chest_lock.png differ diff --git a/mods/default/textures/default_chest_side.png b/mods/default/textures/default_chest_side.png new file mode 100644 index 0000000..44a65a4 Binary files /dev/null and b/mods/default/textures/default_chest_side.png differ diff --git a/mods/default/textures/default_chest_top.png b/mods/default/textures/default_chest_top.png new file mode 100644 index 0000000..f4a92ee Binary files /dev/null and b/mods/default/textures/default_chest_top.png differ diff --git a/mods/default/textures/default_clay.png b/mods/default/textures/default_clay.png new file mode 100644 index 0000000..76e5a40 Binary files /dev/null and b/mods/default/textures/default_clay.png differ diff --git a/mods/default/textures/default_clay_brick.png b/mods/default/textures/default_clay_brick.png new file mode 100644 index 0000000..b288ef0 Binary files /dev/null and b/mods/default/textures/default_clay_brick.png differ diff --git a/mods/default/textures/default_clay_lump.png b/mods/default/textures/default_clay_lump.png new file mode 100644 index 0000000..c1d0220 Binary files /dev/null and b/mods/default/textures/default_clay_lump.png differ diff --git a/mods/default/textures/default_cloud.png b/mods/default/textures/default_cloud.png new file mode 100644 index 0000000..faf0ec1 Binary files /dev/null and b/mods/default/textures/default_cloud.png differ diff --git a/mods/default/textures/default_coal_block.png b/mods/default/textures/default_coal_block.png new file mode 100644 index 0000000..6fe9ed9 Binary files /dev/null and b/mods/default/textures/default_coal_block.png differ diff --git a/mods/default/textures/default_coal_lump.png b/mods/default/textures/default_coal_lump.png new file mode 100644 index 0000000..792961d Binary files /dev/null and b/mods/default/textures/default_coal_lump.png differ diff --git a/mods/default/textures/default_cobble.png b/mods/default/textures/default_cobble.png new file mode 100644 index 0000000..d379840 Binary files /dev/null and b/mods/default/textures/default_cobble.png differ diff --git a/mods/default/textures/default_coniferous_litter.png b/mods/default/textures/default_coniferous_litter.png new file mode 100644 index 0000000..da340e0 Binary files /dev/null and b/mods/default/textures/default_coniferous_litter.png differ diff --git a/mods/default/textures/default_coniferous_litter_side.png b/mods/default/textures/default_coniferous_litter_side.png new file mode 100644 index 0000000..0701461 Binary files /dev/null and b/mods/default/textures/default_coniferous_litter_side.png differ diff --git a/mods/default/textures/default_copper_block.png b/mods/default/textures/default_copper_block.png new file mode 100644 index 0000000..8533754 Binary files /dev/null and b/mods/default/textures/default_copper_block.png differ diff --git a/mods/default/textures/default_copper_ingot.png b/mods/default/textures/default_copper_ingot.png new file mode 100644 index 0000000..bcad9c0 Binary files /dev/null and b/mods/default/textures/default_copper_ingot.png differ diff --git a/mods/default/textures/default_copper_lump.png b/mods/default/textures/default_copper_lump.png new file mode 100644 index 0000000..998c592 Binary files /dev/null and b/mods/default/textures/default_copper_lump.png differ diff --git a/mods/default/textures/default_coral_brown.png b/mods/default/textures/default_coral_brown.png new file mode 100644 index 0000000..8a775fe Binary files /dev/null and b/mods/default/textures/default_coral_brown.png differ diff --git a/mods/default/textures/default_coral_cyan.png b/mods/default/textures/default_coral_cyan.png new file mode 100644 index 0000000..11cc7bf Binary files /dev/null and b/mods/default/textures/default_coral_cyan.png differ diff --git a/mods/default/textures/default_coral_green.png b/mods/default/textures/default_coral_green.png new file mode 100644 index 0000000..847c572 Binary files /dev/null and b/mods/default/textures/default_coral_green.png differ diff --git a/mods/default/textures/default_coral_orange.png b/mods/default/textures/default_coral_orange.png new file mode 100644 index 0000000..cefac62 Binary files /dev/null and b/mods/default/textures/default_coral_orange.png differ diff --git a/mods/default/textures/default_coral_pink.png b/mods/default/textures/default_coral_pink.png new file mode 100644 index 0000000..62d70c6 Binary files /dev/null and b/mods/default/textures/default_coral_pink.png differ diff --git a/mods/default/textures/default_coral_skeleton.png b/mods/default/textures/default_coral_skeleton.png new file mode 100644 index 0000000..fa48f15 Binary files /dev/null and b/mods/default/textures/default_coral_skeleton.png differ diff --git a/mods/default/textures/default_desert_cobble.png b/mods/default/textures/default_desert_cobble.png new file mode 100644 index 0000000..fa1af5d Binary files /dev/null and b/mods/default/textures/default_desert_cobble.png differ diff --git a/mods/default/textures/default_desert_sand.png b/mods/default/textures/default_desert_sand.png new file mode 100644 index 0000000..371b8c7 Binary files /dev/null and b/mods/default/textures/default_desert_sand.png differ diff --git a/mods/default/textures/default_desert_sandstone.png b/mods/default/textures/default_desert_sandstone.png new file mode 100644 index 0000000..52e445f Binary files /dev/null and b/mods/default/textures/default_desert_sandstone.png differ diff --git a/mods/default/textures/default_desert_sandstone_block.png b/mods/default/textures/default_desert_sandstone_block.png new file mode 100644 index 0000000..8fc54e7 Binary files /dev/null and b/mods/default/textures/default_desert_sandstone_block.png differ diff --git a/mods/default/textures/default_desert_sandstone_brick.png b/mods/default/textures/default_desert_sandstone_brick.png new file mode 100644 index 0000000..ab58db5 Binary files /dev/null and b/mods/default/textures/default_desert_sandstone_brick.png differ diff --git a/mods/default/textures/default_desert_stone.png b/mods/default/textures/default_desert_stone.png new file mode 100644 index 0000000..5d3aded Binary files /dev/null and b/mods/default/textures/default_desert_stone.png differ diff --git a/mods/default/textures/default_desert_stone_block.png b/mods/default/textures/default_desert_stone_block.png new file mode 100644 index 0000000..9eb8e92 Binary files /dev/null and b/mods/default/textures/default_desert_stone_block.png differ diff --git a/mods/default/textures/default_desert_stone_brick.png b/mods/default/textures/default_desert_stone_brick.png new file mode 100644 index 0000000..a603d18 Binary files /dev/null and b/mods/default/textures/default_desert_stone_brick.png differ diff --git a/mods/default/textures/default_diamond.png b/mods/default/textures/default_diamond.png new file mode 100644 index 0000000..a8dac74 Binary files /dev/null and b/mods/default/textures/default_diamond.png differ diff --git a/mods/default/textures/default_diamond_block.png b/mods/default/textures/default_diamond_block.png new file mode 100644 index 0000000..20c33ed Binary files /dev/null and b/mods/default/textures/default_diamond_block.png differ diff --git a/mods/default/textures/default_dirt.png b/mods/default/textures/default_dirt.png new file mode 100644 index 0000000..afe4a2e Binary files /dev/null and b/mods/default/textures/default_dirt.png differ diff --git a/mods/default/textures/default_dry_dirt.png b/mods/default/textures/default_dry_dirt.png new file mode 100644 index 0000000..8ee5398 Binary files /dev/null and b/mods/default/textures/default_dry_dirt.png differ diff --git a/mods/default/textures/default_dry_grass.png b/mods/default/textures/default_dry_grass.png new file mode 100644 index 0000000..03455c3 Binary files /dev/null and b/mods/default/textures/default_dry_grass.png differ diff --git a/mods/default/textures/default_dry_grass_1.png b/mods/default/textures/default_dry_grass_1.png new file mode 100644 index 0000000..5cf68a3 Binary files /dev/null and b/mods/default/textures/default_dry_grass_1.png differ diff --git a/mods/default/textures/default_dry_grass_2.png b/mods/default/textures/default_dry_grass_2.png new file mode 100644 index 0000000..c925ace Binary files /dev/null and b/mods/default/textures/default_dry_grass_2.png differ diff --git a/mods/default/textures/default_dry_grass_3.png b/mods/default/textures/default_dry_grass_3.png new file mode 100644 index 0000000..4e4d84e Binary files /dev/null and b/mods/default/textures/default_dry_grass_3.png differ diff --git a/mods/default/textures/default_dry_grass_4.png b/mods/default/textures/default_dry_grass_4.png new file mode 100644 index 0000000..d315849 Binary files /dev/null and b/mods/default/textures/default_dry_grass_4.png differ diff --git a/mods/default/textures/default_dry_grass_5.png b/mods/default/textures/default_dry_grass_5.png new file mode 100644 index 0000000..871d04c Binary files /dev/null and b/mods/default/textures/default_dry_grass_5.png differ diff --git a/mods/default/textures/default_dry_grass_side.png b/mods/default/textures/default_dry_grass_side.png new file mode 100644 index 0000000..ef375b7 Binary files /dev/null and b/mods/default/textures/default_dry_grass_side.png differ diff --git a/mods/default/textures/default_dry_shrub.png b/mods/default/textures/default_dry_shrub.png new file mode 100644 index 0000000..82c9cc5 Binary files /dev/null and b/mods/default/textures/default_dry_shrub.png differ diff --git a/mods/default/textures/default_emergent_jungle_sapling.png b/mods/default/textures/default_emergent_jungle_sapling.png new file mode 100644 index 0000000..b363b3c Binary files /dev/null and b/mods/default/textures/default_emergent_jungle_sapling.png differ diff --git a/mods/default/textures/default_fence_acacia_wood.png b/mods/default/textures/default_fence_acacia_wood.png new file mode 100644 index 0000000..3b973f3 Binary files /dev/null and b/mods/default/textures/default_fence_acacia_wood.png differ diff --git a/mods/default/textures/default_fence_aspen_wood.png b/mods/default/textures/default_fence_aspen_wood.png new file mode 100644 index 0000000..0a6558e Binary files /dev/null and b/mods/default/textures/default_fence_aspen_wood.png differ diff --git a/mods/default/textures/default_fence_junglewood.png b/mods/default/textures/default_fence_junglewood.png new file mode 100644 index 0000000..c390941 Binary files /dev/null and b/mods/default/textures/default_fence_junglewood.png differ diff --git a/mods/default/textures/default_fence_overlay.png b/mods/default/textures/default_fence_overlay.png new file mode 100644 index 0000000..718184c Binary files /dev/null and b/mods/default/textures/default_fence_overlay.png differ diff --git a/mods/default/textures/default_fence_pine_wood.png b/mods/default/textures/default_fence_pine_wood.png new file mode 100644 index 0000000..74609d9 Binary files /dev/null and b/mods/default/textures/default_fence_pine_wood.png differ diff --git a/mods/default/textures/default_fence_rail_acacia_wood.png b/mods/default/textures/default_fence_rail_acacia_wood.png new file mode 100644 index 0000000..64dc90f Binary files /dev/null and b/mods/default/textures/default_fence_rail_acacia_wood.png differ diff --git a/mods/default/textures/default_fence_rail_aspen_wood.png b/mods/default/textures/default_fence_rail_aspen_wood.png new file mode 100644 index 0000000..ab16a60 Binary files /dev/null and b/mods/default/textures/default_fence_rail_aspen_wood.png differ diff --git a/mods/default/textures/default_fence_rail_junglewood.png b/mods/default/textures/default_fence_rail_junglewood.png new file mode 100644 index 0000000..ebc1ef0 Binary files /dev/null and b/mods/default/textures/default_fence_rail_junglewood.png differ diff --git a/mods/default/textures/default_fence_rail_overlay.png b/mods/default/textures/default_fence_rail_overlay.png new file mode 100644 index 0000000..4da47ae Binary files /dev/null and b/mods/default/textures/default_fence_rail_overlay.png differ diff --git a/mods/default/textures/default_fence_rail_pine_wood.png b/mods/default/textures/default_fence_rail_pine_wood.png new file mode 100644 index 0000000..fd8d99d Binary files /dev/null and b/mods/default/textures/default_fence_rail_pine_wood.png differ diff --git a/mods/default/textures/default_fence_rail_wood.png b/mods/default/textures/default_fence_rail_wood.png new file mode 100644 index 0000000..f84b755 Binary files /dev/null and b/mods/default/textures/default_fence_rail_wood.png differ diff --git a/mods/default/textures/default_fence_wood.png b/mods/default/textures/default_fence_wood.png new file mode 100644 index 0000000..1e76430 Binary files /dev/null and b/mods/default/textures/default_fence_wood.png differ diff --git a/mods/default/textures/default_fern_1.png b/mods/default/textures/default_fern_1.png new file mode 100644 index 0000000..b307986 Binary files /dev/null and b/mods/default/textures/default_fern_1.png differ diff --git a/mods/default/textures/default_fern_2.png b/mods/default/textures/default_fern_2.png new file mode 100644 index 0000000..6c5f7d5 Binary files /dev/null and b/mods/default/textures/default_fern_2.png differ diff --git a/mods/default/textures/default_fern_3.png b/mods/default/textures/default_fern_3.png new file mode 100644 index 0000000..2c1f605 Binary files /dev/null and b/mods/default/textures/default_fern_3.png differ diff --git a/mods/default/textures/default_flint.png b/mods/default/textures/default_flint.png new file mode 100644 index 0000000..226c740 Binary files /dev/null and b/mods/default/textures/default_flint.png differ diff --git a/mods/default/textures/default_footprint.png b/mods/default/textures/default_footprint.png new file mode 100644 index 0000000..41d9546 Binary files /dev/null and b/mods/default/textures/default_footprint.png differ diff --git a/mods/default/textures/default_furnace_bottom.png b/mods/default/textures/default_furnace_bottom.png new file mode 100644 index 0000000..b79ed06 Binary files /dev/null and b/mods/default/textures/default_furnace_bottom.png differ diff --git a/mods/default/textures/default_furnace_fire_bg.png b/mods/default/textures/default_furnace_fire_bg.png new file mode 100644 index 0000000..126204a Binary files /dev/null and b/mods/default/textures/default_furnace_fire_bg.png differ diff --git a/mods/default/textures/default_furnace_fire_fg.png b/mods/default/textures/default_furnace_fire_fg.png new file mode 100644 index 0000000..63888f3 Binary files /dev/null and b/mods/default/textures/default_furnace_fire_fg.png differ diff --git a/mods/default/textures/default_furnace_front.png b/mods/default/textures/default_furnace_front.png new file mode 100644 index 0000000..8c1798e Binary files /dev/null and b/mods/default/textures/default_furnace_front.png differ diff --git a/mods/default/textures/default_furnace_front_active.png b/mods/default/textures/default_furnace_front_active.png new file mode 100644 index 0000000..ea43ed9 Binary files /dev/null and b/mods/default/textures/default_furnace_front_active.png differ diff --git a/mods/default/textures/default_furnace_side.png b/mods/default/textures/default_furnace_side.png new file mode 100644 index 0000000..33408cf Binary files /dev/null and b/mods/default/textures/default_furnace_side.png differ diff --git a/mods/default/textures/default_furnace_top.png b/mods/default/textures/default_furnace_top.png new file mode 100644 index 0000000..b79ed06 Binary files /dev/null and b/mods/default/textures/default_furnace_top.png differ diff --git a/mods/default/textures/default_glass.png b/mods/default/textures/default_glass.png new file mode 100644 index 0000000..74d6a02 Binary files /dev/null and b/mods/default/textures/default_glass.png differ diff --git a/mods/default/textures/default_glass_detail.png b/mods/default/textures/default_glass_detail.png new file mode 100644 index 0000000..811a4db Binary files /dev/null and b/mods/default/textures/default_glass_detail.png differ diff --git a/mods/default/textures/default_gold_block.png b/mods/default/textures/default_gold_block.png new file mode 100644 index 0000000..170d50b Binary files /dev/null and b/mods/default/textures/default_gold_block.png differ diff --git a/mods/default/textures/default_gold_ingot.png b/mods/default/textures/default_gold_ingot.png new file mode 100644 index 0000000..ba66471 Binary files /dev/null and b/mods/default/textures/default_gold_ingot.png differ diff --git a/mods/default/textures/default_gold_lump.png b/mods/default/textures/default_gold_lump.png new file mode 100644 index 0000000..d5a1be7 Binary files /dev/null and b/mods/default/textures/default_gold_lump.png differ diff --git a/mods/default/textures/default_grass.png b/mods/default/textures/default_grass.png new file mode 100644 index 0000000..5778caa Binary files /dev/null and b/mods/default/textures/default_grass.png differ diff --git a/mods/default/textures/default_grass_1.png b/mods/default/textures/default_grass_1.png new file mode 100644 index 0000000..e9faa2c Binary files /dev/null and b/mods/default/textures/default_grass_1.png differ diff --git a/mods/default/textures/default_grass_2.png b/mods/default/textures/default_grass_2.png new file mode 100644 index 0000000..03729a0 Binary files /dev/null and b/mods/default/textures/default_grass_2.png differ diff --git a/mods/default/textures/default_grass_3.png b/mods/default/textures/default_grass_3.png new file mode 100644 index 0000000..92ca1b5 Binary files /dev/null and b/mods/default/textures/default_grass_3.png differ diff --git a/mods/default/textures/default_grass_4.png b/mods/default/textures/default_grass_4.png new file mode 100644 index 0000000..c782a33 Binary files /dev/null and b/mods/default/textures/default_grass_4.png differ diff --git a/mods/default/textures/default_grass_5.png b/mods/default/textures/default_grass_5.png new file mode 100644 index 0000000..b727e9c Binary files /dev/null and b/mods/default/textures/default_grass_5.png differ diff --git a/mods/default/textures/default_grass_side.png b/mods/default/textures/default_grass_side.png new file mode 100644 index 0000000..079d96a Binary files /dev/null and b/mods/default/textures/default_grass_side.png differ diff --git a/mods/default/textures/default_gravel.png b/mods/default/textures/default_gravel.png new file mode 100644 index 0000000..8852d38 Binary files /dev/null and b/mods/default/textures/default_gravel.png differ diff --git a/mods/default/textures/default_ice.png b/mods/default/textures/default_ice.png new file mode 100644 index 0000000..2874e1e Binary files /dev/null and b/mods/default/textures/default_ice.png differ diff --git a/mods/default/textures/default_invisible_node_overlay.png b/mods/default/textures/default_invisible_node_overlay.png new file mode 100644 index 0000000..7fc8806 Binary files /dev/null and b/mods/default/textures/default_invisible_node_overlay.png differ diff --git a/mods/default/textures/default_iron_lump.png b/mods/default/textures/default_iron_lump.png new file mode 100644 index 0000000..db61a94 Binary files /dev/null and b/mods/default/textures/default_iron_lump.png differ diff --git a/mods/default/textures/default_item_smoke.png b/mods/default/textures/default_item_smoke.png new file mode 100644 index 0000000..d62fb3b Binary files /dev/null and b/mods/default/textures/default_item_smoke.png differ diff --git a/mods/default/textures/default_junglegrass.png b/mods/default/textures/default_junglegrass.png new file mode 100644 index 0000000..25abb71 Binary files /dev/null and b/mods/default/textures/default_junglegrass.png differ diff --git a/mods/default/textures/default_jungleleaves.png b/mods/default/textures/default_jungleleaves.png new file mode 100644 index 0000000..5afcc36 Binary files /dev/null and b/mods/default/textures/default_jungleleaves.png differ diff --git a/mods/default/textures/default_jungleleaves_simple.png b/mods/default/textures/default_jungleleaves_simple.png new file mode 100644 index 0000000..7165100 Binary files /dev/null and b/mods/default/textures/default_jungleleaves_simple.png differ diff --git a/mods/default/textures/default_junglesapling.png b/mods/default/textures/default_junglesapling.png new file mode 100644 index 0000000..05e1e50 Binary files /dev/null and b/mods/default/textures/default_junglesapling.png differ diff --git a/mods/default/textures/default_jungletree.png b/mods/default/textures/default_jungletree.png new file mode 100644 index 0000000..2cf77a6 Binary files /dev/null and b/mods/default/textures/default_jungletree.png differ diff --git a/mods/default/textures/default_jungletree_top.png b/mods/default/textures/default_jungletree_top.png new file mode 100644 index 0000000..439f078 Binary files /dev/null and b/mods/default/textures/default_jungletree_top.png differ diff --git a/mods/default/textures/default_junglewood.png b/mods/default/textures/default_junglewood.png new file mode 100644 index 0000000..8d17917 Binary files /dev/null and b/mods/default/textures/default_junglewood.png differ diff --git a/mods/default/textures/default_kelp.png b/mods/default/textures/default_kelp.png new file mode 100644 index 0000000..70b743d Binary files /dev/null and b/mods/default/textures/default_kelp.png differ diff --git a/mods/default/textures/default_key.png b/mods/default/textures/default_key.png new file mode 100644 index 0000000..783d313 Binary files /dev/null and b/mods/default/textures/default_key.png differ diff --git a/mods/default/textures/default_key_skeleton.png b/mods/default/textures/default_key_skeleton.png new file mode 100644 index 0000000..2b3497d Binary files /dev/null and b/mods/default/textures/default_key_skeleton.png differ diff --git a/mods/default/textures/default_ladder_steel.png b/mods/default/textures/default_ladder_steel.png new file mode 100644 index 0000000..a312f3e Binary files /dev/null and b/mods/default/textures/default_ladder_steel.png differ diff --git a/mods/default/textures/default_ladder_wood.png b/mods/default/textures/default_ladder_wood.png new file mode 100644 index 0000000..c167fff Binary files /dev/null and b/mods/default/textures/default_ladder_wood.png differ diff --git a/mods/default/textures/default_large_cactus_seedling.png b/mods/default/textures/default_large_cactus_seedling.png new file mode 100644 index 0000000..378351a Binary files /dev/null and b/mods/default/textures/default_large_cactus_seedling.png differ diff --git a/mods/default/textures/default_lava.png b/mods/default/textures/default_lava.png new file mode 100644 index 0000000..e8958de Binary files /dev/null and b/mods/default/textures/default_lava.png differ diff --git a/mods/default/textures/default_lava_flowing_animated.png b/mods/default/textures/default_lava_flowing_animated.png new file mode 100644 index 0000000..2ec0746 Binary files /dev/null and b/mods/default/textures/default_lava_flowing_animated.png differ diff --git a/mods/default/textures/default_lava_source_animated.png b/mods/default/textures/default_lava_source_animated.png new file mode 100644 index 0000000..32267a6 Binary files /dev/null and b/mods/default/textures/default_lava_source_animated.png differ diff --git a/mods/default/textures/default_leaves.png b/mods/default/textures/default_leaves.png new file mode 100644 index 0000000..ba09fe1 Binary files /dev/null and b/mods/default/textures/default_leaves.png differ diff --git a/mods/default/textures/default_leaves_simple.png b/mods/default/textures/default_leaves_simple.png new file mode 100644 index 0000000..eb60f9f Binary files /dev/null and b/mods/default/textures/default_leaves_simple.png differ diff --git a/mods/default/textures/default_marram_grass_1.png b/mods/default/textures/default_marram_grass_1.png new file mode 100644 index 0000000..73ec9e9 Binary files /dev/null and b/mods/default/textures/default_marram_grass_1.png differ diff --git a/mods/default/textures/default_marram_grass_2.png b/mods/default/textures/default_marram_grass_2.png new file mode 100644 index 0000000..2db75c7 Binary files /dev/null and b/mods/default/textures/default_marram_grass_2.png differ diff --git a/mods/default/textures/default_marram_grass_3.png b/mods/default/textures/default_marram_grass_3.png new file mode 100644 index 0000000..f6c155f Binary files /dev/null and b/mods/default/textures/default_marram_grass_3.png differ diff --git a/mods/default/textures/default_mese_block.png b/mods/default/textures/default_mese_block.png new file mode 100644 index 0000000..e30994e Binary files /dev/null and b/mods/default/textures/default_mese_block.png differ diff --git a/mods/default/textures/default_mese_crystal.png b/mods/default/textures/default_mese_crystal.png new file mode 100644 index 0000000..f1d71f1 Binary files /dev/null and b/mods/default/textures/default_mese_crystal.png differ diff --git a/mods/default/textures/default_mese_crystal_fragment.png b/mods/default/textures/default_mese_crystal_fragment.png new file mode 100644 index 0000000..d5416ab Binary files /dev/null and b/mods/default/textures/default_mese_crystal_fragment.png differ diff --git a/mods/default/textures/default_mese_post_light_side.png b/mods/default/textures/default_mese_post_light_side.png new file mode 100644 index 0000000..a94e8b1 Binary files /dev/null and b/mods/default/textures/default_mese_post_light_side.png differ diff --git a/mods/default/textures/default_mese_post_light_side_dark.png b/mods/default/textures/default_mese_post_light_side_dark.png new file mode 100644 index 0000000..9098314 Binary files /dev/null and b/mods/default/textures/default_mese_post_light_side_dark.png differ diff --git a/mods/default/textures/default_meselamp.png b/mods/default/textures/default_meselamp.png new file mode 100644 index 0000000..0c3a1a1 Binary files /dev/null and b/mods/default/textures/default_meselamp.png differ diff --git a/mods/default/textures/default_mineral_coal.png b/mods/default/textures/default_mineral_coal.png new file mode 100644 index 0000000..6d1386b Binary files /dev/null and b/mods/default/textures/default_mineral_coal.png differ diff --git a/mods/default/textures/default_mineral_copper.png b/mods/default/textures/default_mineral_copper.png new file mode 100644 index 0000000..c4c518e Binary files /dev/null and b/mods/default/textures/default_mineral_copper.png differ diff --git a/mods/default/textures/default_mineral_diamond.png b/mods/default/textures/default_mineral_diamond.png new file mode 100644 index 0000000..39c0f83 Binary files /dev/null and b/mods/default/textures/default_mineral_diamond.png differ diff --git a/mods/default/textures/default_mineral_gold.png b/mods/default/textures/default_mineral_gold.png new file mode 100644 index 0000000..2220add Binary files /dev/null and b/mods/default/textures/default_mineral_gold.png differ diff --git a/mods/default/textures/default_mineral_iron.png b/mods/default/textures/default_mineral_iron.png new file mode 100644 index 0000000..bfec8b1 Binary files /dev/null and b/mods/default/textures/default_mineral_iron.png differ diff --git a/mods/default/textures/default_mineral_mese.png b/mods/default/textures/default_mineral_mese.png new file mode 100644 index 0000000..6952670 Binary files /dev/null and b/mods/default/textures/default_mineral_mese.png differ diff --git a/mods/default/textures/default_mineral_tin.png b/mods/default/textures/default_mineral_tin.png new file mode 100644 index 0000000..232d4b5 Binary files /dev/null and b/mods/default/textures/default_mineral_tin.png differ diff --git a/mods/default/textures/default_moss.png b/mods/default/textures/default_moss.png new file mode 100644 index 0000000..479038e Binary files /dev/null and b/mods/default/textures/default_moss.png differ diff --git a/mods/default/textures/default_moss_side.png b/mods/default/textures/default_moss_side.png new file mode 100644 index 0000000..4a20345 Binary files /dev/null and b/mods/default/textures/default_moss_side.png differ diff --git a/mods/default/textures/default_mossycobble.png b/mods/default/textures/default_mossycobble.png new file mode 100644 index 0000000..1ae7c91 Binary files /dev/null and b/mods/default/textures/default_mossycobble.png differ diff --git a/mods/default/textures/default_obsidian.png b/mods/default/textures/default_obsidian.png new file mode 100644 index 0000000..8f4a49c Binary files /dev/null and b/mods/default/textures/default_obsidian.png differ diff --git a/mods/default/textures/default_obsidian_block.png b/mods/default/textures/default_obsidian_block.png new file mode 100644 index 0000000..7e1d4d3 Binary files /dev/null and b/mods/default/textures/default_obsidian_block.png differ diff --git a/mods/default/textures/default_obsidian_brick.png b/mods/default/textures/default_obsidian_brick.png new file mode 100644 index 0000000..30c67ca Binary files /dev/null and b/mods/default/textures/default_obsidian_brick.png differ diff --git a/mods/default/textures/default_obsidian_glass.png b/mods/default/textures/default_obsidian_glass.png new file mode 100644 index 0000000..d5ac83d Binary files /dev/null and b/mods/default/textures/default_obsidian_glass.png differ diff --git a/mods/default/textures/default_obsidian_glass_detail.png b/mods/default/textures/default_obsidian_glass_detail.png new file mode 100644 index 0000000..a8bbec9 Binary files /dev/null and b/mods/default/textures/default_obsidian_glass_detail.png differ diff --git a/mods/default/textures/default_obsidian_shard.png b/mods/default/textures/default_obsidian_shard.png new file mode 100644 index 0000000..a988d8c Binary files /dev/null and b/mods/default/textures/default_obsidian_shard.png differ diff --git a/mods/default/textures/default_paper.png b/mods/default/textures/default_paper.png new file mode 100644 index 0000000..8f23924 Binary files /dev/null and b/mods/default/textures/default_paper.png differ diff --git a/mods/default/textures/default_papyrus.png b/mods/default/textures/default_papyrus.png new file mode 100644 index 0000000..a85e809 Binary files /dev/null and b/mods/default/textures/default_papyrus.png differ diff --git a/mods/default/textures/default_permafrost.png b/mods/default/textures/default_permafrost.png new file mode 100644 index 0000000..6f2567e Binary files /dev/null and b/mods/default/textures/default_permafrost.png differ diff --git a/mods/default/textures/default_pine_bush_sapling.png b/mods/default/textures/default_pine_bush_sapling.png new file mode 100644 index 0000000..fadeff8 Binary files /dev/null and b/mods/default/textures/default_pine_bush_sapling.png differ diff --git a/mods/default/textures/default_pine_bush_stem.png b/mods/default/textures/default_pine_bush_stem.png new file mode 100644 index 0000000..e239f81 Binary files /dev/null and b/mods/default/textures/default_pine_bush_stem.png differ diff --git a/mods/default/textures/default_pine_needles.png b/mods/default/textures/default_pine_needles.png new file mode 100644 index 0000000..f699727 Binary files /dev/null and b/mods/default/textures/default_pine_needles.png differ diff --git a/mods/default/textures/default_pine_sapling.png b/mods/default/textures/default_pine_sapling.png new file mode 100644 index 0000000..c30131d Binary files /dev/null and b/mods/default/textures/default_pine_sapling.png differ diff --git a/mods/default/textures/default_pine_tree.png b/mods/default/textures/default_pine_tree.png new file mode 100644 index 0000000..4a5328f Binary files /dev/null and b/mods/default/textures/default_pine_tree.png differ diff --git a/mods/default/textures/default_pine_tree_top.png b/mods/default/textures/default_pine_tree_top.png new file mode 100644 index 0000000..8705710 Binary files /dev/null and b/mods/default/textures/default_pine_tree_top.png differ diff --git a/mods/default/textures/default_pine_wood.png b/mods/default/textures/default_pine_wood.png new file mode 100644 index 0000000..6844ceb Binary files /dev/null and b/mods/default/textures/default_pine_wood.png differ diff --git a/mods/default/textures/default_rainforest_litter.png b/mods/default/textures/default_rainforest_litter.png new file mode 100644 index 0000000..d762deb Binary files /dev/null and b/mods/default/textures/default_rainforest_litter.png differ diff --git a/mods/default/textures/default_rainforest_litter_side.png b/mods/default/textures/default_rainforest_litter_side.png new file mode 100644 index 0000000..7ccb11d Binary files /dev/null and b/mods/default/textures/default_rainforest_litter_side.png differ diff --git a/mods/default/textures/default_river_water.png b/mods/default/textures/default_river_water.png new file mode 100644 index 0000000..3b55c5f Binary files /dev/null and b/mods/default/textures/default_river_water.png differ diff --git a/mods/default/textures/default_river_water_flowing_animated.png b/mods/default/textures/default_river_water_flowing_animated.png new file mode 100644 index 0000000..536acc5 Binary files /dev/null and b/mods/default/textures/default_river_water_flowing_animated.png differ diff --git a/mods/default/textures/default_river_water_source_animated.png b/mods/default/textures/default_river_water_source_animated.png new file mode 100644 index 0000000..daa5653 Binary files /dev/null and b/mods/default/textures/default_river_water_source_animated.png differ diff --git a/mods/default/textures/default_sand.png b/mods/default/textures/default_sand.png new file mode 100644 index 0000000..645a300 Binary files /dev/null and b/mods/default/textures/default_sand.png differ diff --git a/mods/default/textures/default_sandstone.png b/mods/default/textures/default_sandstone.png new file mode 100644 index 0000000..16e3d13 Binary files /dev/null and b/mods/default/textures/default_sandstone.png differ diff --git a/mods/default/textures/default_sandstone_block.png b/mods/default/textures/default_sandstone_block.png new file mode 100644 index 0000000..2e06491 Binary files /dev/null and b/mods/default/textures/default_sandstone_block.png differ diff --git a/mods/default/textures/default_sandstone_brick.png b/mods/default/textures/default_sandstone_brick.png new file mode 100644 index 0000000..e7150e5 Binary files /dev/null and b/mods/default/textures/default_sandstone_brick.png differ diff --git a/mods/default/textures/default_sapling.png b/mods/default/textures/default_sapling.png new file mode 100644 index 0000000..3fd64f0 Binary files /dev/null and b/mods/default/textures/default_sapling.png differ diff --git a/mods/default/textures/default_sign_steel.png b/mods/default/textures/default_sign_steel.png new file mode 100644 index 0000000..3ca0c59 Binary files /dev/null and b/mods/default/textures/default_sign_steel.png differ diff --git a/mods/default/textures/default_sign_wall_steel.png b/mods/default/textures/default_sign_wall_steel.png new file mode 100644 index 0000000..2227477 Binary files /dev/null and b/mods/default/textures/default_sign_wall_steel.png differ diff --git a/mods/default/textures/default_sign_wall_wood.png b/mods/default/textures/default_sign_wall_wood.png new file mode 100644 index 0000000..40552c7 Binary files /dev/null and b/mods/default/textures/default_sign_wall_wood.png differ diff --git a/mods/default/textures/default_sign_wood.png b/mods/default/textures/default_sign_wood.png new file mode 100644 index 0000000..d0559da Binary files /dev/null and b/mods/default/textures/default_sign_wood.png differ diff --git a/mods/default/textures/default_silver_sand.png b/mods/default/textures/default_silver_sand.png new file mode 100644 index 0000000..c4a8f73 Binary files /dev/null and b/mods/default/textures/default_silver_sand.png differ diff --git a/mods/default/textures/default_silver_sandstone.png b/mods/default/textures/default_silver_sandstone.png new file mode 100644 index 0000000..eac62cb Binary files /dev/null and b/mods/default/textures/default_silver_sandstone.png differ diff --git a/mods/default/textures/default_silver_sandstone_block.png b/mods/default/textures/default_silver_sandstone_block.png new file mode 100644 index 0000000..9997461 Binary files /dev/null and b/mods/default/textures/default_silver_sandstone_block.png differ diff --git a/mods/default/textures/default_silver_sandstone_brick.png b/mods/default/textures/default_silver_sandstone_brick.png new file mode 100644 index 0000000..93d87a5 Binary files /dev/null and b/mods/default/textures/default_silver_sandstone_brick.png differ diff --git a/mods/default/textures/default_snow.png b/mods/default/textures/default_snow.png new file mode 100644 index 0000000..fcbef0e Binary files /dev/null and b/mods/default/textures/default_snow.png differ diff --git a/mods/default/textures/default_snow_side.png b/mods/default/textures/default_snow_side.png new file mode 100644 index 0000000..03456c8 Binary files /dev/null and b/mods/default/textures/default_snow_side.png differ diff --git a/mods/default/textures/default_snowball.png b/mods/default/textures/default_snowball.png new file mode 100644 index 0000000..3a4dc1f Binary files /dev/null and b/mods/default/textures/default_snowball.png differ diff --git a/mods/default/textures/default_steel_block.png b/mods/default/textures/default_steel_block.png new file mode 100644 index 0000000..7f49f61 Binary files /dev/null and b/mods/default/textures/default_steel_block.png differ diff --git a/mods/default/textures/default_steel_ingot.png b/mods/default/textures/default_steel_ingot.png new file mode 100644 index 0000000..8100b01 Binary files /dev/null and b/mods/default/textures/default_steel_ingot.png differ diff --git a/mods/default/textures/default_stick.png b/mods/default/textures/default_stick.png new file mode 100644 index 0000000..0378d07 Binary files /dev/null and b/mods/default/textures/default_stick.png differ diff --git a/mods/default/textures/default_stone.png b/mods/default/textures/default_stone.png new file mode 100644 index 0000000..63cb7c4 Binary files /dev/null and b/mods/default/textures/default_stone.png differ diff --git a/mods/default/textures/default_stone_block.png b/mods/default/textures/default_stone_block.png new file mode 100644 index 0000000..3b771e7 Binary files /dev/null and b/mods/default/textures/default_stone_block.png differ diff --git a/mods/default/textures/default_stone_brick.png b/mods/default/textures/default_stone_brick.png new file mode 100644 index 0000000..4dbb49d Binary files /dev/null and b/mods/default/textures/default_stone_brick.png differ diff --git a/mods/default/textures/default_stones.png b/mods/default/textures/default_stones.png new file mode 100644 index 0000000..4d3b6cf Binary files /dev/null and b/mods/default/textures/default_stones.png differ diff --git a/mods/default/textures/default_stones_side.png b/mods/default/textures/default_stones_side.png new file mode 100644 index 0000000..7ae823a Binary files /dev/null and b/mods/default/textures/default_stones_side.png differ diff --git a/mods/default/textures/default_tin_block.png b/mods/default/textures/default_tin_block.png new file mode 100644 index 0000000..72759b0 Binary files /dev/null and b/mods/default/textures/default_tin_block.png differ diff --git a/mods/default/textures/default_tin_ingot.png b/mods/default/textures/default_tin_ingot.png new file mode 100644 index 0000000..eed5361 Binary files /dev/null and b/mods/default/textures/default_tin_ingot.png differ diff --git a/mods/default/textures/default_tin_lump.png b/mods/default/textures/default_tin_lump.png new file mode 100644 index 0000000..72bd339 Binary files /dev/null and b/mods/default/textures/default_tin_lump.png differ diff --git a/mods/default/textures/default_tool_bronzeaxe.png b/mods/default/textures/default_tool_bronzeaxe.png new file mode 100644 index 0000000..8ae43b5 Binary files /dev/null and b/mods/default/textures/default_tool_bronzeaxe.png differ diff --git a/mods/default/textures/default_tool_bronzepick.png b/mods/default/textures/default_tool_bronzepick.png new file mode 100644 index 0000000..c88a5f0 Binary files /dev/null and b/mods/default/textures/default_tool_bronzepick.png differ diff --git a/mods/default/textures/default_tool_bronzeshovel.png b/mods/default/textures/default_tool_bronzeshovel.png new file mode 100644 index 0000000..d7d800e Binary files /dev/null and b/mods/default/textures/default_tool_bronzeshovel.png differ diff --git a/mods/default/textures/default_tool_bronzesword.png b/mods/default/textures/default_tool_bronzesword.png new file mode 100644 index 0000000..cdab898 Binary files /dev/null and b/mods/default/textures/default_tool_bronzesword.png differ diff --git a/mods/default/textures/default_tool_diamondaxe.png b/mods/default/textures/default_tool_diamondaxe.png new file mode 100644 index 0000000..e32a0bf Binary files /dev/null and b/mods/default/textures/default_tool_diamondaxe.png differ diff --git a/mods/default/textures/default_tool_diamondpick.png b/mods/default/textures/default_tool_diamondpick.png new file mode 100644 index 0000000..f9883c6 Binary files /dev/null and b/mods/default/textures/default_tool_diamondpick.png differ diff --git a/mods/default/textures/default_tool_diamondshovel.png b/mods/default/textures/default_tool_diamondshovel.png new file mode 100644 index 0000000..d0fe24d Binary files /dev/null and b/mods/default/textures/default_tool_diamondshovel.png differ diff --git a/mods/default/textures/default_tool_diamondsword.png b/mods/default/textures/default_tool_diamondsword.png new file mode 100644 index 0000000..dbccd0e Binary files /dev/null and b/mods/default/textures/default_tool_diamondsword.png differ diff --git a/mods/default/textures/default_tool_meseaxe.png b/mods/default/textures/default_tool_meseaxe.png new file mode 100644 index 0000000..c01fb4f Binary files /dev/null and b/mods/default/textures/default_tool_meseaxe.png differ diff --git a/mods/default/textures/default_tool_mesepick.png b/mods/default/textures/default_tool_mesepick.png new file mode 100644 index 0000000..1b2e25b Binary files /dev/null and b/mods/default/textures/default_tool_mesepick.png differ diff --git a/mods/default/textures/default_tool_meseshovel.png b/mods/default/textures/default_tool_meseshovel.png new file mode 100644 index 0000000..00813a2 Binary files /dev/null and b/mods/default/textures/default_tool_meseshovel.png differ diff --git a/mods/default/textures/default_tool_mesesword.png b/mods/default/textures/default_tool_mesesword.png new file mode 100644 index 0000000..d395d3a Binary files /dev/null and b/mods/default/textures/default_tool_mesesword.png differ diff --git a/mods/default/textures/default_tool_steelaxe.png b/mods/default/textures/default_tool_steelaxe.png new file mode 100644 index 0000000..1528cad Binary files /dev/null and b/mods/default/textures/default_tool_steelaxe.png differ diff --git a/mods/default/textures/default_tool_steelpick.png b/mods/default/textures/default_tool_steelpick.png new file mode 100644 index 0000000..a7543a1 Binary files /dev/null and b/mods/default/textures/default_tool_steelpick.png differ diff --git a/mods/default/textures/default_tool_steelshovel.png b/mods/default/textures/default_tool_steelshovel.png new file mode 100644 index 0000000..65e4045 Binary files /dev/null and b/mods/default/textures/default_tool_steelshovel.png differ diff --git a/mods/default/textures/default_tool_steelsword.png b/mods/default/textures/default_tool_steelsword.png new file mode 100644 index 0000000..630a339 Binary files /dev/null and b/mods/default/textures/default_tool_steelsword.png differ diff --git a/mods/default/textures/default_tool_stoneaxe.png b/mods/default/textures/default_tool_stoneaxe.png new file mode 100644 index 0000000..cc36054 Binary files /dev/null and b/mods/default/textures/default_tool_stoneaxe.png differ diff --git a/mods/default/textures/default_tool_stonepick.png b/mods/default/textures/default_tool_stonepick.png new file mode 100644 index 0000000..237d739 Binary files /dev/null and b/mods/default/textures/default_tool_stonepick.png differ diff --git a/mods/default/textures/default_tool_stoneshovel.png b/mods/default/textures/default_tool_stoneshovel.png new file mode 100644 index 0000000..11711bd Binary files /dev/null and b/mods/default/textures/default_tool_stoneshovel.png differ diff --git a/mods/default/textures/default_tool_stonesword.png b/mods/default/textures/default_tool_stonesword.png new file mode 100644 index 0000000..1a493ac Binary files /dev/null and b/mods/default/textures/default_tool_stonesword.png differ diff --git a/mods/default/textures/default_tool_woodaxe.png b/mods/default/textures/default_tool_woodaxe.png new file mode 100644 index 0000000..68f1fd8 Binary files /dev/null and b/mods/default/textures/default_tool_woodaxe.png differ diff --git a/mods/default/textures/default_tool_woodpick.png b/mods/default/textures/default_tool_woodpick.png new file mode 100644 index 0000000..0aed583 Binary files /dev/null and b/mods/default/textures/default_tool_woodpick.png differ diff --git a/mods/default/textures/default_tool_woodshovel.png b/mods/default/textures/default_tool_woodshovel.png new file mode 100644 index 0000000..dcef2b5 Binary files /dev/null and b/mods/default/textures/default_tool_woodshovel.png differ diff --git a/mods/default/textures/default_tool_woodsword.png b/mods/default/textures/default_tool_woodsword.png new file mode 100644 index 0000000..c78ba50 Binary files /dev/null and b/mods/default/textures/default_tool_woodsword.png differ diff --git a/mods/default/textures/default_torch_animated.png b/mods/default/textures/default_torch_animated.png new file mode 100644 index 0000000..cdf33ef Binary files /dev/null and b/mods/default/textures/default_torch_animated.png differ diff --git a/mods/default/textures/default_torch_on_ceiling_animated.png b/mods/default/textures/default_torch_on_ceiling_animated.png new file mode 100644 index 0000000..3a8b5ad Binary files /dev/null and b/mods/default/textures/default_torch_on_ceiling_animated.png differ diff --git a/mods/default/textures/default_torch_on_floor.png b/mods/default/textures/default_torch_on_floor.png new file mode 100644 index 0000000..bc4bdd6 Binary files /dev/null and b/mods/default/textures/default_torch_on_floor.png differ diff --git a/mods/default/textures/default_torch_on_floor_animated.png b/mods/default/textures/default_torch_on_floor_animated.png new file mode 100644 index 0000000..ad51c03 Binary files /dev/null and b/mods/default/textures/default_torch_on_floor_animated.png differ diff --git a/mods/default/textures/default_tree.png b/mods/default/textures/default_tree.png new file mode 100644 index 0000000..10e297b Binary files /dev/null and b/mods/default/textures/default_tree.png differ diff --git a/mods/default/textures/default_tree_top.png b/mods/default/textures/default_tree_top.png new file mode 100644 index 0000000..da99bce Binary files /dev/null and b/mods/default/textures/default_tree_top.png differ diff --git a/mods/default/textures/default_water.png b/mods/default/textures/default_water.png new file mode 100644 index 0000000..00500e9 Binary files /dev/null and b/mods/default/textures/default_water.png differ diff --git a/mods/default/textures/default_water_flowing_animated.png b/mods/default/textures/default_water_flowing_animated.png new file mode 100644 index 0000000..070d797 Binary files /dev/null and b/mods/default/textures/default_water_flowing_animated.png differ diff --git a/mods/default/textures/default_water_source_animated.png b/mods/default/textures/default_water_source_animated.png new file mode 100644 index 0000000..7e7f9ff Binary files /dev/null and b/mods/default/textures/default_water_source_animated.png differ diff --git a/mods/default/textures/default_wood.png b/mods/default/textures/default_wood.png new file mode 100644 index 0000000..af56d6c Binary files /dev/null and b/mods/default/textures/default_wood.png differ diff --git a/mods/default/textures/gui_formbg.png b/mods/default/textures/gui_formbg.png new file mode 100644 index 0000000..c543466 Binary files /dev/null and b/mods/default/textures/gui_formbg.png differ diff --git a/mods/default/textures/gui_furnace_arrow_bg.png b/mods/default/textures/gui_furnace_arrow_bg.png new file mode 100644 index 0000000..046d8cd Binary files /dev/null and b/mods/default/textures/gui_furnace_arrow_bg.png differ diff --git a/mods/default/textures/gui_furnace_arrow_fg.png b/mods/default/textures/gui_furnace_arrow_fg.png new file mode 100644 index 0000000..8d3c396 Binary files /dev/null and b/mods/default/textures/gui_furnace_arrow_fg.png differ diff --git a/mods/default/textures/gui_hb_bg.png b/mods/default/textures/gui_hb_bg.png new file mode 100644 index 0000000..99248e1 Binary files /dev/null and b/mods/default/textures/gui_hb_bg.png differ diff --git a/mods/default/textures/gui_hotbar.png b/mods/default/textures/gui_hotbar.png new file mode 100644 index 0000000..7bc7887 Binary files /dev/null and b/mods/default/textures/gui_hotbar.png differ diff --git a/mods/default/textures/gui_hotbar_selected.png b/mods/default/textures/gui_hotbar_selected.png new file mode 100644 index 0000000..7203e9a Binary files /dev/null and b/mods/default/textures/gui_hotbar_selected.png differ diff --git a/mods/default/textures/heart.png b/mods/default/textures/heart.png new file mode 100644 index 0000000..4412cab Binary files /dev/null and b/mods/default/textures/heart.png differ diff --git a/mods/default/textures/wieldhand.png b/mods/default/textures/wieldhand.png new file mode 100644 index 0000000..69f4b7b Binary files /dev/null and b/mods/default/textures/wieldhand.png differ diff --git a/mods/default/tools.lua b/mods/default/tools.lua new file mode 100644 index 0000000..44468c5 --- /dev/null +++ b/mods/default/tools.lua @@ -0,0 +1,517 @@ +-- mods/default/tools.lua + +-- support for MT game translation. +local S = default.get_translator + +-- The hand +-- Override the hand item registered in the engine in builtin/game/register.lua +minetest.override_item("", { + wield_scale = {x=1,y=1,z=2.5}, + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level = 0, + groupcaps = { + crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1}, + snappy = {times={[3]=0.40}, uses=0, maxlevel=1}, + oddly_breakable_by_hand = {times={[1]=3.50,[2]=2.00,[3]=0.70}, uses=0} + }, + damage_groups = {fleshy=1}, + } +}) + +-- +-- Picks +-- + +minetest.register_tool("default:pick_wood", { + description = S("Wooden Pickaxe"), + inventory_image = "default_tool_woodpick.png", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + cracky = {times={[3]=1.60}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1, flammable = 2} +}) + +minetest.register_tool("default:pick_stone", { + description = S("Stone Pickaxe"), + inventory_image = "default_tool_stonepick.png", + tool_capabilities = { + full_punch_interval = 1.3, + max_drop_level=0, + groupcaps={ + cracky = {times={[2]=2.0, [3]=1.00}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_bronze", { + description = S("Bronze Pickaxe"), + inventory_image = "default_tool_bronzepick.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=4.50, [2]=1.80, [3]=0.90}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_steel", { + description = S("Steel Pickaxe"), + inventory_image = "default_tool_steelpick.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_mese", { + description = S("Mese Pickaxe"), + inventory_image = "default_tool_mesepick.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=3, + groupcaps={ + cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=5}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_diamond", { + description = S("Diamond Pickaxe"), + inventory_image = "default_tool_diamondpick.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=3, + groupcaps={ + cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=5}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +-- +-- Shovels +-- + +minetest.register_tool("default:shovel_wood", { + description = S("Wooden Shovel"), + inventory_image = "default_tool_woodshovel.png", + wield_image = "default_tool_woodshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1, flammable = 2} +}) + +minetest.register_tool("default:shovel_stone", { + description = S("Stone Shovel"), + inventory_image = "default_tool_stoneshovel.png", + wield_image = "default_tool_stoneshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.4, + max_drop_level=0, + groupcaps={ + crumbly = {times={[1]=1.80, [2]=1.20, [3]=0.50}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_bronze", { + description = S("Bronze Shovel"), + inventory_image = "default_tool_bronzeshovel.png", + wield_image = "default_tool_bronzeshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.65, [2]=1.05, [3]=0.45}, uses=25, maxlevel=2}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_steel", { + description = S("Steel Shovel"), + inventory_image = "default_tool_steelshovel.png", + wield_image = "default_tool_steelshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_mese", { + description = S("Mese Shovel"), + inventory_image = "default_tool_meseshovel.png", + wield_image = "default_tool_meseshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=3, + groupcaps={ + crumbly = {times={[1]=1.20, [2]=0.60, [3]=0.30}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_diamond", { + description = S("Diamond Shovel"), + inventory_image = "default_tool_diamondshovel.png", + wield_image = "default_tool_diamondshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +-- +-- Axes +-- + +minetest.register_tool("default:axe_wood", { + description = S("Wooden Axe"), + inventory_image = "default_tool_woodaxe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=0, + groupcaps={ + choppy = {times={[2]=3.00, [3]=1.60}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1, flammable = 2} +}) + +minetest.register_tool("default:axe_stone", { + description = S("Stone Axe"), + inventory_image = "default_tool_stoneaxe.png", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + choppy={times={[1]=3.00, [2]=2.00, [3]=1.30}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_bronze", { + description = S("Bronze Axe"), + inventory_image = "default_tool_bronzeaxe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.75, [2]=1.70, [3]=1.15}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_steel", { + description = S("Steel Axe"), + inventory_image = "default_tool_steelaxe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_mese", { + description = S("Mese Axe"), + inventory_image = "default_tool_meseaxe.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=6}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_diamond", { + description = S("Diamond Axe"), + inventory_image = "default_tool_diamondaxe.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=7}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +-- +-- Swords +-- + +minetest.register_tool("default:sword_wood", { + description = S("Wooden Sword"), + inventory_image = "default_tool_woodsword.png", + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1, flammable = 2} +}) + +minetest.register_tool("default:sword_stone", { + description = S("Stone Sword"), + inventory_image = "default_tool_stonesword.png", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_bronze", { + description = S("Bronze Sword"), + inventory_image = "default_tool_bronzesword.png", + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.75, [2]=1.30, [3]=0.375}, uses=25, maxlevel=2}, + }, + damage_groups = {fleshy=6}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_steel", { + description = S("Steel Sword"), + inventory_image = "default_tool_steelsword.png", + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=6}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_mese", { + description = S("Mese Sword"), + inventory_image = "default_tool_mesesword.png", + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.0, [2]=1.00, [3]=0.35}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=7}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_diamond", { + description = S("Diamond Sword"), + inventory_image = "default_tool_diamondsword.png", + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3}, + }, + damage_groups = {fleshy=8}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +-- +-- Register Craft Recipies +-- + +local craft_ingreds = { + wood = "group:wood", + stone = "group:stone", + steel = "default:steel_ingot", + bronze = "default:bronze_ingot", + mese = "default:mese_crystal", + diamond = "default:diamond" +} + +for name, mat in pairs(craft_ingreds) do + minetest.register_craft({ + output = "default:pick_".. name, + recipe = { + {mat, mat, mat}, + {"", "group:stick", ""}, + {"", "group:stick", ""} + } + }) + + minetest.register_craft({ + output = "default:shovel_".. name, + recipe = { + {mat}, + {"group:stick"}, + {"group:stick"} + } + }) + + minetest.register_craft({ + output = "default:axe_".. name, + recipe = { + {mat, mat}, + {mat, "group:stick"}, + {"", "group:stick"} + } + }) + + minetest.register_craft({ + output = "default:sword_".. name, + recipe = { + {mat}, + {mat}, + {"group:stick"} + } + }) +end + +minetest.register_tool("default:key", { + description = S("Key"), + inventory_image = "default_key.png", + groups = {key = 1, not_in_creative_inventory = 1}, + stack_max = 1, + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local def = minetest.registered_nodes[node.name] + if def and def.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return def.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + if pointed_thing.type ~= "node" then + return itemstack + end + + local pos = pointed_thing.under + node = minetest.get_node(pos) + + if not node or node.name == "ignore" then + return itemstack + end + + local ndef = minetest.registered_nodes[node.name] + if not ndef then + return itemstack + end + + local on_key_use = ndef.on_key_use + if on_key_use then + on_key_use(pos, placer) + end + + return nil + end +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pick_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:shovel_wood", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:axe_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:sword_wood", + burntime = 5, +}) diff --git a/mods/default/torch.lua b/mods/default/torch.lua new file mode 100644 index 0000000..c06dee8 --- /dev/null +++ b/mods/default/torch.lua @@ -0,0 +1,154 @@ +-- default/torch.lua + +-- support for MT game translation. +local S = default.get_translator + +local function on_flood(pos, oldnode, newnode) + minetest.add_item(pos, ItemStack("default:torch 1")) + -- Play flame-extinguish sound if liquid is not an 'igniter' + local nodedef = minetest.registered_items[newnode.name] + if not (nodedef and nodedef.groups and + nodedef.groups.igniter and nodedef.groups.igniter > 0) then + minetest.sound_play( + "default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.1}, + true + ) + end + -- Remove the torch node + return false +end + +minetest.register_node("default:torch", { + description = S("Torch"), + drawtype = "mesh", + mesh = "torch_floor.obj", + inventory_image = "default_torch_on_floor.png", + wield_image = "default_torch_on_floor.png", + tiles = {{ + name = "default_torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} + }}, + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + liquids_pointable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, attached_node=1, torch=1}, + drop = "default:torch", + selection_box = { + type = "wallmounted", + wall_bottom = {-1/8, -1/2, -1/8, 1/8, 2/16, 1/8}, + }, + sounds = default.node_sound_wood_defaults(), + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local def = minetest.registered_nodes[node.name] + if def and def.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return def.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + local above = pointed_thing.above + local wdir = minetest.dir_to_wallmounted(vector.subtract(under, above)) + local fakestack = itemstack + if wdir == 0 then + fakestack:set_name("default:torch_ceiling") + elseif wdir == 1 then + fakestack:set_name("default:torch") + else + fakestack:set_name("default:torch_wall") + end + + itemstack = minetest.item_place(fakestack, placer, pointed_thing, wdir) + itemstack:set_name("default:torch") + + return itemstack + end, + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_node("default:torch_wall", { + drawtype = "mesh", + mesh = "torch_wall.obj", + tiles = {{ + name = "default_torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} + }}, + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1}, + drop = "default:torch", + selection_box = { + type = "wallmounted", + wall_side = {-1/2, -1/2, -1/8, -1/8, 1/8, 1/8}, + }, + sounds = default.node_sound_wood_defaults(), + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_node("default:torch_ceiling", { + drawtype = "mesh", + mesh = "torch_ceiling.obj", + tiles = {{ + name = "default_torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} + }}, + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1}, + drop = "default:torch", + selection_box = { + type = "wallmounted", + wall_top = {-1/8, -1/16, -5/16, 1/8, 1/2, 1/8}, + }, + sounds = default.node_sound_wood_defaults(), + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_lbm({ + name = "default:3dtorch", + nodenames = {"default:torch", "torches:floor", "torches:wall"}, + action = function(pos, node) + if node.param2 == 0 then + minetest.set_node(pos, {name = "default:torch_ceiling", + param2 = node.param2}) + elseif node.param2 == 1 then + minetest.set_node(pos, {name = "default:torch", + param2 = node.param2}) + else + minetest.set_node(pos, {name = "default:torch_wall", + param2 = node.param2}) + end + end +}) + +minetest.register_craft({ + output = "default:torch 4", + recipe = { + {"default:coal_lump"}, + {"group:stick"}, + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:torch", + burntime = 4, +}) diff --git a/mods/default/trees.lua b/mods/default/trees.lua new file mode 100644 index 0000000..a850644 --- /dev/null +++ b/mods/default/trees.lua @@ -0,0 +1,608 @@ +-- default/trees.lua + +-- support for MT game translation. +local S = default.get_translator + +local random = math.random + +-- +-- Grow trees from saplings +-- + +-- 'can grow' function + +function default.can_grow(pos) + local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) + if not node_under then + return false + end + if minetest.get_item_group(node_under.name, "soil") == 0 then + return false + end + local light_level = minetest.get_node_light(pos) + if not light_level or light_level < 13 then + return false + end + return true +end + + +-- 'is snow nearby' function + +local function is_snow_nearby(pos) + return minetest.find_node_near(pos, 1, {"group:snowy"}) +end + + +-- Grow sapling + +function default.grow_sapling(pos) + if not default.can_grow(pos) then + -- try again 5 min later + minetest.get_node_timer(pos):start(300) + return + end + + local mg_name = minetest.get_mapgen_setting("mg_name") + local node = minetest.get_node(pos) + if node.name == "default:sapling" then + minetest.log("action", "A sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + if mg_name == "v6" then + default.grow_tree(pos, random(1, 4) == 1) + else + default.grow_new_apple_tree(pos) + end + elseif node.name == "default:junglesapling" then + minetest.log("action", "A jungle sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + if mg_name == "v6" then + default.grow_jungle_tree(pos) + else + default.grow_new_jungle_tree(pos) + end + elseif node.name == "default:pine_sapling" then + minetest.log("action", "A pine sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + local snow = is_snow_nearby(pos) + if mg_name == "v6" then + default.grow_pine_tree(pos, snow) + elseif snow then + default.grow_new_snowy_pine_tree(pos) + else + default.grow_new_pine_tree(pos) + end + elseif node.name == "default:acacia_sapling" then + minetest.log("action", "An acacia sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + default.grow_new_acacia_tree(pos) + elseif node.name == "default:aspen_sapling" then + minetest.log("action", "An aspen sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + default.grow_new_aspen_tree(pos) + elseif node.name == "default:bush_sapling" then + minetest.log("action", "A bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_bush(pos) + elseif node.name == "default:blueberry_bush_sapling" then + minetest.log("action", "A blueberry bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_blueberry_bush(pos) + elseif node.name == "default:acacia_bush_sapling" then + minetest.log("action", "An acacia bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_acacia_bush(pos) + elseif node.name == "default:pine_bush_sapling" then + minetest.log("action", "A pine bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_pine_bush(pos) + elseif node.name == "default:emergent_jungle_sapling" then + minetest.log("action", "An emergent jungle sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + default.grow_new_emergent_jungle_tree(pos) + end +end + +minetest.register_lbm({ + name = "default:convert_saplings_to_node_timer", + nodenames = {"default:sapling", "default:junglesapling", + "default:pine_sapling", "default:acacia_sapling", + "default:aspen_sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end +}) + +-- +-- Tree generation +-- + +-- Apple tree and jungle tree trunk and leaves function + +local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid, + height, size, iters, is_apple_tree) + local x, y, z = pos.x, pos.y, pos.z + local c_air = minetest.get_content_id("air") + local c_ignore = minetest.get_content_id("ignore") + local c_apple = minetest.get_content_id("default:apple") + + -- Trunk + data[a:index(x, y, z)] = tree_cid -- Force-place lowest trunk node to replace sapling + for yy = y + 1, y + height - 1 do + local vi = a:index(x, yy, z) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore or node_id == leaves_cid then + data[vi] = tree_cid + end + end + + -- Force leaves near the trunk + for z_dist = -1, 1 do + for y_dist = -size, 1 do + local vi = a:index(x - 1, y + height + y_dist, z + z_dist) + for x_dist = -1, 1 do + if data[vi] == c_air or data[vi] == c_ignore then + if is_apple_tree and random(1, 8) == 1 then + data[vi] = c_apple + else + data[vi] = leaves_cid + end + end + vi = vi + 1 + end + end + end + + -- Randomly add leaves in 2x2x2 clusters. + for i = 1, iters do + local clust_x = x + random(-size, size - 1) + local clust_y = y + height + random(-size, 0) + local clust_z = z + random(-size, size - 1) + + for xi = 0, 1 do + for yi = 0, 1 do + for zi = 0, 1 do + local vi = a:index(clust_x + xi, clust_y + yi, clust_z + zi) + if data[vi] == c_air or data[vi] == c_ignore then + if is_apple_tree and random(1, 8) == 1 then + data[vi] = c_apple + else + data[vi] = leaves_cid + end + end + end + end + end + end +end + + +-- Apple tree + +function default.grow_tree(pos, is_apple_tree, bad) + --[[ + NOTE: Tree-placing code is currently duplicated in the engine + and in games that have saplings; both are deprecated but not + replaced yet + --]] + if bad then + error("Deprecated use of default.grow_tree") + end + + local x, y, z = pos.x, pos.y, pos.z + local height = random(4, 5) + local c_tree = minetest.get_content_id("default:tree") + local c_leaves = minetest.get_content_id("default:leaves") + + local vm = minetest.get_voxel_manip() + local minp, maxp = vm:read_from_map( + {x = x - 2, y = y, z = z - 2}, + {x = x + 2, y = y + height + 1, z = z + 2} + ) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm:get_data() + + add_trunk_and_leaves(data, a, pos, c_tree, c_leaves, height, 2, 8, is_apple_tree) + + vm:set_data(data) + vm:write_to_map() + vm:update_map() +end + + +-- Jungle tree + +function default.grow_jungle_tree(pos, bad) + --[[ + NOTE: Jungletree-placing code is currently duplicated in the engine + and in games that have saplings; both are deprecated but not + replaced yet + --]] + if bad then + error("Deprecated use of default.grow_jungle_tree") + end + + local x, y, z = pos.x, pos.y, pos.z + local height = random(8, 12) + local c_air = minetest.get_content_id("air") + local c_ignore = minetest.get_content_id("ignore") + local c_jungletree = minetest.get_content_id("default:jungletree") + local c_jungleleaves = minetest.get_content_id("default:jungleleaves") + + local vm = minetest.get_voxel_manip() + local minp, maxp = vm:read_from_map( + {x = x - 3, y = y - 1, z = z - 3}, + {x = x + 3, y = y + height + 1, z = z + 3} + ) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm:get_data() + + add_trunk_and_leaves(data, a, pos, c_jungletree, c_jungleleaves, + height, 3, 30, false) + + -- Roots + for z_dist = -1, 1 do + local vi_1 = a:index(x - 1, y - 1, z + z_dist) + local vi_2 = a:index(x - 1, y, z + z_dist) + for x_dist = -1, 1 do + if random(1, 3) >= 2 then + if data[vi_1] == c_air or data[vi_1] == c_ignore then + data[vi_1] = c_jungletree + elseif data[vi_2] == c_air or data[vi_2] == c_ignore then + data[vi_2] = c_jungletree + end + end + vi_1 = vi_1 + 1 + vi_2 = vi_2 + 1 + end + end + + vm:set_data(data) + vm:write_to_map() + vm:update_map() +end + + +-- Pine tree from mg mapgen mod, design by sfan5, pointy top added by paramat + +local function add_pine_needles(data, vi, c_air, c_ignore, c_snow, c_pine_needles) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore or node_id == c_snow then + data[vi] = c_pine_needles + end +end + +local function add_snow(data, vi, c_air, c_ignore, c_snow) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore then + data[vi] = c_snow + end +end + +function default.grow_pine_tree(pos, snow) + local x, y, z = pos.x, pos.y, pos.z + local maxy = y + random(9, 13) -- Trunk top + + local c_air = minetest.get_content_id("air") + local c_ignore = minetest.get_content_id("ignore") + local c_pine_tree = minetest.get_content_id("default:pine_tree") + local c_pine_needles = minetest.get_content_id("default:pine_needles") + local c_snow = minetest.get_content_id("default:snow") + + local vm = minetest.get_voxel_manip() + local minp, maxp = vm:read_from_map( + {x = x - 3, y = y, z = z - 3}, + {x = x + 3, y = maxy + 3, z = z + 3} + ) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm:get_data() + + -- Upper branches layer + local dev = 3 + for yy = maxy - 1, maxy + 1 do + for zz = z - dev, z + dev do + local vi = a:index(x - dev, yy, zz) + local via = a:index(x - dev, yy + 1, zz) + for xx = x - dev, x + dev do + if random() < 0.95 - dev * 0.05 then + add_pine_needles(data, vi, c_air, c_ignore, c_snow, + c_pine_needles) + if snow then + add_snow(data, via, c_air, c_ignore, c_snow) + end + end + vi = vi + 1 + via = via + 1 + end + end + dev = dev - 1 + end + + -- Centre top nodes + add_pine_needles(data, a:index(x, maxy + 1, z), c_air, c_ignore, c_snow, + c_pine_needles) + add_pine_needles(data, a:index(x, maxy + 2, z), c_air, c_ignore, c_snow, + c_pine_needles) -- Paramat added a pointy top node + if snow then + add_snow(data, a:index(x, maxy + 3, z), c_air, c_ignore, c_snow) + end + + -- Lower branches layer + local my = 0 + for i = 1, 20 do -- Random 2x2 squares of needles + local xi = x + random(-3, 2) + local yy = maxy + random(-6, -5) + local zi = z + random(-3, 2) + if yy > my then + my = yy + end + for zz = zi, zi+1 do + local vi = a:index(xi, yy, zz) + local via = a:index(xi, yy + 1, zz) + for xx = xi, xi + 1 do + add_pine_needles(data, vi, c_air, c_ignore, c_snow, + c_pine_needles) + if snow then + add_snow(data, via, c_air, c_ignore, c_snow) + end + vi = vi + 1 + via = via + 1 + end + end + end + + dev = 2 + for yy = my + 1, my + 2 do + for zz = z - dev, z + dev do + local vi = a:index(x - dev, yy, zz) + local via = a:index(x - dev, yy + 1, zz) + for xx = x - dev, x + dev do + if random() < 0.95 - dev * 0.05 then + add_pine_needles(data, vi, c_air, c_ignore, c_snow, + c_pine_needles) + if snow then + add_snow(data, via, c_air, c_ignore, c_snow) + end + end + vi = vi + 1 + via = via + 1 + end + end + dev = dev - 1 + end + + -- Trunk + -- Force-place lowest trunk node to replace sapling + data[a:index(x, y, z)] = c_pine_tree + for yy = y + 1, maxy do + local vi = a:index(x, yy, z) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore or + node_id == c_pine_needles or node_id == c_snow then + data[vi] = c_pine_tree + end + end + + vm:set_data(data) + vm:write_to_map() + vm:update_map() +end + + +-- New apple tree + +function default.grow_new_apple_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/apple_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 3, y = pos.y - 1, z = pos.z - 3}, + path, "random", nil, false) +end + + +-- New jungle tree + +function default.grow_new_jungle_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/jungle_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "random", nil, false) +end + + +-- New emergent jungle tree + +function default.grow_new_emergent_jungle_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/emergent_jungle_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 3, y = pos.y - 5, z = pos.z - 3}, + path, "random", nil, false) +end + + +-- New pine tree + +function default.grow_new_pine_tree(pos) + local path + if math.random() > 0.5 then + path = minetest.get_modpath("default") .. + "/schematics/pine_tree_from_sapling.mts" + else + path = minetest.get_modpath("default") .. + "/schematics/small_pine_tree_from_sapling.mts" + end + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "0", nil, false) +end + + +-- New snowy pine tree + +function default.grow_new_snowy_pine_tree(pos) + local path + if math.random() > 0.5 then + path = minetest.get_modpath("default") .. + "/schematics/snowy_pine_tree_from_sapling.mts" + else + path = minetest.get_modpath("default") .. + "/schematics/snowy_small_pine_tree_from_sapling.mts" + end + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "random", nil, false) +end + + +-- New acacia tree + +function default.grow_new_acacia_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/acacia_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, + path, "random", nil, false) +end + + +-- New aspen tree + +function default.grow_new_aspen_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/aspen_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "0", nil, false) +end + + +-- Bushes do not need 'from sapling' schematic variants because +-- only the stem node is force-placed in the schematic. + +-- Bush + +function default.grow_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, + path, "0", nil, false) +end + +-- Blueberry bush + +function default.grow_blueberry_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/blueberry_bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y, z = pos.z - 1}, + path, "0", nil, false) +end + + +-- Acacia bush + +function default.grow_acacia_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/acacia_bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, + path, "0", nil, false) +end + + +-- Pine bush + +function default.grow_pine_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/pine_bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, + path, "0", nil, false) +end + + +-- Large cactus + +function default.grow_large_cactus(pos) + local path = minetest.get_modpath("default") .. + "/schematics/large_cactus.mts" + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "random", nil, false) +end + + +-- +-- Sapling 'on place' function to check protection of node and resulting tree volume +-- + +function default.sapling_on_place(itemstack, placer, pointed_thing, + sapling_name, minp_relative, maxp_relative, interval) + -- Position of sapling + local pos = pointed_thing.under + local node = minetest.get_node_or_nil(pos) + local pdef = node and minetest.registered_nodes[node.name] + + if pdef and pdef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return pdef.on_rightclick(pos, node, placer, itemstack, pointed_thing) + end + + if not pdef or not pdef.buildable_to then + pos = pointed_thing.above + node = minetest.get_node_or_nil(pos) + pdef = node and minetest.registered_nodes[node.name] + if not pdef or not pdef.buildable_to then + return itemstack + end + end + + local player_name = placer and placer:get_player_name() or "" + -- Check sapling position for protection + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + return itemstack + end + -- Check tree volume for protection + if minetest.is_area_protected( + vector.add(pos, minp_relative), + vector.add(pos, maxp_relative), + player_name, + interval) then + minetest.record_protection_violation(pos, player_name) + -- Print extra information to explain +-- minetest.chat_send_player(player_name, +-- itemstack:get_definition().description .. " will intersect protection " .. +-- "on growth") + minetest.chat_send_player(player_name, + S("@1 will intersect protection on growth.", + itemstack:get_definition().description)) + return itemstack + end + + minetest.log("action", player_name .. " places node " + .. sapling_name .. " at " .. minetest.pos_to_string(pos)) + + local take_item = not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) + local newnode = {name = sapling_name} + local ndef = minetest.registered_nodes[sapling_name] + minetest.set_node(pos, newnode) + + -- Run callback + if ndef and ndef.after_place_node then + -- Deepcopy place_to and pointed_thing because callback can modify it + if ndef.after_place_node(table.copy(pos), placer, + itemstack, table.copy(pointed_thing)) then + take_item = false + end + end + + -- Run script hook + for _, callback in ipairs(minetest.registered_on_placenodes) do + -- Deepcopy pos, node and pointed_thing because callback can modify them + if callback(table.copy(pos), table.copy(newnode), + placer, table.copy(node or {}), + itemstack, table.copy(pointed_thing)) then + take_item = false + end + end + + if take_item then + itemstack:take_item() + end + + return itemstack +end diff --git a/mods/doors/README.txt b/mods/doors/README.txt new file mode 100644 index 0000000..f9caaff --- /dev/null +++ b/mods/doors/README.txt @@ -0,0 +1,87 @@ +Minetest Game mod: doors +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) + +Modified by BlockMen (MIT): Added sounds, glass doors (glass, obsidian glass) and trapdoor. + +Modified by sofar (sofar@foo-projects.org) (MIT): +Added Steel trapdoor. +Re-implemented most of the door algorithms, added meshes, UV wrapped texture. +Added doors API to facilitate coding mods accessing and operating doors. +Added Fence Gate model, code, and sounds. + +Various Minetest developers and contributors (MIT) + + +Authors of media (textures) +--------------------------- +Following textures created by Fernando Zapata (CC BY-SA 3.0): + door_wood.png + door_wood_a.png + door_wood_a_r.png + door_wood_b.png + door_wood_b_r.png + +Following textures created by BlockMen (CC BY-SA 3.0): + door_trapdoor.png + door_obsidian_glass_side.png + +Following textures created by celeron55 (CC BY-SA 3.0): + door_glass_a.png + door_glass_b.png + +Following textures created by PenguinDad (CC BY-SA 4.0): + door_glass.png + door_obsidian_glass.png + +Following textures created by sofar (CC-BY-SA-3.0): + doors_trapdoor_steel.png + +Following textures created by paramat (CC-BY-SA-3.0): + door_trapdoor_side.png + doors_trapdoor_steel_side.png + +Obsidian door textures by red-001 based on textures by Pilzadam and BlockMen (CC BY-SA 3.0): + door_obsidian_glass.png + +Glass door textures by Krock and paramat based on textures by VanessaE (CC BY-SA 3.0): + doors_door_glass.png + doors_item_glass.png + +All other textures (created by PilzAdam) (CC BY-SA 3.0): + +Door textures were converted to the new texture map by sofar, paramat and +red-001, under the same license as the originals. + + +Authors of media (models) +------------------------- +Door 3d models by sofar (CC-BY-SA-3.0) + - door_a.obj + - door_b.obj +Fence gate models by sofar (CC-BY-SA-3.0) + - fencegate_open.obj + - fencegate_closed.obj + + +Authors of media (sounds) +------------------------- +Opening-Sound created by CGEffex (CC BY 3.0), modified by BlockMen + door_open.ogg +Closing-Sound created by bennstir (CC BY 3.0) + door_close.ogg +fencegate_open.ogg: + http://www.freesound.org/people/mhtaylor67/sounds/126041/ - (CC0 1.0) +fencegate_close.ogg: + http://www.freesound.org/people/BarkersPinhead/sounds/274807/ - (CC-BY-3.0) + http://www.freesound.org/people/rivernile7/sounds/249573/ - (CC-BY-3.0) +Steel door sounds open & close (CC-BY-3.0) by HazMatt + - http://www.freesound.org/people/HazMattt/sounds/187283/ + doors_steel_door_open.ogg + doors_steel_door_close.ogg +doors_glass_door_open.ogg, doors_glass_door_close.ogg: + https://www.freesound.org/people/SkeetMasterFunk69/sounds/235546/ (CC0 1.0) diff --git a/mods/doors/init.lua b/mods/doors/init.lua new file mode 100644 index 0000000..848725d --- /dev/null +++ b/mods/doors/init.lua @@ -0,0 +1,884 @@ +-- doors/init.lua + +-- our API object +doors = {} + +doors.registered_doors = {} +doors.registered_trapdoors = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("doors") + + +local function replace_old_owner_information(pos) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("doors_owner") + if owner and owner ~= "" then + meta:set_string("owner", owner) + meta:set_string("doors_owner", "") + end +end + +-- returns an object to a door object or nil +function doors.get(pos) + local node_name = minetest.get_node(pos).name + if doors.registered_doors[node_name] then + -- A normal upright door + return { + pos = pos, + open = function(self, player) + if self:state() then + return false + end + return doors.door_toggle(self.pos, nil, player) + end, + close = function(self, player) + if not self:state() then + return false + end + return doors.door_toggle(self.pos, nil, player) + end, + toggle = function(self, player) + return doors.door_toggle(self.pos, nil, player) + end, + state = function(self) + local state = minetest.get_meta(self.pos):get_int("state") + return state %2 == 1 + end + } + elseif doors.registered_trapdoors[node_name] then + -- A trapdoor + return { + pos = pos, + open = function(self, player) + if self:state() then + return false + end + return doors.trapdoor_toggle(self.pos, nil, player) + end, + close = function(self, player) + if not self:state() then + return false + end + return doors.trapdoor_toggle(self.pos, nil, player) + end, + toggle = function(self, player) + return doors.trapdoor_toggle(self.pos, nil, player) + end, + state = function(self) + return minetest.get_node(self.pos).name:sub(-5) == "_open" + end + } + else + return nil + end +end + +-- this hidden node is placed on top of the bottom, and prevents +-- nodes from being placed in the top half of the door. +minetest.register_node("doors:hidden", { + description = S("Hidden Door Segment"), + inventory_image = "doors_hidden_segment.png^default_invisible_node_overlay.png", + wield_image = "doors_hidden_segment.png^default_invisible_node_overlay.png", + drawtype = "airlike", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + -- has to be walkable for falling nodes to stop falling. + walkable = true, + pointable = false, + diggable = false, + buildable_to = false, + floodable = false, + drop = "", + groups = {not_in_creative_inventory = 1}, + on_blast = function() end, + -- 1px block inside door hinge near node top + collision_box = { + type = "fixed", + fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32}, + }, +}) + +-- table used to aid door opening/closing +local transform = { + { + {v = "_a", param2 = 3}, + {v = "_a", param2 = 0}, + {v = "_a", param2 = 1}, + {v = "_a", param2 = 2}, + }, + { + {v = "_c", param2 = 1}, + {v = "_c", param2 = 2}, + {v = "_c", param2 = 3}, + {v = "_c", param2 = 0}, + }, + { + {v = "_b", param2 = 1}, + {v = "_b", param2 = 2}, + {v = "_b", param2 = 3}, + {v = "_b", param2 = 0}, + }, + { + {v = "_d", param2 = 3}, + {v = "_d", param2 = 0}, + {v = "_d", param2 = 1}, + {v = "_d", param2 = 2}, + }, +} + +function doors.door_toggle(pos, node, clicker) + local meta = minetest.get_meta(pos) + node = node or minetest.get_node(pos) + local def = minetest.registered_nodes[node.name] + local name = def.door.name + + local state = meta:get_string("state") + if state == "" then + -- fix up lvm-placed right-hinged doors, default closed + if node.name:sub(-2) == "_b" then + state = 2 + else + state = 0 + end + else + state = tonumber(state) + end + + replace_old_owner_information(pos) + + if clicker and not default.can_interact_with_node(clicker, pos) then + return false + end + + -- until Lua-5.2 we have no bitwise operators :( + if state % 2 == 1 then + state = state - 1 + else + state = state + 1 + end + + local dir = node.param2 + + -- It's possible param2 is messed up, so, validate before using + -- the input data. This indicates something may have rotated + -- the door, even though that is not supported. + if not transform[state + 1] or not transform[state + 1][dir + 1] then + return false + end + + if state % 2 == 0 then + minetest.sound_play(def.door.sounds[1], + {pos = pos, gain = 0.3, max_hear_distance = 10}, true) + else + minetest.sound_play(def.door.sounds[2], + {pos = pos, gain = 0.3, max_hear_distance = 10}, true) + end + + minetest.swap_node(pos, { + name = name .. transform[state + 1][dir+1].v, + param2 = transform[state + 1][dir+1].param2 + }) + meta:set_int("state", state) + + return true +end + + +local function on_place_node(place_to, newnode, + placer, oldnode, itemstack, pointed_thing) + -- Run script hook + for _, callback in ipairs(minetest.registered_on_placenodes) do + -- Deepcopy pos, node and pointed_thing because callback can modify them + local place_to_copy = {x = place_to.x, y = place_to.y, z = place_to.z} + local newnode_copy = + {name = newnode.name, param1 = newnode.param1, param2 = newnode.param2} + local oldnode_copy = + {name = oldnode.name, param1 = oldnode.param1, param2 = oldnode.param2} + local pointed_thing_copy = { + type = pointed_thing.type, + above = vector.new(pointed_thing.above), + under = vector.new(pointed_thing.under), + ref = pointed_thing.ref, + } + callback(place_to_copy, newnode_copy, placer, + oldnode_copy, itemstack, pointed_thing_copy) + end +end + +local function can_dig_door(pos, digger) + replace_old_owner_information(pos) + return default.can_interact_with_node(digger, pos) +end + +function doors.register(name, def) + if not name:find(":") then + name = "doors:" .. name + end + + -- replace old doors of this type automatically + minetest.register_lbm({ + name = ":doors:replace_" .. name:gsub(":", "_"), + nodenames = {name.."_b_1", name.."_b_2"}, + action = function(pos, node) + local l = tonumber(node.name:sub(-1)) + local meta = minetest.get_meta(pos) + local h = meta:get_int("right") + 1 + local p2 = node.param2 + local replace = { + {{type = "a", state = 0}, {type = "a", state = 3}}, + {{type = "b", state = 1}, {type = "b", state = 2}} + } + local new = replace[l][h] + -- retain infotext and doors_owner fields + minetest.swap_node(pos, {name = name .. "_" .. new.type, param2 = p2}) + meta:set_int("state", new.state) + -- properly place doors:hidden at the right spot + local p3 = p2 + if new.state >= 2 then + p3 = (p3 + 3) % 4 + end + if new.state % 2 == 1 then + if new.state >= 2 then + p3 = (p3 + 1) % 4 + else + p3 = (p3 + 3) % 4 + end + end + -- wipe meta on top node as it's unused + minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, + {name = "doors:hidden", param2 = p3}) + end + }) + + minetest.register_craftitem(":" .. name, { + description = def.description, + inventory_image = def.inventory_image, + groups = table.copy(def.groups), + + on_place = function(itemstack, placer, pointed_thing) + local pos + + if not pointed_thing.type == "node" then + return itemstack + end + + local node = minetest.get_node(pointed_thing.under) + local pdef = minetest.registered_nodes[node.name] + if pdef and pdef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return pdef.on_rightclick(pointed_thing.under, + node, placer, itemstack, pointed_thing) + end + + if pdef and pdef.buildable_to then + pos = pointed_thing.under + else + pos = pointed_thing.above + node = minetest.get_node(pos) + pdef = minetest.registered_nodes[node.name] + if not pdef or not pdef.buildable_to then + return itemstack + end + end + + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + local top_node = minetest.get_node_or_nil(above) + local topdef = top_node and minetest.registered_nodes[top_node.name] + + if not topdef or not topdef.buildable_to then + return itemstack + end + + local pn = placer and placer:get_player_name() or "" + if minetest.is_protected(pos, pn) or minetest.is_protected(above, pn) then + return itemstack + end + + local dir = placer and minetest.dir_to_facedir(placer:get_look_dir()) or 0 + + local ref = { + {x = -1, y = 0, z = 0}, + {x = 0, y = 0, z = 1}, + {x = 1, y = 0, z = 0}, + {x = 0, y = 0, z = -1}, + } + + local aside = { + x = pos.x + ref[dir + 1].x, + y = pos.y + ref[dir + 1].y, + z = pos.z + ref[dir + 1].z, + } + + local state = 0 + if minetest.get_item_group(minetest.get_node(aside).name, "door") == 1 then + state = state + 2 + minetest.set_node(pos, {name = name .. "_b", param2 = dir}) + minetest.set_node(above, {name = "doors:hidden", param2 = (dir + 3) % 4}) + else + minetest.set_node(pos, {name = name .. "_a", param2 = dir}) + minetest.set_node(above, {name = "doors:hidden", param2 = dir}) + end + + local meta = minetest.get_meta(pos) + meta:set_int("state", state) + + if def.protected then + meta:set_string("owner", pn) + meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn)) + end + + if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then + itemstack:take_item() + end + + minetest.sound_play(def.sounds.place, {pos = pos}, true) + + on_place_node(pos, minetest.get_node(pos), + placer, node, itemstack, pointed_thing) + + return itemstack + end + }) + def.inventory_image = nil + + if def.recipe then + minetest.register_craft({ + output = name, + recipe = def.recipe, + }) + end + def.recipe = nil + + if not def.sounds then + def.sounds = default.node_sound_wood_defaults() + end + + if not def.sound_open then + def.sound_open = "doors_door_open" + end + + if not def.sound_close then + def.sound_close = "doors_door_close" + end + + def.groups.not_in_creative_inventory = 1 + def.groups.door = 1 + def.drop = name + def.door = { + name = name, + sounds = { def.sound_close, def.sound_open }, + } + if not def.on_rightclick then + def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + doors.door_toggle(pos, node, clicker) + return itemstack + end + end + def.after_dig_node = function(pos, node, meta, digger) + minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + minetest.check_for_falling({x = pos.x, y = pos.y + 1, z = pos.z}) + end + def.on_rotate = function(pos, node, user, mode, new_param2) + return false + end + + if def.protected then + def.can_dig = can_dig_door + def.on_blast = function() end + def.on_key_use = function(pos, player) + local door = doors.get(pos) + door:toggle(player) + end + def.on_skeleton_key_use = function(pos, player, newsecret) + replace_old_owner_information(pos) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + local pname = player:get_player_name() + + -- verify placer is owner of lockable door + if owner ~= pname then + minetest.record_protection_violation(pos, pname) + minetest.chat_send_player(pname, S("You do not own this locked door.")) + return nil + end + + local secret = meta:get_string("key_lock_secret") + if secret == "" then + secret = newsecret + meta:set_string("key_lock_secret", secret) + end + + return secret, S("a locked door"), owner + end + def.node_dig_prediction = "" + else + def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + -- hidden node doesn't get blasted away. + minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + return {name} + end + end + + def.on_destruct = function(pos) + minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + end + + def.drawtype = "mesh" + def.paramtype = "light" + def.paramtype2 = "facedir" + def.sunlight_propagates = true + def.walkable = true + def.is_ground_content = false + def.buildable_to = false + def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}} + def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}} + + def.mesh = "door_a.obj" + minetest.register_node(":" .. name .. "_a", def) + + def.mesh = "door_b.obj" + minetest.register_node(":" .. name .. "_b", def) + + def.mesh = "door_a2.obj" + minetest.register_node(":" .. name .. "_c", def) + + def.mesh = "door_b2.obj" + minetest.register_node(":" .. name .. "_d", def) + + doors.registered_doors[name .. "_a"] = true + doors.registered_doors[name .. "_b"] = true + doors.registered_doors[name .. "_c"] = true + doors.registered_doors[name .. "_d"] = true +end + +doors.register("door_wood", { + tiles = {{ name = "doors_door_wood.png", backface_culling = true }}, + description = S("Wooden Door"), + inventory_image = "doors_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"}, + } +}) + +doors.register("door_steel", { + tiles = {{name = "doors_door_steel.png", backface_culling = true}}, + description = S("Steel Door"), + inventory_image = "doors_item_steel.png", + protected = true, + groups = {node = 1, cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + recipe = { + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"}, + } +}) + +doors.register("door_glass", { + tiles = {"doors_door_glass.png"}, + description = S("Glass Door"), + inventory_image = "doors_item_glass.png", + groups = {node = 1, cracky=3, oddly_breakable_by_hand=3}, + sounds = default.node_sound_glass_defaults(), + sound_open = "doors_glass_door_open", + sound_close = "doors_glass_door_close", + recipe = { + {"default:glass", "default:glass"}, + {"default:glass", "default:glass"}, + {"default:glass", "default:glass"}, + } +}) + +doors.register("door_obsidian_glass", { + tiles = {"doors_door_obsidian_glass.png"}, + description = S("Obsidian Glass Door"), + inventory_image = "doors_item_obsidian_glass.png", + groups = {node = 1, cracky=3}, + sounds = default.node_sound_glass_defaults(), + sound_open = "doors_glass_door_open", + sound_close = "doors_glass_door_close", + recipe = { + {"default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass"}, + }, +}) + +-- Capture mods using the old API as best as possible. +function doors.register_door(name, def) + if def.only_placer_can_open then + def.protected = true + end + def.only_placer_can_open = nil + + local i = name:find(":") + local modname = name:sub(1, i - 1) + if not def.tiles then + if def.protected then + def.tiles = {{name = "doors_door_steel.png", backface_culling = true}} + else + def.tiles = {{name = "doors_door_wood.png", backface_culling = true}} + end + minetest.log("warning", modname .. " registered door \"" .. name .. "\" " .. + "using deprecated API method \"doors.register_door()\" but " .. + "did not provide the \"tiles\" parameter. A fallback tiledef " .. + "will be used instead.") + end + + doors.register(name, def) +end + +----trapdoor---- + +function doors.trapdoor_toggle(pos, node, clicker) + node = node or minetest.get_node(pos) + + replace_old_owner_information(pos) + + if clicker and not default.can_interact_with_node(clicker, pos) then + return false + end + + local def = minetest.registered_nodes[node.name] + + if string.sub(node.name, -5) == "_open" then + minetest.sound_play(def.sound_close, + {pos = pos, gain = 0.3, max_hear_distance = 10}, true) + minetest.swap_node(pos, {name = string.sub(node.name, 1, + string.len(node.name) - 5), param1 = node.param1, param2 = node.param2}) + else + minetest.sound_play(def.sound_open, + {pos = pos, gain = 0.3, max_hear_distance = 10}, true) + minetest.swap_node(pos, {name = node.name .. "_open", + param1 = node.param1, param2 = node.param2}) + end +end + +function doors.register_trapdoor(name, def) + if not name:find(":") then + name = "doors:" .. name + end + + local name_closed = name + local name_opened = name.."_open" + + def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + doors.trapdoor_toggle(pos, node, clicker) + return itemstack + end + + -- Common trapdoor configuration + def.drawtype = "nodebox" + def.paramtype = "light" + def.paramtype2 = "facedir" + def.is_ground_content = false + + if def.protected then + def.can_dig = can_dig_door + def.after_place_node = function(pos, placer, itemstack, pointed_thing) + local pn = placer:get_player_name() + local meta = minetest.get_meta(pos) + meta:set_string("owner", pn) + meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn)) + + return (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) + end + + def.on_blast = function() end + def.on_key_use = function(pos, player) + local door = doors.get(pos) + door:toggle(player) + end + def.on_skeleton_key_use = function(pos, player, newsecret) + replace_old_owner_information(pos) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + local pname = player:get_player_name() + + -- verify placer is owner of lockable door + if owner ~= pname then + minetest.record_protection_violation(pos, pname) + minetest.chat_send_player(pname, S("You do not own this trapdoor.")) + return nil + end + + local secret = meta:get_string("key_lock_secret") + if secret == "" then + secret = newsecret + meta:set_string("key_lock_secret", secret) + end + + return secret, S("a locked trapdoor"), owner + end + def.node_dig_prediction = "" + else + def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + return {name} + end + end + + if not def.sounds then + def.sounds = default.node_sound_wood_defaults() + end + + if not def.sound_open then + def.sound_open = "doors_door_open" + end + + if not def.sound_close then + def.sound_close = "doors_door_close" + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_closed.node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5} + } + def_closed.selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5} + } + def_closed.tiles = { + def.tile_front, + def.tile_front .. '^[transformFY', + def.tile_side, + def.tile_side, + def.tile_side, + def.tile_side + } + + def_opened.node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5} + } + def_opened.selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5} + } + def_opened.tiles = { + def.tile_side, + def.tile_side .. '^[transform2', + def.tile_side .. '^[transform3', + def.tile_side .. '^[transform1', + def.tile_front .. '^[transform46', + def.tile_front .. '^[transform6' + } + + def_opened.drop = name_closed + def_opened.groups.not_in_creative_inventory = 1 + + minetest.register_node(name_opened, def_opened) + minetest.register_node(name_closed, def_closed) + + doors.registered_trapdoors[name_opened] = true + doors.registered_trapdoors[name_closed] = true +end + +doors.register_trapdoor("doors:trapdoor", { + description = S("Wooden Trapdoor"), + inventory_image = "doors_trapdoor.png", + wield_image = "doors_trapdoor.png", + tile_front = "doors_trapdoor.png", + tile_side = "doors_trapdoor_side.png", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1}, +}) + +doors.register_trapdoor("doors:trapdoor_steel", { + description = S("Steel Trapdoor"), + inventory_image = "doors_trapdoor_steel.png", + wield_image = "doors_trapdoor_steel.png", + tile_front = "doors_trapdoor_steel.png", + tile_side = "doors_trapdoor_steel_side.png", + protected = true, + sounds = default.node_sound_metal_defaults(), + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + groups = {cracky = 1, level = 2, door = 1}, +}) + +minetest.register_craft({ + output = "doors:trapdoor 2", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "doors:trapdoor_steel", + recipe = { + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"}, + } +}) + + +----fence gate---- +local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0 + +function doors.register_fencegate(name, def) + local fence = { + description = def.description, + drawtype = "mesh", + tiles = {}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + is_ground_content = false, + drop = name .. "_closed", + connect_sides = {"left", "right"}, + groups = def.groups, + sounds = def.sounds, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + local node_def = minetest.registered_nodes[node.name] + minetest.swap_node(pos, {name = node_def.gate, param2 = node.param2}) + minetest.sound_play(node_def.sound, {pos = pos, gain = 0.3, + max_hear_distance = 8}, true) + return itemstack + end, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4} + }, + } + + + if type(def.texture) == "string" then + fence.tiles[1] = {name = def.texture, backface_culling = true} + elseif def.texture.backface_culling == nil then + fence.tiles[1] = table.copy(def.texture) + fence.tiles[1].backface_culling = true + else + fence.tiles[1] = def.texture + end + + if not fence.sounds then + fence.sounds = default.node_sound_wood_defaults() + end + + fence.groups.fence = 1 + + local fence_closed = table.copy(fence) + fence_closed.mesh = "doors_fencegate_closed.obj" + fence_closed.gate = name .. "_open" + fence_closed.sound = "doors_fencegate_open" + fence_closed.collision_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8} + } + + local fence_open = table.copy(fence) + fence_open.mesh = "doors_fencegate_open.obj" + fence_open.gate = name .. "_closed" + fence_open.sound = "doors_fencegate_close" + fence_open.groups.not_in_creative_inventory = 1 + fence_open.collision_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/8, -3/8, 1/2 + fence_collision_extra, 1/8}, + {-1/2, -3/8, -1/2, -3/8, 3/8, 0 }} + } + + minetest.register_node(":" .. name .. "_closed", fence_closed) + minetest.register_node(":" .. name .. "_open", fence_open) + + minetest.register_craft({ + output = name .. "_closed", + recipe = { + {"group:stick", def.material, "group:stick"}, + {"group:stick", def.material, "group:stick"} + } + }) +end + +doors.register_fencegate("doors:gate_wood", { + description = S("Apple Wood Fence Gate"), + texture = "default_wood.png", + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +doors.register_fencegate("doors:gate_acacia_wood", { + description = S("Acacia Wood Fence Gate"), + texture = "default_acacia_wood.png", + material = "default:acacia_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +doors.register_fencegate("doors:gate_junglewood", { + description = S("Jungle Wood Fence Gate"), + texture = "default_junglewood.png", + material = "default:junglewood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +doors.register_fencegate("doors:gate_pine_wood", { + description = S("Pine Wood Fence Gate"), + texture = "default_pine_wood.png", + material = "default:pine_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} +}) + +doors.register_fencegate("doors:gate_aspen_wood", { + description = S("Aspen Wood Fence Gate"), + texture = "default_aspen_wood.png", + material = "default:aspen_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} +}) + + +----fuels---- + +minetest.register_craft({ + type = "fuel", + recipe = "doors:trapdoor", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:door_wood", + burntime = 14, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_wood_closed", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_acacia_wood_closed", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_junglewood_closed", + burntime = 9, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_pine_wood_closed", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_aspen_wood_closed", + burntime = 5, +}) diff --git a/mods/doors/license.txt b/mods/doors/license.txt new file mode 100644 index 0000000..8ce73c4 --- /dev/null +++ b/mods/doors/license.txt @@ -0,0 +1,164 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2015-2016 sofar (sofar@foo-projects.org) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2011-2016 Fernando Zapata +Copyright (C) 2014-2016 celeron55 +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2015-2016 sofar +Copyright (C) 2016 red-001 +Copyright (C) 2016 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +Copyright (C) 2014-2016 PenguinDad + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/4.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) +Copyright (C) 2014 CGEffex +Copyright (C) 2014 bennstir +Copyright (C) 2016 BarkersPinhead +Copyright (C) 2016 rivernile7 +Copyright (C) 2016 HazMatt + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +mhtaylor67 +SkeetMasterFunk69 + +No Copyright + +The person who associated a work with this deed has dedicated the work to the public +domain by waiving all of his or her rights to the work worldwide under copyright law, +including all related and neighboring rights, to the extent allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial purposes, all +without asking permission. See Other Information below. + +Other Information + +In no way are the patent or trademark rights of any person affected by CC0, nor are the +rights that other persons may have in the work or in how the work is used, such as +publicity or privacy rights. +Unless expressly stated otherwise, the person who associated a work with this deed makes +no warranties about the work, and disclaims liability for all uses of the work, to the +fullest extent permitted by applicable law. +When using or citing the work, you should not imply endorsement by the author or the +affirmer. + +For more details: +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/mods/doors/locale/doors.de.tr b/mods/doors/locale/doors.de.tr new file mode 100644 index 0000000..79707ce --- /dev/null +++ b/mods/doors/locale/doors.de.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Verborgenes Türsegment +Owned by @1=Eigentum von @1 +You do not own this locked door.=Diese abgeschlossene Tür gehört Ihnen nicht. +a locked door=eine abgeschlossene Tür +Wooden Door=Holztür +Steel Door=Stahltür +Glass Door=Glastür +Obsidian Glass Door=Obsidianglastür +You do not own this trapdoor.=Diese Falltür gehört Ihnen nicht. +a locked trapdoor=eine abgeschlossene Falltür +Wooden Trapdoor=Holzfalltür +Steel Trapdoor=Stahlfalltür +Apple Wood Fence Gate=Apfelholzzauntor +Acacia Wood Fence Gate=Akazienholzzauntor +Jungle Wood Fence Gate=Dschungelholzzauntor +Pine Wood Fence Gate=Kiefernholzzauntor +Aspen Wood Fence Gate=Espenholzzauntor diff --git a/mods/doors/locale/doors.es.tr b/mods/doors/locale/doors.es.tr new file mode 100644 index 0000000..677f2df --- /dev/null +++ b/mods/doors/locale/doors.es.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segmento de puerta oculta +Owned by @1=Propiedad de @1 +You do not own this locked door.=Esta puerta cerrada no te pertenece. +a locked door=una puerta cerrada +Wooden Door=Puerta de madera +Steel Door=Puerta de acero +Glass Door=Puerta de vidrio +Obsidian Glass Door=Puerta de vidrio de obsidiana +You do not own this trapdoor.=Esta trampilla no te pertenece. +a locked trapdoor=una trampilla cerrada +Wooden Trapdoor=Trampilla de madera +Steel Trapdoor=Trampilla de acero +Apple Wood Fence Gate=Puerta de cerca de manzano +Acacia Wood Fence Gate=Puerta de cerca de acacia +Jungle Wood Fence Gate=Puerta de cerca de madera tropical +Pine Wood Fence Gate=Puerta de cerca de pino +Aspen Wood Fence Gate=Puerta de cerca de álamo diff --git a/mods/doors/locale/doors.fr.tr b/mods/doors/locale/doors.fr.tr new file mode 100644 index 0000000..930f75c --- /dev/null +++ b/mods/doors/locale/doors.fr.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segment de porte cachée +Owned by @1=Possédée par @1 +You do not own this locked door.=Cette porte vérouillée ne vous appartient pas. +a locked door=une porte verouillée +Wooden Door=Porte en bois +Steel Door=Porte en acier +Glass Door=Porte en verre +Obsidian Glass Door=Porte en verre d'obsidienne +You do not own this trapdoor.=Vous ne possédez pas cette trappe. +a locked trapdoor=une trappe verouillée +Wooden Trapdoor=Trappe en bois +Steel Trapdoor=Trappe en acier +Apple Wood Fence Gate=Porte de clôture en bois de pommier +Acacia Wood Fence Gate=Porte de clôture en bois d'acacia +Jungle Wood Fence Gate=Porte de clôture en bois de la jungle +Pine Wood Fence Gate=Porte de clôture en bois de pin +Aspen Wood Fence Gate=Porte de clôture en bois de tremble diff --git a/mods/doors/locale/doors.id.tr b/mods/doors/locale/doors.id.tr new file mode 100644 index 0000000..3b74904 --- /dev/null +++ b/mods/doors/locale/doors.id.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Bagian Pintu Tersembunyi +Owned by @1=Milik @1 +You do not own this locked door.=Anda bukan pemilik pintu terkunci ini. +a locked door=pintu terkunci +Wooden Door=Pintu Kayu +Steel Door=Pintu Baja +Glass Door=Pintu Kaca +Obsidian Glass Door=Pintu Kaca Obsidian +You do not own this trapdoor.=Anda bukan pemilik pintu kolong ini. +a locked trapdoor=pintu kolong terkunci +Wooden Trapdoor=Pintu Kolong Kayu +Steel Trapdoor=Pintu Kolong Baja +Apple Wood Fence Gate=Gerbang Kayu Pohon Apel +Acacia Wood Fence Gate=Gerbang Kayu Akasia +Jungle Wood Fence Gate=Gerbang Kayu Pohon Rimba +Pine Wood Fence Gate=Gerbang Kayu Pinus +Aspen Wood Fence Gate=Gerbang Kayu Aspen diff --git a/mods/doors/locale/doors.it.tr b/mods/doors/locale/doors.it.tr new file mode 100644 index 0000000..4a9599d --- /dev/null +++ b/mods/doors/locale/doors.it.tr @@ -0,0 +1,19 @@ +# textdomain: doors +Hidden Door Segment=Segmento di porta nascosto +Owned by @1=Di proprietà di @1 +You do not own this locked door.=Non sei il proprietario di questa porta chiusa a chiave. +a locked door=una porta chiusa a chiave +Wooden Door=Porta di legno +Steel Door=Porta d'acciaio +Glass Door=Porta di vetro +Obsidian Glass Door=Porta di vetro d'ossidiana +Owned by @1=Di proprietà di @1 +You do not own this trapdoor.=Non sei il proprietario di questa botola. +a locked trapdoor=una botola chiusa a chiave +Wooden Trapdoor=Botola di legno +Steel Trapdoor=Botola d'acciaio +Apple Wood Fence Gate=Cancello della recinzione di legno di melo +Acacia Wood Fence Gate=Cancello della recinzione di legno d'acacia +Jungle Wood Fence Gate=Cancello della recinzione di legno della giungla +Pine Wood Fence Gate=Cancello della recinzione di legno di pino +Aspen Wood Fence Gate=Cancello della recinzione di legno di pioppo diff --git a/mods/doors/locale/doors.ms.tr b/mods/doors/locale/doors.ms.tr new file mode 100644 index 0000000..93d6df2 --- /dev/null +++ b/mods/doors/locale/doors.ms.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segmen Pintu Tersembunyi +Owned by @1=Milik @1 +You do not own this locked door.=Anda bukan pemilik pintu berkunci ini. +a locked door=pintu berkunci +Wooden Door=Pintu Kayu +Steel Door=Pintu Keluli +Glass Door=Pintu Kaca +Obsidian Glass Door=Pintu Kaca Obsidia +You do not own this trapdoor.=Anda bukan pemilik pintu kolong ini. +a locked trapdoor=pintu kolong berkunci +Wooden Trapdoor=Pintu Kolong Kayu +Steel Trapdoor=Pintu Kolong Keluli +Apple Wood Fence Gate=Pintu Pagar Kayu Epal +Acacia Wood Fence Gate=Pintu Pagar Kayu Akasia +Jungle Wood Fence Gate=Pintu Pagar Kayu Hutan +Pine Wood Fence Gate=Pintu Pagar Kayu Pain +Aspen Wood Fence Gate=Pintu Pagar Kayu Aspen diff --git a/mods/doors/locale/doors.ru.tr b/mods/doors/locale/doors.ru.tr new file mode 100644 index 0000000..dc5c3c0 --- /dev/null +++ b/mods/doors/locale/doors.ru.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Спрятанная Часть Двери +Owned by @1=Владелец: @1 +You do not own this locked door.=Вы не владелец этой заблокированной двери. +a locked door=заблокированная дверь +Wooden Door=Деревянная Дверь +Steel Door=Стальная Дверь +Glass Door=Стеклянная Дверь +Obsidian Glass Door=Дверь Из Обсидианового Стекла +You do not own this trapdoor.=Вы не владелец этого люка. +a locked trapdoor=заблокированный люк +Wooden Trapdoor=Деревянный Люк +Steel Trapdoor=Стальной Люк +Apple Wood Fence Gate=Яблоневая Деревянная Калитка +Acacia Wood Fence Gate=Деревянная Калитка Из Акации +Jungle Wood Fence Gate=Деревянная Калитка Из Тропического Дерева +Pine Wood Fence Gate=Сосновая Деревянная Калитка +Aspen Wood Fence Gate=Осиновая Деревянная Калитка diff --git a/mods/doors/locale/doors.se.tr b/mods/doors/locale/doors.se.tr new file mode 100644 index 0000000..1ecbead --- /dev/null +++ b/mods/doors/locale/doors.se.tr @@ -0,0 +1,19 @@ +# textdomain: doors +Hidden Door Segment=Dold dörrsegment +Owned by @1=Ägd av @1 +You do not own this locked door.=Du äger inte denna låsta dörr. +a locked door=en låst dörr +Wooden Door=Trä Dörr +Steel Door=Stål Dörr +Glass Door=Glas Dörr +Obsidian Glass Door=Obsidian Glas Dörr +Owned by @1=Ägd av @1 +You do not own this trapdoor.=Du äger inte denna fallucka +a locked trapdoor=en låst fallucka +Wooden Trapdoor=Trä Fallucka +Steel Trapdoor=Stål Fallucka +Apple Wood Fence Gate=Äpple Trä Fallucka +Acacia Wood Fence Gate=Akacia Trä Fallucka +Jungle Wood Fence Gate=Djungel Trä Fallucka +Pine Wood Fence Gate=Tall Trä Fallucka +Aspen Wood Fence Gate=Asp Trä Fallucka \ No newline at end of file diff --git a/mods/doors/locale/doors.sk.tr b/mods/doors/locale/doors.sk.tr new file mode 100644 index 0000000..e6943ac --- /dev/null +++ b/mods/doors/locale/doors.sk.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Skrytá časť dverí +Owned by @1=Vlastník - @1 +You do not own this locked door.=Nevlastníš tieto uzamknuté dvere. +a locked door=uzamknuté dvere +Wooden Door=Drevené dvere +Steel Door=Oceľové dvere +Glass Door=Sklenené dvere +Obsidian Glass Door=Obsidiánové sklenené dvere +You do not own this trapdoor.=Nevlastníš tieto padacie dvere. +a locked trapdoor=uzamknuté padacie dvere +Wooden Trapdoor=Drevené padacie dvere +Steel Trapdoor=Oceľové padacie dvere +Apple Wood Fence Gate=Drevený plot z jablone +Acacia Wood Fence Gate=Drevený plot z akácie +Jungle Wood Fence Gate=Drevený plot z džungľového dreva +Pine Wood Fence Gate=Drevený plot z borovice +Aspen Wood Fence Gate=Drevený plot z osiky diff --git a/mods/doors/locale/doors.zh_CN.tr b/mods/doors/locale/doors.zh_CN.tr new file mode 100644 index 0000000..50f38c0 --- /dev/null +++ b/mods/doors/locale/doors.zh_CN.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=隐藏门段 +Owned by @1=由@1拥有 +You do not own this locked door.=这个门不属于你所有。 +a locked door=一扇已上锁的门 +Wooden Door=木门 +Steel Door=铁门 +Glass Door=玻璃门 +Obsidian Glass Door=黑曜石玻璃门 +You do not own this trapdoor.=这个活板门不属于你所有。 +a locked trapdoor=一扇已上锁的活板门 +Wooden Trapdoor=木活板门 +Steel Trapdoor=铁活板门 +Apple Wood Fence Gate=苹果木栅栏门 +Acacia Wood Fence Gate=相思木栅栏门 +Jungle Wood Fence Gate=丛林木栅栏门 +Pine Wood Fence Gate=松木栅栏门 +Aspen Wood Fence Gate=白杨木栅栏门 diff --git a/mods/doors/locale/doors.zh_TW.tr b/mods/doors/locale/doors.zh_TW.tr new file mode 100644 index 0000000..81e06fc --- /dev/null +++ b/mods/doors/locale/doors.zh_TW.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=隱藏門段 +Owned by @1=由@1擁有 +You do not own this locked door.=這個門不屬於你所有。 +a locked door=一扇已上鎖的門 +Wooden Door=木門 +Steel Door=鐵門 +Glass Door=玻璃門 +Obsidian Glass Door=黑曜石玻璃門 +You do not own this trapdoor.=這個活板門不屬於你所有。 +a locked trapdoor=一扇已上鎖的活板門 +Wooden Trapdoor=木活板門 +Steel Trapdoor=鐵活板門 +Apple Wood Fence Gate=蘋果木柵欄門 +Acacia Wood Fence Gate=相思木柵欄門 +Jungle Wood Fence Gate=叢林木柵欄門 +Pine Wood Fence Gate=松木柵欄門 +Aspen Wood Fence Gate=白楊木柵欄門 diff --git a/mods/doors/locale/template.txt b/mods/doors/locale/template.txt new file mode 100644 index 0000000..8b5c349 --- /dev/null +++ b/mods/doors/locale/template.txt @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment= +Owned by @1= +You do not own this locked door.= +a locked door= +Wooden Door= +Steel Door= +Glass Door= +Obsidian Glass Door= +You do not own this trapdoor.= +a locked trapdoor= +Wooden Trapdoor= +Steel Trapdoor= +Apple Wood Fence Gate= +Acacia Wood Fence Gate= +Jungle Wood Fence Gate= +Pine Wood Fence Gate= +Aspen Wood Fence Gate= diff --git a/mods/doors/mod.conf b/mods/doors/mod.conf new file mode 100644 index 0000000..de053c2 --- /dev/null +++ b/mods/doors/mod.conf @@ -0,0 +1,4 @@ +name = doors +description = Minetest Game mod: doors +depends = default +optional_depends = screwdriver diff --git a/mods/doors/models/door_a.obj b/mods/doors/models/door_a.obj new file mode 100644 index 0000000..7948f2f --- /dev/null +++ b/mods/doors/models/door_a.obj @@ -0,0 +1,40 @@ +# Blender v2.76 (sub 0) OBJ File: 'door_a.blend' +# www.blender.org +mtllib door_a.mtl +o door_a +v 0.499000 -0.499000 -0.499000 +v 0.499000 1.499000 -0.499000 +v 0.499000 -0.499000 -0.375000 +v 0.499000 1.499000 -0.375000 +v -0.499000 -0.499000 -0.499000 +v -0.499000 1.499000 -0.499000 +v -0.499000 -0.499000 -0.375000 +v -0.499000 1.499000 -0.375000 +vt 0.842105 1.000000 +vt 0.894737 1.000000 +vt 0.894737 0.000000 +vt 0.842105 0.000000 +vt 0.421053 1.000000 +vt 0.421053 0.000000 +vt 0.947368 1.000000 +vt 0.947368 0.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.500000 +vt 0.947368 0.500000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +usemtl None +s off +f 2/1/1 4/2/1 3/3/1 1/4/1 +f 4/5/2 8/1/2 7/4/2 3/6/2 +f 8/2/3 6/7/3 5/8/3 7/3/3 +f 6/9/4 2/5/4 1/6/4 5/10/4 +f 1/11/5 3/12/5 7/7/5 5/13/5 +f 6/14/6 8/8/6 4/12/6 2/11/6 diff --git a/mods/doors/models/door_a2.obj b/mods/doors/models/door_a2.obj new file mode 100644 index 0000000..3bedc20 --- /dev/null +++ b/mods/doors/models/door_a2.obj @@ -0,0 +1,50 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +mtllib door_a2.mtl +o door_a2 +v -0.499000 1.499000 -0.499000 +v -0.499000 -0.499000 -0.499000 +v -0.499000 -0.499000 -0.375000 +v -0.499000 1.499000 -0.375000 +v 0.499000 -0.499000 -0.375000 +v 0.499000 1.499000 -0.375000 +v 0.499000 -0.499000 -0.499000 +v 0.499000 1.499000 -0.499000 +vt 0.894737 1.000000 +vt 0.894737 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.421052 1.000000 +vt 0.421052 0.000000 +vt 0.000001 0.000000 +vt 0.000001 1.000000 +vt 0.894737 1.000000 +vt 0.894737 0.000000 +vt 0.947368 0.000000 +vt 0.947368 1.000000 +vt 0.842105 1.000000 +vt 0.842105 0.000000 +vt 0.421052 0.000000 +vt 0.421052 1.000000 +vt 0.947368 0.000000 +vt 0.947368 0.500000 +vt 1.000000 0.500000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.500000 +vt 0.947368 0.500000 +vt 0.947368 1.000000 +vn -1.0000 -0.0000 0.0000 +vn 0.0000 -0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +usemtl None.009 +s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 4/5/2 3/6/2 5/7/2 6/8/2 +f 6/9/3 5/10/3 7/11/3 8/12/3 +f 8/13/4 7/14/4 2/15/4 1/16/4 +f 2/17/5 7/18/5 5/19/5 3/20/5 +f 8/21/6 1/22/6 4/23/6 6/24/6 diff --git a/mods/doors/models/door_b.obj b/mods/doors/models/door_b.obj new file mode 100644 index 0000000..87f1729 --- /dev/null +++ b/mods/doors/models/door_b.obj @@ -0,0 +1,50 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +mtllib door_b.mtl +o door_b +v 0.499000 1.499000 -0.499000 +v 0.499000 1.499000 -0.375000 +v 0.499000 -0.499000 -0.375000 +v 0.499000 -0.499000 -0.499000 +v -0.499000 1.499000 -0.375000 +v -0.499000 -0.499000 -0.375000 +v -0.499000 1.499000 -0.499000 +v -0.499000 -0.499000 -0.499000 +vt 0.894736 1.000000 +vt 0.947368 1.000000 +vt 0.947368 0.000000 +vt 0.894736 0.000000 +vt 0.842105 1.000000 +vt 0.421053 1.000000 +vt 0.421053 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.894736 1.000000 +vt 0.894736 0.000000 +vt 0.842105 0.000000 +vt 0.421053 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.421053 0.000000 +vt 1.000000 0.500000 +vt 0.947368 0.500000 +vt 0.947368 1.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.947368 0.000000 +vt 0.947368 0.500000 +vt 1.000000 0.500000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +usemtl None.007 +s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/5/2 5/6/2 6/7/2 3/8/2 +f 5/9/3 7/10/3 8/11/3 6/12/3 +f 7/13/4 1/14/4 4/15/4 8/16/4 +f 4/17/5 3/18/5 6/19/5 8/20/5 +f 7/21/6 5/22/6 2/23/6 1/24/6 diff --git a/mods/doors/models/door_b2.obj b/mods/doors/models/door_b2.obj new file mode 100644 index 0000000..35632a5 --- /dev/null +++ b/mods/doors/models/door_b2.obj @@ -0,0 +1,50 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +mtllib door_b2.mtl +o door_b2 +v 0.499000 1.499000 -0.499000 +v 0.499000 1.499000 -0.375000 +v 0.499000 -0.499000 -0.375000 +v 0.499000 -0.499000 -0.499000 +v -0.499000 1.499000 -0.375000 +v -0.499000 -0.499000 -0.375000 +v -0.499000 1.499000 -0.499000 +v -0.499000 -0.499000 -0.499000 +vt 0.842105 1.000000 +vt 0.894737 1.000000 +vt 0.894737 0.000000 +vt 0.842105 0.000000 +vt 0.421052 1.000000 +vt 0.000001 1.000000 +vt 0.000001 0.000000 +vt 0.421052 0.000000 +vt 0.894737 1.000000 +vt 0.947368 1.000000 +vt 0.947368 0.000000 +vt 0.894737 0.000000 +vt 0.842105 1.000000 +vt 0.421052 1.000000 +vt 0.421052 0.000000 +vt 0.842105 0.000000 +vt 1.000000 0.500000 +vt 0.947368 0.500000 +vt 0.947368 1.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.947368 0.000000 +vt 0.947368 0.500000 +vt 1.000000 0.500000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +usemtl None.010 +s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 2/5/2 5/6/2 6/7/2 3/8/2 +f 5/9/3 7/10/3 8/11/3 6/12/3 +f 7/13/4 1/14/4 4/15/4 8/16/4 +f 4/17/5 3/18/5 6/19/5 8/20/5 +f 7/21/6 5/22/6 2/23/6 1/24/6 diff --git a/mods/doors/models/doors_fencegate_closed.obj b/mods/doors/models/doors_fencegate_closed.obj new file mode 100644 index 0000000..0050f70 --- /dev/null +++ b/mods/doors/models/doors_fencegate_closed.obj @@ -0,0 +1,106 @@ +# Blender v2.76 (sub 0) OBJ File: 'gate_closed.blend' +# www.blender.org +mtllib gate_closed.mtl +o Cube_Cube.001 +v -0.625000 -0.500000 0.125000 +v -0.625000 0.500100 0.125000 +v -0.625000 -0.500000 -0.125000 +v -0.625000 0.500100 -0.125000 +v -0.375000 -0.500000 0.125000 +v -0.375000 0.500100 0.125000 +v -0.375000 -0.500000 -0.125000 +v -0.375000 0.500100 -0.125000 +v 0.375000 -0.500000 0.125000 +v 0.375000 0.500100 0.125000 +v 0.375000 -0.500000 -0.125000 +v 0.375000 0.500100 -0.125000 +v 0.625000 -0.500000 0.125000 +v 0.625000 0.500100 0.125000 +v 0.625000 -0.500000 -0.125000 +v 0.625000 0.500100 -0.125000 +v -0.375000 0.187500 0.062500 +v -0.375000 0.312500 0.062500 +v -0.375000 0.187500 -0.062500 +v -0.375000 0.312500 -0.062500 +v 0.375000 0.187500 0.062500 +v 0.375000 0.312500 0.062500 +v 0.375000 0.187500 -0.062500 +v 0.375000 0.312500 -0.062500 +v -0.374831 0.187348 0.062500 +v -0.156342 0.187363 0.062500 +v -0.374831 0.187348 -0.062500 +v -0.156342 0.187363 -0.062500 +v 0.374981 -0.343683 0.062500 +v 0.375065 -0.187304 0.062500 +v 0.374981 -0.343683 -0.062500 +v 0.375065 -0.187304 -0.062500 +vt 0.000000 0.750000 +vt 0.000000 0.500000 +vt 1.000000 0.500000 +vt 1.000000 0.750000 +vt 1.000000 1.000000 +vt -0.000000 1.000000 +vt 1.000000 -0.000000 +vt 1.000000 0.250000 +vt 0.000000 0.250000 +vt -0.000000 0.000000 +vt 0.250000 0.000000 +vt 0.250000 0.250000 +vt 0.250000 0.750000 +vt 0.250000 1.000000 +vt 0.500000 -0.000000 +vt 0.500000 0.250000 +vt 0.500000 0.750000 +vt 0.500000 1.000000 +vt 1.000000 0.625000 +vt 0.000000 0.625000 +vt 1.000000 0.875000 +vt 0.000000 0.875000 +vt -0.000000 0.687500 +vt 0.000000 0.562500 +vt 1.000000 0.562500 +vt 1.000000 0.687500 +vt 0.813740 0.249033 +vt 0.201557 0.249293 +vt 0.120995 0.125498 +vt 0.987404 0.125469 +vt 0.125000 0.375000 +vt 0.812500 0.375000 +vt 0.937500 0.500000 +vt 0.062500 0.500000 +vt 0.000000 0.125000 +vt 1.000000 0.125000 +vt 0.312500 0.437500 +vt 0.312500 0.312500 +vt 1.000000 0.312500 +vt 1.000000 0.437500 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn -0.578000 -0.816100 0.000000 +vn 0.576200 0.817300 0.000000 +usemtl None +s off +f 2/1/1 4/2/1 3/3/1 1/4/1 +f 4/4/2 8/5/2 7/6/2 3/1/2 +f 8/7/3 6/8/3 5/9/3 7/10/3 +f 6/2/4 2/9/4 1/8/4 5/3/4 +f 1/9/5 3/10/5 7/11/5 5/12/5 +f 6/6/6 8/1/6 4/13/6 2/14/6 +f 10/1/1 12/2/1 11/3/1 9/4/1 +f 12/2/2 16/9/2 15/8/2 11/3/2 +f 16/7/3 14/8/3 13/9/3 15/10/3 +f 14/4/4 10/5/4 9/6/4 13/1/4 +f 9/12/5 11/11/5 15/15/5 13/16/5 +f 14/14/6 16/13/6 12/17/6 10/18/6 +f 20/2/2 24/3/2 23/19/2 19/20/2 +f 22/1/4 18/4/4 17/21/4 21/22/4 +f 17/23/5 19/24/5 23/25/5 21/26/5 +f 22/21/6 24/5/6 20/6/6 18/22/6 +f 28/27/2 32/28/2 31/29/2 27/30/2 +f 30/31/4 26/32/4 25/33/4 29/34/4 +f 25/35/7 27/10/7 31/7/7 29/36/7 +f 30/37/8 32/38/8 28/39/8 26/40/8 diff --git a/mods/doors/models/doors_fencegate_open.obj b/mods/doors/models/doors_fencegate_open.obj new file mode 100644 index 0000000..3fb727f --- /dev/null +++ b/mods/doors/models/doors_fencegate_open.obj @@ -0,0 +1,112 @@ +# Blender v2.76 (sub 0) OBJ File: 'gate_open.blend' +# www.blender.org +mtllib gate_open.mtl +o Cube_Cube.001 +v -0.625000 -0.500000 0.125000 +v -0.625000 0.500100 0.125000 +v -0.625000 -0.500000 -0.125000 +v -0.625000 0.500100 -0.125000 +v -0.375000 -0.500000 0.125000 +v -0.375000 0.500100 0.125000 +v -0.375000 -0.500000 -0.125000 +v -0.375000 0.500100 -0.125000 +v 0.375000 -0.500000 0.125000 +v 0.375000 0.500100 0.125000 +v 0.375000 -0.500000 -0.125000 +v 0.375000 0.500100 -0.125000 +v 0.625000 -0.500000 0.125000 +v 0.625000 0.500100 0.125000 +v 0.625000 -0.500000 -0.125000 +v 0.625000 0.500100 -0.125000 +v 0.434859 0.187500 -0.872359 +v 0.434859 0.312500 -0.872359 +v 0.559859 0.187500 -0.872359 +v 0.559859 0.312500 -0.872359 +v 0.434859 0.187500 -0.122359 +v 0.434859 0.312500 -0.122359 +v 0.559859 0.187500 -0.122359 +v 0.559859 0.312500 -0.122359 +v 0.434859 0.187348 -0.872190 +v 0.434859 0.187363 -0.653701 +v 0.559859 0.187348 -0.872190 +v 0.559859 0.187363 -0.653701 +v 0.434859 -0.343683 -0.122379 +v 0.434859 -0.187304 -0.122294 +v 0.559859 -0.343683 -0.122379 +v 0.559859 -0.187304 -0.122294 +v 0.499560 -0.442900 0.005495 +vt 0.000000 0.750000 +vt 0.000000 0.500000 +vt 1.000000 0.500000 +vt 1.000000 0.750000 +vt 1.000000 1.000000 +vt -0.000000 1.000000 +vt 1.000000 -0.000000 +vt 1.000000 0.250000 +vt 0.000000 0.250000 +vt -0.000000 0.000000 +vt 0.250000 0.000000 +vt 0.250000 0.250000 +vt 0.250000 0.750000 +vt 0.250000 1.000000 +vt 0.500000 -0.000000 +vt 0.500000 0.250000 +vt 0.500000 0.750000 +vt 0.500000 1.000000 +vt 1.000000 0.625000 +vt 0.000000 0.625000 +vt 1.000000 0.875000 +vt 0.000000 0.875000 +vt -0.000000 0.687500 +vt 0.000000 0.562500 +vt 1.000000 0.562500 +vt 1.000000 0.687500 +vt 0.813740 0.249033 +vt 0.201557 0.249293 +vt 0.120995 0.125498 +vt 0.987404 0.125469 +vt 0.125000 0.375000 +vt 0.812500 0.375000 +vt 0.937500 0.500000 +vt 0.062500 0.500000 +vt 0.000000 0.125000 +vt 1.000000 0.125000 +vt 0.312500 0.437500 +vt 0.312500 0.312500 +vt 1.000000 0.312500 +vt 1.000000 0.437500 +vt 0.312500 0.625000 +vt 0.312500 0.500000 +vt 0.187500 0.500000 +vt 0.187500 0.625000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -0.816100 -0.578000 +vn 0.000000 0.817300 0.576200 +usemtl None +s off +f 2/1/1 4/2/1 3/3/1 1/4/1 +f 4/4/2 8/5/2 7/6/2 3/1/2 +f 8/7/3 6/8/3 5/9/3 7/10/3 +f 6/2/4 2/9/4 1/8/4 5/3/4 +f 1/9/5 3/10/5 7/11/5 5/12/5 +f 6/6/6 8/1/6 4/13/6 2/14/6 +f 10/1/1 12/2/1 11/3/1 9/4/1 +f 12/2/2 16/9/2 15/8/2 11/3/2 +f 16/7/3 14/8/3 13/9/3 15/10/3 +f 14/4/4 10/5/4 9/6/4 13/1/4 +f 9/12/5 11/11/5 15/15/5 13/16/5 +f 14/14/6 16/13/6 12/17/6 10/18/6 +f 20/2/3 24/3/3 23/19/3 19/20/3 +f 22/1/1 18/4/1 17/21/1 21/22/1 +f 17/23/5 19/24/5 23/25/5 21/26/5 +f 22/21/6 24/5/6 20/6/6 18/22/6 +f 28/27/3 32/28/3 31/29/3 27/30/3 +f 30/31/1 26/32/1 25/33/1 29/34/1 +f 25/35/7 27/10/7 31/7/7 29/36/7 +f 30/37/8 32/38/8 28/39/8 26/40/8 +f 17/41/2 18/42/2 20/43/2 19/44/2 diff --git a/mods/doors/sounds/doors_door_close.ogg b/mods/doors/sounds/doors_door_close.ogg new file mode 100644 index 0000000..fede4af Binary files /dev/null and b/mods/doors/sounds/doors_door_close.ogg differ diff --git a/mods/doors/sounds/doors_door_open.ogg b/mods/doors/sounds/doors_door_open.ogg new file mode 100644 index 0000000..9a4c4f1 Binary files /dev/null and b/mods/doors/sounds/doors_door_open.ogg differ diff --git a/mods/doors/sounds/doors_fencegate_close.ogg b/mods/doors/sounds/doors_fencegate_close.ogg new file mode 100644 index 0000000..d42590f Binary files /dev/null and b/mods/doors/sounds/doors_fencegate_close.ogg differ diff --git a/mods/doors/sounds/doors_fencegate_open.ogg b/mods/doors/sounds/doors_fencegate_open.ogg new file mode 100644 index 0000000..f6dfd1d Binary files /dev/null and b/mods/doors/sounds/doors_fencegate_open.ogg differ diff --git a/mods/doors/sounds/doors_glass_door_close.ogg b/mods/doors/sounds/doors_glass_door_close.ogg new file mode 100644 index 0000000..b3c1355 Binary files /dev/null and b/mods/doors/sounds/doors_glass_door_close.ogg differ diff --git a/mods/doors/sounds/doors_glass_door_open.ogg b/mods/doors/sounds/doors_glass_door_open.ogg new file mode 100644 index 0000000..66e6812 Binary files /dev/null and b/mods/doors/sounds/doors_glass_door_open.ogg differ diff --git a/mods/doors/sounds/doors_steel_door_close.ogg b/mods/doors/sounds/doors_steel_door_close.ogg new file mode 100644 index 0000000..aea7be6 Binary files /dev/null and b/mods/doors/sounds/doors_steel_door_close.ogg differ diff --git a/mods/doors/sounds/doors_steel_door_open.ogg b/mods/doors/sounds/doors_steel_door_open.ogg new file mode 100644 index 0000000..de87477 Binary files /dev/null and b/mods/doors/sounds/doors_steel_door_open.ogg differ diff --git a/mods/doors/textures/doors_door_glass.png b/mods/doors/textures/doors_door_glass.png new file mode 100644 index 0000000..c296a0f Binary files /dev/null and b/mods/doors/textures/doors_door_glass.png differ diff --git a/mods/doors/textures/doors_door_obsidian_glass.png b/mods/doors/textures/doors_door_obsidian_glass.png new file mode 100644 index 0000000..07ac5b2 Binary files /dev/null and b/mods/doors/textures/doors_door_obsidian_glass.png differ diff --git a/mods/doors/textures/doors_door_steel.png b/mods/doors/textures/doors_door_steel.png new file mode 100644 index 0000000..f42f335 Binary files /dev/null and b/mods/doors/textures/doors_door_steel.png differ diff --git a/mods/doors/textures/doors_door_wood.png b/mods/doors/textures/doors_door_wood.png new file mode 100644 index 0000000..7b18203 Binary files /dev/null and b/mods/doors/textures/doors_door_wood.png differ diff --git a/mods/doors/textures/doors_hidden_segment.png b/mods/doors/textures/doors_hidden_segment.png new file mode 100644 index 0000000..b3b6f34 Binary files /dev/null and b/mods/doors/textures/doors_hidden_segment.png differ diff --git a/mods/doors/textures/doors_item_glass.png b/mods/doors/textures/doors_item_glass.png new file mode 100644 index 0000000..86406fb Binary files /dev/null and b/mods/doors/textures/doors_item_glass.png differ diff --git a/mods/doors/textures/doors_item_obsidian_glass.png b/mods/doors/textures/doors_item_obsidian_glass.png new file mode 100644 index 0000000..1026d43 Binary files /dev/null and b/mods/doors/textures/doors_item_obsidian_glass.png differ diff --git a/mods/doors/textures/doors_item_steel.png b/mods/doors/textures/doors_item_steel.png new file mode 100644 index 0000000..dd99e13 Binary files /dev/null and b/mods/doors/textures/doors_item_steel.png differ diff --git a/mods/doors/textures/doors_item_wood.png b/mods/doors/textures/doors_item_wood.png new file mode 100644 index 0000000..d3a62ab Binary files /dev/null and b/mods/doors/textures/doors_item_wood.png differ diff --git a/mods/doors/textures/doors_trapdoor.png b/mods/doors/textures/doors_trapdoor.png new file mode 100644 index 0000000..e92c8b2 Binary files /dev/null and b/mods/doors/textures/doors_trapdoor.png differ diff --git a/mods/doors/textures/doors_trapdoor_side.png b/mods/doors/textures/doors_trapdoor_side.png new file mode 100644 index 0000000..55981ea Binary files /dev/null and b/mods/doors/textures/doors_trapdoor_side.png differ diff --git a/mods/doors/textures/doors_trapdoor_steel.png b/mods/doors/textures/doors_trapdoor_steel.png new file mode 100644 index 0000000..4ba507d Binary files /dev/null and b/mods/doors/textures/doors_trapdoor_steel.png differ diff --git a/mods/doors/textures/doors_trapdoor_steel_side.png b/mods/doors/textures/doors_trapdoor_steel_side.png new file mode 100644 index 0000000..e29c59e Binary files /dev/null and b/mods/doors/textures/doors_trapdoor_steel_side.png differ diff --git a/mods/dungeon_loot/README.txt b/mods/dungeon_loot/README.txt new file mode 100644 index 0000000..c500d25 --- /dev/null +++ b/mods/dungeon_loot/README.txt @@ -0,0 +1,11 @@ +Minetest Game mod: dungeon_loot +=============================== +Adds randomly generated chests with some "loot" to generated dungeons, +an API to register additional loot is provided. +Only works if dungeons are actually enabled in mapgen flags. + +License information can be found in license.txt + +Authors of source code +---------------------- +Originally by sfan5 (MIT) diff --git a/mods/dungeon_loot/init.lua b/mods/dungeon_loot/init.lua new file mode 100644 index 0000000..9d8ac52 --- /dev/null +++ b/mods/dungeon_loot/init.lua @@ -0,0 +1,8 @@ +dungeon_loot = {} + +dungeon_loot.CHESTS_MIN = 0 -- not necessarily in a single dungeon +dungeon_loot.CHESTS_MAX = 2 +dungeon_loot.STACKS_PER_CHEST_MAX = 8 + +dofile(minetest.get_modpath("dungeon_loot") .. "/loot.lua") +dofile(minetest.get_modpath("dungeon_loot") .. "/mapgen.lua") diff --git a/mods/dungeon_loot/license.txt b/mods/dungeon_loot/license.txt new file mode 100644 index 0000000..0af30a0 --- /dev/null +++ b/mods/dungeon_loot/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017 sfan5 + +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. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/dungeon_loot/loot.lua b/mods/dungeon_loot/loot.lua new file mode 100644 index 0000000..a5a4097 --- /dev/null +++ b/mods/dungeon_loot/loot.lua @@ -0,0 +1,60 @@ +-- Loot from the `default` mod is registered here, +-- with the rest being registered in the respective mods + +dungeon_loot.registered_loot = { + -- various items + {name = "default:stick", chance = 0.6, count = {3, 6}}, + {name = "default:flint", chance = 0.4, count = {1, 3}}, + + -- farming / consumable + {name = "default:apple", chance = 0.4, count = {1, 4}}, + {name = "default:cactus", chance = 0.4, count = {1, 4}, + types = {"sandstone", "desert"}}, + + -- minerals + {name = "default:coal_lump", chance = 0.9, count = {1, 12}}, + {name = "default:gold_ingot", chance = 0.5}, + {name = "default:steel_ingot", chance = 0.4, count = {1, 6}}, + {name = "default:mese_crystal", chance = 0.1, count = {2, 3}}, + + -- tools + {name = "default:sword_wood", chance = 0.6}, + {name = "default:pick_stone", chance = 0.3}, + {name = "default:axe_diamond", chance = 0.05}, + + -- natural materials + {name = "default:sand", chance = 0.8, count = {4, 32}, y = {-64, 32768}, + types = {"normal"}}, + {name = "default:desert_sand", chance = 0.8, count = {4, 32}, y = {-64, 32768}, + types = {"sandstone"}}, + {name = "default:desert_cobble", chance = 0.8, count = {4, 32}, + types = {"desert"}}, + {name = "default:snow", chance = 0.8, count = {8, 64}, y = {-64, 32768}, + types = {"ice"}}, + {name = "default:dirt", chance = 0.6, count = {2, 16}, y = {-64, 32768}, + types = {"normal", "sandstone", "desert"}}, + {name = "default:obsidian", chance = 0.25, count = {1, 3}, y = {-32768, -512}}, + {name = "default:mese", chance = 0.15, y = {-32768, -512}}, +} + +function dungeon_loot.register(t) + if t.name ~= nil then + t = {t} -- single entry + end + for _, loot in ipairs(t) do + table.insert(dungeon_loot.registered_loot, loot) + end +end + +function dungeon_loot._internal_get_loot(pos_y, dungeontype) + -- filter by y pos and type + local ret = {} + for _, l in ipairs(dungeon_loot.registered_loot) do + if l.y == nil or (pos_y >= l.y[1] and pos_y <= l.y[2]) then + if l.types == nil or table.indexof(l.types, dungeontype) ~= -1 then + table.insert(ret, l) + end + end + end + return ret +end diff --git a/mods/dungeon_loot/mapgen.lua b/mods/dungeon_loot/mapgen.lua new file mode 100644 index 0000000..b2c80fa --- /dev/null +++ b/mods/dungeon_loot/mapgen.lua @@ -0,0 +1,171 @@ +minetest.set_gen_notify({dungeon = true, temple = true}) + +local function noise3d_integer(noise, pos) + return math.abs(math.floor(noise:get_3d(pos) * 0x7fffffff)) +end + +local function random_sample(rand, list, count) + local ret = {} + for n = 1, count do + local idx = rand:next(1, #list) + table.insert(ret, list[idx]) + table.remove(list, idx) + end + return ret +end + +local function find_walls(cpos) + local is_wall = function(node) + return node.name ~= "air" and node.name ~= "ignore" + end + + local dirs = {{x=1, z=0}, {x=-1, z=0}, {x=0, z=1}, {x=0, z=-1}} + local get_node = minetest.get_node + + local ret = {} + local mindist = {x=0, z=0} + local min = function(a, b) return a ~= 0 and math.min(a, b) or b end + for _, dir in ipairs(dirs) do + for i = 1, 9 do -- 9 = max room size / 2 + local pos = vector.add(cpos, {x=dir.x*i, y=0, z=dir.z*i}) + + -- continue in that direction until we find a wall-like node + local node = get_node(pos) + if is_wall(node) then + local front_below = vector.subtract(pos, {x=dir.x, y=1, z=dir.z}) + local above = vector.add(pos, {x=0, y=1, z=0}) + + -- check that it: + --- is at least 2 nodes high (not a staircase) + --- has a floor + if is_wall(get_node(front_below)) and is_wall(get_node(above)) then + table.insert(ret, {pos = pos, facing = {x=-dir.x, y=0, z=-dir.z}}) + if dir.z == 0 then + mindist.x = min(mindist.x, i-1) + else + mindist.z = min(mindist.z, i-1) + end + end + -- abort even if it wasn't a wall cause something is in the way + break + end + end + end + + local biome = minetest.get_biome_data(cpos) + biome = biome and minetest.get_biome_name(biome.biome) or "" + local type = "normal" + if biome:find("desert") == 1 then + type = "desert" + elseif biome:find("sandstone_desert") == 1 then + type = "sandstone" + elseif biome:find("icesheet") == 1 then + type = "ice" + end + + return { + walls = ret, + size = {x=mindist.x*2, z=mindist.z*2}, + type = type, + } +end + +local function populate_chest(pos, rand, dungeontype) + --minetest.chat_send_all("chest placed at " .. minetest.pos_to_string(pos) .. " [" .. dungeontype .. "]") + --minetest.add_node(vector.add(pos, {x=0, y=1, z=0}), {name="default:torch", param2=1}) + + local item_list = dungeon_loot._internal_get_loot(pos.y, dungeontype) + -- take random (partial) sample of all possible items + local sample_n = math.min(#item_list, dungeon_loot.STACKS_PER_CHEST_MAX) + item_list = random_sample(rand, item_list, sample_n) + + -- apply chances / randomized amounts and collect resulting items + local items = {} + for _, loot in ipairs(item_list) do + if rand:next(0, 1000) / 1000 <= loot.chance then + local itemdef = minetest.registered_items[loot.name] + local amount = 1 + if loot.count ~= nil then + amount = rand:next(loot.count[1], loot.count[2]) + end + + if not itemdef then + minetest.log("warning", "Registered loot item " .. loot.name .. " does not exist") + elseif itemdef.tool_capabilities then + for n = 1, amount do + local wear = rand:next(0.20 * 65535, 0.75 * 65535) -- 20% to 75% wear + table.insert(items, ItemStack({name = loot.name, wear = wear})) + end + elseif itemdef.stack_max == 1 then + -- not stackable, add separately + for n = 1, amount do + table.insert(items, loot.name) + end + else + table.insert(items, ItemStack({name = loot.name, count = amount})) + end + end + end + + -- place items at random places in chest + local inv = minetest.get_meta(pos):get_inventory() + local listsz = inv:get_size("main") + assert(listsz >= #items) + for _, item in ipairs(items) do + local index = rand:next(1, listsz) + if inv:get_stack("main", index):is_empty() then + inv:set_stack("main", index, item) + else + inv:add_item("main", item) -- space occupied, just put it anywhere + end + end +end + + +minetest.register_on_generated(function(minp, maxp, blockseed) + local gennotify = minetest.get_mapgen_object("gennotify") + local poslist = gennotify["dungeon"] or {} + for _, entry in ipairs(gennotify["temple"] or {}) do + table.insert(poslist, entry) + end + if #poslist == 0 then return end + + local noise = minetest.get_perlin(10115, 4, 0.5, 1) + local rand = PcgRandom(noise3d_integer(noise, poslist[1])) + + local candidates = {} + -- process at most 8 rooms to keep runtime of this predictable + local num_process = math.min(#poslist, 8) + for i = 1, num_process do + local room = find_walls(poslist[i]) + -- skip small rooms and everything that doesn't at least have 3 walls + if math.min(room.size.x, room.size.z) >= 4 and #room.walls >= 3 then + table.insert(candidates, room) + end + end + + local num_chests = rand:next(dungeon_loot.CHESTS_MIN, dungeon_loot.CHESTS_MAX) + num_chests = math.min(#candidates, num_chests) + local rooms = random_sample(rand, candidates, num_chests) + + for _, room in ipairs(rooms) do + -- choose place somewhere in front of any of the walls + local wall = room.walls[rand:next(1, #room.walls)] + local v, vi -- vector / axis that runs alongside the wall + if wall.facing.x ~= 0 then + v, vi = {x=0, y=0, z=1}, "z" + else + v, vi = {x=1, y=0, z=0}, "x" + end + local chestpos = vector.add(wall.pos, wall.facing) + local off = rand:next(-room.size[vi]/2 + 1, room.size[vi]/2 - 1) + chestpos = vector.add(chestpos, vector.multiply(v, off)) + + if minetest.get_node(chestpos).name == "air" then + -- make it face inwards to the room + local facedir = minetest.dir_to_facedir(vector.multiply(wall.facing, -1)) + minetest.add_node(chestpos, {name = "default:chest", param2 = facedir}) + populate_chest(chestpos, PcgRandom(noise3d_integer(noise, chestpos)), room.type) + end + end +end) diff --git a/mods/dungeon_loot/mod.conf b/mods/dungeon_loot/mod.conf new file mode 100644 index 0000000..79d8089 --- /dev/null +++ b/mods/dungeon_loot/mod.conf @@ -0,0 +1,3 @@ +name = dungeon_loot +description = Minetest Game mod: dungeon_loot +depends = default diff --git a/mods/dye/README.txt b/mods/dye/README.txt new file mode 100644 index 0000000..a2fbdd2 --- /dev/null +++ b/mods/dye/README.txt @@ -0,0 +1,13 @@ +Minetest Game mod: dye +====================== +See license.txt for license information. +See init.lua for documentation. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +Perttu Ahola (celeron55) (CC BY-SA 3.0) diff --git a/mods/dye/init.lua b/mods/dye/init.lua new file mode 100644 index 0000000..f0affe8 --- /dev/null +++ b/mods/dye/init.lua @@ -0,0 +1,127 @@ +-- dye/init.lua + +dye = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("dye") + +-- Make dye names and descriptions available globally + +dye.dyes = { + {"white", "White"}, + {"grey", "Grey"}, + {"dark_grey", "Dark Grey"}, + {"black", "Black"}, + {"violet", "Violet"}, + {"blue", "Blue"}, + {"cyan", "Cyan"}, + {"dark_green", "Dark Green"}, + {"green", "Green"}, + {"yellow", "Yellow"}, + {"brown", "Brown"}, + {"orange", "Orange"}, + {"red", "Red"}, + {"magenta", "Magenta"}, + {"pink", "Pink"}, +} + +-- Define items + +for _, row in ipairs(dye.dyes) do + local name = row[1] + local description = row[2] + local groups = {dye = 1} + groups["color_" .. name] = 1 + + minetest.register_craftitem("dye:" .. name, { + inventory_image = "dye_" .. name .. ".png", + description = S(description .. " Dye"), + groups = groups + }) + + minetest.register_craft({ + output = "dye:" .. name .. " 4", + recipe = { + {"group:flower,color_" .. name} + }, + }) +end + +-- Manually add coal -> black dye + +minetest.register_craft({ + output = "dye:black 4", + recipe = { + {"group:coal"} + }, +}) + +-- Manually add blueberries->violet dye + +minetest.register_craft({ + output = "dye:violet 2", + recipe = { + {"default:blueberries"} + }, +}) + +-- Mix recipes + +local dye_recipes = { + -- src1, src2, dst + -- RYB mixes + {"red", "blue", "violet"}, -- "purple" + {"yellow", "red", "orange"}, + {"yellow", "blue", "green"}, + -- RYB complementary mixes + {"yellow", "violet", "dark_grey"}, + {"blue", "orange", "dark_grey"}, + -- CMY mixes - approximation + {"cyan", "yellow", "green"}, + {"cyan", "magenta", "blue"}, + {"yellow", "magenta", "red"}, + -- other mixes that result in a color we have + {"red", "green", "brown"}, + {"magenta", "blue", "violet"}, + {"green", "blue", "cyan"}, + {"pink", "violet", "magenta"}, + -- mixes with black + {"white", "black", "grey"}, + {"grey", "black", "dark_grey"}, + {"green", "black", "dark_green"}, + {"orange", "black", "brown"}, + -- mixes with white + {"white", "red", "pink"}, + {"white", "dark_grey", "grey"}, + {"white", "dark_green", "green"}, +} + +for _, mix in pairs(dye_recipes) do + minetest.register_craft({ + type = "shapeless", + output = "dye:" .. mix[3] .. " 2", + recipe = {"dye:" .. mix[1], "dye:" .. mix[2]}, + }) +end + +-- Dummy calls to S() to allow translation scripts to detect the strings. +-- To update this run: +-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Dye")) end + +--[[ +S("White Dye") +S("Grey Dye") +S("Dark Grey Dye") +S("Black Dye") +S("Violet Dye") +S("Blue Dye") +S("Cyan Dye") +S("Dark Green Dye") +S("Green Dye") +S("Yellow Dye") +S("Brown Dye") +S("Orange Dye") +S("Red Dye") +S("Magenta Dye") +S("Pink Dye") +--]] diff --git a/mods/dye/license.txt b/mods/dye/license.txt new file mode 100644 index 0000000..bf9d350 --- /dev/null +++ b/mods/dye/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/dye/locale/dye.de.tr b/mods/dye/locale/dye.de.tr new file mode 100644 index 0000000..f73fb57 --- /dev/null +++ b/mods/dye/locale/dye.de.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Weißer Farbstoff +Grey Dye=Grauer Farbstoff +Dark Grey Dye=Dunkelgrauer Farbstoff +Black Dye=Schwarzer Farbstoff +Violet Dye=Violetter Farbstoff +Blue Dye=Blauer Farbstoff +Cyan Dye=Türkiser Farbstoff +Dark Green Dye=Dunkelgrüner Farbstoff +Green Dye=Grüner Farbstoff +Yellow Dye=Gelber Farbstoff +Brown Dye=Brauner Farbstoff +Orange Dye=Orange Farbstoff +Red Dye=Roter Farbstoff +Magenta Dye=Magenta Farbstoff +Pink Dye=Rosa Farbstoff diff --git a/mods/dye/locale/dye.es.tr b/mods/dye/locale/dye.es.tr new file mode 100644 index 0000000..bd04ef4 --- /dev/null +++ b/mods/dye/locale/dye.es.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Tinte blanco +Grey Dye=Tinte gris +Dark Grey Dye=Tinte gris oscuro +Black Dye=Tinte negro +Violet Dye=Tinte violeta +Blue Dye=Tinte azul +Cyan Dye=Tinte cián +Dark Green Dye=Tinte verde oscuro +Green Dye=Tinte verde +Yellow Dye=Tinte amarillo +Brown Dye=Tinte marrón +Orange Dye=Tinte naranja +Red Dye=Tinte rojo +Magenta Dye=Tinte magenta +Pink Dye=Tinte rosa diff --git a/mods/dye/locale/dye.fr.tr b/mods/dye/locale/dye.fr.tr new file mode 100644 index 0000000..390fa07 --- /dev/null +++ b/mods/dye/locale/dye.fr.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Colorant blanc +Grey Dye=Colorant gris +Dark Grey Dye=Colorant gris foncé +Black Dye=Colorant noir +Violet Dye=Colorant violet +Blue Dye=Colorant bleu +Cyan Dye=Colorant cyan +Dark Green Dye=Colorant vert foncé +Green Dye=Colorant vert +Yellow Dye=Colorant jaune +Brown Dye=Colorant marron +Orange Dye=Colorant orange +Red Dye=Colorant rouge +Magenta Dye=Colorant magenta +Pink Dye=Colorant rose diff --git a/mods/dye/locale/dye.id.tr b/mods/dye/locale/dye.id.tr new file mode 100644 index 0000000..1614345 --- /dev/null +++ b/mods/dye/locale/dye.id.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Pewarna Putih +Grey Dye=Pewarna Abu +Dark Grey Dye=Pewarna Abu Tua +Black Dye=Pewarna Hitam +Violet Dye=Pewarna Ungu +Blue Dye=Pewarna Biru +Cyan Dye=Pewarna Sian +Dark Green Dye=Pewarna Hijau Tua +Green Dye=Pewarna Hijau +Yellow Dye=Pewarna Kuning +Brown Dye=Pewarna Cokelat +Orange Dye=Pewarna Oranye +Red Dye=Pewarna Merah +Magenta Dye=Pewarna Magenta +Pink Dye=Pewarna Jambon diff --git a/mods/dye/locale/dye.it.tr b/mods/dye/locale/dye.it.tr new file mode 100644 index 0000000..e15e2b5 --- /dev/null +++ b/mods/dye/locale/dye.it.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Tintura bianca +Grey Dye=Tintura grigia +Dark Grey Dye=Tintura grigia scura +Black Dye=Tintura nera +Violet Dye=Tintura viola +Blue Dye=Tintura blu +Cyan Dye=Tintura ciano +Dark Green Dye=Tintura verde scura +Green Dye=Tintura verde +Yellow Dye=Tintura gialla +Brown Dye=Tintura marrone +Orange Dye=Tintura arancione +Red Dye=Tintura rossa +Magenta Dye=Tintura magenta +Pink Dye=Tintura rosa \ No newline at end of file diff --git a/mods/dye/locale/dye.ms.tr b/mods/dye/locale/dye.ms.tr new file mode 100644 index 0000000..50c0473 --- /dev/null +++ b/mods/dye/locale/dye.ms.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Pewarna Putih +Grey Dye=Pewarna Kelabu +Dark Grey Dye=Pewarna Kelabu Gelap +Black Dye=Pewarna Hitam +Violet Dye=Pewarna Ungu +Blue Dye=Pewarna Biru +Cyan Dye=Pewarna Biru Kehijauan +Dark Green Dye=Pewarna Hijau Gelap +Green Dye=Pewarna Hijau +Yellow Dye=Pewarna Kuning +Brown Dye=Pewarna Perang +Orange Dye=Pewarna Jingga +Red Dye=Pewarna Merah +Magenta Dye=Pewarna Merah Lembayung +Pink Dye=Pewarna Merah Jambu diff --git a/mods/dye/locale/dye.ru.tr b/mods/dye/locale/dye.ru.tr new file mode 100644 index 0000000..fa3c5c4 --- /dev/null +++ b/mods/dye/locale/dye.ru.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Белая Краска +Grey Dye=Серая Краска +Dark Grey Dye=Тёмно-Серая Краска +Black Dye=Черная Краска +Violet Dye=Фиолетовая Краска +Blue Dye=Синяя Краска +Cyan Dye=Голубая Краска +Dark Green Dye=Тёмно-Зелёная Краска +Green Dye=Зелёная Краска +Yellow Dye=Жёлтая Краска +Brown Dye=Бурая Краска +Orange Dye=Оранжевая Краска +Red Dye=Красная Краска +Magenta Dye=Пурпурная Краска +Pink Dye=Розовая Краска diff --git a/mods/dye/locale/dye.se.tr b/mods/dye/locale/dye.se.tr new file mode 100644 index 0000000..27adb10 --- /dev/null +++ b/mods/dye/locale/dye.se.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Vit Färg +Grey Dye=Grå Färg +Dark Grey Dye=Mörk Grå Färg +Black Dye=Svart Färg +Violet Dye=Violett Färg +Blue Dye=Blå Färg +Cyan Dye=Cyan Färg +Dark Green Dye=Mörk Grön Färg +Green Dye=Grön Färg +Yellow Dye=Gul Färg +Brown Dye=Brun Färg +Orange Dye=Orange Färg +Red Dye=Röd Färg +Magenta Dye=Magenta Färg +Pink Dye=Rosa Färg \ No newline at end of file diff --git a/mods/dye/locale/dye.sk.tr b/mods/dye/locale/dye.sk.tr new file mode 100644 index 0000000..625804c --- /dev/null +++ b/mods/dye/locale/dye.sk.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Biele farbivo +Grey Dye=Šedé farbivo +Dark Grey Dye=Tmavo šedé farbivo +Black Dye=Čierne farbivo +Violet Dye=Fialové farbivo +Blue Dye=Modré farbivo +Cyan Dye=Tyrkysové farbivo +Dark Green Dye=Tmavozelené farbivo +Green Dye=Zelené farbivo +Yellow Dye=Žlté farbivo +Brown Dye=Hnedé farbivo +Orange Dye=Oranžové farbivo +Red Dye=Červené farbivo +Magenta Dye=Purpurové farbivo +Pink Dye=Ružové farbivo diff --git a/mods/dye/locale/dye.zh_CN.tr b/mods/dye/locale/dye.zh_CN.tr new file mode 100644 index 0000000..8dcf311 --- /dev/null +++ b/mods/dye/locale/dye.zh_CN.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=白染料 +Grey Dye=灰染料 +Dark Grey Dye=暗灰染料 +Black Dye=黑染料 +Violet Dye=紫染料 +Blue Dye=蓝染料 +Cyan Dye=青染料 +Dark Green Dye=暗绿染料 +Green Dye=绿染料 +Yellow Dye=黄染料 +Brown Dye=棕染料 +Orange Dye=橙染料 +Red Dye=红染料 +Magenta Dye=品红染料 +Pink Dye=粉红染料 diff --git a/mods/dye/locale/dye.zh_TW.tr b/mods/dye/locale/dye.zh_TW.tr new file mode 100644 index 0000000..cc60a21 --- /dev/null +++ b/mods/dye/locale/dye.zh_TW.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=白染料 +Grey Dye=灰染料 +Dark Grey Dye=暗灰染料 +Black Dye=黑染料 +Violet Dye=紫染料 +Blue Dye=藍染料 +Cyan Dye=青染料 +Dark Green Dye=暗綠染料 +Green Dye=綠染料 +Yellow Dye=黃染料 +Brown Dye=棕染料 +Orange Dye=橙染料 +Red Dye=紅染料 +Magenta Dye=品紅染料 +Pink Dye=粉紅染料 diff --git a/mods/dye/locale/template.txt b/mods/dye/locale/template.txt new file mode 100644 index 0000000..c20bab5 --- /dev/null +++ b/mods/dye/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye= +Grey Dye= +Dark Grey Dye= +Black Dye= +Violet Dye= +Blue Dye= +Cyan Dye= +Dark Green Dye= +Green Dye= +Yellow Dye= +Brown Dye= +Orange Dye= +Red Dye= +Magenta Dye= +Pink Dye= diff --git a/mods/dye/mod.conf b/mods/dye/mod.conf new file mode 100644 index 0000000..32bb816 --- /dev/null +++ b/mods/dye/mod.conf @@ -0,0 +1,2 @@ +name = dye +description = Minetest Game mod: dye diff --git a/mods/dye/textures/dye_black.png b/mods/dye/textures/dye_black.png new file mode 100644 index 0000000..1055b6c Binary files /dev/null and b/mods/dye/textures/dye_black.png differ diff --git a/mods/dye/textures/dye_blue.png b/mods/dye/textures/dye_blue.png new file mode 100644 index 0000000..d1377c6 Binary files /dev/null and b/mods/dye/textures/dye_blue.png differ diff --git a/mods/dye/textures/dye_brown.png b/mods/dye/textures/dye_brown.png new file mode 100644 index 0000000..77d475c Binary files /dev/null and b/mods/dye/textures/dye_brown.png differ diff --git a/mods/dye/textures/dye_cyan.png b/mods/dye/textures/dye_cyan.png new file mode 100644 index 0000000..239d66c Binary files /dev/null and b/mods/dye/textures/dye_cyan.png differ diff --git a/mods/dye/textures/dye_dark_green.png b/mods/dye/textures/dye_dark_green.png new file mode 100644 index 0000000..9606ccf Binary files /dev/null and b/mods/dye/textures/dye_dark_green.png differ diff --git a/mods/dye/textures/dye_dark_grey.png b/mods/dye/textures/dye_dark_grey.png new file mode 100644 index 0000000..060737b Binary files /dev/null and b/mods/dye/textures/dye_dark_grey.png differ diff --git a/mods/dye/textures/dye_green.png b/mods/dye/textures/dye_green.png new file mode 100644 index 0000000..0d99ee1 Binary files /dev/null and b/mods/dye/textures/dye_green.png differ diff --git a/mods/dye/textures/dye_grey.png b/mods/dye/textures/dye_grey.png new file mode 100644 index 0000000..5efb028 Binary files /dev/null and b/mods/dye/textures/dye_grey.png differ diff --git a/mods/dye/textures/dye_magenta.png b/mods/dye/textures/dye_magenta.png new file mode 100644 index 0000000..c84df62 Binary files /dev/null and b/mods/dye/textures/dye_magenta.png differ diff --git a/mods/dye/textures/dye_orange.png b/mods/dye/textures/dye_orange.png new file mode 100644 index 0000000..0844907 Binary files /dev/null and b/mods/dye/textures/dye_orange.png differ diff --git a/mods/dye/textures/dye_pink.png b/mods/dye/textures/dye_pink.png new file mode 100644 index 0000000..c3dec22 Binary files /dev/null and b/mods/dye/textures/dye_pink.png differ diff --git a/mods/dye/textures/dye_red.png b/mods/dye/textures/dye_red.png new file mode 100644 index 0000000..14eafbf Binary files /dev/null and b/mods/dye/textures/dye_red.png differ diff --git a/mods/dye/textures/dye_violet.png b/mods/dye/textures/dye_violet.png new file mode 100644 index 0000000..600cbb4 Binary files /dev/null and b/mods/dye/textures/dye_violet.png differ diff --git a/mods/dye/textures/dye_white.png b/mods/dye/textures/dye_white.png new file mode 100644 index 0000000..2a840a4 Binary files /dev/null and b/mods/dye/textures/dye_white.png differ diff --git a/mods/dye/textures/dye_yellow.png b/mods/dye/textures/dye_yellow.png new file mode 100644 index 0000000..fe75775 Binary files /dev/null and b/mods/dye/textures/dye_yellow.png differ diff --git a/mods/env_sounds/README.txt b/mods/env_sounds/README.txt new file mode 100644 index 0000000..3b3d275 --- /dev/null +++ b/mods/env_sounds/README.txt @@ -0,0 +1,17 @@ +Minetest Game mod: env_sounds +============================= +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) + +Authors of media (sounds) +------------------------- +Yuval (CC0 1.0) +https://freesound.org/people/Yuval/sounds/197023/ + env_sounds_water.*.ogg + +Halion (CC0 1.0) +https://freesound.org/people/Halion/sounds/17785/ + env_sounds_lava.*.ogg diff --git a/mods/env_sounds/init.lua b/mods/env_sounds/init.lua new file mode 100644 index 0000000..31cc483 --- /dev/null +++ b/mods/env_sounds/init.lua @@ -0,0 +1,112 @@ +-- Parameters + +-- Node search radius around player +local radius = 8 + +local allsounds = { + ["env_sounds_water"] = { + trigger = {"default:water_flowing", "default:river_water_flowing"}, + base_volume = 0.04, + max_volume = 0.4, + per_node = 0.004, + }, + ["env_sounds_lava"] = { + trigger = {"default:lava_source", "default:lava_flowing"}, + base_volume = 0, + max_volume = 0.6, + per_node = { + ["default:lava_source"] = 0.008, + ["default:lava_flowing"] = 0.002, + }, + }, +} + +if minetest.settings:get_bool("river_source_sounds") then + table.insert(allsounds["env_sounds_water"].trigger, + "default:river_water_source") +end + + +-- Cache the union of all trigger nodes + +local cache_triggers = {} + +for sound, def in pairs(allsounds) do + for _, name in ipairs(def.trigger) do + table.insert(cache_triggers, name) + end +end + + +-- Update sound for player + +local function update_sound(player) + local player_name = player:get_player_name() + local ppos = player:get_pos() + ppos = vector.add(ppos, player:get_properties().eye_height) + local areamin = vector.subtract(ppos, radius) + local areamax = vector.add(ppos, radius) + + local pos = minetest.find_nodes_in_area(areamin, areamax, cache_triggers, true) + if next(pos) == nil then -- If table empty + return + end + for sound, def in pairs(allsounds) do + -- Find average position + local posav = {0, 0, 0} + local count = 0 + for _, name in ipairs(def.trigger) do + if pos[name] then + for _, p in ipairs(pos[name]) do + posav[1] = posav[1] + p.x + posav[2] = posav[2] + p.y + posav[3] = posav[3] + p.z + end + count = count + #pos[name] + end + end + + if count > 0 then + posav = vector.new(posav[1] / count, posav[2] / count, + posav[3] / count) + + -- Calculate gain + local gain = def.base_volume + if type(def.per_node) == 'table' then + for name, multiplier in pairs(def.per_node) do + if pos[name] then + gain = gain + #pos[name] * multiplier + end + end + else + gain = gain + count * def.per_node + end + gain = math.min(gain, def.max_volume) + + minetest.sound_play(sound, { + pos = posav, + to_player = player_name, + gain = gain, + }, true) + end + end +end + + +-- Update sound when player joins + +minetest.register_on_joinplayer(function(player) + update_sound(player) +end) + + +-- Cyclic sound update + +local function cyclic_update() + for _, player in pairs(minetest.get_connected_players()) do + update_sound(player) + end + minetest.after(3.5, cyclic_update) +end + +minetest.after(0, cyclic_update) diff --git a/mods/env_sounds/license.txt b/mods/env_sounds/license.txt new file mode 100644 index 0000000..ff8867d --- /dev/null +++ b/mods/env_sounds/license.txt @@ -0,0 +1,57 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2019 paramat + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (sounds) +-------------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +Yuval + +No Copyright + +The person who associated a work with this deed has dedicated the work to the +public domain by waiving all of his or her rights to the work worldwide under +copyright law, including all related and neighboring rights, to the extent +allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial +purposes, all without asking permission. See Other Information below. + +Other Information: + +In no way are the patent or trademark rights of any person affected by CC0, nor +are the rights that other persons may have in the work or in how the work is +used, such as publicity or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this +deed makes no warranties about the work, and disclaims liability for all uses +of the work, to the fullest extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author +or the affirmer. + +For more details: +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/mods/env_sounds/mod.conf b/mods/env_sounds/mod.conf new file mode 100644 index 0000000..ad6feb3 --- /dev/null +++ b/mods/env_sounds/mod.conf @@ -0,0 +1,3 @@ +name = env_sounds +description = Minetest Game mod: env_sounds +depends = default diff --git a/mods/env_sounds/sounds/env_sounds_lava.1.ogg b/mods/env_sounds/sounds/env_sounds_lava.1.ogg new file mode 100644 index 0000000..d417e51 Binary files /dev/null and b/mods/env_sounds/sounds/env_sounds_lava.1.ogg differ diff --git a/mods/env_sounds/sounds/env_sounds_lava.2.ogg b/mods/env_sounds/sounds/env_sounds_lava.2.ogg new file mode 100644 index 0000000..c98068f Binary files /dev/null and b/mods/env_sounds/sounds/env_sounds_lava.2.ogg differ diff --git a/mods/env_sounds/sounds/env_sounds_water.1.ogg b/mods/env_sounds/sounds/env_sounds_water.1.ogg new file mode 100644 index 0000000..aa80882 Binary files /dev/null and b/mods/env_sounds/sounds/env_sounds_water.1.ogg differ diff --git a/mods/env_sounds/sounds/env_sounds_water.2.ogg b/mods/env_sounds/sounds/env_sounds_water.2.ogg new file mode 100644 index 0000000..b3ff114 Binary files /dev/null and b/mods/env_sounds/sounds/env_sounds_water.2.ogg differ diff --git a/mods/env_sounds/sounds/env_sounds_water.3.ogg b/mods/env_sounds/sounds/env_sounds_water.3.ogg new file mode 100644 index 0000000..431a6ed Binary files /dev/null and b/mods/env_sounds/sounds/env_sounds_water.3.ogg differ diff --git a/mods/env_sounds/sounds/env_sounds_water.4.ogg b/mods/env_sounds/sounds/env_sounds_water.4.ogg new file mode 100644 index 0000000..56c2ee2 Binary files /dev/null and b/mods/env_sounds/sounds/env_sounds_water.4.ogg differ diff --git a/mods/farming/README.txt b/mods/farming/README.txt new file mode 100644 index 0000000..a6427d0 --- /dev/null +++ b/mods/farming/README.txt @@ -0,0 +1,43 @@ +Minetest Game mod: farming +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +webdesigner97 (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +Created by PilzAdam (CC BY 3.0): + farming_bread.png + farming_soil.png + farming_soil_wet.png + farming_soil_wet_side.png + farming_string.png + +Created by BlockMen (CC BY 3.0): + farming_tool_diamondhoe.png + farming_tool_mesehoe.png + farming_tool_bronzehoe.png + farming_tool_steelhoe.png + farming_tool_stonehoe.png + farming_tool_woodhoe.png + +Created by MasterGollum (CC BY 3.0): + farming_straw.png + +Created by Gambit (CC BY 3.0): + farming_wheat.png + farming_wheat_*.png + farming_cotton_*.png + farming_flour.png + farming_cotton_seed.png + farming_wheat_seed.png + +Created by Napiophelios (CC BY-SA 3.0): + farming_cotton.png + +Created by Extex101 (CC BY-SA 3.0): + farming_cotton_wild.png diff --git a/mods/farming/api.lua b/mods/farming/api.lua new file mode 100644 index 0000000..91d557c --- /dev/null +++ b/mods/farming/api.lua @@ -0,0 +1,401 @@ +-- farming/api.lua + +-- support for MT game translation. +local S = farming.get_translator + +-- Wear out hoes, place soil +-- TODO Ignore group:flower +farming.registered_plants = {} + +farming.hoe_on_use = function(itemstack, user, pointed_thing, uses) + local pt = pointed_thing + -- check if pointing at a node + if not pt then + return + end + if pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z} + local above = minetest.get_node(p) + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return + end + if not minetest.registered_nodes[above.name] then + return + end + + -- check if the node above the pointed thing is air + if above.name ~= "air" then + return + end + + -- check if pointing at soil + if minetest.get_item_group(under.name, "soil") ~= 1 then + return + end + + -- check if (wet) soil defined + local regN = minetest.registered_nodes + if regN[under.name].soil == nil or regN[under.name].soil.wet == nil or regN[under.name].soil.dry == nil then + return + end + + if minetest.is_protected(pt.under, user:get_player_name()) then + minetest.record_protection_violation(pt.under, user:get_player_name()) + return + end + if minetest.is_protected(pt.above, user:get_player_name()) then + minetest.record_protection_violation(pt.above, user:get_player_name()) + return + end + + -- turn the node into soil and play sound + minetest.set_node(pt.under, {name = regN[under.name].soil.dry}) + minetest.sound_play("default_dig_crumbly", { + pos = pt.under, + gain = 0.5, + }, true) + + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(user:get_player_name())) then + -- wear tool + local wdef = itemstack:get_definition() + itemstack:add_wear(65535/(uses-1)) + -- tool break sound + if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then + minetest.sound_play(wdef.sound.breaks, {pos = pt.above, + gain = 0.5}, true) + end + end + return itemstack +end + +-- Register new hoes +farming.register_hoe = function(name, def) + -- Check for : prefix (register new hoes in your mod's namespace) + if name:sub(1,1) ~= ":" then + name = ":" .. name + end + -- Check def table + if def.description == nil then + def.description = S("Hoe") + end + if def.inventory_image == nil then + def.inventory_image = "unknown_item.png" + end + if def.max_uses == nil then + def.max_uses = 30 + end + -- Register the tool + minetest.register_tool(name, { + description = def.description, + inventory_image = def.inventory_image, + on_use = function(itemstack, user, pointed_thing) + return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses) + end, + groups = def.groups, + sound = {breaks = "default_tool_breaks"}, + }) + -- Register its recipe + if def.recipe then + minetest.register_craft({ + output = name:sub(2), + recipe = def.recipe + }) + elseif def.material then + minetest.register_craft({ + output = name:sub(2), + recipe = { + {def.material, def.material}, + {"", "group:stick"}, + {"", "group:stick"} + } + }) + end +end + +-- how often node timers for plants will tick, +/- some random value +local function tick(pos) + minetest.get_node_timer(pos):start(math.random(166, 286)) +end +-- how often a growth failure tick is retried (e.g. too dark) +local function tick_again(pos) + minetest.get_node_timer(pos):start(math.random(40, 80)) +end + +-- Seed placement +farming.place_seed = function(itemstack, placer, pointed_thing, plantname) + local pt = pointed_thing + -- check if pointing at a node + if not pt then + return itemstack + end + if pt.type ~= "node" then + return itemstack + end + + local under = minetest.get_node(pt.under) + local above = minetest.get_node(pt.above) + + local player_name = placer and placer:get_player_name() or "" + + if minetest.is_protected(pt.under, player_name) then + minetest.record_protection_violation(pt.under, player_name) + return + end + if minetest.is_protected(pt.above, player_name) then + minetest.record_protection_violation(pt.above, player_name) + return + end + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return itemstack + end + if not minetest.registered_nodes[above.name] then + return itemstack + end + + -- check if pointing at the top of the node + if pt.above.y ~= pt.under.y+1 then + return itemstack + end + + -- check if you can replace the node above the pointed node + if not minetest.registered_nodes[above.name].buildable_to then + return itemstack + end + + -- check if pointing at soil + if minetest.get_item_group(under.name, "soil") < 2 then + return itemstack + end + + -- add the node and remove 1 item from the itemstack + minetest.log("action", player_name .. " places node " .. plantname .. " at " .. + minetest.pos_to_string(pt.above)) + minetest.add_node(pt.above, {name = plantname, param2 = 1}) + tick(pt.above) + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + return itemstack +end + +farming.grow_plant = function(pos, elapsed) + local node = minetest.get_node(pos) + local name = node.name + local def = minetest.registered_nodes[name] + + if not def.next_plant then + -- disable timer for fully grown plant + return + end + + -- grow seed + if minetest.get_item_group(node.name, "seed") and def.fertility then + local soil_node = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) + if not soil_node then + tick_again(pos) + return + end + -- omitted is a check for light, we assume seeds can germinate in the dark. + for _, v in pairs(def.fertility) do + if minetest.get_item_group(soil_node.name, v) ~= 0 then + local placenode = {name = def.next_plant} + if def.place_param2 then + placenode.param2 = def.place_param2 + end + minetest.swap_node(pos, placenode) + if minetest.registered_nodes[def.next_plant].next_plant then + tick(pos) + return + end + end + end + + return + end + + -- check if on wet soil + local below = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) + if minetest.get_item_group(below.name, "soil") < 3 then + tick_again(pos) + return + end + + -- check light + local light = minetest.get_node_light(pos) + if not light or light < def.minlight or light > def.maxlight then + tick_again(pos) + return + end + + -- grow + local placenode = {name = def.next_plant} + if def.place_param2 then + placenode.param2 = def.place_param2 + end + minetest.swap_node(pos, placenode) + + -- new timer needed? + if minetest.registered_nodes[def.next_plant].next_plant then + tick(pos) + end + return +end + +-- Register plants +farming.register_plant = function(name, def) + local mname = name:split(":")[1] + local pname = name:split(":")[2] + + -- Check def table + if not def.description then + def.description = S("Seed") + end + if not def.harvest_description then + def.harvest_description = pname:gsub("^%l", string.upper) + end + if not def.inventory_image then + def.inventory_image = "unknown_item.png" + end + if not def.steps then + return nil + end + if not def.minlight then + def.minlight = 1 + end + if not def.maxlight then + def.maxlight = 14 + end + if not def.fertility then + def.fertility = {} + end + + farming.registered_plants[pname] = def + + -- Register seed + local lbm_nodes = {mname .. ":seed_" .. pname} + local g = {seed = 1, snappy = 3, attached_node = 1, flammable = 2} + for k, v in pairs(def.fertility) do + g[v] = 1 + end + minetest.register_node(":" .. mname .. ":seed_" .. pname, { + description = def.description, + tiles = {def.inventory_image}, + inventory_image = def.inventory_image, + wield_image = def.inventory_image, + drawtype = "signlike", + groups = g, + paramtype = "light", + paramtype2 = "wallmounted", + place_param2 = def.place_param2 or nil, -- this isn't actually used for placement + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + fertility = def.fertility, + sounds = default.node_sound_dirt_defaults({ + dig = {name = "", gain = 0}, + dug = {name = "default_grass_footstep", gain = 0.2}, + place = {name = "default_place_node", gain = 0.25}, + }), + + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":seed_" .. pname) + end, + next_plant = mname .. ":" .. pname .. "_1", + on_timer = farming.grow_plant, + minlight = def.minlight, + maxlight = def.maxlight, + }) + + -- Register harvest + minetest.register_craftitem(":" .. mname .. ":" .. pname, { + description = def.harvest_description, + inventory_image = mname .. "_" .. pname .. ".png", + groups = def.groups or {flammable = 2}, + }) + + -- Register growing steps + for i = 1, def.steps do + local base_rarity = 1 + if def.steps ~= 1 then + base_rarity = 8 - (i - 1) * 7 / (def.steps - 1) + end + local drop = { + items = { + {items = {mname .. ":" .. pname}, rarity = base_rarity}, + {items = {mname .. ":" .. pname}, rarity = base_rarity * 2}, + {items = {mname .. ":seed_" .. pname}, rarity = base_rarity}, + {items = {mname .. ":seed_" .. pname}, rarity = base_rarity * 2}, + } + } + local nodegroups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1} + nodegroups[pname] = i + + local next_plant = nil + + if i < def.steps then + next_plant = mname .. ":" .. pname .. "_" .. (i + 1) + lbm_nodes[#lbm_nodes + 1] = mname .. ":" .. pname .. "_" .. i + end + + minetest.register_node(":" .. mname .. ":" .. pname .. "_" .. i, { + drawtype = "plantlike", + waving = 1, + tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"}, + paramtype = "light", + paramtype2 = def.paramtype2 or nil, + place_param2 = def.place_param2 or nil, + walkable = false, + buildable_to = true, + drop = drop, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + groups = nodegroups, + sounds = default.node_sound_leaves_defaults(), + next_plant = next_plant, + on_timer = farming.grow_plant, + minlight = def.minlight, + maxlight = def.maxlight, + }) + end + + -- replacement LBM for pre-nodetimer plants + minetest.register_lbm({ + name = ":" .. mname .. ":start_nodetimer_" .. pname, + nodenames = lbm_nodes, + action = function(pos, node) + tick_again(pos) + end, + }) + + -- Return + local r = { + seed = mname .. ":seed_" .. pname, + harvest = mname .. ":" .. pname + } + return r +end diff --git a/mods/farming/hoes.lua b/mods/farming/hoes.lua new file mode 100644 index 0000000..d005f6d --- /dev/null +++ b/mods/farming/hoes.lua @@ -0,0 +1,54 @@ +-- farming/hoes.lua + +-- support for MT game translation. +local S = farming.get_translator + +farming.register_hoe(":farming:hoe_wood", { + description = S("Wooden Hoe"), + inventory_image = "farming_tool_woodhoe.png", + max_uses = 30, + material = "group:wood", + groups = {hoe = 1, flammable = 2}, +}) + +farming.register_hoe(":farming:hoe_stone", { + description = S("Stone Hoe"), + inventory_image = "farming_tool_stonehoe.png", + max_uses = 90, + material = "group:stone", + groups = {hoe = 1} +}) + +farming.register_hoe(":farming:hoe_steel", { + description = S("Steel Hoe"), + inventory_image = "farming_tool_steelhoe.png", + max_uses = 500, + material = "default:steel_ingot", + groups = {hoe = 1} +}) + +-- The following are deprecated by removing the 'material' field to prevent +-- crafting and removing from creative inventory, to cause them to eventually +-- disappear from worlds. The registrations should be removed in a future +-- release. + +farming.register_hoe(":farming:hoe_bronze", { + description = S("Bronze Hoe"), + inventory_image = "farming_tool_bronzehoe.png", + max_uses = 220, + groups = {hoe = 1, not_in_creative_inventory = 1}, +}) + +farming.register_hoe(":farming:hoe_mese", { + description = S("Mese Hoe"), + inventory_image = "farming_tool_mesehoe.png", + max_uses = 350, + groups = {hoe = 1, not_in_creative_inventory = 1}, +}) + +farming.register_hoe(":farming:hoe_diamond", { + description = S("Diamond Hoe"), + inventory_image = "farming_tool_diamondhoe.png", + max_uses = 500, + groups = {hoe = 1, not_in_creative_inventory = 1}, +}) diff --git a/mods/farming/init.lua b/mods/farming/init.lua new file mode 100644 index 0000000..d328cb4 --- /dev/null +++ b/mods/farming/init.lua @@ -0,0 +1,171 @@ +-- farming/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("farming") + +-- Global farming namespace + +farming = {} +farming.path = minetest.get_modpath("farming") +farming.get_translator = S + +-- Load files + +dofile(farming.path .. "/api.lua") +dofile(farming.path .. "/nodes.lua") +dofile(farming.path .. "/hoes.lua") + + +-- Wheat + +farming.register_plant("farming:wheat", { + description = S("Wheat Seed"), + harvest_description = S("Wheat"), + paramtype2 = "meshoptions", + inventory_image = "farming_wheat_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {food_wheat = 1, flammable = 4}, + place_param2 = 3, +}) + +minetest.register_craftitem("farming:flour", { + description = S("Flour"), + inventory_image = "farming_flour.png", + groups = {food_flour = 1, flammable = 1}, +}) + +minetest.register_craftitem("farming:bread", { + description = S("Bread"), + inventory_image = "farming_bread.png", + on_use = minetest.item_eat(5), + groups = {food_bread = 1, flammable = 2}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flour", + recipe = {"farming:wheat", "farming:wheat", "farming:wheat", "farming:wheat"} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:bread", + recipe = "farming:flour" +}) + + +-- Cotton + +farming.register_plant("farming:cotton", { + description = S("Cotton Seed"), + harvest_description = S("Cotton"), + inventory_image = "farming_cotton_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland", "desert"}, + groups = {flammable = 4}, +}) + +minetest.register_decoration({ + name = "farming:cotton_wild", + deco_type = "simple", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = 0.1, + spread = {x = 50, y = 50, z = 50}, + seed = 4242, + octaves = 3, + persist = 0.7 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + decoration = "farming:cotton_wild", +}) + +minetest.register_craftitem("farming:string", { + description = S("String"), + inventory_image = "farming_string.png", + groups = {flammable = 2}, +}) + +minetest.register_craft({ + output = "wool:white", + recipe = { + {"farming:cotton", "farming:cotton"}, + {"farming:cotton", "farming:cotton"}, + } +}) + +minetest.register_craft({ + output = "farming:string 2", + recipe = { + {"farming:cotton"}, + {"farming:cotton"}, + } +}) + + +-- Straw + +minetest.register_craft({ + output = "farming:straw 3", + recipe = { + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:wheat", "farming:wheat"}, + } +}) + +minetest.register_craft({ + output = "farming:wheat 3", + recipe = { + {"farming:straw"}, + } +}) + + +-- Fuels + +minetest.register_craft({ + type = "fuel", + recipe = "farming:wheat", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:cotton", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:string", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:hoe_wood", + burntime = 5, +}) + + +-- Register farming items as dungeon loot + +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + {name = "farming:string", chance = 0.5, count = {1, 8}}, + {name = "farming:wheat", chance = 0.5, count = {2, 5}}, + {name = "farming:seed_cotton", chance = 0.4, count = {1, 4}, + types = {"normal"}}, + }) +end diff --git a/mods/farming/license.txt b/mods/farming/license.txt new file mode 100644 index 0000000..b9708de --- /dev/null +++ b/mods/farming/license.txt @@ -0,0 +1,95 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 webdesigner97 +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +License of media (textures) +--------------------------- + +Attribution 3.0 Unported (CC BY 3.0) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2015-2016 MasterGollum +Copyright (C) 2015-2016 Gambit + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2017 Napiophelios +Copyright (C) 2020 Extex101 + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/farming/locale/farming.de.tr b/mods/farming/locale/farming.de.tr new file mode 100644 index 0000000..6c63a92 --- /dev/null +++ b/mods/farming/locale/farming.de.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Wooden Hoe=Holzhacke +Stone Hoe=Steinhacke +Steel Hoe=Stahlhacke +Bronze Hoe=Bronzehacke +Mese Hoe=Mesehacke +Diamond Hoe=Diamanthacke +Wheat Seed=Weizensamen +Flour=Mehl +Bread=Brot +Cotton Seed=Baumwollsamen +String=Faden +Soil=Ackerboden +Wet Soil=Nasser Ackerboden +Savanna Soil=Savannenackerboden +Wet Savanna Soil=Nasser Savannenackerboden +Desert Sand Soil=Wüstensandackerboden +Wet Desert Sand Soil=Nasser Wüstensandackerboden +Straw=Stroh +Straw Stair=Strohtreppe +Straw Slab=Strohplatte +Inner Straw Stair=Innere Strohtreppe +Outer Straw Stair=Äußere Strohtreppe +Wheat=Weizen +Cotton=Baumwolle +Hoe=Hacke +Seed=Samen +Wild Cotton=Wilde Baumwolle diff --git a/mods/farming/locale/farming.es.tr b/mods/farming/locale/farming.es.tr new file mode 100644 index 0000000..8f95887 --- /dev/null +++ b/mods/farming/locale/farming.es.tr @@ -0,0 +1,26 @@ +# textdomain: farming +Wooden Hoe=Azada de madera +Stone Hoe=Azada de piedra +Steel Hoe=Azada de acero +Bronze Hoe=Azada de bronce +Mese Hoe=Azada de mese +Diamond Hoe=Azada de diamante +Wheat Seed=Semilla de trigo +Flour=Harina +Bread=Pan +Cotton Seed=Semilla de algodón +String=Hilo +Soil=Tierra de cultivo +Wet Soil=Tierra de cultivo humeda +Dry Soil=Tierra de cultivo seca +Wet Dry Soil=Tierra de cultivo seca-humeda +Desert Sand Soil=Tierra de cultivo de arena de desierto +Wet Desert Sand Soil=Tierra de cultivo de arena de desierto humeda +Straw=Paja +Straw Stair=Escalera de paja +Straw Slab=Losa de paja +Inner Straw Stair=Escalera de paja interior +Outer Straw Stair=Escalera de paja exterior +Wheat=Trigo +Cotton=Algodón +Wild Cotton=Algodón silvestre diff --git a/mods/farming/locale/farming.fr.tr b/mods/farming/locale/farming.fr.tr new file mode 100644 index 0000000..cd05997 --- /dev/null +++ b/mods/farming/locale/farming.fr.tr @@ -0,0 +1,25 @@ +# textdomain: farming +Wooden Hoe=Houe en bois +Stone Hoe=Houe en pierre +Steel Hoe=Houe en acier +Bronze Hoe=Houe en bronze +Mese Hoe=Houe en Mese +Diamond Hoe=Houe en diamant +Wheat Seed=Grain de blé +Flour=Farine +Bread=Pain +Cotton Seed=Graine de coton +String=Ficelle +Soil=Sol +Wet Soil=Sol humide +Dry Soil=Sol sec +Wet Dry Soil=Sol sec et humide +Desert Sand Soil=Sol de sable du désert +Wet Desert Sand Soil=Sol de sable du désert humide +Straw=Paille +Straw Stair=Escalier de paille +Straw Slab=Dalle de paille +Inner Straw Stair=Escalier intérieur en paille +Outer Straw Stair=Escalier extérieur en paille +Wheat=Blé +Cotton=Coton diff --git a/mods/farming/locale/farming.id.tr b/mods/farming/locale/farming.id.tr new file mode 100644 index 0000000..9904b6f --- /dev/null +++ b/mods/farming/locale/farming.id.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Soil=Tanah Tanam +Wet Soil=Tanah Tanam Basah +Savanna Soil=Tanah Tanam Sabana +Wet Savanna Soil=Tanah Tanam Sabana Basah +Desert Sand Soil=Pasir Tanam Gurun +Wet Desert Sand Soil=Pasir Tanam Gurun Basah +Straw=Jerami +Straw Stair=Tangga Jerami +Inner Straw Stair=Tangga Jerami Dalam +Outer Straw Stair=Tangga Jerami Luar +Straw Slab=Lempengan Jerami +Wild Cotton=Kapas Liar +Wheat Seed=Benih Gandum +Wheat=Gandum +Flour=Tepung +Bread=Roti +Cotton Seed=Benih Kapas +Cotton=Kapas +String=Benang +Wooden Hoe=Cangkul Kayu +Stone Hoe=Cangkul Batu +Steel Hoe=Cangkul Baja +Bronze Hoe=Cangkul Perunggu +Mese Hoe=Cangkul Mese +Diamond Hoe=Cangkul Berlian +Hoe=Cangkul +Seed=Benih diff --git a/mods/farming/locale/farming.it.tr b/mods/farming/locale/farming.it.tr new file mode 100644 index 0000000..95c1478 --- /dev/null +++ b/mods/farming/locale/farming.it.tr @@ -0,0 +1,25 @@ +# textdomain: farming +Wooden Hoe=Zappa di legno +Stone Hoe=Zappa di pietra +Steel Hoe=Zappa d'acciaio +Bronze Hoe=Zappa di bronzo +Mese Hoe=Zappa di mese +Diamond Hoe=Zappa di diamante +Wheat Seed=Seme di grano +Flour=Farina +Bread=Pane +Cotton Seed=Seme di cotone +String=Filo +Soil=Terreno +Wet Soil=Terreno bagnato +Dry Soil=Terreno asciutto +Wet Dry Soil=Terreno asciutto bagnato +Desert Sand Soil=Terreno di sabbia del deserto +Wet Desert Sand Soil=Terreno bagnato di sabbia del deserto +Straw=Paglia +Straw Stair=Scala di paglia +Inner Straw Stair=Scala di paglia interna +Outer Straw Stair=Scala di paglia esterna +Straw Slab=Lastra di paglia +Wheat=Grano +Cotton=Cotone \ No newline at end of file diff --git a/mods/farming/locale/farming.ms.tr b/mods/farming/locale/farming.ms.tr new file mode 100644 index 0000000..408f495 --- /dev/null +++ b/mods/farming/locale/farming.ms.tr @@ -0,0 +1,25 @@ +# textdomain: farming +Wooden Hoe=Cangkul Kayu +Stone Hoe=Cangkul Batu +Steel Hoe=Cangkul Keluli +Bronze Hoe=Cangkul Gangsa +Mese Hoe=Cangkul Mese +Diamond Hoe=Cangkul Intan +Wheat Seed=Benih Gandum +Flour=Tepung +Bread=Roti +Cotton Seed=Benih Kapas +String=Benang +Soil=Tanih +Wet Soil=Tanih Lembap +Dry Soil=Tanih Kering +Wet Dry Soil=Tanih Kering Lembap +Desert Sand Soil=Tanih Pasir Gurun +Wet Desert Sand Soil=Tanih Pasir Gurun Lembap +Straw=Jerami +Straw Stair=Tangga Jerami +Inner Straw Stair=Tangga Jerami Dalaman +Outer Straw Stair=Tangga Jerami Luaran +Straw Slab=Papak Jerami +Wheat=Gandum +Cotton=Kapas diff --git a/mods/farming/locale/farming.ru.tr b/mods/farming/locale/farming.ru.tr new file mode 100644 index 0000000..ad6249b --- /dev/null +++ b/mods/farming/locale/farming.ru.tr @@ -0,0 +1,25 @@ +# textdomain: farming +Wooden Hoe=Деревянная Мотыга +Stone Hoe=Каменная Мотыга +Steel Hoe=Стальная Мотыга +Bronze Hoe=Бронзовая Мотыга +Mese Hoe=Месе Мотыга +Diamond Hoe=Алмазная Мотыга +Wheat Seed=Семена Пшеницы +Flour=Мука +Bread=Хлеб +Cotton Seed=Семена Хлопка +String=Нить +Soil=Почва +Wet Soil=Влажная Почва +Dry Soil=Сухая Почва +Wet Dry Soil=Влажная Сухая Почва +Desert Sand Soil=Пустынная Песчаная Почва +Wet Desert Sand Soil=Влажная Пустынная Песчаная Почва +Straw=Солома +Straw Stair=Соломенная Ступень +Inner Straw Stair=Угловая Соломенная Ступень (Внутренний Угол) +Outer Straw Stair=Угловая Соломенная Ступень (Внешний Угол) +Straw Slab=Соломенная Плита +Wheat=Пшеница +Cotton=Хлопок diff --git a/mods/farming/locale/farming.se.tr b/mods/farming/locale/farming.se.tr new file mode 100644 index 0000000..6218e3a --- /dev/null +++ b/mods/farming/locale/farming.se.tr @@ -0,0 +1,25 @@ +# textdomain: farming +Wooden Hoe=Träsko +Stone Hoe=Stensko +Steel Hoe=Stålsko +Bronze Hoe=Bronssko +Mese Hoe=Mesesko +Diamond Hoe=Diamantsko +Wheat Seed=Vetefrö +Flour=Mjöl +Bread=Bröd +Cotton Seed=Bollumsfrö +String=Snöra +Soil=Odlningsmark +Wet Soil=Våt Odlningsmark +Dry Soil=Torr Odlningsmark +Wet Dry Soil=Våt Torr Odlningsmark +Desert Sand Soil=Öken Sand Odlningsmark +Wet Desert Sand Soil=Våt Öken Sand Odlningsmark +Straw=Halm +Straw Stair=Halmstrappa +Inner Straw Stair=Inre Halmstrappa +Outer Straw Stair=Yttre Halmstrappa +Straw Slab=Halmplatta +Wheat=Vete +Cotton=Bomull \ No newline at end of file diff --git a/mods/farming/locale/farming.sk.tr b/mods/farming/locale/farming.sk.tr new file mode 100644 index 0000000..e956601 --- /dev/null +++ b/mods/farming/locale/farming.sk.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Wooden Hoe=Drevená motyka +Stone Hoe=Kamenná motyka +Steel Hoe=Oceľová motyka +Bronze Hoe=Bronzová motyka +Mese Hoe=Mese motyka +Diamond Hoe=Diamantová motyka +Wheat Seed=Pšeničné semienko +Flour=Múka +Bread=Chlieb +Cotton Seed=Bavlnené semienko +String=Šňúra +Soil=Zemina +Wet Soil=Mokrá zemina +Savanna Soil=Zemina zo savany +Wet Savanna Soil=Morká zemina zo savany +Desert Sand Soil=Zemina s púšte +Wet Desert Sand Soil=Mokrá zemina s púšte +Straw=Slama +Straw Stair=Slamenné schody +Straw Slab=Slamenná doska +Inner Straw Stair=Vnútorné slamenné schodisko +Outer Straw Stair=Vonkajšie slamenné schodisko +Wheat=Pšenica +Cotton=Bavlna +Hoe=Motyka +Seed=Semienko +Wild Cotton=Divoká bavlna diff --git a/mods/farming/locale/farming.zh_CN.tr b/mods/farming/locale/farming.zh_CN.tr new file mode 100644 index 0000000..d856288 --- /dev/null +++ b/mods/farming/locale/farming.zh_CN.tr @@ -0,0 +1,25 @@ +# textdomain: farming +Wooden Hoe=木锄头 +Stone Hoe=石锄头 +Steel Hoe=铁锄头 +Bronze Hoe=青铜锄头 +Mese Hoe=黄石锄头 +Diamond Hoe=钻石锄头 +Wheat Seed=小麦种子 +Flour=面粉 +Bread=面包 +Cotton Seed=棉花种子 +String=线 +Soil=土 +Wet Soil=湿土 +Dry Soil=干土 +Wet Dry Soil=湿干土 +Desert Sand Soil=沙漠沙土 +Wet Desert Sand Soil=湿沙漠沙土 +Straw=稻草 +Straw Stair=稻草台阶 +Inner Straw Stair=稻草内楼梯 +Outer Straw Stair=稻草外楼梯 +Straw Slab=稻草板 +Wheat=小麦 +Cotton=棉 diff --git a/mods/farming/locale/farming.zh_TW.tr b/mods/farming/locale/farming.zh_TW.tr new file mode 100644 index 0000000..f1b7a7a --- /dev/null +++ b/mods/farming/locale/farming.zh_TW.tr @@ -0,0 +1,25 @@ +# textdomain: farming +Wooden Hoe=木鋤頭 +Stone Hoe=石鋤頭 +Steel Hoe=鐵鋤頭 +Bronze Hoe=青銅鋤頭 +Mese Hoe=黃石鋤頭 +Diamond Hoe=鑽石鋤頭 +Wheat Seed=小麥種子 +Flour=麵粉 +Bread=麵包 +Cotton Seed=棉花種子 +String=線 +Soil=土 +Wet Soil=溼土 +Dry Soil=乾土 +Wet Dry Soil=溼乾土 +Desert Sand Soil=沙漠沙土 +Wet Desert Sand Soil=溼沙漠沙土 +Straw=稻草 +Straw Stair=稻草臺階 +Inner Straw Stair=稻草內樓梯 +Outer Straw Stair=稻草外樓梯 +Straw Slab=稻草板 +Wheat=小麥 +Cotton=棉 diff --git a/mods/farming/locale/template.txt b/mods/farming/locale/template.txt new file mode 100644 index 0000000..2f4248b --- /dev/null +++ b/mods/farming/locale/template.txt @@ -0,0 +1,28 @@ +# textdomain: farming +Soil= +Wet Soil= +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil= +Wet Desert Sand Soil= +Straw= +Straw Stair= +Inner Straw Stair= +Outer Straw Stair= +Straw Slab= +Wild Cotton= +Wheat Seed= +Wheat= +Flour= +Bread= +Cotton Seed= +Cotton= +String= +Wooden Hoe= +Stone Hoe= +Steel Hoe= +Bronze Hoe= +Mese Hoe= +Diamond Hoe= +Hoe= +Seed= diff --git a/mods/farming/mod.conf b/mods/farming/mod.conf new file mode 100644 index 0000000..9a76a6a --- /dev/null +++ b/mods/farming/mod.conf @@ -0,0 +1,4 @@ +name = farming +description = Minetest Game mod: farming +depends = default, wool, stairs +optional_depends = dungeon_loot diff --git a/mods/farming/nodes.lua b/mods/farming/nodes.lua new file mode 100644 index 0000000..b5f90f9 --- /dev/null +++ b/mods/farming/nodes.lua @@ -0,0 +1,282 @@ +-- farming/nodes.lua + +-- support for MT game translation. +local S = farming.get_translator + +minetest.override_item("default:dirt", { + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_grass", { + soil = { + base = "default:dirt_with_grass", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_dry_grass", { + soil = { + base = "default:dirt_with_dry_grass", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_rainforest_litter", { + soil = { + base = "default:dirt_with_rainforest_litter", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_coniferous_litter", { + soil = { + base = "default:dirt_with_coniferous_litter", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dry_dirt", { + soil = { + base = "default:dry_dirt", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.override_item("default:dry_dirt_with_dry_grass", { + soil = { + base = "default:dry_dirt_with_dry_grass", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.register_node("farming:soil", { + description = S("Soil"), + tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"}, + drop = "default:dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.register_node("farming:soil_wet", { + description = S("Wet Soil"), + tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"}, + drop = "default:dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.register_node("farming:dry_soil", { + description = S("Savanna Soil"), + tiles = {"default_dry_dirt.png^farming_soil.png", "default_dry_dirt.png"}, + drop = "default:dry_dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dry_dirt", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.register_node("farming:dry_soil_wet", { + description = S("Wet Savanna Soil"), + tiles = {"default_dry_dirt.png^farming_soil_wet.png", "default_dry_dirt.png^farming_soil_wet_side.png"}, + drop = "default:dry_dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dry_dirt", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.override_item("default:desert_sand", { + groups = {crumbly=3, falling_node=1, sand=1, soil = 1}, + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) +minetest.register_node("farming:desert_sand_soil", { + description = S("Desert Sand Soil"), + drop = "default:desert_sand", + tiles = {"farming_desert_sand_soil.png", "default_desert_sand.png"}, + groups = {crumbly=3, not_in_creative_inventory = 1, falling_node=1, sand=1, soil = 2, desert = 1, field = 1}, + sounds = default.node_sound_sand_defaults(), + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) + +minetest.register_node("farming:desert_sand_soil_wet", { + description = S("Wet Desert Sand Soil"), + drop = "default:desert_sand", + tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"}, + groups = {crumbly=3, falling_node=1, sand=1, not_in_creative_inventory=1, soil=3, wet = 1, desert = 1, field = 1}, + sounds = default.node_sound_sand_defaults(), + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) + +minetest.register_node("farming:straw", { + description = S("Straw"), + tiles = {"farming_straw.png"}, + is_ground_content = false, + groups = {snappy=3, flammable=4, fall_damage_add_percent=-30}, + sounds = default.node_sound_leaves_defaults(), +}) + +-- Registered before the stairs so the stairs get fuel recipes. +minetest.register_craft({ + type = "fuel", + recipe = "farming:straw", + burntime = 3, +}) + +do + local recipe = "farming:straw" + local groups = {snappy = 3, flammable = 4} + local images = {"farming_straw.png"} + local sounds = default.node_sound_leaves_defaults() + + stairs.register_stair("straw", recipe, groups, images, S("Straw Stair"), + sounds, true) + stairs.register_stair_inner("straw", recipe, groups, images, "", + sounds, true, S("Inner Straw Stair")) + stairs.register_stair_outer("straw", recipe, groups, images, "", + sounds, true, S("Outer Straw Stair")) + stairs.register_slab("straw", recipe, groups, images, S("Straw Slab"), + sounds, true) +end + +minetest.register_abm({ + label = "Farming soil", + nodenames = {"group:field"}, + interval = 15, + chance = 4, + action = function(pos, node) + local n_def = minetest.registered_nodes[node.name] or nil + local wet = n_def.soil.wet or nil + local base = n_def.soil.base or nil + local dry = n_def.soil.dry or nil + if not n_def or not n_def.soil or not wet or not base or not dry then + return + end + + pos.y = pos.y + 1 + local nn = minetest.get_node_or_nil(pos) + if not nn or not nn.name then + return + end + local nn_def = minetest.registered_nodes[nn.name] or nil + pos.y = pos.y - 1 + + if nn_def and nn_def.walkable and minetest.get_item_group(nn.name, "plant") == 0 then + minetest.set_node(pos, {name = base}) + return + end + -- check if there is water nearby + local wet_lvl = minetest.get_item_group(node.name, "wet") + if minetest.find_node_near(pos, 3, {"group:water"}) then + -- if it is dry soil and not base node, turn it into wet soil + if wet_lvl == 0 then + minetest.set_node(pos, {name = wet}) + end + else + -- only turn back if there are no unloaded blocks (and therefore + -- possible water sources) nearby + if not minetest.find_node_near(pos, 3, {"ignore"}) then + -- turn it back into base if it is already dry + if wet_lvl == 0 then + -- only turn it back if there is no plant/seed on top of it + if minetest.get_item_group(nn.name, "plant") == 0 and minetest.get_item_group(nn.name, "seed") == 0 then + minetest.set_node(pos, {name = base}) + end + + -- if its wet turn it back into dry soil + elseif wet_lvl == 1 then + minetest.set_node(pos, {name = dry}) + end + end + end + end, +}) + + +-- Make default:grass_* occasionally drop wheat seed + +for i = 1, 5 do + minetest.override_item("default:grass_"..i, {drop = { + max_items = 1, + items = { + {items = {"farming:seed_wheat"}, rarity = 5}, + {items = {"default:grass_1"}}, + } + }}) +end + + +-- Make default:junglegrass occasionally drop cotton seed. + +-- This is the old source of cotton seeds that makes no sense. It is a leftover +-- from Mapgen V6 where junglegrass was the only plant available to be a source. +-- This source is kept for now to avoid disruption but should probably be +-- removed in future as players get used to the new source. + +minetest.override_item("default:junglegrass", {drop = { + max_items = 1, + items = { + {items = {"farming:seed_cotton"}, rarity = 8}, + {items = {"default:junglegrass"}}, + } +}}) + + +-- Wild cotton as a source of cotton seed + +minetest.register_node("farming:cotton_wild", { + description = S("Wild Cotton"), + drawtype = "plantlike", + waving = 1, + tiles = {"farming_cotton_wild.png"}, + inventory_image = "farming_cotton_wild.png", + wield_image = "farming_cotton_wild.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, attached_node = 1, flammable = 4}, + drop = "farming:seed_cotton", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16}, + }, +}) diff --git a/mods/farming/textures/farming_bread.png b/mods/farming/textures/farming_bread.png new file mode 100644 index 0000000..0c25678 Binary files /dev/null and b/mods/farming/textures/farming_bread.png differ diff --git a/mods/farming/textures/farming_cotton.png b/mods/farming/textures/farming_cotton.png new file mode 100644 index 0000000..8aa50e4 Binary files /dev/null and b/mods/farming/textures/farming_cotton.png differ diff --git a/mods/farming/textures/farming_cotton_1.png b/mods/farming/textures/farming_cotton_1.png new file mode 100644 index 0000000..5fc2180 Binary files /dev/null and b/mods/farming/textures/farming_cotton_1.png differ diff --git a/mods/farming/textures/farming_cotton_2.png b/mods/farming/textures/farming_cotton_2.png new file mode 100644 index 0000000..db4f4a3 Binary files /dev/null and b/mods/farming/textures/farming_cotton_2.png differ diff --git a/mods/farming/textures/farming_cotton_3.png b/mods/farming/textures/farming_cotton_3.png new file mode 100644 index 0000000..df3d7a7 Binary files /dev/null and b/mods/farming/textures/farming_cotton_3.png differ diff --git a/mods/farming/textures/farming_cotton_4.png b/mods/farming/textures/farming_cotton_4.png new file mode 100644 index 0000000..f314b07 Binary files /dev/null and b/mods/farming/textures/farming_cotton_4.png differ diff --git a/mods/farming/textures/farming_cotton_5.png b/mods/farming/textures/farming_cotton_5.png new file mode 100644 index 0000000..3e89085 Binary files /dev/null and b/mods/farming/textures/farming_cotton_5.png differ diff --git a/mods/farming/textures/farming_cotton_6.png b/mods/farming/textures/farming_cotton_6.png new file mode 100644 index 0000000..f4bd4fb Binary files /dev/null and b/mods/farming/textures/farming_cotton_6.png differ diff --git a/mods/farming/textures/farming_cotton_7.png b/mods/farming/textures/farming_cotton_7.png new file mode 100644 index 0000000..466d40a Binary files /dev/null and b/mods/farming/textures/farming_cotton_7.png differ diff --git a/mods/farming/textures/farming_cotton_8.png b/mods/farming/textures/farming_cotton_8.png new file mode 100644 index 0000000..f835ba5 Binary files /dev/null and b/mods/farming/textures/farming_cotton_8.png differ diff --git a/mods/farming/textures/farming_cotton_seed.png b/mods/farming/textures/farming_cotton_seed.png new file mode 100644 index 0000000..f1d5b8a Binary files /dev/null and b/mods/farming/textures/farming_cotton_seed.png differ diff --git a/mods/farming/textures/farming_cotton_wild.png b/mods/farming/textures/farming_cotton_wild.png new file mode 100644 index 0000000..0107ad4 Binary files /dev/null and b/mods/farming/textures/farming_cotton_wild.png differ diff --git a/mods/farming/textures/farming_desert_sand_soil.png b/mods/farming/textures/farming_desert_sand_soil.png new file mode 100644 index 0000000..3c09ef0 Binary files /dev/null and b/mods/farming/textures/farming_desert_sand_soil.png differ diff --git a/mods/farming/textures/farming_desert_sand_soil_wet.png b/mods/farming/textures/farming_desert_sand_soil_wet.png new file mode 100644 index 0000000..facc83e Binary files /dev/null and b/mods/farming/textures/farming_desert_sand_soil_wet.png differ diff --git a/mods/farming/textures/farming_desert_sand_soil_wet_side.png b/mods/farming/textures/farming_desert_sand_soil_wet_side.png new file mode 100644 index 0000000..41e5a04 Binary files /dev/null and b/mods/farming/textures/farming_desert_sand_soil_wet_side.png differ diff --git a/mods/farming/textures/farming_flour.png b/mods/farming/textures/farming_flour.png new file mode 100644 index 0000000..b1a9783 Binary files /dev/null and b/mods/farming/textures/farming_flour.png differ diff --git a/mods/farming/textures/farming_soil.png b/mods/farming/textures/farming_soil.png new file mode 100644 index 0000000..5cd3e68 Binary files /dev/null and b/mods/farming/textures/farming_soil.png differ diff --git a/mods/farming/textures/farming_soil_wet.png b/mods/farming/textures/farming_soil_wet.png new file mode 100644 index 0000000..0b4487d Binary files /dev/null and b/mods/farming/textures/farming_soil_wet.png differ diff --git a/mods/farming/textures/farming_soil_wet_side.png b/mods/farming/textures/farming_soil_wet_side.png new file mode 100644 index 0000000..f0b1bd4 Binary files /dev/null and b/mods/farming/textures/farming_soil_wet_side.png differ diff --git a/mods/farming/textures/farming_straw.png b/mods/farming/textures/farming_straw.png new file mode 100644 index 0000000..f9f5fe7 Binary files /dev/null and b/mods/farming/textures/farming_straw.png differ diff --git a/mods/farming/textures/farming_string.png b/mods/farming/textures/farming_string.png new file mode 100644 index 0000000..e2bbfd7 Binary files /dev/null and b/mods/farming/textures/farming_string.png differ diff --git a/mods/farming/textures/farming_tool_bronzehoe.png b/mods/farming/textures/farming_tool_bronzehoe.png new file mode 100644 index 0000000..2802d11 Binary files /dev/null and b/mods/farming/textures/farming_tool_bronzehoe.png differ diff --git a/mods/farming/textures/farming_tool_diamondhoe.png b/mods/farming/textures/farming_tool_diamondhoe.png new file mode 100644 index 0000000..66f1042 Binary files /dev/null and b/mods/farming/textures/farming_tool_diamondhoe.png differ diff --git a/mods/farming/textures/farming_tool_mesehoe.png b/mods/farming/textures/farming_tool_mesehoe.png new file mode 100644 index 0000000..4534fba Binary files /dev/null and b/mods/farming/textures/farming_tool_mesehoe.png differ diff --git a/mods/farming/textures/farming_tool_steelhoe.png b/mods/farming/textures/farming_tool_steelhoe.png new file mode 100644 index 0000000..d057af2 Binary files /dev/null and b/mods/farming/textures/farming_tool_steelhoe.png differ diff --git a/mods/farming/textures/farming_tool_stonehoe.png b/mods/farming/textures/farming_tool_stonehoe.png new file mode 100644 index 0000000..55d8123 Binary files /dev/null and b/mods/farming/textures/farming_tool_stonehoe.png differ diff --git a/mods/farming/textures/farming_tool_woodhoe.png b/mods/farming/textures/farming_tool_woodhoe.png new file mode 100644 index 0000000..a287152 Binary files /dev/null and b/mods/farming/textures/farming_tool_woodhoe.png differ diff --git a/mods/farming/textures/farming_wheat.png b/mods/farming/textures/farming_wheat.png new file mode 100644 index 0000000..1e0ad3b Binary files /dev/null and b/mods/farming/textures/farming_wheat.png differ diff --git a/mods/farming/textures/farming_wheat_1.png b/mods/farming/textures/farming_wheat_1.png new file mode 100644 index 0000000..c16ad94 Binary files /dev/null and b/mods/farming/textures/farming_wheat_1.png differ diff --git a/mods/farming/textures/farming_wheat_2.png b/mods/farming/textures/farming_wheat_2.png new file mode 100644 index 0000000..baddb4c Binary files /dev/null and b/mods/farming/textures/farming_wheat_2.png differ diff --git a/mods/farming/textures/farming_wheat_3.png b/mods/farming/textures/farming_wheat_3.png new file mode 100644 index 0000000..36ebb19 Binary files /dev/null and b/mods/farming/textures/farming_wheat_3.png differ diff --git a/mods/farming/textures/farming_wheat_4.png b/mods/farming/textures/farming_wheat_4.png new file mode 100644 index 0000000..735ed77 Binary files /dev/null and b/mods/farming/textures/farming_wheat_4.png differ diff --git a/mods/farming/textures/farming_wheat_5.png b/mods/farming/textures/farming_wheat_5.png new file mode 100644 index 0000000..f40b5f0 Binary files /dev/null and b/mods/farming/textures/farming_wheat_5.png differ diff --git a/mods/farming/textures/farming_wheat_6.png b/mods/farming/textures/farming_wheat_6.png new file mode 100644 index 0000000..e9c78e0 Binary files /dev/null and b/mods/farming/textures/farming_wheat_6.png differ diff --git a/mods/farming/textures/farming_wheat_7.png b/mods/farming/textures/farming_wheat_7.png new file mode 100644 index 0000000..cc26ca9 Binary files /dev/null and b/mods/farming/textures/farming_wheat_7.png differ diff --git a/mods/farming/textures/farming_wheat_8.png b/mods/farming/textures/farming_wheat_8.png new file mode 100644 index 0000000..d050093 Binary files /dev/null and b/mods/farming/textures/farming_wheat_8.png differ diff --git a/mods/farming/textures/farming_wheat_seed.png b/mods/farming/textures/farming_wheat_seed.png new file mode 100644 index 0000000..a9031fb Binary files /dev/null and b/mods/farming/textures/farming_wheat_seed.png differ diff --git a/mods/fire/README.txt b/mods/fire/README.txt new file mode 100644 index 0000000..25ba26e --- /dev/null +++ b/mods/fire/README.txt @@ -0,0 +1,35 @@ +Minetest Game mod: fire +======================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures and sounds) +-------------------------------------- +Everything not listed in here: +Copyright (C) 2012 Perttu Ahola (celeron55) (CC BY-SA 3.0) + +Muadtralk (CC BY-SA 3.0) + fire_basic_flame_animated.png + +Gambit (CC BY-SA 3.0) + fire_flint_steel.png + +dobroide (CC BY 3.0) +http://www.freesound.org/people/dobroide/sounds/4211/ + fire_small.ogg + +Dynamicell (CC BY 3.0) +http://www.freesound.org/people/Dynamicell/sounds/17548/ + fire_large.ogg + fire_fire.*.ogg + +fire_small.ogg and fire_large.ogg are unused but kept temporarily to not break +other mods that may use them. + +Benboncan (CC BY 3.0) +https://www.freesound.org/people/Benboncan/sounds/66457/ + fire_flint_and_steel.ogg diff --git a/mods/fire/init.lua b/mods/fire/init.lua new file mode 100644 index 0000000..b69a731 --- /dev/null +++ b/mods/fire/init.lua @@ -0,0 +1,308 @@ +-- fire/init.lua + +-- Global namespace for functions +fire = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("fire") + +-- 'Enable fire' setting +local fire_enabled = minetest.settings:get_bool("enable_fire") +if fire_enabled == nil then + -- enable_fire setting not specified, check for disable_fire + local fire_disabled = minetest.settings:get_bool("disable_fire") + if fire_disabled == nil then + -- Neither setting specified, check whether singleplayer + fire_enabled = minetest.is_singleplayer() + else + fire_enabled = not fire_disabled + end +end + +-- +-- Items +-- + +-- Flood flame function +local function flood_flame(pos, _, newnode) + -- Play flame extinguish sound if liquid is not an 'igniter' + if minetest.get_item_group(newnode.name, "igniter") == 0 then + minetest.sound_play("fire_extinguish_flame", + {pos = pos, max_hear_distance = 16, gain = 0.15}, true) + end + -- Remove the flame + return false +end + +-- Flame nodes +local fire_node = { + drawtype = "firelike", + tiles = {{ + name = "fire_basic_flame_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1 + }} + }, + inventory_image = "fire_basic_flame.png", + paramtype = "light", + light_source = 13, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + floodable = true, + damage_per_second = 4, + groups = {igniter = 2, dig_immediate = 3, fire = 1}, + drop = "", + on_flood = flood_flame +} + +-- Basic flame node +local flame_fire_node = table.copy(fire_node) +flame_fire_node.description = S("Fire") +flame_fire_node.groups.not_in_creative_inventory = 1 +flame_fire_node.on_timer = function(pos) + if not minetest.find_node_near(pos, 1, {"group:flammable"}) then + minetest.remove_node(pos) + return + end + -- Restart timer + return true +end +flame_fire_node.on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(30, 60)) +end + +minetest.register_node("fire:basic_flame", flame_fire_node) + +-- Permanent flame node +local permanent_fire_node = table.copy(fire_node) +permanent_fire_node.description = S("Permanent Fire") + +minetest.register_node("fire:permanent_flame", permanent_fire_node) + +-- Flint and Steel +minetest.register_tool("fire:flint_and_steel", { + description = S("Flint and Steel"), + inventory_image = "fire_flint_steel.png", + sound = {breaks = "default_tool_breaks"}, + + on_use = function(itemstack, user, pointed_thing) + local sound_pos = pointed_thing.above or user:get_pos() + minetest.sound_play("fire_flint_and_steel", + {pos = sound_pos, gain = 0.5, max_hear_distance = 8}, true) + local player_name = user:get_player_name() + if pointed_thing.type == "node" then + local node_under = minetest.get_node(pointed_thing.under).name + local nodedef = minetest.registered_nodes[node_under] + if not nodedef then + return + end + if minetest.is_protected(pointed_thing.under, player_name) then + minetest.chat_send_player(player_name, "This area is protected") + return + end + if nodedef.on_ignite then + nodedef.on_ignite(pointed_thing.under, user) + elseif minetest.get_item_group(node_under, "flammable") >= 1 + and minetest.get_node(pointed_thing.above).name == "air" then + minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"}) + end + end + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + -- Wear tool + local wdef = itemstack:get_definition() + itemstack:add_wear(1000) + + -- Tool break sound + if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then + minetest.sound_play(wdef.sound.breaks, + {pos = sound_pos, gain = 0.5}, true) + end + return itemstack + end + end +}) + +minetest.register_craft({ + output = "fire:flint_and_steel", + recipe = { + {"default:flint", "default:steel_ingot"} + } +}) + +-- Override coalblock to enable permanent flame above +-- Coalblock is non-flammable to avoid unwanted basic_flame nodes +minetest.override_item("default:coalblock", { + after_destruct = function(pos) + pos.y = pos.y + 1 + if minetest.get_node(pos).name == "fire:permanent_flame" then + minetest.remove_node(pos) + end + end, + on_ignite = function(pos) + local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.get_node(flame_pos).name == "air" then + minetest.set_node(flame_pos, {name = "fire:permanent_flame"}) + end + end +}) + + +-- +-- Sound +-- + +-- Enable if no setting present +local flame_sound = minetest.settings:get_bool("flame_sound", true) + +if flame_sound then + local handles = {} + local timer = 0 + + -- Parameters + local radius = 8 -- Flame node search radius around player + local cycle = 3 -- Cycle time for sound updates + + -- Update sound for player + function fire.update_player_sound(player) + local player_name = player:get_player_name() + -- Search for flame nodes in radius around player + local ppos = player:get_pos() + local areamin = vector.subtract(ppos, radius) + local areamax = vector.add(ppos, radius) + local fpos, num = minetest.find_nodes_in_area( + areamin, + areamax, + {"fire:basic_flame", "fire:permanent_flame"} + ) + -- Total number of flames in radius + local flames = (num["fire:basic_flame"] or 0) + + (num["fire:permanent_flame"] or 0) + -- Stop previous sound + if handles[player_name] then + minetest.sound_stop(handles[player_name]) + handles[player_name] = nil + end + -- If flames + if flames > 0 then + -- Find centre of flame positions + local fposmid = fpos[1] + -- If more than 1 flame + if #fpos > 1 then + local fposmin = areamax + local fposmax = areamin + for i = 1, #fpos do + local fposi = fpos[i] + if fposi.x > fposmax.x then + fposmax.x = fposi.x + end + if fposi.y > fposmax.y then + fposmax.y = fposi.y + end + if fposi.z > fposmax.z then + fposmax.z = fposi.z + end + if fposi.x < fposmin.x then + fposmin.x = fposi.x + end + if fposi.y < fposmin.y then + fposmin.y = fposi.y + end + if fposi.z < fposmin.z then + fposmin.z = fposi.z + end + end + fposmid = vector.divide(vector.add(fposmin, fposmax), 2) + end + -- Play sound + local handle = minetest.sound_play("fire_fire", { + pos = fposmid, + to_player = player_name, + gain = math.min(0.06 * (1 + flames * 0.125), 0.18), + max_hear_distance = 32, + loop = true -- In case of lag + }) + -- Store sound handle for this player + if handle then + handles[player_name] = handle + end + end + end + + -- Cycle for updating players sounds + minetest.register_globalstep(function(dtime) + timer = timer + dtime + if timer < cycle then + return + end + + timer = 0 + local players = minetest.get_connected_players() + for n = 1, #players do + fire.update_player_sound(players[n]) + end + end) + + -- Stop sound and clear handle on player leave + minetest.register_on_leaveplayer(function(player) + local player_name = player:get_player_name() + if handles[player_name] then + minetest.sound_stop(handles[player_name]) + handles[player_name] = nil + end + end) +end + + +-- Deprecated function kept temporarily to avoid crashes if mod fire nodes call it +function fire.update_sounds_around() end + +-- +-- ABMs +-- + +if fire_enabled then + -- Ignite neighboring nodes, add basic flames + minetest.register_abm({ + label = "Ignite flame", + nodenames = {"group:flammable"}, + neighbors = {"group:igniter"}, + interval = 7, + chance = 12, + catch_up = false, + action = function(pos) + local p = minetest.find_node_near(pos, 1, {"air"}) + if p then + minetest.set_node(p, {name = "fire:basic_flame"}) + end + end + }) + + -- Remove flammable nodes around basic flame + minetest.register_abm({ + label = "Remove flammable nodes", + nodenames = {"fire:basic_flame"}, + neighbors = "group:flammable", + interval = 5, + chance = 18, + catch_up = false, + action = function(pos) + local p = minetest.find_node_near(pos, 1, {"group:flammable"}) + if not p then + return + end + local flammable_node = minetest.get_node(p) + local def = minetest.registered_nodes[flammable_node.name] + if def.on_burn then + def.on_burn(p) + else + minetest.remove_node(p) + minetest.check_for_falling(p) + end + end + }) +end diff --git a/mods/fire/license.txt b/mods/fire/license.txt new file mode 100644 index 0000000..43f9cd7 --- /dev/null +++ b/mods/fire/license.txt @@ -0,0 +1,84 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2012-2016 celeron55, Perttu Ahola +Copyright (C) 2012-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures and sounds) +--------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Muadtralk +Copyright (C) 2013-2016 Gambit + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) +Copyright (C) 2005 dobroide +Copyright (C) 2006 Dynamicell +Copyright (C) 2009 Benboncan + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ diff --git a/mods/fire/locale/fire.de.tr b/mods/fire/locale/fire.de.tr new file mode 100644 index 0000000..dad7c34 --- /dev/null +++ b/mods/fire/locale/fire.de.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Feuer +Permanent Fire=Permanentes Feuer +Flint and Steel=Feuerstein und Stahl diff --git a/mods/fire/locale/fire.es.tr b/mods/fire/locale/fire.es.tr new file mode 100644 index 0000000..8c1b604 --- /dev/null +++ b/mods/fire/locale/fire.es.tr @@ -0,0 +1,3 @@ +# textdomain: fire +Permanent Flame=Llama permanente +Flint and Steel=Yesca y pedernal diff --git a/mods/fire/locale/fire.fr.tr b/mods/fire/locale/fire.fr.tr new file mode 100644 index 0000000..268e823 --- /dev/null +++ b/mods/fire/locale/fire.fr.tr @@ -0,0 +1,3 @@ +# textdomain: fire +Permanent Flame=Flamme permanente +Flint and Steel=Briquet à silex en acier diff --git a/mods/fire/locale/fire.id.tr b/mods/fire/locale/fire.id.tr new file mode 100644 index 0000000..60c1c01 --- /dev/null +++ b/mods/fire/locale/fire.id.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Api +Permanent Fire=Api Abadi +Flint and Steel=Pemantik diff --git a/mods/fire/locale/fire.it.tr b/mods/fire/locale/fire.it.tr new file mode 100644 index 0000000..03e8c87 --- /dev/null +++ b/mods/fire/locale/fire.it.tr @@ -0,0 +1,3 @@ +# textdomain: fire +Permanent Flame=Fiamma permanente +Flint and Steel=Acciarino \ No newline at end of file diff --git a/mods/fire/locale/fire.ms.tr b/mods/fire/locale/fire.ms.tr new file mode 100644 index 0000000..67b5bbe --- /dev/null +++ b/mods/fire/locale/fire.ms.tr @@ -0,0 +1,3 @@ +# textdomain: fire +Permanent Flame=Api Abadi +Flint and Steel=Pemetik Api diff --git a/mods/fire/locale/fire.ru.tr b/mods/fire/locale/fire.ru.tr new file mode 100644 index 0000000..3f4f3b3 --- /dev/null +++ b/mods/fire/locale/fire.ru.tr @@ -0,0 +1,3 @@ +# textdomain: fire +Permanent Flame=Вечный Огонь +Flint and Steel=Огниво diff --git a/mods/fire/locale/fire.se.tr b/mods/fire/locale/fire.se.tr new file mode 100644 index 0000000..622925d --- /dev/null +++ b/mods/fire/locale/fire.se.tr @@ -0,0 +1,3 @@ +# textdomain: fire +Permanent Flame=Permanent Eld +Flint and Steel=Flinta och Stål \ No newline at end of file diff --git a/mods/fire/locale/fire.sk.tr b/mods/fire/locale/fire.sk.tr new file mode 100644 index 0000000..125c860 --- /dev/null +++ b/mods/fire/locale/fire.sk.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Oheň +Permanent Fire=Stály oheň +Flint and Steel=Pazúrik a ocieľka diff --git a/mods/fire/locale/fire.zh_CN.tr b/mods/fire/locale/fire.zh_CN.tr new file mode 100644 index 0000000..b28157e --- /dev/null +++ b/mods/fire/locale/fire.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Permanent Fire=永久火焰 +Flint and Steel=火石和钢 +Fire=火焰 diff --git a/mods/fire/locale/fire.zh_TW.tr b/mods/fire/locale/fire.zh_TW.tr new file mode 100644 index 0000000..2e7e9dd --- /dev/null +++ b/mods/fire/locale/fire.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Permanent Fire=永久火焰 +Flint and Steel=火石和鋼 +Fire=火焰 diff --git a/mods/fire/locale/template.txt b/mods/fire/locale/template.txt new file mode 100644 index 0000000..e4e44e7 --- /dev/null +++ b/mods/fire/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: fire +Fire= +Permanent Fire= +Flint and Steel= diff --git a/mods/fire/mod.conf b/mods/fire/mod.conf new file mode 100644 index 0000000..c70f23b --- /dev/null +++ b/mods/fire/mod.conf @@ -0,0 +1,3 @@ +name = fire +description = Minetest Game mod: fire +depends = default diff --git a/mods/fire/sounds/fire_extinguish_flame.1.ogg b/mods/fire/sounds/fire_extinguish_flame.1.ogg new file mode 100644 index 0000000..42506dd Binary files /dev/null and b/mods/fire/sounds/fire_extinguish_flame.1.ogg differ diff --git a/mods/fire/sounds/fire_extinguish_flame.2.ogg b/mods/fire/sounds/fire_extinguish_flame.2.ogg new file mode 100644 index 0000000..2747ab8 Binary files /dev/null and b/mods/fire/sounds/fire_extinguish_flame.2.ogg differ diff --git a/mods/fire/sounds/fire_extinguish_flame.3.ogg b/mods/fire/sounds/fire_extinguish_flame.3.ogg new file mode 100644 index 0000000..8baeac3 Binary files /dev/null and b/mods/fire/sounds/fire_extinguish_flame.3.ogg differ diff --git a/mods/fire/sounds/fire_fire.1.ogg b/mods/fire/sounds/fire_fire.1.ogg new file mode 100644 index 0000000..cbfee4c Binary files /dev/null and b/mods/fire/sounds/fire_fire.1.ogg differ diff --git a/mods/fire/sounds/fire_fire.2.ogg b/mods/fire/sounds/fire_fire.2.ogg new file mode 100644 index 0000000..e8d0eb1 Binary files /dev/null and b/mods/fire/sounds/fire_fire.2.ogg differ diff --git a/mods/fire/sounds/fire_fire.3.ogg b/mods/fire/sounds/fire_fire.3.ogg new file mode 100644 index 0000000..5cad3d9 Binary files /dev/null and b/mods/fire/sounds/fire_fire.3.ogg differ diff --git a/mods/fire/sounds/fire_flint_and_steel.ogg b/mods/fire/sounds/fire_flint_and_steel.ogg new file mode 100644 index 0000000..6996e16 Binary files /dev/null and b/mods/fire/sounds/fire_flint_and_steel.ogg differ diff --git a/mods/fire/sounds/fire_large.ogg b/mods/fire/sounds/fire_large.ogg new file mode 100644 index 0000000..fe78e62 Binary files /dev/null and b/mods/fire/sounds/fire_large.ogg differ diff --git a/mods/fire/sounds/fire_small.ogg b/mods/fire/sounds/fire_small.ogg new file mode 100644 index 0000000..5aac595 Binary files /dev/null and b/mods/fire/sounds/fire_small.ogg differ diff --git a/mods/fire/textures/fire_basic_flame.png b/mods/fire/textures/fire_basic_flame.png new file mode 100644 index 0000000..484bcb1 Binary files /dev/null and b/mods/fire/textures/fire_basic_flame.png differ diff --git a/mods/fire/textures/fire_basic_flame_animated.png b/mods/fire/textures/fire_basic_flame_animated.png new file mode 100644 index 0000000..b01f703 Binary files /dev/null and b/mods/fire/textures/fire_basic_flame_animated.png differ diff --git a/mods/fire/textures/fire_flint_steel.png b/mods/fire/textures/fire_flint_steel.png new file mode 100644 index 0000000..9d32d85 Binary files /dev/null and b/mods/fire/textures/fire_flint_steel.png differ diff --git a/mods/fireflies/README.txt b/mods/fireflies/README.txt new file mode 100644 index 0000000..7382578 --- /dev/null +++ b/mods/fireflies/README.txt @@ -0,0 +1,22 @@ +Minetest Game mod: fireflies +============================ +Adds fireflies to the world on mapgen, which can then be caught in a net and placed in +bottles to provide light. + +Authors of source code +---------------------- +Shara RedCat (MIT) + +Authors of media (textures) +--------------------------- +Shara RedCat (CC BY-SA 3.0): + fireflies_firefly.png + fireflies_firefly_animated.png + fireflies_bugnet.png + fireflies_bottle.png + fireflies_bottle_animated.png + +fireflies_bugnet.png is modified from a texture by tenplus1 (CC0) + +fireflies_bottle.png and fireflies_bottle_animated.png are +modified from a texture by Vanessa Ezekowitz (CC BY-SA 3.0) \ No newline at end of file diff --git a/mods/fireflies/init.lua b/mods/fireflies/init.lua new file mode 100644 index 0000000..0d70630 --- /dev/null +++ b/mods/fireflies/init.lua @@ -0,0 +1,290 @@ +-- firefly/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("fireflies") + + +minetest.register_node("fireflies:firefly", { + description = S("Firefly"), + drawtype = "plantlike", + tiles = {{ + name = "fireflies_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "fireflies_firefly.png", + wield_image = "fireflies_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "fireflies:firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "fireflies:hidden_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("fireflies:hidden_firefly", { + description = S("Hidden Firefly"), + drawtype = "airlike", + inventory_image = "fireflies_firefly.png^default_invisible_node_overlay.png", + wield_image = "fireflies_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "fireflies:hidden_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "fireflies:firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + + +-- bug net +minetest.register_tool("fireflies:bug_net", { + description = S("Bug Net"), + inventory_image = "fireflies_bugnet.png", + on_use = function(itemstack, player, pointed_thing) + if not pointed_thing or pointed_thing.type ~= "node" or + minetest.is_protected(pointed_thing.under, player:get_player_name()) then + return + end + local node_name = minetest.get_node(pointed_thing.under).name + local inv = player:get_inventory() + if minetest.get_item_group(node_name, "catchable") == 1 then + minetest.set_node(pointed_thing.under, {name = "air"}) + local stack = ItemStack(node_name.." 1") + local leftover = inv:add_item("main", stack) + if leftover:get_count() > 0 then + minetest.add_item(pointed_thing.under, node_name.." 1") + end + end + if not (creative and creative.is_enabled_for(player:get_player_name())) then + itemstack:add_wear(256) + return itemstack + end + end +}) + +minetest.register_craft( { + output = "fireflies:bug_net", + recipe = { + {"farming:string", "farming:string"}, + {"farming:string", "farming:string"}, + {"group:stick", ""} + } +}) + + +-- firefly in a bottle +minetest.register_node("fireflies:firefly_bottle", { + description = S("Firefly in a Bottle"), + inventory_image = "fireflies_bottle.png", + wield_image = "fireflies_bottle.png", + tiles = {{ + name = "fireflies_bottle_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + light_source = 9, + walkable = false, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + sounds = default.node_sound_glass_defaults(), + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + local lower_pos = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.is_protected(pos, player:get_player_name()) or + minetest.get_node(lower_pos).name ~= "air" then + return + end + + local upper_pos = {x = pos.x, y = pos.y + 2, z = pos.z} + local firefly_pos + + if not minetest.is_protected(upper_pos, player:get_player_name()) and + minetest.get_node(upper_pos).name == "air" then + firefly_pos = upper_pos + elseif not minetest.is_protected(lower_pos, player:get_player_name()) then + firefly_pos = lower_pos + end + + if firefly_pos then + minetest.set_node(pos, {name = "vessels:glass_bottle"}) + minetest.set_node(firefly_pos, {name = "fireflies:firefly"}) + minetest.get_node_timer(firefly_pos):start(1) + end + end +}) + +minetest.register_craft( { + output = "fireflies:firefly_bottle", + recipe = { + {"fireflies:firefly"}, + {"vessels:glass_bottle"} + } +}) + + +-- register fireflies as decorations + +if minetest.get_mapgen_setting("mg_name") == "v6" then + + minetest.register_decoration({ + name = "fireflies:firefly_low", + deco_type = "simple", + place_on = "default:dirt_with_grass", + place_offset_y = 2, + sidelen = 80, + fill_ratio = 0.0002, + y_max = 31000, + y_min = 1, + decoration = "fireflies:hidden_firefly", + }) + + minetest.register_decoration({ + name = "fireflies:firefly_high", + deco_type = "simple", + place_on = "default:dirt_with_grass", + place_offset_y = 3, + sidelen = 80, + fill_ratio = 0.0002, + y_max = 31000, + y_min = 1, + decoration = "fireflies:hidden_firefly", + }) + +else + + minetest.register_decoration({ + name = "fireflies:firefly_low", + deco_type = "simple", + place_on = { + "default:dirt_with_grass", + "default:dirt_with_coniferous_litter", + "default:dirt_with_rainforest_litter", + "default:dirt" + }, + place_offset_y = 2, + sidelen = 80, + fill_ratio = 0.0005, + biomes = { + "deciduous_forest", + "coniferous_forest", + "rainforest", + "rainforest_swamp" + }, + y_max = 31000, + y_min = -1, + decoration = "fireflies:hidden_firefly", + }) + + minetest.register_decoration({ + name = "fireflies:firefly_high", + deco_type = "simple", + place_on = { + "default:dirt_with_grass", + "default:dirt_with_coniferous_litter", + "default:dirt_with_rainforest_litter", + "default:dirt" + }, + place_offset_y = 3, + sidelen = 80, + fill_ratio = 0.0005, + biomes = { + "deciduous_forest", + "coniferous_forest", + "rainforest", + "rainforest_swamp" + }, + y_max = 31000, + y_min = -1, + decoration = "fireflies:hidden_firefly", + }) + +end + + +-- get decoration IDs +local firefly_low = minetest.get_decoration_id("fireflies:firefly_low") +local firefly_high = minetest.get_decoration_id("fireflies:firefly_high") + +minetest.set_gen_notify({decoration = true}, {firefly_low, firefly_high}) + +-- start nodetimers +minetest.register_on_generated(function(minp, maxp, blockseed) + local gennotify = minetest.get_mapgen_object("gennotify") + local poslist = {} + + for _, pos in ipairs(gennotify["decoration#"..firefly_low] or {}) do + local firefly_low_pos = {x = pos.x, y = pos.y + 3, z = pos.z} + table.insert(poslist, firefly_low_pos) + end + for _, pos in ipairs(gennotify["decoration#"..firefly_high] or {}) do + local firefly_high_pos = {x = pos.x, y = pos.y + 4, z = pos.z} + table.insert(poslist, firefly_high_pos) + end + + if #poslist ~= 0 then + for i = 1, #poslist do + local pos = poslist[i] + minetest.get_node_timer(pos):start(1) + end + end +end) diff --git a/mods/fireflies/license.txt b/mods/fireflies/license.txt new file mode 100644 index 0000000..eebdad6 --- /dev/null +++ b/mods/fireflies/license.txt @@ -0,0 +1,58 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (c) 2018 Shara RedCat + +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. + +For more details: +https://opensource.org/licenses/MIT + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2018 Shara RedCat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ \ No newline at end of file diff --git a/mods/fireflies/locale/fireflies.de.tr b/mods/fireflies/locale/fireflies.de.tr new file mode 100644 index 0000000..c5d116a --- /dev/null +++ b/mods/fireflies/locale/fireflies.de.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Glühwürmchen +Hidden Firefly=Verborgenes Glühwürmchen +Bug Net=Insektennetz +Firefly in a Bottle=Glühwürmchen in einer Flasche diff --git a/mods/fireflies/locale/fireflies.es.tr b/mods/fireflies/locale/fireflies.es.tr new file mode 100644 index 0000000..95d053e --- /dev/null +++ b/mods/fireflies/locale/fireflies.es.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Luciérnaga +Hidden Firefly=Luciérnaga oculta +Bug Net=Red de insectos +Firefly in a Bottle=Luciérnaga en botella diff --git a/mods/fireflies/locale/fireflies.fr.tr b/mods/fireflies/locale/fireflies.fr.tr new file mode 100644 index 0000000..3deda66 --- /dev/null +++ b/mods/fireflies/locale/fireflies.fr.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Luciole +Hidden Firefly=Luciole cachée +Bug Net=Filet à papillon +Firefly in a Bottle=Luciole en bouteille diff --git a/mods/fireflies/locale/fireflies.id.tr b/mods/fireflies/locale/fireflies.id.tr new file mode 100644 index 0000000..bc6434e --- /dev/null +++ b/mods/fireflies/locale/fireflies.id.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Kunang-Kunang +Hidden Firefly=Kunang-Kunang Tersembunyi +Bug Net=Jaring Serangga +Firefly in a Bottle=Kunang-Kunang dalam Botol diff --git a/mods/fireflies/locale/fireflies.it.tr b/mods/fireflies/locale/fireflies.it.tr new file mode 100644 index 0000000..130b248 --- /dev/null +++ b/mods/fireflies/locale/fireflies.it.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Lucciola +Hidden Firefly=Lucciola nascosta +Bug Net=Retino +Firefly in a Bottle=Lucciola imbottigliata \ No newline at end of file diff --git a/mods/fireflies/locale/fireflies.ms.tr b/mods/fireflies/locale/fireflies.ms.tr new file mode 100644 index 0000000..509d03d --- /dev/null +++ b/mods/fireflies/locale/fireflies.ms.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Kelip-Kelip +Hidden Firefly=Kelip-Kelip Tersembunyi +Bug Net=Jaring Pepijat +Firefly in a Bottle=Kelip-Kelip dalam Botol diff --git a/mods/fireflies/locale/fireflies.ru.tr b/mods/fireflies/locale/fireflies.ru.tr new file mode 100644 index 0000000..c05f288 --- /dev/null +++ b/mods/fireflies/locale/fireflies.ru.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Светлячок +Hidden Firefly=Притаившийся Светлячок +Bug Net=Сачок Для Ловли Насекомых +Firefly in a Bottle=Светлячок в Бутылке diff --git a/mods/fireflies/locale/fireflies.se.tr b/mods/fireflies/locale/fireflies.se.tr new file mode 100644 index 0000000..1bff782 --- /dev/null +++ b/mods/fireflies/locale/fireflies.se.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Eldfluga +Hidden Firefly=Gömd Eldfluga +Bug Net=Buggernät +Firefly in a Bottle=Eldfluga i en flaska \ No newline at end of file diff --git a/mods/fireflies/locale/fireflies.sk.tr b/mods/fireflies/locale/fireflies.sk.tr new file mode 100644 index 0000000..b68674d --- /dev/null +++ b/mods/fireflies/locale/fireflies.sk.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Svetluška +Hidden Firefly=Skrytá svetluška +Bug Net=Sieťka na hmyz +Firefly in a Bottle=Svetluška vo fľaši diff --git a/mods/fireflies/locale/fireflies.zh_CN.tr b/mods/fireflies/locale/fireflies.zh_CN.tr new file mode 100644 index 0000000..5971785 --- /dev/null +++ b/mods/fireflies/locale/fireflies.zh_CN.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=萤火虫 +Hidden Firefly=隐藏的萤火虫 +Bug Net=虫网 +Firefly in a Bottle=放在瓶子里的萤火虫 diff --git a/mods/fireflies/locale/fireflies.zh_TW.tr b/mods/fireflies/locale/fireflies.zh_TW.tr new file mode 100644 index 0000000..af754a9 --- /dev/null +++ b/mods/fireflies/locale/fireflies.zh_TW.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=螢火蟲 +Hidden Firefly=隱藏的螢火蟲 +Bug Net=蟲網 +Firefly in a Bottle=放在瓶子裡的螢火蟲 diff --git a/mods/fireflies/locale/template.txt b/mods/fireflies/locale/template.txt new file mode 100644 index 0000000..91aa8ff --- /dev/null +++ b/mods/fireflies/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly= +Hidden Firefly= +Bug Net= +Firefly in a Bottle= diff --git a/mods/fireflies/mod.conf b/mods/fireflies/mod.conf new file mode 100644 index 0000000..a533588 --- /dev/null +++ b/mods/fireflies/mod.conf @@ -0,0 +1,3 @@ +name = fireflies +description = Minetest Game mod: fireflies +depends = default, vessels diff --git a/mods/fireflies/textures/fireflies_bottle.png b/mods/fireflies/textures/fireflies_bottle.png new file mode 100644 index 0000000..ecca036 Binary files /dev/null and b/mods/fireflies/textures/fireflies_bottle.png differ diff --git a/mods/fireflies/textures/fireflies_bottle_animated.png b/mods/fireflies/textures/fireflies_bottle_animated.png new file mode 100644 index 0000000..96062b3 Binary files /dev/null and b/mods/fireflies/textures/fireflies_bottle_animated.png differ diff --git a/mods/fireflies/textures/fireflies_bugnet.png b/mods/fireflies/textures/fireflies_bugnet.png new file mode 100644 index 0000000..8ec3d33 Binary files /dev/null and b/mods/fireflies/textures/fireflies_bugnet.png differ diff --git a/mods/fireflies/textures/fireflies_firefly.png b/mods/fireflies/textures/fireflies_firefly.png new file mode 100644 index 0000000..c086689 Binary files /dev/null and b/mods/fireflies/textures/fireflies_firefly.png differ diff --git a/mods/fireflies/textures/fireflies_firefly_animated.png b/mods/fireflies/textures/fireflies_firefly_animated.png new file mode 100644 index 0000000..e6932e3 Binary files /dev/null and b/mods/fireflies/textures/fireflies_firefly_animated.png differ diff --git a/mods/flowers/README.txt b/mods/flowers/README.txt new file mode 100644 index 0000000..4b3149c --- /dev/null +++ b/mods/flowers/README.txt @@ -0,0 +1,30 @@ +Minetest Game mod: flowers +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Ironzorg (MIT) and VanessaE (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +RHRhino (CC BY-SA 3.0): + flowers_dandelion_white.png + flowers_geranium.png + flowers_rose.png + flowers_tulip.png + flowers_viola.png + +Gambit (CC BY-SA 3.0): + flowers_mushroom_brown.png + flowers_mushroom_red.png + flowers_waterlily.png + +yyt16384 (CC BY-SA 3.0): + flowers_waterlily_bottom.png -- Derived from Gambit's texture + +paramat (CC BY-SA 3.0): + flowers_dandelion_yellow.png -- Derived from RHRhino's texture + flowers_tulip_black.png -- Derived from RHRhino's texture + flowers_chrysanthemum_green.png diff --git a/mods/flowers/init.lua b/mods/flowers/init.lua new file mode 100644 index 0000000..9731750 --- /dev/null +++ b/mods/flowers/init.lua @@ -0,0 +1,336 @@ +-- flowers/init.lua + +-- Minetest 0.4 mod: default +-- See README.txt for licensing and other information. + + +-- Namespace for functions + +flowers = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("flowers") + + +-- Map Generation + +dofile(minetest.get_modpath("flowers") .. "/mapgen.lua") + + +-- +-- Flowers +-- + +-- Aliases for original flowers mod + +minetest.register_alias("flowers:flower_rose", "flowers:rose") +minetest.register_alias("flowers:flower_tulip", "flowers:tulip") +minetest.register_alias("flowers:flower_dandelion_yellow", "flowers:dandelion_yellow") +minetest.register_alias("flowers:flower_geranium", "flowers:geranium") +minetest.register_alias("flowers:flower_viola", "flowers:viola") +minetest.register_alias("flowers:flower_dandelion_white", "flowers:dandelion_white") + + +-- Flower registration + +local function add_simple_flower(name, desc, box, f_groups) + -- Common flowers' groups + f_groups.snappy = 3 + f_groups.flower = 1 + f_groups.flora = 1 + f_groups.attached_node = 1 + + minetest.register_node("flowers:" .. name, { + description = desc, + drawtype = "plantlike", + waving = 1, + tiles = {"flowers_" .. name .. ".png"}, + inventory_image = "flowers_" .. name .. ".png", + wield_image = "flowers_" .. name .. ".png", + sunlight_propagates = true, + paramtype = "light", + walkable = false, + buildable_to = true, + groups = f_groups, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box + } + }) +end + +flowers.datas = { + { + "rose", + S("Red Rose"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 5 / 16, 2 / 16}, + {color_red = 1, flammable = 1} + }, + { + "tulip", + S("Orange Tulip"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, + {color_orange = 1, flammable = 1} + }, + { + "dandelion_yellow", + S("Yellow Dandelion"), + {-4 / 16, -0.5, -4 / 16, 4 / 16, -2 / 16, 4 / 16}, + {color_yellow = 1, flammable = 1} + }, + { + "chrysanthemum_green", + S("Green Chrysanthemum"), + {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + {color_green = 1, flammable = 1} + }, + { + "geranium", + S("Blue Geranium"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 2 / 16, 2 / 16}, + {color_blue = 1, flammable = 1} + }, + { + "viola", + S("Viola"), + {-5 / 16, -0.5, -5 / 16, 5 / 16, -1 / 16, 5 / 16}, + {color_violet = 1, flammable = 1} + }, + { + "dandelion_white", + S("White Dandelion"), + {-5 / 16, -0.5, -5 / 16, 5 / 16, -2 / 16, 5 / 16}, + {color_white = 1, flammable = 1} + }, + { + "tulip_black", + S("Black Tulip"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, + {color_black = 1, flammable = 1} + }, +} + +for _,item in pairs(flowers.datas) do + add_simple_flower(unpack(item)) +end + + +-- Flower spread +-- Public function to enable override by mods + +function flowers.flower_spread(pos, node) + pos.y = pos.y - 1 + local under = minetest.get_node(pos) + pos.y = pos.y + 1 + -- Replace flora with dry shrub in desert sand and silver sand, + -- as this is the only way to generate them. + -- However, preserve grasses in sand dune biomes. + if minetest.get_item_group(under.name, "sand") == 1 and + under.name ~= "default:sand" then + minetest.set_node(pos, {name = "default:dry_shrub"}) + return + end + + if minetest.get_item_group(under.name, "soil") == 0 then + return + end + + local light = minetest.get_node_light(pos) + if not light or light < 13 then + return + end + + local pos0 = vector.subtract(pos, 4) + local pos1 = vector.add(pos, 4) + -- Testing shows that a threshold of 3 results in an appropriate maximum + -- density of approximately 7 flora per 9x9 area. + if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then + return + end + + local soils = minetest.find_nodes_in_area_under_air( + pos0, pos1, "group:soil") + local num_soils = #soils + if num_soils >= 1 then + for si = 1, math.min(3, num_soils) do + local soil = soils[math.random(num_soils)] + local soil_name = minetest.get_node(soil).name + local soil_above = {x = soil.x, y = soil.y + 1, z = soil.z} + light = minetest.get_node_light(soil_above) + if light and light >= 13 and + -- Only spread to same surface node + soil_name == under.name and + -- Desert sand is in the soil group + soil_name ~= "default:desert_sand" then + minetest.set_node(soil_above, {name = node.name}) + end + end + end +end + +minetest.register_abm({ + label = "Flower spread", + nodenames = {"group:flora"}, + interval = 13, + chance = 300, + action = function(...) + flowers.flower_spread(...) + end, +}) + + +-- +-- Mushrooms +-- + +minetest.register_node("flowers:mushroom_red", { + description = S("Red Mushroom"), + tiles = {"flowers_mushroom_red.png"}, + inventory_image = "flowers_mushroom_red.png", + wield_image = "flowers_mushroom_red.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {mushroom = 1, snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(-5), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +minetest.register_node("flowers:mushroom_brown", { + description = S("Brown Mushroom"), + tiles = {"flowers_mushroom_brown.png"}, + inventory_image = "flowers_mushroom_brown.png", + wield_image = "flowers_mushroom_brown.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {mushroom = 1, food_mushroom = 1, snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(1), + selection_box = { + type = "fixed", + fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, -2 / 16, 3 / 16}, + } +}) + + +-- Mushroom spread and death + +function flowers.mushroom_spread(pos, node) + if minetest.get_node_light(pos, 0.5) > 3 then + if minetest.get_node_light(pos, nil) == 15 then + minetest.remove_node(pos) + end + return + end + local positions = minetest.find_nodes_in_area_under_air( + {x = pos.x - 1, y = pos.y - 2, z = pos.z - 1}, + {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1}, + {"group:soil", "group:tree"}) + if #positions == 0 then + return + end + local pos2 = positions[math.random(#positions)] + pos2.y = pos2.y + 1 + if minetest.get_node_light(pos2, 0.5) <= 3 then + minetest.set_node(pos2, {name = node.name}) + end +end + +minetest.register_abm({ + label = "Mushroom spread", + nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"}, + interval = 11, + chance = 150, + action = function(...) + flowers.mushroom_spread(...) + end, +}) + + +-- These old mushroom related nodes can be simplified now + +minetest.register_alias("flowers:mushroom_spores_brown", "flowers:mushroom_brown") +minetest.register_alias("flowers:mushroom_spores_red", "flowers:mushroom_red") +minetest.register_alias("flowers:mushroom_fertile_brown", "flowers:mushroom_brown") +minetest.register_alias("flowers:mushroom_fertile_red", "flowers:mushroom_red") +minetest.register_alias("mushroom:brown_natural", "flowers:mushroom_brown") +minetest.register_alias("mushroom:red_natural", "flowers:mushroom_red") + + +-- +-- Waterlily +-- + +local waterlily_def = { + description = S("Waterlily"), + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = {"flowers_waterlily.png", "flowers_waterlily_bottom.png"}, + inventory_image = "flowers_waterlily.png", + wield_image = "flowers_waterlily.png", + liquids_pointable = true, + walkable = false, + buildable_to = true, + floodable = true, + groups = {snappy = 3, flower = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + node_placement_prediction = "", + node_box = { + type = "fixed", + fixed = {-0.5, -31 / 64, -0.5, 0.5, -15 / 32, 0.5} + }, + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, -15 / 32, 7 / 16} + }, + + on_place = function(itemstack, placer, pointed_thing) + local pos = pointed_thing.above + local node = minetest.get_node(pointed_thing.under) + local def = minetest.registered_nodes[node.name] + + if def and def.on_rightclick then + return def.on_rightclick(pointed_thing.under, node, placer, itemstack, + pointed_thing) + end + + if def and def.liquidtype == "source" and + minetest.get_item_group(node.name, "water") > 0 then + local player_name = placer and placer:get_player_name() or "" + if not minetest.is_protected(pos, player_name) then + minetest.set_node(pos, {name = "flowers:waterlily" .. + (def.waving == 3 and "_waving" or ""), + param2 = math.random(0, 3)}) + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, "Node is protected") + minetest.record_protection_violation(pos, player_name) + end + end + + return itemstack + end +} + +local waterlily_waving_def = table.copy(waterlily_def) +waterlily_waving_def.waving = 3 +waterlily_waving_def.drop = "flowers:waterlily" +waterlily_waving_def.groups.not_in_creative_inventory = 1 + +minetest.register_node("flowers:waterlily", waterlily_def) +minetest.register_node("flowers:waterlily_waving", waterlily_waving_def) + diff --git a/mods/flowers/license.txt b/mods/flowers/license.txt new file mode 100644 index 0000000..419ebe5 --- /dev/null +++ b/mods/flowers/license.txt @@ -0,0 +1,63 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Ironzorg, VanessaE +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 RHRhino +Copyright (C) 2015-2016 Gambit +Copyright (C) 2016 yyt16384 +Copyright (C) 2017 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/flowers/locale/flowers.de.tr b/mods/flowers/locale/flowers.de.tr new file mode 100644 index 0000000..18afb2a --- /dev/null +++ b/mods/flowers/locale/flowers.de.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rote Rose +Orange Tulip=Orange Tulpe +Yellow Dandelion=Gelber Löwenzahn +Green Chrysanthemum=Grüne Chrysantheme +Blue Geranium=Blaue Geranie +Viola=Veilchen +White Dandelion=Weißer Löwenzahn +Black Tulip=Schwarze Tulpe +Red Mushroom=Roter Pilz +Brown Mushroom=Brauner Pilz +Waterlily=Wasserlilie diff --git a/mods/flowers/locale/flowers.es.tr b/mods/flowers/locale/flowers.es.tr new file mode 100644 index 0000000..e9c345d --- /dev/null +++ b/mods/flowers/locale/flowers.es.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rosa roja +Orange Tulip=Tulipán naranja +Yellow Dandelion=Diente de León amarillo +Green Chrysanthemum=Crisantemo verde +Blue Geranium=Geranio azul +Viola=Violeta +White Dandelion=Diente de León blanco +Black Tulip=Tulipán negro +Red Mushroom=Champiñón rojo +Brown Mushroom=Champiñón café +Waterlily=Nenúfar diff --git a/mods/flowers/locale/flowers.fr.tr b/mods/flowers/locale/flowers.fr.tr new file mode 100644 index 0000000..41e0d00 --- /dev/null +++ b/mods/flowers/locale/flowers.fr.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rose rouge +Orange Tulip=Tulipe orange +Yellow Dandelion=Pissenlit jaune +Green Chrysanthemum=Chrysanthème vert +Blue Geranium=Géranium bleu +Viola=Violette +White Dandelion=Pissenlit blanc +Black Tulip=Tulipe noire +Red Mushroom=Champignon rouge +Brown Mushroom=Champignon brun +Waterlily=Nénuphar diff --git a/mods/flowers/locale/flowers.id.tr b/mods/flowers/locale/flowers.id.tr new file mode 100644 index 0000000..730529b --- /dev/null +++ b/mods/flowers/locale/flowers.id.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Mawar Merah +Orange Tulip=Tulip Oranye +Yellow Dandelion=Dandelion Kuning +Green Chrysanthemum=Krisan Hijau +Blue Geranium=Geranium Biru +Viola=Viola +White Dandelion=Dandelion Putih +Black Tulip=Tulip Hitam +Red Mushroom=Jamur Merah +Brown Mushroom=Jamur Cokelat +Waterlily=Teratai diff --git a/mods/flowers/locale/flowers.it.tr b/mods/flowers/locale/flowers.it.tr new file mode 100644 index 0000000..e273941 --- /dev/null +++ b/mods/flowers/locale/flowers.it.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rosa rossa +Orange Tulip=Tulipano arancione +Yellow Dandelion=Dente di leone giallo +Green Chrysanthemum=Crisantemo verde +Blue Geranium=Geranio blu +Viola=Viola +White Dandelion=Dente di leone bianco +Black Tulip=Tulipano nero +Red Mushroom=Fungo rosso +Brown Mushroom=Fungo marrone +Waterlily=Ninfea \ No newline at end of file diff --git a/mods/flowers/locale/flowers.ms.tr b/mods/flowers/locale/flowers.ms.tr new file mode 100644 index 0000000..4e846eb --- /dev/null +++ b/mods/flowers/locale/flowers.ms.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Ros Merah +Orange Tulip=Tulip Jingga +Yellow Dandelion=Dandelion Kuning +Green Chrysanthemum=Kekwa Hijau +Blue Geranium=Geranium Biru +Viola=Violet +White Dandelion=Dandelion Putih +Black Tulip=Tulip Hitam +Red Mushroom=Cendawan Merah +Brown Mushroom=Cendawan Perang +Waterlily=Teratai diff --git a/mods/flowers/locale/flowers.ru.tr b/mods/flowers/locale/flowers.ru.tr new file mode 100644 index 0000000..d861e2a --- /dev/null +++ b/mods/flowers/locale/flowers.ru.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Красная Роза +Orange Tulip=Оранжевый Тюльпан +Yellow Dandelion=Желтый Одуванчик +Green Chrysanthemum=Зелёная Хризантема +Blue Geranium=Синяя Герань +Viola=Фиалка +White Dandelion=Белый Одуванчик +Black Tulip=Черный Тюльпан +Red Mushroom=Мухомор +Brown Mushroom=Коричневый Гриб +Waterlily=Кувшинка diff --git a/mods/flowers/locale/flowers.se.tr b/mods/flowers/locale/flowers.se.tr new file mode 100644 index 0000000..1bee645 --- /dev/null +++ b/mods/flowers/locale/flowers.se.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Röd ros +Orange Tulip=Orange Tulpan +Yellow Dandelion=Gul Maskros +Green Chrysanthemum=Grön Krysantemum +Blue Geranium=Blå Geranium +Viola=Violett Viola +White Dandelion=Vit Maskros +Black Tulip=Svart Tulpan +Red Mushroom=Röd Svamp +Brown Mushroom=Brun Svamp +Waterlily=Näckros \ No newline at end of file diff --git a/mods/flowers/locale/flowers.sk.tr b/mods/flowers/locale/flowers.sk.tr new file mode 100644 index 0000000..75d4ae1 --- /dev/null +++ b/mods/flowers/locale/flowers.sk.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Červená ruža +Orange Tulip=Oranžový tulipán +Yellow Dandelion=Žltá púpava +Green Chrysanthemum=Zelená chryzantéma +Blue Geranium=Modrý muškát +Viola=Fialka +White Dandelion=Biela púpava +Black Tulip=Čierny tulipán +Red Mushroom=Červená huba +Brown Mushroom=Hnedá huba +Waterlily=Lekno diff --git a/mods/flowers/locale/flowers.zh_CN.tr b/mods/flowers/locale/flowers.zh_CN.tr new file mode 100644 index 0000000..3139dfb --- /dev/null +++ b/mods/flowers/locale/flowers.zh_CN.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=红玫瑰 +Orange Tulip=橙郁金香 +Yellow Dandelion=黄蒲公英 +Green Chrysanthemum=绿菊花 +Blue Geranium=蓝天竺葵 +Viola=三色堇 +White Dandelion=白蒲公英 +Black Tulip=黑郁金香 +Red Mushroom=红蘑菇 +Brown Mushroom=棕蘑菇 +Waterlily=睡莲 diff --git a/mods/flowers/locale/flowers.zh_TW.tr b/mods/flowers/locale/flowers.zh_TW.tr new file mode 100644 index 0000000..a3a3ec5 --- /dev/null +++ b/mods/flowers/locale/flowers.zh_TW.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=紅玫瑰 +Orange Tulip=橙鬱金香 +Yellow Dandelion=黃蒲公英 +Green Chrysanthemum=綠菊花 +Blue Geranium=藍天竺葵 +Viola=三色堇 +White Dandelion=白蒲公英 +Black Tulip=黑鬱金香 +Red Mushroom=紅蘑菇 +Brown Mushroom=棕蘑菇 +Waterlily=睡蓮 diff --git a/mods/flowers/locale/template.txt b/mods/flowers/locale/template.txt new file mode 100644 index 0000000..a3a687f --- /dev/null +++ b/mods/flowers/locale/template.txt @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose= +Orange Tulip= +Yellow Dandelion= +Green Chrysanthemum= +Blue Geranium= +Viola= +White Dandelion= +Black Tulip= +Red Mushroom= +Brown Mushroom= +Waterlily= diff --git a/mods/flowers/mapgen.lua b/mods/flowers/mapgen.lua new file mode 100644 index 0000000..f282f50 --- /dev/null +++ b/mods/flowers/mapgen.lua @@ -0,0 +1,181 @@ +-- +-- Mgv6 +-- + +local function register_mgv6_flower(flower_name) + minetest.register_decoration({ + name = "flowers:"..flower_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 100, y = 100, z = 100}, + seed = 436, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "flowers:"..flower_name, + }) +end + +local function register_mgv6_mushroom(mushroom_name) + minetest.register_decoration({ + name = "flowers:"..mushroom_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.04, + spread = {x = 100, y = 100, z = 100}, + seed = 7133, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "flowers:"..mushroom_name, + spawn_by = "default:tree", + num_spawn_by = 1, + }) +end + +local function register_mgv6_waterlily() + minetest.register_decoration({ + name = "flowers:waterlily", + deco_type = "simple", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.12, + scale = 0.3, + spread = {x = 100, y = 100, z = 100}, + seed = 33, + octaves = 3, + persist = 0.7 + }, + y_max = 0, + y_min = 0, + decoration = "flowers:waterlily_waving", + param2 = 0, + param2_max = 3, + place_offset_y = 1, + }) +end + +function flowers.register_mgv6_decorations() + register_mgv6_flower("rose") + register_mgv6_flower("tulip") + register_mgv6_flower("dandelion_yellow") + register_mgv6_flower("geranium") + register_mgv6_flower("viola") + register_mgv6_flower("dandelion_white") + + register_mgv6_mushroom("mushroom_brown") + register_mgv6_mushroom("mushroom_red") + + register_mgv6_waterlily() +end + + +-- +-- All other biome API mapgens +-- + +local function register_flower(seed, flower_name) + minetest.register_decoration({ + name = "flowers:"..flower_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.02, + scale = 0.04, + spread = {x = 200, y = 200, z = 200}, + seed = seed, + octaves = 3, + persist = 0.6 + }, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "flowers:"..flower_name, + }) +end + +local function register_mushroom(mushroom_name) + minetest.register_decoration({ + name = "flowers:"..mushroom_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest", "coniferous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "flowers:"..mushroom_name, + }) +end + +local function register_waterlily() + minetest.register_decoration({ + name = "default:waterlily", + deco_type = "simple", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.12, + scale = 0.3, + spread = {x = 200, y = 200, z = 200}, + seed = 33, + octaves = 3, + persist = 0.7 + }, + biomes = {"rainforest_swamp", "savanna_shore", "deciduous_forest_shore"}, + y_max = 0, + y_min = 0, + decoration = "flowers:waterlily_waving", + param2 = 0, + param2_max = 3, + place_offset_y = 1, + }) +end + +function flowers.register_decorations() + register_flower(436, "rose") + register_flower(19822, "tulip") + register_flower(1220999, "dandelion_yellow") + register_flower(800081, "chrysanthemum_green") + register_flower(36662, "geranium") + register_flower(1133, "viola") + register_flower(73133, "dandelion_white") + register_flower(42, "tulip_black") + + register_mushroom("mushroom_brown") + register_mushroom("mushroom_red") + + register_waterlily() +end + + +-- +-- Detect mapgen to select functions +-- + +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" then + flowers.register_mgv6_decorations() +else + flowers.register_decorations() +end diff --git a/mods/flowers/mod.conf b/mods/flowers/mod.conf new file mode 100644 index 0000000..cdafe64 --- /dev/null +++ b/mods/flowers/mod.conf @@ -0,0 +1,3 @@ +name = flowers +description = Minetest Game mod: flowers +depends = default diff --git a/mods/flowers/textures/flowers_chrysanthemum_green.png b/mods/flowers/textures/flowers_chrysanthemum_green.png new file mode 100644 index 0000000..1198046 Binary files /dev/null and b/mods/flowers/textures/flowers_chrysanthemum_green.png differ diff --git a/mods/flowers/textures/flowers_dandelion_white.png b/mods/flowers/textures/flowers_dandelion_white.png new file mode 100644 index 0000000..1bc02fb Binary files /dev/null and b/mods/flowers/textures/flowers_dandelion_white.png differ diff --git a/mods/flowers/textures/flowers_dandelion_yellow.png b/mods/flowers/textures/flowers_dandelion_yellow.png new file mode 100644 index 0000000..544f60c Binary files /dev/null and b/mods/flowers/textures/flowers_dandelion_yellow.png differ diff --git a/mods/flowers/textures/flowers_geranium.png b/mods/flowers/textures/flowers_geranium.png new file mode 100644 index 0000000..88de1d7 Binary files /dev/null and b/mods/flowers/textures/flowers_geranium.png differ diff --git a/mods/flowers/textures/flowers_mushroom_brown.png b/mods/flowers/textures/flowers_mushroom_brown.png new file mode 100644 index 0000000..33ffcd4 Binary files /dev/null and b/mods/flowers/textures/flowers_mushroom_brown.png differ diff --git a/mods/flowers/textures/flowers_mushroom_red.png b/mods/flowers/textures/flowers_mushroom_red.png new file mode 100644 index 0000000..a68f5d5 Binary files /dev/null and b/mods/flowers/textures/flowers_mushroom_red.png differ diff --git a/mods/flowers/textures/flowers_rose.png b/mods/flowers/textures/flowers_rose.png new file mode 100644 index 0000000..e3b841d Binary files /dev/null and b/mods/flowers/textures/flowers_rose.png differ diff --git a/mods/flowers/textures/flowers_tulip.png b/mods/flowers/textures/flowers_tulip.png new file mode 100644 index 0000000..471fcd3 Binary files /dev/null and b/mods/flowers/textures/flowers_tulip.png differ diff --git a/mods/flowers/textures/flowers_tulip_black.png b/mods/flowers/textures/flowers_tulip_black.png new file mode 100644 index 0000000..1dd09f7 Binary files /dev/null and b/mods/flowers/textures/flowers_tulip_black.png differ diff --git a/mods/flowers/textures/flowers_viola.png b/mods/flowers/textures/flowers_viola.png new file mode 100644 index 0000000..ca2d750 Binary files /dev/null and b/mods/flowers/textures/flowers_viola.png differ diff --git a/mods/flowers/textures/flowers_waterlily.png b/mods/flowers/textures/flowers_waterlily.png new file mode 100644 index 0000000..305c445 Binary files /dev/null and b/mods/flowers/textures/flowers_waterlily.png differ diff --git a/mods/flowers/textures/flowers_waterlily_bottom.png b/mods/flowers/textures/flowers_waterlily_bottom.png new file mode 100644 index 0000000..3dbeaf4 Binary files /dev/null and b/mods/flowers/textures/flowers_waterlily_bottom.png differ diff --git a/mods/game_commands/README.txt b/mods/game_commands/README.txt new file mode 100644 index 0000000..a451608 --- /dev/null +++ b/mods/game_commands/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: game_commands +================================ +See license.txt for license information. + +Authors of source code +---------------------- +rubenwardy (MIT) diff --git a/mods/game_commands/init.lua b/mods/game_commands/init.lua new file mode 100644 index 0000000..e038be1 --- /dev/null +++ b/mods/game_commands/init.lua @@ -0,0 +1,31 @@ +-- game_commands/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("game_commands") + + +minetest.register_chatcommand("killme", { + description = S("Kill yourself to respawn"), + func = function(name) + local player = minetest.get_player_by_name(name) + if player then + if minetest.settings:get_bool("enable_damage") then + player:set_hp(0) + return true + else + for _, callback in pairs(minetest.registered_on_respawnplayers) do + if callback(player) then + return true + end + end + + -- There doesn't seem to be a way to get a default spawn pos + -- from the lua API + return false, S("No static_spawnpoint defined") + end + else + -- Show error message if used when not logged in, eg: from IRC mod + return false, S("You need to be online to be killed!") + end + end +}) diff --git a/mods/game_commands/license.txt b/mods/game_commands/license.txt new file mode 100644 index 0000000..fa85564 --- /dev/null +++ b/mods/game_commands/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017-2018 rubenwardy + +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. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/game_commands/locale/game_commands.de.tr b/mods/game_commands/locale/game_commands.de.tr new file mode 100644 index 0000000..24b0e25 --- /dev/null +++ b/mods/game_commands/locale/game_commands.de.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Selbstmord begehen, um zu Respawnen +No static_spawnpoint defined=Kein static_spawnpoint definiert +You need to be online to be killed!=Sie müssen online sein, um getötet zu werden! diff --git a/mods/game_commands/locale/game_commands.es.tr b/mods/game_commands/locale/game_commands.es.tr new file mode 100644 index 0000000..702a2ef --- /dev/null +++ b/mods/game_commands/locale/game_commands.es.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Suicídate para reaparecer +No static_spawnpoint defined=No se ha definido un punto de aparición +You need to be online to be killed!=¡Necesitas estar en línea para que te maten! diff --git a/mods/game_commands/locale/game_commands.fr.tr b/mods/game_commands/locale/game_commands.fr.tr new file mode 100644 index 0000000..0e295d6 --- /dev/null +++ b/mods/game_commands/locale/game_commands.fr.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Se suicider pour réapparaître +No static_spawnpoint defined=Pas de point d'apparition défini +You need to be online to be killed!=Vous devez être en ligne pour être tué ! diff --git a/mods/game_commands/locale/game_commands.id.tr b/mods/game_commands/locale/game_commands.id.tr new file mode 100644 index 0000000..1ab364b --- /dev/null +++ b/mods/game_commands/locale/game_commands.id.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Bunuh diri untuk bangkit kembali +No static_spawnpoint defined=Tiada static_spawnpoint (titik bangkit statis) yang diatur +You need to be online to be killed!=Anda harus daring untuk dibunuh! diff --git a/mods/game_commands/locale/game_commands.it.tr b/mods/game_commands/locale/game_commands.it.tr new file mode 100644 index 0000000..b2431fa --- /dev/null +++ b/mods/game_commands/locale/game_commands.it.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Ucciditi per ricomparire +No static_spawnpoint defined=Nessuno static_spawnpoint definito +You need to be online to be killed!=Devi essere in linea per essere ucciso! \ No newline at end of file diff --git a/mods/game_commands/locale/game_commands.ms.tr b/mods/game_commands/locale/game_commands.ms.tr new file mode 100644 index 0000000..ed4a0bd --- /dev/null +++ b/mods/game_commands/locale/game_commands.ms.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Bunuh diri anda untuk lahir semula +No static_spawnpoint defined=Tiada titik permulaan statik (tetapan static_spawnpoint) ditakrifkan +You need to be online to be killed!=Anda mesti berada dalam talian untuk dibunuh! diff --git a/mods/game_commands/locale/game_commands.ru.tr b/mods/game_commands/locale/game_commands.ru.tr new file mode 100644 index 0000000..26d9e08 --- /dev/null +++ b/mods/game_commands/locale/game_commands.ru.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Убейте себя, чтобы возродиться +No static_spawnpoint defined=static_spawnpoint не определён +You need to be online to be killed!=Вы должны быть онлайн, чтобы убить себя! diff --git a/mods/game_commands/locale/game_commands.se.tr b/mods/game_commands/locale/game_commands.se.tr new file mode 100644 index 0000000..259e1db --- /dev/null +++ b/mods/game_commands/locale/game_commands.se.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Döda dig själv för att respawna +No static_spawnpoint defined=Ingen static_spawnpoint definierat +You need to be online to be killed!=Du måsta vara online för att bli dödad! \ No newline at end of file diff --git a/mods/game_commands/locale/game_commands.sk.tr b/mods/game_commands/locale/game_commands.sk.tr new file mode 100644 index 0000000..f7d153a --- /dev/null +++ b/mods/game_commands/locale/game_commands.sk.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Samovražda pre znovuzrodenie +No static_spawnpoint defined=Nie je definované stále miesto znovuzrodenia +You need to be online to be killed!=Musíš byť online, aby si mohol byť zabitý! diff --git a/mods/game_commands/locale/game_commands.zh_CN.tr b/mods/game_commands/locale/game_commands.zh_CN.tr new file mode 100644 index 0000000..3c69dfb --- /dev/null +++ b/mods/game_commands/locale/game_commands.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=杀死自己并重生 +No static_spawnpoint defined=static_spawnpoint 未定义 +You need to be online to be killed!=您需要在线才能被杀死! diff --git a/mods/game_commands/locale/game_commands.zh_TW.tr b/mods/game_commands/locale/game_commands.zh_TW.tr new file mode 100644 index 0000000..34e148d --- /dev/null +++ b/mods/game_commands/locale/game_commands.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=殺死自己並重生 +No static_spawnpoint defined=static_spawnpoint 未定義 +You need to be online to be killed!=您需要在線才能被殺死! diff --git a/mods/game_commands/locale/template.txt b/mods/game_commands/locale/template.txt new file mode 100644 index 0000000..903f160 --- /dev/null +++ b/mods/game_commands/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn= +No static_spawnpoint defined= +You need to be online to be killed!= diff --git a/mods/game_commands/mod.conf b/mods/game_commands/mod.conf new file mode 100644 index 0000000..5571ff5 --- /dev/null +++ b/mods/game_commands/mod.conf @@ -0,0 +1,2 @@ +name = game_commands +description = Minetest Game mod: game_commands diff --git a/mods/give_initial_stuff/README.txt b/mods/give_initial_stuff/README.txt new file mode 100644 index 0000000..cbd240f --- /dev/null +++ b/mods/give_initial_stuff/README.txt @@ -0,0 +1,8 @@ +Minetest Game mod: give_initial_stuff +===================================== +See license.txt for license information. + +Authors of source code +---------------------- +Perttu Ahola (celeron55) (MIT) +Various Minetest developers and contributors (MIT) diff --git a/mods/give_initial_stuff/init.lua b/mods/give_initial_stuff/init.lua new file mode 100644 index 0000000..74421dc --- /dev/null +++ b/mods/give_initial_stuff/init.lua @@ -0,0 +1,46 @@ +-- gave_initial_stuff/init.lua + +local stuff_string = minetest.settings:get("initial_stuff") or + "default:pick_steel,default:axe_steel,default:shovel_steel," .. + "default:torch 99,default:cobble 99" + +give_initial_stuff = { + items = {} +} + +function give_initial_stuff.give(player) + minetest.log("action", + "Giving initial stuff to player " .. player:get_player_name()) + local inv = player:get_inventory() + for _, stack in ipairs(give_initial_stuff.items) do + inv:add_item("main", stack) + end +end + +function give_initial_stuff.add(stack) + give_initial_stuff.items[#give_initial_stuff.items + 1] = ItemStack(stack) +end + +function give_initial_stuff.clear() + give_initial_stuff.items = {} +end + +function give_initial_stuff.add_from_csv(str) + local items = str:split(",") + for _, itemname in ipairs(items) do + give_initial_stuff.add(itemname) + end +end + +function give_initial_stuff.set_list(list) + give_initial_stuff.items = list +end + +function give_initial_stuff.get_list() + return give_initial_stuff.items +end + +give_initial_stuff.add_from_csv(stuff_string) +if minetest.settings:get_bool("give_initial_stuff") then + minetest.register_on_newplayer(give_initial_stuff.give) +end diff --git a/mods/give_initial_stuff/license.txt b/mods/give_initial_stuff/license.txt new file mode 100644 index 0000000..8134c92 --- /dev/null +++ b/mods/give_initial_stuff/license.txt @@ -0,0 +1,25 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/give_initial_stuff/mod.conf b/mods/give_initial_stuff/mod.conf new file mode 100644 index 0000000..51d31ae --- /dev/null +++ b/mods/give_initial_stuff/mod.conf @@ -0,0 +1,3 @@ +name = give_initial_stuff +description = Minetest Game mod: give_initial_stuff +depends = default diff --git a/mods/map/README.txt b/mods/map/README.txt new file mode 100644 index 0000000..068439a --- /dev/null +++ b/mods/map/README.txt @@ -0,0 +1,44 @@ +Minetest Game mod: map +====================== +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) + +Authors of media (textures) +--------------------------- +TumeniNodes (CC BY-SA 3.0): + map_mapping_kit.png (map) + +paramat (CC BY-SA 3.0): + map_mapping_kit.png (compass and pen) + +Crafting +-------- +map:mapping_kit + +default:glass G +default:paper P +group:stick S +default:steel_ingot I +group:wood W +dye:black D + +GPS +IPI +WPD + +Usage +----- +In survival mode, use of the minimap requires the mapping kit item in your +inventory. It can take up to 5 seconds for adding to or removal from inventory +to have an effect, however to instantly allow the use of the minimap 'use' +(leftclick) the item. +Minimap radar mode is always disallowed in survival mode. + +Minimap and minimap radar mode are automatically allowed in creative mode and +for any player with the 'creative' privilege. + +The 'map.update_hud_flags()' function is global so can be redefined by a mod for +alternative behaviour. diff --git a/mods/map/init.lua b/mods/map/init.lua new file mode 100644 index 0000000..7c1e36f --- /dev/null +++ b/mods/map/init.lua @@ -0,0 +1,87 @@ +-- map/init.lua + +-- Mod global namespace + +map = {} + + +-- Load support for MT game translation. +local S = minetest.get_translator("map") + + +-- Cache creative mode setting + +local creative_mode_cache = minetest.settings:get_bool("creative_mode") + + +-- Update HUD flags +-- Global to allow overriding + +function map.update_hud_flags(player) + local creative_enabled = + (creative and creative.is_enabled_for(player:get_player_name())) or + creative_mode_cache + + local minimap_enabled = creative_enabled or + player:get_inventory():contains_item("main", "map:mapping_kit") + local radar_enabled = creative_enabled + + player:hud_set_flags({ + minimap = minimap_enabled, + minimap_radar = radar_enabled + }) +end + + +-- Set HUD flags 'on joinplayer' + +minetest.register_on_joinplayer(function(player) + map.update_hud_flags(player) +end) + + +-- Cyclic update of HUD flags + +local function cyclic_update() + for _, player in ipairs(minetest.get_connected_players()) do + map.update_hud_flags(player) + end + minetest.after(5.3, cyclic_update) +end + +minetest.after(5.3, cyclic_update) + + +-- Mapping kit item + +minetest.register_craftitem("map:mapping_kit", { + description = S("Mapping Kit") .. "\n" .. S("Use with 'Minimap' key"), + inventory_image = "map_mapping_kit.png", + stack_max = 1, + groups = {flammable = 3}, + + on_use = function(itemstack, user, pointed_thing) + map.update_hud_flags(user) + end, +}) + + +-- Crafting + +minetest.register_craft({ + output = "map:mapping_kit", + recipe = { + {"default:glass", "default:paper", "group:stick"}, + {"default:steel_ingot", "default:paper", "default:steel_ingot"}, + {"group:wood", "default:paper", "dye:black"}, + } +}) + + +-- Fuel + +minetest.register_craft({ + type = "fuel", + recipe = "map:mapping_kit", + burntime = 5, +}) diff --git a/mods/map/license.txt b/mods/map/license.txt new file mode 100644 index 0000000..a89f59c --- /dev/null +++ b/mods/map/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017 paramat + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2017 TumeniNodes +Copyright (C) 2017 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/map/locale/map.de.tr b/mods/map/locale/map.de.tr new file mode 100644 index 0000000..1a784ab --- /dev/null +++ b/mods/map/locale/map.de.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kartenset +Use with 'Minimap' key=Mit „Karte an/aus“-Taste benutzen diff --git a/mods/map/locale/map.es.tr b/mods/map/locale/map.es.tr new file mode 100644 index 0000000..0faed52 --- /dev/null +++ b/mods/map/locale/map.es.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kit de cartografía +Use with 'Minimap' key=Usar con la tecla 'Minimapa' diff --git a/mods/map/locale/map.fr.tr b/mods/map/locale/map.fr.tr new file mode 100644 index 0000000..29f8e20 --- /dev/null +++ b/mods/map/locale/map.fr.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kit de carthographie +Use with 'Minimap' key=Utiliser avec le bouton « Minimap » diff --git a/mods/map/locale/map.id.tr b/mods/map/locale/map.id.tr new file mode 100644 index 0000000..cb31d0f --- /dev/null +++ b/mods/map/locale/map.id.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Alat Pemetaan +Use with 'Minimap' key=Pakai dengan tombol 'Peta Mini' diff --git a/mods/map/locale/map.it.tr b/mods/map/locale/map.it.tr new file mode 100644 index 0000000..237f4df --- /dev/null +++ b/mods/map/locale/map.it.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kit di mappatura +Use with 'Minimap' key=Usalo col tasto 'Minimappa' \ No newline at end of file diff --git a/mods/map/locale/map.ms.tr b/mods/map/locale/map.ms.tr new file mode 100644 index 0000000..8564f91 --- /dev/null +++ b/mods/map/locale/map.ms.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Alat Pemetaan +Use with 'Minimap' key=Guna dengan kekunci 'Peta Mini' diff --git a/mods/map/locale/map.ru.tr b/mods/map/locale/map.ru.tr new file mode 100644 index 0000000..73120b6 --- /dev/null +++ b/mods/map/locale/map.ru.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Картографический комплект +Use with 'Minimap' key=Используйте с ключом 'Minimap' diff --git a/mods/map/locale/map.se.tr b/mods/map/locale/map.se.tr new file mode 100644 index 0000000..c1bb01a --- /dev/null +++ b/mods/map/locale/map.se.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kartläggningssats +Use with 'Minimap' key=Använd med 'Minimap' tangent \ No newline at end of file diff --git a/mods/map/locale/map.sk.tr b/mods/map/locale/map.sk.tr new file mode 100644 index 0000000..2016c85 --- /dev/null +++ b/mods/map/locale/map.sk.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kartografická súprava +Use with 'Minimap' key=Použi klávesou 'Prepni minimpu' diff --git a/mods/map/locale/map.zh_CN.tr b/mods/map/locale/map.zh_CN.tr new file mode 100644 index 0000000..cec95bb --- /dev/null +++ b/mods/map/locale/map.zh_CN.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=地图绘制工具包 +Use with 'Minimap' key=与“迷你地图”键一起使用 diff --git a/mods/map/locale/map.zh_TW.tr b/mods/map/locale/map.zh_TW.tr new file mode 100644 index 0000000..a098124 --- /dev/null +++ b/mods/map/locale/map.zh_TW.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=地圖繪製工具包 +Use with 'Minimap' key=與“迷你地圖”鍵一起使用 diff --git a/mods/map/locale/template.txt b/mods/map/locale/template.txt new file mode 100644 index 0000000..2dbe2ee --- /dev/null +++ b/mods/map/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit= +Use with 'Minimap' key= diff --git a/mods/map/mod.conf b/mods/map/mod.conf new file mode 100644 index 0000000..2099c19 --- /dev/null +++ b/mods/map/mod.conf @@ -0,0 +1,4 @@ +name = map +description = Minetest Game mod: map +depends = default, dye +optional_depends = creative diff --git a/mods/map/textures/map_mapping_kit.png b/mods/map/textures/map_mapping_kit.png new file mode 100644 index 0000000..015b878 Binary files /dev/null and b/mods/map/textures/map_mapping_kit.png differ diff --git a/mods/mtg_craftguide/README.md b/mods/mtg_craftguide/README.md new file mode 100644 index 0000000..9c4ed7a --- /dev/null +++ b/mods/mtg_craftguide/README.md @@ -0,0 +1,25 @@ +Minetest Game mod: mtg_craftguide +================================= + +Adds a "Recipes" tab to the inventory. Click an item to see it's recipes. +Click again to show usages. + +Based on [craftguide](https://github.com/minetest-mods/craftguide). + +Authors of media +---------------- + +paramat (CC BY-SA 3.0): + +* craftguide_clear_icon.png +* craftguide_next_icon.png +* craftguide_prev_icon.png +* craftguide_search_icon.png + +Neuromancer (CC BY-SA 3.0): + +* craftguide_furnace.png + +Wuzzy (CC BY-SA 3.0): + +* craftguide_shapeless.png diff --git a/mods/mtg_craftguide/init.lua b/mods/mtg_craftguide/init.lua new file mode 100644 index 0000000..e20b168 --- /dev/null +++ b/mods/mtg_craftguide/init.lua @@ -0,0 +1,432 @@ +local S = minetest.get_translator("mtg_craftguide") +local esc = minetest.formspec_escape + +local player_data = {} +local init_items = {} +local recipes_cache = {} +local usages_cache = {} + +local group_stereotypes = { + dye = "dye:white", + wool = "wool:white", + coal = "default:coal_lump", + vessel = "vessels:glass_bottle", + flower = "flowers:dandelion_yellow" +} + +local group_names = { + coal = S("Any coal"), + sand = S("Any sand"), + wool = S("Any wool"), + stick = S("Any stick"), + vessel = S("Any vessel"), + wood = S("Any wood planks"), + stone = S("Any kind of stone block"), + + ["color_red,flower"] = S("Any red flower"), + ["color_blue,flower"] = S("Any blue flower"), + ["color_black,flower"] = S("Any black flower"), + ["color_green,flower"] = S("Any green flower"), + ["color_white,flower"] = S("Any white flower"), + ["color_orange,flower"] = S("Any orange flower"), + ["color_violet,flower"] = S("Any violet flower"), + ["color_yellow,flower"] = S("Any yellow flower"), + + ["color_red,dye"] = S("Any red dye"), + ["color_blue,dye"] = S("Any blue dye"), + ["color_cyan,dye"] = S("Any cyan dye"), + ["color_grey,dye"] = S("Any grey dye"), + ["color_pink,dye"] = S("Any pink dye"), + ["color_black,dye"] = S("Any black dye"), + ["color_brown,dye"] = S("Any brown dye"), + ["color_green,dye"] = S("Any green dye"), + ["color_white,dye"] = S("Any white dye"), + ["color_orange,dye"] = S("Any orange dye"), + ["color_violet,dye"] = S("Any violet dye"), + ["color_yellow,dye"] = S("Any yellow dye"), + ["color_magenta,dye"] = S("Any magenta dye"), + ["color_dark_grey,dye"] = S("Any dark grey dye"), + ["color_dark_green,dye"] = S("Any dark green dye") +} + +local function table_replace(t, val, new) + for k, v in pairs(t) do + if v == val then + t[k] = new + end + end +end + +local function extract_groups(str) + if str:sub(1, 6) == "group:" then + return str:sub(7):split() + end + return nil +end + +local function item_has_groups(item_groups, groups) + for _, group in ipairs(groups) do + if not item_groups[group] then + return false + end + end + return true +end + +local function groups_to_item(groups) + if #groups == 1 then + local group = groups[1] + if group_stereotypes[group] then + return group_stereotypes[group] + elseif minetest.registered_items["default:"..group] then + return "default:"..group + end + end + + for name, def in pairs(minetest.registered_items) do + if item_has_groups(def.groups, groups) then + return name + end + end + + return ":unknown" +end + +local function get_craftable_recipes(output) + local recipes = minetest.get_all_craft_recipes(output) + if not recipes then + return nil + end + + for i = #recipes, 1, -1 do + for _, item in pairs(recipes[i].items) do + local groups = extract_groups(item) + if groups then + item = groups_to_item(groups) + end + if not minetest.registered_items[item] then + table.remove(recipes, i) + break + end + end + end + + if #recipes > 0 then + return recipes + end +end + +local function show_item(def) + return def.groups.not_in_craft_guide ~= 1 and def.description ~= "" +end + +local function cache_usages(recipe) + local added = {} + for _, item in pairs(recipe.items) do + if not added[item] then + local groups = extract_groups(item) + if groups then + for name, def in pairs(minetest.registered_items) do + if not added[name] and show_item(def) + and item_has_groups(def.groups, groups) then + local usage = table.copy(recipe) + table_replace(usage.items, item, name) + usages_cache[name] = usages_cache[name] or {} + table.insert(usages_cache[name], usage) + added[name] = true + end + end + elseif show_item(minetest.registered_items[item]) then + usages_cache[item] = usages_cache[item] or {} + table.insert(usages_cache[item], recipe) + end + added[item] = true + end + end +end + +minetest.register_on_mods_loaded(function() + for name, def in pairs(minetest.registered_items) do + if show_item(def) then + local recipes = get_craftable_recipes(name) + if recipes then + recipes_cache[name] = recipes + for _, recipe in ipairs(recipes) do + cache_usages(recipe) + end + end + end + end + for name, def in pairs(minetest.registered_items) do + if recipes_cache[name] or usages_cache[name] then + table.insert(init_items, name) + end + end + table.sort(init_items) +end) + +local function coords(i, cols) + return i % cols, math.floor(i / cols) +end + +local function is_fuel(item) + return minetest.get_craft_result({method="fuel", items={item}}).time > 0 +end + +local function item_button_fs(fs, x, y, item, element_name, groups) + table.insert(fs, ("item_image_button[%s,%s;1.05,1.05;%s;%s;%s]") + :format(x, y, item, element_name, groups and "\n"..esc(S("G")) or "")) + + local tooltip + if groups then + table.sort(groups) + tooltip = group_names[table.concat(groups, ",")] + if not tooltip then + local groupstr = {} + for _, group in ipairs(groups) do + table.insert(groupstr, minetest.colorize("yellow", group)) + end + groupstr = table.concat(groupstr, ", ") + tooltip = S("Any item belonging to the group(s): @1", groupstr) + end + elseif is_fuel(item) then + local itemdef = minetest.registered_items[item:match("%S*")] + local desc = itemdef and itemdef.description or S("Unknown Item") + tooltip = desc.."\n"..minetest.colorize("orange", S("Fuel")) + end + if tooltip then + table.insert(fs, ("tooltip[%s;%s]"):format(element_name, esc(tooltip))) + end +end + +local function recipe_fs(fs, data) + local recipe = data.recipes[data.rnum] + local width = recipe.width + local cooktime, shapeless + + if recipe.method == "cooking" then + cooktime, width = width, 1 + elseif width == 0 then + shapeless = true + if #recipe.items == 1 then + width = 1 + elseif #recipe.items <= 4 then + width = 2 + else + width = 3 + end + end + + table.insert(fs, ("label[5.5,1;%s]"):format(esc(data.show_usages + and S("Usage @1 of @2", data.rnum, #data.recipes) + or S("Recipe @1 of @2", data.rnum, #data.recipes)))) + + if #data.recipes > 1 then + table.insert(fs, + "image_button[5.5,1.6;0.8,0.8;craftguide_prev_icon.png;recipe_prev;]".. + "image_button[6.2,1.6;0.8,0.8;craftguide_next_icon.png;recipe_next;]".. + "tooltip[recipe_prev;"..esc(S("Previous recipe")).."]".. + "tooltip[recipe_next;"..esc(S("Next recipe")).."]") + end + + local rows = math.ceil(table.maxn(recipe.items) / width) + if width > 3 or rows > 3 then + table.insert(fs, ("label[0,1;%s]") + :format(esc(S("Recipe is too big to be displayed.")))) + return + end + + local base_x = 3 - width + local base_y = rows == 1 and 1 or 0 + + for i, item in pairs(recipe.items) do + local x, y = coords(i - 1, width) + + local groups = extract_groups(item) + if groups then + item = groups_to_item(groups) + end + item_button_fs(fs, base_x + x, base_y + y, item, item, groups) + end + + if shapeless or recipe.method == "cooking" then + table.insert(fs, ("image[3.2,0.5;0.5,0.5;craftguide_%s.png]") + :format(shapeless and "shapeless" or "furnace")) + local tooltip = shapeless and S("Shapeless") or + S("Cooking time: @1", minetest.colorize("yellow", cooktime)) + table.insert(fs, "tooltip[3.2,0.5;0.5,0.5;"..esc(tooltip).."]") + end + table.insert(fs, "image[3,1;1,1;sfinv_crafting_arrow.png]") + + item_button_fs(fs, 4, 1, recipe.output, recipe.output:match("%S*")) +end + +local function get_formspec(player) + local name = player:get_player_name() + local data = player_data[name] + data.pagemax = math.max(1, math.ceil(#data.items / 32)) + + local fs = {} + table.insert(fs, + "style_type[item_image_button;padding=2]".. + "field[0.3,4.2;2.8,1.2;filter;;"..esc(data.filter).."]".. + "label[5.8,4.15;"..minetest.colorize("yellow", data.pagenum).." / ".. + data.pagemax.."]".. + "image_button[2.63,4.05;0.8,0.8;craftguide_search_icon.png;search;]".. + "image_button[3.25,4.05;0.8,0.8;craftguide_clear_icon.png;clear;]".. + "image_button[5,4.05;0.8,0.8;craftguide_prev_icon.png;prev;]".. + "image_button[7.25,4.05;0.8,0.8;craftguide_next_icon.png;next;]".. + "tooltip[search;"..esc(S("Search")).."]".. + "tooltip[clear;"..esc(S("Reset")).."]".. + "tooltip[prev;"..esc(S("Previous page")).."]".. + "tooltip[next;"..esc(S("Next page")).."]".. + "field_close_on_enter[filter;false]") + + if #data.items == 0 then + table.insert(fs, "label[3,2;"..esc(S("No items to show.")).."]") + else + local first_item = (data.pagenum - 1) * 32 + for i = first_item, first_item + 31 do + local item = data.items[i + 1] + if not item then + break + end + local x, y = coords(i % 32, 8) + item_button_fs(fs, x, y, item, item) + end + end + + table.insert(fs, "container[0,5.6]") + if data.recipes then + recipe_fs(fs, data) + elseif data.prev_item then + table.insert(fs, ("label[2,1;%s]"):format(esc(data.show_usages + and S("No usages.").."\n"..S("Click again to show recipes.") + or S("No recipes.").."\n"..S("Click again to show usages.")))) + end + table.insert(fs, "container_end[]") + + return table.concat(fs) +end + +local function imatch(str, filter) + return str:lower():find(filter, 1, true) ~= nil +end + +local function execute_search(data) + local filter = data.filter + if filter == "" then + data.items = init_items + return + end + data.items = {} + + for _, item in ipairs(init_items) do + local def = minetest.registered_items[item] + local desc = def and minetest.get_translated_string(data.lang_code, def.description) + + if imatch(item, filter) or desc and imatch(desc, filter) then + table.insert(data.items, item) + end + end +end + +local function on_receive_fields(player, fields) + local name = player:get_player_name() + local data = player_data[name] + + if fields.clear then + data.filter = "" + data.pagenum = 1 + data.prev_item = nil + data.recipes = nil + data.items = init_items + return true + + elseif fields.key_enter_field == "filter" or fields.search then + local new = fields.filter:lower() + if data.filter == new then + return + end + data.filter = new + data.pagenum = 1 + execute_search(data) + return true + + elseif fields.prev or fields.next then + if data.pagemax == 1 then + return + end + data.pagenum = data.pagenum + (fields.next and 1 or -1) + if data.pagenum > data.pagemax then + data.pagenum = 1 + elseif data.pagenum == 0 then + data.pagenum = data.pagemax + end + return true + + elseif fields.recipe_next or fields.recipe_prev then + data.rnum = data.rnum + (fields.recipe_next and 1 or -1) + if data.rnum > #data.recipes then + data.rnum = 1 + elseif data.rnum == 0 then + data.rnum = #data.recipes + end + return true + + else + local item + for field in pairs(fields) do + if field:find(":") then + item = field + break + end + end + if not item then + return + end + + if item == data.prev_item then + data.show_usages = not data.show_usages + else + data.show_usages = nil + end + if data.show_usages then + data.recipes = usages_cache[item] + else + data.recipes = recipes_cache[item] + end + data.prev_item = item + data.rnum = 1 + return true + end +end + +minetest.register_on_joinplayer(function(player) + local name = player:get_player_name() + local info = minetest.get_player_information(name) + + player_data[name] = { + filter = "", + pagenum = 1, + items = init_items, + lang_code = info.lang_code + } +end) + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + player_data[name] = nil +end) + +sfinv.register_page("mtg_craftguide:craftguide", { + title = esc(S("Recipes")), + get = function(self, player, context) + return sfinv.make_formspec(player, context, get_formspec(player)) + end, + on_player_receive_fields = function(self, player, context, fields) + if on_receive_fields(player, fields) then + sfinv.set_player_inventory_formspec(player) + end + end +}) diff --git a/mods/mtg_craftguide/license.txt b/mods/mtg_craftguide/license.txt new file mode 100644 index 0000000..8d28c5c --- /dev/null +++ b/mods/mtg_craftguide/license.txt @@ -0,0 +1,63 @@ +License of source code +---------------------- + +The MIT License (MIT) + +Copyright (C) 2015-2019 Jean-Patrick Guerrero and contributors. +Copyright (C) 2020 pauloue + +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. + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) + +Copyright (C) 2018 paramat +Copyright (C) Neuromancer +Copyright (C) 2017 Wuzzy + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/mtg_craftguide/locale/mtg_craftguide.fr.tr b/mods/mtg_craftguide/locale/mtg_craftguide.fr.tr new file mode 100644 index 0000000..d43d66c --- /dev/null +++ b/mods/mtg_craftguide/locale/mtg_craftguide.fr.tr @@ -0,0 +1,41 @@ +# textdomain: mtg_craftguide + + +### init.lua ### + +Any black dye=Quelconque colorant noir +Any black flower=Quelconque fleur noire +Any blue dye=Quelconque colorant bleu +Any blue flower=Quelconque fleur bleue +Any brown dye=Quelconque colorant marron +Any coal=Quelconque charbon +Any cyan dye=Quelconque colorant bleu ciel +Any dark green dye=Quelconque colorant vert foncé +Any dark grey dye=Quelconque colorant gris foncé +Any green dye=Quelconque colorant vert +Any green flower=Quelconque fleur verte +Any grey dye=Quelconque colorant gris +Any item belonging to the group(s): @1=Tout item appartenant au(x) groupe(s) : @1 +Any kind of stone block=Quelconque roche +Any magenta dye=Quelconque colorant magenta +Any orange dye=Quelconque colorant orange +Any orange flower=Quelconque fleur orange +Any pink dye=Quelconque colorant rose +Any red dye=Quelconque colorant rouge +Any red flower=Quelconque fleur rouge +Any sand=Quelconque sable +Any stick=Quelconque bâton +Any vessel=Quelconque couvert +Any violet dye=Quelconque colorant violet +Any violet flower=Quelconque fleur violette +Any white dye=Quelconque colorant blanc +Any white flower=Quelconque fleur blanche +Any wood planks=Quelconques planches de bois +Any wool=Quelconque laine +Any yellow dye=Quelconque colorant jaune +Any yellow flower=Quelconque fleur jaune +Cooking time: @1=Temps de cuisson : @1 +Recipe @1 of @2=Recette @1 sur @2 +Recipes=Recettes +Shapeless=Sans forme +Usage @1 of @2=Usage @1 sur @2 diff --git a/mods/mtg_craftguide/locale/template.txt b/mods/mtg_craftguide/locale/template.txt new file mode 100644 index 0000000..aec2126 --- /dev/null +++ b/mods/mtg_craftguide/locale/template.txt @@ -0,0 +1,57 @@ +# textdomain: mtg_craftguide + + +### init.lua ### + +Any black dye= +Any black flower= +Any blue dye= +Any blue flower= +Any brown dye= +Any coal= +Any cyan dye= +Any dark green dye= +Any dark grey dye= +Any green dye= +Any green flower= +Any grey dye= +Any item belonging to the group(s): @1= +Any kind of stone block= +Any magenta dye= +Any orange dye= +Any orange flower= +Any pink dye= +Any red dye= +Any red flower= +Any sand= +Any stick= +Any vessel= +Any violet dye= +Any violet flower= +Any white dye= +Any white flower= +Any wood planks= +Any wool= +Any yellow dye= +Any yellow flower= +Click again to show recipes.= +Click again to show usages.= +Cooking time: @1= +Fuel= +# Label for group ingredients +G= +Next page= +Next recipe= +No items to show.= +No recipes.= +No usages.= +Previous page= +Previous recipe= +Recipe @1 of @2= +Recipe is too big to be displayed.= +Recipes= +Reset= +Search= +Shapeless= +Unknown Item= +Usage @1 of @2= diff --git a/mods/mtg_craftguide/mod.conf b/mods/mtg_craftguide/mod.conf new file mode 100644 index 0000000..3b2d975 --- /dev/null +++ b/mods/mtg_craftguide/mod.conf @@ -0,0 +1,3 @@ +name = mtg_craftguide +description = Minetest Game mod: mtg_craftguide +depends = sfinv diff --git a/mods/mtg_craftguide/textures/craftguide_clear_icon.png b/mods/mtg_craftguide/textures/craftguide_clear_icon.png new file mode 100644 index 0000000..1a0e513 Binary files /dev/null and b/mods/mtg_craftguide/textures/craftguide_clear_icon.png differ diff --git a/mods/mtg_craftguide/textures/craftguide_furnace.png b/mods/mtg_craftguide/textures/craftguide_furnace.png new file mode 100644 index 0000000..60d1a61 Binary files /dev/null and b/mods/mtg_craftguide/textures/craftguide_furnace.png differ diff --git a/mods/mtg_craftguide/textures/craftguide_next_icon.png b/mods/mtg_craftguide/textures/craftguide_next_icon.png new file mode 100644 index 0000000..266c9ba Binary files /dev/null and b/mods/mtg_craftguide/textures/craftguide_next_icon.png differ diff --git a/mods/mtg_craftguide/textures/craftguide_prev_icon.png b/mods/mtg_craftguide/textures/craftguide_prev_icon.png new file mode 100644 index 0000000..c807296 Binary files /dev/null and b/mods/mtg_craftguide/textures/craftguide_prev_icon.png differ diff --git a/mods/mtg_craftguide/textures/craftguide_search_icon.png b/mods/mtg_craftguide/textures/craftguide_search_icon.png new file mode 100644 index 0000000..1c374ca Binary files /dev/null and b/mods/mtg_craftguide/textures/craftguide_search_icon.png differ diff --git a/mods/mtg_craftguide/textures/craftguide_shapeless.png b/mods/mtg_craftguide/textures/craftguide_shapeless.png new file mode 100644 index 0000000..51d8ce5 Binary files /dev/null and b/mods/mtg_craftguide/textures/craftguide_shapeless.png differ diff --git a/mods/player_api/README.txt b/mods/player_api/README.txt new file mode 100644 index 0000000..37afadf --- /dev/null +++ b/mods/player_api/README.txt @@ -0,0 +1,27 @@ +Minetest Game mod: player_api +============================= +See license.txt for license information. + +Provides an API to allow multiple mods to set player models and textures. +Also sets the default model, texture, and player flags. +This mod is only for content related to the Player API and the player object. + +Authors of source code +---------------------- +Originally by celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures, models and sounds) +---------------------------------------------- +Original model by MirceaKitsune (CC BY-SA 3.0). +Various alterations and fixes by kilbith, sofar, xunto, Rogier-5, TeTpaAka, Desour, +stujones11, An0n3m0us (CC BY-SA 3.0): + character.b3d + character.blend + +Jordach (CC BY-SA 3.0): + character.png + +celeron55, Perttu Ahola (CC BY-SA 3.0): + player.png + player_back.png diff --git a/mods/player_api/api.lua b/mods/player_api/api.lua new file mode 100644 index 0000000..0aee048 --- /dev/null +++ b/mods/player_api/api.lua @@ -0,0 +1,146 @@ +-- Minetest 0.4 mod: player +-- See README.txt for licensing and other information. + +player_api = {} + +-- Player animation blending +-- Note: This is currently broken due to a bug in Irrlicht, leave at 0 +local animation_blend = 0 + +player_api.registered_models = { } + +-- Local for speed. +local models = player_api.registered_models + +function player_api.register_model(name, def) + models[name] = def +end + +-- Player stats and animations +local player_model = {} +local player_textures = {} +local player_anim = {} +local player_sneak = {} +player_api.player_attached = {} + +function player_api.get_animation(player) + local name = player:get_player_name() + return { + model = player_model[name], + textures = player_textures[name], + animation = player_anim[name], + } +end + +-- Called when a player's appearance needs to be updated +function player_api.set_model(player, model_name) + local name = player:get_player_name() + local model = models[model_name] + if model then + if player_model[name] == model_name then + return + end + player:set_properties({ + mesh = model_name, + textures = player_textures[name] or model.textures, + visual = "mesh", + visual_size = model.visual_size or {x = 1, y = 1}, + collisionbox = model.collisionbox or {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, + stepheight = model.stepheight or 0.6, + eye_height = model.eye_height or 1.47, + }) + player_api.set_animation(player, "stand") + else + player:set_properties({ + textures = {"player.png", "player_back.png"}, + visual = "upright_sprite", + visual_size = {x = 1, y = 2}, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3}, + stepheight = 0.6, + eye_height = 1.625, + }) + end + player_model[name] = model_name +end + +function player_api.set_textures(player, textures) + local name = player:get_player_name() + local model = models[player_model[name]] + local model_textures = model and model.textures or nil + player_textures[name] = textures or model_textures + player:set_properties({textures = textures or model_textures}) +end + +function player_api.set_animation(player, anim_name, speed) + local name = player:get_player_name() + if player_anim[name] == anim_name then + return + end + local model = player_model[name] and models[player_model[name]] + if not (model and model.animations[anim_name]) then + return + end + local anim = model.animations[anim_name] + player_anim[name] = anim_name + player:set_animation(anim, speed or model.animation_speed, animation_blend) +end + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + player_model[name] = nil + player_anim[name] = nil + player_textures[name] = nil + player_sneak[name] = nil + player_api.player_attached[name] = nil +end) + +-- Localize for better performance. +local player_set_animation = player_api.set_animation +local player_attached = player_api.player_attached + +-- Prevent knockback for attached players +local old_calculate_knockback = minetest.calculate_knockback +function minetest.calculate_knockback(player, ...) + if player_attached[player:get_player_name()] then + return 0 + end + return old_calculate_knockback(player, ...) +end + +-- Check each player and apply animations +minetest.register_globalstep(function() + for _, player in pairs(minetest.get_connected_players()) do + local name = player:get_player_name() + local model_name = player_model[name] + local model = model_name and models[model_name] + if model and not player_attached[name] then + local controls = player:get_player_control() + local animation_speed_mod = model.animation_speed or 30 + + -- Determine if the player is sneaking, and reduce animation speed if so + if controls.sneak then + animation_speed_mod = animation_speed_mod / 2 + end + + -- Apply animations based on what the player is doing + if player:get_hp() == 0 then + player_set_animation(player, "lay") + -- Determine if the player is walking + elseif controls.up or controls.down or controls.left or controls.right then + if player_sneak[name] ~= controls.sneak then + player_anim[name] = nil + player_sneak[name] = controls.sneak + end + if controls.LMB or controls.RMB then + player_set_animation(player, "walk_mine", animation_speed_mod) + else + player_set_animation(player, "walk", animation_speed_mod) + end + elseif controls.LMB or controls.RMB then + player_set_animation(player, "mine", animation_speed_mod) + else + player_set_animation(player, "stand", animation_speed_mod) + end + end + end +end) diff --git a/mods/player_api/init.lua b/mods/player_api/init.lua new file mode 100644 index 0000000..1176b0e --- /dev/null +++ b/mods/player_api/init.lua @@ -0,0 +1,34 @@ +-- player/init.lua + +dofile(minetest.get_modpath("player_api") .. "/api.lua") + +-- Default player appearance +player_api.register_model("character.b3d", { + animation_speed = 30, + textures = {"character.png"}, + animations = { + -- Standard animations. + stand = {x = 0, y = 79}, + lay = {x = 162, y = 166}, + walk = {x = 168, y = 187}, + mine = {x = 189, y = 198}, + walk_mine = {x = 200, y = 219}, + sit = {x = 81, y = 160}, + }, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, + stepheight = 0.6, + eye_height = 1.47, +}) + +-- Update appearance when the player joins +minetest.register_on_joinplayer(function(player) + player_api.player_attached[player:get_player_name()] = false + player_api.set_model(player, "character.b3d") + player:set_local_animation( + {x = 0, y = 79}, + {x = 168, y = 187}, + {x = 189, y = 198}, + {x = 200, y = 219}, + 30 + ) +end) diff --git a/mods/player_api/license.txt b/mods/player_api/license.txt new file mode 100644 index 0000000..bdc4315 --- /dev/null +++ b/mods/player_api/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011 celeron55, Perttu Ahola +Copyright (C) 2011 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2011 celeron55, Perttu Ahola +Copyright (C) 2012 MirceaKitsune +Copyright (C) 2012 Jordach +Copyright (C) 2015 kilbith +Copyright (C) 2016 sofar +Copyright (C) 2016 xunto +Copyright (C) 2016 Rogier-5 +Copyright (C) 2017 TeTpaAka +Copyright (C) 2017 Desour +Copyright (C) 2018 stujones11 +Copyright (C) 2019 An0n3m0us + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/player_api/mod.conf b/mods/player_api/mod.conf new file mode 100644 index 0000000..198b86d --- /dev/null +++ b/mods/player_api/mod.conf @@ -0,0 +1,2 @@ +name = player_api +description = Minetest Game mod: player_api diff --git a/mods/player_api/models/character.b3d b/mods/player_api/models/character.b3d new file mode 100644 index 0000000..764197d Binary files /dev/null and b/mods/player_api/models/character.b3d differ diff --git a/mods/player_api/models/character.blend b/mods/player_api/models/character.blend new file mode 100644 index 0000000..a32c343 Binary files /dev/null and b/mods/player_api/models/character.blend differ diff --git a/mods/player_api/models/character.png b/mods/player_api/models/character.png new file mode 100644 index 0000000..0502178 Binary files /dev/null and b/mods/player_api/models/character.png differ diff --git a/mods/player_api/textures/player.png b/mods/player_api/textures/player.png new file mode 100644 index 0000000..6d61c43 Binary files /dev/null and b/mods/player_api/textures/player.png differ diff --git a/mods/player_api/textures/player_back.png b/mods/player_api/textures/player_back.png new file mode 100644 index 0000000..5e9ef05 Binary files /dev/null and b/mods/player_api/textures/player_back.png differ diff --git a/mods/screwdriver/README.txt b/mods/screwdriver/README.txt new file mode 100644 index 0000000..14c073e --- /dev/null +++ b/mods/screwdriver/README.txt @@ -0,0 +1,13 @@ +Minetest Game mod: screwdriver +============================== +See license.txt for license information. + +License of source code +---------------------- +Originally by RealBadAngel, Maciej Kasatkin (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +License of media (textures) +--------------------------- +Created by Gambit (CC BY-SA 3.0): + screwdriver.png diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua new file mode 100644 index 0000000..82fbaab --- /dev/null +++ b/mods/screwdriver/init.lua @@ -0,0 +1,178 @@ +-- screwdriver/init.lua + +screwdriver = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("screwdriver") + + +screwdriver.ROTATE_FACE = 1 +screwdriver.ROTATE_AXIS = 2 +screwdriver.disallow = function(pos, node, user, mode, new_param2) + return false +end +screwdriver.rotate_simple = function(pos, node, user, mode, new_param2) + if mode ~= screwdriver.ROTATE_FACE then + return false + end +end + +-- For attached wallmounted nodes: returns true if rotation is valid +-- simplified version of minetest:builtin/game/falling.lua#L148. +local function check_attached_node(pos, rotation) + local d = minetest.wallmounted_to_dir(rotation) + local p2 = vector.add(pos, d) + local n = minetest.get_node(p2).name + local def2 = minetest.registered_nodes[n] + if def2 and not def2.walkable then + return false + end + return true +end + +screwdriver.rotate = {} + +local facedir_tbl = { + [screwdriver.ROTATE_FACE] = { + [0] = 1, [1] = 2, [2] = 3, [3] = 0, + [4] = 5, [5] = 6, [6] = 7, [7] = 4, + [8] = 9, [9] = 10, [10] = 11, [11] = 8, + [12] = 13, [13] = 14, [14] = 15, [15] = 12, + [16] = 17, [17] = 18, [18] = 19, [19] = 16, + [20] = 21, [21] = 22, [22] = 23, [23] = 20, + }, + [screwdriver.ROTATE_AXIS] = { + [0] = 4, [1] = 4, [2] = 4, [3] = 4, + [4] = 8, [5] = 8, [6] = 8, [7] = 8, + [8] = 12, [9] = 12, [10] = 12, [11] = 12, + [12] = 16, [13] = 16, [14] = 16, [15] = 16, + [16] = 20, [17] = 20, [18] = 20, [19] = 20, + [20] = 0, [21] = 0, [22] = 0, [23] = 0, + }, +} + +screwdriver.rotate.facedir = function(pos, node, mode) + local rotation = node.param2 % 32 -- get first 5 bits + local other = node.param2 - rotation + rotation = facedir_tbl[mode][rotation] or 0 + return rotation + other +end + +screwdriver.rotate.colorfacedir = screwdriver.rotate.facedir + +local wallmounted_tbl = { + [screwdriver.ROTATE_FACE] = {[2] = 5, [3] = 4, [4] = 2, [5] = 3, [1] = 0, [0] = 1}, + [screwdriver.ROTATE_AXIS] = {[2] = 5, [3] = 4, [4] = 2, [5] = 1, [1] = 0, [0] = 3} +} + +screwdriver.rotate.wallmounted = function(pos, node, mode) + local rotation = node.param2 % 8 -- get first 3 bits + local other = node.param2 - rotation + rotation = wallmounted_tbl[mode][rotation] or 0 + if minetest.get_item_group(node.name, "attached_node") ~= 0 then + -- find an acceptable orientation + for i = 1, 5 do + if not check_attached_node(pos, rotation) then + rotation = wallmounted_tbl[mode][rotation] or 0 + else + break + end + end + end + return rotation + other +end + +screwdriver.rotate.colorwallmounted = screwdriver.rotate.wallmounted + +-- Handles rotation +screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses) + if pointed_thing.type ~= "node" then + return + end + + local pos = pointed_thing.under + local player_name = user and user:get_player_name() or "" + + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + return + end + + local node = minetest.get_node(pos) + local ndef = minetest.registered_nodes[node.name] + if not ndef then + return itemstack + end + -- can we rotate this paramtype2? + local fn = screwdriver.rotate[ndef.paramtype2] + if not fn and not ndef.on_rotate then + return itemstack + end + + local should_rotate = true + local new_param2 + if fn then + new_param2 = fn(pos, node, mode) + else + new_param2 = node.param2 + end + + -- Node provides a handler, so let the handler decide instead if the node can be rotated + if ndef.on_rotate then + -- Copy pos and node because callback can modify it + local result = ndef.on_rotate(vector.new(pos), + {name = node.name, param1 = node.param1, param2 = node.param2}, + user, mode, new_param2) + if result == false then -- Disallow rotation + return itemstack + elseif result == true then + should_rotate = false + end + elseif ndef.on_rotate == false then + return itemstack + elseif ndef.can_dig and not ndef.can_dig(pos, user) then + return itemstack + end + + if should_rotate and new_param2 ~= node.param2 then + node.param2 = new_param2 + minetest.swap_node(pos, node) + minetest.check_for_falling(pos) + end + + if not (creative and creative.is_enabled_for and + creative.is_enabled_for(player_name)) then + itemstack:add_wear(65535 / ((uses or 200) - 1)) + end + + return itemstack +end + +-- Screwdriver +minetest.register_tool("screwdriver:screwdriver", { + description = S("Screwdriver") .. "\n" .. S("(left-click rotates face, right-click rotates axis)"), + inventory_image = "screwdriver.png", + groups = {tool = 1}, + on_use = function(itemstack, user, pointed_thing) + screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 200) + return itemstack + end, + on_place = function(itemstack, user, pointed_thing) + screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_AXIS, 200) + return itemstack + end, +}) + + +minetest.register_craft({ + output = "screwdriver:screwdriver", + recipe = { + {"default:steel_ingot"}, + {"group:stick"} + } +}) + +minetest.register_alias("screwdriver:screwdriver1", "screwdriver:screwdriver") +minetest.register_alias("screwdriver:screwdriver2", "screwdriver:screwdriver") +minetest.register_alias("screwdriver:screwdriver3", "screwdriver:screwdriver") +minetest.register_alias("screwdriver:screwdriver4", "screwdriver:screwdriver") diff --git a/mods/screwdriver/license.txt b/mods/screwdriver/license.txt new file mode 100644 index 0000000..d9b721b --- /dev/null +++ b/mods/screwdriver/license.txt @@ -0,0 +1,50 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2013-2016 RealBadAngel, Maciej Kasatkin +Copyright (C) 2013-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2013-2016 Gambit + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/screwdriver/locale/screwdriver.de.tr b/mods/screwdriver/locale/screwdriver.de.tr new file mode 100644 index 0000000..3c48ab4 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.de.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Schraubendreher +(left-click rotates face, right-click rotates axis)=(Linksklick dreht Seite, Rechtsklick dreht Achse) diff --git a/mods/screwdriver/locale/screwdriver.es.tr b/mods/screwdriver/locale/screwdriver.es.tr new file mode 100644 index 0000000..868ffc3 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.es.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Destornillador +(left-click rotates face, right-click rotates axis)=(clic-izquierdo gira la cara, clic-derecho rota el eje) diff --git a/mods/screwdriver/locale/screwdriver.fr.tr b/mods/screwdriver/locale/screwdriver.fr.tr new file mode 100644 index 0000000..fe34a9b --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.fr.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Tournevis +(left-click rotates face, right-click rotates axis)=(clic gauche pour changer de face, clic droit pour changer d'axe) diff --git a/mods/screwdriver/locale/screwdriver.id.tr b/mods/screwdriver/locale/screwdriver.id.tr new file mode 100644 index 0000000..ec83c79 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.id.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Obeng +(left-click rotates face, right-click rotates axis)=(klik kiri putar sisi, klik kanan putar sumbu) diff --git a/mods/screwdriver/locale/screwdriver.it.tr b/mods/screwdriver/locale/screwdriver.it.tr new file mode 100644 index 0000000..d9fc0a0 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.it.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Cacciavite +(left-click rotates face, right-click rotates axis)=(click sinistro ruota la faccia, click destro ruota l'asse) \ No newline at end of file diff --git a/mods/screwdriver/locale/screwdriver.ms.tr b/mods/screwdriver/locale/screwdriver.ms.tr new file mode 100644 index 0000000..f296fc5 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.ms.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Pemutar Skru +(left-click rotates face, right-click rotates axis)=(klik-kiri putar muka, klik-kanan putar paksi) diff --git a/mods/screwdriver/locale/screwdriver.ru.tr b/mods/screwdriver/locale/screwdriver.ru.tr new file mode 100644 index 0000000..bbab330 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.ru.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Отвёртка +(left-click rotates face, right-click rotates axis)=(клик левой кнопкой мыши вращает грань, клик правой кнопкой мыши вращает ось) diff --git a/mods/screwdriver/locale/screwdriver.se.tr b/mods/screwdriver/locale/screwdriver.se.tr new file mode 100644 index 0000000..9197357 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.se.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Skruvmejsel +(left-click rotates face, right-click rotates axis)=(vänster-klick roterar ansikte, höger-klick roterar axeln) \ No newline at end of file diff --git a/mods/screwdriver/locale/screwdriver.sk.tr b/mods/screwdriver/locale/screwdriver.sk.tr new file mode 100644 index 0000000..74cb417 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.sk.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Skrutkovač +(left-click rotates face, right-click rotates axis)=(Ľavý klik otáča stranu, pravý klik otáča os) diff --git a/mods/screwdriver/locale/screwdriver.zh_CN.tr b/mods/screwdriver/locale/screwdriver.zh_CN.tr new file mode 100644 index 0000000..caddf79 --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.zh_CN.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=螺丝刀 +(left-click rotates face, right-click rotates axis)=(左键单击旋转面,右键单击旋转轴) diff --git a/mods/screwdriver/locale/screwdriver.zh_TW.tr b/mods/screwdriver/locale/screwdriver.zh_TW.tr new file mode 100644 index 0000000..e638bfa --- /dev/null +++ b/mods/screwdriver/locale/screwdriver.zh_TW.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=螺絲刀 +(left-click rotates face, right-click rotates axis)=(左鍵單擊旋轉面,右鍵單擊旋轉軸) diff --git a/mods/screwdriver/locale/template.txt b/mods/screwdriver/locale/template.txt new file mode 100644 index 0000000..4cc8e2a --- /dev/null +++ b/mods/screwdriver/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver= +(left-click rotates face, right-click rotates axis)= diff --git a/mods/screwdriver/mod.conf b/mods/screwdriver/mod.conf new file mode 100644 index 0000000..306c52b --- /dev/null +++ b/mods/screwdriver/mod.conf @@ -0,0 +1,2 @@ +name = screwdriver +description = Minetest Game mod: screwdriver diff --git a/mods/screwdriver/textures/screwdriver.png b/mods/screwdriver/textures/screwdriver.png new file mode 100644 index 0000000..b2a56d5 Binary files /dev/null and b/mods/screwdriver/textures/screwdriver.png differ diff --git a/mods/sethome/README.txt b/mods/sethome/README.txt new file mode 100644 index 0000000..6f0a282 --- /dev/null +++ b/mods/sethome/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: sethome +========================== +See license.txt for license information. + +Authors of source code +---------------------- +sfan5 (MIT) diff --git a/mods/sethome/init.lua b/mods/sethome/init.lua new file mode 100644 index 0000000..9fc8e6a --- /dev/null +++ b/mods/sethome/init.lua @@ -0,0 +1,107 @@ +-- sethome/init.lua + +sethome = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("sethome") + + +local homes_file = minetest.get_worldpath() .. "/homes" +local homepos = {} + +local function loadhomes() + local input = io.open(homes_file, "r") + if not input then + return -- no longer an error + end + + -- Iterate over all stored positions in the format "x y z player" for each line + for pos, name in input:read("*a"):gmatch("(%S+ %S+ %S+)%s([%w_-]+)[\r\n]") do + homepos[name] = minetest.string_to_pos(pos) + end + input:close() +end + +loadhomes() + +sethome.set = function(name, pos) + local player = minetest.get_player_by_name(name) + if not player or not pos then + return false + end + local player_meta = player:get_meta() + player_meta:set_string("sethome:home", minetest.pos_to_string(pos)) + + -- remove `name` from the old storage file + if not homepos[name] then + return true + end + local data = {} + local output = io.open(homes_file, "w") + if output then + homepos[name] = nil + for i, v in pairs(homepos) do + table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, i)) + end + output:write(table.concat(data)) + io.close(output) + return true + end + return true -- if the file doesn't exist - don't return an error. +end + +sethome.get = function(name) + local player = minetest.get_player_by_name(name) + local player_meta = player:get_meta() + local pos = minetest.string_to_pos(player_meta:get_string("sethome:home")) + if pos then + return pos + end + + -- fetch old entry from storage table + pos = homepos[name] + if pos then + return vector.new(pos) + else + return nil + end +end + +sethome.go = function(name) + local pos = sethome.get(name) + local player = minetest.get_player_by_name(name) + if player and pos then + player:set_pos(pos) + return true + end + return false +end + +minetest.register_privilege("home", { + description = S("Can use /sethome and /home"), + give_to_singleplayer = false +}) + +minetest.register_chatcommand("home", { + description = S("Teleport you to your home point"), + privs = {home = true}, + func = function(name) + if sethome.go(name) then + return true, S("Teleported to home!") + end + return false, S("Set a home using /sethome") + end, +}) + +minetest.register_chatcommand("sethome", { + description = S("Set your home point"), + privs = {home = true}, + func = function(name) + name = name or "" -- fallback to blank name if nil + local player = minetest.get_player_by_name(name) + if player and sethome.set(name, player:get_pos()) then + return true, S("Home set!") + end + return false, S("Player not found!") + end, +}) diff --git a/mods/sethome/license.txt b/mods/sethome/license.txt new file mode 100644 index 0000000..09f03b0 --- /dev/null +++ b/mods/sethome/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 sfan5 + +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. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/sethome/locale/sethome.de.tr b/mods/sethome/locale/sethome.de.tr new file mode 100644 index 0000000..46279dd --- /dev/null +++ b/mods/sethome/locale/sethome.de.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Kann /sethome und /home benutzen +Teleport you to your home point=Teleportieren Sie sich zu Ihrem Zuhause-Punkt +Teleported to home!=Nach Hause teleportiert! +Set a home using /sethome=Ein Zuhause mit /sethome setzen +Set your home point=Ihren Zuhause-Punkt setzen +Home set!=Zuhause gesetzt! +Player not found!=Spieler nicht gefunden! diff --git a/mods/sethome/locale/sethome.es.tr b/mods/sethome/locale/sethome.es.tr new file mode 100644 index 0000000..7c04ee3 --- /dev/null +++ b/mods/sethome/locale/sethome.es.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Puedes usar /sethome y /home +Teleport you to your home point=Teletranspórtate a tu hogar +Teleported to home!=¡Teletransportado a tu hogar! +Set a home using /sethome=Establece tu hogar usando /sethome +Set your home point=Establece el sitio de tu hogar +Home set!=¡Hogar establecido! +Player not found!=¡Jugador no encontrado! diff --git a/mods/sethome/locale/sethome.fr.tr b/mods/sethome/locale/sethome.fr.tr new file mode 100644 index 0000000..852621d --- /dev/null +++ b/mods/sethome/locale/sethome.fr.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Peut utiliser /sethome et /home +Teleport you to your home point=Vous téléporter à votre domicile +Teleported to home!=Téléporté à votre domicile ! +Set a home using /sethome=Définir un domicile en utilisant /sethome +Set your home point=Définir votre domicile +Home set!=Domicile défini ! +Player not found!=Joueur non trouvé ! diff --git a/mods/sethome/locale/sethome.id.tr b/mods/sethome/locale/sethome.id.tr new file mode 100644 index 0000000..1966978 --- /dev/null +++ b/mods/sethome/locale/sethome.id.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Boleh pakai /sethome dan /home +Teleport you to your home point=Teleportasi ke rumah Anda +Teleported to home!=Teleportasi ke rumah! +Set a home using /sethome=Atur letak rumah dengan /sethome +Set your home point=Atur letak rumah +Home set!=Letak rumah diatur! +Player not found!=Pemain tidak ditemukan! diff --git a/mods/sethome/locale/sethome.it.tr b/mods/sethome/locale/sethome.it.tr new file mode 100644 index 0000000..bbf86b8 --- /dev/null +++ b/mods/sethome/locale/sethome.it.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Può usare /sethome e /home +Teleport you to your home point=Ti teletrasporta al tuo punto di domicilio +Teleported to home!=Teletrasportato a casa! +Set a home using /sethome=Imposta un domicilio usando /sethome +Set your home point=Imposta il tuo punto di domicilio +Home set!=Domicilio impostato! +Player not found!=Giocatore non trovato! \ No newline at end of file diff --git a/mods/sethome/locale/sethome.ms.tr b/mods/sethome/locale/sethome.ms.tr new file mode 100644 index 0000000..7e9ec76 --- /dev/null +++ b/mods/sethome/locale/sethome.ms.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Boleh guna /sethome dan /home +Teleport you to your home point=Teleportasikan anda ke titik rumah anda +Teleported to home!=Diteleportasikan ke rumah! +Set a home using /sethome=Tetapkan rumah menggunakan /sethome +Set your home point=Tetapkan titik rumah anda +Home set!=Rumah ditetapkan! +Player not found!=Pemain tidak dijumpai! diff --git a/mods/sethome/locale/sethome.ru.tr b/mods/sethome/locale/sethome.ru.tr new file mode 100644 index 0000000..6738824 --- /dev/null +++ b/mods/sethome/locale/sethome.ru.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Возможность использовать /sethome и /home +Teleport you to your home point=Вы телепортируетесь в свою домашнюю точку +Teleported to home!=Вы телепортировались домой! +Set a home using /sethome=Установите домашнюю точку, используя /sethome +Set your home point=Установите вашу домашнюю точку +Home set!=Домашняя точка установлена! +Player not found!=Игрок не обнаружен! diff --git a/mods/sethome/locale/sethome.se.tr b/mods/sethome/locale/sethome.se.tr new file mode 100644 index 0000000..6077e4a --- /dev/null +++ b/mods/sethome/locale/sethome.se.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Kan används /sethome och /home +Teleport you to your home point=Teleportera dig till din hempunkt +Teleported to home!=Teleporterad hem! +Set a home using /sethome=Ställ in ett hem med /sethome +Set your home point=Ställ in din hempunkt +Home set!=Hem inställt! +Player not found!=Spelare inte hittad! \ No newline at end of file diff --git a/mods/sethome/locale/sethome.sk.tr b/mods/sethome/locale/sethome.sk.tr new file mode 100644 index 0000000..be5233e --- /dev/null +++ b/mods/sethome/locale/sethome.sk.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Môžeš použivať /sethome a /home +Teleport you to your home point=Teleportuj sa domov +Teleported to home!=Teleportovaný domov! +Set a home using /sethome=Nastav si domov použitím /sethome +Set your home point=Nastaviť si domov +Home set!=Domov nastavený! +Player not found!=Hráč nenájdený! diff --git a/mods/sethome/locale/sethome.zh_CN.tr b/mods/sethome/locale/sethome.zh_CN.tr new file mode 100644 index 0000000..9e3780a --- /dev/null +++ b/mods/sethome/locale/sethome.zh_CN.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=可以使用/sethome和/home +Teleport you to your home point=传送您到您家的地点 +Teleported to home!=已传送到家! +Set a home using /sethome=使用/sethome设定家 +Set your home point=设定您家的地点 +Home set!=已设定家! +Player not found!=未找到玩家! diff --git a/mods/sethome/locale/sethome.zh_TW.tr b/mods/sethome/locale/sethome.zh_TW.tr new file mode 100644 index 0000000..43e14aa --- /dev/null +++ b/mods/sethome/locale/sethome.zh_TW.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=可以使用/sethome和/home +Teleport you to your home point=傳送您到您家的地點 +Teleported to home!=已傳送到家! +Set a home using /sethome=使用/sethome設定家 +Set your home point=設定您家的地點 +Home set!=已設定家! +Player not found!=未找到玩家! diff --git a/mods/sethome/locale/template.txt b/mods/sethome/locale/template.txt new file mode 100644 index 0000000..d04bd50 --- /dev/null +++ b/mods/sethome/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home= +Teleport you to your home point= +Teleported to home!= +Set a home using /sethome= +Set your home point= +Home set!= +Player not found!= diff --git a/mods/sethome/mod.conf b/mods/sethome/mod.conf new file mode 100644 index 0000000..0079925 --- /dev/null +++ b/mods/sethome/mod.conf @@ -0,0 +1,2 @@ +name = sethome +description = Minetest Game mod: sethome diff --git a/mods/sfinv/README.txt b/mods/sfinv/README.txt new file mode 100644 index 0000000..a69e3c3 --- /dev/null +++ b/mods/sfinv/README.txt @@ -0,0 +1,18 @@ +Minetest Game mod: sfinv +======================== +See license.txt for license information. + +Simple Fast Inventory. +A cleaner, simpler, solution to having an advanced inventory in Minetest. +See game_api.txt for this mod's API. +Available for use outside of MTG here: +https://forum.minetest.net/viewtopic.php?t=19765 + +Authors of source code +---------------------- +rubenwardy (MIT) + +Authors of media +---------------- +paramat (CC BY-SA 3.0): + sfinv_crafting_arrow.png - derived from a texture by BlockMen (CC BY-SA 3.0) diff --git a/mods/sfinv/api.lua b/mods/sfinv/api.lua new file mode 100644 index 0000000..1dbc44a --- /dev/null +++ b/mods/sfinv/api.lua @@ -0,0 +1,189 @@ +sfinv = { + pages = {}, + pages_unordered = {}, + contexts = {}, + enabled = true +} + +function sfinv.register_page(name, def) + assert(name, "Invalid sfinv page. Requires a name") + assert(def, "Invalid sfinv page. Requires a def[inition] table") + assert(def.get, "Invalid sfinv page. Def requires a get function.") + assert(not sfinv.pages[name], "Attempt to register already registered sfinv page " .. dump(name)) + + sfinv.pages[name] = def + def.name = name + table.insert(sfinv.pages_unordered, def) +end + +function sfinv.override_page(name, def) + assert(name, "Invalid sfinv page override. Requires a name") + assert(def, "Invalid sfinv page override. Requires a def[inition] table") + local page = sfinv.pages[name] + assert(page, "Attempt to override sfinv page " .. dump(name) .. " which does not exist.") + for key, value in pairs(def) do + page[key] = value + end +end + +function sfinv.get_nav_fs(player, context, nav, current_idx) + -- Only show tabs if there is more than one page + if #nav > 1 then + return "tabheader[0,0;sfinv_nav_tabs;" .. table.concat(nav, ",") .. + ";" .. current_idx .. ";true;false]" + else + return "" + end +end + +local theme_inv = [[ + image[0,5.2;1,1;gui_hb_bg.png] + image[1,5.2;1,1;gui_hb_bg.png] + image[2,5.2;1,1;gui_hb_bg.png] + image[3,5.2;1,1;gui_hb_bg.png] + image[4,5.2;1,1;gui_hb_bg.png] + image[5,5.2;1,1;gui_hb_bg.png] + image[6,5.2;1,1;gui_hb_bg.png] + image[7,5.2;1,1;gui_hb_bg.png] + list[current_player;main;0,5.2;8,1;] + list[current_player;main;0,6.35;8,3;8] + ]] + +function sfinv.make_formspec(player, context, content, show_inv, size) + local tmp = { + size or "size[8,9.1]", + sfinv.get_nav_fs(player, context, context.nav_titles, context.nav_idx), + show_inv and theme_inv or "", + content + } + return table.concat(tmp, "") +end + +function sfinv.get_homepage_name(player) + return "sfinv:crafting" +end + +function sfinv.get_formspec(player, context) + -- Generate navigation tabs + local nav = {} + local nav_ids = {} + local current_idx = 1 + for i, pdef in pairs(sfinv.pages_unordered) do + if not pdef.is_in_nav or pdef:is_in_nav(player, context) then + nav[#nav + 1] = pdef.title + nav_ids[#nav_ids + 1] = pdef.name + if pdef.name == context.page then + current_idx = #nav_ids + end + end + end + context.nav = nav_ids + context.nav_titles = nav + context.nav_idx = current_idx + + -- Generate formspec + local page = sfinv.pages[context.page] or sfinv.pages["404"] + if page then + return page:get(player, context) + else + local old_page = context.page + local home_page = sfinv.get_homepage_name(player) + + if old_page == home_page then + minetest.log("error", "[sfinv] Couldn't find " .. dump(old_page) .. + ", which is also the old page") + + return "" + end + + context.page = home_page + assert(sfinv.pages[context.page], "[sfinv] Invalid homepage") + minetest.log("warning", "[sfinv] Couldn't find " .. dump(old_page) .. + " so switching to homepage") + + return sfinv.get_formspec(player, context) + end +end + +function sfinv.get_or_create_context(player) + local name = player:get_player_name() + local context = sfinv.contexts[name] + if not context then + context = { + page = sfinv.get_homepage_name(player) + } + sfinv.contexts[name] = context + end + return context +end + +function sfinv.set_context(player, context) + sfinv.contexts[player:get_player_name()] = context +end + +function sfinv.set_player_inventory_formspec(player, context) + local fs = sfinv.get_formspec(player, + context or sfinv.get_or_create_context(player)) + player:set_inventory_formspec(fs) +end + +function sfinv.set_page(player, pagename) + local context = sfinv.get_or_create_context(player) + local oldpage = sfinv.pages[context.page] + if oldpage and oldpage.on_leave then + oldpage:on_leave(player, context) + end + context.page = pagename + local page = sfinv.pages[pagename] + if page.on_enter then + page:on_enter(player, context) + end + sfinv.set_player_inventory_formspec(player, context) +end + +function sfinv.get_page(player) + local context = sfinv.contexts[player:get_player_name()] + return context and context.page or sfinv.get_homepage_name(player) +end + +minetest.register_on_joinplayer(function(player) + if sfinv.enabled then + sfinv.set_player_inventory_formspec(player) + end +end) + +minetest.register_on_leaveplayer(function(player) + sfinv.contexts[player:get_player_name()] = nil +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "" or not sfinv.enabled then + return false + end + + -- Get Context + local name = player:get_player_name() + local context = sfinv.contexts[name] + if not context then + sfinv.set_player_inventory_formspec(player) + return false + end + + -- Was a tab selected? + if fields.sfinv_nav_tabs and context.nav then + local tid = tonumber(fields.sfinv_nav_tabs) + if tid and tid > 0 then + local id = context.nav[tid] + local page = sfinv.pages[id] + if id and page then + sfinv.set_page(player, id) + end + end + else + -- Pass event to page + local page = sfinv.pages[context.page] + if page and page.on_player_receive_fields then + return page:on_player_receive_fields(player, context, fields) + end + end +end) diff --git a/mods/sfinv/init.lua b/mods/sfinv/init.lua new file mode 100644 index 0000000..71e9ee7 --- /dev/null +++ b/mods/sfinv/init.lua @@ -0,0 +1,19 @@ +-- sfinv/init.lua + +dofile(minetest.get_modpath("sfinv") .. "/api.lua") + +-- Load support for MT game translation. +local S = minetest.get_translator("sfinv") + +sfinv.register_page("sfinv:crafting", { + title = S("Crafting"), + get = function(self, player, context) + return sfinv.make_formspec(player, context, [[ + list[current_player;craft;1.75,0.5;3,3;] + list[current_player;craftpreview;5.75,1.5;1,1;] + image[4.75,1.5;1,1;sfinv_crafting_arrow.png] + listring[current_player;main] + listring[current_player;craft] + ]], true) + end +}) diff --git a/mods/sfinv/license.txt b/mods/sfinv/license.txt new file mode 100644 index 0000000..6676d74 --- /dev/null +++ b/mods/sfinv/license.txt @@ -0,0 +1,59 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2016-2018 rubenwardy + +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. + +For more details: +https://opensource.org/licenses/MIT + + +License of media +---------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2019 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/sfinv/locale/sfinv.de.tr b/mods/sfinv/locale/sfinv.de.tr new file mode 100644 index 0000000..1ba6acb --- /dev/null +++ b/mods/sfinv/locale/sfinv.de.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Fertigung diff --git a/mods/sfinv/locale/sfinv.es.tr b/mods/sfinv/locale/sfinv.es.tr new file mode 100644 index 0000000..b941f4e --- /dev/null +++ b/mods/sfinv/locale/sfinv.es.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Creación diff --git a/mods/sfinv/locale/sfinv.fr.tr b/mods/sfinv/locale/sfinv.fr.tr new file mode 100644 index 0000000..6d59735 --- /dev/null +++ b/mods/sfinv/locale/sfinv.fr.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Artisanat diff --git a/mods/sfinv/locale/sfinv.id.tr b/mods/sfinv/locale/sfinv.id.tr new file mode 100644 index 0000000..643196e --- /dev/null +++ b/mods/sfinv/locale/sfinv.id.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Kerajinan diff --git a/mods/sfinv/locale/sfinv.it.tr b/mods/sfinv/locale/sfinv.it.tr new file mode 100644 index 0000000..85761bc --- /dev/null +++ b/mods/sfinv/locale/sfinv.it.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Assemblaggio \ No newline at end of file diff --git a/mods/sfinv/locale/sfinv.ms.tr b/mods/sfinv/locale/sfinv.ms.tr new file mode 100644 index 0000000..cc416ca --- /dev/null +++ b/mods/sfinv/locale/sfinv.ms.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Pertukangan diff --git a/mods/sfinv/locale/sfinv.ru.tr b/mods/sfinv/locale/sfinv.ru.tr new file mode 100644 index 0000000..a98c708 --- /dev/null +++ b/mods/sfinv/locale/sfinv.ru.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Крафтинг diff --git a/mods/sfinv/locale/sfinv.se.tr b/mods/sfinv/locale/sfinv.se.tr new file mode 100644 index 0000000..cf2924a --- /dev/null +++ b/mods/sfinv/locale/sfinv.se.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Tillverkning \ No newline at end of file diff --git a/mods/sfinv/locale/sfinv.sk.tr b/mods/sfinv/locale/sfinv.sk.tr new file mode 100644 index 0000000..b42c9aa --- /dev/null +++ b/mods/sfinv/locale/sfinv.sk.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=Vytváranie diff --git a/mods/sfinv/locale/sfinv.zh_CN.tr b/mods/sfinv/locale/sfinv.zh_CN.tr new file mode 100644 index 0000000..251362f --- /dev/null +++ b/mods/sfinv/locale/sfinv.zh_CN.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=合成 diff --git a/mods/sfinv/locale/sfinv.zh_TW.tr b/mods/sfinv/locale/sfinv.zh_TW.tr new file mode 100644 index 0000000..251362f --- /dev/null +++ b/mods/sfinv/locale/sfinv.zh_TW.tr @@ -0,0 +1,2 @@ +# textdomain:sfinv +Crafting=合成 diff --git a/mods/sfinv/locale/template.txt b/mods/sfinv/locale/template.txt new file mode 100644 index 0000000..ace5519 --- /dev/null +++ b/mods/sfinv/locale/template.txt @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting= diff --git a/mods/sfinv/mod.conf b/mods/sfinv/mod.conf new file mode 100644 index 0000000..2934435 --- /dev/null +++ b/mods/sfinv/mod.conf @@ -0,0 +1,2 @@ +name = sfinv +description = Minetest Game mod: sfinv diff --git a/mods/sfinv/textures/sfinv_crafting_arrow.png b/mods/sfinv/textures/sfinv_crafting_arrow.png new file mode 100644 index 0000000..df1bbdb Binary files /dev/null and b/mods/sfinv/textures/sfinv_crafting_arrow.png differ diff --git a/mods/spawn/README.txt b/mods/spawn/README.txt new file mode 100644 index 0000000..fc16c2a --- /dev/null +++ b/mods/spawn/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: spawn +======================== +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) diff --git a/mods/spawn/init.lua b/mods/spawn/init.lua new file mode 100644 index 0000000..12c957f --- /dev/null +++ b/mods/spawn/init.lua @@ -0,0 +1,158 @@ +-- spawn/init.lua + +-- Disable by mapgen, setting or if 'static_spawnpoint' is set +-------------------------------------------------------------- + +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" or mg_name == "singlenode" or + minetest.settings:get("static_spawnpoint") or + minetest.settings:get_bool("engine_spawn") then + return +end + + +-- Parameters +------------- + +-- Resolution of search grid in nodes. +local res = 64 +-- Number of points checked in the square search grid (edge * edge). +local checks = 128 * 128 +-- Starting point for biome checks. This also sets the y co-ordinate for all +-- points checked, so the suitable biomes must be active at this y. +local pos = {x = 0, y = 8, z = 0} + + +-- Table of suitable biomes + +local biome_ids = { + minetest.get_biome_id("taiga"), + minetest.get_biome_id("coniferous_forest"), + minetest.get_biome_id("deciduous_forest"), + minetest.get_biome_id("grassland"), + minetest.get_biome_id("savanna"), +} + +-- End of parameters +-------------------- + + +-- Direction table + +local dirs = { + {x = 0, y = 0, z = 1}, + {x = -1, y = 0, z = 0}, + {x = 0, y = 0, z = -1}, + {x = 1, y = 0, z = 0}, +} + + +-- Initial variables + +local edge_len = 1 +local edge_dist = 0 +local dir_step = 0 +local dir_ind = 1 +local searched = false +local success = false +local spawn_pos = {} + + +-- Get world 'mapgen_limit' and 'chunksize' to calculate 'spawn_limit'. +-- This accounts for how mapchunks are not generated if they or their shell exceed +-- 'mapgen_limit'. + +local mapgen_limit = tonumber(minetest.get_mapgen_setting("mapgen_limit")) +local chunksize = tonumber(minetest.get_mapgen_setting("chunksize")) +local spawn_limit = math.max(mapgen_limit - (chunksize + 1) * 16, 0) + + +--Functions +----------- + +-- Get next position on square search spiral + +local function next_pos() + if edge_dist == edge_len then + edge_dist = 0 + dir_ind = dir_ind + 1 + if dir_ind == 5 then + dir_ind = 1 + end + dir_step = dir_step + 1 + edge_len = math.floor(dir_step / 2) + 1 + end + + local dir = dirs[dir_ind] + local move = vector.multiply(dir, res) + + edge_dist = edge_dist + 1 + + return vector.add(pos, move) +end + + +-- Spawn position search + +local function search() + for iter = 1, checks do + local biome_data = minetest.get_biome_data(pos) + -- Sometimes biome_data is nil + local biome = biome_data and biome_data.biome + for id_ind = 1, #biome_ids do + local biome_id = biome_ids[id_ind] + if biome == biome_id then + local spawn_y = minetest.get_spawn_level(pos.x, pos.z) + if spawn_y then + spawn_pos = {x = pos.x, y = spawn_y, z = pos.z} + return true + end + end + end + + pos = next_pos() + -- Check for position being outside world edge + if math.abs(pos.x) > spawn_limit or math.abs(pos.z) > spawn_limit then + return false + end + end + + return false +end + + +-- On new player spawn and player respawn + +-- Search for spawn position once per server session. If successful, store +-- position and reposition players, otherwise leave them at engine spawn +-- position. + +local function on_spawn(player) + if not searched then + success = search() + searched = true + end + if success then + player:set_pos(spawn_pos) + end + return success +end + +minetest.register_on_newplayer(function(player) + on_spawn(player) +end) + +local enable_bed_respawn = minetest.settings:get_bool("enable_bed_respawn") +if enable_bed_respawn == nil then + enable_bed_respawn = true +end + +minetest.register_on_respawnplayer(function(player) + -- Avoid respawn conflict with beds mod + if beds and enable_bed_respawn and + beds.spawn[player:get_player_name()] then + return + end + + return on_spawn(player) +end) diff --git a/mods/spawn/license.txt b/mods/spawn/license.txt new file mode 100644 index 0000000..a466aab --- /dev/null +++ b/mods/spawn/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2018 paramat + +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. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/spawn/mod.conf b/mods/spawn/mod.conf new file mode 100644 index 0000000..ec3d564 --- /dev/null +++ b/mods/spawn/mod.conf @@ -0,0 +1,4 @@ +name = spawn +description = Minetest Game mod: spawn +depends = default +optional_depends = beds diff --git a/mods/stairs/README.txt b/mods/stairs/README.txt new file mode 100644 index 0000000..26317f7 --- /dev/null +++ b/mods/stairs/README.txt @@ -0,0 +1,27 @@ +Minetest Game mod: stairs +========================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Kahrl (LGPLv2.1+) and +celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures) +--------------------------- + +Textures +-------- +Copyright (c) 2018 Shara RedCat (CC BY-SA 3.0): + Derived from a texture by PilzAdam (CC BY-SA 3.0): + stairs_obsidian_glass_outer_stairside.png + stairs_obsidian_glass_stairside.png + +Copyright (c) 2018 TumeniNodes (CC BY-SA 3.0): + Derived from a texture by celeron55 (CC BY-SA 3.0) and + converted to bright white by Krock (CC BY-SA 3.0): + stairs_glass_stairside.png + stairs_glass_split.png + Derived from a texture by PilzAdam (CC BY-SA 3.0): + stairs_obsidian_glass_split.png diff --git a/mods/stairs/init.lua b/mods/stairs/init.lua new file mode 100644 index 0000000..317ee4c --- /dev/null +++ b/mods/stairs/init.lua @@ -0,0 +1,1113 @@ +-- stairs/init.lua + +-- Minetest 0.4 mod: stairs +-- See README.txt for licensing and other information. + + +-- Global namespace for functions + +stairs = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("stairs") + + +-- Register aliases for new pine node names + +minetest.register_alias("stairs:stair_pinewood", "stairs:stair_pine_wood") +minetest.register_alias("stairs:slab_pinewood", "stairs:slab_pine_wood") + + +-- Get setting for replace ABM + +local replace = minetest.settings:get_bool("enable_stairs_replace_abm") + +local function rotate_and_place(itemstack, placer, pointed_thing) + local p0 = pointed_thing.under + local p1 = pointed_thing.above + local param2 = 0 + + if placer then + local placer_pos = placer:get_pos() + if placer_pos then + param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos)) + end + + local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing) + local fpos = finepos.y % 1 + + if p0.y - 1 == p1.y or (fpos > 0 and fpos < 0.5) + or (fpos < -0.5 and fpos > -0.999999999) then + param2 = param2 + 20 + if param2 == 21 then + param2 = 23 + elseif param2 == 23 then + param2 = 21 + end + end + end + return minetest.item_place(itemstack, placer, pointed_thing, param2) +end + +local function warn_if_exists(nodename) + if minetest.registered_nodes[nodename] then + minetest.log("warning", "Overwriting stairs node: " .. nodename) + end +end + + +-- Register stair +-- Node will be called stairs:stair_ + +function stairs.register_stair(subname, recipeitem, groups, images, description, + sounds, worldaligntex) + -- Set backface culling and world-aligned textures + local stair_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + stair_images[i] = { + name = image, + backface_culling = true, + } + if worldaligntex then + stair_images[i].align_style = "world" + end + else + stair_images[i] = table.copy(image) + if stair_images[i].backface_culling == nil then + stair_images[i].backface_culling = true + end + if worldaligntex and stair_images[i].align_style == nil then + stair_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.stair = 1 + warn_if_exists("stairs:stair_" .. subname) + minetest.register_node(":stairs:stair_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = stair_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5}, + {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}, + }, + }, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + return rotate_and_place(itemstack, placer, pointed_thing) + end, + }) + + -- for replace ABM + if replace then + minetest.register_node(":stairs:stair_" .. subname .. "upside_down", { + replace_name = "stairs:stair_" .. subname, + groups = {slabs_replace = 1}, + }) + end + + if recipeitem then + -- Recipe matches appearence in inventory + minetest.register_craft({ + output = "stairs:stair_" .. subname .. " 8", + recipe = { + {"", "", recipeitem}, + {"", recipeitem, recipeitem}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Use stairs to craft full blocks again (1:1) + minetest.register_craft({ + output = recipeitem .. " 3", + recipe = { + {"stairs:stair_" .. subname, "stairs:stair_" .. subname}, + {"stairs:stair_" .. subname, "stairs:stair_" .. subname}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:stair_" .. subname, + burntime = math.floor(baseburntime * 0.75), + }) + end + end +end + + +-- Register slab +-- Node will be called stairs:slab_ + +function stairs.register_slab(subname, recipeitem, groups, images, description, + sounds, worldaligntex) + -- Set world-aligned textures + local slab_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + slab_images[i] = { + name = image, + } + if worldaligntex then + slab_images[i].align_style = "world" + end + else + slab_images[i] = table.copy(image) + if worldaligntex and image.align_style == nil then + slab_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.slab = 1 + warn_if_exists("stairs:slab_" .. subname) + minetest.register_node(":stairs:slab_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = slab_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + }, + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + local wield_item = itemstack:get_name() + local player_name = placer and placer:get_player_name() or "" + local creative_enabled = (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) + + if under and under.name:find("^stairs:slab_") then + -- place slab using under node orientation + local dir = minetest.dir_to_facedir(vector.subtract( + pointed_thing.above, pointed_thing.under), true) + + local p2 = under.param2 + + -- Placing a slab on an upside down slab should make it right-side up. + if p2 >= 20 and dir == 8 then + p2 = p2 - 20 + -- same for the opposite case: slab below normal slab + elseif p2 <= 3 and dir == 4 then + p2 = p2 + 20 + end + + -- else attempt to place node with proper param2 + minetest.item_place_node(ItemStack(wield_item), placer, pointed_thing, p2) + if not creative_enabled then + itemstack:take_item() + end + return itemstack + else + return rotate_and_place(itemstack, placer, pointed_thing) + end + end, + }) + + -- for replace ABM + if replace then + minetest.register_node(":stairs:slab_" .. subname .. "upside_down", { + replace_name = "stairs:slab_".. subname, + groups = {slabs_replace = 1}, + }) + end + + if recipeitem then + minetest.register_craft({ + output = "stairs:slab_" .. subname .. " 6", + recipe = { + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Use 2 slabs to craft a full block again (1:1) + minetest.register_craft({ + output = recipeitem, + recipe = { + {"stairs:slab_" .. subname}, + {"stairs:slab_" .. subname}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:slab_" .. subname, + burntime = math.floor(baseburntime * 0.5), + }) + end + end +end + + +-- Optionally replace old "upside_down" nodes with new param2 versions. +-- Disabled by default. + +if replace then + minetest.register_abm({ + label = "Slab replace", + nodenames = {"group:slabs_replace"}, + interval = 16, + chance = 1, + action = function(pos, node) + node.name = minetest.registered_nodes[node.name].replace_name + node.param2 = node.param2 + 20 + if node.param2 == 21 then + node.param2 = 23 + elseif node.param2 == 23 then + node.param2 = 21 + end + minetest.set_node(pos, node) + end, + }) +end + + +-- Register inner stair +-- Node will be called stairs:stair_inner_ + +function stairs.register_stair_inner(subname, recipeitem, groups, images, + description, sounds, worldaligntex, full_description) + -- Set backface culling and world-aligned textures + local stair_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + stair_images[i] = { + name = image, + backface_culling = true, + } + if worldaligntex then + stair_images[i].align_style = "world" + end + else + stair_images[i] = table.copy(image) + if stair_images[i].backface_culling == nil then + stair_images[i].backface_culling = true + end + if worldaligntex and stair_images[i].align_style == nil then + stair_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.stair = 1 + if full_description then + description = full_description + else + description = "Inner " .. description + end + warn_if_exists("stairs:stair_inner_" .. subname) + minetest.register_node(":stairs:stair_inner_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = stair_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5}, + {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}, + {-0.5, 0.0, -0.5, 0.0, 0.5, 0.0}, + }, + }, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + return rotate_and_place(itemstack, placer, pointed_thing) + end, + }) + + if recipeitem then + minetest.register_craft({ + output = "stairs:stair_inner_" .. subname .. " 7", + recipe = { + {"", recipeitem, ""}, + {recipeitem, "", recipeitem}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:stair_inner_" .. subname, + burntime = math.floor(baseburntime * 0.875), + }) + end + end +end + + +-- Register outer stair +-- Node will be called stairs:stair_outer_ + +function stairs.register_stair_outer(subname, recipeitem, groups, images, + description, sounds, worldaligntex, full_description) + -- Set backface culling and world-aligned textures + local stair_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + stair_images[i] = { + name = image, + backface_culling = true, + } + if worldaligntex then + stair_images[i].align_style = "world" + end + else + stair_images[i] = table.copy(image) + if stair_images[i].backface_culling == nil then + stair_images[i].backface_culling = true + end + if worldaligntex and stair_images[i].align_style == nil then + stair_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.stair = 1 + if full_description then + description = full_description + else + description = "Outer " .. description + end + warn_if_exists("stairs:stair_outer_" .. subname) + minetest.register_node(":stairs:stair_outer_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = stair_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5}, + {-0.5, 0.0, 0.0, 0.0, 0.5, 0.5}, + }, + }, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + return rotate_and_place(itemstack, placer, pointed_thing) + end, + }) + + if recipeitem then + minetest.register_craft({ + output = "stairs:stair_outer_" .. subname .. " 6", + recipe = { + {"", recipeitem, ""}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:stair_outer_" .. subname, + burntime = math.floor(baseburntime * 0.625), + }) + end + end +end + + +-- Stair/slab registration function. +-- Nodes will be called stairs:{stair,slab}_ + +function stairs.register_stair_and_slab(subname, recipeitem, groups, images, + desc_stair, desc_slab, sounds, worldaligntex, + desc_stair_inner, desc_stair_outer) + stairs.register_stair(subname, recipeitem, groups, images, desc_stair, + sounds, worldaligntex) + stairs.register_stair_inner(subname, recipeitem, groups, images, + desc_stair, sounds, worldaligntex, desc_stair_inner) + stairs.register_stair_outer(subname, recipeitem, groups, images, + desc_stair, sounds, worldaligntex, desc_stair_outer) + stairs.register_slab(subname, recipeitem, groups, images, desc_slab, + sounds, worldaligntex) +end + +-- Local function so we can apply translations +local function my_register_stair_and_slab(subname, recipeitem, groups, images, + desc_stair, desc_slab, sounds, worldaligntex) + stairs.register_stair(subname, recipeitem, groups, images, S(desc_stair), + sounds, worldaligntex) + stairs.register_stair_inner(subname, recipeitem, groups, images, "", + sounds, worldaligntex, S("Inner " .. desc_stair)) + stairs.register_stair_outer(subname, recipeitem, groups, images, "", + sounds, worldaligntex, S("Outer " .. desc_stair)) + stairs.register_slab(subname, recipeitem, groups, images, S(desc_slab), + sounds, worldaligntex) +end + + +-- Register default stairs and slabs + +my_register_stair_and_slab( + "wood", + "default:wood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_wood.png"}, + "Wooden Stair", + "Wooden Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "junglewood", + "default:junglewood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_junglewood.png"}, + "Jungle Wood Stair", + "Jungle Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "pine_wood", + "default:pine_wood", + {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_pine_wood.png"}, + "Pine Wood Stair", + "Pine Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "acacia_wood", + "default:acacia_wood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_acacia_wood.png"}, + "Acacia Wood Stair", + "Acacia Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "aspen_wood", + "default:aspen_wood", + {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_aspen_wood.png"}, + "Aspen Wood Stair", + "Aspen Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "stone", + "default:stone", + {cracky = 3}, + {"default_stone.png"}, + "Stone Stair", + "Stone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "cobble", + "default:cobble", + {cracky = 3}, + {"default_cobble.png"}, + "Cobblestone Stair", + "Cobblestone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "mossycobble", + "default:mossycobble", + {cracky = 3}, + {"default_mossycobble.png"}, + "Mossy Cobblestone Stair", + "Mossy Cobblestone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "stonebrick", + "default:stonebrick", + {cracky = 2}, + {"default_stone_brick.png"}, + "Stone Brick Stair", + "Stone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "stone_block", + "default:stone_block", + {cracky = 2}, + {"default_stone_block.png"}, + "Stone Block Stair", + "Stone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_stone", + "default:desert_stone", + {cracky = 3}, + {"default_desert_stone.png"}, + "Desert Stone Stair", + "Desert Stone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_cobble", + "default:desert_cobble", + {cracky = 3}, + {"default_desert_cobble.png"}, + "Desert Cobblestone Stair", + "Desert Cobblestone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_stonebrick", + "default:desert_stonebrick", + {cracky = 2}, + {"default_desert_stone_brick.png"}, + "Desert Stone Brick Stair", + "Desert Stone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "desert_stone_block", + "default:desert_stone_block", + {cracky = 2}, + {"default_desert_stone_block.png"}, + "Desert Stone Block Stair", + "Desert Stone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "sandstone", + "default:sandstone", + {crumbly = 1, cracky = 3}, + {"default_sandstone.png"}, + "Sandstone Stair", + "Sandstone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "sandstonebrick", + "default:sandstonebrick", + {cracky = 2}, + {"default_sandstone_brick.png"}, + "Sandstone Brick Stair", + "Sandstone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "sandstone_block", + "default:sandstone_block", + {cracky = 2}, + {"default_sandstone_block.png"}, + "Sandstone Block Stair", + "Sandstone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_sandstone", + "default:desert_sandstone", + {crumbly = 1, cracky = 3}, + {"default_desert_sandstone.png"}, + "Desert Sandstone Stair", + "Desert Sandstone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_sandstone_brick", + "default:desert_sandstone_brick", + {cracky = 2}, + {"default_desert_sandstone_brick.png"}, + "Desert Sandstone Brick Stair", + "Desert Sandstone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "desert_sandstone_block", + "default:desert_sandstone_block", + {cracky = 2}, + {"default_desert_sandstone_block.png"}, + "Desert Sandstone Block Stair", + "Desert Sandstone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "silver_sandstone", + "default:silver_sandstone", + {crumbly = 1, cracky = 3}, + {"default_silver_sandstone.png"}, + "Silver Sandstone Stair", + "Silver Sandstone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "silver_sandstone_brick", + "default:silver_sandstone_brick", + {cracky = 2}, + {"default_silver_sandstone_brick.png"}, + "Silver Sandstone Brick Stair", + "Silver Sandstone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "silver_sandstone_block", + "default:silver_sandstone_block", + {cracky = 2}, + {"default_silver_sandstone_block.png"}, + "Silver Sandstone Block Stair", + "Silver Sandstone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "obsidian", + "default:obsidian", + {cracky = 1, level = 2}, + {"default_obsidian.png"}, + "Obsidian Stair", + "Obsidian Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "obsidianbrick", + "default:obsidianbrick", + {cracky = 1, level = 2}, + {"default_obsidian_brick.png"}, + "Obsidian Brick Stair", + "Obsidian Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "obsidian_block", + "default:obsidian_block", + {cracky = 1, level = 2}, + {"default_obsidian_block.png"}, + "Obsidian Block Stair", + "Obsidian Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "brick", + "default:brick", + {cracky = 3}, + {"default_brick.png"}, + "Brick Stair", + "Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "steelblock", + "default:steelblock", + {cracky = 1, level = 2}, + {"default_steel_block.png"}, + "Steel Block Stair", + "Steel Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "tinblock", + "default:tinblock", + {cracky = 1, level = 2}, + {"default_tin_block.png"}, + "Tin Block Stair", + "Tin Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "copperblock", + "default:copperblock", + {cracky = 1, level = 2}, + {"default_copper_block.png"}, + "Copper Block Stair", + "Copper Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "bronzeblock", + "default:bronzeblock", + {cracky = 1, level = 2}, + {"default_bronze_block.png"}, + "Bronze Block Stair", + "Bronze Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "goldblock", + "default:goldblock", + {cracky = 1}, + {"default_gold_block.png"}, + "Gold Block Stair", + "Gold Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "ice", + "default:ice", + {cracky = 3, cools_lava = 1, slippery = 3}, + {"default_ice.png"}, + "Ice Stair", + "Ice Slab", + default.node_sound_ice_defaults(), + true +) + +my_register_stair_and_slab( + "snowblock", + "default:snowblock", + {crumbly = 3, cools_lava = 1, snowy = 1}, + {"default_snow.png"}, + "Snow Block Stair", + "Snow Block Slab", + default.node_sound_snow_defaults(), + true +) + +-- Glass stair nodes need to be registered individually to utilize specialized textures. + +stairs.register_stair( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"stairs_glass_split.png", "default_glass.png", + "stairs_glass_stairside.png^[transformFX", "stairs_glass_stairside.png", + "default_glass.png", "stairs_glass_split.png"}, + S("Glass Stair"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_slab( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"default_glass.png", "default_glass.png", "stairs_glass_split.png"}, + S("Glass Slab"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_stair_inner( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"stairs_glass_stairside.png^[transformR270", "default_glass.png", + "stairs_glass_stairside.png^[transformFX", "default_glass.png", + "default_glass.png", "stairs_glass_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Inner Glass Stair") +) + +stairs.register_stair_outer( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"stairs_glass_stairside.png^[transformR90", "default_glass.png", + "stairs_glass_outer_stairside.png", "stairs_glass_stairside.png", + "stairs_glass_stairside.png^[transformR90","stairs_glass_outer_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Outer Glass Stair") +) + +stairs.register_stair( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"stairs_obsidian_glass_split.png", "default_obsidian_glass.png", + "stairs_obsidian_glass_stairside.png^[transformFX", "stairs_obsidian_glass_stairside.png", + "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"}, + S("Obsidian Glass Stair"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_slab( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"default_obsidian_glass.png", "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"}, + S("Obsidian Glass Slab"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_stair_inner( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"stairs_obsidian_glass_stairside.png^[transformR270", "default_obsidian_glass.png", + "stairs_obsidian_glass_stairside.png^[transformFX", "default_obsidian_glass.png", + "default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Inner Obsidian Glass Stair") +) + +stairs.register_stair_outer( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"stairs_obsidian_glass_stairside.png^[transformR90", "default_obsidian_glass.png", + "stairs_obsidian_glass_outer_stairside.png", "stairs_obsidian_glass_stairside.png", + "stairs_obsidian_glass_stairside.png^[transformR90","stairs_obsidian_glass_outer_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Outer Obsidian Glass Stair") +) + +-- Dummy calls to S() to allow translation scripts to detect the strings. +-- To update this add this code to my_register_stair_and_slab: +-- for _,x in ipairs({"","Inner ","Outer "}) do print(("S(%q)"):format(x..desc_stair)) end +-- print(("S(%q)"):format(desc_slab)) + +--[[ +S("Wooden Stair") +S("Inner Wooden Stair") +S("Outer Wooden Stair") +S("Wooden Slab") +S("Jungle Wood Stair") +S("Inner Jungle Wood Stair") +S("Outer Jungle Wood Stair") +S("Jungle Wood Slab") +S("Pine Wood Stair") +S("Inner Pine Wood Stair") +S("Outer Pine Wood Stair") +S("Pine Wood Slab") +S("Acacia Wood Stair") +S("Inner Acacia Wood Stair") +S("Outer Acacia Wood Stair") +S("Acacia Wood Slab") +S("Aspen Wood Stair") +S("Inner Aspen Wood Stair") +S("Outer Aspen Wood Stair") +S("Aspen Wood Slab") +S("Stone Stair") +S("Inner Stone Stair") +S("Outer Stone Stair") +S("Stone Slab") +S("Cobblestone Stair") +S("Inner Cobblestone Stair") +S("Outer Cobblestone Stair") +S("Cobblestone Slab") +S("Mossy Cobblestone Stair") +S("Inner Mossy Cobblestone Stair") +S("Outer Mossy Cobblestone Stair") +S("Mossy Cobblestone Slab") +S("Stone Brick Stair") +S("Inner Stone Brick Stair") +S("Outer Stone Brick Stair") +S("Stone Brick Slab") +S("Stone Block Stair") +S("Inner Stone Block Stair") +S("Outer Stone Block Stair") +S("Stone Block Slab") +S("Desert Stone Stair") +S("Inner Desert Stone Stair") +S("Outer Desert Stone Stair") +S("Desert Stone Slab") +S("Desert Cobblestone Stair") +S("Inner Desert Cobblestone Stair") +S("Outer Desert Cobblestone Stair") +S("Desert Cobblestone Slab") +S("Desert Stone Brick Stair") +S("Inner Desert Stone Brick Stair") +S("Outer Desert Stone Brick Stair") +S("Desert Stone Brick Slab") +S("Desert Stone Block Stair") +S("Inner Desert Stone Block Stair") +S("Outer Desert Stone Block Stair") +S("Desert Stone Block Slab") +S("Sandstone Stair") +S("Inner Sandstone Stair") +S("Outer Sandstone Stair") +S("Sandstone Slab") +S("Sandstone Brick Stair") +S("Inner Sandstone Brick Stair") +S("Outer Sandstone Brick Stair") +S("Sandstone Brick Slab") +S("Sandstone Block Stair") +S("Inner Sandstone Block Stair") +S("Outer Sandstone Block Stair") +S("Sandstone Block Slab") +S("Desert Sandstone Stair") +S("Inner Desert Sandstone Stair") +S("Outer Desert Sandstone Stair") +S("Desert Sandstone Slab") +S("Desert Sandstone Brick Stair") +S("Inner Desert Sandstone Brick Stair") +S("Outer Desert Sandstone Brick Stair") +S("Desert Sandstone Brick Slab") +S("Desert Sandstone Block Stair") +S("Inner Desert Sandstone Block Stair") +S("Outer Desert Sandstone Block Stair") +S("Desert Sandstone Block Slab") +S("Silver Sandstone Stair") +S("Inner Silver Sandstone Stair") +S("Outer Silver Sandstone Stair") +S("Silver Sandstone Slab") +S("Silver Sandstone Brick Stair") +S("Inner Silver Sandstone Brick Stair") +S("Outer Silver Sandstone Brick Stair") +S("Silver Sandstone Brick Slab") +S("Silver Sandstone Block Stair") +S("Inner Silver Sandstone Block Stair") +S("Outer Silver Sandstone Block Stair") +S("Silver Sandstone Block Slab") +S("Obsidian Stair") +S("Inner Obsidian Stair") +S("Outer Obsidian Stair") +S("Obsidian Slab") +S("Obsidian Brick Stair") +S("Inner Obsidian Brick Stair") +S("Outer Obsidian Brick Stair") +S("Obsidian Brick Slab") +S("Obsidian Block Stair") +S("Inner Obsidian Block Stair") +S("Outer Obsidian Block Stair") +S("Obsidian Block Slab") +S("Brick Stair") +S("Inner Brick Stair") +S("Outer Brick Stair") +S("Brick Slab") +S("Steel Block Stair") +S("Inner Steel Block Stair") +S("Outer Steel Block Stair") +S("Steel Block Slab") +S("Tin Block Stair") +S("Inner Tin Block Stair") +S("Outer Tin Block Stair") +S("Tin Block Slab") +S("Copper Block Stair") +S("Inner Copper Block Stair") +S("Outer Copper Block Stair") +S("Copper Block Slab") +S("Bronze Block Stair") +S("Inner Bronze Block Stair") +S("Outer Bronze Block Stair") +S("Bronze Block Slab") +S("Gold Block Stair") +S("Inner Gold Block Stair") +S("Outer Gold Block Stair") +S("Gold Block Slab") +S("Ice Stair") +S("Inner Ice Stair") +S("Outer Ice Stair") +S("Ice Slab") +S("Snow Block Stair") +S("Inner Snow Block Stair") +S("Outer Snow Block Stair") +S("Snow Block Slab") +--]] diff --git a/mods/stairs/license.txt b/mods/stairs/license.txt new file mode 100644 index 0000000..57bd98c --- /dev/null +++ b/mods/stairs/license.txt @@ -0,0 +1,16 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011-2017 Kahrl +Copyright (C) 2011-2017 celeron55, Perttu Ahola +Copyright (C) 2012-2017 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html diff --git a/mods/stairs/locale/stairs.de.tr b/mods/stairs/locale/stairs.de.tr new file mode 100644 index 0000000..41c055b --- /dev/null +++ b/mods/stairs/locale/stairs.de.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Glastreppe +Glass Slab=Glasplatte +Inner Glass Stair=Innere Glastreppe +Outer Glass Stair=Äußere Glastreppe +Obsidian Glass Stair=Obsidianglastreppe +Obsidian Glass Slab=Obsidianglasplatte +Inner Obsidian Glass Stair=Innere Obsidianglastreppe +Outer Obsidian Glass Stair=Äußere Obsidianglastreppe +Wooden Stair=Holztreppe +Inner Wooden Stair=Innere Holztreppe +Outer Wooden Stair=Äußere Holztreppe +Wooden Slab=Holzplatte +Jungle Wood Stair=Dschungelholztreppe +Inner Jungle Wood Stair=Innere Dschungelholztreppe +Outer Jungle Wood Stair=Äußere Dschungelholztreppe +Jungle Wood Slab=Dschungelholzplatte +Pine Wood Stair=Kiefernholztreppe +Inner Pine Wood Stair=Innere Kiefernholztreppe +Outer Pine Wood Stair=Äußere Kiefernholztreppe +Pine Wood Slab=Kiefernholzplatte +Acacia Wood Stair=Akazienholztreppe +Inner Acacia Wood Stair=Innere Akazienholztreppe +Outer Acacia Wood Stair=Äußere Akazienholztreppe +Acacia Wood Slab=Akazienholzplatte +Aspen Wood Stair=Espenholztreppe +Inner Aspen Wood Stair=Innere Espenholztreppe +Outer Aspen Wood Stair=Äußere Espenholztreppe +Aspen Wood Slab=Espenholzplatte +Stone Stair=Steintreppe +Inner Stone Stair=Innere Steintreppe +Outer Stone Stair=Äußere Steintreppe +Stone Slab=Steinplatte +Cobblestone Stair=Kopfsteinpflastertreppe +Inner Cobblestone Stair=Innere Kopfsteinpflastertreppe +Outer Cobblestone Stair=Äußere Kopfsteinpflastertreppe +Cobblestone Slab=Kopfsteinpflasterplatte +Mossy Cobblestone Stair=Mosige Kopfsteinpflastertreppe +Inner Mossy Cobblestone Stair=Innere mosige Kopfsteinpflastertreppe +Outer Mossy Cobblestone Stair=Äußere mosige Kopfsteinpflastertreppe +Mossy Cobblestone Slab=Mosige Kopfsteinpflasterplatte +Stone Brick Stair=Steinziegeltreppe +Inner Stone Brick Stair=Innere Steinziegeltreppe +Outer Stone Brick Stair=Äußere Steinziegeltreppe +Stone Brick Slab=Steinziegelplatte +Stone Block Stair=Steinblocktreppe +Inner Stone Block Stair=Innere Steinblocktreppe +Outer Stone Block Stair=Äußere Steinblocktreppe +Stone Block Slab=Steinblockplatte +Desert Stone Stair=Wüstensteintreppe +Inner Desert Stone Stair=Innere Wüstensteintreppe +Outer Desert Stone Stair=Äußere Wüstensteintreppe +Desert Stone Slab=Wüstensteinplatte +Desert Cobblestone Stair=Wüstenkopfsteinpflastertreppe +Inner Desert Cobblestone Stair=Innere Wüstenkopfsteinpflastertreppe +Outer Desert Cobblestone Stair=Äußere Wüstenkopfsteinpflastertreppe +Desert Cobblestone Slab=Wüstenkopfsteinpflasterplatte +Desert Stone Brick Stair=Wüstensteinziegeltreppe +Inner Desert Stone Brick Stair=Innere Wüstensteinziegeltreppe +Outer Desert Stone Brick Stair=Äußere Wüstensteinziegeltreppe +Desert Stone Brick Slab=Wüstensteinziegelplatte +Desert Stone Block Stair=Wüstensteinblocktreppe +Inner Desert Stone Block Stair=Innere Wüstensteinblocktreppe +Outer Desert Stone Block Stair=Äußere Wüstensteinblocktreppe +Desert Stone Block Slab=Wüstensteinblockplatte +Sandstone Stair=Sandsteintreppe +Inner Sandstone Stair=Innere Sandsteintreppe +Outer Sandstone Stair=Äußere Sandsteintreppe +Sandstone Slab=Sandsteinplatte +Sandstone Brick Stair=Sandsteinziegeltreppe +Inner Sandstone Brick Stair=Innere Sandsteinziegeltreppe +Outer Sandstone Brick Stair=Äußere Sandsteinziegeltreppe +Sandstone Brick Slab=Sandsteinziegelplatte +Sandstone Block Stair=Sandsteinblocktreppe +Inner Sandstone Block Stair=Innere Sandsteinblocktreppe +Outer Sandstone Block Stair=Äußere Sandsteinblocktreppe +Sandstone Block Slab=Sandsteinblockplatte +Desert Sandstone Stair=Wüstensandsteintreppe +Inner Desert Sandstone Stair=Innere Wüstensandsteintreppe +Outer Desert Sandstone Stair=Äußere Wüstensandsteintreppe +Desert Sandstone Slab=Wüstensandsteinplatte +Desert Sandstone Brick Stair=Wüstensandsteinziegeltreppe +Inner Desert Sandstone Brick Stair=Innere Wüstensandsteinziegeltreppe +Outer Desert Sandstone Brick Stair=Äußere Wüstensandsteinziegeltreppe +Desert Sandstone Brick Slab=Wüstensandsteinziegelplatte +Desert Sandstone Block Stair=Wüstensandsteinblocktreppe +Inner Desert Sandstone Block Stair=Innere Wüstensandsteinblocktreppe +Outer Desert Sandstone Block Stair=Äußere Wüstensandsteinblocktreppe +Desert Sandstone Block Slab=Wüstensandsteinblockplatte +Silver Sandstone Stair=Silbersandsteintreppe +Inner Silver Sandstone Stair=Innere Silbersandsteintreppe +Outer Silver Sandstone Stair=Äußere Silbersandsteintreppe +Silver Sandstone Slab=Silbersandsteinplatte +Silver Sandstone Brick Stair=Silbersandsteinziegeltreppe +Inner Silver Sandstone Brick Stair=Innere Silbersandsteinziegeltreppe +Outer Silver Sandstone Brick Stair=Äußere Silbersandsteinziegeltreppe +Silver Sandstone Brick Slab=Silbersandsteinziegelplatte +Silver Sandstone Block Stair=Silbersandsteinblocktreppe +Inner Silver Sandstone Block Stair=Innere Silbersandsteinblocktreppe +Outer Silver Sandstone Block Stair=Äußere Silbersandsteinblocktreppe +Silver Sandstone Block Slab=Silbersandsteinblockplatte +Obsidian Stair=Obsidiantreppe +Inner Obsidian Stair=Innere Obsidiantreppe +Outer Obsidian Stair=Äußere Obsidiantreppe +Obsidian Slab=Obsidianplatte +Obsidian Brick Stair=Obsidianziegeltreppe +Inner Obsidian Brick Stair=Innere Obsidianziegeltreppe +Outer Obsidian Brick Stair=Äußere Obsidianziegeltreppe +Obsidian Brick Slab=Obsidianziegelplatte +Obsidian Block Stair=Obsidianblocktreppe +Inner Obsidian Block Stair=Innere Obsidianblocktreppe +Outer Obsidian Block Stair=Äußere Obsidianblocktreppe +Obsidian Block Slab=Obsidianblockplatte +Brick Stair=Ziegeltreppe +Inner Brick Stair=Innere Ziegeltreppe +Outer Brick Stair=Äußere Ziegeltreppe +Brick Slab=Ziegelplatte +Steel Block Stair=Stahlblocktreppe +Inner Steel Block Stair=Innere Stahlblocktreppe +Outer Steel Block Stair=Äußere Stahlblocktreppe +Steel Block Slab=Stahlblockplatte +Tin Block Stair=Zinnblocktreppe +Inner Tin Block Stair=Innere Zinnblocktreppe +Outer Tin Block Stair=Äußere Zinnblocktreppe +Tin Block Slab=Zinnblockplatte +Copper Block Stair=Kupferblocktreppe +Inner Copper Block Stair=Innere Kupferblocktreppe +Outer Copper Block Stair=Äußere Kupferblocktreppe +Copper Block Slab=Kupferblockplatte +Bronze Block Stair=Bronzeblocktreppe +Inner Bronze Block Stair=Innere Bronzeblocktreppe +Outer Bronze Block Stair=Äußere Bronzeblocktreppe +Bronze Block Slab=Bronzeblockplatte +Gold Block Stair=Goldblocktreppe +Inner Gold Block Stair=Innere Goldblocktreppe +Outer Gold Block Stair=Äußere Goldblocktreppe +Gold Block Slab=Goldblockplatte +Ice Stair=Eistreppe +Inner Ice Stair=Innere Eistreppe +Outer Ice Stair=Äußere Eistreppe +Ice Slab=Eisplatte +Snow Block Stair=Schneeblocktreppe +Inner Snow Block Stair=Innere Schneeblocktreppe +Outer Snow Block Stair=Äußere Schneeblocktreppe +Snow Block Slab=Schneeblockplatte diff --git a/mods/stairs/locale/stairs.es.tr b/mods/stairs/locale/stairs.es.tr new file mode 100644 index 0000000..374540c --- /dev/null +++ b/mods/stairs/locale/stairs.es.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Escalera de vidrio +Glass Slab=Losa de vidrio +Inner Glass Stair=Escalera interior de vidrio +Outer Glass Stair=Escalera exterior de vidrio +Obsidian Glass Stair=Escalera de vidrio de obsidiana +Obsidian Glass Slab=Losa de vidrio de obsidiana +Inner Obsidian Glass Stair=Escalera interior de vidrio de obsidiana +Outer Obsidian Glass Stair=Escalera exterior de vidrio de obsidiana +Wooden Stair=Escalera de madera +Inner Wooden Stair=Escalera interior de madera +Outer Wooden Stair=Escalera exterior de madera +Wooden Slab=Losa de madera +Jungle Wood Stair=Escalera de madera tropical +Inner Jungle Wood Stair=Escalera interior de madera tropical +Outer Jungle Wood Stair=Escalera exterior de madera tropical +Jungle Wood Slab=Losa de madera tropical +Pine Wood Stair=Escalera de pino +Inner Pine Wood Stair=Escalera interior de pino +Outer Pine Wood Stair=Escalera exterior de pino +Pine Wood Slab=Losa de pino +Acacia Wood Stair=Escalera de acacia +Inner Acacia Wood Stair=Escalera interior de acacia +Outer Acacia Wood Stair=Escalera exterior de acacia +Acacia Wood Slab=Losa de acacia +Aspen Wood Stair=Escalera de álamo +Inner Aspen Wood Stair=Escalera interior de álamo +Outer Aspen Wood Stair=Escalera exterior de álamo +Aspen Wood Slab=Losa de álamo +Stone Stair=Escalera de piedra +Inner Stone Stair=Escalera interior de piedra +Outer Stone Stair=Escalera exterior de piedra +Stone Slab=Losa de piedra +Cobblestone Stair=Escalera de adoquines +Inner Cobblestone Stair=Escalera interior de adoquines +Outer Cobblestone Stair=Escalera exterior de adoquines +Cobblestone Slab=Losa de adoquines +Mossy Cobblestone Stair=Escalera de adoquines musgosos +Inner Mossy Cobblestone Stair=Escalera interior de adoquines musgosos +Outer Mossy Cobblestone Stair=Escalera exterior de adoquines musgosos +Mossy Cobblestone Slab=Losa de adoquines musgosos +Stone Brick Stair=Escalera de ladrillos de piedra +Inner Stone Brick Stair=Escalera interior de ladrillos de piedra +Outer Stone Brick Stair=Escalera exterior de ladrillos de piedra +Stone Brick Slab=Losa de ladrillos de piedra +Stone Block Stair=Escalera de bloques de piedra +Inner Stone Block Stair=Escalera interior de bloques de piedra +Outer Stone Block Stair=Escalera exterior de bloques de piedra +Stone Block Slab=Losa de bloques de piedra +Desert Stone Stair=Escalera de piedra desértica +Inner Desert Stone Stair=Escalera interior de piedra desértica +Outer Desert Stone Stair=Escalera exterior de piedra desértica +Desert Stone Slab=Losa de piedra desértica +Desert Cobblestone Stair=Escalera de adoquines desérticos +Inner Desert Cobblestone Stair=Escalera interior de adoquines desérticos +Outer Desert Cobblestone Stair=Escalera exterior de adoquines desérticos +Desert Cobblestone Slab=Losa de adoquines desérticos +Desert Stone Brick Stair=Escalera de ladrillos desérticos +Inner Desert Stone Brick Stair=Escalera interior de ladrillos desérticos +Outer Desert Stone Brick Stair=Escalera exterior de ladrillos desérticos +Desert Stone Brick Slab=Losa de ladrillos desérticos +Desert Stone Block Stair=Escalera de bloques de piedra desértica +Inner Desert Stone Block Stair=Escalera interior de bloques de piedra desértica +Outer Desert Stone Block Stair=Escalera exterior de bloques de piedra desértica +Desert Stone Block Slab=Losa de bloques de piedra desértica +Sandstone Stair=Escalera de arenisca +Inner Sandstone Stair=Escalera interior de arenisca +Outer Sandstone Stair=Escalera exterior de arenisca +Sandstone Slab=Losa de arenisca +Sandstone Brick Stair=Escalera de ladrillos de arenisca +Inner Sandstone Brick Stair=Escalera interior de ladrillos de arenisca +Outer Sandstone Brick Stair=Escalera exterior de ladrillos de arenisca +Sandstone Brick Slab=Losa de ladrillos de arenisca +Sandstone Block Stair=Escalera de bloques de arenisca +Inner Sandstone Block Stair=Escalera interior de bloques de arenisca +Outer Sandstone Block Stair=Escalera exterior de bloques de arenisca +Sandstone Block Slab=Losa de bloques de arenisca +Desert Sandstone Stair=Escalera de arenisca desértica +Inner Desert Sandstone Stair=Escalera interior de arenisca desértica +Outer Desert Sandstone Stair=Escalera exterior de arenisca desértica +Desert Sandstone Slab=Losa de arenisca desértica +Desert Sandstone Brick Stair=Escalera de ladrillos de arenisca desértica +Inner Desert Sandstone Brick Stair=Escalera interior de ladrillos de arenisca desértica +Outer Desert Sandstone Brick Stair=Escalera exterior de ladrillos de arenisca desértica +Desert Sandstone Brick Slab=Losa de ladrillos de arenisca desértica +Desert Sandstone Block Stair=Escalera de bloques de arenisca desértica +Inner Desert Sandstone Block Stair=Escalera interior de bloques de arenisca desértica +Outer Desert Sandstone Block Stair=Escalera exterior de bloques de arenisca desértica +Desert Sandstone Block Slab=Losa de bloques de arenisca desértica +Silver Sandstone Stair=Escalera de arenisca plateada +Inner Silver Sandstone Stair=Escalera interior de arenisca plateada +Outer Silver Sandstone Stair=Escalera exterior de arenisca plateada +Silver Sandstone Slab=Losa de arenisca plateada +Silver Sandstone Brick Stair=Escalera de ladrillos de arenisca plateada +Inner Silver Sandstone Brick Stair=Escalera interior de ladrillos de arenisca plateada +Outer Silver Sandstone Brick Stair=Escalera exterior de ladrillos de arenisca plateada +Silver Sandstone Brick Slab=Losa de ladrillos de arenisca plateada +Silver Sandstone Block Stair=Escalera de bloques de arenisca plateada +Inner Silver Sandstone Block Stair=Escalera interior de bloques de arenisca plateada +Outer Silver Sandstone Block Stair=Escalera exterior de bloques de arenisca plateada +Silver Sandstone Block Slab=Losa de bloques de arenisca plateada +Obsidian Stair=Escalera de obsidiana +Inner Obsidian Stair=Escalera interior de obsidiana +Outer Obsidian Stair=Escalera exterior de obsidiana +Obsidian Slab=Losa de obsidiana +Obsidian Brick Stair=Escalera de ladrillos de obsidiana +Inner Obsidian Brick Stair=Escalera interior de ladrillos de obsidiana +Outer Obsidian Brick Stair=Escalera exterior de ladrillos de obsidiana +Obsidian Brick Slab=Losa de ladrillos de obsidiana +Obsidian Block Stair=Escalera de bloques de obsidiana +Inner Obsidian Block Stair=Escalera interior de bloques de obsidiana +Outer Obsidian Block Stair=Escalera exterior de bloques de obsidiana +Obsidian Block Slab=Losa de bloques de obsidiana +Brick Stair=Escalera de ladrillos +Inner Brick Stair=Escalera interior de ladrillos +Outer Brick Stair=Escalera exterior de ladrillos +Brick Slab=Losa de ladrillos +Steel Block Stair=Escalera de acero +Inner Steel Block Stair=Escalera interior de acero +Outer Steel Block Stair=Escalera exterior de acero +Steel Block Slab=Losa de acero +Tin Block Stair=Escalera de estaño +Inner Tin Block Stair=Escalera interior de estaño +Outer Tin Block Stair=Escalera exterior de estaño +Tin Block Slab=Losa de estaño +Copper Block Stair=Escalera de cobre +Inner Copper Block Stair=Escalera interior de cobre +Outer Copper Block Stair=Escalera exterior de cobre +Copper Block Slab=Losa de cobre +Bronze Block Stair=Escalera de bronce +Inner Bronze Block Stair=Escalera interior de bronce +Outer Bronze Block Stair=Escalera exterior de bronce +Bronze Block Slab=Losa de bronce +Gold Block Stair=Escalera de oro +Inner Gold Block Stair=Escalera interior de oro +Outer Gold Block Stair=Escalera exterior de oro +Gold Block Slab=Losa de oro +Ice Stair=Escalera de hielo +Inner Ice Stair=Escalera interior de hielo +Outer Ice Stair=Escalera exterior de hielo +Ice Slab=Losa de hielo +Snow Block Stair=Escalera de nieve +Inner Snow Block Stair=Escalera interior de nieve +Outer Snow Block Stair=Escalera exterior de nieve +Snow Block Slab=Losa de nieve diff --git a/mods/stairs/locale/stairs.fr.tr b/mods/stairs/locale/stairs.fr.tr new file mode 100644 index 0000000..81b575e --- /dev/null +++ b/mods/stairs/locale/stairs.fr.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Escalier de verre +Glass Slab=Dalle de verre +Inner Glass Stair=Escalier intérieur de verre +Outer Glass Stair=Escalier extérieur de verre +Obsidian Glass Stair=Escalier de verre d'obsidienne +Obsidian Glass Slab=Dalle de verre d'obsidienne +Inner Obsidian Glass Stair=Escalier intérieur de verre d'obsidienne +Outer Obsidian Glass Stair=Escalier extérieur de verre d'obsidienne +Wooden Stair=Escalier en bois +Inner Wooden Stair=Escalier intérieur en bois +Outer Wooden Stair=Escalier extérieur en bois +Wooden Slab=Dalle de bois +Jungle Wood Stair=Escalier en bois de la jungle +Inner Jungle Wood Stair=Escalier intérieur en bois de la jungle +Outer Jungle Wood Stair=Escalier extérieur en bois de la jungle +Jungle Wood Slab=Dalle en bois de la jungle +Pine Wood Stair=Escalier en pin +Inner Pine Wood Stair=Escalier intérieur en pin +Outer Pine Wood Stair=Escalier extérieur en pin +Pine Wood Slab=Dalle en pin +Acacia Wood Stair=Escalier en acacia +Inner Acacia Wood Stair=Escalier intérieur en acacia +Outer Acacia Wood Stair=Escalier extérieur en acacia +Acacia Wood Slab=Dalle en acacia +Aspen Wood Stair=Escalier en tremble +Inner Aspen Wood Stair=Escalier intérieur en tremble +Outer Aspen Wood Stair=Escalier extérieur en tremble +Aspen Wood Slab=Dalle en tremble +Stone Stair=Escalier de pierre +Inner Stone Stair=Escalier intérieur de pierre +Outer Stone Stair=Escalier extérieur de pierre +Stone Slab=Dalle de pierre +Cobblestone Stair=Escalier en pavé +Inner Cobblestone Stair=Escalier intérieur en pavé +Outer Cobblestone Stair=Escalier extérieur en pavé +Cobblestone Slab=Dalle en pavé +Mossy Cobblestone Stair=Escalier en pavé moussu +Inner Mossy Cobblestone Stair=Escalier intérieur en pavé moussu +Outer Mossy Cobblestone Stair=Escalier extérieur en pavé moussu +Mossy Cobblestone Slab=Dalle en pavé moussu +Stone Brick Stair=Escalier en brique de pierre +Inner Stone Brick Stair=Escalier intérieur en brique de pierre +Outer Stone Brick Stair=Escalier extérieur en brique de pierre +Stone Brick Slab=Dalle en brique de pierre +Stone Block Stair=Escalier en bloc de pierre +Inner Stone Block Stair=Escalier intérieur en bloc de pierre +Outer Stone Block Stair=Escalier extérieur en bloc de pierre +Stone Block Slab=Dalle en bloc de pierre +Desert Stone Stair=Escalier en pierre du désert +Inner Desert Stone Stair=Escalier intérieur en pierre du désert +Outer Desert Stone Stair=Escalier extérieur en pierre du désert +Desert Stone Slab=Dalle en pierre du désert +Desert Cobblestone Stair=Escalier en pavé du désert +Inner Desert Cobblestone Stair=Escalier intérieur en pavé du désert +Outer Desert Cobblestone Stair=Escalier extérieur en pavé du désert +Desert Cobblestone Slab=Dalle en pavé du désert +Desert Stone Brick Stair=Escalier en brique de pierre du désert +Inner Desert Stone Brick Stair=Escalier intérieur en brique de pierre du désert +Outer Desert Stone Brick Stair=Escalier extérieur en brique de pierre du désert +Desert Stone Brick Slab=Dalle en brique de pierre du désert +Desert Stone Block Stair=Escalier en bloc de pierre du désert +Inner Desert Stone Block Stair=Escalier intérieur en bloc de pierre du désert +Outer Desert Stone Block Stair=Escalier extérieur en bloc de pierre du désert +Desert Stone Block Slab=Dalle en bloc de pierre du désert +Sandstone Stair=Escalier en grès +Inner Sandstone Stair=Escalier intérieur en grès +Outer Sandstone Stair=Escalier extérieur en grès +Sandstone Slab=Dalle en grès +Sandstone Brick Stair=Escalier en brique de grès +Inner Sandstone Brick Stair=Escalier intérieur en brique de grès +Outer Sandstone Brick Stair=Escalier extérieur en brique de grès +Sandstone Brick Slab=Dalle en brique de grès +Sandstone Block Stair=Escalier en bloc de grès +Inner Sandstone Block Stair=Escalier intérieur en bloc de grès +Outer Sandstone Block Stair=Escalier extérieur en bloc de grès +Sandstone Block Slab=Dalle en bloc de grès +Desert Sandstone Stair=Escalier en grès du désert +Inner Desert Sandstone Stair=Escalier intérieur en grès du désert +Outer Desert Sandstone Stair=Escalier extérieur en grès du désert +Desert Sandstone Slab=Dalle en grès du désert +Desert Sandstone Brick Stair=Escalier en brique de grès du désert +Inner Desert Sandstone Brick Stair=Escalier intérieur en brique de grès du désert +Outer Desert Sandstone Brick Stair=Escalier extérieur en brique de grès du désert +Desert Sandstone Brick Slab=Dalle en brique de grès du désert +Desert Sandstone Block Stair=Escalier en bloc de grès du désert +Inner Desert Sandstone Block Stair=Escalier intérieur en bloc de grès du désert +Outer Desert Sandstone Block Stair=Escalier extérieur en bloc de grès du désert +Desert Sandstone Block Slab=Dalle en bloc de grès du désert +Silver Sandstone Stair=Escalier en grès argenté +Inner Silver Sandstone Stair=Escalier intérieur en grès argenté +Outer Silver Sandstone Stair=Escalier extérieur en grès argenté +Silver Sandstone Slab=Dalle en grès argenté +Silver Sandstone Brick Stair=Escalier en brique de grès argenté +Inner Silver Sandstone Brick Stair=Escalier intérieur en brique de grès argenté +Outer Silver Sandstone Brick Stair=Escalier extérieur en brique de grès argenté +Silver Sandstone Brick Slab=Dalle en brique de grès argenté +Silver Sandstone Block Stair=Escalier en bloc de grès argenté +Inner Silver Sandstone Block Stair=Escalier intérieur en bloc de grès argenté +Outer Silver Sandstone Block Stair=Escalier extérieur en bloc de grès argenté +Silver Sandstone Block Slab=Dalle en bloc de grès argenté +Obsidian Stair=Escalier en obsidienne +Inner Obsidian Stair=Escalier intérieur en obsidienne +Outer Obsidian Stair=Escalier extérieur en obsidienne +Obsidian Slab=Dalle en obsidienne +Obsidian Brick Stair=Escalier en brique d'obsidienne +Inner Obsidian Brick Stair=Escalier intérieur en brique d'obsidienne +Outer Obsidian Brick Stair=Escalier extérieur en brique d'obsidienne +Obsidian Brick Slab=Dalle en brique d'obsidienne +Obsidian Block Stair=Escalier en bloc d'obsidienne +Inner Obsidian Block Stair=Escalier intérieur en bloc d'obsidienne +Outer Obsidian Block Stair=Escalier extérieur en bloc d'obsidienne +Obsidian Block Slab=Dalle en bloc d'obsidienne +Brick Stair=Escalier en brique +Inner Brick Stair=Escalier intérieur en brique +Outer Brick Stair=Escalier extérieur en brique +Brick Slab=Dalle en brique +Steel Block Stair=Escalier en acier +Inner Steel Block Stair=Escalier intérieur en acier +Outer Steel Block Stair=Escalier extérieur en acier +Steel Block Slab=Dalle en acier +Tin Block Stair=Escalier en bloc d'étain +Inner Tin Block Stair=Escalier intérieur en bloc d'étain +Outer Tin Block Stair=Escalier extérieur en bloc d'étain +Tin Block Slab=Dalle en bloc d'étain +Copper Block Stair=Escalier en bloc de cuivre +Inner Copper Block Stair=Escalier intérieur en bloc de cuivre +Outer Copper Block Stair=Escalier extérieur en bloc de cuivre +Copper Block Slab=Dalle en bloc de cuivre +Bronze Block Stair=Escalier en bronze +Inner Bronze Block Stair=Escalier intérieur en bronze +Outer Bronze Block Stair=Escalier extérieur en bronze +Bronze Block Slab=Dalle en bronze +Gold Block Stair=Escalier en bloc d'or +Inner Gold Block Stair=Escalier intérieur en bloc d'or +Outer Gold Block Stair=Escalier extérieur en bloc d'or +Gold Block Slab=Dalle en bloc d'or +Ice Stair=Escalier de glace +Inner Ice Stair=Escalier intérieur de glace +Outer Ice Stair=Escalier extérieur de glace +Ice Slab=Dalle de glace +Snow Block Stair=Escalier en bloc de neige +Inner Snow Block Stair=Escalier intérieur en bloc de neige +Outer Snow Block Stair=Escalier extérieur en bloc de neige +Snow Block Slab=Dalle en bloc de neige diff --git a/mods/stairs/locale/stairs.id.tr b/mods/stairs/locale/stairs.id.tr new file mode 100644 index 0000000..dbdfaa0 --- /dev/null +++ b/mods/stairs/locale/stairs.id.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Tangga Kaca +Glass Slab=Lempengan Kaca +Inner Glass Stair=Tangga Kaca Dalam +Outer Glass Stair=Tangga Kaca Luar +Obsidian Glass Stair=Tangga Kaca Obsidian +Obsidian Glass Slab=Lempengan Kaca Obsidian +Inner Obsidian Glass Stair=Tangga Kaca Obsidian Dalam +Outer Obsidian Glass Stair=Tangga Kaca Obsidian Luar +Wooden Stair=Tangga Kayu +Inner Wooden Stair=Tangga Kayu Dalam +Outer Wooden Stair=Tangga Kayu Luar +Wooden Slab=Lempengan Kayu +Jungle Wood Stair=Tangga Kayu Rimba +Inner Jungle Wood Stair=Tangga Kayu Rimba Dalam +Outer Jungle Wood Stair=Tangga Kayu Rimba Luar +Jungle Wood Slab=Lempengan Kayu Rimba +Pine Wood Stair=Tangga Kayu Pinus +Inner Pine Wood Stair=Tangga Kayu Pinus Dalam +Outer Pine Wood Stair=Tangga Kayu Pinus Luar +Pine Wood Slab=Lempengan Kayu Pinus +Acacia Wood Stair=Tangga Kayu Akasia +Inner Acacia Wood Stair=Tangga Kayu Akasia Dalam +Outer Acacia Wood Stair=Tangga Kayu Akasia Luar +Acacia Wood Slab=Lempengan Kayu Akasia +Aspen Wood Stair=Tangga Kayu Aspen +Inner Aspen Wood Stair=Tangga Kayu Aspen Dalam +Outer Aspen Wood Stair=Tangga Kayu Aspen Luar +Aspen Wood Slab=Lempengan Kayu Aspen +Stone Stair=Tangga Batu +Inner Stone Stair=Tangga Batu Dalam +Outer Stone Stair=Tangga Batu Luar +Stone Slab=Lempengan Batu +Cobblestone Stair=Tangga Bongkahan Batu +Inner Cobblestone Stair=Tangga Bongkahan Batu Dalam +Outer Cobblestone Stair=Tangga Bongkahan Batu Luar +Cobblestone Slab=Lempengan Bongkahan Batu +Mossy Cobblestone Stair=Tangga Bongkahan Batu Berlumut +Inner Mossy Cobblestone Stair=Tangga Bongkahan Batu Berlumut Dalam +Outer Mossy Cobblestone Stair=Tangga Bongkahan Batu Berlumut Luar +Mossy Cobblestone Slab=Lempengan Bongkahan Batu Berlumut +Stone Brick Stair=Tangga Tembok Batu +Inner Stone Brick Stair=Tangga Tembok Batu Dalam +Outer Stone Brick Stair=Tangga Tembok Batu Luar +Stone Brick Slab=Lempengan Tembok Batu +Stone Block Stair=Tangga Balok Batu +Inner Stone Block Stair=Tangga Balok Batu Dalam +Outer Stone Block Stair=Tangga Balok Batu Luar +Stone Block Slab=Lempengan Balok Batu +Desert Stone Stair=Tangga Batu Gurun +Inner Desert Stone Stair=Tangga Batu Gurun Dalam +Outer Desert Stone Stair=Tangga Batu Gurun Luar +Desert Stone Slab=Lempengan Batu Gurun +Desert Cobblestone Stair=Tangga Bongkahan Batu Gurun +Inner Desert Cobblestone Stair=Tangga Bongkahan Batu Gurun Dalam +Outer Desert Cobblestone Stair=Tangga Bongkahan Batu Gurun Luar +Desert Cobblestone Slab=Lempengan Bongkahan Batu Gurun +Desert Stone Brick Stair=Tangga Tembok Batu Gurun +Inner Desert Stone Brick Stair=Tangga Tembok Batu Gurun Dalam +Outer Desert Stone Brick Stair=Tangga Tembok Batu Gurun Luar +Desert Stone Brick Slab=Lempengan Tembok Batu Gurun +Desert Stone Block Stair=Tangga Balok Batu Gurun +Inner Desert Stone Block Stair=Tangga Balok Batu Gurun Dalam +Outer Desert Stone Block Stair=Tangga Balok Batu Gurun Luar +Desert Stone Block Slab=Lempengan Balok Batu Gurun +Sandstone Stair=Tangga Batu Pasir +Inner Sandstone Stair=Tangga Batu Pasir Dalam +Outer Sandstone Stair=Tangga Batu Pasir Luar +Sandstone Slab=Lempengan Batu Pasir +Sandstone Brick Stair=Tangga Tembok Batu Pasir +Inner Sandstone Brick Stair=Tangga Tembok Batu Pasir Dalam +Outer Sandstone Brick Stair=Tangga Tembok Batu Pasir Luar +Sandstone Brick Slab=Lempengan Tembok Batu Pasir +Sandstone Block Stair=Tangga Balok Batu Pasir +Inner Sandstone Block Stair=Tangga Balok Batu Pasir Dalam +Outer Sandstone Block Stair=Tangga Balok Batu Pasir Luar +Sandstone Block Slab=Lempengan Balok Batu Pasir +Desert Sandstone Stair=Tangga Batu Pasir Gurun +Inner Desert Sandstone Stair=Tangga Batu Pasir Gurun Dalam +Outer Desert Sandstone Stair=Tangga Batu Pasir Gurun Luar +Desert Sandstone Slab=Lempengan Batu Pasir Gurun +Desert Sandstone Brick Stair=Tangga Tembok Batu Pasir Gurun +Inner Desert Sandstone Brick Stair=Tangga Tembok Batu Pasir Gurun Dalam +Outer Desert Sandstone Brick Stair=Tangga Tembok Batu Pasir Gurun Luar +Desert Sandstone Brick Slab=Lempengan Tembok Batu Pasir Gurun +Desert Sandstone Block Stair=Tangga Balok Batu Pasir Gurun +Inner Desert Sandstone Block Stair=Tangga Balok Batu Pasir Gurun Dalam +Outer Desert Sandstone Block Stair=Tangga Balok Batu Pasir Gurun Luar +Desert Sandstone Block Slab=Lempengan Balok Batu Pasir Gurun +Silver Sandstone Stair=Tangga Batu Pasir Perak +Inner Silver Sandstone Stair=Tangga Batu Pasir Perak Dalam +Outer Silver Sandstone Stair=Tangga Batu Pasir Perak Luar +Silver Sandstone Slab=Lempengan Batu Pasir Perak +Silver Sandstone Brick Stair=Tangga Tembok Batu Pasir Perak +Inner Silver Sandstone Brick Stair=Tangga Tembok Batu Pasir Perak Dalam +Outer Silver Sandstone Brick Stair=Tangga Tembok Batu Pasir Perak Luar +Silver Sandstone Brick Slab=Lempengan Tembok Batu Pasir Perak +Silver Sandstone Block Stair=Tangga Balok Batu Pasir Perak +Inner Silver Sandstone Block Stair=Tangga Balok Batu Pasir Perak Dalam +Outer Silver Sandstone Block Stair=Tangga Balok Batu Pasir Perak Luar +Silver Sandstone Block Slab=Lempengan Balok Batu Pasir Perak +Obsidian Stair=Tangga Obsidian +Inner Obsidian Stair=Tangga Obsidian Dalam +Outer Obsidian Stair=Tangga Obsidian Luar +Obsidian Slab=Lempengan Obsidian +Obsidian Brick Stair=Tangga Tembok Obsidian +Inner Obsidian Brick Stair=Tangga Tembok Obsidian Dalam +Outer Obsidian Brick Stair=Tangga Tembok Obsidian Luar +Obsidian Brick Slab=Lempengan Tembok Obsidian +Obsidian Block Stair=Tangga Balok Obsidian +Inner Obsidian Block Stair=Tangga Balok Obsidian Dalam +Outer Obsidian Block Stair=Tangga Balok Obsidian Luar +Obsidian Block Slab=Lempengan Balok Obsidian +Brick Stair=Tangga Bata +Inner Brick Stair=Tangga Bata Dalam +Outer Brick Stair=Tangga Bata Luar +Brick Slab=Lempengan Bata +Steel Block Stair=Tangga Balok Baja +Inner Steel Block Stair=Tangga Balok Baja Dalam +Outer Steel Block Stair=Tangga Balok Baja Luar +Steel Block Slab=Lempengan Balok Baja +Tin Block Stair=Tangga Balok Timah +Inner Tin Block Stair=Tangga Balok Timah Dalam +Outer Tin Block Stair=Tangga Balok Timah Luar +Tin Block Slab=Lempengan Balok Timah +Copper Block Stair=Tangga Balok Tembaga +Inner Copper Block Stair=Tangga Balok Tembaga Dalam +Outer Copper Block Stair=Tangga Balok Tembaga Luar +Copper Block Slab=Lempengan Balok Tembaga +Bronze Block Stair=Tangga Balok Perunggu +Inner Bronze Block Stair=Tangga Balok Perunggu Dalam +Outer Bronze Block Stair=Tangga Balok Perunggu Luar +Bronze Block Slab=Lempengan Balok Perunggu +Gold Block Stair=Tangga Balok Emas +Inner Gold Block Stair=Tangga Balok Emas Dalam +Outer Gold Block Stair=Tangga Balok Emas Luar +Gold Block Slab=Lempengan Balok Emas +Ice Stair=Tangga Es +Inner Ice Stair=Tangga Es Dalam +Outer Ice Stair=Tangga Es Luar +Ice Slab=Lempengan Es +Snow Block Stair=Tangga Balok Salju +Inner Snow Block Stair=Tangga Balok Salju Dalam +Outer Snow Block Stair=Tangga Balok Salju Luar +Snow Block Slab=Lempengan Balok Salju diff --git a/mods/stairs/locale/stairs.it.tr b/mods/stairs/locale/stairs.it.tr new file mode 100644 index 0000000..16dfed6 --- /dev/null +++ b/mods/stairs/locale/stairs.it.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Scala di vetro +Glass Slab=Lastra di vetro +Inner Glass Stair=Scala di vetro interna +Outer Glass Stair=Scala di vetro esterna +Obsidian Glass Stair=Scala di vetro d'ossidiana +Obsidian Glass Slab=Lastra di vetro d'ossidiana +Inner Obsidian Glass Stair=Scala di vetro d'ossidiana interna +Outer Obsidian Glass Stair=Scala di vetro d'ossidiana esterna +Wooden Stair=Scala di legno +Inner Wooden Stair=Scala di legno interna +Outer Wooden Stair=Scala di legno esterna +Wooden Slab=Lastra di legno +Jungle Wood Stair=Scala di legno della giungla +Inner Jungle Wood Stair=Scala di legno della giungla interna +Outer Jungle Wood Stair=Scala di legno della giungla esterna +Jungle Wood Slab=Lastra di legno della giungla +Pine Wood Stair=Scala di legno di pino +Inner Pine Wood Stair=Scala di legno di pino interna +Outer Pine Wood Stair=Scala di legno di pino esterna +Pine Wood Slab=Lastra di legno di pino +Acacia Wood Stair=Scala di legno d'acacia +Inner Acacia Wood Stair=Scala di legno d'acacia interna +Outer Acacia Wood Stair=Scala di legno d'acacia esterna +Acacia Wood Slab=Lastra di legno d'acacia +Aspen Wood Stair=Scala di legno di pioppo +Inner Aspen Wood Stair=Scala di legno di pioppo interna +Outer Aspen Wood Stair=Scala di legno di pioppo esterna +Aspen Wood Slab=Lastra di legno di pioppo +Stone Stair=Scala di pietra +Inner Stone Stair=Scala di pietra interna +Outer Stone Stair=Scala di pietra esterna +Stone Slab=Lastra di pietra +Cobblestone Stair=Scala di ciottoli +Inner Cobblestone Stair=Scala di ciottoli interna +Outer Cobblestone Stair=Scala di ciottoli esterna +Cobblestone Slab=Lastra di ciottoli +Mossy Cobblestone Stair=Scala di ciottoli muschiosi +Inner Mossy Cobblestone Stair=Scala di ciottoli muschiosi interna +Outer Mossy Cobblestone Stair=Scala di ciottoli muschiosi esterna +Mossy Cobblestone Slab=Lastra di ciottoli muschiosi +Stone Brick Stair=Scala di mattone di pietra +Inner Stone Brick Stair=Scala di mattone di pietra interna +Outer Stone Brick Stair=Scala di mattone di pietra esterna +Stone Brick Slab=Lastra di mattone di pietra +Stone Block Stair=Scala di blocco di pietra +Inner Stone Block Stair=Scala di blocco di pietra interna +Outer Stone Block Stair=Scala di blocco di pietra esterna +Stone Block Slab=Lastra di blocco di pietra +Desert Stone Stair=Scala di pietra del deserto +Inner Desert Stone Stair=Scala di pietra del deserto interna +Outer Desert Stone Stair=Scala di pietra del deserto esterna +Desert Stone Slab=Lastra di pietra del deserto +Desert Cobblestone Stair=Scala di ciottoli del deserto +Inner Desert Cobblestone Stair=Scala di ciottoli del deserto interna +Outer Desert Cobblestone Stair=Scala di ciottoli del deserto esterna +Desert Cobblestone Slab=Lastra di ciottoli del deserto +Desert Stone Brick Stair=Scala di mattone di pietra del deserto +Inner Desert Stone Brick Stair=Scala di mattone di pietra del deserto interna +Outer Desert Stone Brick Stair=Scala di mattone di pietra del deserto esterna +Desert Stone Brick Slab=Lastra di mattone di pietra del deserto +Desert Stone Block Stair=Scala di blocco di pietra del deserto +Inner Desert Stone Block Stair=Scala di blocco di pietra del deserto interna +Outer Desert Stone Block Stair=Scala di blocco di pietra del deserto esterna +Desert Stone Block Slab=Lastra di blocco di pietra del deserto +Sandstone Stair=Scala d'arenaria +Inner Sandstone Stair=Scala d'arenaria interna +Outer Sandstone Stair=Scala d'arenaria esterna +Sandstone Slab=Lastra d'arenaria +Sandstone Brick Stair=Scala di mattone d'arenaria +Inner Sandstone Brick Stair=Scala di mattone d'arenaria interna +Outer Sandstone Brick Stair=Scala di mattone d'arenaria esterna +Sandstone Brick Slab=Lastra di mattone d'arenaria +Sandstone Block Stair=Scala di blocco d'arenaria +Inner Sandstone Block Stair=Scala di blocco d'arenaria interna +Outer Sandstone Block Stair=Scala di blocco d'arenaria esterna +Sandstone Block Slab=Lastra di blocco d'arenaria +Desert Sandstone Stair=Scala d'arenaria del deserto +Inner Desert Sandstone Stair=Scala d'arenaria del deserto interna +Outer Desert Sandstone Stair=Scala d'arenaria del deserto esterna +Desert Sandstone Slab=Lastra d'arenaria del deserto +Desert Sandstone Brick Stair=Scala di mattone d'arenaria del deserto +Inner Desert Sandstone Brick Stair=Scala di mattone d'arenaria del deserto interna +Outer Desert Sandstone Brick Stair=Scala di mattone d'arenaria del deserto esterna +Desert Sandstone Brick Slab=Lastra di mattone d'arenaria del deserto +Desert Sandstone Block Stair=Scala di blocco d'arenaria del deserto +Inner Desert Sandstone Block Stair=Scala di blocco d'arenaria del deserto interna +Outer Desert Sandstone Block Stair=Scala di blocco d'arenaria del deserto esterna +Desert Sandstone Block Slab=Lastra di blocco d'arenaria del deserto +Silver Sandstone Stair=Scala d'arenaria argentata +Inner Silver Sandstone Stair=Scala d'arenaria argentata interna +Outer Silver Sandstone Stair=Scala d'arenaria argentata esterna +Silver Sandstone Slab=Lastra d'arenaria argentata +Silver Sandstone Brick Stair=Scala di mattone d'arenaria argentata +Inner Silver Sandstone Brick Stair=Scala di mattone d'arenaria argentata interna +Outer Silver Sandstone Brick Stair=Scala di mattone d'arenaria argentata esterna +Silver Sandstone Brick Slab=Lastra di mattone d'arenaria argentata +Silver Sandstone Block Stair=Scala di blocco d'arenaria argentata +Inner Silver Sandstone Block Stair=Scala di blocco d'arenaria argentata interna +Outer Silver Sandstone Block Stair=Scala di blocco d'arenaria argentata esterna +Silver Sandstone Block Slab=Lastra di blocco d'arenaria argentata +Obsidian Stair=Scala d'ossidiana +Inner Obsidian Stair=Scala d'ossidiana interna +Outer Obsidian Stair=Scala d'ossidiana esterna +Obsidian Slab=Lastra d'ossidiana +Obsidian Brick Stair=Scala di mattone d'ossidiana +Inner Obsidian Brick Stair=Scala di mattone d'ossidiana interna +Outer Obsidian Brick Stair=Scala di mattone d'ossidiana esterna +Obsidian Brick Slab=Lastra di mattone d'ossidiana +Obsidian Block Stair=Scala di blocco d'ossidiana +Inner Obsidian Block Stair=Scala di blocco d'ossidiana interna +Outer Obsidian Block Stair=Scala di blocco d'ossidiana esterna +Obsidian Block Slab=Lastra di blocco d'ossidiana +Brick Stair=Scala di mattone +Inner Brick Stair=Scala di mattone interna +Outer Brick Stair=Scala di mattone esterna +Brick Slab=Lastra di mattone +Steel Block Stair=Scala di blocco d'acciaio +Inner Steel Block Stair=Scala di blocco d'acciaio interna +Outer Steel Block Stair=Scala di blocco d'acciaio esterna +Steel Block Slab=Lastra di blocco d'acciaio +Tin Block Stair=Scala di blocco di stagno +Inner Tin Block Stair=Scala di blocco di stagno interna +Outer Tin Block Stair=Scala di blocco di stagno esterna +Tin Block Slab=Lastra di blocco di stagno +Copper Block Stair=Scala di blocco di rame +Inner Copper Block Stair=Scala di blocco di rame interna +Outer Copper Block Stair=Scala di blocco di rame esterna +Copper Block Slab=Lastra di blocco di rame +Bronze Block Stair=Scala di blocco di bronzo +Inner Bronze Block Stair=Scala di blocco di bronzo interna +Outer Bronze Block Stair=Scala di blocco di bronzo esterna +Bronze Block Slab=Lastra di blocco di bronzo +Gold Block Stair=Scala di blocco d'oro +Inner Gold Block Stair=Scala di blocco d'oro interna +Outer Gold Block Stair=Scala di blocco d'oro esterna +Gold Block Slab=Lastra di blocco d'oro +Ice Stair=Scala di ghiaccio +Inner Ice Stair=Scala di ghiaccio interna +Outer Ice Stair=Scala di ghiaccio esterna +Ice Slab=Lastra di ghiaccio +Snow Block Stair=Scala di blocco di neve +Inner Snow Block Stair=Scala di blocco di neve interna +Outer Snow Block Stair=Scala di blocco di neve esterna +Snow Block Slab=Lastra di blocco di neve diff --git a/mods/stairs/locale/stairs.ms.tr b/mods/stairs/locale/stairs.ms.tr new file mode 100644 index 0000000..a39c7f6 --- /dev/null +++ b/mods/stairs/locale/stairs.ms.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Tangga Kaca +Glass Slab=Papak Kaca +Inner Glass Stair=Tangga Kaca Dalaman +Outer Glass Stair=Tangga Kaca Luaran +Obsidian Glass Stair=Tangga Obsidia +Obsidian Glass Slab=Papak Obsidia +Inner Obsidian Glass Stair=Tangga Obsidia Dalaman +Outer Obsidian Glass Stair=Tangga Obsidia Luaran +Wooden Stair=Tangga Kayu +Inner Wooden Stair=Tangga Kayu Dalaman +Outer Wooden Stair=Tangga Kayu Luaran +Wooden Slab=Papak Kayu +Jungle Wood Stair=Tangga Kayu Hutan +Inner Jungle Wood Stair=Tangga Kayu Hutan Dalaman +Outer Jungle Wood Stair=Tangga Kayu Hutan Luaran +Jungle Wood Slab=Papak Kayu Hutan +Pine Wood Stair=Tangga Kayu Pain +Inner Pine Wood Stair=Tangga Kayu Pain Dalaman +Outer Pine Wood Stair=Tangga Kayu Pain Luaran +Pine Wood Slab=Papak Kayu Pain +Acacia Wood Stair=Tangga Kayu Akasia +Inner Acacia Wood Stair=Tangga Kayu Akasia Dalaman +Outer Acacia Wood Stair=Tangga Kayu Akasia Luaran +Acacia Wood Slab=Papak Kayu Akasia +Aspen Wood Stair=Tangga Kayu Aspen +Inner Aspen Wood Stair=Tangga Kayu Aspen Dalaman +Outer Aspen Wood Stair=Tangga Kayu Aspen Luaran +Aspen Wood Slab=Papak Kayu Aspen +Stone Stair=Tangga Batu +Inner Stone Stair=Tangga Batu Dalaman +Outer Stone Stair=Tangga Batu Luaran +Stone Slab=Papak Batu +Cobblestone Stair=Tangga Batu Buntar +Inner Cobblestone Stair=Tangga Batu Buntar Dalaman +Outer Cobblestone Stair=Tangga Batu Buntar Luaran +Cobblestone Slab=Papak Batu Buntar +Mossy Cobblestone Stair=Tangga Batu Buntar Berlumut +Inner Mossy Cobblestone Stair=Tangga Batu Buntar Berlumut Dalaman +Outer Mossy Cobblestone Stair=Tangga Batu Buntar Berlumut Luaran +Mossy Cobblestone Slab=Papak Batu Buntar Berlumut +Stone Brick Stair=Tangga Bata Batu +Inner Stone Brick Stair=Tangga Bata Batu Dalaman +Outer Stone Brick Stair=Tangga Bata Batu Luaran +Stone Brick Slab=Papak Bata Batu +Stone Block Stair=Tangga Bongkah Batu +Inner Stone Block Stair=Tangga Bongkah Batu Dalaman +Outer Stone Block Stair=Tangga Bongkah Batu Luaran +Stone Block Slab=Papak Bongkah Batu +Desert Stone Stair=Tangga Batu Gurun +Inner Desert Stone Stair=Tangga Batu Gurun Dalaman +Outer Desert Stone Stair=Tangga Batu Gurun Luaran +Desert Stone Slab=Papak Batu Gurun +Desert Cobblestone Stair=Tangga Batu Buntar Gurun +Inner Desert Cobblestone Stair=Tangga Batu Buntar Gurun Dalaman +Outer Desert Cobblestone Stair=Tangga Batu Buntar Gurun Luaran +Desert Cobblestone Slab=Papak Batu Buntar Gurun +Desert Stone Brick Stair=Tangga Bata Batu Gurun +Inner Desert Stone Brick Stair=Tangga Bata Batu Gurun Dalaman +Outer Desert Stone Brick Stair=Tangga Bata Batu Gurun Luaran +Desert Stone Brick Slab=Papak Bata Batu Gurun +Desert Stone Block Stair=Tangga Bongkah Batu Gurun +Inner Desert Stone Block Stair=Tangga Bongkah Batu Gurun Dalaman +Outer Desert Stone Block Stair=Tangga Bongkah Batu Gurun Luaran +Desert Stone Block Slab=Papak Bongkah Batu Gurun +Sandstone Stair=Tangga Batu Pasir +Inner Sandstone Stair=Tangga Batu Pasir Dalaman +Outer Sandstone Stair=Tangga Batu Pasir Luaran +Sandstone Slab=Papak Batu Pasir +Sandstone Brick Stair=Tangga Bata Batu Pasir +Inner Sandstone Brick Stair=Tangga Bata Batu Pasir Dalaman +Outer Sandstone Brick Stair=Tangga Bata Batu Pasir Luaran +Sandstone Brick Slab=Papak Bata Batu Pasir +Sandstone Block Stair=Tangga Bongkah Batu Pasir +Inner Sandstone Block Stair=Tangga Bongkah Batu Pasir Dalaman +Outer Sandstone Block Stair=Tangga Bongkah Batu Pasir Luaran +Sandstone Block Slab=Papak Bongkah Batu Pasir +Desert Sandstone Stair=Tangga Batu Pasir Gurun +Inner Desert Sandstone Stair=Tangga Batu Pasir Gurun Dalaman +Outer Desert Sandstone Stair=Tangga Batu Pasir Gurun Luaran +Desert Sandstone Slab=Papak Batu Pasir Gurun +Desert Sandstone Brick Stair=Tangga Bata Batu Pasir Gurun +Inner Desert Sandstone Brick Stair=Tangga Bata Batu Pasir Gurun Dalaman +Outer Desert Sandstone Brick Stair=Tangga Bata Batu Pasir Gurun Luaran +Desert Sandstone Brick Slab=Papak Bata Batu Pasir Gurun +Desert Sandstone Block Stair=Tangga Bongkah Batu Pasir Gurun +Inner Desert Sandstone Block Stair=Tangga Bongkah Batu Pasir Gurun Dalaman +Outer Desert Sandstone Block Stair=Tangga Bongkah Batu Pasir Gurun Luaran +Desert Sandstone Block Slab=Papak Bongkah Batu Pasir Gurun +Silver Sandstone Stair=Tangga Batu Pasir Perak +Inner Silver Sandstone Stair=Tangga Batu Pasir Perak Dalaman +Outer Silver Sandstone Stair=Tangga Batu Pasir Perak Luaran +Silver Sandstone Slab=Papak Batu Pasir Perak +Silver Sandstone Brick Stair=Tangga Bata Batu Pasir Perak +Inner Silver Sandstone Brick Stair=Tangga Bata Batu Pasir Perak Dalaman +Outer Silver Sandstone Brick Stair=Tangga Bata Batu Pasir Perak Luaran +Silver Sandstone Brick Slab=Papak Bata Batu Pasir Perak +Silver Sandstone Block Stair=Tangga Bongkah Batu Pasir Perak +Inner Silver Sandstone Block Stair=Tangga Bongkah Batu Pasir Perak Dalaman +Outer Silver Sandstone Block Stair=Tangga Bongkah Batu Pasir Perak Luaran +Silver Sandstone Block Slab=Papak Bongkah Batu Pasir Perak +Obsidian Stair=Tangga Obsidia +Inner Obsidian Stair=Tangga Obsidia Dalaman +Outer Obsidian Stair=Tangga Obsidia Luaran +Obsidian Slab=Papak Obsidia +Obsidian Brick Stair=Tangga Bata Obsidia +Inner Obsidian Brick Stair=Tangga Bata Obsidia Dalaman +Outer Obsidian Brick Stair=Tangga Bata Obsidia Luaran +Obsidian Brick Slab=Papak Bata Obsidia +Obsidian Block Stair=Tangga Bongkah Obsidia +Inner Obsidian Block Stair=Tangga Bongkah Obsidia Dalaman +Outer Obsidian Block Stair=Tangga Bongkah Obsidia Luaran +Obsidian Block Slab=Papak Bongkah Obsidia +Brick Stair=Tangga Bata +Inner Brick Stair=Tangga Bata Dalaman +Outer Brick Stair=Tangga Bata Luaran +Brick Slab=Papak Bata +Steel Block Stair=Tangga Bongkah Keluli +Inner Steel Block Stair=Tangga Bongkah Keluli Dalaman +Outer Steel Block Stair=Tangga Bongkah Keluli Luaran +Steel Block Slab=Papak Bongkah Keluli +Tin Block Stair=Tangga Bongkah Timah +Inner Tin Block Stair=Tangga Bongkah Timah Dalaman +Outer Tin Block Stair=Tangga Bongkah Timah Luaran +Tin Block Slab=Papak Bongkah Timah +Copper Block Stair=Tangga Bongkah Tembaga +Inner Copper Block Stair=Tangga Bongkah Tembaga Dalaman +Outer Copper Block Stair=Tangga Bongkah Tembaga Luaran +Copper Block Slab=Papak Bongkah Tembaga +Bronze Block Stair=Tangga Bongkah Gangsa +Inner Bronze Block Stair=Tangga Bongkah Gangsa Dalaman +Outer Bronze Block Stair=Tangga Bongkah Gangsa Luaran +Bronze Block Slab=Papak Bongkah Gangsa +Gold Block Stair=Tangga Bongkah Emas +Inner Gold Block Stair=Tangga Bongkah Emas Dalaman +Outer Gold Block Stair=Tangga Bongkah Emas Luaran +Gold Block Slab=Papak Bongkah Emas +Ice Stair=Tangga Ais +Inner Ice Stair=Tangga Ais Dalaman +Outer Ice Stair=Tangga Ais Luaran +Ice Slab=Papak Ais +Snow Block Stair=Tangga Bongkah Salji +Inner Snow Block Stair=Tangga Bongkah Salji Dalaman +Outer Snow Block Stair=Tangga Bongkah Salji Luaran +Snow Block Slab=Papak Bongkah Salji diff --git a/mods/stairs/locale/stairs.ru.tr b/mods/stairs/locale/stairs.ru.tr new file mode 100644 index 0000000..2d5850e --- /dev/null +++ b/mods/stairs/locale/stairs.ru.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Стеклянная Ступень +Glass Slab=Стеклянная Плита +Inner Glass Stair=Угловая Стеклянная Ступень (Внутренний Угол) +Outer Glass Stair=Угловая Стеклянная Ступень (Внешний Угол) +Obsidian Glass Stair=Стеклянная Ступень Из Обсидиана +Obsidian Glass Slab=Стеклянная Плита Из Обсидиана +Inner Obsidian Glass Stair=Угловая Стеклянная Ступень Из Обсидиана (Внутренний Угол) +Outer Obsidian Glass Stair=Угловая Стеклянная Ступень Из Обсидиана (Внешний Угол) +Wooden Stair=Яблоневая Деревянная Ступень +Inner Wooden Stair=Угловая Яблоневая Деревянная Ступень (Внутренний Угол) +Outer Wooden Stair=Угловая Яблоневая Деревянная Ступень (Внешний Угол) +Wooden Slab=Яблоневая Деревянная Плита +Jungle Wood Stair=Тропическая Деревянная Ступень +Inner Jungle Wood Stair=Угловая Тропическая Деревянная Ступень (Внутренний Угол) +Outer Jungle Wood Stair=Угловая Тропическая Деревянная Ступень (Внешний Угол) +Jungle Wood Slab=Тропическая Деревянная Плита +Pine Wood Stair=Сосновая Деревянная Ступень +Inner Pine Wood Stair=Угловая Сосновая Деревянная Ступень (Внутренний Угол) +Outer Pine Wood Stair=Угловая Сосновая Деревянная Ступень (Внешний Угол) +Pine Wood Slab=Сосновая Деревянная Плита +Acacia Wood Stair=Деревянная Ступень Из Акации +Inner Acacia Wood Stair=Угловая Деревянная Ступень Из Акации (Внутренний Угол) +Outer Acacia Wood Stair=Угловая Деревянная Ступень Из Акации (Внешний Угол) +Acacia Wood Slab=Деревянная Плита Из Акации +Aspen Wood Stair=Осиновая Деревянная Ступень +Inner Aspen Wood Stair=Угловая Осиновая Деревянная Ступень (Внутренний Угол) +Outer Aspen Wood Stair=Угловая осиновая Деревянная Ступень (Внешний Угол) +Aspen Wood Slab=Осиновая Деревянная Плита +Stone Stair=Каменная Ступень +Inner Stone Stair=Угловая Каменная Ступень (Внутренний Угол) +Outer Stone Stair=Угловая Каменная Ступень (Внешний Угол) +Stone Slab=Каменная Плита +Cobblestone Stair=Булыжниковая Ступень +Inner Cobblestone Stair=Угловая Булыжниковая Ступень (Внутренний Угол) +Outer Cobblestone Stair=Угловая Булыжниковая Ступень (Внешний Угол) +Cobblestone Slab=Булыжниковая Плита +Mossy Cobblestone Stair=Мшистая Булыжниковая Ступень +Inner Mossy Cobblestone Stair=Угловая Мшистая Булыжниковая Ступень (Внутренний Угол) +Outer Mossy Cobblestone Stair=Угловая Мшистая Булыжниковая Ступень (Внешний Угол) +Mossy Cobblestone Slab=Мшистая Булыжниковая Плита +Stone Brick Stair=Cтупень Из Каменных Кирпичей +Inner Stone Brick Stair=Угловая Ступень Из Каменных Кирпичей (Внутренний Угол) +Outer Stone Brick Stair=Угловая Ступень Из Каменных Кирпичей (Внешний Угол) +Stone Brick Slab=Плита Из Каменных Кирпичей +Stone Block Stair=Ступень Из Каменного Блока +Inner Stone Block Stair=Угловая Ступень Из Каменного Блока (Внутренний Угол) +Outer Stone Block Stair=Угловая Ступень Из Каменного Блока (Внешний Угол) +Stone Block Slab=Плита Из Каменного Блока +Desert Stone Stair=Ступень Из Пустынного Камня +Inner Desert Stone Stair=Угловая Ступень Из Пустынного Камня (Внутренний Угол) +Outer Desert Stone Stair=Угловая Ступень Из Пустынного Камня (Внешний Угол) +Desert Stone Slab=Плита Из Пустынного Камня +Desert Cobblestone Stair=Ступень Из Пустынного Булыжника +Inner Desert Cobblestone Stair=Угловая Ступень Из Пустынного Булыжника (Внутренний Угол) +Outer Desert Cobblestone Stair=Угловая Ступень Из Пустынного Булыжника (Внешний Угол) +Desert Cobblestone Slab=Плита Из Пустынного Камня +Desert Stone Brick Stair=Ступень Из Кирпичей Пустынного Камня +Inner Desert Stone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Камня (Внутренний Угол) +Outer Desert Stone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Камня (Внешний Угол) +Desert Stone Brick Slab=Плита Из Кирпичей Пустынного Камня +Desert Stone Block Stair=Ступень Из Пустынного Каменного Блока +Inner Desert Stone Block Stair=Угловая Ступень Из Пустынного Каменного Блока (Внутренний Угол) +Outer Desert Stone Block Stair=Угловая Ступень Из Пустынного Каменного Блока (Внешний Угол) +Desert Stone Block Slab=Плита Из Пустынного Каменного Блока +Sandstone Stair=Песчаниковая Ступень +Inner Sandstone Stair=Угловая Песчаниковая Ступень (Внутренний Угол) +Outer Sandstone Stair=Угловая Песчаниковая Ступень (Внешний Угол) +Sandstone Slab=Песчаниковая Плита +Sandstone Brick Stair=Ступень Из Песчаниковых Кирпичей +Inner Sandstone Brick Stair=Угловая Ступень Из Песчаниковых Кирпичей (Внутренний Угол) +Outer Sandstone Brick Stair=Угловая Ступень Из Песчаниковых Кирпичей (Внешний Угол) +Sandstone Brick Slab=Плита Из Песчаниковых Кирпичей +Sandstone Block Stair=Ступень Из Песчаникового Блока +Inner Sandstone Block Stair=Угловая Ступень Из Песчаникового Блока (Внутренний Угол) +Outer Sandstone Block Stair=Угловая Ступень Из Песчаникового Блока (Внешний Угол) +Sandstone Block Slab=Плита Из Песчаникового Блока +Desert Sandstone Stair=Ступень Из Пустынного Песчаника +Inner Desert Sandstone Stair=Угловая Ступень Из Пустынного Песчаника (Внутренний Угол) +Outer Desert Sandstone Stair=Угловая Ступень Из Пустынного Песчаника (Внешний Угол) +Desert Sandstone Slab=Плита Из Пустынного Песчаника +Desert Sandstone Brick Stair=Ступень Из Кирпичей Пустынного Песчаника +Inner Desert Sandstone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Песчаника (Внутренний Угол) +Outer Desert Sandstone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Песчаника (Внешний Угол) +Desert Sandstone Brick Slab=Плита Из Кирпичей Пустынного Песчаника +Desert Sandstone Block Stair=Ступень Из Пустынного Песчаникового Блока +Inner Desert Sandstone Block Stair=Угловая Ступень Из Пустынного Песчаникового Блока (Внутренний Угол) +Outer Desert Sandstone Block Stair=Угловая Ступень Из Пустынного Песчаникового Блока (Внешний Угол) +Desert Sandstone Block Slab=Плита Из Пустынного Песчаникового Блока +Silver Sandstone Stair=Ступень Из Серебрянного Песчаника +Inner Silver Sandstone Stair=Угловая Ступень Из Серебряного Песчаника (Внутренний Угол) +Outer Silver Sandstone Stair=Угловая Ступень Из Серебряного Песчаника (Внешний Угол) +Silver Sandstone Slab=Плита Из Серебряного Песчаника +Silver Sandstone Brick Stair=Ступень Из Кирпичей Серебряного Песчаника +Inner Silver Sandstone Brick Stair=Угловая Ступень Из Кирпичей Серебряного Песчаника (Внутренний Угол) +Outer Silver Sandstone Brick Stair=Угловая Ступень Из Кирпичей Серебряного Песчаника (Внешний Угол) +Silver Sandstone Brick Slab=Плита Из Кирпичей Серебряного Песчаника +Silver Sandstone Block Stair=Ступень Из Серебряного Песчаникового Блока +Inner Silver Sandstone Block Stair=Угловая Ступень Из Серебряного Песчаникового Блока (Внутренний Угол) +Outer Silver Sandstone Block Stair=Угловая Ступень Из Серебряного Песчаникового Блока (Внешний Угол) +Silver Sandstone Block Slab=Плита Из Серебряного Песчаникового Блока +Obsidian Stair=Обсидиановая Ступень +Inner Obsidian Stair=Угловая Обсидиановая Ступень (Внутренний Угол) +Outer Obsidian Stair=Угловая Обсидиановая Ступень (Внешний Угол) +Obsidian Slab=Обсидиановая Плита +Obsidian Brick Stair=Ступень Из Обсидиановых Кирпичей +Inner Obsidian Brick Stair=Угловая Ступень Из Обсидиановых Кирпичей (Внутренний Угол) +Outer Obsidian Brick Stair=Угловая Ступень Из Обсидиановых Кирпичей (Внешний Угол) +Obsidian Brick Slab=Плита Из Обсидиановых Кирпичей +Obsidian Block Stair=Ступень Из Обсидианового Блока +Inner Obsidian Block Stair=Угловая Ступень Из Обсидианового Блока (Внутренний Угол) +Outer Obsidian Block Stair=Угловая Ступень Из Обсидианового Блока (Внешний Угол) +Obsidian Block Slab=Плита Из Обсидианового Блока +Brick Stair=Ступень Из Кирпичей +Inner Brick Stair=Угловая Ступень Из Кирпичей (Внутренний Угол) +Outer Brick Stair=Угловая Ступень Из Кирпичей (Внешний Угол) +Brick Slab=Плита Из Кирпичей +Steel Block Stair=Ступень Из Стального Блока +Inner Steel Block Stair=Угловая Ступень Из Стального Блока (Внутренний Угол) +Outer Steel Block Stair=Угловая Ступень Из Стального Блока (Внешний Угол) +Steel Block Slab=Плита Из Стального Блока +Tin Block Stair=Ступень Из Оловянного Блока +Inner Tin Block Stair=Угловая Ступень Из Оловянного Блока (Внутренний Угол) +Outer Tin Block Stair=Угловая Ступень Из Оловянного Блока (Внешний Угол) +Tin Block Slab=Плита Из Оловянного Блока +Copper Block Stair=Ступень Из Медного Блока +Inner Copper Block Stair=Угловая Ступень Из Медного Блока (Внутренний Угол) +Outer Copper Block Stair=Угловая Ступень Из Медного Блока (Внешний Угол) +Copper Block Slab=Плита Из Медного Блока +Bronze Block Stair=Ступень Из Бронзового Блока +Inner Bronze Block Stair=Угловая Ступень Из Бронзового Блока (Внутренний Угол) +Outer Bronze Block Stair=Угловая Ступень Из Бронзового Блока (Внешний Угол) +Bronze Block Slab=Плита Из Бронзового Блока +Gold Block Stair=Ступень Из Золотого Блока +Inner Gold Block Stair=Угловая Ступень Из Золотого Блока (Внутренний Угол) +Outer Gold Block Stair=Угловая Ступень Из Золотого Блока (Внешний Угол) +Gold Block Slab=Плита Из Золотого Блока +Ice Stair=Ледяная Ступень +Inner Ice Stair=Угловая Ледяная Ступень (Внутренний Угол) +Outer Ice Stair=Угловая Ледяная Ступень (Внешний Угол) +Ice Slab=Ледяная Плита +Snow Block Stair=Ступень Из Снежного Блока +Inner Snow Block Stair=Угловая Ступень Из Снежного Блока (Внутренний Угол) +Outer Snow Block Stair=Угловая Ступень Из Снежного Блока (Внешний Угол) +Snow Block Slab=Плита Из Снежного Блока diff --git a/mods/stairs/locale/stairs.se.tr b/mods/stairs/locale/stairs.se.tr new file mode 100644 index 0000000..0bc0bbc --- /dev/null +++ b/mods/stairs/locale/stairs.se.tr @@ -0,0 +1,144 @@ +# textdomain: stairs +Glass Stair=Glastrappa +Glass Slab=Glasplatta +Inner Glass Stair=Inre glasstrappa +Outer Glass Stair=Yttre glasstrappa +Obsidian Glass Stair=Obsidian Glass Trappa +Obsidian Glass Slab=Obsidian glasplatta +Inner Obsidian Glass Stair=Inre Obsidian Glass Trappa +Outer Obsidian Glass Stair=Yttre Obsidian Glass Trappa +Wooden Stair=Trätrappa +Inner Wooden Stair=Inre trätrappa +Outer Wooden Stair=Yttre trätrappa +Wooden Slab=Träplatta +Jungle Wood Stair=Jungle Wood Stair +Inner Jungle Wood Stair=Inre Jungle Wood Stair +Outer Jungle Wood Stair=Ytter Jungle Wood Stair +Jungle Wood Slab=Jungle Wood Platta +Pine Wood Stair=Pine Wood Stair +Inner Pine Wood Stair=Inre tall trä trappa +Outer Pine Wood Stair=Ytter tall Trätrappa +Pine Wood Slab=Tallskiva +Acacia Wood Stair=Acacia Wood Stair +Inner Acacia Wood Stair=Inre Acacia Trätrappa +Outer Acacia Wood Stair=Yttre Acacia Trätrappa +Acacia Wood Slab=Acacia träplatta +Aspen Wood Stair=Asp Trä Stair +Inner Aspen Wood Stair=Inre Aspen Trätrappa +Outer Aspen Wood Stair=Yttre Aspen Trätrappa +Aspen Wood Slab=Asp Trä Platta +Stone Stair=Stentrappa +Inner Stone Stair=Inre stentrappa +Outer Stone Stair=Yttre stentrappa +Stone Slab=Stenplatta +Cobblestone Stair=Kullersten trappa +Inner Cobblestone Stair=Inre kullerstensTrappa +Outer Cobblestone Stair=Yttre kullerstensTrappa +Cobblestone Slab=Kullerstenplatta +Mossy Cobblestone Stair=Mossig kullerstensTrappa +Inner Mossy Cobblestone Stair=Inre mossiga kullerstensTrappa +Outer Mossy Cobblestone Stair=Yttre mossiga kullerstensTrappa +Mossy Cobblestone Slab=Mossig kullerstenplatta +Stone Brick Stair=Sten Brick Trappa +Inner Stone Brick Stair=Inre sten tegel trappa +Outer Stone Brick Stair=Yttre sten tegel trappa +Stone Brick Slab=Sten tegelplatta +Stone Block Stair=Sten Block Trappa +Inner Stone Block Stair=Inre stenblock trappa +Outer Stone Block Stair=Yttre stenblock trappa +Stone Block Slab=Stenblockplatta +Desert Stone Stair=Öken Sten Trappa +Inner Desert Stone Stair=Inre Öken Sten Stair +Outer Desert Stone Stair=Outer Öken Sten Stair +Desert Stone Slab=Öken Sten Platta +Desert Cobblestone Stair=Öken Kullersten Trappa +Inner Desert Cobblestone Stair=Inre Öken Kullersten Trappa +Outer Desert Cobblestone Stair=Outer Öken Kullersten Trappa +Desert Cobblestone Slab=Öken Kullersten Platta +Desert Stone Brick Stair=Öken Sten Brick Trappa +Inner Desert Stone Brick Stair=Inre Öken Sten Brick Trappa +Outer Desert Stone Brick Stair=Outer Öken Sten Brick Trappa +Desert Stone Brick Slab=Öken Sten tegelplatta +Desert Stone Block Stair=Öken Sten Block Trappa +Inner Desert Stone Block Stair=Inre Öken Sten Block Stair +Outer Desert Stone Block Stair=Outer Öken Sten Block Trappa +Desert Stone Block Slab=Öken Sten Block Platta +Sandstone Stair=Sandstenstrappa +Inner Sandstone Stair=Inre Sandstenstrappa +Outer Sandstone Stair=Yttre Sandstenstrappa +Sandstone Slab=Sandstenplatta +Sandstone Brick Stair=Sandsten tegel trappa +Inner Sandstone Brick Stair=Inre Sandsten tegel trappa +Outer Sandstone Brick Stair=Yttre Sandsten tegel trappa +Sandstone Brick Slab=Sandsten tegelplatta +Sandstone Block Stair=Sandsten block trappa +Inner Sandstone Block Stair=Inre Sandsten block trappa +Outer Sandstone Block Stair=Yttre Sandsten block trappa +Sandstone Block Slab=Sandsten Block Platta +Desert Sandstone Stair=Öken Sandsten Trappa +Inner Desert Sandstone Stair=Inre Öken Sandsten Trappa +Outer Desert Sandstone Stair=Outer Öken Sandsten Trappa +Desert Sandstone Slab=Öken Sandsten Platta +Desert Sandstone Brick Stair=Öken Sandsten Brick Trappa +Inner Desert Sandstone Brick Stair=Inre Öken Sandsten Brick Trappa +Outer Desert Sandstone Brick Stair=Outer Öken Sandsten Brick Trappa +Desert Sandstone Brick Slab=Öken Sandsten Tegelplatta +Desert Sandstone Block Stair=Öken Sandsten Block Trappa +Inner Desert Sandstone Block Stair=Inre Öken Sandsten Block Trappa +Outer Desert Sandstone Block Stair=Outer Öken Sandsten Block Trappa +Desert Sandstone Block Slab=Öken Sandsten Block Platta +Silver Sandstone Stair=Silver Sandsten trappa +Inner Silver Sandstone Stair=Inre silver Sandsten trappa +Outer Silver Sandstone Stair=Yttre silver Sandsten trappa +Silver Sandstone Slab=Silver Sandsten platta +Silver Sandstone Brick Stair=Silver Sandsten tegel trappa +Inner Silver Sandstone Brick Stair=Inre silver Sandsten tegel trappa +Outer Silver Sandstone Brick Stair=Yttre silver Sandsten tegel trappa +Silver Sandstone Brick Slab=Silver Sandsten tegelplatta +Silver Sandstone Block Stair=Silver Sandsten block trappa +Inner Silver Sandstone Block Stair=Inre silver Sandsten block trappa +Outer Silver Sandstone Block Stair=Yttre silver Sandsten block trappa +Silver Sandstone Block Slab=Silver Sandsten block platta +Obsidian Stair=Obsidian Trappa +Inner Obsidian Stair=Inre Obsidian Trappa +Outer Obsidian Stair=Yttre Obsidian Trappa +Obsidian Slab=Obsidian Platta +Obsidian Brick Stair=Obsidian Brick Stair +Inner Obsidian Brick Stair=Inre Obsidian Brick Trappa +Outer Obsidian Brick Stair=Yttre Obsidian Brick Trappa +Obsidian Brick Slab=Obsidian tegelplatta +Obsidian Block Stair=Obsidian Block Stair +Inner Obsidian Block Stair=Inre Obsidian Block Trappa +Outer Obsidian Block Stair=Yttre Obsidian Block Trappa +Obsidian Block Slab=Obsidian Block Slab +Brick Stair=Tegel trappa +Inner Brick Stair=Inre tegel trappa +Outer Brick Stair=Yttre tegel trappa +Brick Slab=Tegelplatta +Steel Block Stair=Stålblock trappa +Inner Steel Block Stair=Inre stålblock trappa +Outer Steel Block Stair=Yttre stålblocktrappa +Steel Block Slab=Stålblockplatta +Tin Block Stair=Tinn Block Trappa +Inner Tin Block Stair=Inre tennblock trappa +Outer Tin Block Stair=Yttre tennblock trappa +Tin Block Slab=Tennblockplatta +Copper Block Stair=Kopparblock trappa +Inner Copper Block Stair=Inre kopparblock trappa +Outer Copper Block Stair=Yttre kopparblock trappa +Copper Block Slab=Kopparblockplatta +Bronze Block Stair=Bronze Block Trappa +Inner Bronze Block Stair=Inre bronsblock trappa +Outer Bronze Block Stair=Yttre bronsblock trappa +Bronze Block Slab=Bronsblockplatta +Gold Block Stair=Guldblockstrappa +Inner Gold Block Stair=Inre guldblock trappa +Outer Gold Block Stair=Yttre guldblock trappa +Gold Block Slab=Guldblockplatta +Ice Stair=Ice Stair +Inner Ice Stair=Inre istrappa +Outer Ice Stair=Yttre istrappa +Ice Slab=Isplatta +Snow Block Stair=Snow Block Stair +Inner Snow Block Stair=Inre snöblock trappa +Outer Snow Block Stair=Yttre snöblock trappa \ No newline at end of file diff --git a/mods/stairs/locale/stairs.sk.tr b/mods/stairs/locale/stairs.sk.tr new file mode 100644 index 0000000..b006fdb --- /dev/null +++ b/mods/stairs/locale/stairs.sk.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Sklenené schod +Glass Slab=Sklenený stupienok +Inner Glass Stair=Vnútorný sklenené schod +Outer Glass Stair=Vonkajší sklenené schod +Obsidian Glass Stair=Obsidiánové sklenené schod +Obsidian Glass Slab=Obsidiánový sklenený stupienok +Inner Obsidian Glass Stair=Vnútorný obsidiánové sklenené schod +Outer Obsidian Glass Stair=Vonkajší obsidiánové sklenené schod +Wooden Stair=Drevené schod +Inner Wooden Stair=Vnútorný drevené schod +Outer Wooden Stair=Vonkajší drevené schod +Wooden Slab=Drevený stupienok +Jungle Wood Stair=Drevené schod z džungľového dreva +Inner Jungle Wood Stair=Vnútorný drevené schod z džungľového dreva +Outer Jungle Wood Stair=Vonkajší drevené schod z džungľového dreva +Jungle Wood Slab=Stupienok z džungľového dreva +Pine Wood Stair=Drevené schod z borovicového dreva +Inner Pine Wood Stair=Vnútorný drevené schod z borovicového dreva +Outer Pine Wood Stair=Vonkajší drevené schod z borovicového dreva +Pine Wood Slab=Stupienok z borovicového dreva +Acacia Wood Stair=Drevené schod z akáciového dreva +Inner Acacia Wood Stair=Vnútorný drevené schod z akáciového dreva +Outer Acacia Wood Stair=Vonkajší drevené schod z akáciového dreva +Acacia Wood Slab=Stupienok z akáciového dreva +Aspen Wood Stair=Drevené schod z osiky +Inner Aspen Wood Stair=Vnútorný drevené schod z osiky +Outer Aspen Wood Stair=Vonkajší drevené schod z osiky +Aspen Wood Slab=Stupienok z osiky +Stone Stair=Kamenné schod +Inner Stone Stair=Vnútorný kamenné schod +Outer Stone Stair=Vonkajší kamenné schod +Stone Slab=Kamenný stupienok +Cobblestone Stair=Schod z dlažbového kameňa +Inner Cobblestone Stair=Vnútorný schod z dlažbového kameňa +Outer Cobblestone Stair=Vonkajší schod z dlažbového kameňa +Cobblestone Slab=Stupienok z dlažbového kameňa +Mossy Cobblestone Stair=Schod dlažbového kameňa obrastené machom +Inner Mossy Cobblestone Stair=Vnútorný schod dlažbového kameňa obrastené machom +Outer Mossy Cobblestone Stair=Vonkajší schod dlažbového kameňa obrastené machom +Mossy Cobblestone Slab=Stupienok z dlažbového kameňa obrastený machom +Stone Brick Stair=Schod z kamenných tehál +Inner Stone Brick Stair=Vnútorný schod z kamenných tehál +Outer Stone Brick Stair=Vonkajší schod z kamenných tehál +Stone Brick Slab=Stupienok z kamenných tehál +Stone Block Stair=Schod z kameňa +Inner Stone Block Stair=Vnútorný schod z kameňa +Outer Stone Block Stair=Vonkajší schod z kameňa +Stone Block Slab=Stupienok z kameňa +Desert Stone Stair=Schod z púštneho kameňa +Inner Desert Stone Stair=Vnútorný schod z púštneho kameňa +Outer Desert Stone Stair=Vonkajší schod z púštneho kameňa +Desert Stone Slab=Stupienok z púštneho kameňa +Desert Cobblestone Stair=Schod z púštneho dlažbového kameňa +Inner Desert Cobblestone Stair=Vnútorný schod z púštneho dlažbového kameňa +Outer Desert Cobblestone Stair=Vonkajší schod z púštneho dlažbového kameňa +Desert Cobblestone Slab=Stupienok z púštneho dlažbového kameňa +Desert Stone Brick Stair=Schod z tehiel z púštneho kameňa +Inner Desert Stone Brick Stair=Vnútorný schod z tehiel z púštneho kameňa +Outer Desert Stone Brick Stair=Vonkajší schod z tehiel z púštneho kameňa +Desert Stone Brick Slab=Stupienok z tehiel z púštneho kameňa +Desert Stone Block Stair=Schod z blokov púštneho kameňa +Inner Desert Stone Block Stair=Vnútorný schod z blokov púštneho kameňa +Outer Desert Stone Block Stair=Vonkajší schod z blokov púštneho kameňa +Desert Stone Block Slab=Stupienok z blokov púštneho kameňa +Sandstone Stair=Schod z pieskovca +Inner Sandstone Stair=Vnútorný schod z pieskovca +Outer Sandstone Stair=Vonkajší schod z pieskovca +Sandstone Slab=Stupienok z pieskovca +Sandstone Brick Stair=Schod z tehál pieskovca +Inner Sandstone Brick Stair=Vnútorný schod z tehál pieskovca +Outer Sandstone Brick Stair=Vonkajší schod z tehál pieskovca +Sandstone Brick Slab=Stupienok z tehál pieskovca +Sandstone Block Stair=Schod z blokov pieskovca +Inner Sandstone Block Stair=Vnútorný schod z blokov pieskovca +Outer Sandstone Block Stair=Vonkajší schod z blokov pieskovca +Sandstone Block Slab=Stupienok z blokov pieskovca +Desert Sandstone Stair=Schod z púštneho pieskovca +Inner Desert Sandstone Stair=Vnútorný schod z púštneho pieskovca +Outer Desert Sandstone Stair=Vonkajší schod z púštneho pieskovca +Desert Sandstone Slab=Stupienok z púštneho pieskovca +Desert Sandstone Brick Stair=Schod z tehál z púštneho pieskovca +Inner Desert Sandstone Brick Stair=Vnútorný schod z tehál z púštneho pieskovca +Outer Desert Sandstone Brick Stair=Vonkajší schod z tehál z púštneho pieskovca +Desert Sandstone Brick Slab=Stupienok z tehál z púštneho pieskovca +Desert Sandstone Block Stair=Schod z blokov púštneho pieskovca +Inner Desert Sandstone Block Stair=Vnútorný schod z blokov púštneho pieskovca +Outer Desert Sandstone Block Stair=Vonkajší schod z blokov púštneho pieskovca +Desert Sandstone Block Slab=Stupienok z blokov púštneho pieskovca +Silver Sandstone Stair=Schod zo strieborného pieskovca +Inner Silver Sandstone Stair=Vnútorný schod zo strieborného pieskovca +Outer Silver Sandstone Stair=Vonkajší schod zo strieborného pieskovca +Silver Sandstone Slab=Stupienok zo strieborného pieskovca +Silver Sandstone Brick Stair=Schod z tehál zo strieborného pieskovca +Inner Silver Sandstone Brick Stair=Vnútorný schod z tehál zo strieborného pieskovca +Outer Silver Sandstone Brick Stair=Vonkajší schod z tehál zo strieborného pieskovca +Silver Sandstone Brick Slab=Stupienok z tehál zo strieborného pieskovca +Silver Sandstone Block Stair=Schod z blokov strieborného pieskovca +Inner Silver Sandstone Block Stair=Vnútorný schod z blokov strieborného pieskovca +Outer Silver Sandstone Block Stair=Vonkajší schod z blokov strieborného pieskovca +Silver Sandstone Block Slab=Stupienok z blokov strieborného pieskovca +Obsidian Stair=Schod z obsidiánu +Inner Obsidian Stair=Vnútorný schod z obsidiánu +Outer Obsidian Stair=Vonkajší schod z obsidiánu +Obsidian Slab=Stupienok z obsidiánu +Obsidian Brick Stair=Schod z tehál obsidiánu +Inner Obsidian Brick Stair=Vnútorný schod z tehál obsidiánu +Outer Obsidian Brick Stair=Vonkajší schod z tehál obsidiánu +Obsidian Brick Slab=Stupienok z tehál obsidiánu +Obsidian Block Stair=Schod z bloku obsidiánu +Inner Obsidian Block Stair=Vnútorný schod z bloku obsidiánu +Outer Obsidian Block Stair=Vonkajší schod z bloku obsidiánu +Obsidian Block Slab=Stupienok z bloku obsidiánu +Brick Stair=Schod z tehál +Inner Brick Stair=Vnútorný schod z tehál +Outer Brick Stair=Vonkajší schod z tehál +Brick Slab=Stupienok z tehál +Steel Block Stair=Oceľový schod +Inner Steel Block Stair=Vnútorný oceľový schod +Outer Steel Block Stair=Vonkajší oceľový schod +Steel Block Slab=Oceľový stupienok +Tin Block Stair=Cínový schod +Inner Tin Block Stair=Vnútorný cínový schod +Outer Tin Block Stair=Vonkajší cínový schod +Tin Block Slab=Cínový stupienok +Copper Block Stair=Medený schod +Inner Copper Block Stair=Vnútorný medený schod +Outer Copper Block Stair=Vonkajší medený schod +Copper Block Slab=Medený stupienok +Bronze Block Stair=Bronzový schod +Inner Bronze Block Stair=Vnútorný bronzový schod +Outer Bronze Block Stair=Vonkajší bronzový schod +Bronze Block Slab=Bronzový stupienok +Gold Block Stair=Zlatý schod +Inner Gold Block Stair=Vnútorný zlatý schod +Outer Gold Block Stair=Vonkajší zlatý schod +Gold Block Slab=Zlatý stupienok +Ice Stair=Ľadový schod +Inner Ice Stair=Vnútorný ľadový schod +Outer Ice Stair=Vonkajší ľadový schod +Ice Slab=Ľadový stupienok +Snow Block Stair=Snehový schod +Inner Snow Block Stair=Vnútorný snehový schod +Outer Snow Block Stair=Vonkajší snehový schod +Snow Block Slab=Snehový stupienok diff --git a/mods/stairs/locale/stairs.zh_CN.tr b/mods/stairs/locale/stairs.zh_CN.tr new file mode 100644 index 0000000..060ccaf --- /dev/null +++ b/mods/stairs/locale/stairs.zh_CN.tr @@ -0,0 +1,149 @@ +# textdomain: stairs +Glass Stair=玻璃楼梯 +Glass Slab=玻璃台阶 +Inner Glass Stair=玻璃楼梯(内) +Outer Glass Stair=玻璃楼梯(外) +Obsidian Glass Stair=黑曜石玻璃楼梯 +Obsidian Glass Slab=黑曜石玻璃台阶 +Inner Obsidian Glass Stair=黑曜石玻璃楼梯(内) +Outer Obsidian Glass Stair=黑曜石玻璃楼梯(外) +Wooden Stair=木制楼梯 +Inner Wooden Stair=木楼梯(内) +Outer Wooden Stair=木楼梯(外) +Wooden Slab=木制台阶 +Jungle Wood Stair=丛林木楼梯 +Inner Jungle Wood Stair=丛林木楼梯(内) +Outer Jungle Wood Stair=丛林木楼梯(外) +Jungle Wood Slab=丛林木台阶 +Pine Wood Stair=松木楼梯 +Inner Pine Wood Stair=松木楼梯(内) +Outer Pine Wood Stair=松木楼梯(外) +Pine Wood Slab=松木台阶 +Acacia Wood Stair=金合欢木楼梯 +Inner Acacia Wood Stair=金合欢木楼梯(内) +Outer Acacia Wood Stair=金合欢木楼梯(外) +Acacia Wood Slab=金合欢木台阶 +Aspen Wood Stair=白杨木楼梯 +Inner Aspen Wood Stair=白杨木楼梯(内) +Outer Aspen Wood Stair=白杨木楼梯(外) +Aspen Wood Slab=白杨木台阶 +Blue Stained Stair=蓝木楼梯 +Inner Blue Stained Stair=蓝木楼梯(内) +Outer Blue Stained Stair=蓝木楼梯(外) +Blue Stained Slab=蓝木台阶 +Stone Stair=石楼梯 +Inner Stone Stair=石楼梯(内) +Outer Stone Stair=石楼梯(外) +Stone Slab=石台阶 +Cobblestone Stair=圆石楼梯 +Inner Cobblestone Stair=圆石楼梯(内) +Outer Cobblestone Stair=圆石楼梯(外) +Cobblestone Slab=圆石台阶 +Mossy Cobblestone Stair=苔石楼梯 +Inner Mossy Cobblestone Stair=苔石楼梯(内) +Outer Mossy Cobblestone Stair=苔石楼梯(外) +Mossy Cobblestone Slab=苔石台阶 +Stone Brick Stair=石砖楼梯 +Inner Stone Brick Stair=石砖楼梯(内) +Outer Stone Brick Stair=石砖楼梯(外) +Stone Brick Slab=石砖台阶 +Stone Block Stair=石块楼梯 +Inner Stone Block Stair=石块楼梯(内) +Outer Stone Block Stair=石块楼梯(外) +Stone Block Slab=石块台阶 +Desert Stone Stair=沙漠石楼梯 +Inner Desert Stone Stair=沙漠石楼梯(内) +Outer Desert Stone Stair=沙漠石楼梯(外) +Desert Stone Slab=沙漠石台阶 +Desert Cobblestone Stair=沙漠圆石楼梯 +Inner Desert Cobblestone Stair=沙漠圆石楼梯(内) +Outer Desert Cobblestone Stair=沙漠圆石楼梯(外) +Desert Cobblestone Slab=沙漠圆石台阶 +Desert Stone Brick Stair=沙漠石砖楼梯 +Inner Desert Stone Brick Stair=沙漠石砖楼梯(内) +Outer Desert Stone Brick Stair=沙漠石砖楼梯(外) +Desert Stone Brick Slab=沙漠石砖台阶 +Desert Stone Block Stair=沙漠石块楼梯 +Inner Desert Stone Block Stair=沙漠石块楼梯(内) +Outer Desert Stone Block Stair=沙漠石块楼梯(外) +Desert Stone Block Slab=沙漠石块台阶 +Sandstone Stair=沙石楼梯 +Inner Sandstone Stair=沙石楼梯(内) +Outer Sandstone Stair=沙石楼梯(外) +Sandstone Slab=沙石台阶 +Sandstone Brick Stair=沙石砖楼梯 +Inner Sandstone Brick Stair=沙石砖楼梯(内) +Outer Sandstone Brick Stair=沙石砖楼梯(外) +Sandstone Brick Slab=沙石砖台阶 +Sandstone Block Stair=沙石块楼梯 +Inner Sandstone Block Stair=沙石块楼梯(内) +Outer Sandstone Block Stair=沙石块楼梯(外) +Sandstone Block Slab=沙石块台阶 +Desert Sandstone Stair=沙漠沙石楼梯 +Inner Desert Sandstone Stair=沙漠沙石楼梯(内) +Outer Desert Sandstone Stair=沙漠沙石楼梯(外) +Desert Sandstone Slab=沙漠沙石台阶 +Desert Sandstone Brick Stair=沙漠沙石砖楼梯 +Inner Desert Sandstone Brick Stair=沙漠沙石砖楼梯(内) +Outer Desert Sandstone Brick Stair=沙漠沙石砖楼梯(外) +Desert Sandstone Brick Slab=沙漠沙石砖台阶 +Desert Sandstone Block Stair=沙漠沙石块楼梯 +Inner Desert Sandstone Block Stair=沙漠沙石块楼梯(内) +Outer Desert Sandstone Block Stair=沙漠沙石块楼梯(外) +Desert Sandstone Block Slab=沙漠沙石块台阶 +Silver Sandstone Stair=银沙石楼梯 +Inner Silver Sandstone Stair=银沙石楼梯(内) +Outer Silver Sandstone Stair=银沙石楼梯(外) +Silver Sandstone Slab=银沙石台阶 +Silver Sandstone Brick Stair=银沙石砖楼梯 +Inner Silver Sandstone Brick Stair=银沙石砖楼梯(内) +Outer Silver Sandstone Brick Stair=银沙石砖楼梯(外) +Silver Sandstone Brick Slab=银沙石砖台阶 +Silver Sandstone Block Stair=银沙石块楼梯 +Inner Silver Sandstone Block Stair=银沙石块楼梯(内) +Outer Silver Sandstone Block Stair=银沙石块楼梯(外) +Silver Sandstone Block Slab=银沙石块台阶 +Obsidian Stair=黑曜石楼梯 +Inner Obsidian Stair=黑曜石楼梯(内) +Outer Obsidian Stair=黑曜石楼梯(外) +Obsidian Slab=黑曜石台阶 +Obsidian Brick Stair=黑曜石砖楼梯 +Inner Obsidian Brick Stair=黑曜石砖楼梯(内) +Outer Obsidian Brick Stair=黑曜石砖楼梯(外) +Obsidian Brick Slab=黑曜石砖台阶 +Obsidian Block Stair=黑曜石块楼梯 +Inner Obsidian Block Stair=黑曜石块楼梯(内) +Outer Obsidian Block Stair=黑曜石块楼梯(外) +Obsidian Block Slab=黑曜石块台阶 +Brick Stair=砖楼梯 +Inner Brick Stair=砖楼梯(内) +Outer Brick Stair=砖楼梯(外) +Brick Slab=砖制台阶 +Steel Block Stair=铁块楼梯 +Inner Steel Block Stair=铁块楼梯(内) +Outer Steel Block Stair=铁块楼梯(外) +Steel Block Slab=铁块台阶 +Tin Block Stair=锡块楼梯 +Inner Tin Block Stair=锡块楼梯(内) +Outer Tin Block Stair=锡块楼梯(外) +Tin Block Slab=锡块台阶 +Copper Block Stair=铜块楼梯 +Inner Copper Block Stair=铜块楼梯(内) +Outer Copper Block Stair=铜块楼梯(外) +Copper Block Slab=铜块台阶 +Bronze Block Stair=青铜块楼梯 +Inner Bronze Block Stair=青铜块楼梯(内) +Outer Bronze Block Stair=青铜块楼梯(外) +Bronze Block Slab=青铜块台阶 +Gold Block Stair=金块楼梯 +Inner Gold Block Stair=金块楼梯(内) +Outer Gold Block Stair=金块楼梯(外) +Gold Block Slab=金块台阶 +Ice Stair=冰阶梯 +Inner Ice Stair=冰块楼梯(内) +Outer Ice Stair=冰块楼梯(外) +Ice Slab=冰台阶 +Snow Block Stair=雪块楼梯 +Inner Snow Block Stair=雪块楼梯(内) +Outer Snow Block Stair=雪块楼梯(外) +Snow Block Slab=雪块台阶 diff --git a/mods/stairs/locale/stairs.zh_TW.tr b/mods/stairs/locale/stairs.zh_TW.tr new file mode 100644 index 0000000..00c43e2 --- /dev/null +++ b/mods/stairs/locale/stairs.zh_TW.tr @@ -0,0 +1,149 @@ +# textdomain: stairs +Glass Stair=玻璃樓梯 +Glass Slab=玻璃臺階 +Inner Glass Stair=玻璃樓梯(內) +Outer Glass Stair=玻璃樓梯(外) +Obsidian Glass Stair=黑曜石玻璃樓梯 +Obsidian Glass Slab=黑曜石玻璃臺階 +Inner Obsidian Glass Stair=黑曜石玻璃樓梯(內) +Outer Obsidian Glass Stair=黑曜石玻璃樓梯(外) +Wooden Stair=木製樓梯 +Inner Wooden Stair=木樓梯(內) +Outer Wooden Stair=木樓梯(外) +Wooden Slab=木製臺階 +Jungle Wood Stair=叢林木樓梯 +Inner Jungle Wood Stair=叢林木樓梯(內) +Outer Jungle Wood Stair=叢林木樓梯(外) +Jungle Wood Slab=叢林木臺階 +Pine Wood Stair=松木樓梯 +Inner Pine Wood Stair=松木樓梯(內) +Outer Pine Wood Stair=松木樓梯(外) +Pine Wood Slab=松木臺階 +Acacia Wood Stair=金合歡木樓梯 +Inner Acacia Wood Stair=金合歡木樓梯(內) +Outer Acacia Wood Stair=金合歡木樓梯(外) +Acacia Wood Slab=金合歡木臺階 +Aspen Wood Stair=白楊木樓梯 +Inner Aspen Wood Stair=白楊木樓梯(內) +Outer Aspen Wood Stair=白楊木樓梯(外) +Aspen Wood Slab=白楊木臺階 +Blue Stained Stair=藍木樓梯 +Inner Blue Stained Stair=藍木樓梯(內) +Outer Blue Stained Stair=藍木樓梯(外) +Blue Stained Slab=藍木臺階 +Stone Stair=石樓梯 +Inner Stone Stair=石樓梯(內) +Outer Stone Stair=石樓梯(外) +Stone Slab=石臺階 +Cobblestone Stair=圓石樓梯 +Inner Cobblestone Stair=圓石樓梯(內) +Outer Cobblestone Stair=圓石樓梯(外) +Cobblestone Slab=圓石臺階 +Mossy Cobblestone Stair=苔石樓梯 +Inner Mossy Cobblestone Stair=苔石樓梯(內) +Outer Mossy Cobblestone Stair=苔石樓梯(外) +Mossy Cobblestone Slab=苔石臺階 +Stone Brick Stair=石磚樓梯 +Inner Stone Brick Stair=石磚樓梯(內) +Outer Stone Brick Stair=石磚樓梯(外) +Stone Brick Slab=石磚臺階 +Stone Block Stair=石塊樓梯 +Inner Stone Block Stair=石塊樓梯(內) +Outer Stone Block Stair=石塊樓梯(外) +Stone Block Slab=石塊臺階 +Desert Stone Stair=沙漠石樓梯 +Inner Desert Stone Stair=沙漠石樓梯(內) +Outer Desert Stone Stair=沙漠石樓梯(外) +Desert Stone Slab=沙漠石臺階 +Desert Cobblestone Stair=沙漠圓石樓梯 +Inner Desert Cobblestone Stair=沙漠圓石樓梯(內) +Outer Desert Cobblestone Stair=沙漠圓石樓梯(外) +Desert Cobblestone Slab=沙漠圓石臺階 +Desert Stone Brick Stair=沙漠石磚樓梯 +Inner Desert Stone Brick Stair=沙漠石磚樓梯(內) +Outer Desert Stone Brick Stair=沙漠石磚樓梯(外) +Desert Stone Brick Slab=沙漠石磚臺階 +Desert Stone Block Stair=沙漠石塊樓梯 +Inner Desert Stone Block Stair=沙漠石塊樓梯(內) +Outer Desert Stone Block Stair=沙漠石塊樓梯(外) +Desert Stone Block Slab=沙漠石塊臺階 +Sandstone Stair=沙石樓梯 +Inner Sandstone Stair=沙石樓梯(內) +Outer Sandstone Stair=沙石樓梯(外) +Sandstone Slab=沙石臺階 +Sandstone Brick Stair=沙石磚樓梯 +Inner Sandstone Brick Stair=沙石磚樓梯(內) +Outer Sandstone Brick Stair=沙石磚樓梯(外) +Sandstone Brick Slab=沙石磚臺階 +Sandstone Block Stair=沙石塊樓梯 +Inner Sandstone Block Stair=沙石塊樓梯(內) +Outer Sandstone Block Stair=沙石塊樓梯(外) +Sandstone Block Slab=沙石塊臺階 +Desert Sandstone Stair=沙漠沙石樓梯 +Inner Desert Sandstone Stair=沙漠沙石樓梯(內) +Outer Desert Sandstone Stair=沙漠沙石樓梯(外) +Desert Sandstone Slab=沙漠沙石臺階 +Desert Sandstone Brick Stair=沙漠沙石磚樓梯 +Inner Desert Sandstone Brick Stair=沙漠沙石磚樓梯(內) +Outer Desert Sandstone Brick Stair=沙漠沙石磚樓梯(外) +Desert Sandstone Brick Slab=沙漠沙石磚臺階 +Desert Sandstone Block Stair=沙漠沙石塊樓梯 +Inner Desert Sandstone Block Stair=沙漠沙石塊樓梯(內) +Outer Desert Sandstone Block Stair=沙漠沙石塊樓梯(外) +Desert Sandstone Block Slab=沙漠沙石塊臺階 +Silver Sandstone Stair=銀沙石樓梯 +Inner Silver Sandstone Stair=銀沙石樓梯(內) +Outer Silver Sandstone Stair=銀沙石樓梯(外) +Silver Sandstone Slab=銀沙石臺階 +Silver Sandstone Brick Stair=銀沙石磚樓梯 +Inner Silver Sandstone Brick Stair=銀沙石磚樓梯(內) +Outer Silver Sandstone Brick Stair=銀沙石磚樓梯(外) +Silver Sandstone Brick Slab=銀沙石磚臺階 +Silver Sandstone Block Stair=銀沙石塊樓梯 +Inner Silver Sandstone Block Stair=銀沙石塊樓梯(內) +Outer Silver Sandstone Block Stair=銀沙石塊樓梯(外) +Silver Sandstone Block Slab=銀沙石塊臺階 +Obsidian Stair=黑曜石樓梯 +Inner Obsidian Stair=黑曜石樓梯(內) +Outer Obsidian Stair=黑曜石樓梯(外) +Obsidian Slab=黑曜石臺階 +Obsidian Brick Stair=黑曜石磚樓梯 +Inner Obsidian Brick Stair=黑曜石磚樓梯(內) +Outer Obsidian Brick Stair=黑曜石磚樓梯(外) +Obsidian Brick Slab=黑曜石磚臺階 +Obsidian Block Stair=黑曜石塊樓梯 +Inner Obsidian Block Stair=黑曜石塊樓梯(內) +Outer Obsidian Block Stair=黑曜石塊樓梯(外) +Obsidian Block Slab=黑曜石塊臺階 +Brick Stair=磚樓梯 +Inner Brick Stair=磚樓梯(內) +Outer Brick Stair=磚樓梯(外) +Brick Slab=磚制臺階 +Steel Block Stair=鐵塊樓梯 +Inner Steel Block Stair=鐵塊樓梯(內) +Outer Steel Block Stair=鐵塊樓梯(外) +Steel Block Slab=鐵塊臺階 +Tin Block Stair=錫塊樓梯 +Inner Tin Block Stair=錫塊樓梯(內) +Outer Tin Block Stair=錫塊樓梯(外) +Tin Block Slab=錫塊臺階 +Copper Block Stair=銅塊樓梯 +Inner Copper Block Stair=銅塊樓梯(內) +Outer Copper Block Stair=銅塊樓梯(外) +Copper Block Slab=銅塊臺階 +Bronze Block Stair=青銅塊樓梯 +Inner Bronze Block Stair=青銅塊樓梯(內) +Outer Bronze Block Stair=青銅塊樓梯(外) +Bronze Block Slab=青銅塊臺階 +Gold Block Stair=金塊樓梯 +Inner Gold Block Stair=金塊樓梯(內) +Outer Gold Block Stair=金塊樓梯(外) +Gold Block Slab=金塊臺階 +Ice Stair=冰階梯 +Inner Ice Stair=冰塊樓梯(內) +Outer Ice Stair=冰塊樓梯(外) +Ice Slab=冰臺階 +Snow Block Stair=雪塊樓梯 +Inner Snow Block Stair=雪塊樓梯(內) +Outer Snow Block Stair=雪塊樓梯(外) +Snow Block Slab=雪塊臺階 diff --git a/mods/stairs/locale/template.txt b/mods/stairs/locale/template.txt new file mode 100644 index 0000000..ca2c865 --- /dev/null +++ b/mods/stairs/locale/template.txt @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair= +Glass Slab= +Inner Glass Stair= +Outer Glass Stair= +Obsidian Glass Stair= +Obsidian Glass Slab= +Inner Obsidian Glass Stair= +Outer Obsidian Glass Stair= +Wooden Stair= +Inner Wooden Stair= +Outer Wooden Stair= +Wooden Slab= +Jungle Wood Stair= +Inner Jungle Wood Stair= +Outer Jungle Wood Stair= +Jungle Wood Slab= +Pine Wood Stair= +Inner Pine Wood Stair= +Outer Pine Wood Stair= +Pine Wood Slab= +Acacia Wood Stair= +Inner Acacia Wood Stair= +Outer Acacia Wood Stair= +Acacia Wood Slab= +Aspen Wood Stair= +Inner Aspen Wood Stair= +Outer Aspen Wood Stair= +Aspen Wood Slab= +Stone Stair= +Inner Stone Stair= +Outer Stone Stair= +Stone Slab= +Cobblestone Stair= +Inner Cobblestone Stair= +Outer Cobblestone Stair= +Cobblestone Slab= +Mossy Cobblestone Stair= +Inner Mossy Cobblestone Stair= +Outer Mossy Cobblestone Stair= +Mossy Cobblestone Slab= +Stone Brick Stair= +Inner Stone Brick Stair= +Outer Stone Brick Stair= +Stone Brick Slab= +Stone Block Stair= +Inner Stone Block Stair= +Outer Stone Block Stair= +Stone Block Slab= +Desert Stone Stair= +Inner Desert Stone Stair= +Outer Desert Stone Stair= +Desert Stone Slab= +Desert Cobblestone Stair= +Inner Desert Cobblestone Stair= +Outer Desert Cobblestone Stair= +Desert Cobblestone Slab= +Desert Stone Brick Stair= +Inner Desert Stone Brick Stair= +Outer Desert Stone Brick Stair= +Desert Stone Brick Slab= +Desert Stone Block Stair= +Inner Desert Stone Block Stair= +Outer Desert Stone Block Stair= +Desert Stone Block Slab= +Sandstone Stair= +Inner Sandstone Stair= +Outer Sandstone Stair= +Sandstone Slab= +Sandstone Brick Stair= +Inner Sandstone Brick Stair= +Outer Sandstone Brick Stair= +Sandstone Brick Slab= +Sandstone Block Stair= +Inner Sandstone Block Stair= +Outer Sandstone Block Stair= +Sandstone Block Slab= +Desert Sandstone Stair= +Inner Desert Sandstone Stair= +Outer Desert Sandstone Stair= +Desert Sandstone Slab= +Desert Sandstone Brick Stair= +Inner Desert Sandstone Brick Stair= +Outer Desert Sandstone Brick Stair= +Desert Sandstone Brick Slab= +Desert Sandstone Block Stair= +Inner Desert Sandstone Block Stair= +Outer Desert Sandstone Block Stair= +Desert Sandstone Block Slab= +Silver Sandstone Stair= +Inner Silver Sandstone Stair= +Outer Silver Sandstone Stair= +Silver Sandstone Slab= +Silver Sandstone Brick Stair= +Inner Silver Sandstone Brick Stair= +Outer Silver Sandstone Brick Stair= +Silver Sandstone Brick Slab= +Silver Sandstone Block Stair= +Inner Silver Sandstone Block Stair= +Outer Silver Sandstone Block Stair= +Silver Sandstone Block Slab= +Obsidian Stair= +Inner Obsidian Stair= +Outer Obsidian Stair= +Obsidian Slab= +Obsidian Brick Stair= +Inner Obsidian Brick Stair= +Outer Obsidian Brick Stair= +Obsidian Brick Slab= +Obsidian Block Stair= +Inner Obsidian Block Stair= +Outer Obsidian Block Stair= +Obsidian Block Slab= +Brick Stair= +Inner Brick Stair= +Outer Brick Stair= +Brick Slab= +Steel Block Stair= +Inner Steel Block Stair= +Outer Steel Block Stair= +Steel Block Slab= +Tin Block Stair= +Inner Tin Block Stair= +Outer Tin Block Stair= +Tin Block Slab= +Copper Block Stair= +Inner Copper Block Stair= +Outer Copper Block Stair= +Copper Block Slab= +Bronze Block Stair= +Inner Bronze Block Stair= +Outer Bronze Block Stair= +Bronze Block Slab= +Gold Block Stair= +Inner Gold Block Stair= +Outer Gold Block Stair= +Gold Block Slab= +Ice Stair= +Inner Ice Stair= +Outer Ice Stair= +Ice Slab= +Snow Block Stair= +Inner Snow Block Stair= +Outer Snow Block Stair= +Snow Block Slab= diff --git a/mods/stairs/mod.conf b/mods/stairs/mod.conf new file mode 100644 index 0000000..7548fa7 --- /dev/null +++ b/mods/stairs/mod.conf @@ -0,0 +1,3 @@ +name = stairs +description = Minetest Game mod: stairs +depends = default diff --git a/mods/stairs/textures/stairs_glass_outer_stairside.png b/mods/stairs/textures/stairs_glass_outer_stairside.png new file mode 100644 index 0000000..9b298c8 Binary files /dev/null and b/mods/stairs/textures/stairs_glass_outer_stairside.png differ diff --git a/mods/stairs/textures/stairs_glass_split.png b/mods/stairs/textures/stairs_glass_split.png new file mode 100644 index 0000000..6287959 Binary files /dev/null and b/mods/stairs/textures/stairs_glass_split.png differ diff --git a/mods/stairs/textures/stairs_glass_stairside.png b/mods/stairs/textures/stairs_glass_stairside.png new file mode 100644 index 0000000..c424294 Binary files /dev/null and b/mods/stairs/textures/stairs_glass_stairside.png differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png b/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png new file mode 100644 index 0000000..63db4a2 Binary files /dev/null and b/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_split.png b/mods/stairs/textures/stairs_obsidian_glass_split.png new file mode 100644 index 0000000..7647b9b Binary files /dev/null and b/mods/stairs/textures/stairs_obsidian_glass_split.png differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_stairside.png b/mods/stairs/textures/stairs_obsidian_glass_stairside.png new file mode 100644 index 0000000..850f4c6 Binary files /dev/null and b/mods/stairs/textures/stairs_obsidian_glass_stairside.png differ diff --git a/mods/tnt/README.txt b/mods/tnt/README.txt new file mode 100644 index 0000000..df244fe --- /dev/null +++ b/mods/tnt/README.txt @@ -0,0 +1,74 @@ +Minetest Game mod: tnt +====================== +See license.txt for license information. + +Authors of source code +---------------------- +PilzAdam (MIT) +ShadowNinja (MIT) +sofar (sofar@foo-projects.org) (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media +---------------- +BlockMen (CC BY-SA 3.0): +All textures not mentioned below. + +ShadowNinja (CC BY-SA 3.0): +tnt_smoke.png + +Wuzzy (CC BY-SA 3.0): +All gunpowder textures except tnt_gunpowder_inventory.png. + +sofar (sofar@foo-projects.org) (CC BY-SA 3.0): +tnt_blast.png + +paramat (CC BY-SA 3.0) +tnt_tnt_stick.png - Derived from a texture by benrob0329. + +TumeniNodes (CC0 1.0) +tnt_explode.ogg +renamed, edited, and converted to .ogg from Explosion2.wav +by steveygos93 (CC0 1.0) + + +tnt_ignite.ogg +renamed, edited, and converted to .ogg from sparkler_fuse_nm.wav +by theneedle.tv (CC0 1.0) + + +tnt_gunpowder_burning.ogg +renamed, edited, and converted to .ogg from road flare ignite burns.wav +by frankelmedico (CC0 1.0) + + + +Introduction +------------ +This mod adds TNT to Minetest. TNT is a tool to help the player +in mining. + +How to use the mod: + +Craft gunpowder by placing coal and gravel in the crafting area. +The gunpowder can be used to craft TNT sticks or as a fuse trail for TNT. + +To craft 2 TNT sticks: +G_G +GPG +G_G +G = gunpowder +P = paper +The sticks are not usable as an explosive. + +Craft TNT from 9 TNT sticks. + +There are different ways to ignite TNT: + 1. Hit it with a torch. + 2. Hit a gunpowder fuse trail that leads to TNT with a torch or + flint-and-steel. + 3. Activate it with mesecons (fastest way). + +For 1 TNT: +Node destruction radius is 3 nodes. +Player and object damage radius is 6 nodes. diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua new file mode 100644 index 0000000..fd1f9e4 --- /dev/null +++ b/mods/tnt/init.lua @@ -0,0 +1,700 @@ +-- tnt/init.lua + +tnt = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("tnt") + + +-- Default to enabled when in singleplayer +local enable_tnt = minetest.settings:get_bool("enable_tnt") +if enable_tnt == nil then + enable_tnt = minetest.is_singleplayer() +end + +-- loss probabilities array (one in X will be lost) +local loss_prob = {} + +loss_prob["default:cobble"] = 3 +loss_prob["default:dirt"] = 4 + +local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3) + +-- Fill a list with data for content IDs, after all nodes are registered +local cid_data = {} +minetest.register_on_mods_loaded(function() + for name, def in pairs(minetest.registered_nodes) do + cid_data[minetest.get_content_id(name)] = { + name = name, + drops = def.drops, + flammable = def.groups.flammable, + on_blast = def.on_blast, + } + end +end) + +local function rand_pos(center, pos, radius) + local def + local reg_nodes = minetest.registered_nodes + local i = 0 + repeat + -- Give up and use the center if this takes too long + if i > 4 then + pos.x, pos.z = center.x, center.z + break + end + pos.x = center.x + math.random(-radius, radius) + pos.z = center.z + math.random(-radius, radius) + def = reg_nodes[minetest.get_node(pos).name] + i = i + 1 + until def and not def.walkable +end + +local function eject_drops(drops, pos, radius) + local drop_pos = vector.new(pos) + for _, item in pairs(drops) do + local count = math.min(item:get_count(), item:get_stack_max()) + while count > 0 do + local take = math.max(1,math.min(radius * radius, + count, + item:get_stack_max())) + rand_pos(pos, drop_pos, radius) + local dropitem = ItemStack(item) + dropitem:set_count(take) + local obj = minetest.add_item(drop_pos, dropitem) + if obj then + obj:get_luaentity().collect = true + obj:set_acceleration({x = 0, y = -10, z = 0}) + obj:set_velocity({x = math.random(-3, 3), + y = math.random(0, 10), + z = math.random(-3, 3)}) + end + count = count - take + end + end +end + +local function add_drop(drops, item) + item = ItemStack(item) + local name = item:get_name() + if loss_prob[name] ~= nil and math.random(1, loss_prob[name]) == 1 then + return + end + + local drop = drops[name] + if drop == nil then + drops[name] = item + else + drop:set_count(drop:get_count() + item:get_count()) + end +end + +local basic_flame_on_construct -- cached value +local function destroy(drops, npos, cid, c_air, c_fire, + on_blast_queue, on_construct_queue, + ignore_protection, ignore_on_blast, owner) + if not ignore_protection and minetest.is_protected(npos, owner) then + return cid + end + + local def = cid_data[cid] + + if not def then + return c_air + elseif not ignore_on_blast and def.on_blast then + on_blast_queue[#on_blast_queue + 1] = { + pos = vector.new(npos), + on_blast = def.on_blast + } + return cid + elseif def.flammable then + on_construct_queue[#on_construct_queue + 1] = { + fn = basic_flame_on_construct, + pos = vector.new(npos) + } + return c_fire + else + local node_drops = minetest.get_node_drops(def.name, "") + for _, item in pairs(node_drops) do + add_drop(drops, item) + end + return c_air + end +end + +local function calc_velocity(pos1, pos2, old_vel, power) + -- Avoid errors caused by a vector of zero length + if vector.equals(pos1, pos2) then + return old_vel + end + + local vel = vector.direction(pos1, pos2) + vel = vector.normalize(vel) + vel = vector.multiply(vel, power) + + -- Divide by distance + local dist = vector.distance(pos1, pos2) + dist = math.max(dist, 1) + vel = vector.divide(vel, dist) + + -- Add old velocity + vel = vector.add(vel, old_vel) + + -- randomize it a bit + vel = vector.add(vel, { + x = math.random() - 0.5, + y = math.random() - 0.5, + z = math.random() - 0.5, + }) + + -- Limit to terminal velocity + dist = vector.length(vel) + if dist > 250 then + vel = vector.divide(vel, dist / 250) + end + return vel +end + +local function entity_physics(pos, radius, drops) + local objs = minetest.get_objects_inside_radius(pos, radius) + for _, obj in pairs(objs) do + local obj_pos = obj:get_pos() + local dist = math.max(1, vector.distance(pos, obj_pos)) + + local damage = (4 / dist) * radius + if obj:is_player() then + local dir = vector.normalize(vector.subtract(obj_pos, pos)) + local moveoff = vector.multiply(dir, 2 / dist * radius) + obj:add_velocity(moveoff) + + obj:set_hp(obj:get_hp() - damage) + else + local luaobj = obj:get_luaentity() + + -- object might have disappeared somehow + if luaobj then + local do_damage = true + local do_knockback = true + local entity_drops = {} + local objdef = minetest.registered_entities[luaobj.name] + + if objdef and objdef.on_blast then + do_damage, do_knockback, entity_drops = objdef.on_blast(luaobj, damage) + end + + if do_knockback then + local obj_vel = obj:get_velocity() + obj:set_velocity(calc_velocity(pos, obj_pos, + obj_vel, radius * 10)) + end + if do_damage then + if not obj:get_armor_groups().immortal then + obj:punch(obj, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = damage}, + }, nil) + end + end + for _, item in pairs(entity_drops) do + add_drop(drops, item) + end + end + end + end +end + +local function add_effects(pos, radius, drops) + minetest.add_particle({ + pos = pos, + velocity = vector.new(), + acceleration = vector.new(), + expirationtime = 0.4, + size = radius * 10, + collisiondetection = false, + vertical = false, + texture = "tnt_boom.png", + glow = 15, + }) + minetest.add_particlespawner({ + amount = 64, + time = 0.5, + minpos = vector.subtract(pos, radius / 2), + maxpos = vector.add(pos, radius / 2), + minvel = {x = -10, y = -10, z = -10}, + maxvel = {x = 10, y = 10, z = 10}, + minacc = vector.new(), + maxacc = vector.new(), + minexptime = 1, + maxexptime = 2.5, + minsize = radius * 3, + maxsize = radius * 5, + texture = "tnt_smoke.png", + }) + + -- we just dropped some items. Look at the items entities and pick + -- one of them to use as texture + local texture = "tnt_blast.png" --fallback texture + local node + local most = 0 + for name, stack in pairs(drops) do + local count = stack:get_count() + if count > most then + most = count + local def = minetest.registered_nodes[name] + if def then + node = { name = name } + end + if def and def.tiles and def.tiles[1] then + texture = def.tiles[1] + end + end + end + + minetest.add_particlespawner({ + amount = 64, + time = 0.1, + minpos = vector.subtract(pos, radius / 2), + maxpos = vector.add(pos, radius / 2), + minvel = {x = -3, y = 0, z = -3}, + maxvel = {x = 3, y = 5, z = 3}, + minacc = {x = 0, y = -10, z = 0}, + maxacc = {x = 0, y = -10, z = 0}, + minexptime = 0.8, + maxexptime = 2.0, + minsize = radius * 0.33, + maxsize = radius, + texture = texture, + -- ^ only as fallback for clients without support for `node` parameter + node = node, + collisiondetection = true, + }) +end + +function tnt.burn(pos, nodename) + local name = nodename or minetest.get_node(pos).name + local def = minetest.registered_nodes[name] + if not def then + return + elseif def.on_ignite then + def.on_ignite(pos) + elseif minetest.get_item_group(name, "tnt") > 0 then + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.sound_play("tnt_ignite", {pos = pos}, true) + minetest.get_node_timer(pos):start(1) + end +end + +local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owner, explode_center) + pos = vector.round(pos) + -- scan for adjacent TNT nodes first, and enlarge the explosion + local vm1 = VoxelManip() + local p1 = vector.subtract(pos, 2) + local p2 = vector.add(pos, 2) + local minp, maxp = vm1:read_from_map(p1, p2) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm1:get_data() + local count = 0 + local c_tnt + local c_tnt_burning = minetest.get_content_id("tnt:tnt_burning") + local c_tnt_boom = minetest.get_content_id("tnt:boom") + local c_air = minetest.get_content_id("air") + if enable_tnt then + c_tnt = minetest.get_content_id("tnt:tnt") + else + c_tnt = c_tnt_burning -- tnt is not registered if disabled + end + -- make sure we still have explosion even when centre node isnt tnt related + if explode_center then + count = 1 + end + + for z = pos.z - 2, pos.z + 2 do + for y = pos.y - 2, pos.y + 2 do + local vi = a:index(pos.x - 2, y, z) + for x = pos.x - 2, pos.x + 2 do + local cid = data[vi] + if cid == c_tnt or cid == c_tnt_boom or cid == c_tnt_burning then + count = count + 1 + data[vi] = c_air + end + vi = vi + 1 + end + end + end + + vm1:set_data(data) + vm1:write_to_map() + + -- recalculate new radius + radius = math.floor(radius * math.pow(count, 1/3)) + + -- perform the explosion + local vm = VoxelManip() + local pr = PseudoRandom(os.time()) + p1 = vector.subtract(pos, radius) + p2 = vector.add(pos, radius) + minp, maxp = vm:read_from_map(p1, p2) + a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + data = vm:get_data() + + local drops = {} + local on_blast_queue = {} + local on_construct_queue = {} + basic_flame_on_construct = minetest.registered_nodes["fire:basic_flame"].on_construct + + local c_fire = minetest.get_content_id("fire:basic_flame") + for z = -radius, radius do + for y = -radius, radius do + local vi = a:index(pos.x + (-radius), pos.y + y, pos.z + z) + for x = -radius, radius do + local r = vector.length(vector.new(x, y, z)) + if (radius * radius) / (r * r) >= (pr:next(80, 125) / 100) then + local cid = data[vi] + local p = {x = pos.x + x, y = pos.y + y, z = pos.z + z} + if cid ~= c_air then + data[vi] = destroy(drops, p, cid, c_air, c_fire, + on_blast_queue, on_construct_queue, + ignore_protection, ignore_on_blast, owner) + end + end + vi = vi + 1 + end + end + end + + vm:set_data(data) + vm:write_to_map() + vm:update_map() + vm:update_liquids() + + -- call check_single_for_falling for everything within 1.5x blast radius + for y = -radius * 1.5, radius * 1.5 do + for z = -radius * 1.5, radius * 1.5 do + for x = -radius * 1.5, radius * 1.5 do + local rad = {x = x, y = y, z = z} + local s = vector.add(pos, rad) + local r = vector.length(rad) + if r / radius < 1.4 then + minetest.check_single_for_falling(s) + end + end + end + end + + for _, queued_data in pairs(on_blast_queue) do + local dist = math.max(1, vector.distance(queued_data.pos, pos)) + local intensity = (radius * radius) / (dist * dist) + local node_drops = queued_data.on_blast(queued_data.pos, intensity) + if node_drops then + for _, item in pairs(node_drops) do + add_drop(drops, item) + end + end + end + + for _, queued_data in pairs(on_construct_queue) do + queued_data.fn(queued_data.pos) + end + + minetest.log("action", "TNT owned by " .. owner .. " detonated at " .. + minetest.pos_to_string(pos) .. " with radius " .. radius) + + return drops, radius +end + +function tnt.boom(pos, def) + def = def or {} + def.radius = def.radius or 1 + def.damage_radius = def.damage_radius or def.radius * 2 + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + if not def.explode_center and def.ignore_protection ~= true then + minetest.set_node(pos, {name = "tnt:boom"}) + end + local sound = def.sound or "tnt_explode" + minetest.sound_play(sound, {pos = pos, gain = 2.5, + max_hear_distance = math.min(def.radius * 20, 128)}, true) + local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection, + def.ignore_on_blast, owner, def.explode_center) + -- append entity drops + local damage_radius = (radius / math.max(1, def.radius)) * def.damage_radius + entity_physics(pos, damage_radius, drops) + if not def.disable_drops then + eject_drops(drops, pos, radius) + end + add_effects(pos, radius, drops) + minetest.log("action", "A TNT explosion occurred at " .. minetest.pos_to_string(pos) .. + " with radius " .. radius) +end + +minetest.register_node("tnt:boom", { + drawtype = "airlike", + inventory_image = "tnt_boom.png", + wield_image = "tnt_boom.png", + light_source = default.LIGHT_MAX, + walkable = false, + drop = "", + groups = {dig_immediate = 3, not_in_creative_inventory = 1}, + -- unaffected by explosions + on_blast = function() end, +}) + +minetest.register_node("tnt:gunpowder", { + description = S("Gun Powder"), + drawtype = "raillike", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + walkable = false, + tiles = { + "tnt_gunpowder_straight.png", + "tnt_gunpowder_curved.png", + "tnt_gunpowder_t_junction.png", + "tnt_gunpowder_crossing.png" + }, + inventory_image = "tnt_gunpowder_inventory.png", + wield_image = "tnt_gunpowder_inventory.png", + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + groups = {dig_immediate = 2, attached_node = 1, flammable = 5, + connect_to_raillike = minetest.raillike_group("gunpowder")}, + sounds = default.node_sound_leaves_defaults(), + + on_punch = function(pos, node, puncher) + if puncher:get_wielded_item():get_name() == "default:torch" then + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + minetest.log("action", puncher:get_player_name() .. + " ignites tnt:gunpowder at " .. + minetest.pos_to_string(pos)) + end + end, + on_blast = function(pos, intensity) + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + end, + on_burn = function(pos) + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + end, + on_ignite = function(pos, igniter) + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + end, +}) + +minetest.register_node("tnt:gunpowder_burning", { + drawtype = "raillike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + light_source = 5, + tiles = {{ + name = "tnt_gunpowder_burning_straight_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_curved_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_t_junction_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_crossing_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }}, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + drop = "", + groups = { + dig_immediate = 2, + attached_node = 1, + connect_to_raillike = minetest.raillike_group("gunpowder"), + not_in_creative_inventory = 1 + }, + sounds = default.node_sound_leaves_defaults(), + on_timer = function(pos, elapsed) + for dx = -1, 1 do + for dz = -1, 1 do + if math.abs(dx) + math.abs(dz) == 1 then + for dy = -1, 1 do + tnt.burn({ + x = pos.x + dx, + y = pos.y + dy, + z = pos.z + dz, + }) + end + end + end + end + minetest.remove_node(pos) + end, + -- unaffected by explosions + on_blast = function() end, + on_construct = function(pos) + minetest.sound_play("tnt_gunpowder_burning", {pos = pos, + gain = 2}, true) + minetest.get_node_timer(pos):start(1) + end, +}) + +minetest.register_craft({ + output = "tnt:gunpowder 5", + type = "shapeless", + recipe = {"default:coal_lump", "default:gravel"} +}) + +minetest.register_craftitem("tnt:tnt_stick", { + description = S("TNT Stick"), + inventory_image = "tnt_tnt_stick.png", + groups = {flammable = 5}, +}) + +if enable_tnt then + minetest.register_craft({ + output = "tnt:tnt_stick 2", + recipe = { + {"tnt:gunpowder", "", "tnt:gunpowder"}, + {"tnt:gunpowder", "default:paper", "tnt:gunpowder"}, + {"tnt:gunpowder", "", "tnt:gunpowder"}, + } + }) + + minetest.register_craft({ + output = "tnt:tnt", + recipe = { + {"tnt:tnt_stick", "tnt:tnt_stick", "tnt:tnt_stick"}, + {"tnt:tnt_stick", "tnt:tnt_stick", "tnt:tnt_stick"}, + {"tnt:tnt_stick", "tnt:tnt_stick", "tnt:tnt_stick"} + } + }) + + minetest.register_abm({ + label = "TNT ignition", + nodenames = {"group:tnt", "tnt:gunpowder"}, + neighbors = {"fire:basic_flame", "default:lava_source", "default:lava_flowing"}, + interval = 4, + chance = 1, + action = function(pos, node) + tnt.burn(pos, node.name) + end, + }) +end + +function tnt.register_tnt(def) + local name + if not def.name:find(':') then + name = "tnt:" .. def.name + else + name = def.name + def.name = def.name:match(":([%w_]+)") + end + if not def.tiles then def.tiles = {} end + local tnt_top = def.tiles.top or def.name .. "_top.png" + local tnt_bottom = def.tiles.bottom or def.name .. "_bottom.png" + local tnt_side = def.tiles.side or def.name .. "_side.png" + local tnt_burning = def.tiles.burning or def.name .. "_top_burning_animated.png" + if not def.damage_radius then def.damage_radius = def.radius * 2 end + + if enable_tnt then + minetest.register_node(":" .. name, { + description = def.description, + tiles = {tnt_top, tnt_bottom, tnt_side}, + is_ground_content = false, + groups = {dig_immediate = 2, mesecon = 2, tnt = 1, flammable = 5}, + sounds = default.node_sound_wood_defaults(), + after_place_node = function(pos, placer) + if placer:is_player() then + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name()) + end + end, + on_punch = function(pos, node, puncher) + if puncher:get_wielded_item():get_name() == "default:torch" then + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.registered_nodes[name .. "_burning"].on_construct(pos) + minetest.log("action", puncher:get_player_name() .. + " ignites " .. node.name .. " at " .. + minetest.pos_to_string(pos)) + end + end, + on_blast = function(pos, intensity) + minetest.after(0.1, function() + tnt.boom(pos, def) + end) + end, + mesecons = {effector = + {action_on = + function(pos) + tnt.boom(pos, def) + end + } + }, + on_burn = function(pos) + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.registered_nodes[name .. "_burning"].on_construct(pos) + end, + on_ignite = function(pos, igniter) + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.registered_nodes[name .. "_burning"].on_construct(pos) + end, + }) + end + + minetest.register_node(":" .. name .. "_burning", { + tiles = { + { + name = tnt_burning, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + tnt_bottom, tnt_side + }, + light_source = 5, + drop = "", + sounds = default.node_sound_wood_defaults(), + groups = {falling_node = 1, not_in_creative_inventory = 1}, + on_timer = function(pos, elapsed) + tnt.boom(pos, def) + end, + -- unaffected by explosions + on_blast = function() end, + on_construct = function(pos) + minetest.sound_play("tnt_ignite", {pos = pos}, true) + minetest.get_node_timer(pos):start(4) + minetest.check_for_falling(pos) + end, + }) +end + +tnt.register_tnt({ + name = "tnt:tnt", + description = S("TNT"), + radius = tnt_radius, +}) diff --git a/mods/tnt/license.txt b/mods/tnt/license.txt new file mode 100644 index 0000000..e59ec6e --- /dev/null +++ b/mods/tnt/license.txt @@ -0,0 +1,100 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 PilzAdam +Copyright (C) 2014-2016 ShadowNinja +Copyright (C) 2016 sofar (sofar@foo-projects.org) +Copyright (C) 2014-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + +=================================== + +Licenses of media +----------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2014-2016 ShadowNinja +Copyright (C) 2015-2016 Wuzzy +Copyright (C) 2016 sofar (sofar@foo-projects.org) +Copyright (C) 2018 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +==================================================== + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +for audio files (found in sounds folder) +TumeniNodes +steveygos93 +theneedle.tv +frankelmedico + +No Copyright + +The person who associated a work with this deed has dedicated the work to the public domain +by waiving all of his or her rights to the work worldwide under copyright law, including all +related and neighboring rights, to the extent allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial purposes, all +without asking permission. See Other Information below. + +In no way are the patent or trademark rights of any person affected by CC0, nor are the +rights that other persons may have in the work or in how the work is used, such as publicity +or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this deed makes no +warranties about the work, and disclaims liability for all uses of the work, to the fullest +extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author or the affirmer. + +This license is acceptable for Free Cultural Works. +For more Information: +https://creativecommons.org/publicdomain/zero/1.0/ + diff --git a/mods/tnt/locale/template.txt b/mods/tnt/locale/template.txt new file mode 100644 index 0000000..62bcb15 --- /dev/null +++ b/mods/tnt/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder= +TNT Stick= +TNT= diff --git a/mods/tnt/locale/tnt.de.tr b/mods/tnt/locale/tnt.de.tr new file mode 100644 index 0000000..09d2ac2 --- /dev/null +++ b/mods/tnt/locale/tnt.de.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Schießpulver +TNT Stick=TNT-Stange +TNT=TNT diff --git a/mods/tnt/locale/tnt.es.tr b/mods/tnt/locale/tnt.es.tr new file mode 100644 index 0000000..d9f3f20 --- /dev/null +++ b/mods/tnt/locale/tnt.es.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Pólvora +TNT Stick=Cartucho de TNT +TNT=TNT diff --git a/mods/tnt/locale/tnt.fr.tr b/mods/tnt/locale/tnt.fr.tr new file mode 100644 index 0000000..3fe48fb --- /dev/null +++ b/mods/tnt/locale/tnt.fr.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Poudre à canon +TNT Stick=Bâton de TNT +TNT=TNT diff --git a/mods/tnt/locale/tnt.id.tr b/mods/tnt/locale/tnt.id.tr new file mode 100644 index 0000000..2652ae0 --- /dev/null +++ b/mods/tnt/locale/tnt.id.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Bubuk Mesiu +TNT Stick=Tongkat TNT +TNT=TNT diff --git a/mods/tnt/locale/tnt.it.tr b/mods/tnt/locale/tnt.it.tr new file mode 100644 index 0000000..bc4ef14 --- /dev/null +++ b/mods/tnt/locale/tnt.it.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Polvere da sparo +TNT Stick=Candelotto di TNT +TNT=TNT \ No newline at end of file diff --git a/mods/tnt/locale/tnt.ms.tr b/mods/tnt/locale/tnt.ms.tr new file mode 100644 index 0000000..c4c5fdd --- /dev/null +++ b/mods/tnt/locale/tnt.ms.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Serbuk Senjata Api +TNT Stick=Batang TNT +TNT=TNT diff --git a/mods/tnt/locale/tnt.ru.tr b/mods/tnt/locale/tnt.ru.tr new file mode 100644 index 0000000..a8cee43 --- /dev/null +++ b/mods/tnt/locale/tnt.ru.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Порох +TNT Stick=Тротиловая Палка +TNT=Тротил diff --git a/mods/tnt/locale/tnt.se.tr b/mods/tnt/locale/tnt.se.tr new file mode 100644 index 0000000..21fbbd0 --- /dev/null +++ b/mods/tnt/locale/tnt.se.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Krut +TNT Stick=Dynamitpinne +TNT=Dynamit \ No newline at end of file diff --git a/mods/tnt/locale/tnt.sk.tr b/mods/tnt/locale/tnt.sk.tr new file mode 100644 index 0000000..639b8c8 --- /dev/null +++ b/mods/tnt/locale/tnt.sk.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Pušný prach +TNT Stick=Časť TNT +TNT=TNT diff --git a/mods/tnt/locale/tnt.zh_CN.tr b/mods/tnt/locale/tnt.zh_CN.tr new file mode 100644 index 0000000..0a3294e --- /dev/null +++ b/mods/tnt/locale/tnt.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=火药粉 +TNT Stick=炸药棒 +TNT=炸药包 diff --git a/mods/tnt/locale/tnt.zh_TW.tr b/mods/tnt/locale/tnt.zh_TW.tr new file mode 100644 index 0000000..c1b3caf --- /dev/null +++ b/mods/tnt/locale/tnt.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=火藥粉 +TNT Stick=炸藥棒 +TNT=炸藥包 diff --git a/mods/tnt/mod.conf b/mods/tnt/mod.conf new file mode 100644 index 0000000..9385e82 --- /dev/null +++ b/mods/tnt/mod.conf @@ -0,0 +1,3 @@ +name = tnt +description = Minetest Game mod: tnt +depends = default, fire diff --git a/mods/tnt/sounds/tnt_explode.ogg b/mods/tnt/sounds/tnt_explode.ogg new file mode 100644 index 0000000..e00a16c Binary files /dev/null and b/mods/tnt/sounds/tnt_explode.ogg differ diff --git a/mods/tnt/sounds/tnt_gunpowder_burning.ogg b/mods/tnt/sounds/tnt_gunpowder_burning.ogg new file mode 100644 index 0000000..8581c2d Binary files /dev/null and b/mods/tnt/sounds/tnt_gunpowder_burning.ogg differ diff --git a/mods/tnt/sounds/tnt_ignite.ogg b/mods/tnt/sounds/tnt_ignite.ogg new file mode 100644 index 0000000..1a7062e Binary files /dev/null and b/mods/tnt/sounds/tnt_ignite.ogg differ diff --git a/mods/tnt/textures/tnt_blast.png b/mods/tnt/textures/tnt_blast.png new file mode 100644 index 0000000..bbb1096 Binary files /dev/null and b/mods/tnt/textures/tnt_blast.png differ diff --git a/mods/tnt/textures/tnt_boom.png b/mods/tnt/textures/tnt_boom.png new file mode 100644 index 0000000..c848bfc Binary files /dev/null and b/mods/tnt/textures/tnt_boom.png differ diff --git a/mods/tnt/textures/tnt_bottom.png b/mods/tnt/textures/tnt_bottom.png new file mode 100644 index 0000000..95f66cb Binary files /dev/null and b/mods/tnt/textures/tnt_bottom.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png new file mode 100644 index 0000000..a901f7b Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_curved_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_curved_animated.png new file mode 100644 index 0000000..bc01806 Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_curved_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_straight_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_straight_animated.png new file mode 100644 index 0000000..c860ace Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_straight_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png new file mode 100644 index 0000000..a556072 Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_crossing.png b/mods/tnt/textures/tnt_gunpowder_crossing.png new file mode 100644 index 0000000..916c84e Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_crossing.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_curved.png b/mods/tnt/textures/tnt_gunpowder_curved.png new file mode 100644 index 0000000..cb8b4ea Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_curved.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_inventory.png b/mods/tnt/textures/tnt_gunpowder_inventory.png new file mode 100644 index 0000000..105a2d2 Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_inventory.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_straight.png b/mods/tnt/textures/tnt_gunpowder_straight.png new file mode 100644 index 0000000..8ab0e3c Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_straight.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_t_junction.png b/mods/tnt/textures/tnt_gunpowder_t_junction.png new file mode 100644 index 0000000..ac997a7 Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_t_junction.png differ diff --git a/mods/tnt/textures/tnt_side.png b/mods/tnt/textures/tnt_side.png new file mode 100644 index 0000000..d303473 Binary files /dev/null and b/mods/tnt/textures/tnt_side.png differ diff --git a/mods/tnt/textures/tnt_smoke.png b/mods/tnt/textures/tnt_smoke.png new file mode 100644 index 0000000..488b50f Binary files /dev/null and b/mods/tnt/textures/tnt_smoke.png differ diff --git a/mods/tnt/textures/tnt_tnt_stick.png b/mods/tnt/textures/tnt_tnt_stick.png new file mode 100644 index 0000000..bc47a29 Binary files /dev/null and b/mods/tnt/textures/tnt_tnt_stick.png differ diff --git a/mods/tnt/textures/tnt_top.png b/mods/tnt/textures/tnt_top.png new file mode 100644 index 0000000..31b807c Binary files /dev/null and b/mods/tnt/textures/tnt_top.png differ diff --git a/mods/tnt/textures/tnt_top_burning.png b/mods/tnt/textures/tnt_top_burning.png new file mode 100644 index 0000000..fc0d490 Binary files /dev/null and b/mods/tnt/textures/tnt_top_burning.png differ diff --git a/mods/tnt/textures/tnt_top_burning_animated.png b/mods/tnt/textures/tnt_top_burning_animated.png new file mode 100644 index 0000000..18a270f Binary files /dev/null and b/mods/tnt/textures/tnt_top_burning_animated.png differ diff --git a/mods/vessels/README.txt b/mods/vessels/README.txt new file mode 100644 index 0000000..a54e330 --- /dev/null +++ b/mods/vessels/README.txt @@ -0,0 +1,22 @@ +Minetest Game mod: vessels +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Vanessa Ezekowitz (LGPLv2.1+) +Modified by Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures) +--------------------------- +All not listed below, Vanessa Ezekowitz (CC BY-SA 3.0) + +The following textures were modified by Thomas-S (CC BY-SA 3.0): + vessels_drinking_glass.png + vessels_drinking_glass_inv.png + vessels_glass_bottle.png + vessels_steel_bottle.png + +The following texture was created by Wuzzy (CC BY-SA 3.0): + vessels_shelf_slot.png (based on vessels_glass_bottle.png) diff --git a/mods/vessels/init.lua b/mods/vessels/init.lua new file mode 100644 index 0000000..71a0689 --- /dev/null +++ b/mods/vessels/init.lua @@ -0,0 +1,237 @@ +-- vessels/init.lua + +-- Minetest 0.4 mod: vessels +-- See README.txt for licensing and other information. + +-- Load support for MT game translation. +local S = minetest.get_translator("vessels") + + +local vessels_shelf_formspec = + "size[8,7;]" .. + "list[context;vessels;0,0.3;8,2;]" .. + "list[current_player;main;0,2.85;8,1;]" .. + "list[current_player;main;0,4.08;8,3;8]" .. + "listring[context;vessels]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0, 2.85) + +local function update_vessels_shelf(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local invlist = inv:get_list("vessels") + + local formspec = vessels_shelf_formspec + -- Inventory slots overlay + local vx, vy = 0, 0.3 + local n_items = 0 + for i = 1, 16 do + if i == 9 then + vx = 0 + vy = vy + 1 + end + if not invlist or invlist[i]:is_empty() then + formspec = formspec .. + "image[" .. vx .. "," .. vy .. ";1,1;vessels_shelf_slot.png]" + else + local stack = invlist[i] + if not stack:is_empty() then + n_items = n_items + stack:get_count() + end + end + vx = vx + 1 + end + meta:set_string("formspec", formspec) + if n_items == 0 then + meta:set_string("infotext", S("Empty Vessels Shelf")) + else + meta:set_string("infotext", S("Vessels Shelf (@1 items)", n_items)) + end +end + +minetest.register_node("vessels:shelf", { + description = S("Vessels Shelf"), + tiles = {"default_wood.png", "default_wood.png", "default_wood.png", + "default_wood.png", "vessels_shelf.png", "vessels_shelf.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + update_vessels_shelf(pos) + local inv = meta:get_inventory() + inv:set_size("vessels", 8 * 2) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("vessels") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if minetest.get_item_group(stack:get_name(), "vessel") ~= 0 then + return stack:get_count() + end + return 0 + 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 vessels shelf at ".. minetest.pos_to_string(pos)) + update_vessels_shelf(pos) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves stuff to vessels shelf at ".. minetest.pos_to_string(pos)) + update_vessels_shelf(pos) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from vessels shelf at ".. minetest.pos_to_string(pos)) + update_vessels_shelf(pos) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "vessels", drops) + drops[#drops + 1] = "vessels:shelf" + minetest.remove_node(pos) + return drops + end, +}) + +minetest.register_craft({ + output = "vessels:shelf", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:vessel", "group:vessel", "group:vessel"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_node("vessels:glass_bottle", { + description = S("Empty Glass Bottle"), + drawtype = "plantlike", + tiles = {"vessels_glass_bottle.png"}, + inventory_image = "vessels_glass_bottle.png", + wield_image = "vessels_glass_bottle.png", + paramtype = "light", + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft( { + output = "vessels:glass_bottle 10", + recipe = { + {"default:glass", "", "default:glass"}, + {"default:glass", "", "default:glass"}, + {"", "default:glass", ""} + } +}) + +minetest.register_node("vessels:drinking_glass", { + description = S("Empty Drinking Glass"), + drawtype = "plantlike", + tiles = {"vessels_drinking_glass.png"}, + inventory_image = "vessels_drinking_glass_inv.png", + wield_image = "vessels_drinking_glass.png", + paramtype = "light", + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft( { + output = "vessels:drinking_glass 14", + recipe = { + {"default:glass", "", "default:glass"}, + {"default:glass", "", "default:glass"}, + {"default:glass", "default:glass", "default:glass"} + } +}) + +minetest.register_node("vessels:steel_bottle", { + description = S("Empty Heavy Steel Bottle"), + drawtype = "plantlike", + tiles = {"vessels_steel_bottle.png"}, + inventory_image = "vessels_steel_bottle.png", + wield_image = "vessels_steel_bottle.png", + paramtype = "light", + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_defaults(), +}) + +minetest.register_craft( { + output = "vessels:steel_bottle 5", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"}, + {"", "default:steel_ingot", ""} + } +}) + + +-- Glass and steel recycling + +minetest.register_craftitem("vessels:glass_fragments", { + description = S("Glass Fragments"), + inventory_image = "vessels_glass_fragments.png", +}) + +minetest.register_craft( { + type = "shapeless", + output = "vessels:glass_fragments", + recipe = { + "vessels:glass_bottle", + "vessels:glass_bottle", + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "vessels:glass_fragments", + recipe = { + "vessels:drinking_glass", + "vessels:drinking_glass", + }, +}) + +minetest.register_craft({ + type = "cooking", + output = "default:glass", + recipe = "vessels:glass_fragments", +}) + +minetest.register_craft( { + type = "cooking", + output = "default:steel_ingot", + recipe = "vessels:steel_bottle", +}) + +minetest.register_craft({ + type = "fuel", + recipe = "vessels:shelf", + burntime = 30, +}) + +-- Register glass fragments as dungeon loot +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + name = "vessels:glass_fragments", chance = 0.35, count = {1, 4} + }) +end diff --git a/mods/vessels/license.txt b/mods/vessels/license.txt new file mode 100644 index 0000000..de16a3b --- /dev/null +++ b/mods/vessels/license.txt @@ -0,0 +1,52 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2012-2016 Vanessa Ezekowitz +Copyright (C) 2012-2016 celeron55, Perttu Ahola +Copyright (C) 2012-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Vanessa Ezekowitz +Copyright (C) 2016 Thomas-S + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/vessels/locale/template.txt b/mods/vessels/locale/template.txt new file mode 100644 index 0000000..e6e5f69 --- /dev/null +++ b/mods/vessels/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf= +Vessels Shelf (@1 items)= +Vessels Shelf= +Empty Glass Bottle= +Empty Drinking Glass= +Empty Heavy Steel Bottle= +Glass Fragments= diff --git a/mods/vessels/locale/vessels.de.tr b/mods/vessels/locale/vessels.de.tr new file mode 100644 index 0000000..66ca5ef --- /dev/null +++ b/mods/vessels/locale/vessels.de.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Gefäßregal +Empty Glass Bottle=Leere Glasflasche +Empty Drinking Glass=Leeres Trinkglas +Empty Heavy Steel Bottle=Leere schwere Stahlflasche +Glass Fragments=Glasfragmente +Empty Vessels Shelf=Leeres Gefäßregal +Vessels Shelf (@1 items)=Gefäßregal (@1 Gegenstände) diff --git a/mods/vessels/locale/vessels.es.tr b/mods/vessels/locale/vessels.es.tr new file mode 100644 index 0000000..859ea40 --- /dev/null +++ b/mods/vessels/locale/vessels.es.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Estante de vasijas +Empty Glass Bottle=Botella de vidrio vacía +Empty Drinking Glass=Vaso para beber vacío +Empty Heavy Steel Bottle=Botella de acero vacía +Glass Fragments=Fragmentos de vidrio +Empty Vessels Shelf=Estante de vasijas vacío +Vessels Shelf (@1 items)=Estante de vasijas (@1 objetos) diff --git a/mods/vessels/locale/vessels.fr.tr b/mods/vessels/locale/vessels.fr.tr new file mode 100644 index 0000000..4e073dc --- /dev/null +++ b/mods/vessels/locale/vessels.fr.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Etagère à récipient +Empty Glass Bottle=Bouteille de verre vide +Empty Drinking Glass=Verre vide +Empty Heavy Steel Bottle=Bouteille d'acier lourde vide +Glass Fragments=Fragments de verre +Empty Vessels Shelf=Etagère à récipient vide +Vessels Shelf (@1 items)=Etagère à récipient (@1 articles) diff --git a/mods/vessels/locale/vessels.id.tr b/mods/vessels/locale/vessels.id.tr new file mode 100644 index 0000000..f80fbc3 --- /dev/null +++ b/mods/vessels/locale/vessels.id.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Rak Bejana Kosong +Vessels Shelf (@1 items)=Rak Bejana (@1 barang) +Vessels Shelf=Rak Bejana +Empty Glass Bottle=Botol Kaca Kosong +Empty Drinking Glass=Gelas Minum Kosong +Empty Heavy Steel Bottle=Botol Baja Berat Kosong +Glass Fragments=Pecahan Kaca diff --git a/mods/vessels/locale/vessels.it.tr b/mods/vessels/locale/vessels.it.tr new file mode 100644 index 0000000..09a6667 --- /dev/null +++ b/mods/vessels/locale/vessels.it.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Scaffale per contenitori +Empty Glass Bottle=Bottiglia di vetro vuota +Empty Drinking Glass=Bicchiere di vetro vuoto +Empty Heavy Steel Bottle=Bottigia di metallo pesante vuota +Glass Fragments=Frammenti di vetro +Empty Vessels Shelf=Scaffale per contenitori vuoto +Vessels Shelf (@1 items)=Scaffale per contenitori (@1 oggetti) diff --git a/mods/vessels/locale/vessels.ms.tr b/mods/vessels/locale/vessels.ms.tr new file mode 100644 index 0000000..6d8348a --- /dev/null +++ b/mods/vessels/locale/vessels.ms.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Rak Bekas Kaca +Empty Glass Bottle=Botol Kaca Kosong +Empty Drinking Glass=Gelas Minuman Kosong +Empty Heavy Steel Bottle=Botol Keluli Berat Kosong +Glass Fragments=Serpihan Kaca +Empty Vessels Shelf=Rak Bekas Kaca Kosong +Vessels Shelf (@1 items)=Rak Bekas Kaca (@1 barang) diff --git a/mods/vessels/locale/vessels.ru.tr b/mods/vessels/locale/vessels.ru.tr new file mode 100644 index 0000000..76dde6a --- /dev/null +++ b/mods/vessels/locale/vessels.ru.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Полка с Сосудами +Empty Glass Bottle=Пустая Стеклянная Бутылка +Empty Drinking Glass=Пустая Питьевая Бутылка +Empty Heavy Steel Bottle=Пустая Стальная Бутылка +Glass Fragments=Стеклянные Осколки +Empty Vessels Shelf=Полка с Пустыми Сосудами +Vessels Shelf (@1 items)=Полка с Сосудами (@1 предметы) diff --git a/mods/vessels/locale/vessels.se.tr b/mods/vessels/locale/vessels.se.tr new file mode 100644 index 0000000..8277b33 --- /dev/null +++ b/mods/vessels/locale/vessels.se.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Fartygshylla +Empty Glass Bottle=Tom Glasflska +Empty Drinking Glass=Tom Drycksflaska +Empty Heavy Steel Bottle=Tom Tung Stål Flaska +Glass Fragments=Glasbitar +Empty Vessels Shelf=Tom Fartygshylla +Vessels Shelf (@1 items)=Fartygshylla (@1 saker) diff --git a/mods/vessels/locale/vessels.sk.tr b/mods/vessels/locale/vessels.sk.tr new file mode 100644 index 0000000..acae90a --- /dev/null +++ b/mods/vessels/locale/vessels.sk.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=Polica na fľašky +Empty Glass Bottle=Prázdna sklenená fľaša +Empty Drinking Glass=Prázdny pohár na pitie +Empty Heavy Steel Bottle=Prázdna oceľová fľaša +Glass Fragments=Časti skla +Empty Vessels Shelf=Prázdna polica na fľašky +Vessels Shelf (@1 items)=Polica na fľašky (@1 položka/y) diff --git a/mods/vessels/locale/vessels.zh_CN.tr b/mods/vessels/locale/vessels.zh_CN.tr new file mode 100644 index 0000000..f91ccd8 --- /dev/null +++ b/mods/vessels/locale/vessels.zh_CN.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=容器架 +Empty Glass Bottle=空玻璃瓶 +Empty Drinking Glass=空水杯 +Empty Heavy Steel Bottle=空重型钢瓶 +Glass Fragments=玻璃碎片 +Empty Vessels Shelf=空容器架 +Vessels Shelf (@1 items)=容器架(@1项) diff --git a/mods/vessels/locale/vessels.zh_TW.tr b/mods/vessels/locale/vessels.zh_TW.tr new file mode 100644 index 0000000..7936c88 --- /dev/null +++ b/mods/vessels/locale/vessels.zh_TW.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Vessels Shelf=容器架 +Empty Glass Bottle=空玻璃瓶 +Empty Drinking Glass=空水杯 +Empty Heavy Steel Bottle=空重型鋼瓶 +Glass Fragments=玻璃碎片 +Empty Vessels Shelf=空容器架 +Vessels Shelf (@1 items)=容器架(@1項) diff --git a/mods/vessels/mod.conf b/mods/vessels/mod.conf new file mode 100644 index 0000000..eba9076 --- /dev/null +++ b/mods/vessels/mod.conf @@ -0,0 +1,4 @@ +name = vessels +description = Minetest Game mod: vessels +depends = default +optional_depends = dungeon_loot diff --git a/mods/vessels/textures/vessels_drinking_glass.png b/mods/vessels/textures/vessels_drinking_glass.png new file mode 100644 index 0000000..d5037b8 Binary files /dev/null and b/mods/vessels/textures/vessels_drinking_glass.png differ diff --git a/mods/vessels/textures/vessels_drinking_glass_inv.png b/mods/vessels/textures/vessels_drinking_glass_inv.png new file mode 100644 index 0000000..9992bd9 Binary files /dev/null and b/mods/vessels/textures/vessels_drinking_glass_inv.png differ diff --git a/mods/vessels/textures/vessels_glass_bottle.png b/mods/vessels/textures/vessels_glass_bottle.png new file mode 100644 index 0000000..6ea37db Binary files /dev/null and b/mods/vessels/textures/vessels_glass_bottle.png differ diff --git a/mods/vessels/textures/vessels_glass_fragments.png b/mods/vessels/textures/vessels_glass_fragments.png new file mode 100644 index 0000000..7c6c488 Binary files /dev/null and b/mods/vessels/textures/vessels_glass_fragments.png differ diff --git a/mods/vessels/textures/vessels_shelf.png b/mods/vessels/textures/vessels_shelf.png new file mode 100644 index 0000000..87c69b2 Binary files /dev/null and b/mods/vessels/textures/vessels_shelf.png differ diff --git a/mods/vessels/textures/vessels_shelf_slot.png b/mods/vessels/textures/vessels_shelf_slot.png new file mode 100644 index 0000000..ff29082 Binary files /dev/null and b/mods/vessels/textures/vessels_shelf_slot.png differ diff --git a/mods/vessels/textures/vessels_steel_bottle.png b/mods/vessels/textures/vessels_steel_bottle.png new file mode 100644 index 0000000..61d3071 Binary files /dev/null and b/mods/vessels/textures/vessels_steel_bottle.png differ diff --git a/mods/walls/README.txt b/mods/walls/README.txt new file mode 100644 index 0000000..ba33bd7 --- /dev/null +++ b/mods/walls/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: walls +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Auke Kok (LGPLv2.1+) diff --git a/mods/walls/init.lua b/mods/walls/init.lua new file mode 100644 index 0000000..b2a163f --- /dev/null +++ b/mods/walls/init.lua @@ -0,0 +1,67 @@ +-- walls/init.lua + +walls = {} + +local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0 + +-- Load support for MT game translation. +local S = minetest.get_translator("walls") + +walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wall_sounds) + --make wall_texture_table paramenter backwards compatible for mods passing single texture + if type(wall_texture_table) ~= "table" then + wall_texture_table = { wall_texture_table } + end + -- inventory node, and pole-type wall start item + minetest.register_node(wall_name, { + description = wall_desc, + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, + -- connect_bottom = + connect_front = {-3/16, -1/2, -1/2, 3/16, 3/8, -1/4}, + connect_left = {-1/2, -1/2, -3/16, -1/4, 3/8, 3/16}, + connect_back = {-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}, + connect_right = { 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}, + }, + collision_box = { + type = "connected", + fixed = {-1/4, -1/2, -1/4, 1/4, 1/2 + fence_collision_extra, 1/4}, + -- connect_top = + -- connect_bottom = + connect_front = {-1/4,-1/2,-1/2,1/4,1/2 + fence_collision_extra,-1/4}, + connect_left = {-1/2,-1/2,-1/4,-1/4,1/2 + fence_collision_extra,1/4}, + connect_back = {-1/4,-1/2,1/4,1/4,1/2 + fence_collision_extra,1/2}, + connect_right = {1/4,-1/2,-1/4,1/2,1/2 + fence_collision_extra,1/4}, + }, + connects_to = { "group:wall", "group:stone", "group:fence" }, + paramtype = "light", + is_ground_content = false, + tiles = wall_texture_table, + walkable = true, + groups = { cracky = 3, wall = 1, stone = 2 }, + sounds = wall_sounds, + }) + + -- crafting recipe + minetest.register_craft({ + output = wall_name .. " 6", + recipe = { + { "", "", "" }, + { wall_mat, wall_mat, wall_mat}, + { wall_mat, wall_mat, wall_mat}, + } + }) + +end + +walls.register("walls:cobble", S("Cobblestone Wall"), {"default_cobble.png"}, + "default:cobble", default.node_sound_stone_defaults()) + +walls.register("walls:mossycobble", S("Mossy Cobblestone Wall"), {"default_mossycobble.png"}, + "default:mossycobble", default.node_sound_stone_defaults()) + +walls.register("walls:desertcobble", S("Desert Cobblestone Wall"), {"default_desert_cobble.png"}, + "default:desert_cobble", default.node_sound_stone_defaults()) + diff --git a/mods/walls/license.txt b/mods/walls/license.txt new file mode 100644 index 0000000..ccfaf1c --- /dev/null +++ b/mods/walls/license.txt @@ -0,0 +1,14 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2015 Auke Kok + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html diff --git a/mods/walls/locale/template.txt b/mods/walls/locale/template.txt new file mode 100644 index 0000000..6721dc6 --- /dev/null +++ b/mods/walls/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall= +Mossy Cobblestone Wall= +Desert Cobblestone Wall= diff --git a/mods/walls/locale/walls.de.tr b/mods/walls/locale/walls.de.tr new file mode 100644 index 0000000..76449f6 --- /dev/null +++ b/mods/walls/locale/walls.de.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Kopfsteinpflastermauer +Mossy Cobblestone Wall=Mosige Kopfsteinpflastermauer +Desert Cobblestone Wall=Wüstenkopfsteinpflastermauer diff --git a/mods/walls/locale/walls.es.tr b/mods/walls/locale/walls.es.tr new file mode 100644 index 0000000..796710f --- /dev/null +++ b/mods/walls/locale/walls.es.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Pared de adoquines +Mossy Cobblestone Wall=Pared de adoquines musgosos +Desert Cobblestone Wall=Pared de adoquines desérticos diff --git a/mods/walls/locale/walls.fr.tr b/mods/walls/locale/walls.fr.tr new file mode 100644 index 0000000..8dcb625 --- /dev/null +++ b/mods/walls/locale/walls.fr.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Mur en pavé +Mossy Cobblestone Wall=Mur en pavé moussu +Desert Cobblestone Wall=Mur en pavé du désert diff --git a/mods/walls/locale/walls.id.tr b/mods/walls/locale/walls.id.tr new file mode 100644 index 0000000..8bfd9c7 --- /dev/null +++ b/mods/walls/locale/walls.id.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Tembok Bongkahan Batu +Mossy Cobblestone Wall=Tembok Bongkahan Batu Berlumut +Desert Cobblestone Wall=Tembok Bongkahan Batu Gurun diff --git a/mods/walls/locale/walls.it.tr b/mods/walls/locale/walls.it.tr new file mode 100644 index 0000000..1ca3f88 --- /dev/null +++ b/mods/walls/locale/walls.it.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Muro di ciottoli +Mossy Cobblestone Wall=Muro di ciottoli muschiosi +Desert Cobblestone Wall=Muro di ciottoli del deserto \ No newline at end of file diff --git a/mods/walls/locale/walls.ms.tr b/mods/walls/locale/walls.ms.tr new file mode 100644 index 0000000..9375342 --- /dev/null +++ b/mods/walls/locale/walls.ms.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Pagar Batu Buntar +Mossy Cobblestone Wall=Pagar Batu Buntar Berlumut +Desert Cobblestone Wall=Pagar Batu Buntar Gurun diff --git a/mods/walls/locale/walls.ru.tr b/mods/walls/locale/walls.ru.tr new file mode 100644 index 0000000..1ed653f --- /dev/null +++ b/mods/walls/locale/walls.ru.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Булыжниковая Ограда +Mossy Cobblestone Wall=Мшистая Булыжниковая Ограда +Desert Cobblestone Wall=Ограда Из Пустынного Булыжника diff --git a/mods/walls/locale/walls.se.tr b/mods/walls/locale/walls.se.tr new file mode 100644 index 0000000..8cca00e --- /dev/null +++ b/mods/walls/locale/walls.se.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Kullerstens Vägg +Mossy Cobblestone Wall=Mossig Kullerstens Vägg +Desert Cobblestone Wall=Öken Kullerstens Vägg \ No newline at end of file diff --git a/mods/walls/locale/walls.sk.tr b/mods/walls/locale/walls.sk.tr new file mode 100644 index 0000000..69cf3a9 --- /dev/null +++ b/mods/walls/locale/walls.sk.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Múr z dlažbových kociek +Mossy Cobblestone Wall=Múr z dlažbových kociek obrastených machom +Desert Cobblestone Wall=Múr z púštnych dlažbových kociek diff --git a/mods/walls/locale/walls.zh_CN.tr b/mods/walls/locale/walls.zh_CN.tr new file mode 100644 index 0000000..f590e82 --- /dev/null +++ b/mods/walls/locale/walls.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=鹅卵石墙 +Mossy Cobblestone Wall=苔藓覆盖的鹅卵石墙 +Desert Cobblestone Wall=沙漠鹅卵石墙 diff --git a/mods/walls/locale/walls.zh_TW.tr b/mods/walls/locale/walls.zh_TW.tr new file mode 100644 index 0000000..ba1285f --- /dev/null +++ b/mods/walls/locale/walls.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=鵝卵石牆 +Mossy Cobblestone Wall=苔蘚覆蓋的鵝卵石牆 +Desert Cobblestone Wall=沙漠鵝卵石牆 diff --git a/mods/walls/mod.conf b/mods/walls/mod.conf new file mode 100644 index 0000000..9b8bbe8 --- /dev/null +++ b/mods/walls/mod.conf @@ -0,0 +1,3 @@ +name = walls +description = Minetest Game mod: walls +depends = default diff --git a/mods/weather/README.txt b/mods/weather/README.txt new file mode 100644 index 0000000..6733460 --- /dev/null +++ b/mods/weather/README.txt @@ -0,0 +1,4 @@ +Minetest Game mod: weather +========================== +See license.txt for license information. +Source code by paramat (MIT). diff --git a/mods/weather/init.lua b/mods/weather/init.lua new file mode 100644 index 0000000..3b9a305 --- /dev/null +++ b/mods/weather/init.lua @@ -0,0 +1,124 @@ +-- Disable by mapgen or setting + +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" or mg_name == "singlenode" or + minetest.settings:get_bool("enable_weather") == false then + return +end + + +-- Parameters + +local TSCALE = 600 -- Time scale of noise variation in seconds +local CYCLE = 8 -- Time period of cyclic clouds update in seconds + +local np_density = { + offset = 0.5, + scale = 0.5, + spread = {x = TSCALE, y = TSCALE, z = TSCALE}, + seed = 813, + octaves = 1, + persist = 0, + lacunarity = 2, +} + +local np_thickness = { + offset = 0.5, + scale = 0.5, + spread = {x = TSCALE, y = TSCALE, z = TSCALE}, + seed = 96, + octaves = 1, + persist = 0, + lacunarity = 2, +} + +local np_speedx = { + offset = 0, + scale = 1, + spread = {x = TSCALE, y = TSCALE, z = TSCALE}, + seed = 911923, + octaves = 1, + persist = 0, + lacunarity = 2, +} + +local np_speedz = { + offset = 0, + scale = 1, + spread = {x = TSCALE, y = TSCALE, z = TSCALE}, + seed = 5728, + octaves = 1, + persist = 0, + lacunarity = 2, +} + +-- End parameters + + +-- Initialise noise objects to nil + +local nobj_density = nil +local nobj_thickness = nil +local nobj_speedx = nil +local nobj_speedz = nil + + +-- Update clouds function + +local function rangelim(value, lower, upper) + return math.min(math.max(value, lower), upper) +end + +local os_time_0 = os.time() +local t_offset = math.random(0, 300000) + +local function update_clouds() + -- Time in seconds. + -- Add random time offset to avoid identical behaviour each server session. + local time = os.difftime(os.time(), os_time_0) - t_offset + + nobj_density = nobj_density or minetest.get_perlin(np_density) + nobj_thickness = nobj_thickness or minetest.get_perlin(np_thickness) + nobj_speedx = nobj_speedx or minetest.get_perlin(np_speedx) + nobj_speedz = nobj_speedz or minetest.get_perlin(np_speedz) + + local n_density = nobj_density:get_2d({x = time, y = 0}) -- 0 to 1 + local n_thickness = nobj_thickness:get_2d({x = time, y = 0}) -- 0 to 1 + local n_speedx = nobj_speedx:get_2d({x = time, y = 0}) -- -1 to 1 + local n_speedz = nobj_speedz:get_2d({x = time, y = 0}) -- -1 to 1 + + for _, player in ipairs(minetest.get_connected_players()) do + local humid = minetest.get_humidity(player:get_pos()) + -- Default and classic density value is 0.4, make this happen + -- at humidity midvalue 50 when n_density is at midvalue 0.5. + -- density_max = 0.25 at humid = 0. + -- density_max = 0.8 at humid = 50. + -- density_max = 1.35 at humid = 100. + local density_max = 0.8 + ((humid - 50) / 50) * 0.55 + player:set_clouds({ + -- Range limit density_max to always have occasional + -- small scattered clouds at extreme low humidity. + density = rangelim(density_max, 0.2, 1.0) * n_density, + thickness = math.max(math.floor( + rangelim(32 * humid / 100, 8, 32) * n_thickness + ), 2), + speed = {x = n_speedx * 4, z = n_speedz * 4}, + }) + end +end + + +local function cyclic_update() + update_clouds() + minetest.after(CYCLE, cyclic_update) +end + + +minetest.after(0, cyclic_update) + + +-- Update on player join to instantly alter clouds from the default + +minetest.register_on_joinplayer(function(player) + update_clouds() +end) diff --git a/mods/weather/license.txt b/mods/weather/license.txt new file mode 100644 index 0000000..33baa06 --- /dev/null +++ b/mods/weather/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2019 paramat + +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. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/weather/mod.conf b/mods/weather/mod.conf new file mode 100644 index 0000000..436ce67 --- /dev/null +++ b/mods/weather/mod.conf @@ -0,0 +1,2 @@ +name = weather +description = Minetest Game mod: weather diff --git a/mods/wool/README.txt b/mods/wool/README.txt new file mode 100644 index 0000000..a66677d --- /dev/null +++ b/mods/wool/README.txt @@ -0,0 +1,16 @@ +Minetest Game mod: wool +======================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +Cisoun (CC BY-SA 3.0): + wool_black.png wool_brown.png wool_dark_green.png wool_green.png + wool_magenta.png wool_pink.png wool_violet.png wool_yellow.png + wool_blue.png wool_cyan.png wool_dark_grey.png wool_grey.png + wool_orange.png wool_red.png wool_white.png diff --git a/mods/wool/init.lua b/mods/wool/init.lua new file mode 100644 index 0000000..4cf7dc3 --- /dev/null +++ b/mods/wool/init.lua @@ -0,0 +1,52 @@ +-- wool/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("wool") + +local dyes = dye.dyes + +for i = 1, #dyes do + local name, desc = unpack(dyes[i]) + + minetest.register_node("wool:" .. name, { + description = S(desc .. " Wool"), + tiles = {"wool_" .. name .. ".png"}, + is_ground_content = false, + groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, + flammable = 3, wool = 1}, + sounds = default.node_sound_defaults(), + }) + + minetest.register_craft{ + type = "shapeless", + output = "wool:" .. name, + recipe = {"group:dye,color_" .. name, "group:wool"}, + } +end + +-- Legacy +-- Backwards compatibility with jordach's 16-color wool mod +minetest.register_alias("wool:dark_blue", "wool:blue") +minetest.register_alias("wool:gold", "wool:yellow") + +-- Dummy calls to S() to allow translation scripts to detect the strings. +-- To update this run: +-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Wool")) end + +--[[ +S("White Wool") +S("Grey Wool") +S("Dark Grey Wool") +S("Black Wool") +S("Violet Wool") +S("Blue Wool") +S("Cyan Wool") +S("Dark Green Wool") +S("Green Wool") +S("Yellow Wool") +S("Brown Wool") +S("Orange Wool") +S("Red Wool") +S("Magenta Wool") +S("Pink Wool") +--]] diff --git a/mods/wool/license.txt b/mods/wool/license.txt new file mode 100644 index 0000000..9310163 --- /dev/null +++ b/mods/wool/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Cisoun + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/wool/locale/template.txt b/mods/wool/locale/template.txt new file mode 100644 index 0000000..316cd2c --- /dev/null +++ b/mods/wool/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool= +Grey Wool= +Dark Grey Wool= +Black Wool= +Violet Wool= +Blue Wool= +Cyan Wool= +Dark Green Wool= +Green Wool= +Yellow Wool= +Brown Wool= +Orange Wool= +Red Wool= +Magenta Wool= +Pink Wool= diff --git a/mods/wool/locale/wool.de.tr b/mods/wool/locale/wool.de.tr new file mode 100644 index 0000000..9b6b8ab --- /dev/null +++ b/mods/wool/locale/wool.de.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Weiße Wolle +Grey Wool=Graue Wolle +Dark Grey Wool=Dunkelgraue Wolle +Black Wool=Schwarze Wolle +Violet Wool=Violette Wolle +Blue Wool=Blaue Wolle +Cyan Wool=Türkise Wolle +Dark Green Wool=Dunkelgrüne Wolle +Green Wool=Grüne Wolle +Yellow Wool=Gelbe Wolle +Brown Wool=Braune Wolle +Orange Wool=Orange Wolle +Red Wool=Rote Wolle +Magenta Wool=Magenta Wolle +Pink Wool=Rosa Wolle diff --git a/mods/wool/locale/wool.es.tr b/mods/wool/locale/wool.es.tr new file mode 100644 index 0000000..ac15592 --- /dev/null +++ b/mods/wool/locale/wool.es.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Lana blanca +Grey Wool=Lana gris +Dark Grey Wool=Lana gris oscuro +Black Wool=Lana negra +Violet Wool=Lana violeta +Blue Wool=Lana azul +Cyan Wool=Lana cián +Dark Green Wool=Lana verde oscuro +Green Wool=Lana verde +Yellow Wool=Lana amarilla +Brown Wool=Lana marrón +Orange Wool=Lana naranja +Red Wool=Lana roja +Magenta Wool=Lana magenta +Pink Wool=Lana rosa diff --git a/mods/wool/locale/wool.fr.tr b/mods/wool/locale/wool.fr.tr new file mode 100644 index 0000000..48a60a7 --- /dev/null +++ b/mods/wool/locale/wool.fr.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Laine blanche +Grey Wool=Laine grise +Dark Grey Wool=Laine grise foncée +Black Wool=Laine noire +Violet Wool=Laine violette +Blue Wool=Laine bleue +Cyan Wool=Laine cyan +Dark Green Wool=Laine verte foncée +Green Wool=Laine verte +Yellow Wool=Laine jaune +Brown Wool=Laine marron +Orange Wool=Laine orange +Red Wool=Laine rouge +Magenta Wool=Laine magenta +Pink Wool=Laine rose diff --git a/mods/wool/locale/wool.id.tr b/mods/wool/locale/wool.id.tr new file mode 100644 index 0000000..60e917c --- /dev/null +++ b/mods/wool/locale/wool.id.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Wol Putih +Grey Wool=Wol Abu +Dark Grey Wool=Wol Abu Tua +Black Wool=Wol Hitam +Violet Wool=Wol Ungu +Blue Wool=Wol Biru +Cyan Wool=Wol Sian +Dark Green Wool=Wol Hijau Tua +Green Wool=Wol Hijau +Yellow Wool=Wol Kuning +Brown Wool=Wol Cokelat +Orange Wool=Wol Oranye +Red Wool=Wol Merah +Magenta Wool=Wol Magenta +Pink Wool=Wol Jambon diff --git a/mods/wool/locale/wool.it.tr b/mods/wool/locale/wool.it.tr new file mode 100644 index 0000000..628faf7 --- /dev/null +++ b/mods/wool/locale/wool.it.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Lana bianca +Grey Wool=Lana grigia +Dark Grey Wool=Lana grigia scura +Black Wool=Lana nera +Violet Wool=Lana viola +Blue Wool=Lana blu +Cyan Wool=Lana ciano +Dark Green Wool=Lana verde scura +Green Wool=Lana verde +Yellow Wool=Lana gialla +Brown Wool=Lana marrone +Orange Wool=Lana arancione +Red Wool=Lana rossa +Magenta Wool=Lana magenta +Pink Wool=Lana rosa \ No newline at end of file diff --git a/mods/wool/locale/wool.ms.tr b/mods/wool/locale/wool.ms.tr new file mode 100644 index 0000000..18b5480 --- /dev/null +++ b/mods/wool/locale/wool.ms.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Bulu Biri-Biri Putih +Grey Wool=Bulu Biri-Biri Kelabu +Dark Grey Wool=Bulu Biri-Biri Kelabu Gelap +Black Wool=Bulu Biri-Biri Hitam +Violet Wool=Bulu Biri-Biri Ungu +Blue Wool=Bulu Biri-Biri Biru +Cyan Wool=Bulu Biri-Biri Biru Kehijauan +Dark Green Wool=Bulu Biri-Biri Hijau Gelap +Green Wool=Bulu Biri-Biri Hijau +Yellow Wool=Bulu Biri-Biri Kuning +Brown Wool=Bulu Biri-Biri Perang +Orange Wool=Bulu Biri-Biri Jingga +Red Wool=Bulu Biri-Biri Merah +Magenta Wool=Bulu Biri-Biri Merah Lembayung +Pink Wool=Bulu Biri-Biri Merah Jambu diff --git a/mods/wool/locale/wool.ru.tr b/mods/wool/locale/wool.ru.tr new file mode 100644 index 0000000..f5a98aa --- /dev/null +++ b/mods/wool/locale/wool.ru.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Белая Шерсть +Grey Wool=Серая Шерсть +Dark Grey Wool=Тёмно-Серая Шерсть +Black Wool=Чёрная Шерсть +Violet Wool=Фиолетовая Шерсть +Blue Wool=Синяя Шерсть +Cyan Wool=Голубая Шерсть +Dark Green Wool=Тёмно-Зелёная Шерсть +Green Wool=Зелёная Шерсть +Yellow Wool=Жёлтая Шерсть +Brown Wool=Коричневая Шерсть +Orange Wool=Оранжевая Шерсть +Red Wool=Красная Шерсть +Magenta Wool=Пурпурная Шерсть +Pink Wool=Розовая Шерсть diff --git a/mods/wool/locale/wool.se.tr b/mods/wool/locale/wool.se.tr new file mode 100644 index 0000000..1d82e69 --- /dev/null +++ b/mods/wool/locale/wool.se.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Vit Ull +Grey Wool=Grå Ull +Dark Grey Wool=Mörk Grå Ull +Black Wool=Svart Ull +Violet Wool=Violett Ull +Blue Wool=Blå Ull +Cyan Wool=Cyan Ull +Dark Green Wool=Mörk Grön Ull +Green Wool=Grön Ull +Yellow Wool=Gul Ull +Brown Wool=Brun Ull +Orange Wool=Orange Ull +Red Wool=Röd Ull +Magenta Wool=Magenta Ull +Pink Wool=Rosa Ull \ No newline at end of file diff --git a/mods/wool/locale/wool.sk.tr b/mods/wool/locale/wool.sk.tr new file mode 100644 index 0000000..755370e --- /dev/null +++ b/mods/wool/locale/wool.sk.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Biela vlna +Grey Wool=Šedá vlna +Dark Grey Wool=Tmavošedá vlna +Black Wool=Čierna vlna +Violet Wool=Fialová vlna +Blue Wool=Modrá vlna +Cyan Wool=Tyrkysová vlna +Dark Green Wool=Tmavozelená vlna +Green Wool=Zelená vlna +Yellow Wool=Žltá vlna +Brown Wool=Hnedá vlna +Orange Wool=Oranžová vlna +Red Wool=Červená vlna +Magenta Wool=Purpurová vlna +Pink Wool=Ružová vlna diff --git a/mods/wool/locale/wool.zh_CN.tr b/mods/wool/locale/wool.zh_CN.tr new file mode 100644 index 0000000..caac9ee --- /dev/null +++ b/mods/wool/locale/wool.zh_CN.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=白羊毛 +Grey Wool=灰羊毛 +Dark Grey Wool=暗灰羊毛 +Black Wool=黑羊毛 +Violet Wool=紫羊毛 +Blue Wool=蓝羊毛 +Cyan Wool=青羊毛 +Dark Green Wool=暗绿羊毛 +Green Wool=绿羊毛 +Yellow Wool=黄羊毛 +Brown Wool=棕羊毛 +Orange Wool=橙羊毛 +Red Wool=红羊毛 +Magenta Wool=品红羊毛 +Pink Wool=粉红羊毛 diff --git a/mods/wool/locale/wool.zh_TW.tr b/mods/wool/locale/wool.zh_TW.tr new file mode 100644 index 0000000..290a1fe --- /dev/null +++ b/mods/wool/locale/wool.zh_TW.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=白羊毛 +Grey Wool=灰羊毛 +Dark Grey Wool=暗灰羊毛 +Black Wool=黑羊毛 +Violet Wool=紫羊毛 +Blue Wool=藍羊毛 +Cyan Wool=青羊毛 +Dark Green Wool=暗綠羊毛 +Green Wool=綠羊毛 +Yellow Wool=黃羊毛 +Brown Wool=棕羊毛 +Orange Wool=橙羊毛 +Red Wool=紅羊毛 +Magenta Wool=品紅羊毛 +Pink Wool=粉紅羊毛 diff --git a/mods/wool/mod.conf b/mods/wool/mod.conf new file mode 100644 index 0000000..a0ca3f0 --- /dev/null +++ b/mods/wool/mod.conf @@ -0,0 +1,3 @@ +name = wool +description = Minetest Game mod: wool +depends = default, dye diff --git a/mods/wool/textures/wool_black.png b/mods/wool/textures/wool_black.png new file mode 100644 index 0000000..700d439 Binary files /dev/null and b/mods/wool/textures/wool_black.png differ diff --git a/mods/wool/textures/wool_blue.png b/mods/wool/textures/wool_blue.png new file mode 100644 index 0000000..a074986 Binary files /dev/null and b/mods/wool/textures/wool_blue.png differ diff --git a/mods/wool/textures/wool_brown.png b/mods/wool/textures/wool_brown.png new file mode 100644 index 0000000..2620dfd Binary files /dev/null and b/mods/wool/textures/wool_brown.png differ diff --git a/mods/wool/textures/wool_cyan.png b/mods/wool/textures/wool_cyan.png new file mode 100644 index 0000000..395b6ac Binary files /dev/null and b/mods/wool/textures/wool_cyan.png differ diff --git a/mods/wool/textures/wool_dark_green.png b/mods/wool/textures/wool_dark_green.png new file mode 100644 index 0000000..0e73999 Binary files /dev/null and b/mods/wool/textures/wool_dark_green.png differ diff --git a/mods/wool/textures/wool_dark_grey.png b/mods/wool/textures/wool_dark_grey.png new file mode 100644 index 0000000..7253696 Binary files /dev/null and b/mods/wool/textures/wool_dark_grey.png differ diff --git a/mods/wool/textures/wool_green.png b/mods/wool/textures/wool_green.png new file mode 100644 index 0000000..dcb663b Binary files /dev/null and b/mods/wool/textures/wool_green.png differ diff --git a/mods/wool/textures/wool_grey.png b/mods/wool/textures/wool_grey.png new file mode 100644 index 0000000..2f4c338 Binary files /dev/null and b/mods/wool/textures/wool_grey.png differ diff --git a/mods/wool/textures/wool_magenta.png b/mods/wool/textures/wool_magenta.png new file mode 100644 index 0000000..5c2c4a7 Binary files /dev/null and b/mods/wool/textures/wool_magenta.png differ diff --git a/mods/wool/textures/wool_orange.png b/mods/wool/textures/wool_orange.png new file mode 100644 index 0000000..a059f36 Binary files /dev/null and b/mods/wool/textures/wool_orange.png differ diff --git a/mods/wool/textures/wool_pink.png b/mods/wool/textures/wool_pink.png new file mode 100644 index 0000000..8e90140 Binary files /dev/null and b/mods/wool/textures/wool_pink.png differ diff --git a/mods/wool/textures/wool_red.png b/mods/wool/textures/wool_red.png new file mode 100644 index 0000000..da12ecf Binary files /dev/null and b/mods/wool/textures/wool_red.png differ diff --git a/mods/wool/textures/wool_violet.png b/mods/wool/textures/wool_violet.png new file mode 100644 index 0000000..d7d6783 Binary files /dev/null and b/mods/wool/textures/wool_violet.png differ diff --git a/mods/wool/textures/wool_white.png b/mods/wool/textures/wool_white.png new file mode 100644 index 0000000..88f1e2f Binary files /dev/null and b/mods/wool/textures/wool_white.png differ diff --git a/mods/wool/textures/wool_yellow.png b/mods/wool/textures/wool_yellow.png new file mode 100644 index 0000000..2b0f048 Binary files /dev/null and b/mods/wool/textures/wool_yellow.png differ diff --git a/mods/xpanes/README.txt b/mods/xpanes/README.txt new file mode 100644 index 0000000..0e34d23 --- /dev/null +++ b/mods/xpanes/README.txt @@ -0,0 +1,32 @@ +Minetest Game mod: xpanes +========================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by xyz (MIT) +BlockMen (MIT) +sofar (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +xyz (CC BY-SA 3.0): + All textures not mentioned below. + +Gambit (CC BY-SA 3.0): + xpanes_bar.png + +paramat (CC BY-SA 3.0): + xpanes_bar_top.png + +Krock (CC0 1.0): + xpanes_edge.png + +TumeniNodes (CC BY-SA 3.0): + xpanes_door_steel_bar.png + xpanes_item_steel_bar.png + xpanes_trapdoor_steel_bar.png + xpanes_trapdoor_steel_bar_side.png + xpanes_steel_bar_door_close.ogg + xpanes_steel_bar_door_open.ogg diff --git a/mods/xpanes/init.lua b/mods/xpanes/init.lua new file mode 100644 index 0000000..e195dbb --- /dev/null +++ b/mods/xpanes/init.lua @@ -0,0 +1,257 @@ +-- xpanes/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("xpanes") + + +local function is_pane(pos) + return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0 +end + +local function connects_dir(pos, name, dir) + local aside = vector.add(pos, minetest.facedir_to_dir(dir)) + if is_pane(aside) then + return true + end + + local connects_to = minetest.registered_nodes[name].connects_to + if not connects_to then + return false + end + local list = minetest.find_nodes_in_area(aside, aside, connects_to) + + if #list > 0 then + return true + end + + return false +end + +local function swap(pos, node, name, param2) + if node.name == name and node.param2 == param2 then + return + end + + minetest.swap_node(pos, {name = name, param2 = param2}) +end + +local function update_pane(pos) + if not is_pane(pos) then + return + end + local node = minetest.get_node(pos) + local name = node.name + if name:sub(-5) == "_flat" then + name = name:sub(1, -6) + end + + local any = node.param2 + local c = {} + local count = 0 + for dir = 0, 3 do + c[dir] = connects_dir(pos, name, dir) + if c[dir] then + any = dir + count = count + 1 + end + end + + if count == 0 then + swap(pos, node, name .. "_flat", any) + elseif count == 1 then + swap(pos, node, name .. "_flat", (any + 1) % 4) + elseif count == 2 then + if (c[0] and c[2]) or (c[1] and c[3]) then + swap(pos, node, name .. "_flat", (any + 1) % 4) + else + swap(pos, node, name, 0) + end + else + swap(pos, node, name, 0) + end +end + +minetest.register_on_placenode(function(pos, node) + if minetest.get_item_group(node, "pane") then + update_pane(pos) + end + for i = 0, 3 do + local dir = minetest.facedir_to_dir(i) + update_pane(vector.add(pos, dir)) + end +end) + +minetest.register_on_dignode(function(pos) + for i = 0, 3 do + local dir = minetest.facedir_to_dir(i) + update_pane(vector.add(pos, dir)) + end +end) + +xpanes = {} +function xpanes.register_pane(name, def) + for i = 1, 15 do + minetest.register_alias("xpanes:" .. name .. "_" .. i, "xpanes:" .. name .. "_flat") + end + + local flatgroups = table.copy(def.groups) + flatgroups.pane = 1 + minetest.register_node(":xpanes:" .. name .. "_flat", { + description = def.description, + drawtype = "nodebox", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + inventory_image = def.inventory_image, + wield_image = def.wield_image, + paramtype2 = "facedir", + tiles = { + def.textures[3], + def.textures[3], + def.textures[3], + def.textures[3], + def.textures[1], + def.textures[1] + }, + groups = flatgroups, + drop = "xpanes:" .. name .. "_flat", + sounds = def.sounds, + use_texture_alpha = def.use_texture_alpha or false, + node_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + selection_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + connect_sides = { "left", "right" }, + }) + + local groups = table.copy(def.groups) + groups.pane = 1 + groups.not_in_creative_inventory = 1 + minetest.register_node(":xpanes:" .. name, { + drawtype = "nodebox", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + description = def.description, + tiles = { + def.textures[3], + def.textures[3], + def.textures[1] + }, + groups = groups, + drop = "xpanes:" .. name .. "_flat", + sounds = def.sounds, + use_texture_alpha = def.use_texture_alpha or false, + node_box = { + type = "connected", + fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}}, + connect_front = {{-1/32, -1/2, -1/2, 1/32, 1/2, -1/32}}, + connect_left = {{-1/2, -1/2, -1/32, -1/32, 1/2, 1/32}}, + connect_back = {{-1/32, -1/2, 1/32, 1/32, 1/2, 1/2}}, + connect_right = {{1/32, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + connects_to = {"group:pane", "group:stone", "group:glass", "group:wood", "group:tree"}, + }) + + minetest.register_craft({ + output = "xpanes:" .. name .. "_flat 16", + recipe = def.recipe + }) +end + +xpanes.register_pane("pane", { + description = S("Glass Pane"), + textures = {"default_glass.png", "", "xpanes_edge.png"}, + inventory_image = "default_glass.png", + wield_image = "default_glass.png", + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2, cracky=3, oddly_breakable_by_hand=3}, + recipe = { + {"default:glass", "default:glass", "default:glass"}, + {"default:glass", "default:glass", "default:glass"} + } +}) + +xpanes.register_pane("obsidian_pane", { + description = S("Obsidian Glass Pane"), + textures = {"default_obsidian_glass.png", "", "xpanes_edge_obsidian.png"}, + inventory_image = "default_obsidian_glass.png", + wield_image = "default_obsidian_glass.png", + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2, cracky=3}, + recipe = { + {"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"} + } +}) + +xpanes.register_pane("bar", { + description = S("Steel Bars"), + textures = {"xpanes_bar.png", "", "xpanes_bar_top.png"}, + inventory_image = "xpanes_bar.png", + wield_image = "xpanes_bar.png", + groups = {cracky=2}, + sounds = default.node_sound_metal_defaults(), + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} + } +}) + +minetest.register_lbm({ + name = "xpanes:gen2", + nodenames = {"group:pane"}, + action = function(pos, node) + update_pane(pos) + for i = 0, 3 do + local dir = minetest.facedir_to_dir(i) + update_pane(vector.add(pos, dir)) + end + end +}) + +-- Register steel bar doors and trapdoors + +if minetest.get_modpath("doors") then + + doors.register("xpanes:door_steel_bar", { + tiles = {{name = "xpanes_door_steel_bar.png", backface_culling = true}}, + description = S("Steel Bar Door"), + inventory_image = "xpanes_item_steel_bar.png", + protected = true, + groups = {node = 1, cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), + sound_open = "xpanes_steel_bar_door_open", + sound_close = "xpanes_steel_bar_door_close", + recipe = { + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + }, + }) + + doors.register_trapdoor("xpanes:trapdoor_steel_bar", { + description = S("Steel Bar Trapdoor"), + inventory_image = "xpanes_trapdoor_steel_bar.png", + wield_image = "xpanes_trapdoor_steel_bar.png", + tile_front = "xpanes_trapdoor_steel_bar.png", + tile_side = "xpanes_trapdoor_steel_bar_side.png", + protected = true, + groups = {node = 1, cracky = 1, level = 2, door = 1}, + sounds = default.node_sound_metal_defaults(), + sound_open = "xpanes_steel_bar_door_open", + sound_close = "xpanes_steel_bar_door_close", + }) + + minetest.register_craft({ + output = "xpanes:trapdoor_steel_bar", + recipe = { + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + } + }) +end diff --git a/mods/xpanes/license.txt b/mods/xpanes/license.txt new file mode 100644 index 0000000..7e922b9 --- /dev/null +++ b/mods/xpanes/license.txt @@ -0,0 +1,65 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 xyz +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2016 Auke Kok +Copyright (C) 2014-2016 Various Minetest developers and contributors + +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. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 xyz +Copyright (C) 2013-2016 Gambit +Copyright (C) 2016 paramat +Copyright (C) 2019 TumeniNodes + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/xpanes/locale/template.txt b/mods/xpanes/locale/template.txt new file mode 100644 index 0000000..08dfbba --- /dev/null +++ b/mods/xpanes/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane= +Obsidian Glass Pane= +Steel Bars= +Steel Bar Door= +Steel Bar Trapdoor= diff --git a/mods/xpanes/locale/xpanes.de.tr b/mods/xpanes/locale/xpanes.de.tr new file mode 100644 index 0000000..9852753 --- /dev/null +++ b/mods/xpanes/locale/xpanes.de.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Glasscheibe +Obsidian Glass Pane=Obsidianglasscheibe +Steel Bars=Stahlgitter +Steel Bar Door=Stahlgittertür +Steel Bar Trapdoor=Stahlgitterfalltür diff --git a/mods/xpanes/locale/xpanes.es.tr b/mods/xpanes/locale/xpanes.es.tr new file mode 100644 index 0000000..9902be7 --- /dev/null +++ b/mods/xpanes/locale/xpanes.es.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Panel de vidrio +Obsidian Glass Pane=Panel de vidrio de obsidiana +Steel Bars=Barras de acero +Steel Bar Door=Puerta de barras de acero +Steel Bar Trapdoor=Trampilla de barras de acero diff --git a/mods/xpanes/locale/xpanes.fr.tr b/mods/xpanes/locale/xpanes.fr.tr new file mode 100644 index 0000000..c751799 --- /dev/null +++ b/mods/xpanes/locale/xpanes.fr.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Panneau de verre +Obsidian Glass Pane=Panneau de verre d'obsidienne +Steel Bars=Barreaux d'acier +Steel Bar Door=Porte en barreaux d'acier +Steel Bar Trapdoor=Trappe en barreaux d'acier diff --git a/mods/xpanes/locale/xpanes.id.tr b/mods/xpanes/locale/xpanes.id.tr new file mode 100644 index 0000000..906cc0f --- /dev/null +++ b/mods/xpanes/locale/xpanes.id.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Panel Kaca +Obsidian Glass Pane=Panel Kaca Obsidian +Steel Bars=Batang Baja +Steel Bar Door=Pintu Batang Baja +Steel Bar Trapdoor=Pintu Kolong Batang Baja diff --git a/mods/xpanes/locale/xpanes.it.tr b/mods/xpanes/locale/xpanes.it.tr new file mode 100644 index 0000000..7b73968 --- /dev/null +++ b/mods/xpanes/locale/xpanes.it.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Pannello di vetro +Obsidian Glass Pane=Pannello di vetro d'ossidiana +Steel Bars=Sbarre d'acciaio +Steel Bar Door=Porta con sbarre d'acciaio +Steel Bar Trapdoor=Botola con sbarre d'acciaio \ No newline at end of file diff --git a/mods/xpanes/locale/xpanes.ms.tr b/mods/xpanes/locale/xpanes.ms.tr new file mode 100644 index 0000000..dedfefa --- /dev/null +++ b/mods/xpanes/locale/xpanes.ms.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Kaca Tingkap +Obsidian Glass Pane=Kaca Tingkap Obsidia +Steel Bars=Jeriji Keluli +Steel Bar Door=Pintu Jeriji Keluli +Steel Bar Trapdoor=Pintu Kolong Jeriji Keluli diff --git a/mods/xpanes/locale/xpanes.ru.tr b/mods/xpanes/locale/xpanes.ru.tr new file mode 100644 index 0000000..166c62d --- /dev/null +++ b/mods/xpanes/locale/xpanes.ru.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Стеклянная Панель +Obsidian Glass Pane=Стеклянная Панель Из Обсидиана +Steel Bars=Стальная Решётка +Steel Bar Door=Стальная Решётчатая Дверь +Steel Bar Trapdoor=Стальной Решётчатый Люк diff --git a/mods/xpanes/locale/xpanes.se.tr b/mods/xpanes/locale/xpanes.se.tr new file mode 100644 index 0000000..fc3bbfe --- /dev/null +++ b/mods/xpanes/locale/xpanes.se.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Glasruta +Obsidian Glass Pane=Obsidian Glasruta +Steel Bars=Stålgaller +Steel Bar Door=Stålgallers Dörr +Steel Bar Trapdoor=Stålgallers Fallucka \ No newline at end of file diff --git a/mods/xpanes/locale/xpanes.sk.tr b/mods/xpanes/locale/xpanes.sk.tr new file mode 100644 index 0000000..0d07e08 --- /dev/null +++ b/mods/xpanes/locale/xpanes.sk.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Tabuľa skla +Obsidian Glass Pane=Tabuľa obsidiánového skla +Steel Bars=Oceľové mreže +Steel Bar Door=Dvere z oceľových mreží +Steel Bar Trapdoor=Padajúce dvere z oceľových mreží diff --git a/mods/xpanes/locale/xpanes.zh_CN.tr b/mods/xpanes/locale/xpanes.zh_CN.tr new file mode 100644 index 0000000..7b1871c --- /dev/null +++ b/mods/xpanes/locale/xpanes.zh_CN.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=玻璃窗 +Obsidian Glass Pane=黑曜石玻璃窗 +Steel Bars=钢筋 +Steel Bar Door=钢筋门 +Steel Bar Trapdoor=钢筋活板门 diff --git a/mods/xpanes/locale/xpanes.zh_TW.tr b/mods/xpanes/locale/xpanes.zh_TW.tr new file mode 100644 index 0000000..97ee7a2 --- /dev/null +++ b/mods/xpanes/locale/xpanes.zh_TW.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=玻璃窗 +Obsidian Glass Pane=黑曜石玻璃窗 +Steel Bars=鋼筋 +Steel Bar Door=鋼筋門 +Steel Bar Trapdoor=鋼筋活板門 diff --git a/mods/xpanes/mod.conf b/mods/xpanes/mod.conf new file mode 100644 index 0000000..dcb0716 --- /dev/null +++ b/mods/xpanes/mod.conf @@ -0,0 +1,4 @@ +name = xpanes +description = Minetest Game mod: xpanes +depends = default +optional_depends = doors diff --git a/mods/xpanes/sounds/xpanes_steel_bar_door_close.ogg b/mods/xpanes/sounds/xpanes_steel_bar_door_close.ogg new file mode 100644 index 0000000..0620bfb Binary files /dev/null and b/mods/xpanes/sounds/xpanes_steel_bar_door_close.ogg differ diff --git a/mods/xpanes/sounds/xpanes_steel_bar_door_open.ogg b/mods/xpanes/sounds/xpanes_steel_bar_door_open.ogg new file mode 100644 index 0000000..d159be9 Binary files /dev/null and b/mods/xpanes/sounds/xpanes_steel_bar_door_open.ogg differ diff --git a/mods/xpanes/textures/xpanes_bar.png b/mods/xpanes/textures/xpanes_bar.png new file mode 100644 index 0000000..3ea62a9 Binary files /dev/null and b/mods/xpanes/textures/xpanes_bar.png differ diff --git a/mods/xpanes/textures/xpanes_bar_top.png b/mods/xpanes/textures/xpanes_bar_top.png new file mode 100644 index 0000000..2955d72 Binary files /dev/null and b/mods/xpanes/textures/xpanes_bar_top.png differ diff --git a/mods/xpanes/textures/xpanes_door_steel_bar.png b/mods/xpanes/textures/xpanes_door_steel_bar.png new file mode 100644 index 0000000..435af14 Binary files /dev/null and b/mods/xpanes/textures/xpanes_door_steel_bar.png differ diff --git a/mods/xpanes/textures/xpanes_edge.png b/mods/xpanes/textures/xpanes_edge.png new file mode 100644 index 0000000..5768d66 Binary files /dev/null and b/mods/xpanes/textures/xpanes_edge.png differ diff --git a/mods/xpanes/textures/xpanes_edge_obsidian.png b/mods/xpanes/textures/xpanes_edge_obsidian.png new file mode 100644 index 0000000..abdd14e Binary files /dev/null and b/mods/xpanes/textures/xpanes_edge_obsidian.png differ diff --git a/mods/xpanes/textures/xpanes_item_steel_bar.png b/mods/xpanes/textures/xpanes_item_steel_bar.png new file mode 100644 index 0000000..d1ddadd Binary files /dev/null and b/mods/xpanes/textures/xpanes_item_steel_bar.png differ diff --git a/mods/xpanes/textures/xpanes_trapdoor_steel_bar.png b/mods/xpanes/textures/xpanes_trapdoor_steel_bar.png new file mode 100644 index 0000000..de4b494 Binary files /dev/null and b/mods/xpanes/textures/xpanes_trapdoor_steel_bar.png differ diff --git a/mods/xpanes/textures/xpanes_trapdoor_steel_bar_side.png b/mods/xpanes/textures/xpanes_trapdoor_steel_bar_side.png new file mode 100644 index 0000000..a71231e Binary files /dev/null and b/mods/xpanes/textures/xpanes_trapdoor_steel_bar_side.png differ