diff --git a/mods/README.md b/mods/README.md index 14ffdaf..8fd3fdb 100644 --- a/mods/README.md +++ b/mods/README.md @@ -5,39 +5,46 @@ For information check [../README.md](../README.md) ## Content -* api -* beds -* butterflies -* default -* doors -* dungeon_loot -* farming -* fire -* give_initial_stuff -* bucket -* map -* bones -* fireflies -* player_api -* stairs -* wool -* binoculars -* carts -* dye -* flowers -* screwdriver -* tnt -* xpanes -* boats -* creative -* env_sounds -* game_commands -* sethome -* sfinv -* spawn -* weather -* vessels -* walls +| mod name | origin or work | version | info | +| ------------------ | --------------------------------------------------- | -------- | --- | +| api | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | [api](../game_api.md) | +| beds | https://codeberg.org/minenux/minetest-mod-beds | https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef | [beds/README.md](beds/README.md) | +| boats | https://codeberg.org/minenux/minetest-mod-boats | https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f | [boats/README.md](boats/README.md) | +| bucket | https://codeberg.org/minenux/minetest-mod-bucket.git | https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5 | [bucket/README.md](bucket/README.md) | +| butterflies | https://codeberg.org/minenux/minetest-mod-bucket.git | https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5 | [bucket/README.md](bucket/README.md) | +| bones | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| binoculars | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| carts | https://codeberg.org/minenux/minetest-mod-carts | https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933 | [carts/README.md](carts/README.md) | +| creative | https://codeberg.org/minenux/minetest-mod-creative | https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db | [creative/README.md](creative/README.md) | +| default | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| player_api | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| set_home | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| env_sounds | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| game_commands | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| spawn | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| doors | https://codeberg.org/minenux/minetest-mod-doors | https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b | [doors/README.md](doors/README.md) | +| dungeon_loot | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| dye | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| farming | https://codeberg.org/minenux/minetest-mod-farming | https://codeberg.org/minenux/minetest-mod-farming/commit/00e4b3cb89d3c1b1d66b6af4821191c1d667e1bc | [farming/README.md](farming/README.md) | +| fire | https://codeberg.org/minenux/minetest-mod-fire | https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2 | [fire/README.md](fire/README.md) | +| fireflies | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| flowers | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| give_initial_stuff | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/ee86fb1c41e7d8d2a1d94764dd64808bc8ff5999 | [give_initial_stuff/README.md](give_initial_stuff/README.md) | +| killme | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| sfinv | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| stairs | https://codeberg.org/minenux/minetest-mod-stairs | https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110 | [stairs/README.md](stairs/README.md) | +| screwdriver | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| tnt | https://codeberg.org/minenux/minetest-mod-tnt | https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027 | [tnt/README.md](tnt/README.md) | +| vessels | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| walls | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| weather | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | +| wool | https://codeberg.org/minenux/minetest-mod-wool | https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a | [wool/README.md](wool/README.md) | +| xpanes | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | + +The default mod was splitted now sethome and player_api are mods, binoculars from v5 are +just separate privilegies for zoom, butterflies and fireflies from v5 can be set +by dmobs or mobs_doomed mod, the spawn mod is just minimal spawn management +pooly provided and better managed by mods like rspawn and spawnrandom. ## Compatibility @@ -46,3 +53,8 @@ from https://codeberg.org/minenux/minetest-engine/src/branch/stable-5.2 Additionally, when the Minetest5 engine is tagged to be a certain version (e.g. 5.2.1), Minetest Game is tagged with the version 5.2.1 too. +For minetest4 check https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0 + +## Licensing + +See `LICENSE.txt` diff --git a/mods/beds/Changelog.txt b/mods/beds/Changelog.txt new file mode 100644 index 0000000..c9d005c --- /dev/null +++ b/mods/beds/Changelog.txt @@ -0,0 +1,26 @@ +1.0.1 beta +---------- +- Add backwards compatibility with PilzAdam's beds mod +- Fix placement +- Fix small bugs +- Prevent possible crash + +1.1 +--- +- Add fancy bed model (based on jp's model) +- Add API to register beds +- Allow players always to detach from bed (by donat-b) +- If more than 50% of players want sleep they can skip the night +- Don't show sleep dialog in singleplayer + +1.1.1 +----- +- Prevent possbile crash by trying to reposition leaving players + +1.2 +--- +- Updated to use default bed functions +- Texture check to fix beds using old api +- 'bed_sleep_divide' setting added [1 for all, 2 for half, 3 for third] +- Add POVA support +- Add pink fancy bed and blue simple bed diff --git a/mods/beds/README.md b/mods/beds/README.md new file mode 100644 index 0000000..64f0790 --- /dev/null +++ b/mods/beds/README.md @@ -0,0 +1,96 @@ +minetest mod Beds +========================= + +This mod improves beds which allows sleep, featured to (auto) skip the night. + +Information +----------- + +This mod is named `beds` to sleep, by rightclick the bed. It featured +in singleplayer mode that the night gets skipped immediately. If playing +in multiplayer you get shown how many other players are in bed too, +if all players are sleeping the night gets skipped. + +![screenshot.jpg](screenshot.jpg) + +Tech information +---------------- + +This mod sustitute default one, you must disable the default of minetest +game if present or override it. + +#### Features + +* Night Skypping: + +This mod auto featured night skip in singleplayer, in multiplayer it skipped +if more than a set percentage (default 50%) of the players are lying +in bed and use this option. Check configuration section for more info. + +* 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. Check configuration section for more info. + +* More beds: + +It features two more beds, the "Blue Simple Bed" like the "Simple Bed" +but in blue, and the "Pink Fancy Bed" like the "Fancy Bed" but in pink. + +#### Dependencies + +* default +* player_api (for newer engines) + +Optional dependences: + +* intllib (only for older engines) +* pova (optional) + +The pova mod are not xplicit set as optional depends, due the circular depends bug, +its detected and used. + +#### Configuration + +| Configuration | type | default | place file | Notes about | +| --------------------- | ----- | ------- | ------------ | ----------------------------------------- | +| enable_bed_respawn | bool | true | minetest.conf | Enable respawn point set to last sleep bed | +| enable_bed_night_skip | bool | false | minetest.conf | You can disable the night skip feature | +| bed_sleep_divide | int | 2 | minetest.conf | Division of players needed to skip night | + +#### Nodes + +Crafting are same as original default mod, but colored uses a white plus the other color. + +| Node name | Description name | +| ----------------------- | --------------------- | +| beds:bed | Simple bed | +| beds:bed_blue | Simple bed blue | +| beds:fancy_bed | Fancy shaped bed | +| beds:fancy_bed_pink | Fancy shaped bed pink | + +#### Nodes and Aliasing + +| mod name : node name | new mod name : new node | +| --------------------------- | ----------------------- | +| beds:bed_top_red | beds:bed_top | +| beds:bed_bottom_red | beds:bed_bottom | + +License +------ + +### 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 + +JP (WTFPL) + All models unless otherwise noted + +Check [license.txt](license.txt) diff --git a/mods/beds/README.txt b/mods/beds/README.txt deleted file mode 100644 index 7b35e14..0000000 --- a/mods/beds/README.txt +++ /dev/null @@ -1,30 +0,0 @@ -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 index cab2def..dde678e 100644 --- a/mods/beds/api.lua +++ b/mods/beds/api.lua @@ -1,63 +1,62 @@ -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", { + + local new_tiles + local new_mesh = "beds_simple_bed.obj" + + -- old api texture check + if def.tiles and def.tiles.bottom then + + new_tiles = "beds_simple_bed.png" -- default + + -- check for fancy bed + if def.nodebox and def.nodebox.bottom and #def.nodebox.bottom > 3 then + new_tiles = "beds_fancy_bed.png" + new_mesh = "beds_fancy_bed.obj" + end + end + + -- register bed node + minetest.register_node(name, { description = def.description, inventory_image = def.inventory_image, wield_image = def.wield_image, - drawtype = "nodebox", - tiles = def.tiles.bottom, + drawtype = "mesh", + mesh = def.mesh or new_mesh, + tiles = new_tiles or def.tiles, 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, + groups = { + choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1, + fall_damage_add_percent = -40, bouncy = 85 }, + sounds = default.node_sound_wood_defaults(), selection_box = { type = "fixed", - fixed = def.selectionbox, + fixed = def.selectionbox + }, + collision_box = { + type = "fixed", + fixed = def.collisionbox }, 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 + + 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 @@ -66,13 +65,16 @@ function beds.register_bed(name, def) 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 + 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 @@ -81,100 +83,46 @@ function beds.register_bed(name, def) 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 + 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}) + minetest.set_node(pos, {name = name, param2 = dir}) - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) then + if not beds.is_creative(player_name) then itemstack:take_item() end + return itemstack end, + on_rightclick = function(pos, node, clicker) + beds.on_rightclick(pos, clicker) + end, + on_destruct = function(pos) - destruct_bed(pos, 1) + beds.remove_spawns_at(pos) 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, + 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}, - 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_alias(name .. "_bottom", name) + minetest.register_alias(name .. "_top", "air") + -- register recipe minetest.register_craft({ output = name, recipe = def.recipe diff --git a/mods/beds/beds.lua b/mods/beds/beds.lua index dc044a3..f544839 100644 --- a/mods/beds/beds.lua +++ b/mods/beds/beds.lua @@ -1,6 +1,3 @@ --- beds/beds.lua - --- support for MT game translation. local S = beds.get_translator -- Fancy shaped bed @@ -9,49 +6,30 @@ 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}, + tiles = {"beds_fancy_bed.png", "default_wood.png"}, + mesh = "beds_fancy_bed.obj", + selectionbox = {-0.5, -0.5, -0.5, 0.5, -0.06, 1.5}, + collisionbox = {-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"}, - }, + {"group:wood", "group:wood", "group:wood"} + } +}) + +beds.register_bed("beds:fancy_bed_pink", { + description = S("Pink Fancy Bed"), + inventory_image = "beds_bed_fancy_pink.png", + wield_image = "beds_bed_fancy_pink.png", + tiles = {"beds_fancy_bed_pink.png", "default_wood.png"}, + mesh = "beds_fancy_bed.obj", + selectionbox = {-0.5, -0.5, -0.5, 0.5, -0.06, 1.5}, + collisionbox = {-0.5, -0.5, -0.5, 0.5, -0.06, 1.5}, + recipe = { + {"", "", "group:stick"}, + {"wool:pink", "wool:pink", "wool:white"}, + {"group:wood", "group:wood", "group:wood"} + } }) -- Simple shaped bed @@ -60,33 +38,28 @@ 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}, + tiles = {"beds_simple_bed.png"}, + mesh = "beds_simple_bed.obj", + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, + collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, recipe = { {"wool:white", "wool:white", "wool:white"}, {"group:wood", "group:wood", "group:wood"} - }, + } +}) + +beds.register_bed("beds:bed_blue", { + description = S("Blue Simple Bed"), + inventory_image = "beds_bed_blue.png", + wield_image = "beds_bed_blue.png", + tiles = {"beds_simple_bed_blue.png"}, + mesh = "beds_simple_bed.obj", + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, + collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, + recipe = { + {"wool:blue", "wool:blue", "wool:white"}, + {"group:wood", "group:wood", "group:wood"} + } }) -- Aliases for PilzAdam's beds mod @@ -98,12 +71,12 @@ minetest.register_alias("beds:bed_top_red", "beds:bed_top") minetest.register_craft({ type = "fuel", - recipe = "beds:fancy_bed_bottom", - burntime = 13, + recipe = "beds:fancy_bed", + burntime = 13 }) minetest.register_craft({ type = "fuel", - recipe = "beds:bed_bottom", - burntime = 12, + recipe = "beds:bed", + burntime = 12 }) diff --git a/mods/beds/depends.txt b/mods/beds/depends.txt new file mode 100644 index 0000000..dda4be0 --- /dev/null +++ b/mods/beds/depends.txt @@ -0,0 +1,4 @@ +default +wool +pova? +intllib? diff --git a/mods/beds/description.txt b/mods/beds/description.txt new file mode 100644 index 0000000..64c8604 --- /dev/null +++ b/mods/beds/description.txt @@ -0,0 +1 @@ +beds which allows sleep, featured to (auto) skip the night. diff --git a/mods/beds/functions.lua b/mods/beds/functions.lua index 6ee0474..6e21bfc 100644 --- a/mods/beds/functions.lua +++ b/mods/beds/functions.lua @@ -1,20 +1,25 @@ +local S = beds.get_translator +local is_50 = beds.is_50 +local is_54 = beds.is_54 +local is_pova = minetest.get_modpath("pova") 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 @@ -26,22 +31,31 @@ local function get_look_yaw(pos) 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 @@ -50,7 +64,9 @@ local function check_in_beds(players) 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() @@ -60,36 +76,94 @@ local function lay_down(player, pos, bed_pos, state, skip) -- stand up if state ~= nil and not state then - local p = beds.pos[name] or nil - beds.player[name] = nil + + if not beds.player[name] then + return false -- player not in bed, do nothing + end + 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 + + player:set_pos(beds.pos[name]) -- physics, eye_offset, etc + local physics_override = beds.player[name].physics_override + + beds.player[name] = nil + + if is_pova then + pova.del_override(name, "force") + pova.do_override(player) + else + player:set_physics_override({ + speed = physics_override.speed, + jump = physics_override.jump, + gravity = physics_override.gravity + }) + end + 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) - default.player_attached[name] = false - player:set_physics_override(1, 1, 1) - hud_flags.wielditem = true - default.player_set_animation(player, "stand" , 30) - -- lay down - else + if beds.is_50 then + player_api.player_attached[name] = false + player_api.set_animation(player, "stand" , 30) + else + default.player_attached[name] = false + default.player_set_animation(player, "stand" , 30) + end + + hud_flags.wielditem = true + + else -- lay down + + -- 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 + + if beds.is_54 then + -- 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 + end + + -- Check if player is attached to an object + if player:get_attach() then + return false + end + + if beds.player[name] then + -- player already in bed, do nothing + return false + end + beds.pos[name] = pos beds.bed_position[name] = bed_pos - beds.player[name] = 1 + beds.player[name] = {physics_override = player:get_physics_override()} -- 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 = { @@ -97,36 +171,58 @@ local function lay_down(player, pos, bed_pos, state, skip) y = bed_pos.y + 0.07, z = bed_pos.z + dir.z / 2 } - player:set_physics_override(0, 0, 0) + + if is_pova then + pova.add_override(name, "force", {speed = 0, jump = 0, gravity = 0}) + pova.do_override(player) + else + player:set_physics_override({speed = 0, jump = 0, gravity = 0}) + end + player:set_pos(p) - default.player_attached[name] = true + + if beds.is_50 then + player_api.player_attached[name] = true + player_api.set_animation(player, "lay" , 0) + else + + default.player_attached[name] = true + default.player_set_animation(player, "lay" , 0) + end + hud_flags.wielditem = false - default.player_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")) .. "]" @@ -138,36 +234,46 @@ local function update_formspecs(finished) 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) @@ -179,10 +285,13 @@ function beds.on_rightclick(pos, player) -- 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() @@ -191,23 +300,33 @@ function beds.on_rightclick(pos, player) 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) + + if not player then return end + local name = player:get_player_name() local pos = beds.spawn[name] + if pos then player:set_pos(pos) return true @@ -215,13 +334,23 @@ if enable_respawn then end) end + minetest.register_on_leaveplayer(function(player) + + if not player then return end + 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() @@ -230,7 +359,28 @@ minetest.register_on_leaveplayer(function(player) end end) + +minetest.register_on_dieplayer(function(player) + + if not player then return end + + 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) + + +local div = tonumber(minetest.settings:get("bed_sleep_divide")) or 2 + minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "beds_form" then return end @@ -246,7 +396,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end if fields.force then - local is_majority = (#minetest.get_connected_players() / 2) < last_player_in_bed + + -- check if enough players are sleeping to skip night (was half) + local is_majority = ( + #minetest.get_connected_players() / div) < last_player_in_bed + if is_majority and is_night_skip_enabled() then update_formspecs(true) beds.skip_night() diff --git a/mods/beds/init.lua b/mods/beds/init.lua index a1a46ce..41a64e3 100644 --- a/mods/beds/init.lua +++ b/mods/beds/init.lua @@ -1,26 +1,62 @@ --- beds/init.lua +local is_50 = nil +local is_53 = minetest.has_feature("object_step_has_moveresult") +local is_54 = minetest.has_feature("direct_velocity_on_players") --- Load support for MT game translation. -local S = minetest.get_translator("beds") -local esc = minetest.formspec_escape + -- Load support for MT game translation. +local S +if minetest.get_translator ~= nil then + S = minetest.get_translator("beds") -- 5.x translation function + is_50 = true +else + if minetest.get_modpath("intllib") then + dofile(minetest.get_modpath("intllib") .. "/init.lua") + if intllib.make_gettext_pair then + gettext, ngettext = intllib.make_gettext_pair() -- new gettext method + else + gettext = intllib.Getter() -- old text file method + end + S = gettext + else -- boilerplate function for 0.4 + S = function(str, ...) + local args = {...} + return str:gsub("@%d+", function(match) + return args[tonumber(match:sub(2))] + end) + end + end +end -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")) .. "]" +beds = { + player = {}, + bed_position = {}, + pos = {}, + spawn = {}, + get_translator = S, + formspec = "size[8,11;true]" + .. "no_prepend[]" + .. "bgcolor[#080808BB;true]" + .. "button_exit[2,10;4,0.75;leave;" .. minetest.formspec_escape(S("Leave Bed")) .. "]" +} +beds.is_50 = is_50 +beds.is_53 = is_53 +beds.is_54 = is_54 local modpath = minetest.get_modpath("beds") +-- check for minetest 5.x/0.4 compatibility +function beds.is_creative(name) + if is_53 then + return minetest.is_creative_enabled(name) + else + return creative.is_enabled_for(name) or minetest.settings:get_bool("creative_mode") + end +end -- Load files dofile(modpath .. "/functions.lua") dofile(modpath .. "/api.lua") dofile(modpath .. "/beds.lua") dofile(modpath .. "/spawns.lua") + + +print("[MOD] Beds loaded") diff --git a/mods/beds/locale/beds.de.tr b/mods/beds/locale/beds.de.tr index e77f654..3f2c959 100644 --- a/mods/beds/locale/beds.de.tr +++ b/mods/beds/locale/beds.de.tr @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed=Schickes Bett Simple Bed=Schlichtes Bett -Leave Bed=Bett verlassen +This bed is already occupied!=Dieses Bett ist bereits belegt! +You have to stop moving before going to bed!=Sie müssen stehen bleiben, bevor Sie zu Bett gehen können! 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. +Leave Bed=Bett verlassen diff --git a/mods/beds/locale/beds.es.tr b/mods/beds/locale/beds.es.tr index 0543e7f..8ef0db7 100644 --- a/mods/beds/locale/beds.es.tr +++ b/mods/beds/locale/beds.es.tr @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed=Cama de lujo Simple Bed=Cama sencilla -Leave Bed=Abandonar cama +This bed is already occupied!=Esta cama esta ocupada +You have to stop moving before going to bed!=Deja de moverte o no podras acostarte 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 +@1 of @2 players are in bed=@1 de @2 jugadores están durmiendo +Force night skip=Forzar hacer de dia You can only sleep at night.=Sólo puedes dormir por la noche. +Leave Bed=Levantarse diff --git a/mods/beds/locale/beds.fr.tr b/mods/beds/locale/beds.fr.tr index bddf9b5..e1f8e56 100644 --- a/mods/beds/locale/beds.fr.tr +++ b/mods/beds/locale/beds.fr.tr @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed=Lit chic Simple Bed=Lit simple -Leave Bed=Se lever du lit +This bed is already occupied!= +You have to stop moving before going to bed!= 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. +Leave Bed=Se lever du lit diff --git a/mods/beds/locale/beds.id.tr b/mods/beds/locale/beds.id.tr new file mode 100644 index 0000000..7bcbb5d --- /dev/null +++ b/mods/beds/locale/beds.id.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Ranjang Mewah +Simple Bed=Ranjang Sederhana +This bed is already occupied!= +You have to stop moving before going to bed!= +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 dapat tidur pada waktu malam. +Leave Bed=Tinggalkan Ranjang diff --git a/mods/beds/locale/beds.it.tr b/mods/beds/locale/beds.it.tr index 3dbc70c..8f4e14e 100644 --- a/mods/beds/locale/beds.it.tr +++ b/mods/beds/locale/beds.it.tr @@ -1,4 +1,10 @@ -# textdomain: beds -Fancy Bed=Letto decorato -Simple Bed=Letto semplice -Leave Bed=Alzati dal letto \ No newline at end of file +# textdomain: beds +Fancy Bed=Letto decorato +Simple Bed=Letto semplice +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.= +@1 of @2 players are in bed= +Force night skip= +You can only sleep at night.= +Leave Bed=Alzati dal letto diff --git a/mods/beds/locale/beds.jbo.tr b/mods/beds/locale/beds.jbo.tr new file mode 100644 index 0000000..a72f686 --- /dev/null +++ b/mods/beds/locale/beds.jbo.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=lo selja'i ckana +Simple Bed=lo sampu ckana +This bed is already occupied!=.i lo ti ckana cu canlu +You have to stop moving before going to bed!=lo nu do cando cu sarcu lo nu do sipna +Good morning.=.i .uise'inai cerni +@1 of @2 players are in bed=.i @1 cmima be lu'i @2 le pilno cu vreta lo ckana +Force night skip=bapli le nu co'u nicte +You can only sleep at night.=.i steci le ka nicte kei fa le ka do kakne le ka sipna ca pa ckaji be ce'u +Leave Bed=cliva lo ckana diff --git a/mods/beds/locale/beds.ms.tr b/mods/beds/locale/beds.ms.tr index 797e3a6..4d4310a 100644 --- a/mods/beds/locale/beds.ms.tr +++ b/mods/beds/locale/beds.ms.tr @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed=Katil Beragam Simple Bed=Katil Biasa -Leave Bed=Bangun +This bed is already occupied!= +You have to stop moving before going to bed!= 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. +Leave Bed=Bangun diff --git a/mods/beds/locale/beds.pt_BR.tr b/mods/beds/locale/beds.pt_BR.tr new file mode 100644 index 0000000..47fb1b9 --- /dev/null +++ b/mods/beds/locale/beds.pt_BR.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Cama Bonita +Simple Bed=Cama Simples +This bed is already occupied!=Esta cama já está ocupada! +You have to stop moving before going to bed!=Você precisa parar de se mover antes de ir para cama! +Good morning.=Bom dia. +@1 of @2 players are in bed=@1 de @2 jogadores estão na cama +Force night skip=Forçar o amanhecer +You can only sleep at night.=Você só pode dormir à noite +Leave Bed=Sair da Cama diff --git a/mods/beds/locale/beds.ru.tr b/mods/beds/locale/beds.ru.tr index 1974b3d..ac5bd2e 100644 --- a/mods/beds/locale/beds.ru.tr +++ b/mods/beds/locale/beds.ru.tr @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed=Детализированная Кровать Simple Bed=Обычная Кровать -Leave Bed=Встать с кровати +This bed is already occupied!= +You have to stop moving before going to bed!= Good morning.=Доброе утро. @1 of @2 players are in bed=@1 из @2 игроков в кровати Force night skip=Пропустить ночь You can only sleep at night.=Вы можете спать только ночью. +Leave Bed=Встать с кровати diff --git a/mods/beds/locale/beds.se.tr b/mods/beds/locale/beds.se.tr index 53f4f2d..b4d52ba 100644 --- a/mods/beds/locale/beds.se.tr +++ b/mods/beds/locale/beds.se.tr @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed=Fin säng Simple Bed=Enkel Säng -Leave Bed=Lämna Säng +This bed is already occupied!= +You have to stop moving before going to bed!= 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. +Leave Bed=Lämna Säng diff --git a/mods/beds/locale/beds.sk.tr b/mods/beds/locale/beds.sk.tr new file mode 100644 index 0000000..37f39dd --- /dev/null +++ b/mods/beds/locale/beds.sk.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Pekná posteľ +Simple Bed=Jednoduchá posteľ +This bed is already occupied!= +You have to stop moving before going to bed!= +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. +Leave Bed=Opusti posteľ diff --git a/mods/beds/locale/beds.zh_CN.tr b/mods/beds/locale/beds.zh_CN.tr index 609524d..6a06e09 100644 --- a/mods/beds/locale/beds.zh_CN.tr +++ b/mods/beds/locale/beds.zh_CN.tr @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed=花式床 Simple Bed=简易床 -Leave Bed=离开床 +This bed is already occupied!= +You have to stop moving before going to bed!= Good morning.=早安! @1 of @2 players are in bed=@2位玩家中的@1位在床上 Force night skip=强制跳过夜晚 You can only sleep at night.=你只能在晚上睡觉。 +Leave Bed=离开床 diff --git a/mods/beds/locale/beds.zh_TW.tr b/mods/beds/locale/beds.zh_TW.tr index 4e7d687..b19b481 100644 --- a/mods/beds/locale/beds.zh_TW.tr +++ b/mods/beds/locale/beds.zh_TW.tr @@ -1,9 +1,10 @@ # textdomain: beds Fancy Bed=花式床 Simple Bed=簡易床 -Leave Bed=離開床 +This bed is already occupied!= +You have to stop moving before going to bed!= Good morning.=早安! @1 of @2 players are in bed=@2位玩家中的@1位在床上 Force night skip=強制跳過夜晚 You can only sleep at night.=你只能在晚上睡覺。 - +Leave Bed=離開床 diff --git a/mods/beds/locale/template.txt b/mods/beds/locale/template.txt index 518fdbf..a965787 100644 --- a/mods/beds/locale/template.txt +++ b/mods/beds/locale/template.txt @@ -1,8 +1,10 @@ # textdomain: beds Fancy Bed= Simple Bed= -Leave Bed= +This bed is already occupied!= +You have to stop moving before going to bed!= Good morning.= @1 of @2 players are in bed= Force night skip= You can only sleep at night.= +Leave Bed= diff --git a/mods/beds/mod.conf b/mods/beds/mod.conf index 450ec13..ae353fb 100644 --- a/mods/beds/mod.conf +++ b/mods/beds/mod.conf @@ -1,3 +1,4 @@ name = beds -description = Minetest Game mod: beds +description = beds which allows sleep, featured to (auto) skip the night. depends = default, wool +optional_depends = player_api, pova, intllib diff --git a/mods/beds/models/beds_fancy_bed.obj b/mods/beds/models/beds_fancy_bed.obj new file mode 100644 index 0000000..285be20 --- /dev/null +++ b/mods/beds/models/beds_fancy_bed.obj @@ -0,0 +1,160 @@ +# Blender v2.69 (sub 0) OBJ File: '' +# www.blender.org +mtllib fancy_bed.mtl +o mattress_Mattress_nodebox-6_none.001_fancy_bed.png.001 +v 0.437500 -0.312500 -0.437501 +v 0.437500 -0.062500 -0.437501 +v 0.437500 -0.062500 1.437499 +v 0.437500 -0.312500 1.437499 +v -0.437500 -0.312500 -0.437501 +v -0.437500 -0.312500 1.437499 +v -0.437500 -0.062500 1.437499 +v -0.437500 -0.062500 -0.437501 +v 0.437500 -0.176793 -0.437501 +v -0.437500 -0.176793 -0.437501 +vt 0.000171 0.499972 +vt 0.000161 0.000182 +vt 0.999791 0.000253 +vt 0.999873 0.500022 +vt 0.749576 0.000208 +vt 0.749876 0.499854 +vt 0.999848 0.999750 +vt 0.000152 0.999750 +vt 0.749276 0.130648 +vt 0.000112 0.130648 +g mattress_Mattress_nodebox-6_none.001_fancy_bed.png.001_none.001_fancy_bed.png.001 +usemtl none.001_fancy_bed.png.001 +s off +f 1/1 2/2 3/3 4/4 +f 5/2 6/3 7/4 8/1 +f 4/5 3/2 7/1 6/6 +f 1/1 4/4 6/7 5/8 +f 2/1 8/2 7/3 3/4 +f 8/2 2/5 9/9 10/10 +o wood_structure_Wood_structure_nodebox-4.001_none.002 +v 0.374999 -0.375000 1.437499 +v 0.374999 -0.125000 1.437499 +v 0.374999 -0.125000 1.499999 +v 0.374999 -0.375000 1.499999 +v -0.374999 -0.375000 1.437499 +v -0.374999 -0.375000 1.499999 +v -0.374999 -0.125000 1.499999 +v -0.374999 -0.125000 1.437499 +v -0.375000 -0.500000 1.437499 +v -0.375000 0.187500 1.437499 +v -0.375000 0.187500 1.499999 +v -0.375000 -0.500000 1.499999 +v -0.500000 -0.500000 1.437499 +v -0.500000 -0.500000 1.499999 +v -0.500000 0.187500 1.499999 +v -0.500000 0.187500 1.437499 +v -0.437500 -0.375000 -0.437501 +v -0.437500 -0.125000 -0.437501 +v -0.437500 -0.125000 1.437498 +v -0.437500 -0.375000 1.437498 +v -0.500000 -0.375000 -0.437501 +v -0.500000 -0.375000 1.437498 +v -0.500000 -0.125000 1.437498 +v -0.500000 -0.125000 -0.437501 +v 0.375001 -0.000000 1.437499 +v 0.375001 0.125000 1.437499 +v 0.375001 0.125000 1.499999 +v 0.375001 -0.000000 1.499999 +v -0.375001 -0.000000 1.437499 +v -0.375001 -0.000000 1.499999 +v -0.375001 0.125000 1.499999 +v -0.375001 0.125000 1.437499 +v 0.500000 -0.500000 1.437499 +v 0.500000 0.187500 1.437499 +v 0.500000 0.187500 1.499999 +v 0.500000 -0.500000 1.499999 +v 0.375000 -0.500000 1.437499 +v 0.375000 -0.500000 1.499999 +v 0.375000 0.187500 1.499999 +v 0.375000 0.187500 1.437499 +v 0.500000 -0.375000 -0.437501 +v 0.500000 -0.125000 -0.437501 +v 0.500000 -0.125000 1.437499 +v 0.500000 -0.375000 1.437499 +v 0.437500 -0.375000 -0.437501 +v 0.437500 -0.375000 1.437499 +v 0.437500 -0.125000 1.437499 +v 0.437500 -0.125000 -0.437501 +v -0.375000 -0.500000 -0.500000 +v -0.375000 -0.065000 -0.500000 +v -0.375000 -0.065000 -0.437500 +v -0.375000 -0.500000 -0.437500 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 -0.437500 +v -0.500000 -0.065000 -0.437500 +v -0.500000 -0.065000 -0.500000 +v 0.375006 -0.375000 -0.500000 +v 0.375006 -0.125000 -0.500000 +v 0.375006 -0.125000 -0.437500 +v 0.375006 -0.375000 -0.437500 +v -0.375006 -0.375000 -0.500000 +v -0.375006 -0.375000 -0.437500 +v -0.375006 -0.125000 -0.437500 +v -0.375006 -0.125000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.065000 -0.500000 +v 0.500000 -0.065000 -0.437500 +v 0.500000 -0.500000 -0.437500 +v 0.375000 -0.500000 -0.500000 +v 0.375000 -0.500000 -0.437500 +v 0.375000 -0.065000 -0.437500 +v 0.375000 -0.065000 -0.500000 +vt 0.377610 0.378205 +vt 0.622484 0.378175 +vt 0.622515 0.623120 +vt 0.377671 0.623151 +g wood_structure_Wood_structure_nodebox-4.001_none.002_none.002 +usemtl none.002 +s off +f 59/11 60/12 61/13 62/14 +f 63/14 64/11 65/12 66/13 +f 59/11 63/14 66/13 60/12 +f 62/14 61/13 65/12 64/11 +f 59/11 62/14 64/13 63/12 +f 60/12 66/11 65/14 61/13 +f 67/11 71/12 74/13 68/14 +f 70/14 69/11 73/12 72/13 +f 67/11 70/12 72/13 71/14 +f 68/11 74/12 73/13 69/14 +f 75/11 76/12 77/13 78/14 +f 79/14 80/11 81/12 82/13 +f 75/14 79/11 82/12 76/13 +f 78/11 77/12 81/13 80/14 +f 75/11 78/12 80/13 79/14 +f 76/11 82/12 81/13 77/14 +g wood_structure_Wood_structure_nodebox-4.001_none.002_none.003 +usemtl none.003 +f 15/11 16/12 17/13 18/14 +f 11/13 15/14 18/11 12/12 +f 14/14 13/11 17/12 16/13 +f 11/14 14/11 16/12 15/13 +f 12/11 18/12 17/13 13/14 +f 19/11 20/12 21/13 22/14 +f 23/14 24/11 25/12 26/13 +f 19/14 23/11 26/12 20/13 +f 22/11 21/12 25/13 24/14 +f 19/11 22/12 24/13 23/14 +f 20/11 26/12 25/13 21/14 +f 27/14 28/11 29/12 30/13 +f 31/11 32/12 33/13 34/14 +f 27/11 30/12 32/13 31/14 +f 28/14 34/11 33/12 29/13 +f 35/11 39/12 42/13 36/14 +f 38/14 37/11 41/12 40/13 +f 35/14 38/11 40/12 39/13 +f 36/11 42/12 41/13 37/14 +f 43/11 44/12 45/13 46/14 +f 47/14 48/11 49/12 50/13 +f 43/14 47/11 50/12 44/13 +f 46/11 45/12 49/13 48/14 +f 43/11 46/12 48/13 47/14 +f 44/11 50/12 49/13 45/14 +f 51/14 52/11 53/12 54/13 +f 55/13 56/14 57/11 58/12 +f 51/11 54/12 56/13 55/14 +f 52/14 58/11 57/12 53/13 diff --git a/mods/beds/models/beds_simple_bed.obj b/mods/beds/models/beds_simple_bed.obj new file mode 100644 index 0000000..21ecfb4 --- /dev/null +++ b/mods/beds/models/beds_simple_bed.obj @@ -0,0 +1,32 @@ +# Blender v2.69 (sub 0) OBJ File: '' +# www.blender.org +mtllib simple_bed.mtl +o Simple_Bed +v 0.500000 -0.500000 -0.500000 +v 0.500000 0.060000 -0.500000 +v 0.500000 0.060000 1.500000 +v 0.500000 -0.500000 1.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 1.500000 +v -0.500000 0.060000 1.500000 +v -0.500000 0.060000 -0.500000 +vt 0.000112 0.780442 +vt 0.000110 0.999969 +vt 0.780324 0.999889 +vt 0.780377 0.780471 +vt 0.780636 0.390284 +vt 0.999906 0.780382 +vt 0.999906 0.390284 +vt 0.780636 0.000047 +vt 0.999906 0.000094 +vt 0.390235 0.780320 +vt 0.390235 0.000071 +vt 0.000142 0.000142 +usemtl none.002 +s off +f 1/1 2/2 3/3 4/4 +f 5/1 6/4 7/3 8/2 +f 1/5 5/4 8/6 2/7 +f 4/8 3/9 7/7 6/5 +f 1/8 4/4 6/10 5/11 +f 2/11 8/12 7/1 3/10 diff --git a/mods/beds/screenshot.jpg b/mods/beds/screenshot.jpg new file mode 100644 index 0000000..a523878 Binary files /dev/null and b/mods/beds/screenshot.jpg differ diff --git a/mods/beds/settingtypes.txt b/mods/beds/settingtypes.txt new file mode 100644 index 0000000..d1b31a7 --- /dev/null +++ b/mods/beds/settingtypes.txt @@ -0,0 +1,5 @@ +enable_bed_respawn (Enable bed respawn) bool true + +enable_bed_night_skip (Enable night skip) bool true + +bed_sleep_divide (Division of players needed to skip night) float 2 diff --git a/mods/beds/spawns.lua b/mods/beds/spawns.lua index 1a2ce81..dc8ae78 100644 --- a/mods/beds/spawns.lua +++ b/mods/beds/spawns.lua @@ -3,30 +3,44 @@ 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() @@ -35,38 +49,53 @@ function beds.read_spawns() 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 index 5c0054c..5111a91 100644 Binary files a/mods/beds/textures/beds_bed.png and b/mods/beds/textures/beds_bed.png differ diff --git a/mods/beds/textures/beds_bed_blue.png b/mods/beds/textures/beds_bed_blue.png new file mode 100644 index 0000000..e16f5dd Binary files /dev/null and b/mods/beds/textures/beds_bed_blue.png differ diff --git a/mods/beds/textures/beds_bed_fancy.png b/mods/beds/textures/beds_bed_fancy.png index 4f9e8a7..d43e6ec 100644 Binary files a/mods/beds/textures/beds_bed_fancy.png and b/mods/beds/textures/beds_bed_fancy.png differ diff --git a/mods/beds/textures/beds_bed_fancy_pink.png b/mods/beds/textures/beds_bed_fancy_pink.png new file mode 100644 index 0000000..8eab3be Binary files /dev/null and b/mods/beds/textures/beds_bed_fancy_pink.png differ diff --git a/mods/beds/textures/beds_bed_foot.png b/mods/beds/textures/beds_bed_foot.png deleted file mode 100644 index 74d84c8..0000000 Binary files a/mods/beds/textures/beds_bed_foot.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_head.png b/mods/beds/textures/beds_bed_head.png deleted file mode 100644 index 763f5e1..0000000 Binary files a/mods/beds/textures/beds_bed_head.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_side1.png b/mods/beds/textures/beds_bed_side1.png deleted file mode 100644 index 1ed8158..0000000 Binary files a/mods/beds/textures/beds_bed_side1.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_side2.png b/mods/beds/textures/beds_bed_side2.png deleted file mode 100644 index 9d1384d..0000000 Binary files a/mods/beds/textures/beds_bed_side2.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_side_bottom.png b/mods/beds/textures/beds_bed_side_bottom.png deleted file mode 100644 index 99ff309..0000000 Binary files a/mods/beds/textures/beds_bed_side_bottom.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_side_bottom_r.png b/mods/beds/textures/beds_bed_side_bottom_r.png deleted file mode 100644 index 6f870e8..0000000 Binary files a/mods/beds/textures/beds_bed_side_bottom_r.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_side_top.png b/mods/beds/textures/beds_bed_side_top.png deleted file mode 100644 index b2807c5..0000000 Binary files a/mods/beds/textures/beds_bed_side_top.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_side_top_r.png b/mods/beds/textures/beds_bed_side_top_r.png deleted file mode 100644 index 429ad7d..0000000 Binary files a/mods/beds/textures/beds_bed_side_top_r.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_top1.png b/mods/beds/textures/beds_bed_top1.png deleted file mode 100644 index b6fcc2c..0000000 Binary files a/mods/beds/textures/beds_bed_top1.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_top2.png b/mods/beds/textures/beds_bed_top2.png deleted file mode 100644 index 2fe5bf2..0000000 Binary files a/mods/beds/textures/beds_bed_top2.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_top_bottom.png b/mods/beds/textures/beds_bed_top_bottom.png deleted file mode 100644 index 9b78be6..0000000 Binary files a/mods/beds/textures/beds_bed_top_bottom.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_top_top.png b/mods/beds/textures/beds_bed_top_top.png deleted file mode 100644 index e877c80..0000000 Binary files a/mods/beds/textures/beds_bed_top_top.png and /dev/null differ diff --git a/mods/beds/textures/beds_bed_under.png b/mods/beds/textures/beds_bed_under.png deleted file mode 100644 index a930115..0000000 Binary files a/mods/beds/textures/beds_bed_under.png and /dev/null differ diff --git a/mods/beds/textures/beds_fancy_bed.png b/mods/beds/textures/beds_fancy_bed.png new file mode 100644 index 0000000..11ea830 Binary files /dev/null and b/mods/beds/textures/beds_fancy_bed.png differ diff --git a/mods/beds/textures/beds_fancy_bed_pink.png b/mods/beds/textures/beds_fancy_bed_pink.png new file mode 100644 index 0000000..cf7a69e Binary files /dev/null and b/mods/beds/textures/beds_fancy_bed_pink.png differ diff --git a/mods/beds/textures/beds_simple_bed.png b/mods/beds/textures/beds_simple_bed.png new file mode 100644 index 0000000..93922ec Binary files /dev/null and b/mods/beds/textures/beds_simple_bed.png differ diff --git a/mods/beds/textures/beds_simple_bed_blue.png b/mods/beds/textures/beds_simple_bed_blue.png new file mode 100644 index 0000000..a94db8c Binary files /dev/null and b/mods/beds/textures/beds_simple_bed_blue.png differ diff --git a/mods/beds/textures/beds_transparent.png b/mods/beds/textures/beds_transparent.png deleted file mode 100644 index 2dc0e3d..0000000 Binary files a/mods/beds/textures/beds_transparent.png and /dev/null differ diff --git a/mods/boats/README.md b/mods/boats/README.md new file mode 100644 index 0000000..466c5bc --- /dev/null +++ b/mods/boats/README.md @@ -0,0 +1,77 @@ +minetest mod boats +========================== + +Boats improved for better performance and more realistic.. + +Information +----------- + +This mod is named `boats`, it features work from original mod, +code changed to make it turn **quicker, better performance agains lag**, +and if you hit the shore too hard the boat is destroyed and drops 3 wood + +![screenshot.png](screenshot.png) + +#### Additions by TenPlus1 + +changed by TenPlus1 to add some new features +- boat is destroyed when crashing at speed (drops 3 wood) +- boats drop after 10 seconds if no driver +- boats can be damaged by mobs attacking player +- Improve physics of boat by implementing drag force (thanks gnag65) +- nil player check functions by misterskullz + +Technical informaton +-------------------- + +When crafted you can use by putting and right click on, +then control with your directional keys: + +#### Dependencies + +* default +* mesecons (optional) + +#### Crafting + +W = any thing from wood group + +``` + +W W +WWW +``` +#### nodes + +| Name | node | notes | +| ------------ | --------------- | ----- | +| Boat | boats:boat | it destroyed when crash at speed | + +#### Controls (by default if not changed) + +| Default key assigned | Action | +| -------------------- | -------------------------------------- | +| Right mouse button | Enter or exit boat when pointing at boat. | +| Forward | Speed up. Slow down when moving backwards. | +| Forward + backward | Enable cruise mode: accelerate to maximum speed without needing to hold. | +| 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. | + +Licence +------ + +**Source code** + +Modifications by TenPlus1 +Originally by PilzAdam (MIT) +Various Minetest developers and contributors (MIT) + +**Media (textures and model)** + +Textures: Zeg9 (CC BY-SA 3.0) +original 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) + +Check [lisence.txt](lisence.txt) diff --git a/mods/boats/README.txt b/mods/boats/README.txt deleted file mode 100644 index a2ccb48..0000000 --- a/mods/boats/README.txt +++ /dev/null @@ -1,31 +0,0 @@ -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/depends.txt b/mods/boats/depends.txt new file mode 100644 index 0000000..c19dbe3 --- /dev/null +++ b/mods/boats/depends.txt @@ -0,0 +1,3 @@ +default +player_api? +creative? diff --git a/mods/boats/init.lua b/mods/boats/init.lua index f658e7b..0129646 100644 --- a/mods/boats/init.lua +++ b/mods/boats/init.lua @@ -1,7 +1,31 @@ -- boats/init.lua --- Load support for MT game translation. -local S = minetest.get_translator("boats") +-- translation support and 5.x version check +local S, is_50, is_53 +if minetest.get_translator ~= nil then + S = minetest.get_translator("boats") -- 5.x translation function + is_50 = true + is_53 = false +else + if minetest.get_modpath("intllib") then + dofile(minetest.get_modpath("intllib") .. "/init.lua") + if intllib.make_gettext_pair then + gettext, ngettext = intllib.make_gettext_pair() -- new gettext method + else + gettext = intllib.Getter() -- old text file method + end + S = gettext + else -- boilerplate function + S = function(str, ...) + local args = {...} + return str:gsub("@%d+", function(match) + return args[tonumber(match:sub(2))] + end) + end + end +end +-- check for minetest 5.x compatibility +is_53 = minetest.has_feature("direct_velocity_on_players") or minetest.has_feature("is_creative_enabled") of false -- -- Helper functions @@ -24,6 +48,21 @@ local function get_v(v) return math.sqrt(v.x ^ 2 + v.z ^ 2) end +local creative = minetest.settings:get_bool("creative_mode") + +function is_creative_enabled(name) + + if creative or minetest.check_player_privs(name, {creative = true}) then + if is_53 then + return minetest.is_creative_enabled(name) + else + return true + end + end + + return false +end + -- -- Boat entity -- @@ -36,7 +75,7 @@ local boat = { collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5}, visual = "mesh", mesh = "boats_boat.obj", - textures = {"default_wood.png"}, + textures = {"default_wood.png"} }, driver = nil, @@ -53,31 +92,35 @@ function boat.on_rightclick(self, clicker) end local name = clicker:get_player_name() if self.driver and name == self.driver then - self.driver = nil - self.auto = false + -- Cleanup happens in boat.on_detach_child clicker:set_detach() - player_api.player_attached[name] = false - player_api.set_animation(clicker, "stand" , 30) + if is_50 then + player_api.set_animation(clicker, "stand", 30) + else + default.player_set_animation(clicker, "stand", 30) + end 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 + + self.driver = name + if is_50 then + player_api.player_attached[name] = true + else + default.player_attached[name] = true + end + minetest.after(0.2, function() - player_api.set_animation(clicker, "sit" , 30) + if is_50 then + player_api.set_animation(clicker, "sit", 30) + else + default.player_set_animation(clicker, "sit", 30) + end end) clicker:set_look_horizontal(self.object:get_yaw()) end @@ -86,13 +129,20 @@ end -- If driver leaves server while driving boat function boat.on_detach_child(self, child) - self.driver = nil - self.auto = false + if child and child:get_player_name() == self.driver then + if is_50 then + player_api.player_attached[child:get_player_name()] = false + else + default.player_attached[child:get_player_name()] = false + end + self.driver = nil + self.auto = false + end end function boat.on_activate(self, staticdata, dtime_s) - self.object:set_armor_groups({immortal = 1}) + self.object:set_armor_groups({fleshy = 100}) if staticdata then self.v = tonumber(staticdata) end @@ -114,13 +164,16 @@ function boat.on_punch(self, puncher) if self.driver and name == self.driver then self.driver = nil puncher:set_detach() - player_api.player_attached[name] = false + if is_50 then + player_api.player_attached[name] = false + else + default.player_attached[name] = false + end 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)) + if not is_creative_enabled(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 @@ -137,8 +190,19 @@ end function boat.on_step(self, dtime) + + -- after 10 seconds remove boat and drop as item if not boarded + self.count = (self.count or 0) + dtime + + if self.count > 10 then + minetest.add_item(self.object:get_pos(), "boats:boat") + self.object:remove() + return + end + self.v = get_v(self.object:get_velocity()) * math.sign(self.v) if self.driver then + self.count = 0 -- reset 10 second drop counter local driver_objref = minetest.get_player_by_name(self.driver) if driver_objref then local ctrl = driver_objref:get_player_control() @@ -169,6 +233,11 @@ function boat.on_step(self, dtime) self.object:set_yaw(self.object:get_yaw() - dtime * 0.9) end end + else + -- If driver leaves server while driving 'driver' is present + -- but driver objectref is nil. Reset boat properties. + self.driver = nil + self.auto = false end end local velo = self.object:get_velocity() @@ -231,6 +300,30 @@ function boat.on_step(self, dtime) end self.object:set_velocity(new_velo) self.object:set_acceleration(new_acce) + + -- if boat comes to sudden stop then destroy boat and drop 3x wood + if (self.v2 or 0) - self.v >= 3 then + + if self.driver then +--print ("Crash! with driver", self.v2 - self.v) + local driver_objref = minetest.get_player_by_name(self.driver) + default.player_attached[self.driver] = false + driver_objref:set_detach() + if is_50 then + player_api.set_animation(driver_objref, "stand" , 30) + else + default.player_set_animation(driver_objref, "stand" , 30) + end + else +--print ("Crash! no driver") + end + + minetest.add_item(self.object:get_pos(), "default:wood 3") + self.object:remove() + return + end + + self.v2 = self.v end @@ -269,8 +362,7 @@ minetest.register_craftitem("boats:boat", { 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 + if not is_creative_enabled(player_name) then itemstack:take_item() end end @@ -293,3 +385,6 @@ minetest.register_craft({ recipe = "boats:boat", burntime = 20, }) + + +print ("[MOD] Boats loaded") diff --git a/mods/boats/license.txt b/mods/boats/license.txt index d4afe75..ca0a991 100644 --- a/mods/boats/license.txt +++ b/mods/boats/license.txt @@ -33,6 +33,7 @@ Copyright (C) 2012-2016 Zeg9 Copyright (C) 2012-2016 thetoon Copyright (C) 2012-2016 PavelS(SokolovPavel) Copyright (C) 2016 sofar (sofar@foo-projects.org) +Copyright (C) 2019 Bartosz (gang65@poczta.onet.pl) You are free to: Share — copy and redistribute the material in any medium or format. diff --git a/mods/boats/locale/boats.de.tr b/mods/boats/locale/boats.de.tr deleted file mode 100644 index d8eb8d7..0000000 --- a/mods/boats/locale/boats.de.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index b9adb72..0000000 --- a/mods/boats/locale/boats.es.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index f469a0b..0000000 --- a/mods/boats/locale/boats.fr.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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.it.tr b/mods/boats/locale/boats.it.tr deleted file mode 100644 index 5bd7125..0000000 --- a/mods/boats/locale/boats.it.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index d11a68b..0000000 --- a/mods/boats/locale/boats.ms.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index 4327098..0000000 --- a/mods/boats/locale/boats.ru.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index 4ca7c80..0000000 --- a/mods/boats/locale/boats.se.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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.zh_CN.tr b/mods/boats/locale/boats.zh_CN.tr deleted file mode 100644 index 254f2df..0000000 --- a/mods/boats/locale/boats.zh_CN.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index 97b3471..0000000 --- a/mods/boats/locale/boats.zh_TW.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index 17aedc8..0000000 --- a/mods/boats/locale/template.txt +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: boats -Boat cruise mode on= -Boat cruise mode off= -Boat= diff --git a/mods/boats/mod.conf b/mods/boats/mod.conf index a727f8f..2d78e7b 100644 --- a/mods/boats/mod.conf +++ b/mods/boats/mod.conf @@ -1,3 +1,2 @@ name = boats -description = Minetest Game mod: boats -depends = default, player_api +depends = default, player_api, creative diff --git a/mods/boats/screenshot.png b/mods/boats/screenshot.png new file mode 100644 index 0000000..9c2dc3f Binary files /dev/null and b/mods/boats/screenshot.png differ diff --git a/mods/bucket/README.md b/mods/bucket/README.md new file mode 100644 index 0000000..840ee99 --- /dev/null +++ b/mods/bucket/README.md @@ -0,0 +1,56 @@ +minetest mod Bucket +========================= + +This mod is just bucket, but compatible with any engine + +Information +----------- + +This mod must be named `bucket` it permits to handle liquids +in a tool named bucket. + +![screenshot.png](screenshot.png) + +Tech information +---------------- + +This mod sustitute default one, you must disable the default of minetest +game if present or override it. + +#### Dependencies + +* default + +Optional dependences: + +* intllib +* dungeon_loot + +#### Nodes + +It does not provide any new node. + +#### Items tools + +| Node name | Description name | +| ----------------------- | --------------------- | +| bucket:bucket_empty | Empty Bucket | +| bucket:bucket_water | Water Bucket | +| bucket:bucket_river_water | River Water Bucket | +| bucket:bucket_lava | Lava Bucket | + +License +------- + +#### 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) + +Check [license.txt](license.txt) + diff --git a/mods/bucket/README.txt b/mods/bucket/README.txt index 58997b2..840ee99 100644 --- a/mods/bucket/README.txt +++ b/mods/bucket/README.txt @@ -1,13 +1,56 @@ -Minetest Game mod: bucket +minetest mod Bucket ========================= -See license.txt for license information. -Authors of source code ----------------------- +This mod is just bucket, but compatible with any engine + +Information +----------- + +This mod must be named `bucket` it permits to handle liquids +in a tool named bucket. + +![screenshot.png](screenshot.png) + +Tech information +---------------- + +This mod sustitute default one, you must disable the default of minetest +game if present or override it. + +#### Dependencies + +* default + +Optional dependences: + +* intllib +* dungeon_loot + +#### Nodes + +It does not provide any new node. + +#### Items tools + +| Node name | Description name | +| ----------------------- | --------------------- | +| bucket:bucket_empty | Empty Bucket | +| bucket:bucket_water | Water Bucket | +| bucket:bucket_river_water | River Water Bucket | +| bucket:bucket_lava | Lava Bucket | + +License +------- + +#### Authors of source code + Kahrl (LGPLv2.1+) celeron55, Perttu Ahola (LGPLv2.1+) Various Minetest developers and contributors (LGPLv2.1+) -Authors of media (textures) ---------------------------- +#### Authors of media (textures) + ElementW (CC BY-SA 3.0) + +Check [license.txt](license.txt) + diff --git a/mods/bucket/depends.txt b/mods/bucket/depends.txt new file mode 100644 index 0000000..9207dab --- /dev/null +++ b/mods/bucket/depends.txt @@ -0,0 +1,2 @@ +default +intllib? diff --git a/mods/bucket/description.txt b/mods/bucket/description.txt new file mode 100644 index 0000000..9168a26 --- /dev/null +++ b/mods/bucket/description.txt @@ -0,0 +1 @@ +handle liquids in a tool named bucket diff --git a/mods/bucket/init.lua b/mods/bucket/init.lua index ebdf2e7..9472440 100644 --- a/mods/bucket/init.lua +++ b/mods/bucket/init.lua @@ -1,9 +1,29 @@ --- Minetest 0.4 mod: bucket +-- Minetest mod: bucket -- See README.txt for licensing and other information. -- Load support for MT game translation. -local S = minetest.get_translator("bucket") +local S +if minetest.get_translator ~= nil then + S = minetest.get_translator("bucket") -- 5.x translation function +else + if minetest.get_modpath("intllib") then + dofile(minetest.get_modpath("intllib") .. "/init.lua") + if intllib.make_gettext_pair then + gettext, ngettext = intllib.make_gettext_pair() -- new gettext method + else + gettext = intllib.Getter() -- old text file method + end + S = gettext + else -- boilerplate function + S = function(str, ...) + local args = {...} + return str:gsub("@%d+", function(match) + return args[tonumber(match:sub(2))] + end) + end + end +end minetest.register_alias("bucket", "bucket:bucket_empty") minetest.register_alias("bucket_water", "bucket:bucket_water") @@ -69,6 +89,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name end local node = minetest.get_node_or_nil(pointed_thing.under) + if not node then return end local ndef = node and minetest.registered_nodes[node.name] -- Call on_rightclick if the pointed node defines it @@ -129,6 +150,7 @@ minetest.register_craftitem("bucket:bucket_empty", { end -- Check if pointing to a liquid source local node = minetest.get_node(pointed_thing.under) + if not node then return end local liquiddef = bucket.liquids[node.name] local item_count = user:get_wielded_item():get_count() diff --git a/mods/bucket/locale/bucket.eo.tr b/mods/bucket/locale/bucket.eo.tr new file mode 100644 index 0000000..b6266a1 --- /dev/null +++ b/mods/bucket/locale/bucket.eo.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Malplena Sitelo +Water Bucket=Sitelo da Akvo +River Water Bucket=Sitelo da Rivera Akvo +Lava Bucket=Sitelo da Lafo 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 index a9a1335..beca28c 100644 --- a/mods/bucket/locale/bucket.it.tr +++ b/mods/bucket/locale/bucket.it.tr @@ -1,5 +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 +# textdomain: bucket +Empty Bucket=Secchio vuoto +Water Bucket=Secchio d'acqua +River Water Bucket=Secchio d'acqua di fiume +Lava Bucket=Secchio di lava diff --git a/mods/bucket/locale/bucket.ja.tr b/mods/bucket/locale/bucket.ja.tr new file mode 100644 index 0000000..df3bbb6 --- /dev/null +++ b/mods/bucket/locale/bucket.ja.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=空のバケツ +Water Bucket=水入りバケツ +River Water Bucket=川の水入りバケツ +Lava Bucket=溶岩入りバケツ diff --git a/mods/bucket/locale/bucket.jbo.tr b/mods/bucket/locale/bucket.jbo.tr new file mode 100644 index 0000000..e40d2b9 --- /dev/null +++ b/mods/bucket/locale/bucket.jbo.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=lo baktu be no da +Water Bucket=lo baktu be lo djacu +River Water Bucket=lo baktu be lo rirxe djacu +Lava Bucket=lo baktu be lo likro'i diff --git a/mods/bucket/locale/bucket.pt_BR.tr b/mods/bucket/locale/bucket.pt_BR.tr new file mode 100644 index 0000000..429acac --- /dev/null +++ b/mods/bucket/locale/bucket.pt_BR.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Balde Vazio +Water Bucket=Balde de Água +River Water Bucket=Balde de Água do Rio +Lava Bucket=Balde de Lava diff --git a/mods/bucket/locale/bucket.se.tr b/mods/bucket/locale/bucket.se.tr deleted file mode 100644 index 06e9ea3..0000000 --- a/mods/bucket/locale/bucket.se.tr +++ /dev/null @@ -1,5 +0,0 @@ -# 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.sv.tr b/mods/bucket/locale/bucket.sv.tr new file mode 100644 index 0000000..59ee62d --- /dev/null +++ b/mods/bucket/locale/bucket.sv.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Tom hink +Water Bucket=Vattenhink +River Water Bucket=Flodvattenshink +Lava Bucket=Lavahink diff --git a/mods/bucket/locale/bucket.uk.tr b/mods/bucket/locale/bucket.uk.tr new file mode 100644 index 0000000..a5251a5 --- /dev/null +++ b/mods/bucket/locale/bucket.uk.tr @@ -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 index fef4687..f2d89bd 100644 --- a/mods/bucket/mod.conf +++ b/mods/bucket/mod.conf @@ -1,4 +1,4 @@ name = bucket -description = Minetest Game mod: bucket +description = handle liquids in a tool named bucket depends = default optional_depends = dungeon_loot diff --git a/mods/carts/README.md b/mods/carts/README.md new file mode 100644 index 0000000..a28fd4c --- /dev/null +++ b/mods/carts/README.md @@ -0,0 +1,74 @@ +minetest mod Carts (formerly boost_cart) +========================== + +Carts and rails (formerly boost_cart) + +Information +----------- + +This mod is named `carts`, it features work from `boost_cart` mod. +This is improved rail carts mod and featured boots rails.. + +![screenshot.png](screenshot.png) + + +#### 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 + +#### Additions by TenPlus1 + +- Mesecon detector rail added +- 10 second cart drop when player or item not inside +- Alias' set to replace rails from boost_cart mod + +Technical informaton +-------------------- + +Carts, based almost entirely on the mod boost_cart [1], which +itself is based on (and fully compatible with) the carts mod [2] +and the model was originally designed by stujones11 [3] (CC-0). + +This mod can (and maybe must) replace the default carts mod of minetest game. + +[1] https://github.com/SmallJoker/boost_cart/ +[2] https://github.com/PilzAdam/carts/ +[3] https://github.com/stujones11/railcart/ + +#### Dependencies + +* default +* mesecons (optional) + +#### nodes + +| Name | node | notes | +| ------------ | --------------- | ----- | +| Rail | carts:rail | to use and travel over rails with carts | +| Bracke rails | carts:brakerail | rail to downgrade velocity of carts | +| Powered rail | carts:powerrail | rail to impulse velocity of a cart | +| Detector rail | carts:detectorrail | it depends on mesecons for detection of mese | + +Alias: + +| original | carts alias | +| -------------------- | -------------- | +| default:rail | carts:rail | +| carts:copperrail | default:rail | +| boost_cart:copperrail | default:rail | +| boost_cart:powerrail | carts:powerrail | +| boost_cart:brakerail | carts:brakerail | +| boost_cart:detectorrail | carts:detectorrail | + +Licence +------ + +The model was originally designed by stujones11 [3] (CC-0). + +Cart textures are based on original work from PixelBOX by Gambit (permissive +license). + +Check [lisence.txt](lisence.txt) diff --git a/mods/carts/README.txt b/mods/carts/README.txt deleted file mode 100644 index c0be2d7..0000000 --- a/mods/carts/README.txt +++ /dev/null @@ -1,23 +0,0 @@ -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 index 02ff6cd..a72ab72 100644 --- a/mods/carts/cart_entity.lua +++ b/mods/carts/cart_entity.lua @@ -3,6 +3,12 @@ -- support for MT game translation. local S = carts.get_translator +-- is mesecons enabled ? +local HAVE_MESECONS_ENABLED = minetest.get_modpath("mesecons") +if HAVE_MESECONS_ENABLED then + dofile(minetest.get_modpath("carts") .. "/detector.lua") +end + local cart_entity = { initial_properties = { physical = false, -- otherwise going uphill breaks @@ -29,20 +35,16 @@ function cart_entity:on_rightclick(clicker) 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") + self.driver = player_name end end function cart_entity:on_activate(staticdata, dtime_s) self.object:set_armor_groups({immortal=1}) + self.attached_items = {} -- needed to stop itemcount glitch if string.sub(staticdata, 1, string.len("return")) ~= "return" then return end @@ -66,6 +68,8 @@ 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 + -- Clean up eye height + carts:manage_attachment(child, nil) self.driver = nil end end @@ -134,7 +138,8 @@ function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, end local punch_interval = 1 - if tool_capabilities and tool_capabilities.full_punch_interval then + -- Faulty tool registrations may cause the interval to be set to 0 ! + if tool_capabilities and (tool_capabilities.full_punch_interval or 0) > 0 then punch_interval = tool_capabilities.full_punch_interval end time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval) @@ -167,6 +172,9 @@ local function rail_sound(self, dtime) minetest.after(0.2, minetest.sound_stop, handle) end local vel = self.object:get_velocity() + +if not vel then return end -- nil check + local speed = vector.length(vel) if speed > 0 then self.sound_handle = minetest.sound_play( @@ -185,6 +193,25 @@ end local v3_len = vector.length local function rail_on_step(self, dtime) + + -- if cart contains nothing then drop as item after 10 seconds + if not self.driver and #self.attached_items == 0 then + self.count = (self.count or 0) + dtime + + if self.count > 10 then + minetest.add_item(self.object:get_pos(), "carts:cart") + if self.sound_handle then + local handle = self.sound_handle + self.sound_handle = nil + minetest.after(0.2, minetest.sound_stop, handle) + end + self.object:remove() + return + end + else + self.count = 0 + end + local vel = self.object:get_velocity() if self.punched then vel = vector.add(vel, self.velocity) @@ -307,6 +334,11 @@ local function rail_on_step(self, dtime) new_acc = vector.multiply(dir, acc) end + -- mesecon detector rail + if HAVE_MESECONS_ENABLED then + carts:signal_detector_rail(vector.round(pos)) + end + -- Limits local max_vel = carts.speed_max for _, v in pairs({"x","y","z"}) do @@ -329,7 +361,7 @@ local function rail_on_step(self, dtime) for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do if not obj_:is_player() and obj_:get_luaentity() and - not obj_:get_luaentity().physical_state and +-- not obj_:get_luaentity().physical_state and obj_:get_luaentity().name == "__builtin:item" then obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0}) @@ -389,7 +421,8 @@ 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_side.png", "carts_cart_side.png"), + inventory_image = minetest.inventorycube( + "carts_cart_top.png", "carts_cart_front.png", "carts_cart_side.png"), wield_image = "carts_cart_side.png", on_place = function(itemstack, placer, pointed_thing) local under = pointed_thing.under diff --git a/mods/carts/depends.txt b/mods/carts/depends.txt new file mode 100644 index 0000000..9aad284 --- /dev/null +++ b/mods/carts/depends.txt @@ -0,0 +1,4 @@ +default +intllib? +mesecons? +dungeon_loot? diff --git a/mods/carts/detector.lua b/mods/carts/detector.lua new file mode 100644 index 0000000..e73aad4 --- /dev/null +++ b/mods/carts/detector.lua @@ -0,0 +1,75 @@ + +local mesecons_rules = mesecon.rules.flat + +function carts:turnoff_detector_rail(pos) + + local node = minetest.get_node(pos) + + if minetest.get_item_group(node.name, "detector_rail") == 1 then + + if node.name == "carts:detectorrail_on" then --has not been dug + minetest.swap_node(pos, {name = "carts:detectorrail", param2 = node.param2}) + end + + mesecon.receptor_off(pos, mesecons_rules) + end +end + + +function carts:signal_detector_rail(pos) + + local node = minetest.get_node(pos) + + if minetest.get_item_group(node.name, "detector_rail") ~= 1 then + return + end + + if node.name == "carts:detectorrail" then + minetest.swap_node(pos, {name = "carts:detectorrail_on", param2 = node.param2}) + end + + mesecon.receptor_on(pos, mesecons_rules) + + minetest.after(0.5, carts.turnoff_detector_rail, carts, pos) +end + + +carts:register_rail("carts:detectorrail", { + description = "Detector rail", + tiles = { + "carts_rail_straight_dtc.png", "carts_rail_curved_dtc.png", + "carts_rail_t_junction_dtc.png", "carts_rail_crossing_dtc.png" + }, + groups = carts:get_rail_groups({detector_rail = 1}), + + mesecons = {receptor = {state = "off", rules = mesecons_rules}}, +}) + +minetest.register_alias("boost_cart:detectorrail", "carts:detectorrail") + + +carts:register_rail("carts:detectorrail_on", { + description = "Detector rail ON (you hacker you)", + tiles = { + "carts_rail_straight_dtc_on.png", "carts_rail_curved_dtc_on.png", + "carts_rail_t_junction_dtc_on.png", "carts_rail_crossing_dtc_on.png" + }, + groups = carts:get_rail_groups({ + detector_rail = 1, not_in_creative_inventory = 1 + }), + drop = "carts:detectorrail", + + mesecons = {receptor = {state = "on", rules = mesecons_rules}}, +}) + +minetest.register_alias("boost_cart:detectorrail_on", "carts:detectorrail_on") + + +minetest.register_craft({ + output = "boost_cart:detectorrail 6", + recipe = { + {"default:steel_ingot", "mesecons:wire_00000000_off", "default:steel_ingot"}, + {"default:steel_ingot", "group:stick", "default:steel_ingot"}, + {"default:steel_ingot", "mesecons:wire_00000000_off", "default:steel_ingot"}, + }, +}) diff --git a/mods/carts/functions.lua b/mods/carts/functions.lua index a54b594..9d4e739 100644 --- a/mods/carts/functions.lua +++ b/mods/carts/functions.lua @@ -1,3 +1,5 @@ +local is_50 = minetest.get_translator + function carts:get_sign(z) if z == 0 then return 0 @@ -12,14 +14,28 @@ function carts:manage_attachment(player, obj) end local status = obj ~= nil local player_name = player:get_player_name() - if player_api.player_attached[player_name] == status then + if obj and player:get_attach() == obj then return end - player_api.player_attached[player_name] = status + + if is_50 then + player_api.player_attached[player_name] = status + else + default.player_attached[player_name] = status + end 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}) + + -- player_api does not update the animation + -- when the player is attached, reset to default animation + if is_50 then + player_api.set_animation(player, "stand") + else + default.player_set_animation(player, "stand") + end + else player:set_detach() player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0}) diff --git a/mods/carts/init.lua b/mods/carts/init.lua index 69d59d9..350b94d 100644 --- a/mods/carts/init.lua +++ b/mods/carts/init.lua @@ -1,7 +1,27 @@ -- carts/init.lua --- Load support for MT game translation. -local S = minetest.get_translator("carts") +-- translation support +local S +if minetest.get_translator ~= nil then + S = minetest.get_translator("carts") -- 5.x translation function +else + if minetest.get_modpath("intllib") then + dofile(minetest.get_modpath("intllib") .. "/init.lua") + if intllib.make_gettext_pair then + gettext, ngettext = intllib.make_gettext_pair() -- new gettext method + else + gettext = intllib.Getter() -- old text file method + end + S = gettext + else -- boilerplate function + S = function(str, ...) + local args = {...} + return str:gsub("@%d+", function(match) + return args[tonumber(match:sub(2))] + end) + end + end +end carts = {} carts.modpath = minetest.get_modpath("carts") diff --git a/mods/carts/mod.conf b/mods/carts/mod.conf index 0eab35c..63347d2 100644 --- a/mods/carts/mod.conf +++ b/mods/carts/mod.conf @@ -1,4 +1,4 @@ name = carts description = Carts (formerly boost_cart) depends = default, player_api -optional_depends = dungeon_loot +optional_depends = dungeon_loot, mesecons diff --git a/mods/carts/rails.lua b/mods/carts/rails.lua index 8bd2ba1..9de2437 100644 --- a/mods/carts/rails.lua +++ b/mods/carts/rails.lua @@ -62,3 +62,9 @@ minetest.register_craft({ {"default:steel_ingot", "group:wood", "default:steel_ingot"}, } }) + +-- add alias for boost_cart rails +minetest.register_alias("carts:copperrail", "default:rail") +minetest.register_alias("boost_cart:copperrail", "default:rail") +minetest.register_alias("boost_cart:powerrail", "carts:powerrail") +minetest.register_alias("boost_cart:brakerail", "carts:brakerail") diff --git a/mods/carts/screenshot.png b/mods/carts/screenshot.png new file mode 100644 index 0000000..e9eaa5b Binary files /dev/null and b/mods/carts/screenshot.png differ diff --git a/mods/carts/textures/carts_cart.png b/mods/carts/textures/carts_cart.png index 965347c..4eb10c5 100644 Binary files a/mods/carts/textures/carts_cart.png and b/mods/carts/textures/carts_cart.png differ diff --git a/mods/carts/textures/carts_rail_crossing.png b/mods/carts/textures/carts_rail_crossing.png index e10f3b1..71e4108 100644 Binary files a/mods/carts/textures/carts_rail_crossing.png 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 index 0bf455e..810893e 100644 Binary files a/mods/carts/textures/carts_rail_crossing_brk.png and b/mods/carts/textures/carts_rail_crossing_brk.png differ diff --git a/mods/carts/textures/carts_rail_crossing_dtc.png b/mods/carts/textures/carts_rail_crossing_dtc.png new file mode 100644 index 0000000..cf04f0f Binary files /dev/null and b/mods/carts/textures/carts_rail_crossing_dtc.png differ diff --git a/mods/carts/textures/carts_rail_crossing_dtc_on.png b/mods/carts/textures/carts_rail_crossing_dtc_on.png new file mode 100644 index 0000000..b6f5b87 Binary files /dev/null and b/mods/carts/textures/carts_rail_crossing_dtc_on.png differ diff --git a/mods/carts/textures/carts_rail_crossing_pwr.png b/mods/carts/textures/carts_rail_crossing_pwr.png index d763d50..4b085cc 100644 Binary files a/mods/carts/textures/carts_rail_crossing_pwr.png 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 index b320f0d..a51ea6a 100644 Binary files a/mods/carts/textures/carts_rail_curved.png 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 index ca40723..f1fa742 100644 Binary files a/mods/carts/textures/carts_rail_curved_brk.png and b/mods/carts/textures/carts_rail_curved_brk.png differ diff --git a/mods/carts/textures/carts_rail_curved_dtc.png b/mods/carts/textures/carts_rail_curved_dtc.png new file mode 100644 index 0000000..8117c27 Binary files /dev/null and b/mods/carts/textures/carts_rail_curved_dtc.png differ diff --git a/mods/carts/textures/carts_rail_curved_dtc_on.png b/mods/carts/textures/carts_rail_curved_dtc_on.png new file mode 100644 index 0000000..032630f Binary files /dev/null and b/mods/carts/textures/carts_rail_curved_dtc_on.png differ diff --git a/mods/carts/textures/carts_rail_curved_pwr.png b/mods/carts/textures/carts_rail_curved_pwr.png index 781bbd0..1e3e70a 100644 Binary files a/mods/carts/textures/carts_rail_curved_pwr.png 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 index 30dcafe..1862892 100644 Binary files a/mods/carts/textures/carts_rail_straight.png 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 index 0c69052..96f8405 100644 Binary files a/mods/carts/textures/carts_rail_straight_brk.png and b/mods/carts/textures/carts_rail_straight_brk.png differ diff --git a/mods/carts/textures/carts_rail_straight_dtc.png b/mods/carts/textures/carts_rail_straight_dtc.png new file mode 100644 index 0000000..5e2ccef Binary files /dev/null and b/mods/carts/textures/carts_rail_straight_dtc.png differ diff --git a/mods/carts/textures/carts_rail_straight_dtc_on.png b/mods/carts/textures/carts_rail_straight_dtc_on.png new file mode 100644 index 0000000..e81dbe1 Binary files /dev/null and b/mods/carts/textures/carts_rail_straight_dtc_on.png differ diff --git a/mods/carts/textures/carts_rail_straight_pwr.png b/mods/carts/textures/carts_rail_straight_pwr.png index e067ff1..03784f0 100644 Binary files a/mods/carts/textures/carts_rail_straight_pwr.png 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 index 8b1b946..8887f27 100644 Binary files a/mods/carts/textures/carts_rail_t_junction.png 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 index 6b4f6fa..60a2568 100644 Binary files a/mods/carts/textures/carts_rail_t_junction_brk.png and b/mods/carts/textures/carts_rail_t_junction_brk.png differ diff --git a/mods/carts/textures/carts_rail_t_junction_dtc.png b/mods/carts/textures/carts_rail_t_junction_dtc.png new file mode 100644 index 0000000..b154f43 Binary files /dev/null and b/mods/carts/textures/carts_rail_t_junction_dtc.png differ diff --git a/mods/carts/textures/carts_rail_t_junction_dtc_on.png b/mods/carts/textures/carts_rail_t_junction_dtc_on.png new file mode 100644 index 0000000..9fda111 Binary files /dev/null and b/mods/carts/textures/carts_rail_t_junction_dtc_on.png differ diff --git a/mods/carts/textures/carts_rail_t_junction_pwr.png b/mods/carts/textures/carts_rail_t_junction_pwr.png index dd0eede..c408b5a 100644 Binary files a/mods/carts/textures/carts_rail_t_junction_pwr.png and b/mods/carts/textures/carts_rail_t_junction_pwr.png differ diff --git a/mods/creative/README.md b/mods/creative/README.md new file mode 100644 index 0000000..9478a9b --- /dev/null +++ b/mods/creative/README.md @@ -0,0 +1,38 @@ +Minetest Game mod: creative +=========================== + +Simplified creative with faster loading + +Information +------------ + +This mod is named `creative` and is a replacement for default "creative" mod +of orginal game, with reduced tabs, also it uses a cached memory to faster lodaing. + +![screenshot.png](screenshot.png) + +Technical Information +---------------------- + +This mod fork used as base the commit `72acd4db9cc676f9e0ae1435e371adb2b10cdbe8`, +for backguard compatibility with 5.2 and 0.4.16, with minimal backports, you +can download from https://codeberg.org/minenux/minetest-mod-creative and after +clone or downloaded renamed to `creative` (obviously replace the current one if any) + +Modified by TenPlus1 (added creative privelage, reduced tab count, tweaked code), +original work is at https://notabug.org/TenPlus1/creative + +### Authors of source code + +Originally by Perttu Ahola (celeron55) (MIT) +Jean-Patrick G. (kilbith) (MIT) + +### Author of media (textures) + +Jean-Patrick G. (kilbith) (CC BY-SA 3.0) + +LICENSE +------- + +See [license.txt](license.txt) for license information. + diff --git a/mods/creative/README.txt b/mods/creative/README.txt index 32e8d22..9478a9b 100644 --- a/mods/creative/README.txt +++ b/mods/creative/README.txt @@ -1,17 +1,38 @@ Minetest Game mod: creative =========================== -See license.txt for license information. -Authors of source code +Simplified creative with faster loading + +Information +------------ + +This mod is named `creative` and is a replacement for default "creative" mod +of orginal game, with reduced tabs, also it uses a cached memory to faster lodaing. + +![screenshot.png](screenshot.png) + +Technical Information ---------------------- + +This mod fork used as base the commit `72acd4db9cc676f9e0ae1435e371adb2b10cdbe8`, +for backguard compatibility with 5.2 and 0.4.16, with minimal backports, you +can download from https://codeberg.org/minenux/minetest-mod-creative and after +clone or downloaded renamed to `creative` (obviously replace the current one if any) + +Modified by TenPlus1 (added creative privelage, reduced tab count, tweaked code), +original work is at https://notabug.org/TenPlus1/creative + +### 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) +### Author of media (textures) + +Jean-Patrick G. (kilbith) (CC BY-SA 3.0) + +LICENSE +------- + +See [license.txt](license.txt) for license information. + diff --git a/mods/creative/depends.txt b/mods/creative/depends.txt new file mode 100644 index 0000000..e354eb3 --- /dev/null +++ b/mods/creative/depends.txt @@ -0,0 +1 @@ +sfinv diff --git a/mods/creative/description.txt b/mods/creative/description.txt new file mode 100644 index 0000000..aefb5cd --- /dev/null +++ b/mods/creative/description.txt @@ -0,0 +1 @@ +Simplified creative with faster loading diff --git a/mods/creative/init.lua b/mods/creative/init.lua index a1d57c8..0215d3d 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -1,30 +1,9 @@ --- 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"), + description = "Allow player to use creative inventory", give_to_singleplayer = false, - give_to_admin = false, - on_grant = update_sfinv, - on_revoke = update_sfinv, + give_to_admin = false }) local creative_mode_cache = minetest.settings:get_bool("creative_mode") @@ -34,7 +13,205 @@ function creative.is_enabled_for(name) minetest.check_player_privs(name, {creative = true}) end -dofile(minetest.get_modpath("creative") .. "/inventory.lua") +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 and 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 + } + + 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 + +function creative.update_creative_inventory(player_name, tab_content) + local creative_list = {} + 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}) + + local items = inventory_cache[tab_content] or init_creative_cache(tab_content) + + for name, def in pairs(items) do + if def.name:find(inv.filter, 1, true) or + def.description:lower():find(inv.filter, 1, true) then + creative_list[#creative_list+1] = name + end + end + + table.sort(creative_list) + 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 start_i = inv.start_i or 0 + local pagenum = math.floor(start_i / (3*8) + 1) + local pagemax = math.ceil(inv.size / (3*8)) + return sfinv.make_formspec(player, context, + "label[6.2,3.35;" .. minetest.colorize("#FFFF00", tostring(pagenum)) .. " / " .. tostring(pagemax) .. "]" .. + [[ + image[4.06,3.4;0.8,0.8;creative_trash_icon.png] + listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] + list[current_player;main;0,4.7;8,1;] + list[current_player;main;0,5.85;8,3;8] + list[detached:creative_trash;main;4,3.3;1,1;] + listring[] + button[5.4,3.2;0.8,0.9;creative_prev;<] + button[7.25,3.2;0.8,0.9;creative_next;>] + button[2.1,3.4;0.8,0.5;creative_search;?] + button[2.75,3.4;0.8,0.5;creative_clear;X] +-- image_button[5.4,3.25;0.8,0.8;creative_prev_icon.png;creative_prev;] +-- image_button[7.2,3.25;0.8,0.8;creative_next_icon.png;creative_next;] +-- image_button[2.1,3.25;0.8,0.8;creative_search_icon.png;creative_search;] +-- image_button[2.75,3.25;0.8,0.8;creative_clear_icon.png;creative_clear;] + tooltip[creative_search;Search] + tooltip[creative_clear;Reset] + tooltip[creative_prev;Previous page] + tooltip[creative_next;Next page] + listring[current_player;main] + field_close_on_enter[creative_filter;false] + ]] .. + "field[0.3,3.5;2.2,1;creative_filter;;" .. minetest.formspec_escape(inv.filter) .. "]" .. + "listring[detached:creative_" .. player_name .. ";main]" .. + "list[detached:creative_" .. player_name .. ";main;0,0;8,3;" .. tostring(start_i) .. "]" .. + default.get_hotbar_bg(0,4.7) .. + default.gui_bg .. default.gui_bg_img .. default.gui_slots + .. creative.formspec_add, false) + 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 = "" + creative.update_creative_inventory(player_name, items) + 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() + creative.update_creative_inventory(player_name, items) + 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 - 3*8 + if start_i < 0 then + start_i = inv.size - (inv.size % (3*8)) + if inv.size == start_i then + start_i = math.max(0, inv.size - (3*8)) + end + end + elseif fields.creative_next then + start_i = start_i + 3*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 + +--creative.register_tab("all", "All", minetest.registered_items) +--creative.register_tab("nodes", "Nodes", minetest.registered_nodes) +--creative.register_tab("tools", "Tools", minetest.registered_tools) +--creative.register_tab("craftitems", "Items", minetest.registered_craftitems) +creative.register_tab("all", "Creative", minetest.registered_items) + +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 + if creative_mode_cache then -- Dig time is modified according to difference (leveldiff) between tool @@ -46,8 +223,10 @@ if creative_mode_cache then local digtime = 42 local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256} - -- Override the hand tool - minetest.override_item("", { + minetest.register_item(":", { + type = "none", + wield_image = "wieldhand.png", + wield_scale = {x = 1, y = 1, z = 2.5}, range = 10, tool_capabilities = { full_punch_interval = 0.5, @@ -58,9 +237,6 @@ if creative_mode_cache then 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}, } @@ -78,7 +254,8 @@ end) 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 +-- not creative.is_enabled_for(digger:get_player_name()) then + not creative_mode_cache then return old_handle_node_drops(pos, drops, digger) end local inv = digger:get_inventory() diff --git a/mods/creative/inventory.lua b/mods/creative/inventory.lua deleted file mode 100644 index 2e93e5f..0000000 --- a/mods/creative/inventory.lua +++ /dev/null @@ -1,214 +0,0 @@ --- 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 function match(s, filter) - if filter == "" then - return 0 - end - if s:lower():find(filter, 1, true) then - return #s - #filter - end - return nil -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 creative_list = {} - local order = {} - for name, def in pairs(items) do - local m = match(def.description, inv.filter) or match(def.name, inv.filter) - if m then - creative_list[#creative_list+1] = name - -- Sort by description length 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 - -creative.register_tab("all", S("All"), minetest.registered_items) -creative.register_tab("nodes", S("Nodes"), minetest.registered_nodes) -creative.register_tab("tools", S("Tools"), minetest.registered_tools) -creative.register_tab("craftitems", S("Items"), minetest.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 index 50ff9c7..4ad1d5f 100644 --- a/mods/creative/license.txt +++ b/mods/creative/license.txt @@ -30,7 +30,6 @@ 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. diff --git a/mods/creative/locale/creative.de.tr b/mods/creative/locale/creative.de.tr deleted file mode 100644 index 02b0277..0000000 --- a/mods/creative/locale/creative.de.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index f4e39a7..0000000 --- a/mods/creative/locale/creative.es.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index 695c0a1..0000000 --- a/mods/creative/locale/creative.fr.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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.it.tr b/mods/creative/locale/creative.it.tr deleted file mode 100644 index 1c82189..0000000 --- a/mods/creative/locale/creative.it.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index a2aef80..0000000 --- a/mods/creative/locale/creative.ms.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index f649dbc..0000000 --- a/mods/creative/locale/creative.ru.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index e78bc2c..0000000 --- a/mods/creative/locale/creative.se.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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.zh_CN.tr b/mods/creative/locale/creative.zh_CN.tr deleted file mode 100644 index 1ca424e..0000000 --- a/mods/creative/locale/creative.zh_CN.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index c5746d4..0000000 --- a/mods/creative/locale/creative.zh_TW.tr +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index 3e79730..0000000 --- a/mods/creative/locale/template.txt +++ /dev/null @@ -1,10 +0,0 @@ -# textdomain: creative -Allow player to use creative inventory= -Search= -Reset= -Previous page= -Next page= -All= -Nodes= -Tools= -Items= diff --git a/mods/creative/mod.conf b/mods/creative/mod.conf index 0b3f745..8aeabd1 100644 --- a/mods/creative/mod.conf +++ b/mods/creative/mod.conf @@ -1,3 +1,3 @@ name = creative -description = Minetest Game mod: creative -depends = default, sfinv +depends = sfinv +description = Simplified creative with faster loading diff --git a/mods/creative/screenshot.png b/mods/creative/screenshot.png new file mode 100644 index 0000000..c47e5f3 Binary files /dev/null and b/mods/creative/screenshot.png differ diff --git a/mods/creative/textures/creative_clear_icon.png b/mods/creative/textures/creative_clear_icon.png deleted file mode 100644 index 9244264..0000000 Binary files a/mods/creative/textures/creative_clear_icon.png and /dev/null differ diff --git a/mods/creative/textures/creative_next_icon.png b/mods/creative/textures/creative_next_icon.png deleted file mode 100644 index 82cf3d3..0000000 Binary files a/mods/creative/textures/creative_next_icon.png and /dev/null differ diff --git a/mods/creative/textures/creative_prev_icon.png b/mods/creative/textures/creative_prev_icon.png deleted file mode 100644 index b26cd15..0000000 Binary files a/mods/creative/textures/creative_prev_icon.png and /dev/null differ diff --git a/mods/creative/textures/creative_search_icon.png b/mods/creative/textures/creative_search_icon.png deleted file mode 100644 index aace804..0000000 Binary files a/mods/creative/textures/creative_search_icon.png and /dev/null differ diff --git a/mods/creative/textures/creative_trash_icon.png b/mods/creative/textures/creative_trash_icon.png index 7d7a0a6..9ebb675 100644 Binary files a/mods/creative/textures/creative_trash_icon.png and b/mods/creative/textures/creative_trash_icon.png differ diff --git a/mods/doors/README.md b/mods/doors/README.md new file mode 100644 index 0000000..f0e1c27 --- /dev/null +++ b/mods/doors/README.md @@ -0,0 +1,167 @@ +minetest mod Doors Redo +========================= + +This mod improves doors, featured also a master key + +Information +----------- + +This mod must be named `doors` a improvement version of the built-in Doors mod +also featured the player to craft a key tool which can be used on any of the +registered doors to flip between states (open, owned, protected) + +![screenshot.png](screenshot.png) + +Tech information +---------------- + +This mod sustitute default one, you must disable the default of minetest +game if present or override it. + +#### Door States + +* OPEN - This is like default Doors mod, can be opened by any player or dug up. +* OWNED - This locks the door so that only the owner can open or dig the door. +* PROTECTED - This locks the door but based on protected area the door sits inside. + +Note: A protection mod must be installed to use Protected mode so that it works +properly, not having one running will mean all protected doors will open for +anyone who uses them. + +#### Dependencies + +* default + +Optional dependences: + +* screwdriver +* creative (only in newer engines) +* protector + +#### Nodes + +| Node name | Description name | +| ----------------------- | --------------------- | +| doors:hidden | Hidden Door Segment | +| doors:trapdoor | Trapdoor | +| doors:trapdoor_steel | Steel Trapdoor | +| doors:door_steel | Steel Door | +| doors:door_glass | Glass Door | +| doors:door_obsidian_glass | Obsidian Glass Door | +| doors:door_phiwari | Phiwari's Wooden Door | +| doors:door_iceage | IceAge's Wooden Door | +| doors:gate_wood | Wooden Fence Gate | +| doors:gate_acacia_wood | Acacia Fence Gate | +| doors:gate_junglewood | Junglewood Fence Gate | +| doors:gate_pine_wood | Pine Fence Gate | +| doors:gate_aspen_wood | Aspen Fence Gate | + +#### Items tools + +The key tool is crafted using 5x steel ingots (2x2 box in lower left and 1 in +top right). When held in players hand you can punch a door to flip between each +state to open, lock (own) and protect the door. + +| Node item | Description name | +| --------------------- | --------------------- | +| doors:key | Key Tool | + +#### Know issues + +In past were reported some issues with homedecor doors, as +in https://notabug.org/TenPlus1/doors/issues/3 #3 .. + +Replacing the older homdecor doors with their new door api counterparts. + +License +------- + +#### 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) + +Finally featured by TenPlus1 + +#### 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 + +TenPlus1 (CC-BY-SA-3.0): + doors_key.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) + + +Check [license.txt](license.txt) diff --git a/mods/doors/README.txt b/mods/doors/README.txt index f9caaff..f0e1c27 100644 --- a/mods/doors/README.txt +++ b/mods/doors/README.txt @@ -1,9 +1,83 @@ -Minetest Game mod: doors -======================== -See license.txt for license information. +minetest mod Doors Redo +========================= + +This mod improves doors, featured also a master key + +Information +----------- + +This mod must be named `doors` a improvement version of the built-in Doors mod +also featured the player to craft a key tool which can be used on any of the +registered doors to flip between states (open, owned, protected) + +![screenshot.png](screenshot.png) + +Tech information +---------------- + +This mod sustitute default one, you must disable the default of minetest +game if present or override it. + +#### Door States + +* OPEN - This is like default Doors mod, can be opened by any player or dug up. +* OWNED - This locks the door so that only the owner can open or dig the door. +* PROTECTED - This locks the door but based on protected area the door sits inside. + +Note: A protection mod must be installed to use Protected mode so that it works +properly, not having one running will mean all protected doors will open for +anyone who uses them. + +#### Dependencies + +* default + +Optional dependences: + +* screwdriver +* creative (only in newer engines) +* protector + +#### Nodes + +| Node name | Description name | +| ----------------------- | --------------------- | +| doors:hidden | Hidden Door Segment | +| doors:trapdoor | Trapdoor | +| doors:trapdoor_steel | Steel Trapdoor | +| doors:door_steel | Steel Door | +| doors:door_glass | Glass Door | +| doors:door_obsidian_glass | Obsidian Glass Door | +| doors:door_phiwari | Phiwari's Wooden Door | +| doors:door_iceage | IceAge's Wooden Door | +| doors:gate_wood | Wooden Fence Gate | +| doors:gate_acacia_wood | Acacia Fence Gate | +| doors:gate_junglewood | Junglewood Fence Gate | +| doors:gate_pine_wood | Pine Fence Gate | +| doors:gate_aspen_wood | Aspen Fence Gate | + +#### Items tools + +The key tool is crafted using 5x steel ingots (2x2 box in lower left and 1 in +top right). When held in players hand you can punch a door to flip between each +state to open, lock (own) and protect the door. + +| Node item | Description name | +| --------------------- | --------------------- | +| doors:key | Key Tool | + +#### Know issues + +In past were reported some issues with homedecor doors, as +in https://notabug.org/TenPlus1/doors/issues/3 #3 .. + +Replacing the older homdecor doors with their new door api counterparts. + +License +------- + +#### Authors of source code -Authors of source code ----------------------- Originally by PilzAdam (MIT) Modified by BlockMen (MIT): Added sounds, glass doors (glass, obsidian glass) and trapdoor. @@ -16,9 +90,10 @@ Added Fence Gate model, code, and sounds. Various Minetest developers and contributors (MIT) +Finally featured by TenPlus1 + +#### Authors of media (textures) -Authors of media (textures) ---------------------------- Following textures created by Fernando Zapata (CC BY-SA 3.0): door_wood.png door_wood_a.png @@ -52,14 +127,16 @@ Glass door textures by Krock and paramat based on textures by VanessaE (CC BY-SA doors_door_glass.png doors_item_glass.png +TenPlus1 (CC-BY-SA-3.0): + doors_key.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) -Authors of media (models) -------------------------- Door 3d models by sofar (CC-BY-SA-3.0) - door_a.obj - door_b.obj @@ -68,8 +145,8 @@ Fence gate models by sofar (CC-BY-SA-3.0) - fencegate_closed.obj -Authors of media (sounds) -------------------------- +#### 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) @@ -85,3 +162,6 @@ Steel door sounds open & close (CC-BY-3.0) by HazMatt 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) + + +Check [license.txt](license.txt) diff --git a/mods/doors/depends.txt b/mods/doors/depends.txt new file mode 100644 index 0000000..dcca666 --- /dev/null +++ b/mods/doors/depends.txt @@ -0,0 +1,3 @@ +default +screwdriver? +creative? diff --git a/mods/doors/init.lua b/mods/doors/init.lua index ee4a188..f314929 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -1,70 +1,113 @@ --- doors/init.lua + +local is_53 = minetest.has_feature("object_step_has_moveresult") -- our API object -doors = {} +doors = { + mod = "redo", + registered_doors = {}, + registered_trapdoors = {} +} -doors.registered_doors = {} -doors.registered_trapdoors = {} +-- cache creative +local creative = minetest.settings:get_bool("creative_mode") --- Load support for MT game translation. -local S = minetest.get_translator("doors") +function is_creative_enabled_for(name) + + if is_53 then + return minetest.is_creative_enabled(name) + end + + if creative or minetest.check_player_privs(name, {creative = true}) then + return true + end + + return false +end 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 @@ -74,16 +117,18 @@ function doors.get(pos) 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"), + description = "Hidden Door Segment", -- can't use airlike otherwise falling nodes will turn to entities -- and will be forever stuck until door is removed. drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, + use_texture_alpha = "clip", -- has to be walkable for falling nodes to stop falling. walkable = true, pointable = false, @@ -97,51 +142,57 @@ minetest.register_node("doors:hidden", { -- 1px transparent block inside door hinge near node top. node_box = { type = "fixed", - fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32}, + fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32} }, -- collision_box needed otherise selection box would be full node size collision_box = { type = "fixed", - fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32}, - }, + 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 = "_a", param2 = 3 }, + { v = "_a", param2 = 0 }, + { v = "_a", param2 = 1 }, + { v = "_a", param2 = 2 } }, { - {v = "_b", param2 = 1}, - {v = "_b", param2 = 2}, - {v = "_b", param2 = 3}, - {v = "_b", param2 = 0}, + { v = "_b", param2 = 1 }, + { v = "_b", param2 = 2 }, + { v = "_b", param2 = 3 }, + { v = "_b", param2 = 0 } }, { - {v = "_b", param2 = 1}, - {v = "_b", param2 = 2}, - {v = "_b", param2 = 3}, - {v = "_b", param2 = 0}, + { v = "_b", param2 = 1 }, + { v = "_b", param2 = 2 }, + { v = "_b", param2 = 3 }, + { v = "_b", param2 = 0 } }, { - {v = "_a", param2 = 3}, - {v = "_a", param2 = 0}, - {v = "_a", param2 = 1}, - {v = "_a", param2 = 2}, - }, + { v = "_a", param2 = 3 }, + { v = "_a", param2 = 0 }, + { v = "_a", param2 = 1 }, + { v = "_a", param2 = 2 } + } } + function doors.door_toggle(pos, node, clicker) - local meta = minetest.get_meta(pos) + + local meta = minetest.get_meta(pos) ; if not meta then return false end + 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 @@ -154,10 +205,27 @@ function doors.door_toggle(pos, node, clicker) replace_old_owner_information(pos) - if clicker and not default.can_interact_with_node(clicker, pos) then - return false + if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then + + local owner = meta:get_string("owner") + local prot = meta:get_string("doors_protected") + + if prot ~= "" then + + if minetest.is_protected(pos, clicker:get_player_name()) then + return false + end + + elseif owner ~= "" then + + if clicker:get_player_name() ~= owner then + return false + end + end end + local old = state + -- until Lua-5.2 we have no bitwise operators :( if state % 2 == 1 then state = state - 1 @@ -175,50 +243,66 @@ function doors.door_toggle(pos, node, clicker) end if state % 2 == 0 then + minetest.sound_play(def.door.sounds[1], - {pos = pos, gain = 0.3, max_hear_distance = 10}, true) + {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) + {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 + 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) +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 + local _, callback + + for _, callback in pairs(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 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, + type = pointed_thing.type, above = vector.new(pointed_thing.above), under = vector.new(pointed_thing.under), - ref = pointed_thing.ref, + ref = pointed_thing.ref } - callback(place_to_copy, newnode_copy, placer, - oldnode_copy, itemstack, pointed_thing_copy) + + 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) + + local digger_name = digger and digger:get_player_name() + + if digger_name and minetest.get_player_privs(digger_name).protection_bypass then + return true + end + + return minetest.get_meta(pos):get_string("owner") == digger_name end function doors.register(name, def) + if not name:find(":") then name = "doors:" .. name end @@ -227,31 +311,39 @@ function doors.register(name, def) 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}} + {{ 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}) @@ -264,17 +356,22 @@ function doors.register(name, def) 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 doorname = itemstack:get_name() 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 + + 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 @@ -285,6 +382,7 @@ function doors.register(name, def) 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 @@ -299,6 +397,7 @@ function doors.register(name, def) 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 @@ -309,53 +408,61 @@ function doors.register(name, def) {x = -1, y = 0, z = 0}, {x = 0, y = 0, z = 1}, {x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = -1}, + {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, + 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(pos, {name = doorname .. "_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(pos, {name = doorname .. "_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 + + local pn = placer:get_player_name() + meta:set_string("owner", pn) - meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn)) + meta:set_string("infotext", "Owned by " .. pn) end - if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then + if not is_creative_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) + 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, + recipe = def.recipe }) end + def.recipe = nil if not def.sounds then @@ -373,20 +480,25 @@ function doors.register(name, def) 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 }, - } + 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 @@ -394,37 +506,14 @@ function doors.register(name, def) 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 @@ -437,95 +526,137 @@ function doors.register(name, def) def.paramtype = "light" def.paramtype2 = "facedir" def.sunlight_propagates = true + def.use_texture_alpha = def.use_texture_alpha or "clip" 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.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_a.b3d" + minetest.register_node(":" .. name .. "_a", table.copy(def)) - def.mesh = "door_b.obj" - minetest.register_node(":" .. name .. "_b", def) + minetest.register_alias(name .. "_c", name .. "_b") + + def.mesh = "door_b.b3d" + minetest.register_node(":" .. name .. "_b", table.copy(def)) + + minetest.register_alias(name .. "_d", name .. "_a") doors.registered_doors[name .. "_a"] = true doors.registered_doors[name .. "_b"] = 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 = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, - recipe = { - {"group:wood", "group:wood"}, - {"group:wood", "group:wood"}, - {"group:wood", "group:wood"}, - } + tiles = {{name = "doors_door_wood.png", backface_culling = true}}, + description = "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 = {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"}, - } + tiles = {{name = "doors_door_steel.png", backface_culling = true}}, + description = "Steel Door", + inventory_image = "doors_item_steel.png", + protected = true, + groups = {node = 1, cracky = 1, level = 2}, + sounds = default.node_sound_stone_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 = {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"}, - } + tiles = { "doors_door_glass.png"}, + description = "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 = {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"}, - }, + tiles = { "doors_door_obsidian_glass.png" }, + description = "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"} + } }) + +-- special doors (CC0 textures by Phiwari123 and IceAgeComing) +doors.register("door_phiwari", { + tiles = {{name = "doors_door_phiwari.png", backface_culling = true}}, + description = "Phiwari's Wooden Door", + inventory_image = "doors_item_phiwari.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"group:wood", "default:obsidian_glass"}, + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"} + } +}) + + +doors.register("door_iceage", { + tiles = {{name = "doors_door_iceage.png", backface_culling = true}}, + description = "IceAge's Wooden Door", + inventory_image = "doors_item_iceage.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"group:wood", "default:iron_lump"}, + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"} + } +}) + + -- 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 " .. @@ -538,30 +669,56 @@ 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 + node = node or minetest.get_node(pos) + + if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then + + local meta = minetest.get_meta(pos) ; if not meta then return false end + local owner = meta:get_string("owner") + local prot = meta:get_string("doors_protected") + + if prot ~= "" then + + if minetest.is_protected(pos, clicker:get_player_name()) then + return false + end + + elseif owner ~= "" then + + if clicker:get_player_name() ~= owner then + return false + end + end 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}) + {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}) + {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 @@ -570,7 +727,9 @@ function doors.register_trapdoor(name, def) local name_opened = name.."_open" def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + doors.trapdoor_toggle(pos, node, clicker) + return itemstack end @@ -578,49 +737,29 @@ function doors.register_trapdoor(name, def) def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = "facedir" + def.use_texture_alpha = def.use_texture_alpha or "clip" 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)) + meta:set_string("owner", pn) + meta:set_string("infotext", "Owned by "..pn) + + return is_creative_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 @@ -650,13 +789,12 @@ function doors.register_trapdoor(name, def) } def_closed.tiles = { def.tile_front, - def.tile_front .. '^[transformFY', + 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} @@ -667,11 +805,11 @@ function doors.register_trapdoor(name, def) } 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.tile_side .. "^[transform2", + def.tile_side .. "^[transform3", + def.tile_side .. "^[transform1", + def.tile_front .. "^[transform46", + def.tile_front .. "^[transform6" } def_opened.drop = name_closed @@ -684,26 +822,26 @@ function doors.register_trapdoor(name, def) doors.registered_trapdoors[name_closed] = true end + doors.register_trapdoor("doors:trapdoor", { - description = S("Wooden Trapdoor"), + description = "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}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1} }) doors.register_trapdoor("doors:trapdoor_steel", { - description = S("Steel Trapdoor"), + description = "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}, + groups = {cracky = 1, level = 2, door = 1} }) minetest.register_craft({ @@ -711,7 +849,7 @@ minetest.register_craft({ recipe = { {"group:wood", "group:wood", "group:wood"}, {"group:wood", "group:wood", "group:wood"}, - {"", "", ""}, + {"", "", ""} } }) @@ -719,15 +857,104 @@ minetest.register_craft({ output = "doors:trapdoor_steel", recipe = { {"default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"} } }) +-----key tool----- + +minetest.register_tool("doors:key", { + description = "Key Tool", + inventory_image = "doors_key.png", + + on_use = function(itemstack, user, pointed_thing) + + local pos = pointed_thing.under + + if pointed_thing.type ~= "node" + or not doors.get(pos) then + return + end + + replace_old_owner_information(pos) + + local player_name = user:get_player_name() + local meta = minetest.get_meta(pos) ; if not meta then return end + local owner = meta:get_string("owner") + local prot = meta:get_string("doors_protected") + local ok = 0 + local infotext = "" + + if prot == "" + and owner == "" then + + -- flip normal to owned + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + else + infotext = "Owned by " .. player_name + owner = player_name + prot = "" + ok = 1 + end + + elseif prot == "" + and owner ~= "" then + + -- flip owned to protected + if player_name == owner then + infotext = "Protected by " .. player_name + owner = "" + prot = player_name + ok = 1 + end + + elseif prot ~= "" + and owner == "" then + + -- flip protected to normal + if player_name == prot then + infotext = " " + owner = "" + prot = "" + ok = 1 + end + end + + if ok == 1 then + + meta:set_string("infotext", infotext) + meta:set_string("owner", owner) + meta:set_string("doors_protected", prot) + + if not is_creative_enabled_for(player_name) then + itemstack:add_wear(65535 / 50) + end + end + + return itemstack + end +}) + +minetest.register_craft({ + output = "doors:key", + recipe = { + {"", "", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", ""}, + {"default:steel_ingot", "default:steel_ingot", ""} + } +}) + +-- remove default key +--if minetest.registered_craftitems["default:skeleton_key"] then +-- minetest.clear_craft({output = "default:skeleton_key"}) +--end ----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", @@ -740,20 +967,25 @@ function doors.register_fencegate(name, def) 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 @@ -770,15 +1002,17 @@ function doors.register_fencegate(name, def) 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} + fixed = {-1/2, -1/2, -1/4, 1/2, 1/2 + fence_collision_extra, 1/4} } local fence_open = table.copy(fence) + fence_open.mesh = "doors_fencegate_open.obj" fence_open.gate = name .. "_closed" fence_open.sound = "doors_fencegate_close" @@ -786,7 +1020,7 @@ function doors.register_fencegate(name, def) 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 }} + {-1/2, -3/8, -1/2, -3/8, 3/8, 0}}, } minetest.register_node(":" .. name .. "_closed", fence_closed) @@ -801,82 +1035,82 @@ function doors.register_fencegate(name, def) }) end + doors.register_fencegate("doors:gate_wood", { - description = S("Apple Wood Fence Gate"), + description = "Wooden 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"), + description = "Acacia 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"), + description = "Junglewood 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"), + description = "Pine Fence Gate", texture = "default_pine_wood.png", material = "default:pine_wood", - groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} }) doors.register_fencegate("doors:gate_aspen_wood", { - description = S("Aspen Wood Fence Gate"), + description = "Aspen Fence Gate", texture = "default_aspen_wood.png", material = "default:aspen_wood", - groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} }) - ----fuels---- minetest.register_craft({ type = "fuel", recipe = "doors:trapdoor", - burntime = 7, + burntime = 7 }) minetest.register_craft({ type = "fuel", recipe = "doors:door_wood", - burntime = 14, + burntime = 14 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_wood_closed", - burntime = 7, + burntime = 7 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_acacia_wood_closed", - burntime = 8, + burntime = 8 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_junglewood_closed", - burntime = 9, + burntime = 9 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_pine_wood_closed", - burntime = 6, + burntime = 6 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_aspen_wood_closed", - burntime = 5, + burntime = 5 }) diff --git a/mods/doors/locale/doors.de.tr b/mods/doors/locale/doors.de.tr deleted file mode 100644 index 79707ce..0000000 --- a/mods/doors/locale/doors.de.tr +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 677f2df..0000000 --- a/mods/doors/locale/doors.es.tr +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 930f75c..0000000 --- a/mods/doors/locale/doors.fr.tr +++ /dev/null @@ -1,18 +0,0 @@ -# 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.it.tr b/mods/doors/locale/doors.it.tr deleted file mode 100644 index 4737ee2..0000000 --- a/mods/doors/locale/doors.it.tr +++ /dev/null @@ -1,19 +0,0 @@ -# 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'acciacio -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 \ No newline at end of file diff --git a/mods/doors/locale/doors.ms.tr b/mods/doors/locale/doors.ms.tr deleted file mode 100644 index 93d6df2..0000000 --- a/mods/doors/locale/doors.ms.tr +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index dc5c3c0..0000000 --- a/mods/doors/locale/doors.ru.tr +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 1ecbead..0000000 --- a/mods/doors/locale/doors.se.tr +++ /dev/null @@ -1,19 +0,0 @@ -# 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.zh_CN.tr b/mods/doors/locale/doors.zh_CN.tr deleted file mode 100644 index 5294558..0000000 --- a/mods/doors/locale/doors.zh_CN.tr +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 47959ee..0000000 --- a/mods/doors/locale/doors.zh_TW.tr +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 8b5c349..0000000 --- a/mods/doors/locale/template.txt +++ /dev/null @@ -1,18 +0,0 @@ -# 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 index de053c2..352c795 100644 --- a/mods/doors/mod.conf +++ b/mods/doors/mod.conf @@ -1,4 +1,4 @@ name = doors -description = Minetest Game mod: doors depends = default -optional_depends = screwdriver +optional_depends = screwdriver, creative +description = Replaces default doors and adds protection support with switching key. diff --git a/mods/doors/models/door_a.b3d b/mods/doors/models/door_a.b3d new file mode 100644 index 0000000..7f9249f Binary files /dev/null and b/mods/doors/models/door_a.b3d differ diff --git a/mods/doors/models/door_a.obj b/mods/doors/models/door_a.obj deleted file mode 100644 index bd5127b..0000000 --- a/mods/doors/models/door_a.obj +++ /dev/null @@ -1,40 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: 'door_a.blend' -# www.blender.org -mtllib door_a.mtl -o Cube_Cube.001 -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_b.b3d b/mods/doors/models/door_b.b3d new file mode 100644 index 0000000..77a1a16 Binary files /dev/null and b/mods/doors/models/door_b.b3d differ diff --git a/mods/doors/models/door_b.obj b/mods/doors/models/door_b.obj deleted file mode 100644 index c5607b8..0000000 --- a/mods/doors/models/door_b.obj +++ /dev/null @@ -1,40 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: 'door_b.blend' -# www.blender.org -mtllib door_b.mtl -o Cube_Cube.001 -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.842105 0.000000 -vt 0.894737 0.000000 -vt 0.894737 1.000000 -vt 0.421053 1.000000 -vt 0.421053 0.000000 -vt 0.947368 0.000000 -vt 0.947368 1.000000 -vt 0.000000 1.000000 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 0.500000 -vt 0.947368 0.500000 -vt 1.000000 1.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 1/2/1 3/3/1 4/4/1 -f 4/5/2 3/6/2 7/2/2 8/1/2 -f 8/4/3 7/3/3 5/7/3 6/8/3 -f 6/9/4 5/10/4 1/6/4 2/5/4 -f 1/11/5 5/12/5 7/13/5 3/7/5 -f 6/8/6 2/13/6 4/12/6 8/14/6 diff --git a/mods/doors/screenshot.png b/mods/doors/screenshot.png new file mode 100644 index 0000000..6220f8b Binary files /dev/null and b/mods/doors/screenshot.png differ diff --git a/mods/doors/textures/doors_door_glass.png b/mods/doors/textures/doors_door_glass.png index c296a0f..afc36ed 100644 Binary files a/mods/doors/textures/doors_door_glass.png and b/mods/doors/textures/doors_door_glass.png differ diff --git a/mods/doors/textures/doors_door_iceage.png b/mods/doors/textures/doors_door_iceage.png new file mode 100644 index 0000000..39cb956 Binary files /dev/null and b/mods/doors/textures/doors_door_iceage.png differ diff --git a/mods/doors/textures/doors_door_obsidian_glass.png b/mods/doors/textures/doors_door_obsidian_glass.png index 07ac5b2..6229c94 100644 Binary files a/mods/doors/textures/doors_door_obsidian_glass.png and b/mods/doors/textures/doors_door_obsidian_glass.png differ diff --git a/mods/doors/textures/doors_door_phiwari.png b/mods/doors/textures/doors_door_phiwari.png new file mode 100644 index 0000000..5a95fa5 Binary files /dev/null and b/mods/doors/textures/doors_door_phiwari.png differ diff --git a/mods/doors/textures/doors_item_glass.png b/mods/doors/textures/doors_item_glass.png index 86406fb..ee310a1 100644 Binary files a/mods/doors/textures/doors_item_glass.png and b/mods/doors/textures/doors_item_glass.png differ diff --git a/mods/doors/textures/doors_item_iceage.png b/mods/doors/textures/doors_item_iceage.png new file mode 100644 index 0000000..3b71d83 Binary files /dev/null and b/mods/doors/textures/doors_item_iceage.png differ diff --git a/mods/doors/textures/doors_item_obsidian_glass.png b/mods/doors/textures/doors_item_obsidian_glass.png index 1026d43..01690de 100644 Binary files a/mods/doors/textures/doors_item_obsidian_glass.png and b/mods/doors/textures/doors_item_obsidian_glass.png differ diff --git a/mods/doors/textures/doors_item_phiwari.png b/mods/doors/textures/doors_item_phiwari.png new file mode 100644 index 0000000..aa634f7 Binary files /dev/null and b/mods/doors/textures/doors_item_phiwari.png differ diff --git a/mods/doors/textures/doors_key.png b/mods/doors/textures/doors_key.png new file mode 100644 index 0000000..e69a71c Binary files /dev/null and b/mods/doors/textures/doors_key.png differ diff --git a/mods/farming/README.md b/mods/farming/README.md new file mode 100644 index 0000000..6b957b2 --- /dev/null +++ b/mods/farming/README.md @@ -0,0 +1,302 @@ +minetest mod Farming Redo +========================= + +This mod improves all food and farming related content + +Information +----------- + +This mod must be named `farming` a simplified version of the built-in farming mod in minetest +but improved with more foods, it comes with wheat, cotton, carrot, cucumber, +potato and tomato to start out with which spawn throughout the map... + +It also features that foods can be planted on tilled soil so no seeds are required, +original wheat and cotton will require seeds which are found inside normal and jungle grass... + +![screenshot.png](screenshot.png) + +Tech information +---------------- + +This mod sustitute default one, you must disable the default of minetest +game if present or override it. + +This mod works by adding your new plant to the {growing=1} group +and numbering the stages with sufix from `_1` to as many stages as you like, +but the underscore MUST be used only once in the node name +to separate plant from stage number e.g.: + +* `farming:cotton_1` through to `farming:cotton_8` will grow up with 8 times passed +* `farming:wheat_6` through to `farming:wheat_8` will grow up with 3 times passed, but looks like faster +* `farming:cucumber_4` through to `farming:cucumber_4` will grow up inmediatelly + +https://forum.minetest.net/viewtopic.php?id=9019 + +**It provides 47 lucky blocks.** + +Farming Redo also works with Bonemeal mod for quick growing crops and saplings +at https://notabug.org/TenPlus1/bonemeal + +#### Dependencies + +* default + +Optional dependences: + +* stairs +* intllib (only for older engines) +* lucky_block +* toolranks + +It detects other mods like FarmingPlus, Ethereal and Bonemeal etc, +but cannot set to optional depends becouse of the bug of circular depends. + +#### Configuration + +It reads the configuration values from two places, `minetest.conf` and `farming.conf`, this last +must be at world path, if you have older place at mod path will be read but must be deprecated. + + +| Configuration | type | default | place file | Notes about | +| -------------------- | ----- | ------- | ------------ | ----------------------------------------- | +| time_speed | float | 73 | minetest.conf | Speed to grow up the plants on engine (used as base for seed) | +| farming_stage_length | float | 160.0 | minetest.conf | Contains a value used for speed of crop growth in seconds | +| farming.rarety | float | 0.002 | farming.conf | default rarety of crops on map (higher number = more crops) | +| farming.min_light | int | 12 | farming.conf | default minimum and maximum light levels crops need to grow | +| farming.max_light | int | 15 | farming.conf | default minimum and maximum light levels crops need to grow | +| farming.carrot | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.potato | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.tomato | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.cucumber | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.corn | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.coffee | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.melon | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.pumpkin | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.cocoa | bool | true | farming.conf | true or false only | +| farming.raspberry | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.blueberry | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.rhubarb | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.beans | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.grapes | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.barley | bool | true | farming.conf | true or false only | +| farming.chili | float | 0.003 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.hemp | float | 0.003 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.garlic | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.onion | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.pepper | float | 0.002 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.pineapple | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.peas | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.beetroot | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.mint | float | 0.005 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.cabbage | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.blackberry | float | 0.002 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.lettuce | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.soy | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.vanilla | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.artichoke | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.parsley | float | 0.002 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.sunflower | float | 0.001 | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | +| farming.grains | bool | true | farming.conf | true or false only | +| farming.rice | bool | true | farming.conf | true to enable crop/food in-game and on mapgen set spawn rarety | + +#### Nodes and food + +This farming mod provides a large featured basic foods production of farming: + +| Node name | Description name | +| ----------------------- | --------------------- | +| farming:salt | Salt | +| farming:salt_crystal | Salt crystal | +| farming:rose_water | Rose Water | +| farming:glass_water | Glass of Water | +| farming:sugar | Sugar | +| farming:caramel | Caramel | +| farming:turkish_delight | Turkish Delight | +| farming:garlic_bread | Garlic Bread | +| farming:donut | Donut | +| farming:donut_chocolate | Chocolate Donut | +| farming:donut_apple | Apple Donut | +| farming:porridge | Porridge | +| farming:jaffa_cake | Jaffa Cake | +| farming:apple_pie | Apple Pie | +| farming:cactus_juice | Cactus Juice | +| farming:pasta | Pasta | +| farming:spaghetti | Spaghetti | +| farming:bibimbap | Bibimbap | +| farming:burger | Burger | +| farming:salad | Salad | +| farming:smoothie_berry | Triple Berry Smoothie | +| farming:spanish_potatoes | Spanish Potatoes | +| farming:potato_omelet | Potato omelet | +| farming:paella | Paella | +| farming:flan | Vanilla Flan | +| farming:cheese_vegan | Vegan Cheese | +| farming:onigiri | Onirigi | +| farming:gyoza | Gyoza | +| farming:mochi | Mochi | + +TODO: list `crops/*lua` files and compare + + + +#### Items tools + +| farming:scythe_mithril | Mithril Scythe (Use to harvest and replant crops) | +| farming:hoe_bomb | Hoe Bomb (use or throw on grassy areas to hoe land) | +| farming:hoe_wood | Wooden Hoe | +| farming:hoe_stone | Stone Hoe | +| farming:hoe_steel | Steel Hoe | +| farming:hoe_bronze | Bronze Hoe | +| farming:hoe_mese | Mese Hoe | +| farming:hoe_diamond | Diamond Hoe | +| farming:bowl | Wooden Bowl | +| farming:saucepan | Saucepan | +| farming:pot | Cooking Pot | +| farming:baking_tray | Baking Tray | +| farming:skillet | Skillet | +| farming:mortar_pestle | Mortar and Pestle | +| farming:cutting_board | Cutting Board | +| farming:juicer | Juicer | +| farming:mixing_bowl | Glass Mixing Bowl | +| moreores:hoe_silver | Silver Hoe | +| moreores:hoe_mithril | Mitril Hoe | + + +#### Nodes and Aliasing + +Depending of the detection of mods some nodes are aliasing, +if those mods/nodes are not present, will be (re)defined/provided, +note for the both "farming" names here, in the left side its +about default Farming mod, not Farming Redo one. + + +| mod name : node name | new mod name : new node | +| --------------------------- | ----------------------- | +| farming:big_pumpkin | farming:jackolantern | +| farming:big_pumpkin_side | air (will be jackolanter) | +| farming:big_pumpkin_top | air (will be jackolanter) | +| farming:big_pumpkin_corner | air (will be jackolanter) | +| farming:pumpkin_seed | farming:pumpkin_slice | +| farming:pumpkin_face | farming:jackolantern | +| farming:pumpkin_face_light | farming:jackolantern_on | +| farming:scarecrow | farming:jackolantern | +| farming:scarecrow_light | farming:jackolantern_on | +| farming:pumpkin_flour | farming:pumpkin_dough | +| farming:weed | default:grass_2 | +| farming_plus:banana_sapling | default:sapling | +| farming_plus:banana | ethereal:banana | +| farming_plus:banana_sapling | ethereal:banana_tree_sapling | +| farming_plus:banana_leaves | ethereal:bananaleaves | +| farming_plus:orange | ethereal:orange | +| farming_plus:orange_item | ethereal:orange | +| farming_plus:orange_seed | ethereal:orange_tree_sapling | +| farming_plus:strawberry_item | ethereal:strawberry | +| farming_plus:strawberry_seed | ethereal:strawberry | +| farming_plus:strawberry_1 | ethereal:strawberry_1 | +| farming_plus:strawberry_2 | ethereal:strawberry_3 | +| farming_plus:strawberry_3 | ethereal:strawberry_5 | +| farming_plus:strawberry | ethereal:strawberry_7 | +| farming_plus:strawberry_item | ethereal:strawberry | +| farming_plus:strawberry_seed | ethereal:strawberry | +| farming_plus:strawberry_1 | farming:raspberry_1 | +| farming_plus:strawberry_2 | farming:raspberry_2 | +| farming_plus:strawberry_3 | farming:raspberry_3 | +| farming_plus:strawberry | farming:raspberry_4 | +| farming_plus:carrot_seed | farming:carrot | +| farming_plus:carrot_1 | farming:carrot_1 | +| farming_plus:carrot_2 | farming:carrot_4 | +| farming_plus:carrot_3 | farming:carrot_6 | +| farming_plus:carrot | farming:carrot_8 | +| farming_plus:carrot_item | farming:carrot | +| farming_plus:cocoa_sapling | farming:cocoa_beans | +| farming_plus:cocoa_bean | farming:cocoa_beans | +| farming_plus:cocoa_leaves | default:leaves | +| farming_plus:cocoa | default:apple | +| farming_plus:orange_seed | default:sapling | +| farming_plus:orange_1 | farming:tomato_1 | +| farming_plus:orange_2 | farming:tomato_4 | +| farming_plus:orange_3 | farming:tomato_6 | +| farming_plus:potato_item | farming:potato | +| farming_plus:potato_1 | farming:potato_1 | +| farming_plus:potato_2 | farming:potato_2 | +| farming_plus:potato | farming:potato_3 | +| farming_plus:potato_seed | farming:potato | +| farming_plus:rhubarb_seed | farming:rhubarb | +| farming_plus:rhubarb_1 | farming:rhubarb_1 | +| farming_plus:rhubarb_2 | farming:rhubarb_2 | +| farming_plus:rhubarb | farming:rhubarb_3 | +| farming_plus:rhubarb_item | farming:rhubarb | +| farming_plus:tomato_seed | farming:tomato | +| farming_plus:tomato_item | farming:tomato | +| farming_plus:tomato_1 | farming:tomato_2 | +| farming_plus:tomato_2 | farming:tomato_4 | +| farming_plus:tomato_3 | farming:tomato_6 | +| farming_plus:tomato | farming:tomato_8 | + +#### AMB + +There one abm for new group `group:growing`. + + +#### development notes + +To check nodes a usefull command are `| grep -A2 'register\_' | grep S -B2 | grep -v '\-\-'` +this can be used in a loop for over all files using `find`. + +### Changelog: + +- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock) +- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy +options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna +- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates +- 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items. +- 1.42 - Soil needs water to be present within 3 blocks horizontally and 1 below to make wet soil, Jack 'o Lanterns now check protection, add chocolate block. +- 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf) +- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support. +- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread. +- 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable +- 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) +- 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes +- 1.35 - Deprecated bronze/mese/diamond hoe's, added hoe bomb and deprecated hoe's as lucky block prizes +- 1.34 - Added scarecrow Base (5x sticks in a cross shape) +- 1.33 - Added cooking utensils (wooden bowl, saucepan, cooking pot, baking tray, skillet, cutting board, mortar & pestle, juicer, glass mixing bowl) for easier food crafts. +- 1.32 - Added Pea plant (textures by Andrey01) - also added Wooden Bowl and Pea Soup crafts +- 1.31 - Added Pineapple which can be found growing in savannah areas (place pineapple in crafting to obtain 5x rings to eat and a top for re-planting), also Salt which is made from cooking a bucket of water, added food groups so it's more compatible with Ruben's food mods. +- 1.30 - Added Garlic, Pepper and Onions thanks to Grizzly Adam for sharing textures +- 1.29 - Updating functions so requires Minetest 0.4.16 and above to run +- 1.28 - Added chili peppers and bowl of chili, optimized code and fixed a few bugs, added porridge +- 1.27 - Added meshoptions to api and wheat plants, added farming.rarity setting to spawn more/less crops on map, have separate cotton/string items (4x cotton = 1x wool, 2x cotton = 2x string) +- 1.26 - Added support for [toolranks] mod when using hoe's +- 1.25 - Added check for farming.conf setting file to disable specific crops globally (inside mod folder) or world specific (inside world folder) +- 1.24 - Added Hemp which can be crafted into fibre, paper, string, rope and oil. +- 1.23 - Huge code tweak and tidy done and added barley seeds to be found in dry grass, barley can make flour for bread also. +- 1.22 - Added grape bushes at high climates which can be cultivated into grape vines using trellis (9 sticks). +- 1.21 - Added auto-refill code for planting crops (thanks crabman77), also fixed a few bugs +- 1.20b - Tidied code, made api compatible with new 0.4.13 changes and changed to soil texture overlays +- 1.20 - NEW growing routine added that allows crops to grow while player is away doing other things (thanks prestidigitator) +- 1.14 - Added Green Beans from Crops mod (thanks sofar), little bushels in the wild but need to be grown using beanpoles crafted with 4 sticks (2 either side) +- 1.13 - Fixed seed double-placement glitch. Mapgen now uses 0.4.12+ for plant generation +- 1.12 - Player cannot place seeds in protected area, also growing speeds changed to match defaults +- 1.11 - Added Straw Bale, streamlined growing abm a little, fixed melon rotation bug with screwdriver +- 1.10 - Added Blueberry Bush and Blueberry Muffins, also Pumpkin/Melon easier to pick up, added check for unloaded map +- 1.09 - Corn now uses single nodes instead of 1 ontop of the other, Ethanol recipe is more expensive (requires 5 corn) and some code cleanup. +- 1.08 - Added Farming Plus compatibility, plus can be removed and no more missing nodes +- 1.07 - Added Rhubarb and Rhubarb Pie +- 1.06 - register_hoe and register_plant added for compatibility with default farming mod, although any plants registered will use farming redo to grow +- 1.05 - Added Raspberry Bushels and Raspberry Smoothie +- 1.04 - Added Donuts... normal, chocolate and apple... and a few code cleanups and now compatible with jungletree's from MoreTrees mod +- 1.03 - Bug fixes and more compatibility as drop-in replacement for built-in farming mod +- 1.02 - Added farming.mod string to help other mods identify which farming mod is running, if it returns "redo" then you're using this one, "" empty is built-in mod +- 1.01 - Crafting coffee or ethanol returns empty bucket/bottle, also Cocoa spawns a little rarer +- 1.0 - Added Cocoa which randomly grows on jungle tree's, pods give cocoa beans which can be used to farm more pods on a jungle trunk or make Cookies which have been added (or other treats) +- 0.9 - Added Pumpkin, Jack 'O Lantern, Pumpkin Slice and Sugar (a huge thanks to painterly.net for allowing me to use their textures) +- 0.8 - Added Watermelon and Melon Slice +- 0.7 - Added Coffee, Coffee Beans, Drinking Cup, Cold and Hot Cup of Coffee +- 0.6 - Added Corn, Corn on the Cob... Also reworked Abm +- 0.5 - Added Carrot, Cucumber, Potato (and Baked Potato), Tomato +- 0.4 - Checks for Protection, also performance changes +- 0.3 - Added Diamond and Mese hoe +- 0.2 - Fixed check for wet soil +- 0.1 - Fixed growing bug +- 0.0 - Initial release + diff --git a/mods/farming/README.txt b/mods/farming/README.txt deleted file mode 100644 index d46748d..0000000 --- a/mods/farming/README.txt +++ /dev/null @@ -1,40 +0,0 @@ -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 diff --git a/mods/farming/api.lua b/mods/farming/api.lua deleted file mode 100644 index 91d557c..0000000 --- a/mods/farming/api.lua +++ /dev/null @@ -1,401 +0,0 @@ --- 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/api.txt b/mods/farming/api.txt new file mode 100644 index 0000000..cd8cc76 --- /dev/null +++ b/mods/farming/api.txt @@ -0,0 +1,65 @@ +Farming API +----------- + +The farming API allows you to easily register plants and hoes. + +`farming.register_hoe(name, hoe definition)` + * Register a new hoe, see [#hoe definition] + +`farming.register_plant(name, Plant definition)` + * Register a new growing plant, see [#Plant definition] + +`farming.registered_plants[name] = definition` + * Table of registered plants, indexed by plant name + 'crop' holds name of growing crop node minus _step-number at end + 'seed' has name of seed required to plant crop + 'minlight' min light level needed to grow + 'maxlight' max light level needed to grow + 'steps' number of steps crop has in growth cycle + 'trellis' name of trellis node (e.g. "farming:trellis"), default: nil + +### Hoe Definition + + + { + description = "My Hoe", -- Description for tooltip + inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image + max_uses = 30, -- Uses until destroyed + material = "", -- Material for recipes + recipe = { -- Craft recipe, if material isn't used + {"air", "air", "air"}, + {"", "group:stick"}, + {"", "group:stick"}, + } + } + +### Plant definition + + { + description = "My Plant", -- Description of seed item + inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image + steps = 8, -- How many steps the plant has to grow, until it can be harvested + -- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber) + minlight = 13, -- Minimum light to grow + maxlight = default.LIGHT_MAX -- Maximum light to grow + } + +Note: Any crops registered with the above function will use the new growing routines, also if crops are manually added with the {growing=1} group they will also grow. + +### Crop functions + +If a mod registers nodes to be used as crops using the {growing=1} group then an additional function can be used for custom growth checks instead of the standard 'are we above wet soil'. + +growth_check = function(pos, node_name) + -- check surrounding for jungle tree + if minetest.find_node_near(pos, 1, {"default:jungletree"}) then + return false -- place next growth stage + end + return true -- condition not met, skip next growth stage until next check +end, + +### Scythe items that will not drop + +This is a function to add items to a list that scythes will not drop, e.g. farming:trellis or farming:beanpole. + +farming.add_to_scythe_not_drops(item_name) diff --git a/mods/farming/compatibility.lua b/mods/farming/compatibility.lua new file mode 100644 index 0000000..1fdf620 --- /dev/null +++ b/mods/farming/compatibility.lua @@ -0,0 +1,167 @@ + +local S = farming.intllib + +--= Helpers + +local eth = minetest.get_modpath("ethereal") +local alias = function(orig, new) + minetest.register_alias(orig, new) +end + +--= Overrides (add food_* group to apple and brown mushroom) + +minetest.override_item("default:apple", { + groups = {food_apple = 1, fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1} +}) + +--= Aliases + +-- Banana +if eth then + alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling") + alias("farming_plus:banana_leaves", "ethereal:bananaleaves") + alias("farming_plus:banana", "ethereal:banana") +else + minetest.register_node(":ethereal:banana", { + description = S("Banana"), + drawtype = "torchlike", + tiles = {"farming_banana_single.png"}, + inventory_image = "farming_banana_single.png", + wield_image = "farming_banana_single.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2} + }, + groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults() + }) + + minetest.register_node(":ethereal:bananaleaves", { + description = S("Banana Leaves"), + tiles = {"farming_banana_leaf.png"}, + inventory_image = "farming_banana_leaf.png", + wield_image = "farming_banana_leaf.png", + paramtype = "light", + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + sounds = default.node_sound_leaves_defaults() + }) + + alias("farming_plus:banana_sapling", "default:sapling") + alias("farming_plus:banana_leaves", "ethereal:bananaleaves") + alias("farming_plus:banana", "ethereal:banana") +end + +-- Carrot +alias("farming_plus:carrot_seed", "farming:carrot") +alias("farming_plus:carrot_1", "farming:carrot_1") +alias("farming_plus:carrot_2", "farming:carrot_4") +alias("farming_plus:carrot_3", "farming:carrot_6") +alias("farming_plus:carrot", "farming:carrot_8") +alias("farming_plus:carrot_item", "farming:carrot") + +-- Cocoa +alias("farming_plus:cocoa_sapling", "farming:cocoa_beans") +alias("farming_plus:cocoa_leaves", "default:leaves") +alias("farming_plus:cocoa", "default:apple") +alias("farming_plus:cocoa_bean", "farming:cocoa_beans") + +-- Orange +alias("farming_plus:orange_1", "farming:tomato_1") +alias("farming_plus:orange_2", "farming:tomato_4") +alias("farming_plus:orange_3", "farming:tomato_6") + +if eth then + alias("farming_plus:orange_item", "ethereal:orange") + alias("farming_plus:orange", "ethereal:orange") + alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling") +else + minetest.register_node(":ethereal:orange", { + description = S("Orange"), + drawtype = "plantlike", + tiles = {"farming_orange.png"}, + inventory_image = "farming_orange.png", + wield_image = "farming_orange.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2} + }, + groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, + on_use = minetest.item_eat(4), + sounds = default.node_sound_leaves_defaults() + }) + + alias("farming_plus:orange_item", "ethereal:orange") + alias("farming_plus:orange", "ethereal:orange") + alias("farming_plus:orange_seed", "default:sapling") +end + +-- Potato +alias("farming_plus:potato_item", "farming:potato") +alias("farming_plus:potato_1", "farming:potato_1") +alias("farming_plus:potato_2", "farming:potato_2") +alias("farming_plus:potato", "farming:potato_3") +alias("farming_plus:potato_seed", "farming:potato") + +-- Pumpkin +alias("farming:pumpkin_seed", "farming:pumpkin_slice") +alias("farming:pumpkin_face", "farming:jackolantern") +alias("farming:pumpkin_face_light", "farming:jackolantern_on") +alias("farming:big_pumpkin", "farming:jackolantern") +alias("farming:big_pumpkin_side", "air") +alias("farming:big_pumpkin_top", "air") +alias("farming:big_pumpkin_corner", "air") +alias("farming:scarecrow", "farming:jackolantern") +alias("farming:scarecrow_light", "farming:jackolantern_on") +alias("farming:pumpkin_flour", "farming:pumpkin_dough") + +-- Rhubarb +alias("farming_plus:rhubarb_seed", "farming:rhubarb") +alias("farming_plus:rhubarb_1", "farming:rhubarb_1") +alias("farming_plus:rhubarb_2", "farming:rhubarb_2") +alias("farming_plus:rhubarb", "farming:rhubarb_3") +alias("farming_plus:rhubarb_item", "farming:rhubarb") + +-- Strawberry +if eth then + alias("farming_plus:strawberry_item", "ethereal:strawberry") + alias("farming_plus:strawberry_seed", "ethereal:strawberry") + alias("farming_plus:strawberry_1", "ethereal:strawberry_1") + alias("farming_plus:strawberry_2", "ethereal:strawberry_3") + alias("farming_plus:strawberry_3", "ethereal:strawberry_5") + alias("farming_plus:strawberry", "ethereal:strawberry_7") +else + minetest.register_craftitem(":ethereal:strawberry", { + description = S("Strawberry"), + inventory_image = "farming_strawberry.png", + wield_image = "farming_strawberry.png", + groups = {food_strawberry = 1, flammable = 2}, + on_use = minetest.item_eat(1) + }) + + alias("farming_plus:strawberry_item", "ethereal:strawberry") + alias("farming_plus:strawberry_seed", "ethereal:strawberry") + alias("farming_plus:strawberry_1", "farming:raspberry_1") + alias("farming_plus:strawberry_2", "farming:raspberry_2") + alias("farming_plus:strawberry_3", "farming:raspberry_3") + alias("farming_plus:strawberry", "farming:raspberry_4") +end + +-- Tomato +alias("farming_plus:tomato_seed", "farming:tomato") +alias("farming_plus:tomato_item", "farming:tomato") +alias("farming_plus:tomato_1", "farming:tomato_2") +alias("farming_plus:tomato_2", "farming:tomato_4") +alias("farming_plus:tomato_3", "farming:tomato_6") +alias("farming_plus:tomato", "farming:tomato_8") + +-- Weed +alias("farming:weed", "default:grass_2") diff --git a/mods/farming/crops/artichoke.lua b/mods/farming/crops/artichoke.lua new file mode 100644 index 0000000..92143f6 --- /dev/null +++ b/mods/farming/crops/artichoke.lua @@ -0,0 +1,64 @@ +local S = farming.intllib + +-- item definition +minetest.register_craftitem("farming:artichoke", { + description = S("Artichoke"), + inventory_image = "farming_artichoke.png", + groups = {seed = 2, food_artichoke = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:artichoke_1") + end, + on_use = minetest.item_eat(4) +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"farming_artichoke_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:artichoke_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_artichoke_2.png"} +minetest.register_node("farming:artichoke_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_artichoke_3.png"} +minetest.register_node("farming:artichoke_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_artichoke_4.png"} +minetest.register_node("farming:artichoke_4", table.copy(def)) + +-- stage 5 (final) +def.tiles = {"farming_artichoke_5.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:artichoke 2"}, rarity = 1}, + {items = {"farming:artichoke"}, rarity = 2} + } +} +minetest.register_node("farming:artichoke_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:artichoke"] = { + crop = "farming:artichoke", + seed = "farming:artichoke", + minlight = 13, + maxlight = 15, + steps = 5 +} diff --git a/mods/farming/crops/barley.lua b/mods/farming/crops/barley.lua new file mode 100644 index 0000000..e7f3840 --- /dev/null +++ b/mods/farming/crops/barley.lua @@ -0,0 +1,120 @@ + +local S = farming.intllib + +-- barley seeds +minetest.register_node("farming:seed_barley", { + description = S("Barley Seed"), + tiles = {"farming_barley_seed.png"}, + inventory_image = "farming_barley_seed.png", + wield_image = "farming_barley_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:barley_1") + end +}) + +-- harvested barley +minetest.register_craftitem("farming:barley", { + description = S("Barley"), + inventory_image = "farming_barley.png", + groups = {food_barley = 1, flammable = 2} +}) + +-- flour +minetest.register_craft({ + output = "farming:flour", + recipe = { + {"farming:barley", "farming:barley", "farming:barley"}, + {"farming:barley", "farming:mortar_pestle", ""} + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} +}) + +-- barley definition +local def = { + drawtype = "plantlike", + tiles = {"farming_barley_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:barley_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_barley_2.png"} +minetest.register_node("farming:barley_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_barley_3.png"} +minetest.register_node("farming:barley_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_barley_4.png"} +minetest.register_node("farming:barley_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_barley_5.png"} +def.drop = { + items = { + {items = {"farming:barley"}, rarity = 2}, + {items = {"farming:seed_barley"}, rarity = 2} + } +} +minetest.register_node("farming:barley_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_barley_6.png"} +def.drop = { + items = { + {items = {"farming:barley"}, rarity = 2}, + {items = {"farming:seed_barley"}, rarity = 1} + } +} +minetest.register_node("farming:barley_6", table.copy(def)) + +-- stage 7 (final) +def.tiles = {"farming_barley_7.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:barley"}, rarity = 1}, + {items = {"farming:barley"}, rarity = 3}, + {items = {"farming:seed_barley"}, rarity = 1}, + {items = {"farming:seed_barley"}, rarity = 3} + } +} +minetest.register_node("farming:barley_7", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:barley"] = { + crop = "farming:barley", + seed = "farming:seed_barley", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 7 +} + +-- Fuel +minetest.register_craft({ + type = "fuel", + recipe = "farming:barley", + burntime = 1 +}) diff --git a/mods/farming/crops/beans.lua b/mods/farming/crops/beans.lua new file mode 100644 index 0000000..02ebe1a --- /dev/null +++ b/mods/farming/crops/beans.lua @@ -0,0 +1,255 @@ +--[[ + All textures by + (C) Auke Kok + CC-BY-SA-3.0 +]] + +local S = farming.intllib + +-- place beans +local function place_beans(itemstack, placer, pointed_thing, plantname) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + + -- return if any of the nodes are not registered + if not minetest.registered_nodes[under.name] then + return + end + + -- am I right-clicking on something that has a custom on_place set? + -- thanks to Krock for helping with this issue :) + local def = minetest.registered_nodes[under.name] + if placer and itemstack and def and def.on_rightclick then + return def.on_rightclick(pt.under, under, placer, itemstack, pt) + end + + -- is player planting crop? + local name = placer and placer:get_player_name() or "" + + -- check for protection + if minetest.is_protected(pt.under, name) then + return + end + + -- check if pointing at bean pole + if under.name ~= "farming:beanpole" then + return + end + + -- add the node and remove 1 item from the itemstack + minetest.set_node(pt.under, {name = plantname}) + + minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0}) + + if placer or not farming.is_creative(placer:get_player_name()) then + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 then + + minetest.after(0.20, + farming.refill_plant, + placer, + "farming:beans", + placer:get_wield_index() + ) + end + end + + return itemstack +end + +-- beans +minetest.register_craftitem("farming:beans", { + description = S("Green Beans"), + inventory_image = "farming_beans.png", + groups = {seed = 2, food_beans = 1, flammable = 2}, + on_use = minetest.item_eat(1), + on_place = function(itemstack, placer, pointed_thing) + return place_beans(itemstack, placer, pointed_thing, "farming:beanpole_1") + end +}) + +-- beans can be used for green dye +minetest.register_craft({ + output = "dye:green", + recipe = {{"farming:beans"}} +}) + +-- beanpole +minetest.register_node("farming:beanpole", { + description = S("Bean Pole (place on soil before planting beans)"), + drawtype = "plantlike", + tiles = {"farming_beanpole.png"}, + inventory_image = "farming_beanpole.png", + visual_scale = 1.90, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = "farming:beanpole", + selection_box = farming.select, + groups = {snappy = 3, flammable = 2, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + + -- return if any of the nodes are not registered + if not minetest.registered_nodes[under.name] then + return + end + + -- am I right-clicking on something that has a custom on_place set? + -- thanks to Krock for helping with this issue :) + local def = minetest.registered_nodes[under.name] + if def and def.on_rightclick then + return def.on_rightclick(pt.under, under, placer, itemstack, pt) + end + + if minetest.is_protected(pt.above, placer:get_player_name()) then + return + end + + local nodename = under.name + + if minetest.get_item_group(nodename, "soil") < 2 then + return + end + + local top = { + x = pointed_thing.above.x, + y = pointed_thing.above.y + 1, + z = pointed_thing.above.z + } + + nodename = minetest.get_node(top).name + + if nodename ~= "air" then + return + end + + minetest.set_node(pointed_thing.above, {name = "farming:beanpole"}) + + if not farming.is_creative(placer:get_player_name()) then + itemstack:take_item() + end + + return itemstack + end +}) + +minetest.register_craft({ + output = "farming:beanpole", + recipe = { + {"", "", ""}, + {"default:stick", "", "default:stick"}, + {"default:stick", "", "default:stick"} + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:beanpole", + burntime = 10 +}) + +-- green bean definition +local def = { + drawtype = "plantlike", + tiles = {"farming_beanpole_1.png"}, + visual_scale = 1.90, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {"farming:beanpole"}, rarity = 1} + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 3, not_in_creative_inventory = 1, + attached_node = 1, growing = 1, plant = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:beanpole_1", table.copy(def)) + +-- stage2 +def.tiles = {"farming_beanpole_2.png"} +minetest.register_node("farming:beanpole_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_beanpole_3.png"} +minetest.register_node("farming:beanpole_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_beanpole_4.png"} +minetest.register_node("farming:beanpole_4", table.copy(def)) + +-- stage 5 (final) +def.tiles = {"farming_beanpole_5.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:beanpole"}, rarity = 1}, + {items = {"farming:beans 3"}, rarity = 1}, + {items = {"farming:beans 2"}, rarity = 2}, + {items = {"farming:beans 2"}, rarity = 3} + } +} +minetest.register_node("farming:beanpole_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:beans"] = { + trellis = "farming:beanpole", + crop = "farming:beanpole", + seed = "farming:beans", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} + +-- wild green bean bush (this is what you find on the map) +minetest.register_node("farming:beanbush", { + drawtype = "plantlike", + tiles = {"farming_beanbush.png"}, + paramtype = "light", + waving = 1, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {"farming:beans 1"}, rarity = 1}, + {items = {"farming:beans 1"}, rarity = 2}, + {items = {"farming:beans 1"}, rarity = 3} + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1 + }, + sounds = default.node_sound_leaves_defaults() +}) diff --git a/mods/farming/crops/beetroot.lua b/mods/farming/crops/beetroot.lua new file mode 100644 index 0000000..05e0b3a --- /dev/null +++ b/mods/farming/crops/beetroot.lua @@ -0,0 +1,89 @@ + +local S = farming.intllib + +-- beetroot +minetest.register_craftitem("farming:beetroot", { + description = S("Beetroot"), + inventory_image = "farming_beetroot.png", + groups = {seed = 2, food_beetroot = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1") + end, + on_use = minetest.item_eat(1) +}) + +-- beetroot soup +minetest.register_craftitem("farming:beetroot_soup", { + description = S("Beetroot Soup"), + inventory_image = "farming_beetroot_soup.png", + groups = {flammable = 2}, + on_use = minetest.item_eat(6, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:beetroot_soup", + recipe = { + {"group:food_beetroot", "group:food_beetroot", "group:food_beetroot"}, + {"group:food_beetroot", "group:food_bowl", "group:food_beetroot"} + } +}) + +-- red dye +minetest.register_craft({ + output = "dye:red", + recipe = {{"group:food_beetroot"}} +}) + +local def = { + drawtype = "plantlike", + tiles = {"farming_beetroot_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:beetroot_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_beetroot_2.png"} +minetest.register_node("farming:beetroot_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_beetroot_3.png"} +minetest.register_node("farming:beetroot_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_beetroot_4.png"} +minetest.register_node("farming:beetroot_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_beetroot_5.png"} +def.groups.growing = nil +def.drop = { + max_items = 4, items = { + {items = {"farming:beetroot"}, rarity = 1}, + {items = {"farming:beetroot"}, rarity = 2}, + {items = {"farming:beetroot"}, rarity = 3}, + {items = {"farming:beetroot"}, rarity = 4} + } +} +minetest.register_node("farming:beetroot_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:beetroot"] = { + crop = "farming:beetroot", + seed = "farming:beetroot", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} diff --git a/mods/farming/crops/blackberry.lua b/mods/farming/crops/blackberry.lua new file mode 100644 index 0000000..e2122fd --- /dev/null +++ b/mods/farming/crops/blackberry.lua @@ -0,0 +1,62 @@ + +local S = farming.intllib + +-- blackberries +minetest.register_craftitem("farming:blackberry", { + description = S("Blackberries"), + inventory_image = "farming_blackberry.png", + groups = {seed = 2, food_blackberries = 1, food_blackberry = 1, + food_berry = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1") + end, + on_use = minetest.item_eat(1), +}) + +local def = { + drawtype = "plantlike", + tiles = {"farming_blackberry_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:blackberry_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_blackberry_2.png"} +minetest.register_node("farming:blackberry_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_blackberry_3.png"} +minetest.register_node("farming:blackberry_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_blackberry_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {'farming:blackberry 2'}, rarity = 1}, + {items = {'farming:blackberry'}, rarity = 2}, + {items = {'farming:blackberry'}, rarity = 3}, + } +} +minetest.register_node("farming:blackberry_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:blackberry"] = { + crop = "farming:blackberry", + seed = "farming:blackberry", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 4 +} diff --git a/mods/farming/crops/blueberry.lua b/mods/farming/crops/blueberry.lua new file mode 100644 index 0000000..be1d3b2 --- /dev/null +++ b/mods/farming/crops/blueberry.lua @@ -0,0 +1,99 @@ + +local S = farming.intllib + +-- blueberries +minetest.register_craftitem("farming:blueberries", { + description = S("Wild Blueberries"), + inventory_image = "farming_blueberries.png", + groups = {seed = 2, food_blueberries = 1, food_blueberry = 1, + food_berry = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1") + end, + on_use = minetest.item_eat(1) +}) + +-- blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image) +minetest.register_craftitem("farming:muffin_blueberry", { + description = S("Blueberry Muffin"), + inventory_image = "farming_blueberry_muffin.png", + on_use = minetest.item_eat(2) +}) + +minetest.register_craft({ + output = "farming:muffin_blueberry 2", + recipe = { + {"group:food_blueberries", "group:food_bread", "group:food_blueberries"} + } +}) + +-- Blueberry Pie +minetest.register_craftitem("farming:blueberry_pie", { + description = S("Blueberry Pie"), + inventory_image = "farming_blueberry_pie.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + output = "farming:blueberry_pie", + recipe = { + {"group:food_flour", "group:food_sugar", "group:food_blueberries"}, + {"group:food_baking_tray", "", ""} + }, + replacements = {{"group:food_baking_tray", "farming:baking_tray"}} +}) + +-- Blue Dye +minetest.register_craft({ + output = "dye:blue", + recipe = {{"farming:blueberries"}} +}) + +-- blueberry definition +local def = { + drawtype = "plantlike", + tiles = {"farming_blueberry_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:blueberry_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_blueberry_2.png"} +minetest.register_node("farming:blueberry_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_blueberry_3.png"} +minetest.register_node("farming:blueberry_3", table.copy(def)) + +-- stage 4 (final) +def.tiles = {"farming_blueberry_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:blueberries 2"}, rarity = 1}, + {items = {"farming:blueberries"}, rarity = 2}, + {items = {"farming:blueberries"}, rarity = 3} + } +} +minetest.register_node("farming:blueberry_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:blueberries"] = { + crop = "farming:blueberry", + seed = "farming:blueberries", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 4 +} diff --git a/mods/farming/crops/cabbage.lua b/mods/farming/crops/cabbage.lua new file mode 100644 index 0000000..b57ac00 --- /dev/null +++ b/mods/farming/crops/cabbage.lua @@ -0,0 +1,69 @@ + +local S = farming.intllib + +-- cabbage +minetest.register_craftitem("farming:cabbage", { + description = S("Cabbage"), + inventory_image = "farming_cabbage.png", + groups = {seed = 2, food_cabbage = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:cabbage_1") + end, + on_use = minetest.item_eat(1) +}) + +local def = { + drawtype = "plantlike", + tiles = {"farming_cabbage_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:cabbage_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_cabbage_2.png"} +minetest.register_node("farming:cabbage_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_cabbage_3.png"} +minetest.register_node("farming:cabbage_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_cabbage_4.png"} +minetest.register_node("farming:cabbage_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_cabbage_5.png"} +minetest.register_node("farming:cabbage_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_cabbage_6.png"} +def.groups.growing = nil +def.drop = { + max_items = 2, items = { + {items = {"farming:cabbage 2"}, rarity = 1}, + {items = {"farming:cabbage 1"}, rarity = 2} + } +} +minetest.register_node("farming:cabbage_6", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:cabbage"] = { + crop = "farming:cabbage", + seed = "farming:cabbage", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 6 +} diff --git a/mods/farming/crops/carrot.lua b/mods/farming/crops/carrot.lua new file mode 100644 index 0000000..2dd45f3 --- /dev/null +++ b/mods/farming/crops/carrot.lua @@ -0,0 +1,125 @@ + +--[[ + Original textures from PixelBox texture pack + https://forum.minetest.net/viewtopic.php?id=4990 +]] + +local S = farming.intllib + +-- carrot +minetest.register_craftitem("farming:carrot", { + description = S("Carrot"), + inventory_image = "farming_carrot.png", + groups = {seed = 2, food_carrot = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") + end, + on_use = minetest.item_eat(4) +}) + +-- carrot juice +minetest.register_craftitem("farming:carrot_juice", { + description = S("Carrot Juice"), + inventory_image = "farming_carrot_juice.png", + on_use = minetest.item_eat(4, "vessels:drinking_glass"), + groups = {vessel = 1, drink = 1} +}) + +minetest.register_craft({ + output = "farming:carrot_juice", + recipe = { + {"group:food_carrot"}, + {"farming:juicer"}, + {"vessels:drinking_glass"} + }, + replacements = { + {"group:food_juicer", "farming:juicer"} + } +}) + +-- golden carrot +minetest.register_craftitem("farming:carrot_gold", { + description = S("Golden Carrot"), + inventory_image = "farming_carrot_gold.png", + on_use = minetest.item_eat(10) +}) + +minetest.register_craft({ + output = "farming:carrot_gold", + recipe = { + {"", "default:gold_lump", ""}, + {"default:gold_lump", "group:food_carrot", "default:gold_lump"}, + {"", "default:gold_lump", ""} + } +}) + +-- carrot definition +local def = { + drawtype = "plantlike", + tiles = {"farming_carrot_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + + +-- stage 1 +minetest.register_node("farming:carrot_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_carrot_2.png"} +minetest.register_node("farming:carrot_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_carrot_3.png"} +minetest.register_node("farming:carrot_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_carrot_4.png"} +minetest.register_node("farming:carrot_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_carrot_5.png"} +minetest.register_node("farming:carrot_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_carrot_6.png"} +minetest.register_node("farming:carrot_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_carrot_7.png"} +def.drop = { + items = { + {items = {"farming:carrot"}, rarity = 1}, + {items = {"farming:carrot 2"}, rarity = 3} + } +} +minetest.register_node("farming:carrot_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_carrot_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:carrot 2"}, rarity = 1}, + {items = {"farming:carrot 3"}, rarity = 2} + } +} +minetest.register_node("farming:carrot_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:carrot"] = { + crop = "farming:carrot", + seed = "farming:carrot", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/chili.lua b/mods/farming/crops/chili.lua new file mode 100644 index 0000000..95f3a30 --- /dev/null +++ b/mods/farming/crops/chili.lua @@ -0,0 +1,98 @@ + +local S = farming.intllib + +-- chili pepper +minetest.register_craftitem("farming:chili_pepper", { + description = S("Chili Pepper"), + inventory_image = "farming_chili_pepper.png", + groups = {seed = 2, food_chili_pepper = 1, flammable = 4}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1") + end, + on_use = minetest.item_eat(2) +}) + +-- bowl of chili +minetest.register_craftitem("farming:chili_bowl", { + description = S("Bowl of Chili"), + inventory_image = "farming_chili_bowl.png", + on_use = minetest.item_eat(8, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:chili_bowl", + recipe = { + {"group:food_chili_pepper", "group:food_rice", "group:food_tomato"}, + {"group:food_beans", "group:food_bowl", ""} + } +}) + +-- chili can be used for red dye +minetest.register_craft({ + output = "dye:red", + recipe = {{"farming:chili_pepper"}} +}) + +-- chili definition +local def = { + drawtype = "plantlike", + tiles = {"farming_chili_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 4, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:chili_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_chili_2.png"} +minetest.register_node("farming:chili_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_chili_3.png"} +minetest.register_node("farming:chili_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_chili_4.png"} +minetest.register_node("farming:chili_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_chili_5.png"} +minetest.register_node("farming:chili_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_chili_6.png"} +minetest.register_node("farming:chili_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_chili_7.png"} +minetest.register_node("farming:chili_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_chili_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:chili_pepper 3"}, rarity = 1}, + {items = {"farming:chili_pepper 2"}, rarity = 2} + } +} +minetest.register_node("farming:chili_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:chili_pepper"] = { + crop = "farming:chili", + seed = "farming:chili_pepper", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/cocoa.lua b/mods/farming/crops/cocoa.lua new file mode 100644 index 0000000..da932d2 --- /dev/null +++ b/mods/farming/crops/cocoa.lua @@ -0,0 +1,247 @@ + +local S = farming.intllib + +-- place cocoa +local function place_cocoa(itemstack, placer, pointed_thing, plantname) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + + -- return if any of the nodes are not registered + if not minetest.registered_nodes[under.name] then + return + end + + -- am I right-clicking on something that has a custom on_place set? + -- thanks to Krock for helping with this issue :) + local def = minetest.registered_nodes[under.name] + if placer and itemstack and def and def.on_rightclick then + return def.on_rightclick(pt.under, under, placer, itemstack, pt) + end + + -- check if pointing at jungletree + if under.name ~= "default:jungletree" + or minetest.get_node(pt.above).name ~= "air" then + return + end + + -- is player planting crop? + local name = placer and placer:get_player_name() or "" + + -- check for protection + if minetest.is_protected(pt.above, name) then + return + end + + -- add the node and remove 1 item from the itemstack + minetest.set_node(pt.above, {name = plantname}) + + minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}) + + if placer and not farming.is_creative(placer:get_player_name()) then + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 then + + minetest.after(0.20, + farming.refill_plant, + placer, + "farming:cocoa_beans_raw", + placer:get_wield_index() + ) + end + end + + return itemstack +end + +-- cocoa beans +minetest.register_craftitem("farming:cocoa_beans_raw", { + description = S("Raw Cocoa Beans"), + inventory_image = "farming_cocoa_beans.png^[brighten", + groups = {seed = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1") + end +}) + +minetest.register_craftitem("farming:cocoa_beans", { + description = S("Cocoa Beans"), + inventory_image = "farming_cocoa_beans.png", + groups = {food_cocoa = 1, flammable = 2} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 5, + output = "farming:cocoa_beans", + recipe = "farming:cocoa_beans_raw" +}) + +minetest.register_craft( { + output = "dye:brown 2", + recipe = {{"farming:cocoa_beans"}} +}) + +-- chocolate cookie +minetest.register_craftitem("farming:cookie", { + description = S("Cookie"), + inventory_image = "farming_cookie.png", + on_use = minetest.item_eat(2) +}) + +minetest.register_craft( { + output = "farming:cookie 8", + recipe = { + {"group:food_wheat", "group:food_cocoa", "group:food_wheat" } + } +}) + +-- bar of dark chocolate (thanks to Ice Pandora for her deviantart.com chocolate tutorial) +minetest.register_craftitem("farming:chocolate_dark", { + description = S("Bar of Dark Chocolate"), + inventory_image = "farming_chocolate_dark.png", + on_use = minetest.item_eat(3) +}) + +minetest.register_craft( { + output = "farming:chocolate_dark", + recipe = { + {"group:food_cocoa", "group:food_cocoa", "group:food_cocoa"} + } +}) + +-- chocolate block +minetest.register_node("farming:chocolate_block", { + description = S("Chocolate Block"), + tiles = {"farming_chocolate_block.png"}, + is_ground_content = false, + groups = {cracky = 2, oddly_breakable_by_hand = 2}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_craft({ + output = "farming:chocolate_block", + recipe = { + {"farming:chocolate_dark", "farming:chocolate_dark", "farming:chocolate_dark"}, + {"farming:chocolate_dark", "farming:chocolate_dark", "farming:chocolate_dark"}, + {"farming:chocolate_dark", "farming:chocolate_dark", "farming:chocolate_dark"} + } +}) + +minetest.register_craft({ + output = "farming:chocolate_dark 9", + recipe = {{"farming:chocolate_block"}} +}) + +-- cocoa definition +local def = { + drawtype = "plantlike", + tiles = {"farming_cocoa_1.png"}, + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + drop = {}, + groups = { + snappy = 3, flammable = 2, plant = 1, growing = 1, + not_in_creative_inventory = 1, leafdecay = 1, leafdecay_drop = 1 + }, + sounds = default.node_sound_leaves_defaults(), + growth_check = function(pos, node_name) + + if minetest.find_node_near(pos, 1, {"default:jungletree"}) then + return false -- can grow + end + + return true -- cannot grow + end +} + +-- stage 1 +minetest.register_node("farming:cocoa_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_cocoa_2.png"} +minetest.register_node("farming:cocoa_2", table.copy(def)) + +-- stage3 +def.tiles = {"farming_cocoa_3.png"} +def.drop = { + items = { + {items = {"farming:cocoa_beans_raw 1"}, rarity = 1} + } +} +minetest.register_node("farming:cocoa_3", table.copy(def)) + +-- stage 4 (final) +def.tiles = {"farming_cocoa_4.png"} +def.groups.growing = nil +def.growth_check = nil +def.drop = { + items = { + {items = {"farming:cocoa_beans_raw 2"}, rarity = 1}, + {items = {"farming:cocoa_beans_raw 1"}, rarity = 2}, + {items = {"farming:cocoa_beans_raw 1"}, rarity = 4} + } +} +minetest.register_node("farming:cocoa_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:cocoa_beans"] = { + trellis = "default:jungletree", + crop = "farming:cocoa", + seed = "farming:cocoa_beans_raw", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 4 +} + +-- add random cocoa pods to jungle tree's +minetest.register_on_generated(function(minp, maxp) + + if maxp.y < 0 then + return + end + + local pos, dir + local cocoa = minetest.find_nodes_in_area(minp, maxp, "default:jungletree") + + for n = 1, #cocoa do + + pos = cocoa[n] + + if minetest.find_node_near(pos, 1, + {"default:jungleleaves", "moretrees:jungletree_leaves_green"}) then + + dir = math.random(1, 40) + + if dir == 1 then pos.x = pos.x + 1 + elseif dir == 2 then pos.x = pos.x - 1 + elseif dir == 3 then pos.z = pos.z + 1 + elseif dir == 4 then pos.z = pos.z -1 + end + + if dir < 5 + and minetest.get_node(pos).name == "air" + and minetest.get_node_light(pos) > 12 then + +--print ("Cocoa Pod added at " .. minetest.pos_to_string(pos)) + + minetest.swap_node(pos, { + name = "farming:cocoa_" .. tostring(math.random(4)) + }) + end + end + end +end) diff --git a/mods/farming/crops/coffee.lua b/mods/farming/crops/coffee.lua new file mode 100644 index 0000000..490547e --- /dev/null +++ b/mods/farming/crops/coffee.lua @@ -0,0 +1,97 @@ + +local S = farming.intllib + +-- coffee +minetest.register_craftitem("farming:coffee_beans", { + description = S("Coffee Beans"), + inventory_image = "farming_coffee_beans.png", + groups = {seed = 2, food_coffee = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1") + end +}) + +-- cup of coffee +minetest.register_node("farming:coffee_cup", { + description = S("Cup of Coffee"), + drawtype = "torchlike", + tiles = {"farming_coffee_cup.png"}, + inventory_image = "farming_coffee_cup.png", + wield_image = "farming_coffee_cup.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1, drink = 1}, + on_use = minetest.item_eat(2, "vessels:drinking_glass"), + sounds = default.node_sound_glass_defaults() +}) + +minetest.register_alias("farming:coffee_cup_hot", "farming:coffee_cup") +minetest.register_alias("farming:drinking_cup", "vessels:drinking_glass") + +minetest.register_craft( { + output = "farming:coffee_cup", + recipe = { + {"group:food_saucepan", "group:food_coffee", "group:food_water_glass"} + }, + replacements = { + {"group:food_saucepan", "farming:saucepan"} + } +}) + + +-- coffee definition +local def = { + drawtype = "plantlike", + tiles = {"farming_coffee_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:coffee_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_coffee_2.png"} +minetest.register_node("farming:coffee_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_coffee_3.png"} +minetest.register_node("farming:coffee_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_coffee_4.png"} +minetest.register_node("farming:coffee_4", table.copy(def)) + +-- stage 5 (final) +def.tiles = {"farming_coffee_5.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:coffee_beans 2"}, rarity = 1}, + {items = {"farming:coffee_beans 2"}, rarity = 2}, + {items = {"farming:coffee_beans 2"}, rarity = 3} + } +} +minetest.register_node("farming:coffee_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:coffee"] = { + crop = "farming:coffee", + seed = "farming:coffee_beans", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} diff --git a/mods/farming/crops/corn.lua b/mods/farming/crops/corn.lua new file mode 100644 index 0000000..97bb86a --- /dev/null +++ b/mods/farming/crops/corn.lua @@ -0,0 +1,178 @@ + +--[[ + Original textures from GeMinecraft + http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and +]] + +local S = farming.intllib + +-- corn +minetest.register_craftitem("farming:corn", { + description = S("Corn"), + inventory_image = "farming_corn.png", + groups = {seed = 2, food_corn = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1") + end, + on_use = minetest.item_eat(3) +}) + +-- corn on the cob (texture by TenPlus1) +minetest.register_craftitem("farming:corn_cob", { + description = S("Corn on the Cob"), + inventory_image = "farming_corn_cob.png", + groups = {food_corn_cooked = 1, flammable = 2}, + on_use = minetest.item_eat(5) +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 10, + output = "farming:corn_cob", + recipe = "group:food_corn" +}) + +-- popcorn +minetest.register_craftitem("farming:popcorn", { + description = S("Popcorn"), + inventory_image = "farming_popcorn.png", + groups = {food_popcorn = 1, flammable = 2}, + on_use = minetest.item_eat(4) +}) + +minetest.register_craft({ + output = "farming:popcorn", + recipe = { + {"group:food_pot", "group:food_oil", "group:food_corn"} + }, + replacements = { + {"group:food_pot", "farming:pot"}, + {"group:food_oil", "vessels:glass_bottle"} + } +}) + +-- cornstarch +minetest.register_craftitem("farming:cornstarch", { + description = S("Cornstarch"), + inventory_image = "farming_cornstarch.png", + groups = {food_cornstarch = 1, food_gelatin = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:cornstarch", + recipe = { + {"group:food_mortar_pestle", "group:food_corn_cooked", "group:food_baking_tray"}, + {"", "group:food_bowl", ""}, + }, + replacements = { + {"group:food_mortar_pestle", "farming:mortar_pestle"}, + {"group:food_baking_tray", "farming:baking_tray"} + } +}) + +-- ethanol (thanks to JKMurray for this idea) +minetest.register_node("farming:bottle_ethanol", { + description = S("Bottle of Ethanol"), + drawtype = "plantlike", + tiles = {"farming_bottle_ethanol.png"}, + inventory_image = "farming_bottle_ethanol.png", + wield_image = "farming_bottle_ethanol.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 = "farming:bottle_ethanol", + recipe = { + {"group:food_corn", "group:food_corn", "group:food_corn"}, + {"group:food_corn", "vessels:glass_bottle", "group:food_corn"}, + {"group:food_corn", "group:food_corn", "group:food_corn"} + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:bottle_ethanol", + burntime = 80, + replacements = {{"farming:bottle_ethanol", "vessels:glass_bottle"}} +}) + +-- corn definition +local def = { + drawtype = "plantlike", + tiles = {"farming_corn_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:corn_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_corn_2.png"} +minetest.register_node("farming:corn_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_corn_3.png"} +minetest.register_node("farming:corn_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_corn_4.png"} +minetest.register_node("farming:corn_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_corn_5.png"} +minetest.register_node("farming:corn_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_corn_6.png"} +def.visual_scale = 1.9 +minetest.register_node("farming:corn_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_corn_7.png"} +def.drop = { + items = { + {items = {"farming:corn"}, rarity = 1}, + {items = {"farming:corn"}, rarity = 2}, + {items = {"farming:corn"}, rarity = 3} + } +} +minetest.register_node("farming:corn_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_corn_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:corn 2"}, rarity = 1}, + {items = {"farming:corn 2"}, rarity = 2}, + {items = {"farming:corn 2"}, rarity = 2} + } +} +minetest.register_node("farming:corn_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:corn"] = { + crop = "farming:corn", + seed = "farming:corn", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/cotton.lua b/mods/farming/crops/cotton.lua new file mode 100644 index 0000000..6ea2e6f --- /dev/null +++ b/mods/farming/crops/cotton.lua @@ -0,0 +1,186 @@ + +local S = farming.intllib + +-- wild cotton as a source of cotton seed and a chance of cotton itself +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 = { + items = { + {items = {"farming:cotton"}, rarity = 2}, + {items = {"farming:seed_cotton"}, rarity = 1} + } + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16} + } +}) + +-- cotton seeds +minetest.register_node("farming:seed_cotton", { + description = S("Cotton Seed"), + tiles = {"farming_cotton_seed.png"}, + inventory_image = "farming_cotton_seed.png", + wield_image = "farming_cotton_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:cotton_1") + end +}) + +-- cotton +minetest.register_craftitem("farming:cotton", { + description = S("Cotton"), + inventory_image = "farming_cotton.png", + groups = {flammable = 4} +}) + +-- string +minetest.register_craftitem("farming:string", { + description = S("String"), + inventory_image = "farming_string.png", + groups = {flammable = 2} +}) + +-- cotton to wool +minetest.register_craft({ + output = "wool:white", + recipe = { + {"farming:cotton", "farming:cotton"}, + {"farming:cotton", "farming:cotton"} + } +}) + +-- cotton to string +minetest.register_craft({ + output = "farming:string 2", + recipe = { + {"farming:cotton"}, + {"farming:cotton"} + } +}) + +-- can be used as fuel +minetest.register_craft({ + type = "fuel", + recipe = "farming:string", + burntime = 1 +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:cotton", + burntime = 1 +}) + +-- cotton definition +local def = { + drawtype = "plantlike", + tiles = {"farming_cotton_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 4, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:cotton_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_cotton_2.png"} +minetest.register_node("farming:cotton_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_cotton_3.png"} +minetest.register_node("farming:cotton_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_cotton_4.png"} +minetest.register_node("farming:cotton_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_cotton_5.png"} +def.drop = { + items = { + {items = {"farming:seed_cotton"}, rarity = 1} + } +} +minetest.register_node("farming:cotton_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_cotton_6.png"} +def.drop = { + items = { + {items = {"farming:cotton"}, rarity = 1}, + {items = {"farming:cotton"}, rarity = 2} + } +} +minetest.register_node("farming:cotton_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_cotton_7.png"} +def.drop = { + items = { + {items = {"farming:cotton"}, rarity = 1}, + {items = {"farming:cotton"}, rarity = 2}, + {items = {"farming:seed_cotton"}, rarity = 1}, + {items = {"farming:seed_cotton"}, rarity = 2} + } +} +minetest.register_node("farming:cotton_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_cotton_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:cotton"}, rarity = 1}, + {items = {"farming:cotton"}, rarity = 2}, + {items = {"farming:cotton"}, rarity = 3}, + {items = {"farming:seed_cotton"}, rarity = 1}, + {items = {"farming:seed_cotton"}, rarity = 2}, + {items = {"farming:seed_cotton"}, rarity = 3} + } +} +minetest.register_node("farming:cotton_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:cotton"] = { + crop = "farming:cotton", + seed = "farming:seed_cotton", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} + +--[[ Cotton using api +farming.register_plant("farming:cotton", { + description = "Cotton seed", + inventory_image = "farming_cotton_seed.png", + groups = {flammable = 2}, + steps = 8, +})]] diff --git a/mods/farming/crops/cucumber.lua b/mods/farming/crops/cucumber.lua new file mode 100644 index 0000000..c5e70de --- /dev/null +++ b/mods/farming/crops/cucumber.lua @@ -0,0 +1,65 @@ + +--[[ + Original textures from DocFarming mod + https://forum.minetest.net/viewtopic.php?id=3948 +]] + +local S = farming.intllib + +-- cucumber +minetest.register_craftitem("farming:cucumber", { + description = S("Cucumber"), + inventory_image = "farming_cucumber.png", + groups = {seed = 2, food_cucumber = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1") + end, + on_use = minetest.item_eat(4) +}) + +-- cucumber definition +local def = { + drawtype = "plantlike", + tiles = {"farming_cucumber_1.png"}, + paramtype = "light", + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:cucumber_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_cucumber_2.png"} +minetest.register_node("farming:cucumber_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_cucumber_3.png"} +minetest.register_node("farming:cucumber_3", table.copy(def)) + +-- stage 4 (final) +def.tiles = {"farming_cucumber_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:cucumber 2"}, rarity = 1}, + {items = {"farming:cucumber 2"}, rarity = 2} + } +} +minetest.register_node("farming:cucumber_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:cucumber"] = { + crop = "farming:cucumber", + seed = "farming:cucumber", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 4 +} diff --git a/mods/farming/crops/garlic.lua b/mods/farming/crops/garlic.lua new file mode 100644 index 0000000..e141479 --- /dev/null +++ b/mods/farming/crops/garlic.lua @@ -0,0 +1,136 @@ + +--[[ + Original textures from Crops Plus mod + Copyright (C) 2018 Grizzly Adam + https://forum.minetest.net/viewtopic.php?f=9&t=19488 +]] + +local S = farming.intllib + +-- potato +minetest.register_craftitem("farming:garlic_clove", { + description = S("Garlic clove"), + inventory_image = "crops_garlic_clove.png", + groups = {seed = 2, food_garlic_clove = 1, flammable = 3}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:garlic_1") + end +}) + +-- garlic bulb +minetest.register_craftitem("farming:garlic", { + description = S("Garlic"), + inventory_image = "crops_garlic.png", + on_use = minetest.item_eat(1), + groups = {food_garlic = 1, flammable = 3} +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:garlic_clove 8", + recipe = {"farming:garlic"} +}) + +minetest.register_craft({ + output = "farming:garlic", + recipe = { + {"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"}, + {"farming:garlic_clove", "", "farming:garlic_clove"}, + {"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"} + } +}) + +-- garlic braid +minetest.register_node("farming:garlic_braid", { + description = S("Garlic Braid"), + inventory_image = "crops_garlic_braid.png", + wield_image = "crops_garlic_braid.png", + drawtype = "nodebox", + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "crops_garlic_braid_side.png","crops_garlic_braid.png", + "crops_garlic_braid_side.png^[transformFx","crops_garlic_braid_side.png", + "crops_garlic_braid.png","crops_garlic_braid.png" + }, + groups = {vessel = 1, dig_immediate = 3, flammable = 3}, + sounds = default.node_sound_leaves_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.13, -0.45, 0.5, 0.13, 0.45, 0.24} + } + } +}) + +minetest.register_craft({ + output = "farming:garlic_braid", + recipe = { + {"farming:garlic", "farming:garlic", "farming:garlic"}, + {"farming:garlic", "farming:garlic", "farming:garlic"}, + {"farming:garlic", "farming:garlic", "farming:garlic"} + } +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:garlic 9", + recipe = {"farming:garlic_braid"} +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"crops_garlic_plant_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 3, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:garlic_1", table.copy(def)) + +-- stage 2 +def.tiles = {"crops_garlic_plant_2.png"} +minetest.register_node("farming:garlic_2", table.copy(def)) + +-- stage 3 +def.tiles = {"crops_garlic_plant_3.png"} +minetest.register_node("farming:garlic_3", table.copy(def)) + +-- stage 4 +def.tiles = {"crops_garlic_plant_4.png"} +minetest.register_node("farming:garlic_4", table.copy(def)) + +-- stage 5 +def.tiles = {"crops_garlic_plant_5.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:garlic 3"}, rarity = 1}, + {items = {"farming:garlic"}, rarity = 2}, + {items = {"farming:garlic"}, rarity = 5} + } +} +minetest.register_node("farming:garlic_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:garlic"] = { + crop = "farming:garlic", + seed = "farming:garlic_clove", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} diff --git a/mods/farming/crops/grapes.lua b/mods/farming/crops/grapes.lua new file mode 100644 index 0000000..ee8fe38 --- /dev/null +++ b/mods/farming/crops/grapes.lua @@ -0,0 +1,262 @@ + +local S = farming.intllib + +-- place trellis +local function place_grapes(itemstack, placer, pointed_thing, plantname) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + + -- return if any of the nodes are not registered + if not minetest.registered_nodes[under.name] then + return + end + + -- am I right-clicking on something that has a custom on_place set? + -- thanks to Krock for helping with this issue :) + local def = minetest.registered_nodes[under.name] + if placer and itemstack and def and def.on_rightclick then + return def.on_rightclick(pt.under, under, placer, itemstack, pt) + end + + -- is player planting seed? + local name = placer and placer:get_player_name() or "" + + -- check for protection + if minetest.is_protected(pt.under, name) then + return + end + + -- check if pointing at trellis + if under.name ~= "farming:trellis" then + return + end + + -- add the node and remove 1 item from the itemstack + minetest.set_node(pt.under, {name = plantname}) + + minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0}) + + if placer and not farming.is_creative(placer:get_player_name()) then + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 then + + minetest.after(0.20, + farming.refill_plant, + placer, + "farming:grapes", + placer:get_wield_index() + ) + end + end + + return itemstack +end + +-- grapes +minetest.register_craftitem("farming:grapes", { + description = S("Grapes"), + inventory_image = "farming_grapes.png", + on_use = minetest.item_eat(2), + groups = {seed = 2, food_grapes = 1, flammable = 3}, + on_place = function(itemstack, placer, pointed_thing) + return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1") + end +}) + +-- grapes can be used for violet dye +minetest.register_craft({ + output = "dye:violet", + recipe = {{"farming:grapes"}} +}) + +-- trellis +minetest.register_node("farming:trellis", { + description = S("Trellis (place on soil before planting grapes)"), + drawtype = "plantlike", + tiles = {"farming_trellis.png"}, + inventory_image = "farming_trellis.png", + visual_scale = 1.9, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = "farming:trellis", + selection_box = farming.select, + groups = {snappy = 3, flammable = 2, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + + -- return if any of the nodes are not registered + if not minetest.registered_nodes[under.name] then + return + end + + -- am I right-clicking on something that has a custom on_place set? + -- thanks to Krock for helping with this issue :) + local def = minetest.registered_nodes[under.name] + if def and def.on_rightclick then + return def.on_rightclick(pt.under, under, placer, itemstack, pt) + end + + if minetest.is_protected(pt.above, placer:get_player_name()) then + return + end + + local nodename = under.name + + if minetest.get_item_group(nodename, "soil") < 2 then + return + end + + local top = { + x = pointed_thing.above.x, + y = pointed_thing.above.y + 1, + z = pointed_thing.above.z + } + + nodename = minetest.get_node(top).name + + if nodename ~= "air" then + return + end + + minetest.set_node(pointed_thing.above, {name = "farming:trellis"}) + + if not farming.is_creative(placer:get_player_name()) then + itemstack:take_item() + end + + return itemstack + end +}) + +minetest.register_craft({ + output = "farming:trellis", + recipe = { + {"default:stick", "default:stick", "default:stick"}, + {"default:stick", "default:stick", "default:stick"}, + {"default:stick", "default:stick", "default:stick"} + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:trellis", + burntime = 15 +}) + +-- grapes definition +local def = { + drawtype = "plantlike", + tiles = {"farming_grapes_1.png"}, + visual_scale = 1.9, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {"farming:trellis"}, rarity = 1}, + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 3, not_in_creative_inventory = 1, + attached_node = 1, growing = 1, plant = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:grapes_1", table.copy(def)) + +-- stage2 +def.tiles = {"farming_grapes_2.png"} +minetest.register_node("farming:grapes_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_grapes_3.png"} +minetest.register_node("farming:grapes_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_grapes_4.png"} +minetest.register_node("farming:grapes_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_grapes_5.png"} +minetest.register_node("farming:grapes_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_grapes_6.png"} +minetest.register_node("farming:grapes_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_grapes_7.png"} +minetest.register_node("farming:grapes_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_grapes_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:trellis"}, rarity = 1}, + {items = {"farming:grapes 3"}, rarity = 1}, + {items = {"farming:grapes 1"}, rarity = 2}, + {items = {"farming:grapes 1"}, rarity = 3} + } +} +minetest.register_node("farming:grapes_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:grapes"] = { + trellis = "farming:trellis", + crop = "farming:grapes", + seed = "farming:grapes", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} + +-- wild grape vine (this is what you find on the map) +minetest.register_node("farming:grapebush", { + drawtype = "plantlike", + tiles = {"farming_grapebush.png"}, + paramtype = "light", + waving = 1, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {"farming:grapes 1"}, rarity = 1}, + {items = {"farming:grapes 1"}, rarity = 2}, + {items = {"farming:grapes 1"}, rarity = 3} + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1 + }, + sounds = default.node_sound_leaves_defaults() +}) diff --git a/mods/farming/crops/hemp.lua b/mods/farming/crops/hemp.lua new file mode 100644 index 0000000..4cc05e5 --- /dev/null +++ b/mods/farming/crops/hemp.lua @@ -0,0 +1,262 @@ + +local S = farming.intllib + +-- hemp seeds +minetest.register_node("farming:seed_hemp", { + description = S("Hemp Seed"), + tiles = {"farming_hemp_seed.png"}, + inventory_image = "farming_hemp_seed.png", + wield_image = "farming_hemp_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:hemp_1") + end +}) + +-- harvested hemp +minetest.register_craftitem("farming:hemp_leaf", { + description = S("Hemp Leaf"), + inventory_image = "farming_hemp_leaf.png" +}) + +-- hemp oil +minetest.register_node("farming:hemp_oil", { + description = S("Bottle of Hemp Oil"), + drawtype = "plantlike", + tiles = {"farming_hemp_oil.png"}, + inventory_image = "farming_hemp_oil.png", + wield_image = "farming_hemp_oil.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 = {food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_glass_defaults() +}) + +minetest.register_craft( { + output = "farming:hemp_oil", + recipe = { + {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}, + {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}, + {"", "vessels:glass_bottle", ""} + } +}) + +minetest.register_craft( { + output = "farming:hemp_oil", + recipe = { + {"farming:seed_hemp", "farming:seed_hemp", "farming:seed_hemp"}, + {"farming:seed_hemp", "farming:seed_hemp", "farming:seed_hemp"}, + {"farming:seed_hemp", "vessels:glass_bottle", "farming:seed_hemp"} + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:hemp_oil", + burntime = 20, + replacements = {{"farming:hemp_oil", "vessels:glass_bottle"}} +}) + +-- hemp fibre +minetest.register_craftitem("farming:hemp_fibre", { + description = S("Hemp Fibre"), + inventory_image = "farming_hemp_fibre.png" +}) + +minetest.register_craft( { + output = "farming:hemp_fibre 8", + recipe = { + {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}, + {"farming:hemp_leaf", "group:water_bucket", "farming:hemp_leaf"}, + {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"} + }, + replacements = {{"group:water_bucket", "bucket:bucket_empty"}} +}) + +if minetest.get_modpath("bucket_wooden") then + minetest.register_craft( { + output = "farming:hemp_fibre 8", + recipe = { + {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}, + {"farming:hemp_leaf", "group:water_bucket_wooden", "farming:hemp_leaf"}, + {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"} + }, + replacements = {{"group:water_bucket_wooden", "bucket_wooden:bucket_empty"}} + }) +end + +-- hemp block +minetest.register_node("farming:hemp_block", { + description = S("Hemp Block"), + tiles = {"farming_hemp_block.png"}, + paramtype = "light", + groups = {snappy = 1, oddly_breakable_by_hand = 1, flammable = 2} +}) + +minetest.register_craft( { + output = "farming:hemp_block", + recipe = { + {"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"}, + {"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"}, + {"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"} + } +}) + +-- check and register stairs +if minetest.global_exists("stairs") then + + if stairs.mod and stairs.mod == "redo" then + + stairs.register_all("hemp_block", "farming:hemp_block", + {snappy = 1, flammable = 2}, + {"farming_hemp_block.png"}, + "Hemp Block", + default.node_sound_leaves_defaults()) + else + + stairs.register_stair_and_slab("hemp_block", "farming:hemp_block", + {snappy = 1, flammable = 2}, + {"farming_hemp_block.png"}, + "Hemp Block Stair", + "Hemp Block Slab", + default.node_sound_leaves_defaults()) + end +end + +-- paper +minetest.register_craft( { + output = "default:paper 3", + recipe = { + {"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"} + } +}) + +-- string +minetest.register_craft( { + output = "farming:cotton 3", + recipe = { + {"farming:hemp_fibre"}, + {"farming:hemp_fibre"}, + {"farming:hemp_fibre"} + } +}) + +-- hemp rope +minetest.register_node("farming:hemp_rope", { + description = S("Hemp Rope"), + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + tiles = {"farming_hemp_rope.png"}, + wield_image = "farming_hemp_rope.png", + inventory_image = "farming_hemp_rope.png", + drawtype = "plantlike", + groups = {flammable = 2, choppy = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} + } +}) + +-- string +minetest.register_craft( { + output = "farming:hemp_rope 6", + recipe = { + {"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"}, + {"farming:cotton", "farming:cotton", "farming:cotton"}, + {"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"} + } +}) + +-- hemp definition +local def = { + drawtype = "plantlike", + tiles = {"farming_hemp_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:hemp_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_hemp_2.png"} +minetest.register_node("farming:hemp_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_hemp_3.png"} +minetest.register_node("farming:hemp_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_hemp_4.png"} +minetest.register_node("farming:hemp_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_hemp_5.png"} +minetest.register_node("farming:hemp_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_hemp_6.png"} +def.drop = { + items = { + {items = {"farming:hemp_leaf"}, rarity = 2}, + {items = {"farming:seed_hemp"}, rarity = 1} + } +} +minetest.register_node("farming:hemp_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_hemp_7.png"} +def.drop = { + items = { + {items = {"farming:hemp_leaf"}, rarity = 1}, + {items = {"farming:hemp_leaf"}, rarity = 3}, + {items = {"farming:seed_hemp"}, rarity = 1}, + {items = {"farming:seed_hemp"}, rarity = 3} + } +} +minetest.register_node("farming:hemp_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_hemp_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:hemp_leaf 2"}, rarity = 1}, + {items = {"farming:hemp_leaf"}, rarity = 2}, + {items = {"farming:seed_hemp"}, rarity = 1}, + {items = {"farming:seed_hemp"}, rarity = 2} + } +} +minetest.register_node("farming:hemp_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:hemp"] = { + crop = "farming:hemp", + seed = "farming:seed_hemp", + mminlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/lettuce.lua b/mods/farming/crops/lettuce.lua new file mode 100644 index 0000000..bbd7138 --- /dev/null +++ b/mods/farming/crops/lettuce.lua @@ -0,0 +1,63 @@ +local S = farming.intllib + +-- lettuce +minetest.register_craftitem("farming:lettuce", { + description = S("Lettuce"), + inventory_image = "farming_lettuce.png", + groups = {seed = 2, food_lettuce = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:lettuce_1") + end, + on_use = minetest.item_eat(2), +}) + +local def = { + drawtype = "plantlike", + tiles = {"farming_lettuce_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:lettuce_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_lettuce_2.png"} +minetest.register_node("farming:lettuce_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_lettuce_3.png"} +minetest.register_node("farming:lettuce_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_lettuce_4.png"} +minetest.register_node("farming:lettuce_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_lettuce_5.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {'farming:lettuce 2'}, rarity = 1}, + {items = {'farming:lettuce 1'}, rarity = 2} + } +} +minetest.register_node("farming:lettuce_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:lettuce"] = { + crop = "farming:lettuce", + seed = "farming:lettuce", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} diff --git a/mods/farming/crops/melon.lua b/mods/farming/crops/melon.lua new file mode 100644 index 0000000..66decdc --- /dev/null +++ b/mods/farming/crops/melon.lua @@ -0,0 +1,98 @@ + +local S = farming.intllib + +-- melon +minetest.register_craftitem("farming:melon_slice", { + description = S("Melon Slice"), + inventory_image = "farming_melon_slice.png", + groups = {seed = 2, food_melon_slice = 1, flammable = 3}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1") + end, + on_use = minetest.item_eat(2) +}) + +minetest.register_craft({ + output = "farming:melon_8", + recipe = { + {"farming:melon_slice", "farming:melon_slice"}, + {"farming:melon_slice", "farming:melon_slice"} + } +}) + +minetest.register_craft({ + output = "farming:melon_slice 4", + recipe = {{"farming:cutting_board", "farming:melon_8"}}, + replacements = {{"farming:cutting_board", "farming:cutting_board"}} +}) + +-- melon definition +local def = { + drawtype = "plantlike", + tiles = {"farming_melon_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:melon_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_melon_2.png"} +minetest.register_node("farming:melon_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_melon_3.png"} +minetest.register_node("farming:melon_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_melon_4.png"} +minetest.register_node("farming:melon_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_melon_5.png"} +minetest.register_node("farming:melon_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_melon_6.png"} +minetest.register_node("farming:melon_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_melon_7.png"} +minetest.register_node("farming:melon_7", table.copy(def)) + +-- stage 8 (final) +minetest.register_node("farming:melon_8", { + description = S("Melon"), + tiles = { + "farming_melon_top.png", + "farming_melon_bottom.png", + "farming_melon_side.png" + }, + groups = { + food_melon = 1, snappy = 2, oddly_breakable_by_hand = 1, + flammable = 2, plant = 1 + }, + drop = "farming:melon_8", + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + on_place = minetest.rotate_node +}) + +-- add to registered_plants +farming.registered_plants["farming:melon"] = { + crop = "farming:melon", + seed = "farming:melon_slice", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/mint.lua b/mods/farming/crops/mint.lua new file mode 100644 index 0000000..de4b6b3 --- /dev/null +++ b/mods/farming/crops/mint.lua @@ -0,0 +1,89 @@ + +local S = farming.intllib + +-- mint seed +minetest.register_craftitem("farming:seed_mint", { + description = S("Mint Seeds"), + inventory_image = "farming_mint_seeds.png", + groups = {seed = 2, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed( + itemstack, placer, pointed_thing, "farming:mint_1") + end +}) + +-- mint leaf +minetest.register_craftitem("farming:mint_leaf", { + description = S("Mint Leaf"), + inventory_image = "farming_mint_leaf.png", + groups = {food_mint = 1, flammable = 4} +}) + +-- mint tea +minetest.register_craftitem("farming:mint_tea", { + description = S("Mint Tea"), + inventory_image = "farming_mint_tea.png", + on_use = minetest.item_eat(2, "vessels:drinking_glass"), + groups = {flammable = 4} +}) + +minetest.register_craft({ + output = "farming:mint_tea", + recipe = { + {"group:food_mint", "group:food_mint", "group:food_mint"}, + {"group:food_water_glass", "farming:juicer", ""} + }, + replacements = { + {"group:food_juicer", "farming:juicer"} + } +}) + + +-- mint definition +local def = { + drawtype = "plantlike", + tiles = {"farming_mint_1.png"}, + paramtype = "light", + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:mint_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_mint_2.png"} +minetest.register_node("farming:mint_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_mint_3.png"} +minetest.register_node("farming:mint_3", table.copy(def)) + +-- stage 4 (final) +def.tiles = {"farming_mint_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:mint_leaf 2"}, rarity = 1}, + {items = {"farming:mint_leaf 2"}, rarity = 2}, + {items = {"farming:seed_mint 1"}, rarity = 1}, + {items = {"farming:seed_mint 2"}, rarity = 2} + } +} +minetest.register_node("farming:mint_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:mint"] = { + crop = "farming:mint", + seed = "farming:seed_mint", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 4 +} diff --git a/mods/farming/crops/onion.lua b/mods/farming/crops/onion.lua new file mode 100644 index 0000000..63cdbe5 --- /dev/null +++ b/mods/farming/crops/onion.lua @@ -0,0 +1,95 @@ + +--[[ + Original textures from Crops Plus mod + Copyright (C) 2018 Grizzly Adam + https://forum.minetest.net/viewtopic.php?f=9&t=19488 +]] + +local S = farming.intllib + +-- onion +minetest.register_craftitem("farming:onion", { + description = S("Onion"), + inventory_image = "crops_onion.png", + groups = {seed = 2, food_onion = 1, flammable = 3}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1") + end, + on_use = minetest.item_eat(1) +}) + +-- onion soup +minetest.register_craftitem("farming:onion_soup", { + description = S("Onion Soup"), + inventory_image = "farming_onion_soup.png", + groups = {flammable = 2}, + on_use = minetest.item_eat(6, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:onion_soup", + recipe = { + {"group:food_onion", "group:food_onion", "group:food_onion"}, + {"group:food_onion", "group:food_pot", "group:food_onion"}, + {"", "group:food_bowl", ""} + }, + replacements = {{"farming:pot", "farming:pot"}} +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"crops_onion_plant_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 3, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:onion_1", table.copy(def)) + +-- stage 2 +def.tiles = {"crops_onion_plant_2.png"} +minetest.register_node("farming:onion_2", table.copy(def)) + +-- stage 3 +def.tiles = {"crops_onion_plant_3.png"} +minetest.register_node("farming:onion_3", table.copy(def)) + +-- stage 4 +def.tiles = {"crops_onion_plant_4.png"} +minetest.register_node("farming:onion_4", table.copy(def)) + +-- stage 5 +def.tiles = {"crops_onion_plant_5.png"} +def.groups.growing = nil +def.drop = { + max_items = 5, items = { + {items = {"farming:onion"}, rarity = 1}, + {items = {"farming:onion"}, rarity = 1}, + {items = {"farming:onion"}, rarity = 2}, + {items = {"farming:onion"}, rarity = 2}, + {items = {"farming:onion"}, rarity = 5} + } +} +minetest.register_node("farming:onion_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:onion"] = { + crop = "farming:onion", + seed = "farming:onion", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} diff --git a/mods/farming/crops/parsley.lua b/mods/farming/crops/parsley.lua new file mode 100644 index 0000000..0bc20eb --- /dev/null +++ b/mods/farming/crops/parsley.lua @@ -0,0 +1,56 @@ +local S = farming.intllib + +-- item definition +minetest.register_craftitem("farming:parsley", { + description = S("Parsley"), + inventory_image = "farming_parsley.png", + groups = {seed = 2, food_parsley = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:parsley_1") + end +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"farming_parsley_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:parsley_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_parsley_2.png"} +minetest.register_node("farming:parsley_2", table.copy(def)) + +-- stage 3 (final) +def.tiles = {"farming_parsley_3.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:parsley 2"}, rarity = 1}, + {items = {"farming:parsley"}, rarity = 2}, + {items = {"farming:parsley"}, rarity = 3} + } +} +minetest.register_node("farming:parsley_3", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:parsley"] = { + crop = "farming:parsley", + seed = "farming:parsley", + minlight = 13, + maxlight = 15, + steps = 3 +} diff --git a/mods/farming/crops/peas.lua b/mods/farming/crops/peas.lua new file mode 100644 index 0000000..94053f2 --- /dev/null +++ b/mods/farming/crops/peas.lua @@ -0,0 +1,91 @@ + +local S = farming.intllib + +-- Textures for Pea crop and Peas were done by Andrey01 + +-- pea pod +minetest.register_craftitem("farming:pea_pod", { + description = S("Pea Pod"), + inventory_image = "farming_pea_pod.png", + groups = {seed = 2, food_peas = 1, food_pea_pod = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1") + end, + on_use = minetest.item_eat(1) +}) + +-- replacement for separate peas item that was removed +minetest.register_alias("farming:peas", "farming:pea_pod") + +-- pea soup +minetest.register_craftitem("farming:pea_soup", { + description = S("Pea Soup"), + inventory_image = "farming_pea_soup.png", + groups = {flammable = 2}, + on_use = minetest.item_eat(4, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:pea_soup", + recipe = { + {"group:food_peas"}, + {"group:food_peas"}, + {"group:food_bowl"} + } +}) + +local def = { + drawtype = "plantlike", + tiles = {"farming_pea_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:pea_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_pea_2.png"} +minetest.register_node("farming:pea_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_pea_3.png"} +minetest.register_node("farming:pea_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_pea_4.png"} +minetest.register_node("farming:pea_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_pea_5.png"} +def.groups.growing = nil +def.drop = { + max_items = 5, items = { + {items = {"farming:pea_pod"}, rarity = 1}, + {items = {"farming:pea_pod"}, rarity = 2}, + {items = {"farming:pea_pod"}, rarity = 3}, + {items = {"farming:pea_pod"}, rarity = 5} + } +} +minetest.register_node("farming:pea_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:pea_pod"] = { + crop = "farming:pea", + seed = "farming:pea_pod", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} diff --git a/mods/farming/crops/pepper.lua b/mods/farming/crops/pepper.lua new file mode 100644 index 0000000..bdf6287 --- /dev/null +++ b/mods/farming/crops/pepper.lua @@ -0,0 +1,155 @@ + +--[[ + Original textures from Crops Plus mod + Copyright (C) 2018 Grizzly Adam + https://forum.minetest.net/viewtopic.php?f=9&t=19488 +]] + +local S = farming.intllib + +-- peppercorn (seed) +minetest.register_craftitem("farming:peppercorn", { + description = S("Peppercorn"), + inventory_image = "crops_peppercorn.png", + groups = {seed = 1, food_peppercorn = 1, flammable = 3}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:pepper_1") + end +}) + +-- green pepper +minetest.register_craftitem("farming:pepper", { + description = S("Green Pepper"), + inventory_image = "crops_pepper.png", + on_use = minetest.item_eat(2), + groups = {food_pepper = 1, flammable = 3} +}) + +-- yellow pepper +minetest.register_craftitem("farming:pepper_yellow", { + description = S("Yellow Pepper"), + inventory_image = "crops_pepper_yellow.png", + on_use = minetest.item_eat(3), + groups = {food_pepper = 1, flammable = 3} +}) + +-- red pepper +minetest.register_craftitem("farming:pepper_red", { + description = S("Red Pepper"), + inventory_image = "crops_pepper_red.png", + on_use = minetest.item_eat(4), + groups = {food_pepper = 1, flammable = 3} +}) + +minetest.register_craft({ + output = "farming:peppercorn", + recipe = {{"group:food_pepper"}} +}) + +-- ground pepper +minetest.register_node("farming:pepper_ground", { + description = S("Ground Pepper"), + inventory_image = "crops_pepper_ground.png", + wield_image = "crops_pepper_ground.png", + drawtype = "plantlike", + visual_scale = 0.8, + paramtype = "light", + tiles = {"crops_pepper_ground.png"}, + groups = { + vessel = 1, food_pepper_ground = 1, + dig_immediate = 3, attached_node = 1 + }, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + } +}) + +minetest.register_craft( { + output = "farming:pepper_ground", + recipe = { + {"group:food_peppercorn"}, + {"farming:mortar_pestle"}, + {"vessels:glass_bottle"} + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"crops_pepper_plant_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 1, + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 3, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:pepper_1", table.copy(def)) + +-- stage 2 +def.tiles = {"crops_pepper_plant_2.png"} +minetest.register_node("farming:pepper_2", table.copy(def)) + +-- stage 3 +def.tiles = {"crops_pepper_plant_3.png"} +minetest.register_node("farming:pepper_3", table.copy(def)) + +-- stage 4 +def.tiles = {"crops_pepper_plant_4.png"} +minetest.register_node("farming:pepper_4", table.copy(def)) + +-- stage 5 (green pepper) +def.tiles = {"crops_pepper_plant_5.png"} +def.drop = { + max_items = 2, items = { + {items = {"farming:pepper 2"}, rarity = 1}, + {items = {"farming:pepper"}, rarity = 2}, + {items = {"farming:pepper"}, rarity = 3} + } +} +minetest.register_node("farming:pepper_5", table.copy(def)) + +-- stage 6 (yellow pepper) +def.tiles = {"crops_pepper_plant_6.png"} +def.drop = { + max_items = 2, items = { + {items = {"farming:pepper_yellow 2"}, rarity = 1}, + {items = {"farming:pepper_yellow"}, rarity = 2}, + {items = {"farming:pepper_yellow"}, rarity = 3} + } +} +minetest.register_node("farming:pepper_6", table.copy(def)) + +-- stage 7 (red pepper) +def.tiles = {"crops_pepper_plant_7.png"} +def.groups.growing = nil +def.drop = { + max_items = 2, items = { + {items = {"farming:pepper_red 2"}, rarity = 1}, + {items = {"farming:pepper_red"}, rarity = 2}, + {items = {"farming:pepper_red"}, rarity = 3} + } +} +minetest.register_node("farming:pepper_7", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:pepper"] = { + crop = "farming:pepper", + seed = "farming:peppercorn", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 5 +} diff --git a/mods/farming/crops/pineapple.lua b/mods/farming/crops/pineapple.lua new file mode 100644 index 0000000..6bb1918 --- /dev/null +++ b/mods/farming/crops/pineapple.lua @@ -0,0 +1,141 @@ + +local S = farming.intllib + +-- pineapple top +minetest.register_craftitem("farming:pineapple_top", { + description = S("Pineapple Top"), + inventory_image = "farming_pineapple_top.png", + groups = {seed = 2, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:pineapple_1") + end +}) + +-- pineapple +minetest.register_node("farming:pineapple", { + description = S("Pineapple"), + drawtype = "plantlike", + tiles = {"farming_pineapple.png"}, + inventory_image = "farming_pineapple.png", + wield_image = "farming_pineapple.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27} + }, + groups = {food_pineapple = 1, fleshy = 3, dig_immediate = 3, flammable = 2} +}) + +-- pineapple +minetest.register_craftitem("farming:pineapple_ring", { + description = S("Pineapple Ring"), + inventory_image = "farming_pineapple_ring.png", + groups = {food_pineapple_ring = 1, flammable = 2}, + on_use = minetest.item_eat(1) +}) + +minetest.register_craft( { + output = "farming:pineapple_ring 5", + recipe = {{"group:food_pineapple"}}, + replacements = {{"farming:pineapple", "farming:pineapple_top"}} +}) + +-- pineapple juice +minetest.register_craftitem("farming:pineapple_juice", { + description = S("Pineapple Juice"), + inventory_image = "farming_pineapple_juice.png", + on_use = minetest.item_eat(4, "vessels:drinking_glass"), + groups = {vessel = 1, drink = 1} +}) + +minetest.register_craft({ + output = "farming:pineapple_juice", + recipe = { + {"group:food_pineapple_ring", "group:food_pineapple_ring", + "group:food_pineapple_ring"}, + {"", "farming:juicer", ""}, + {"", "vessels:drinking_glass", ""} + }, + replacements = { + {"group:food_juicer", "farming:juicer"} + } +}) + +minetest.register_craft({ + output = "farming:pineapple_juice 2", + recipe = { + {"group:food_pineapple", ""}, + {"farming:juicer", ""}, + {"vessels:drinking_glass", "vessels:drinking_glass"} + }, + replacements = { + {"group:food_juicer", "farming:juicer"} + } +}) + +-- crop definition +local def = { + drawtype = "plantlike", + visual_scale = 1.5, + tiles = {"farming_pineapple_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:pineapple_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_pineapple_2.png"} +minetest.register_node("farming:pineapple_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_pineapple_3.png"} +minetest.register_node("farming:pineapple_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_pineapple_4.png"} +minetest.register_node("farming:pineapple_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_pineapple_5.png"} +minetest.register_node("farming:pineapple_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_pineapple_6.png"} +minetest.register_node("farming:pineapple_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_pineapple_7.png"} +minetest.register_node("farming:pineapple_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_pineapple_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:pineapple"}, rarity = 1}, + {items = {"farming:pineapple"}, rarity = 10} + } +} +minetest.register_node("farming:pineapple_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:pineapple"] = { + crop = "farming:pineapple", + seed = "farming:pineapple_top", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/potato.lua b/mods/farming/crops/potato.lua new file mode 100644 index 0000000..a55ab29 --- /dev/null +++ b/mods/farming/crops/potato.lua @@ -0,0 +1,112 @@ + +--[[ + Original textures from DocFarming mod + https://forum.minetest.net/viewtopic.php?id=3948 +]] + +local S = farming.intllib + +-- potato +minetest.register_craftitem("farming:potato", { + description = S("Potato"), + inventory_image = "farming_potato.png", + groups = {seed = 2, food_potato = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") + end, + -- 1 in 3 chance of being poisoned + on_use = function(itemstack, user, pointed_thing) + if user then + if math.random(3) == 1 then + return minetest.do_item_eat(-1, nil, itemstack, user, pointed_thing) + else + return minetest.do_item_eat(1, nil, itemstack, user, pointed_thing) + end + end + end +}) + +-- baked potato +minetest.register_craftitem("farming:baked_potato", { + description = S("Baked Potato"), + inventory_image = "farming_baked_potato.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 10, + output = "farming:baked_potato", + recipe = "group:food_potato" +}) + +-- Potato and cucumber Salad +minetest.register_craftitem("farming:potato_salad", { + description = S("Cucumber and Potato Salad"), + inventory_image = "farming_potato_salad.png", + on_use = minetest.item_eat(10, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:potato_salad", + recipe = { + {"group:food_cucumber"}, + {"farming:baked_potato"}, + {"group:food_bowl"} + } +}) + +-- potato definition +local def = { + drawtype = "plantlike", + tiles = {"farming_potato_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:potato_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_potato_2.png"} +minetest.register_node("farming:potato_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_potato_3.png"} +def.drop = { + items = { + {items = {"farming:potato"}, rarity = 1}, + {items = {"farming:potato"}, rarity = 3} + } +} +minetest.register_node("farming:potato_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_potato_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:potato 2"}, rarity = 1}, + {items = {"farming:potato 3"}, rarity = 2} + } +} +minetest.register_node("farming:potato_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:potato"] = { + crop = "farming:potato", + seed = "farming:potato", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 4 +} diff --git a/mods/farming/crops/pumpkin.lua b/mods/farming/crops/pumpkin.lua new file mode 100644 index 0000000..2829d47 --- /dev/null +++ b/mods/farming/crops/pumpkin.lua @@ -0,0 +1,208 @@ + +--[[ + Big thanks to PainterlyPack.net for allowing me to use these textures +]] + +local S = farming.intllib + +-- pumpkin slice +minetest.register_craftitem("farming:pumpkin_slice", { + description = S("Pumpkin Slice"), + inventory_image = "farming_pumpkin_slice.png", + groups = {seed = 2, food_pumpkin_slice = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1") + end, + on_use = minetest.item_eat(2) +}) + +minetest.register_craft({ + output = "farming:pumpkin", + recipe = { + {"farming:pumpkin_slice", "farming:pumpkin_slice"}, + {"farming:pumpkin_slice", "farming:pumpkin_slice"} + } +}) + +minetest.register_craft({ + output = "farming:pumpkin_slice 4", + recipe = {{"farming:cutting_board", "farming:pumpkin"}}, + replacements = {{"farming:cutting_board", "farming:cutting_board"}} +}) + +-- jack 'o lantern +minetest.register_node("farming:jackolantern", { + description = S("Jack 'O Lantern (punch to turn on and off)"), + tiles = { + "farming_pumpkin_top.png", "farming_pumpkin_top.png", + "farming_pumpkin_side.png", "farming_pumpkin_side.png", + "farming_pumpkin_side.png", "farming_pumpkin_face_off.png" + }, + paramtype2 = "facedir", + groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + on_punch = function(pos, node, puncher) + local name = puncher:get_player_name() or "" + if minetest.is_protected(pos, name) then return end + node.name = "farming:jackolantern_on" + minetest.swap_node(pos, node) + end +}) + +minetest.register_node("farming:jackolantern_on", { + tiles = { + "farming_pumpkin_top.png", "farming_pumpkin_top.png", + "farming_pumpkin_side.png", "farming_pumpkin_side.png", + "farming_pumpkin_side.png", "farming_pumpkin_face_on.png" + }, + light_source = default.LIGHT_MAX - 1, + paramtype2 = "facedir", + groups = { + choppy = 1, oddly_breakable_by_hand = 1, flammable = 2, + not_in_creative_inventory = 1 + }, + sounds = default.node_sound_wood_defaults(), + drop = "farming:jackolantern", + on_punch = function(pos, node, puncher) + local name = puncher:get_player_name() or "" + if minetest.is_protected(pos, name) then return end + node.name = "farming:jackolantern" + minetest.swap_node(pos, node) + end +}) + +minetest.register_craft({ + output = "farming:jackolantern", + recipe = { + {"default:torch"}, + {"group:food_pumpkin"} + } +}) + +--- wooden scarecrow base +minetest.register_node("farming:scarecrow_bottom", { + description = S("Scarecrow Bottom"), + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + tiles = {"default_wood.png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}, + {-12/16, 4/16, -1/16, 12/16, 2/16, 1/16}, + } + }, + groups = {snappy = 3, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:scarecrow_bottom", + recipe = { + {"", "group:stick", ""}, + {"group:stick", "group:stick", "group:stick"}, + {"", "group:stick", ""} + } +}) + +-- pumpkin bread +minetest.register_craftitem("farming:pumpkin_bread", { + description = S("Pumpkin Bread"), + inventory_image = "farming_pumpkin_bread.png", + on_use = minetest.item_eat(8), + groups = {food_bread = 1, flammable = 2} +}) + +minetest.register_craftitem("farming:pumpkin_dough", { + description = S("Pumpkin Dough"), + inventory_image = "farming_pumpkin_dough.png" +}) + +minetest.register_craft({ + output = "farming:pumpkin_dough", + recipe = { + {"group:food_pumpkin_slice", "group:food_flour", "group:food_pumpkin_slice"} + } +}) + +minetest.register_craft({ + type = "cooking", + output = "farming:pumpkin_bread", + recipe = "farming:pumpkin_dough", + cooktime = 10 +}) + +-- pumpkin definition +local def = { + drawtype = "plantlike", + tiles = {"farming_pumpkin_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:pumpkin_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_pumpkin_2.png"} +minetest.register_node("farming:pumpkin_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_pumpkin_3.png"} +minetest.register_node("farming:pumpkin_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_pumpkin_4.png"} +minetest.register_node("farming:pumpkin_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_pumpkin_5.png"} +minetest.register_node("farming:pumpkin_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_pumpkin_6.png"} +minetest.register_node("farming:pumpkin_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_pumpkin_7.png"} +minetest.register_node("farming:pumpkin_7", table.copy(def)) + +-- stage 8 (final) +minetest.register_node("farming:pumpkin_8", { + description = S("Pumpkin"), + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_bottom.png", + "farming_pumpkin_side.png" + }, + groups = { + food_pumpkin = 1, choppy = 2, oddly_breakable_by_hand = 1, + flammable = 2, plant = 1 + }, + drop = "farming:pumpkin_8", + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + on_place = minetest.rotate_node +}) + +minetest.register_alias("farming:pumpkin", "farming:pumpkin_8") + +-- add to registered_plants +farming.registered_plants["farming:pumpkin"] = { + crop = "farming:pumpkin", + seed = "farming:pumpkin_slice", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/raspberry.lua b/mods/farming/crops/raspberry.lua new file mode 100644 index 0000000..df1d3d9 --- /dev/null +++ b/mods/farming/crops/raspberry.lua @@ -0,0 +1,80 @@ + +local S = farming.intllib + +-- raspberries +minetest.register_craftitem("farming:raspberries", { + description = S("Raspberries"), + inventory_image = "farming_raspberries.png", + groups = {seed = 2, food_raspberries = 1, food_raspberry = 1, + food_berry = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") + end, + on_use = minetest.item_eat(1) +}) + +-- raspberry smoothie +minetest.register_craftitem("farming:smoothie_raspberry", { + description = S("Raspberry Smoothie"), + inventory_image = "farming_raspberry_smoothie.png", + on_use = minetest.item_eat(2, "vessels:drinking_glass"), + groups = {vessel = 1, drink = 1} +}) + +minetest.register_craft({ + output = "farming:smoothie_raspberry", + recipe = { + {"default:snow"}, + {"group:food_raspberries"}, + {"vessels:drinking_glass"} + } +}) + +-- raspberries definition +local def = { + drawtype = "plantlike", + tiles = {"farming_raspberry_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:raspberry_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_raspberry_2.png"} +minetest.register_node("farming:raspberry_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_raspberry_3.png"} +minetest.register_node("farming:raspberry_3", table.copy(def)) + +-- stage 4 (final) +def.tiles = {"farming_raspberry_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:raspberries 2"}, rarity = 1}, + {items = {"farming:raspberries"}, rarity = 2}, + {items = {"farming:raspberries"}, rarity = 3} + } +} +minetest.register_node("farming:raspberry_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:raspberries"] = { + crop = "farming:raspberry", + seed = "farming:raspberries", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 4 +} diff --git a/mods/farming/crops/rhubarb.lua b/mods/farming/crops/rhubarb.lua new file mode 100644 index 0000000..d0ac58a --- /dev/null +++ b/mods/farming/crops/rhubarb.lua @@ -0,0 +1,77 @@ + +local S = farming.intllib + +-- rhubarb +minetest.register_craftitem("farming:rhubarb", { + description = S("Rhubarb"), + inventory_image = "farming_rhubarb.png", + groups = {seed = 2, food_rhubarb = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") + end, + on_use = minetest.item_eat(1) +}) + +-- rhubarb pie +minetest.register_craftitem("farming:rhubarb_pie", { + description = S("Rhubarb Pie"), + inventory_image = "farming_rhubarb_pie.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + output = "farming:rhubarb_pie", + recipe = { + {"farming:baking_tray", "group:food_sugar", ""}, + {"group:food_rhubarb", "group:food_rhubarb", "group:food_rhubarb"}, + {"group:food_wheat", "group:food_wheat", "group:food_wheat"} + }, + replacements = {{"group:food_baking_tray", "farming:baking_tray"}} +}) + +-- rhubarb definition +local def = { + drawtype = "plantlike", + tiles = {"farming_rhubarb_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults(), + minlight = 10, + maxlight = 12 +} + +-- stage 1 +minetest.register_node("farming:rhubarb_1", table.copy(def)) + +-- stage2 +def.tiles = {"farming_rhubarb_2.png"} +minetest.register_node("farming:rhubarb_2", table.copy(def)) + +-- stage 3 (final) +def.tiles = {"farming_rhubarb_3.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:rhubarb 2"}, rarity = 1}, + {items = {"farming:rhubarb"}, rarity = 2}, + {items = {"farming:rhubarb"}, rarity = 3} + } +} +minetest.register_node("farming:rhubarb_3", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:rhubarb"] = { + crop = "farming:rhubarb", + seed = "farming:rhubarb", + minlight = 10, + maxlight = 12, + steps = 3 +} diff --git a/mods/farming/crops/rice.lua b/mods/farming/crops/rice.lua new file mode 100644 index 0000000..6b8e2be --- /dev/null +++ b/mods/farming/crops/rice.lua @@ -0,0 +1,139 @@ + +local S = farming.intllib + +-- rice +minetest.register_craftitem("farming:rice", { + description = S("Rice"), + inventory_image = "farming_rice.png", + groups = {seed = 2, food_rice = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:rice_1") + end +}) + +-- replacement for rice seeds that was removed +minetest.register_alias("farming:seed_rice", "farming:rice") + +minetest.register_craftitem("farming:rice_bread", { + description = S("Rice Bread"), + inventory_image = "farming_rice_bread.png", + on_use = minetest.item_eat(5), + groups = {food_rice_bread = 1, flammable = 2} +}) + +minetest.register_craftitem("farming:rice_flour", { + description = S("Rice Flour"), + inventory_image = "farming_rice_flour.png", + groups = {food_rice_flour = 1, flammable = 1} +}) + +minetest.register_craft({ + output = "farming:rice_flour", + recipe = { + {"farming:rice", "farming:rice", "farming:rice"}, + {"farming:rice", "farming:mortar_pestle", ""} + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:rice_bread", + recipe = "farming:rice_flour" +}) + +-- rice definition +local def = { + drawtype = "plantlike", + tiles = {"farming_rice_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 4, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:rice_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_rice_2.png"} +minetest.register_node("farming:rice_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_rice_3.png"} +minetest.register_node("farming:rice_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_rice_4.png"} +minetest.register_node("farming:rice_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_rice_5.png"} +def.drop = { + items = { + {items = {"farming:rice"}, rarity = 2} + } +} +minetest.register_node("farming:rice_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_rice_6.png"} +def.drop = { + items = { + {items = {"farming:rice"}, rarity = 2} + } +} +minetest.register_node("farming:rice_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_rice_7.png"} +def.drop = { + items = { + {items = {"farming:rice"}, rarity = 1}, + {items = {"farming:rice"}, rarity = 3} + } +} +minetest.register_node("farming:rice_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_rice_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:rice 2"}, rarity = 1}, + {items = {"farming:rice"}, rarity = 2} + } +} +minetest.register_node("farming:rice_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:rice"] = { + crop = "farming:rice", + seed = "farming:rice", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} + +-- fuels +minetest.register_craft({ + type = "fuel", + recipe = "farming:rice", + burntime = 1 +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:rice_bread", + burntime = 1 +}) diff --git a/mods/farming/crops/ryeoatrice.lua b/mods/farming/crops/ryeoatrice.lua new file mode 100644 index 0000000..ad2d5bc --- /dev/null +++ b/mods/farming/crops/ryeoatrice.lua @@ -0,0 +1,114 @@ + +local S = farming.intllib + +--= A nice addition from Ademant's grain mod :) + +-- Rye + +farming.register_plant("farming:rye", { + description = S("Rye seed"), + paramtype2 = "meshoptions", + inventory_image = "farming_rye_seed.png", + steps = 8, + place_param2 = 3 +}) + +minetest.override_item("farming:rye", { + description = S("Rye"), + groups = {food_rye = 1, flammable = 4} +}) + +minetest.override_item("farming:rye_1", {drop = {}}) +minetest.override_item("farming:rye_2", {drop = {}}) +minetest.override_item("farming:rye_3", {drop = {}}) + +minetest.register_craft({ + output = "farming:flour", + recipe = { + {"farming:rye", "farming:rye", "farming:rye"}, + {"farming:rye", "farming:mortar_pestle", ""} + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} +}) + +-- Oats + +farming.register_plant("farming:oat", { + description = S("Oat seed"), + paramtype2 = "meshoptions", + inventory_image = "farming_oat_seed.png", + steps = 8, + place_param2 = 3 +}) + +minetest.override_item("farming:oat", { + description = S("Oats"), + groups = {food_oats = 1, flammable = 4} +}) + +minetest.override_item("farming:oat_1", {drop = {}}) +minetest.override_item("farming:oat_2", {drop = {}}) +minetest.override_item("farming:oat_3", {drop = {}}) + +minetest.register_craft({ + output = "farming:flour", + recipe = { + {"farming:oat", "farming:oat", "farming:oat"}, + {"farming:oat", "farming:mortar_pestle", ""} + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} +}) + +-- Multigrain flour + +minetest.register_craftitem("farming:flour_multigrain", { + description = S("Multigrain Flour"), + inventory_image = "farming_flour_multigrain.png", + groups = {food_flour = 1, flammable = 1}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flour_multigrain", + recipe = { + "farming:wheat", "farming:barley", "farming:oat", + "farming:rye", "farming:mortar_pestle" + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} +}) + +-- Multigrain bread + +minetest.register_craftitem("farming:bread_multigrain", { + description = S("Multigrain Bread"), + inventory_image = "farming_bread_multigrain.png", + on_use = minetest.item_eat(7), + groups = {food_bread = 1, flammable = 2} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:bread_multigrain", + recipe = "farming:flour_multigrain" +}) + +-- Fuels + +minetest.register_craft({ + type = "fuel", + recipe = "farming:bread_multigrain", + burntime = 1 +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:rye", + burntime = 1 +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:oat", + burntime = 1 +}) diff --git a/mods/farming/crops/soy.lua b/mods/farming/crops/soy.lua new file mode 100644 index 0000000..e0ed093 --- /dev/null +++ b/mods/farming/crops/soy.lua @@ -0,0 +1,192 @@ + +local S = farming.intllib + +-- soy pod +minetest.register_craftitem("farming:soy_pod", { + description = S("Soy Pod"), + inventory_image = "farming_soy_pod.png", + groups = {seed = 2, food_soy = 1, food_soy_pod = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:soy_1") + end +}) + +-- replacement for soy beans that was removed +minetest.register_alias("farming:soy_beans", "farming:soy_pod") + +-- soy sauce +minetest.register_node("farming:soy_sauce", { + description = S("Soy Sauce"), + drawtype = "plantlike", + tiles = {"farming_soy_sauce.png"}, + inventory_image = "farming_soy_sauce.png", + wield_image = "farming_soy_sauce.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + groups = { + vessel = 1, food_soy_sauce = 1, dig_immediate = 3, attached_node = 1 + }, + sounds = default.node_sound_glass_defaults() +}) + +-- soy sauce recipe +minetest.register_craft( { + output = "farming:soy_sauce", + recipe = { + {"group:food_soy", "group:food_salt", "group:food_soy"}, + {"", "group:food_juicer", ""}, + {"", "bucket:bucket_water", "vessels:glass_bottle"} + }, + replacements = { + {"bucket:bucket_water", "bucket:bucket_empty"}, + {"group:food_juicer", "farming:juicer"} + } +}) + +-- soy milk +minetest.register_node("farming:soy_milk", { + description = S("Soy Milk"), + drawtype = "plantlike", + tiles = {"farming_soy_milk_glass.png"}, + inventory_image = "farming_soy_milk_glass.png", + wield_image = "farming_soy_milk_glass.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + on_use = minetest.item_eat(2, "vessels:drinking_glass"), + groups = { + vessel = 1, food_milk_glass = 1, dig_immediate = 3, + attached_node = 1, drink = 1 + }, + sounds = default.node_sound_glass_defaults() +}) + +minetest.register_craft( { + output = "farming:soy_milk", + recipe = { + {"group:food_soy", "group:food_soy", "group:food_soy"}, + {"farming:vanilla_extract", "bucket:bucket_water", "vessels:drinking_glass"} + }, + replacements = { + {"bucket:bucket_water", "bucket:bucket_empty"}, + {"farming:vanilla_extract", "vessels:glass_bottle"} + } +}) + +-- tofu +minetest.register_craftitem("farming:tofu", { + description = S("Tofu"), + inventory_image = "farming_tofu.png", + groups = {food_tofu = 1, food_meat_raw = 1, flammable = 2}, + on_use = minetest.item_eat(3) +}) + +minetest.register_craft({ + output = "farming:tofu", + recipe = { + {"farming:baking_tray", "group:food_soy", "group:food_soy"}, + {"group:food_soy", "group:food_soy", "group:food_soy"} + }, + replacements = {{"farming:baking_tray", "farming:baking_tray"}} +}) + +-- cooked tofu +minetest.register_craftitem("farming:tofu_cooked", { + description = S("Cooked Tofu"), + inventory_image = "farming_tofu_cooked.png", + groups = {food_meat = 1, flammable = 2}, + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + type = "cooking", + output = "farming:tofu_cooked", + recipe = "farming:tofu", + cooktime = 5 +}) + +-- crop definition + +local def = { + drawtype = "plantlike", + tiles = {"farming_soy_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:soy_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_soy_2.png"} +minetest.register_node("farming:soy_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_soy_3.png"} +minetest.register_node("farming:soy_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_soy_4.png"} +minetest.register_node("farming:soy_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_soy_5.png"} +def.drop = { + max_items = 1, items = { + {items = {"farming:soy_pod"}, rarity = 1}, + } +} +minetest.register_node("farming:soy_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_soy_6.png"} +def.drop = { + max_items = 3, items = { + {items = {"farming:soy_pod"}, rarity = 1}, + {items = {"farming:soy_pod"}, rarity = 2}, + {items = {"farming:soy_pod"}, rarity = 3} + } +} +minetest.register_node("farming:soy_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_soy_7.png"} +def.groups.growing = nil +def.drop = { + max_items = 5, items = { + {items = {"farming:soy_pod"}, rarity = 1}, + {items = {"farming:soy_pod"}, rarity = 2}, + {items = {"farming:soy_pod"}, rarity = 3}, + {items = {"farming:soy_pod"}, rarity = 4}, + {items = {"farming:soy_pod"}, rarity = 5} + } +} +minetest.register_node("farming:soy_7", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:soy_pod"] = { + crop = "farming:soy", + seed = "farming:soy_pod", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 7 +} diff --git a/mods/farming/crops/sunflower.lua b/mods/farming/crops/sunflower.lua new file mode 100644 index 0000000..1a45054 --- /dev/null +++ b/mods/farming/crops/sunflower.lua @@ -0,0 +1,155 @@ +local S = farming.intllib + +-- sunflower +minetest.register_craftitem("farming:sunflower", { + description = S("Sunflower"), + inventory_image = "farming_sunflower.png", + groups = {flammable = 2} +}) + +-- sunflower seeds +minetest.register_craftitem("farming:seed_sunflower", { + description = S("Sunflower Seeds"), + inventory_image = "farming_sunflower_seeds.png", + groups = {seed = 2, food_sunflower_seeds = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:sunflower_1") + end +}) + +minetest.register_alias("farming:sunflower_seeds", "farming:seed_sunflower") + +minetest.register_craft({ + output = "farming:seed_sunflower 5", + recipe = {{"farming:sunflower"}} +}) + +-- sunflower seeds (toasted) +minetest.register_craftitem("farming:sunflower_seeds_toasted", { + description = S("Toasted Sunflower Seeds"), + inventory_image = "farming_sunflower_seeds_toasted.png", + groups = {food_sunflower_seeds_toasted = 1, flammable = 2}, + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 10, + output = "farming:sunflower_seeds_toasted", + recipe = "farming:seed_sunflower" +}) + +-- sunflower oil +minetest.register_node("farming:sunflower_oil", { + description = S("Bottle of Sunflower Oil"), + drawtype = "plantlike", + tiles = {"farming_sunflower_oil.png"}, + inventory_image = "farming_sunflower_oil.png", + wield_image = "farming_sunflower_oil.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 = { + food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1, + flammable = 2 + }, + sounds = default.node_sound_glass_defaults() +}) + +minetest.register_craft( { + output = "farming:sunflower_oil", + recipe = { + {"group:food_sunflower_seeds", "group:food_sunflower_seeds", "group:food_sunflower_seeds"}, + {"group:food_sunflower_seeds", "group:food_sunflower_seeds", "group:food_sunflower_seeds"}, + {"group:food_sunflower_seeds", "vessels:glass_bottle", "group:food_sunflower_seeds"} + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:sunflower_oil", + burntime = 30, + replacements = {{"farming:sunflower_oil", "vessels:glass_bottle"}} +}) + +-- sunflower seed bread +minetest.register_craftitem("farming:sunflower_bread", { + description = S("Sunflower Seed Bread"), + inventory_image = "farming_sunflower_bread.png", + on_use = minetest.item_eat(8), + groups = {food_bread = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:sunflower_bread", + recipe = {{"group:food_sunflower_seeds_toasted", "group:food_bread", "group:food_sunflower_seeds_toasted"}} +}) + +-- sunflower definition +local def = { + drawtype = "plantlike", + tiles = {"farming_sunflower_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:sunflower_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_sunflower_2.png"} +minetest.register_node("farming:sunflower_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_sunflower_3.png"} +minetest.register_node("farming:sunflower_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_sunflower_4.png"} +minetest.register_node("farming:sunflower_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_sunflower_5.png"} +minetest.register_node("farming:sunflower_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_sunflower_6.png"} +def.visual_scale = 1.9 +minetest.register_node("farming:sunflower_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_sunflower_7.png"} +minetest.register_node("farming:sunflower_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_sunflower_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:sunflower"}, rarity = 1}, + {items = {"farming:sunflower"}, rarity = 6} + } +} +minetest.register_node("farming:sunflower_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:sunflower"] = { + crop = "farming:sunflower", + seed = "farming:seed_sunflower", + minlight = 14, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/tomato.lua b/mods/farming/crops/tomato.lua new file mode 100644 index 0000000..6eff7c6 --- /dev/null +++ b/mods/farming/crops/tomato.lua @@ -0,0 +1,106 @@ + +--[[ + Textures edited from: + http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9) +]] + +local S = farming.intllib + +-- tomato +minetest.register_craftitem("farming:tomato", { + description = S("Tomato"), + inventory_image = "farming_tomato.png", + groups = {seed = 2, food_tomato = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1") + end, + on_use = minetest.item_eat(4) +}) + +-- tomato soup +minetest.register_craftitem("farming:tomato_soup", { + description = S("Tomato Soup"), + inventory_image = "farming_tomato_soup.png", + groups = {flammable = 2}, + on_use = minetest.item_eat(8, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:tomato_soup", + recipe = { + {"group:food_tomato"}, + {"group:food_tomato"}, + {"group:food_bowl"} + } +}) + +-- tomato definition +local def = { + drawtype = "plantlike", + tiles = {"farming_tomato_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:tomato_1", table.copy(def)) + +-- stage2 +def.tiles = {"farming_tomato_2.png"} +minetest.register_node("farming:tomato_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_tomato_3.png"} +minetest.register_node("farming:tomato_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_tomato_4.png"} +minetest.register_node("farming:tomato_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_tomato_5.png"} +minetest.register_node("farming:tomato_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_tomato_6.png"} +minetest.register_node("farming:tomato_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_tomato_7.png"} +def.drop = { + items = { + {items = {"farming:tomato"}, rarity = 1}, + {items = {"farming:tomato"}, rarity = 3} + } +} +minetest.register_node("farming:tomato_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_tomato_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:tomato 3"}, rarity = 1}, + {items = {"farming:tomato 2"}, rarity = 2}, + {items = {"farming:tomato 1"}, rarity = 3} + } +} +minetest.register_node("farming:tomato_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:tomato"] = { + crop = "farming:tomato", + seed = "farming:tomato", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/vanilla.lua b/mods/farming/crops/vanilla.lua new file mode 100644 index 0000000..f014a8d --- /dev/null +++ b/mods/farming/crops/vanilla.lua @@ -0,0 +1,122 @@ +local S = farming.intllib + +-- vanilla +minetest.register_craftitem("farming:vanilla", { + description = S("Vanilla"), + inventory_image = "farming_vanilla.png", + groups = {seed = 2, food_vanilla = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1") + end, + on_use = minetest.item_eat(1) +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"farming_vanilla_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- vanilla extract +minetest.register_node("farming:vanilla_extract", { + description = S("Vanilla Extract"), + drawtype = "plantlike", + tiles = {"farming_vanilla_extract.png"}, + inventory_image = "farming_vanilla_extract.png", + wield_image = "farming_vanilla_extract.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 = "farming:vanilla_extract", + recipe = { + {"group:food_vanilla", "group:food_vanilla", "group:food_vanilla"}, + {"group:food_vanilla", "farming:bottle_ethanol", "group:food_water_glass"}, + }, + replacements = { + {"group:food_water_glass", "vessels:drinking_glass"} + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:vanilla_extract", + burntime = 25, + replacements = {{"farming:vanilla_extract", "vessels:glass_bottle"}} +}) + +-- stage 1 +minetest.register_node("farming:vanilla_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_vanilla_2.png"} +minetest.register_node("farming:vanilla_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_vanilla_3.png"} +minetest.register_node("farming:vanilla_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_vanilla_4.png"} +minetest.register_node("farming:vanilla_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_vanilla_5.png"} +minetest.register_node("farming:vanilla_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_vanilla_6.png"} +def.visual_scale = 1.9 +minetest.register_node("farming:vanilla_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_vanilla_7.png"} +def.drop = { + items = { + {items = {"farming:vanilla"}, rarity = 1}, + {items = {"farming:vanilla"}, rarity = 2}, + {items = {"farming:vanilla"}, rarity = 3} + } +} +minetest.register_node("farming:vanilla_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_vanilla_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:vanilla 2"}, rarity = 1}, + {items = {"farming:vanilla 2"}, rarity = 2}, + {items = {"farming:vanilla 2"}, rarity = 2}, + {items = {"farming:vanilla 2"}, rarity = 3} + } +} +minetest.register_node("farming:vanilla_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:vanilla"] = { + crop = "farming:vanilla", + seed = "farming:vanilla", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} diff --git a/mods/farming/crops/wheat.lua b/mods/farming/crops/wheat.lua new file mode 100644 index 0000000..1a7de8a --- /dev/null +++ b/mods/farming/crops/wheat.lua @@ -0,0 +1,249 @@ + +local S = farming.intllib + +-- wheat seeds +minetest.register_node("farming:seed_wheat", { + description = S("Wheat Seed"), + tiles = {"farming_wheat_seed.png"}, + inventory_image = "farming_wheat_seed.png", + wield_image = "farming_wheat_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:wheat_1") + end +}) + +-- harvested wheat +minetest.register_craftitem("farming:wheat", { + description = S("Wheat"), + inventory_image = "farming_wheat.png", + groups = {food_wheat = 1, flammable = 4} +}) + +-- straw +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() +}) + +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"}} +}) + +-- check and register stairs +if minetest.global_exists("stairs") then + + if stairs.mod and stairs.mod == "redo" then + + stairs.register_all("straw", "farming:straw", + {snappy = 3, flammable = 4}, + {"farming_straw.png"}, + "Straw", + default.node_sound_leaves_defaults()) + else + + stairs.register_stair_and_slab("straw", "farming:straw", + {snappy = 3, flammable = 4}, + {"farming_straw.png"}, + "Straw Stair", + "Straw Slab", + default.node_sound_leaves_defaults()) + end +end + +-- flour +minetest.register_craftitem("farming:flour", { + description = S("Flour"), + inventory_image = "farming_flour.png", + groups = {food_flour = 1, flammable = 1} +}) + +minetest.register_craft({ + output = "farming:flour", + recipe = { + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:mortar_pestle", ""} + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} +}) + +-- bread +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 = "cooking", + cooktime = 15, + output = "farming:bread", + recipe = "farming:flour" +}) + +-- sliced bread +minetest.register_craftitem("farming:bread_slice", { + description = S("Sliced Bread"), + inventory_image = "farming_bread_slice.png", + on_use = minetest.item_eat(1), + groups = {food_bread_slice = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:bread_slice 5", + recipe = {{"group:food_cutting_board", "farming:bread"}}, + replacements = {{"group:food_cutting_board", "farming:cutting_board"}} +}) + +-- toast +minetest.register_craftitem("farming:toast", { + description = S("Toast"), + inventory_image = "farming_toast.png", + on_use = minetest.item_eat(1), + groups = {food_toast = 1, flammable = 2} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 3, + output = "farming:toast", + recipe = "farming:bread_slice" +}) + +-- toast sandwich +minetest.register_craftitem("farming:toast_sandwich", { + description = S("Toast Sandwich"), + inventory_image = "farming_toast_sandwich.png", + on_use = minetest.item_eat(4), + groups = {flammable = 2} +}) + +minetest.register_craft({ + output = "farming:toast_sandwich", + recipe = { + {"farming:bread_slice"}, + {"farming:toast"}, + {"farming:bread_slice"} + } +}) + +-- wheat definition +local def = { + drawtype = "plantlike", + tiles = {"farming_wheat_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 4, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:wheat_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_wheat_2.png"} +minetest.register_node("farming:wheat_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_wheat_3.png"} +minetest.register_node("farming:wheat_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_wheat_4.png"} +minetest.register_node("farming:wheat_4", table.copy(def)) + +-- stage 5 +def.tiles = {"farming_wheat_5.png"} +def.drop = { + items = { + {items = {"farming:wheat"}, rarity = 2}, + {items = {"farming:seed_wheat"}, rarity = 2} + } +} +minetest.register_node("farming:wheat_5", table.copy(def)) + +-- stage 6 +def.tiles = {"farming_wheat_6.png"} +def.drop = { + items = { + {items = {"farming:wheat"}, rarity = 2}, + {items = {"farming:seed_wheat"}, rarity = 1} + } +} +minetest.register_node("farming:wheat_6", table.copy(def)) + +-- stage 7 +def.tiles = {"farming_wheat_7.png"} +def.drop = { + items = { + {items = {"farming:wheat"}, rarity = 1}, + {items = {"farming:wheat"}, rarity = 3}, + {items = {"farming:seed_wheat"}, rarity = 1}, + {items = {"farming:seed_wheat"}, rarity = 3} + } +} +minetest.register_node("farming:wheat_7", table.copy(def)) + +-- stage 8 (final) +def.tiles = {"farming_wheat_8.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:wheat"}, rarity = 1}, + {items = {"farming:wheat"}, rarity = 3}, + {items = {"farming:seed_wheat"}, rarity = 1}, + {items = {"farming:seed_wheat"}, rarity = 3} + } +} +minetest.register_node("farming:wheat_8", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:wheat"] = { + crop = "farming:wheat", + seed = "farming:seed_wheat", + minlight = farming.min_light, + maxlight = farming.max_light, + steps = 8 +} + +-- fuels +minetest.register_craft({ + type = "fuel", + recipe = "farming:straw", + burntime = 3 +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:wheat", + burntime = 1 +}) diff --git a/mods/farming/depends.txt b/mods/farming/depends.txt new file mode 100644 index 0000000..650885b --- /dev/null +++ b/mods/farming/depends.txt @@ -0,0 +1,5 @@ +default +stairs? +intllib? +lucky_block? +toolranks? diff --git a/mods/farming/description.txt b/mods/farming/description.txt new file mode 100644 index 0000000..58bdc81 --- /dev/null +++ b/mods/farming/description.txt @@ -0,0 +1 @@ +Adds many plants and food to Minetest \ No newline at end of file diff --git a/mods/farming/farming.conf_example b/mods/farming/farming.conf_example new file mode 100644 index 0000000..7f103cd --- /dev/null +++ b/mods/farming/farming.conf_example @@ -0,0 +1,49 @@ + +--[[ + Farming settings can be changed here and kept inside mod folder + even after the mod has been updated, or you can place inside + world folder for map specific settings. +--]] + +-- true to enable crop/food in-game and on mapgen set spawn rarety +farming.carrot = 0.001 +farming.potato = 0.001 +farming.tomato = 0.001 +farming.cucumber = 0.001 +farming.corn = 0.001 +farming.coffee = 0.001 +farming.melon = 0.001 +farming.pumpkin = 0.001 +farming.cocoa = true -- true or false only +farming.raspberry = 0.001 +farming.blueberry = 0.001 +farming.rhubarb = 0.001 +farming.beans = 0.001 +farming.grapes = 0.001 +farming.barley = true -- true or false only +farming.chili = 0.003 +farming.hemp = 0.003 +farming.garlic = 0.001 +farming.onion = 0.001 +farming.pepper = 0.002 +farming.pineapple = 0.001 +farming.peas = 0.001 +farming.beetroot = 0.001 +farming.mint = 0.005 +farming.cabbage = 0.001 +farming.blackberry = 0.002 +farming.lettuce = 0.001 +farming.soy = 0.001 +farming.vanilla = 0.001 +farming.artichoke = 0.001 +farming.parsley = 0.002 +farming.sunflower = 0.001 +farming.grains = true -- true or false only +farming.rice = true + +-- default rarety of crops on map (higher number = more crops) +farming.rarety = 0.002 + +-- default minimum and maximum light levels crops need to grow +farming.min_light = 12 +farming.max_light = 15 diff --git a/mods/farming/food.lua b/mods/farming/food.lua new file mode 100644 index 0000000..8665625 --- /dev/null +++ b/mods/farming/food.lua @@ -0,0 +1,689 @@ + +local S = farming.intllib + +--= filter sea water into river water +minetest.register_craft({ + output = "bucket:bucket_river_water", + recipe = { + {"farming:hemp_fibre"}, + {"farming:hemp_fibre"}, + {"bucket:bucket_water"} + } +}) + +--= glass of water + +minetest.register_craftitem("farming:glass_water", { + description = S("Glass of Water"), + inventory_image = "farming_water_glass.png", + groups = {food_water_glass = 1, flammable = 3, vessel = 1} +}) + +minetest.register_craft({ + output = "farming:glass_water 4", + recipe = { + {"vessels:drinking_glass", "vessels:drinking_glass"}, + {"vessels:drinking_glass", "vessels:drinking_glass"}, + {"bucket:bucket_river_water", ""} + }, + replacements = {{"bucket:bucket_river_water", "bucket:bucket_empty"}} +}) + +minetest.register_craft({ + output = "farming:glass_water 4", + recipe = { + {"vessels:drinking_glass", "vessels:drinking_glass"}, + {"vessels:drinking_glass", "vessels:drinking_glass"}, + {"bucket:bucket_water", "farming:hemp_fibre"} + }, + replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}} +}) + +if minetest.get_modpath("bucket_wooden") then + + minetest.register_craft({ + output = "farming:glass_water 4", + recipe = { + {"vessels:drinking_glass", "vessels:drinking_glass"}, + {"vessels:drinking_glass", "vessels:drinking_glass"}, + {"group:water_bucket_wooden", "farming:hemp_fibre"} + }, + replacements = {{"group:water_bucket_wooden", "bucket_wooden:bucket_empty"}} + }) +end + +--= Sugar + +minetest.register_craftitem("farming:sugar", { + description = S("Sugar"), + inventory_image = "farming_sugar.png", + groups = {food_sugar = 1, flammable = 3} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 3, + output = "farming:sugar 2", + recipe = "default:papyrus" +}) + +--= Sugar caramel + +minetest.register_craftitem("farming:caramel", { + description = S("Caramel"), + inventory_image = "farming_caramel.png", +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 6, + output = "farming:caramel", + recipe = "group:food_sugar", +}) + +--= Salt + +minetest.register_node("farming:salt", { + description = S("Salt"), + inventory_image = "farming_salt.png", + wield_image = "farming_salt.png", + drawtype = "plantlike", + visual_scale = 0.8, + paramtype = "light", + tiles = {"farming_salt.png"}, + groups = {food_salt = 1, vessel = 1, dig_immediate = 3, + attached_node = 1}, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + -- special function to make salt crystals form inside water + dropped_step = function(self, pos, dtime) + + self.ctimer = (self.ctimer or 0) + dtime + if self.ctimer < 15.0 then return end + self.ctimer = 0 + + local needed + + if self.node_inside + and self.node_inside.name == "default:water_source" then + needed = 8 + + elseif self.node_inside + and self.node_inside.name == "default:river_water_source" then + needed = 9 + end + + if not needed then return end + + local objs = core.get_objects_inside_radius(pos, 0.5) + + if not objs or #objs ~= 1 then return end + + local salt, ent = nil, nil + + for k, obj in pairs(objs) do + + ent = obj:get_luaentity() + + if ent and ent.name == "__builtin:item" + and ent.itemstring == "farming:salt " .. needed then + + obj:remove() + + core.add_item(pos, "farming:salt_crystal") + + return false -- return with no further action + end + end + end +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:salt", + recipe = "bucket:bucket_water", + replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}} +}) + +--= Salt Crystal + +minetest.register_node("farming:salt_crystal", { + description = ("Salt crystal"), + inventory_image = "farming_salt_crystal.png", + wield_image = "farming_salt_crystal.png", + drawtype = "plantlike", + visual_scale = 0.8, + paramtype = "light", + light_source = 1, + tiles = {"farming_salt_crystal.png"}, + groups = { dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, +}) +minetest.register_craft({ + output = "farming:salt 9", + recipe = { + {"farming:salt_crystal", "farming:mortar_pestle"} + }, + replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}} +}) + +minetest.register_craft({ + output = "farming:salt_crystal", + recipe = { + {"farming:salt", "farming:salt", "farming:salt"}, + {"farming:salt", "farming:salt", "farming:salt"}, + {"farming:salt", "farming:salt", "farming:salt"} + } +}) + +--= Rose Water + +minetest.register_node("farming:rose_water", { + description = S("Rose Water"), + inventory_image = "farming_rose_water.png", + wield_image = "farming_rose_water.png", + drawtype = "plantlike", + visual_scale = 0.8, + paramtype = "light", + tiles = {"farming_rose_water.png"}, + groups = {food_rose_water = 1, vessel = 1, dig_immediate = 3, + attached_node = 1}, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + } +}) + +minetest.register_craft({ + output = "farming:rose_water", + recipe = { + {"flowers:rose", "flowers:rose", "flowers:rose"}, + {"flowers:rose", "flowers:rose", "flowers:rose"}, + {"group:food_water_glass", "group:food_pot", "vessels:glass_bottle"} + }, + replacements = { + {"group:food_water_glass", "vessels:drinking_glass"}, + {"group:food_pot", "farming:pot"} + } +}) + +--= Turkish Delight + +minetest.register_craftitem("farming:turkish_delight", { + description = S("Turkish Delight"), + inventory_image = "farming_turkish_delight.png", + groups = {flammable = 3}, + on_use = minetest.item_eat(2) +}) + +minetest.register_craft({ + output = "farming:turkish_delight 4", + recipe = { + {"group:food_gelatin", "group:food_sugar", "group:food_gelatin"}, + {"group:food_sugar", "group:food_rose_water", "group:food_sugar"}, + {"group:food_sugar", "dye:pink", "group:food_sugar"} + }, + replacements = { + {"group:food_cornstarch", "farming:bowl"}, + {"group:food_rose_water", "vessels:glass_bottle"} + } +}) + +--= Garlic Bread + +minetest.register_craftitem("farming:garlic_bread", { + description = S("Garlic Bread"), + inventory_image = "farming_garlic_bread.png", + groups = {flammable = 3}, + on_use = minetest.item_eat(2) +}) + +minetest.register_craft({ + output = "farming:garlic_bread", + recipe = { + {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"} + } +}) + +--= Donuts (thanks to Bockwurst for making the donut images) + +minetest.register_craftitem("farming:donut", { + description = S("Donut"), + inventory_image = "farming_donut.png", + on_use = minetest.item_eat(4) +}) + +minetest.register_craft({ + output = "farming:donut 3", + recipe = { + {"", "group:food_wheat", ""}, + {"group:food_wheat", "group:food_sugar", "group:food_wheat"}, + {"", "group:food_wheat", ""} + } +}) + +minetest.register_craftitem("farming:donut_chocolate", { + description = S("Chocolate Donut"), + inventory_image = "farming_donut_chocolate.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + output = "farming:donut_chocolate", + recipe = { + {"group:food_cocoa"}, + {"farming:donut"} + } +}) + +minetest.register_craftitem("farming:donut_apple", { + description = S("Apple Donut"), + inventory_image = "farming_donut_apple.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + output = "farming:donut_apple", + recipe = { + {"default:apple"}, + {"farming:donut"} + } +}) + +--= Porridge Oats + +minetest.register_craftitem("farming:porridge", { + description = S("Porridge"), + inventory_image = "farming_porridge.png", + on_use = minetest.item_eat(6, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:porridge", + recipe = { + {"group:food_oats", "group:food_oats", "group:food_oats"}, + {"group:food_oats", "group:food_bowl", "group:food_milk_glass"} + }, + replacements = { + {"mobs:glass_milk", "vessels:drinking_glass"}, + {"farming:soy_milk", "vessels:drinking_glass"} + } +}) + +--= Jaffa Cake + +minetest.register_craftitem("farming:jaffa_cake", { + description = S("Jaffa Cake"), + inventory_image = "farming_jaffa_cake.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + output = "farming:jaffa_cake", + recipe = { + {"farming:baking_tray", "group:food_egg", "group:food_sugar"}, + {"group:food_flour", "group:food_cocoa", "group:food_orange"}, + {"group:food_milk", "", ""} + }, + replacements = { + {"farming:baking_tray", "farming:baking_tray"}, + {"mobs:bucket_milk", "bucket:bucket_empty"}, + {"farming:soy_milk", "vessels:drining_glass"} + } +}) + +-- Apple Pie + +minetest.register_craftitem("farming:apple_pie", { + description = S("Apple Pie"), + inventory_image = "farming_apple_pie.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + output = "farming:apple_pie", + recipe = { + {"group:food_flour", "group:food_sugar", "group:food_apple"}, + {"", "group:food_baking_tray", ""} + }, + replacements = {{"group:food_baking_tray", "farming:baking_tray"}} +}) + +-- Cactus Juice + +minetest.register_craftitem("farming:cactus_juice", { + description = S("Cactus Juice"), + inventory_image = "farming_cactus_juice.png", + groups = {vessel = 1, drink = 1}, + on_use = function(itemstack, user, pointed_thing) + if user then + if math.random(5) == 1 then + return minetest.do_item_eat(-1, "vessels:drinking_glass", + itemstack, user, pointed_thing) + else + return minetest.do_item_eat(2, "vessels:drinking_glass", + itemstack, user, pointed_thing) + end + end + end +}) + +minetest.register_craft({ + output = "farming:cactus_juice", + recipe = { + {"default:cactus"}, + {"farming:juicer"}, + {"vessels:drinking_glass"} + }, + replacements = { + {"group:food_juicer", "farming:juicer"} + } +}) + +-- Pasta + +minetest.register_craftitem("farming:pasta", { + description = S("Pasta"), + inventory_image = "farming_pasta.png", + groups = {food_pasta = 1} +}) + +minetest.register_craft({ + output = "farming:pasta", + recipe = { + {"group:food_flour", "group:food_butter", "group:food_mixing_bowl"} + }, + replacements = {{"group:food_mixing_bowl", "farming:mixing_bowl"}} +}) + +minetest.register_craft({ + output = "farming:pasta", + recipe = { + {"group:food_flour", "group:food_oil", "group:food_mixing_bowl"} + }, + replacements = { + {"group:food_mixing_bowl", "farming:mixing_bowl"}, + {"group:food_oil", "vessels:glass_bottle"} + } +}) + +-- Spaghetti + +minetest.register_craftitem("farming:spaghetti", { + description = S("Spaghetti"), + inventory_image = "farming_spaghetti.png", + on_use = minetest.item_eat(8) +}) + +minetest.register_craft({ + output = "farming:spaghetti", + recipe = { + {"group:food_pasta", "group:food_saucepan", "group:food_tomato"}, + {"group:food_garlic_clove", "group:food_garlic_clove", ""} + }, + replacements = {{"group:food_saucepan", "farming:saucepan"}} +}) + +-- Korean Bibimbap + +minetest.register_craftitem("farming:bibimbap", { + description = S("Bibimbap"), + inventory_image = "farming_bibimbap.png", + on_use = minetest.item_eat(8, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:bibimbap", + recipe = { + {"group:food_skillet", "group:food_bowl", "group:food_egg"}, + {"group:food_rice", "group:food_chicken_raw", "group:food_cabbage"}, + {"group:food_carrot", "group:food_chili_pepper", ""} + }, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +minetest.register_craft({ + output = "farming:bibimbap", + type = "shapeless", + recipe = { + "group:food_skillet", "group:food_bowl", "group:food_mushroom", + "group:food_rice", "group:food_cabbage", "group:food_carrot", + "group:food_mushroom", "group:food_chili_pepper" + }, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +-- Burger + +minetest.register_craftitem("farming:burger", { + description = S("Burger"), + inventory_image = "farming_burger.png", + on_use = minetest.item_eat(16), +}) + +minetest.register_craft({ + output = "farming:burger", + recipe = { + {"farming:bread", "group:food_meat", "group:food_cheese"}, + {"group:food_tomato", "group:food_cucumber", "group:food_onion"}, + {"group:food_lettuce", "", ""} + } +}) + +-- Salad + +minetest.register_craftitem("farming:salad", { + description = S("Salad"), + inventory_image = "farming_salad.png", + on_use = minetest.item_eat(8, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:salad", + type = "shapeless", + recipe = { + "group:food_bowl", "group:food_tomato", "group:food_cucumber", + "group:food_lettuce", "group:food_oil" + } +}) + +-- Triple Berry Smoothie + +minetest.register_craftitem("farming:smoothie_berry", { + description = S("Triple Berry Smoothie"), + inventory_image = "farming_berry_smoothie.png", + on_use = minetest.item_eat(6, "vessels:drinking_glass"), + groups = {vessel = 1, drink = 1} +}) + +minetest.register_craft({ + output = "farming:smoothie_berry", + type = "shapeless", + recipe = { + "group:food_raspberries", "group:food_blackberries", + "group:food_strawberry", "group:food_banana", + "vessels:drinking_glass" + } +}) + +-- Patatas a la importancia + +minetest.register_craftitem("farming:spanish_potatoes", { + description = S("Spanish Potatoes"), + inventory_image = "farming_spanish_potatoes.png", + on_use = minetest.item_eat(8, "farming:bowl"), +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:spanish_potatoes", + recipe = { + "farming:potato", "group:food_parsley", "farming:potato", + "group:food_egg", "group:food_flour", "farming:onion", + "farming:garlic_clove", "group:food_bowl", "group:food_skillet" + }, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +-- Potato omelet + +minetest.register_craftitem("farming:potato_omelet", { + description = S("Potato omelet"), + inventory_image = "farming_potato_omelet.png", + on_use = minetest.item_eat(6, "farming:bowl") +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:potato_omelet", + recipe = { + "group:food_egg", "farming:potato", "group:food_onion", + "group:food_skillet", "group:food_bowl"}, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +-- Paella + +minetest.register_craftitem("farming:paella", { + description = S("Paella"), + inventory_image = "farming_paella.png", + on_use = minetest.item_eat(8, "farming:bowl") +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:paella", + recipe = { + "group:food_rice", "dye:orange", "farming:pepper_red", + "group:food_peas", "group:food_chicken", "group:food_bowl", "group:food_skillet" + }, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +-- Flan + +minetest.register_craftitem("farming:flan", { + description = S("Vanilla Flan"), + inventory_image = "farming_vanilla_flan.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + output = "farming:flan", + recipe = { + {"group:food_sugar", "group:food_milk", "farming:caramel"}, + {"group:food_egg", "group:food_egg", "farming:vanilla_extract"} + }, + replacements = { + {"cucina_vegana:soy_milk", "vessels:drinking_glass"}, + {"group:food_milk", "bucket:bucket_empty"}, + {"farming:vanilla_extract", "vessels:glass_bottle"} + } +}) + +-- Vegan Cheese + +minetest.register_craftitem("farming:cheese_vegan", { + description = S("Vegan Cheese"), + inventory_image = "farming_cheese_vegan.png", + on_use = minetest.item_eat(2), + groups = {food_cheese = 1, flammable = 2} +}) + + +minetest.register_craft({ + output = "farming:cheese_vegan", + recipe = { + {"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"}, + {"group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol"}, + {"group:food_gelatin", "group:food_pot", ""} + }, + replacements = { + {"farming:soy_milk", "vessels:drinking_glass 3"}, + {"farming:pot", "farming:pot"}, + {"farming:bottle_ethanol", "vessels:glass_bottle"} + } +}) + +minetest.register_craft({ + output = "farming:cheese_vegan", + recipe = { + {"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"}, + {"group:food_salt", "group:food_peppercorn", "group:food_lemon"}, + {"group:food_gelatin", "group:food_pot", ""} + }, + replacements = { + {"farming:soy_milk", "vessels:drinking_glass 3"}, + {"farming:pot", "farming:pot"} + } +}) + +-- Onigiri + +minetest.register_craftitem("farming:onigiri", { + description = S("Onirigi"), + inventory_image = "farming_onigiri.png", + on_use = minetest.item_eat(2), + groups = {flammable = 2} +}) + +minetest.register_craft({ + output = "farming:onigiri", + recipe = { + {"group:food_rice", "group:food_salt", "group:food_rice"}, + {"", "group:food_seaweed", ""} + } +}) + +-- Gyoza + +minetest.register_craftitem("farming:gyoza", { + description = S("Gyoza"), + inventory_image = "farming_gyoza.png", + on_use = minetest.item_eat(4), + groups = {flammable = 2} +}) + +minetest.register_craft({ + output = "farming:gyoza 4", + recipe = { + {"group:food_cabbage", "group:food_garlic_clove", "group:food_onion"}, + {"group:food_meat_raw", "group:food_salt", "group:food_flour"}, + {"", "group:food_skillet", ""} + + }, + replacements = { + {"group:food_skillet", "farming:skillet"} + } +}) + +-- Mochi + +minetest.register_craftitem("farming:mochi", { + description = S("Mochi"), + inventory_image = "farming_mochi.png", + on_use = minetest.item_eat(3), + groups = {flammable = 2} +}) + +minetest.register_craft({ + output = "farming:mochi", + recipe = { + {"group:food_rice", "group:food_sugar", "group:food_rice"}, + {"", "group:food_mortar_pestle", ""}, + {"", "farming:glass_water", ""} + }, + replacements = { + {"group:food_mortar_pestle", "farming:mortar_pestle"}, + {"farming:glass_water", "vessels:drinking_glass"} + } +}) diff --git a/mods/farming/grass.lua b/mods/farming/grass.lua new file mode 100644 index 0000000..a52ace9 --- /dev/null +++ b/mods/farming/grass.lua @@ -0,0 +1,46 @@ + +for i = 4, 5 do + + -- Override default grass and have it drop Wheat and Oat Seeds + + minetest.override_item("default:grass_" .. i, { + drop = { + max_items = 1, + items = { + {items = {"farming:seed_wheat"}, rarity = 5}, + {items = {"farming:seed_oat"},rarity = 5}, + {items = {"default:grass_1"}} + } + } + }) + + -- Override default dry grass and have it drop Barley and Rye Seeds + + if minetest.registered_nodes["default:dry_grass_1"] then + + minetest.override_item("default:dry_grass_" .. i, { + drop = { + max_items = 1, + items = { + {items = {"farming:seed_barley"}, rarity = 5}, + {items = {"farming:seed_rye"},rarity = 5}, + {items = {"default:dry_grass_1"}} + } + } + }) + end + +end + +-- Override default Jungle Grass and have it drop Cotton and Rice Seeds + +minetest.override_item("default:junglegrass", { + drop = { + max_items = 1, + items = { + {items = {"farming:seed_cotton"}, rarity = 8}, + {items = {"farming:rice"},rarity = 8}, + {items = {"default:junglegrass"}} + } + } +}) diff --git a/mods/farming/hoes.lua b/mods/farming/hoes.lua index d005f6d..9340d55 100644 --- a/mods/farming/hoes.lua +++ b/mods/farming/hoes.lua @@ -1,54 +1,514 @@ --- farming/hoes.lua --- support for MT game translation. -local S = farming.get_translator +local S = farming.intllib +local tr = minetest.get_modpath("toolranks") + +-- Hoe registration function + +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 + + -- add hoe group + def.groups = def.groups or {} + def.groups.hoe = 1 + + -- 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 + +-- Turns dirt with group soil=1 into soil + +function farming.hoe_on_use(itemstack, user, pointed_thing, uses) + + local pt = pointed_thing + + -- am I going to hoe the top of a dirt node? + if not pt or pt.type ~= "node" + or pt.above.y ~= pt.under.y + 1 then + return + end + + local under = minetest.get_node(pt.under) + local upos = pointed_thing.under + + if minetest.is_protected(upos, user:get_player_name()) then + minetest.record_protection_violation(upos, user:get_player_name()) + return + end + + 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] + or 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 dirt + if minetest.get_item_group(under.name, "soil") ~= 1 then + return + end + + -- check if (wet) soil defined + local ndef = minetest.registered_nodes[under.name] + if ndef.soil == nil or ndef.soil.wet == nil or ndef.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 + + -- turn the node into soil, wear out item and play sound + minetest.set_node(pt.under, {name = ndef.soil.dry}) + + minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}) + + local wdef = itemstack:get_definition() + local wear = 65535 / (uses - 1) + + if farming.is_creative(user:get_player_name()) then + if tr then + wear = 1 + else + wear = 0 + end + end + + if tr then + itemstack = toolranks.new_afteruse(itemstack, user, under, {wear = wear}) + else + itemstack:add_wear(wear) + end + + 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 + + return itemstack +end + +-- Define Hoes 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}, + material = "group:wood" +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:hoe_wood", + burntime = 5 }) 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} + material = "group:stone" }) 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} + max_uses = 200, + material = "default:steel_ingot" }) --- 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}, + max_uses = 500, + groups = {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}, + groups = {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}, + groups = {not_in_creative_inventory = 1} }) + +-- Toolranks support +if tr then + +minetest.override_item("farming:hoe_wood", { + original_description = "Wood Hoe", + description = toolranks.create_description("Wood Hoe")}) + +minetest.override_item("farming:hoe_stone", { + original_description = "Stone Hoe", + description = toolranks.create_description("Stone Hoe")}) + +minetest.override_item("farming:hoe_steel", { + original_description = "Steel Hoe", + description = toolranks.create_description("Steel Hoe")}) + +minetest.override_item("farming:hoe_bronze", { + original_description = "Bronze Hoe", + description = toolranks.create_description("Bronze Hoe")}) + +minetest.override_item("farming:hoe_mese", { + original_description = "Mese Hoe", + description = toolranks.create_description("Mese Hoe")}) + +minetest.override_item("farming:hoe_diamond", { + original_description = "Diamond Hoe", + description = toolranks.create_description("Diamond Hoe")}) +end + + +-- hoe bomb function +local function hoe_area(pos, player) + + -- check for protection + if minetest.is_protected(pos, player:get_player_name()) then + minetest.record_protection_violation(pos, player:get_player_name()) + return + end + + local r = 5 -- radius + + -- remove flora (grass, flowers etc.) + local res = minetest.find_nodes_in_area( + {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, + {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, + {"group:flora"}) + + for n = 1, #res do + minetest.swap_node(res[n], {name = "air"}) + end + + -- replace dirt with tilled soil + res = nil + res = minetest.find_nodes_in_area_under_air( + {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, + {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, + {"group:soil"}) + + for n = 1, #res do + minetest.swap_node(res[n], {name = "farming:soil"}) + end +end + + +-- throwable hoe bomb +minetest.register_entity("farming:hoebomb_entity", { + physical = true, + visual = "sprite", + visual_size = {x = 1.0, y = 1.0}, + textures = {"farming_hoe_bomb.png"}, + collisionbox = {-0.1,-0.1,-0.1,0.1,0.1,0.1}, + lastpos = {}, + player = "", + + on_step = function(self, dtime) + + if not self.player then + + self.object:remove() + + return + end + + local pos = self.object:get_pos() + + if self.lastpos.x ~= nil then + + local vel = self.object:getvelocity() + + -- only when potion hits something physical + if vel.x == 0 + or vel.y == 0 + or vel.z == 0 then + + if self.player ~= "" then + + -- round up coords to fix glitching through doors + self.lastpos = vector.round(self.lastpos) + + hoe_area(self.lastpos, self.player) + end + + self.object:remove() + + return + + end + end + + self.lastpos = pos + end +}) + + +-- actual throwing function +local function throw_potion(itemstack, player) + + local playerpos = player:get_pos() + + local obj = minetest.add_entity({ + x = playerpos.x, + y = playerpos.y + 1.5, + z = playerpos.z + }, "farming:hoebomb_entity") + + local dir = player:get_look_dir() + local velocity = 20 + + obj:setvelocity({ + x = dir.x * velocity, + y = dir.y * velocity, + z = dir.z * velocity + }) + + obj:setacceleration({ + x = dir.x * -3, + y = -9.5, + z = dir.z * -3 + }) + + obj:get_luaentity().player = player +end + + +-- hoe bomb item +minetest.register_craftitem("farming:hoe_bomb", { + description = S("Hoe Bomb (use or throw on grassy areas to hoe land)"), + inventory_image = "farming_hoe_bomb.png", + groups = {flammable = 2, not_in_creative_inventory = 1}, + on_use = function(itemstack, user, pointed_thing) + + if pointed_thing.type == "node" then + hoe_area(pointed_thing.above, user) + else + throw_potion(itemstack, user) + + if not farming.is_creative(user:get_player_name()) then + + itemstack:take_item() + + return itemstack + end + end + end, +}) + +-- Mithril Scythe (special item) + +farming.scythe_not_drops = {"farming:trellis", "farming:beanpole"} + +farming.add_to_scythe_not_drops = function(item) + table.insert(farming.scythe_not_drops, item) +end + +minetest.register_tool("farming:scythe_mithril", { + description = S("Mithril Scythe (Use to harvest and replant crops)"), + inventory_image = "farming_scythe_mithril.png", + sound = {breaks = "default_tool_breaks"}, + + on_use = function(itemstack, placer, pointed_thing) + + if pointed_thing.type ~= "node" then + return + end + + local pos = pointed_thing.under + local name = placer:get_player_name() + + if minetest.is_protected(pos, name) then + return + end + + local node = minetest.get_node_or_nil(pos) + + if not node then + return + end + + local def = minetest.registered_nodes[node.name] + + if not def then + return + end + + if not def.drop then + return + end + + if not def.groups + or not def.groups.plant then + return + end + + local drops = minetest.get_node_drops(node.name, "") + + if not drops + or #drops == 0 + or (#drops == 1 and drops[1] == "") then + return + end + + -- get crop name + local mname = node.name:split(":")[1] + local pname = node.name:split(":")[2] + local sname = tonumber(pname:split("_")[2]) + pname = pname:split("_")[1] + + if not sname then + return + end + + -- add dropped items + for _, dropped_item in pairs(drops) do + + -- dont drop items on this list + for _, not_item in pairs(farming.scythe_not_drops) do + + if dropped_item == not_item then + dropped_item = nil + end + end + + if dropped_item then + + local obj = minetest.add_item(pos, dropped_item) + + if obj then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 3, + z = math.random(-10, 10) / 9 + }) + end + end + end + + -- Run script hook + for _, callback in pairs(core.registered_on_dignodes) do + callback(pos, node, placer) + end + + -- play sound + minetest.sound_play("default_grass_footstep", {pos = pos, gain = 1.0}) + + local replace = mname .. ":" .. pname .. "_1" + + if minetest.registered_nodes[replace] then + + local p2 = minetest.registered_nodes[replace].place_param2 or 1 + + minetest.set_node(pos, {name = replace, param2 = p2}) + else + minetest.set_node(pos, {name = "air"}) + end + + if not farming.is_creative(name) then + + itemstack:add_wear(65535 / 150) -- 150 uses + + return itemstack + end + end, +}) + +if minetest.get_modpath("moreores") then + + minetest.register_craft({ + output = "farming:scythe_mithril", + recipe = { + {"", "moreores:mithril_ingot", "moreores:mithril_ingot"}, + {"moreores:mithril_ingot", "", "group:stick"}, + {"", "", "group:stick"} + } + }) +--[[ + farming.register_hoe(":moreores:hoe_silver", { + description = S("%s Hoe"):format(S("Silver")), + inventory_image = "moreores_tool_silverhoe.png", + max_uses = 300, + material = "moreores:silver_ingot" + }) + + farming.register_hoe(":moreores:hoe_mithril", { + description = S("%s Hoe"):format(S("Mithril")), + inventory_image = "moreores_tool_mithrilhoe.png", + max_uses = 1000, + material = "moreores:mithril_ingot" + }) + + -- Toolranks support + if tr then + + local desc = S("%s Hoe"):format(S("Silver")) + + minetest.override_item("moreores:hoe_silver", { + original_description = desc, + description = toolranks.create_description(desc)}) + + desc = S("%s Hoe"):format(S("Mithril")) + + minetest.override_item("moreores:hoe_mithril", { + original_description = desc, + description = toolranks.create_description(desc)}) + end]] +end diff --git a/mods/farming/init.lua b/mods/farming/init.lua index 96672fa..87aa48d 100644 --- a/mods/farming/init.lua +++ b/mods/farming/init.lua @@ -1,156 +1,738 @@ --- farming/init.lua +--[[ + Farming Redo Mod + by TenPlus1 + NEW growing routine by prestidigitator + auto-refill by crabman77 +]] --- 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") +farming = { + mod = "redo", + version = "20220309", + path = minetest.get_modpath("farming"), + select = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5} + }, + registered_plants = {}, + min_light = 12, + max_light = 15 +} --- WHEAT +local creative_mode_cache = minetest.settings:get_bool("creative_mode") -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_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:straw", - burntime = 3, -}) - -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"}}, - }) +function farming.is_creative(name) + return creative_mode_cache or minetest.check_player_privs(name, {creative = true}) end + + +local statistics = dofile(farming.path .. "/statistics.lua") + +-- Intllib +local S +if minetest.get_translator ~= nil then + S = minetest.get_translator("farming") -- 5.x translation function +else + if minetest.get_modpath("intllib") then + dofile(minetest.get_modpath("intllib") .. "/init.lua") + if intllib.make_gettext_pair then + gettext, ngettext = intllib.make_gettext_pair() -- new gettext method + else + gettext = intllib.Getter() -- old text file method + end + S = gettext + else -- boilerplate function + S = function(str, ...) + local args = {...} + return str:gsub("@%d+", function(match) + return args[tonumber(match:sub(2))] + end) + end + end +end + +farming.intllib = S + + +-- Utility Function +local time_speed = tonumber(minetest.settings:get("time_speed")) or 72 +local SECS_PER_CYCLE = (time_speed > 0 and (24 * 60 * 60) / time_speed) or 0 +local function clamp(x, min, max) + return (x < min and min) or (x > max and max) or x +end + + +-- return amount of day or night that has elapsed +-- dt is time elapsed, count_day if true counts day, otherwise night +local function day_or_night_time(dt, count_day) + + local t_day = minetest.get_timeofday() + local t1_day = t_day - dt / SECS_PER_CYCLE + local t1_c, t2_c -- t1_c < t2_c and t2_c always in [0, 1) + + if count_day then + + if t_day < 0.25 then + t1_c = t1_day + 0.75 -- Relative to sunup, yesterday + t2_c = t_day + 0.75 + else + t1_c = t1_day - 0.25 -- Relative to sunup, today + t2_c = t_day - 0.25 + end + else + if t_day < 0.75 then + t1_c = t1_day + 0.25 -- Relative to sundown, yesterday + t2_c = t_day + 0.25 + else + t1_c = t1_day - 0.75 -- Relative to sundown, today + t2_c = t_day - 0.75 + end + end + + local dt_c = clamp(t2_c, 0, 0.5) - clamp(t1_c, 0, 0.5) -- this cycle + + if t1_c < -0.5 then + local nc = math.floor(-t1_c) + t1_c = t1_c + nc + dt_c = dt_c + 0.5 * nc + clamp(-t1_c - 0.5, 0, 0.5) + end + + return dt_c * SECS_PER_CYCLE +end + + +-- Growth Logic +local STAGE_LENGTH_AVG = tonumber( + minetest.settings:get("farming_stage_length")) or 200 -- 160 +local STAGE_LENGTH_DEV = STAGE_LENGTH_AVG / 6 + + +-- return plant name and stage from node provided +local function plant_name_stage(node) + + local name + + if type(node) == "table" then + + if node.name then + name = node.name + elseif node.x and node.y and node.z then + node = minetest.get_node_or_nil(node) + name = node and node.name + end + else + name = tostring(node) + end + + if not name or name == "ignore" then + return nil + end + + local sep_pos = name:find("_[^_]+$") + + if sep_pos and sep_pos > 1 then + + local stage = tonumber(name:sub(sep_pos + 1)) + + if stage and stage >= 0 then + return name:sub(1, sep_pos - 1), stage + end + end + + return name, 0 +end + + +-- Map from node name to +-- { plant_name = ..., name = ..., stage = n, stages_left = { node_name, ... } } + +local plant_stages = {} + +farming.plant_stages = plant_stages + +--- Registers the stages of growth of a (possible plant) node. + -- + -- @param node + -- Node or position table, or node name. + -- @return + -- The (possibly zero) number of stages of growth the plant will go through + -- before being fully grown, or nil if not a plant. + +local register_plant_node + +-- Recursive helper +local function reg_plant_stages(plant_name, stage, force_last) + + local node_name = plant_name and plant_name .. "_" .. stage + local node_def = node_name and minetest.registered_nodes[node_name] + + if not node_def then + return nil + end + + local stages = plant_stages[node_name] + + if stages then + return stages + end + + if minetest.get_item_group(node_name, "growing") > 0 then + + local ns = reg_plant_stages(plant_name, stage + 1, true) + local stages_left = (ns and { ns.name, unpack(ns.stages_left) }) or {} + + stages = { + plant_name = plant_name, + name = node_name, + stage = stage, + stages_left = stages_left + } + + if #stages_left > 0 then + + local old_constr = node_def.on_construct + local old_destr = node_def.on_destruct + + minetest.override_item(node_name, + { + on_construct = function(pos) + + if old_constr then + old_constr(pos) + end + + farming.handle_growth(pos) + end, + + on_destruct = function(pos) + + minetest.get_node_timer(pos):stop() + + if old_destr then + old_destr(pos) + end + end, + + on_timer = function(pos, elapsed) + return farming.plant_growth_timer(pos, elapsed, node_name) + end, + }) + end + + elseif force_last then + + stages = { + plant_name = plant_name, + name = node_name, + stage = stage, + stages_left = {} + } + else + return nil + end + + plant_stages[node_name] = stages + + return stages +end + + +local register_plant_node = function(node) + + local plant_name, stage = plant_name_stage(node) + + if plant_name then + + local stages = reg_plant_stages(plant_name, stage, false) + return stages and #stages.stages_left + else + return nil + end +end + + +local function set_growing(pos, stages_left) + + if not stages_left then + return + end + + local timer = minetest.get_node_timer(pos) + + if stages_left > 0 then + + if not timer:is_started() then + + local stage_length = statistics.normal(STAGE_LENGTH_AVG, STAGE_LENGTH_DEV) + + stage_length = clamp(stage_length, 0.5 * STAGE_LENGTH_AVG, 3.0 * STAGE_LENGTH_AVG) + + timer:set(stage_length, -0.5 * math.random() * STAGE_LENGTH_AVG) + end + + elseif timer:is_started() then + timer:stop() + end +end + + +-- detects a crop at given position, starting or stopping growth timer when needed +function farming.handle_growth(pos, node) + + if not pos then + return + end + + local stages_left = register_plant_node(node or pos) + + if stages_left then + set_growing(pos, stages_left) + end +end + + +minetest.after(0, function() + + for _, node_def in pairs(minetest.registered_nodes) do + register_plant_node(node_def) + end +end) + + +-- Just in case a growing type or added node is missed (also catches existing +-- nodes added to map before timers were incorporated). +minetest.register_abm({ + nodenames = {"group:growing"}, + interval = 300, + chance = 1, + catch_up = false, + action = function(pos, node) + farming.handle_growth(pos, node) + end +}) + + +-- Plant timer function that grows plants under the right conditions. +function farming.plant_growth_timer(pos, elapsed, node_name) + + local stages = plant_stages[node_name] + + if not stages then + return false + end + + local max_growth = #stages.stages_left + + if max_growth <= 0 then + return false + end + + -- custom growth check + local chk = minetest.registered_nodes[node_name].growth_check + + if chk then + + if chk(pos, node_name) then + return true + end + + -- otherwise check for wet soil beneath crop + else + local under = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) + + if minetest.get_item_group(under.name, "soil") < 3 then + return true + end + end + + local growth + local light_pos = {x = pos.x, y = pos.y, z = pos.z} + local lambda = elapsed / STAGE_LENGTH_AVG + + if lambda < 0.1 then + return true + end + + local MIN_LIGHT = minetest.registered_nodes[node_name].minlight or farming.min_light + local MAX_LIGHT = minetest.registered_nodes[node_name].maxlight or farming.max_light + + if max_growth == 1 or lambda < 2.0 then + + local light = (minetest.get_node_light(light_pos) or 0) + + if light < MIN_LIGHT or light > MAX_LIGHT then + return true + end + + growth = 1 + else + local night_light = (minetest.get_node_light(light_pos, 0) or 0) + local day_light = (minetest.get_node_light(light_pos, 0.5) or 0) + local night_growth = night_light >= MIN_LIGHT and night_light <= MAX_LIGHT + local day_growth = day_light >= MIN_LIGHT and day_light <= MAX_LIGHT + + if not night_growth then + + if not day_growth then + return true + end + + lambda = day_or_night_time(elapsed, true) / STAGE_LENGTH_AVG + + elseif not day_growth then + + lambda = day_or_night_time(elapsed, false) / STAGE_LENGTH_AVG + end + + growth = statistics.poisson(lambda, max_growth) + + if growth < 1 then + return true + end + end + + if minetest.registered_nodes[stages.stages_left[growth]] then + + local p2 = minetest.registered_nodes[stages.stages_left[growth] ].place_param2 or 1 + + minetest.swap_node(pos, {name = stages.stages_left[growth], param2 = p2}) + else + return true + end + + return growth ~= max_growth +end + + +-- refill placed plant by crabman (26/08/2015) updated by TenPlus1 +function farming.refill_plant(player, plantname, index) + + if not player then return end + + local inv = player:get_inventory() + local old_stack = inv:get_stack("main", index) + + if old_stack:get_name() ~= "" then + return + end + + for i, stack in ipairs(inv:get_list("main")) do + + if stack:get_name() == plantname and i ~= index then + + inv:set_stack("main", index, stack) + stack:clear() + inv:set_stack("main", i, stack) + + return + end + end +end + + +-- Place Seeds on Soil +function farming.place_seed(itemstack, placer, pointed_thing, plantname) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + + -- am I right-clicking on something that has a custom on_place set? + -- thanks to Krock for helping with this issue :) + local def = minetest.registered_nodes[under.name] + if placer and itemstack and def and def.on_rightclick then + return def.on_rightclick(pt.under, under, placer, itemstack, pt) + end + + local above = minetest.get_node(pt.above) + + -- check if pointing at the top of the node + if pt.above.y ~= pt.under.y + 1 then + return + end + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] + or not minetest.registered_nodes[above.name] then + return + end + + -- can I replace above node, and am I pointing at soil + if not minetest.registered_nodes[above.name].buildable_to + or minetest.get_item_group(under.name, "soil") < 2 + -- avoid multiple seed placement bug + or minetest.get_item_group(above.name, "plant") ~= 0 then + return + end + + -- is player planting seed? + local name = placer and placer:get_player_name() or "" + + -- if not protected then add node and remove 1 item from the itemstack + if not minetest.is_protected(pt.above, name) then + + local p2 = minetest.registered_nodes[plantname].place_param2 or 1 + + minetest.set_node(pt.above, {name = plantname, param2 = p2}) + +--minetest.get_node_timer(pt.above):start(1) +--farming.handle_growth(pt.above)--, node) + + minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}) + + if placer and itemstack + and not farming.is_creative(placer:get_player_name()) then + + local name = itemstack:get_name() + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 then + + minetest.after(0.2, + farming.refill_plant, + placer, + name, + placer:get_wield_index() + ) + end + end + + return itemstack + end +end + + +-- Function to register plants (default farming compatibility) +farming.register_plant = function(name, def) + + if not def.steps then + return nil + end + + local mname = name:split(":")[1] + local pname = name:split(":")[2] + + -- Check def + def.description = def.description or S("Seed") + def.inventory_image = def.inventory_image or "unknown_item.png" + def.minlight = def.minlight or 12 + def.maxlight = def.maxlight or 15 + + -- Register seed + 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 = {seed = 1, snappy = 3, attached_node = 1, flammable = 2}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + place_param2 = def.place_param2 or nil, + next_plant = mname .. ":" .. pname .. "_1", + + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, + pointed_thing, mname .. ":" .. pname .. "_1") + end, + }) + + -- Register harvest + minetest.register_craftitem(":" .. mname .. ":" .. pname, { + description = pname:gsub("^%l", string.upper), + 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 g = { + snappy = 3, flammable = 2, plant = 1, growing = 1, + attached_node = 1, not_in_creative_inventory = 1, + } + + -- Last step doesn't need growing=1 so Abm never has to check these + if i == def.steps then + g.growing = 0 + end + + local node_name = mname .. ":" .. pname .. "_" .. i + + local next_plant = nil + + if i < def.steps then + next_plant = mname .. ":" .. pname .. "_" .. (i + 1) + end + + minetest.register_node(node_name, { + drawtype = "plantlike", + waving = 1, + tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"}, + paramtype = "light", + paramtype2 = def.paramtype2, + place_param2 = def.place_param2, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = drop, + selection_box = farming.select, + groups = g, + sounds = default.node_sound_leaves_defaults(), + minlight = def.minlight, + maxlight = def.maxlight, + next_plant = next_plant + }) + end + +-- add to farming.registered_plants +farming.registered_plants[mname .. ":" .. pname] = { + crop = mname .. ":" .. pname, + seed = mname .. ":seed_" .. pname, + steps = def.steps, + minlight = def.minlight, + maxlight = def.maxlight +} +--print(dump(farming.registered_plants[mname .. ":" .. pname])) + -- Return info + return {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname} +end + + +-- default settings +farming.carrot = 0.001 +farming.potato = 0.001 +farming.tomato = 0.001 +farming.cucumber = 0.001 +farming.corn = 0.001 +farming.coffee = 0.001 +farming.melon = 0.001 +farming.pumpkin = 0.001 +farming.cocoa = true +farming.raspberry = 0.001 +farming.blueberry = 0.001 +farming.rhubarb = 0.001 +farming.beans = 0.001 +farming.grapes = 0.001 +farming.barley = true +farming.chili = 0.003 +farming.hemp = 0.003 +farming.garlic = 0.001 +farming.onion = 0.001 +farming.pepper = 0.002 +farming.pineapple = 0.001 +farming.peas = 0.001 +farming.beetroot = 0.001 +farming.mint = 0.005 +farming.cabbage = 0.001 +farming.blackberry = 0.002 +farming.soy = 0.001 +farming.vanilla = 0.001 +farming.lettuce = 0.001 +farming.artichoke = 0.001 +farming.parsley = 0.002 +farming.sunflower = 0.001 +farming.grains = true +farming.rice = true +farming.rarety = 0.002 + + +-- Load new global settings if found inside mod folder +local input = io.open(farming.path.."/farming.conf", "r") +if input then + dofile(farming.path .. "/farming.conf") + input:close() +end + +-- load new world-specific settings if found inside world folder +local worldpath = minetest.get_worldpath() +input = io.open(worldpath.."/farming.conf", "r") +if input then + dofile(worldpath .. "/farming.conf") + input:close() +end + + +-- important items +dofile(farming.path.."/soil.lua") +dofile(farming.path.."/hoes.lua") +dofile(farming.path.."/grass.lua") +dofile(farming.path.."/utensils.lua") + +-- default crops +dofile(farming.path.."/crops/wheat.lua") +dofile(farming.path.."/crops/cotton.lua") + + +-- helper function +local function ddoo(file, check) + + if check then + dofile(farming.path .. "/crops/" .. file) + end +end + +-- add additional crops and food (if enabled) +ddoo("carrot.lua", farming.carrot) +ddoo("potato.lua", farming.potato) +ddoo("tomato.lua", farming.tomato) +ddoo("cucumber.lua", farming.cucumber) +ddoo("corn.lua", farming.corn) +ddoo("coffee.lua", farming.coffee) +ddoo("melon.lua", farming.melon) +ddoo("pumpkin.lua", farming.pumpkin) +ddoo("cocoa.lua", farming.cocoa) +ddoo("raspberry.lua", farming.raspberry) +ddoo("blueberry.lua", farming.blueberry) +ddoo("rhubarb.lua", farming.rhubarb) +ddoo("beans.lua", farming.beans) +ddoo("grapes.lua", farming.grapes) +ddoo("barley.lua", farming.barley) +ddoo("hemp.lua", farming.hemp) +ddoo("garlic.lua", farming.garlic) +ddoo("onion.lua", farming.onion) +ddoo("pepper.lua", farming.pepper) +ddoo("pineapple.lua", farming.pineapple) +ddoo("peas.lua", farming.peas) +ddoo("beetroot.lua", farming.beetroot) +ddoo("chili.lua", farming.chili) +ddoo("ryeoatrice.lua", farming.grains) +ddoo("rice.lua", farming.rice) +ddoo("mint.lua", farming.mint) +ddoo("cabbage.lua", farming.cabbage) +ddoo("blackberry.lua", farming.blackberry) +ddoo("soy.lua", farming.soy) +ddoo("vanilla.lua", farming.vanilla) +ddoo("lettuce.lua", farming.lettuce) +ddoo("artichoke.lua", farming.artichoke) +ddoo("parsley.lua", farming.parsley) +ddoo("sunflower.lua", farming.sunflower) + +dofile(farming.path .. "/food.lua") +dofile(farming.path .. "/mapgen.lua") +dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility +dofile(farming.path .. "/lucky_block.lua") diff --git a/mods/farming/license.txt b/mods/farming/license.txt index 8cbb63a..961a49f 100644 --- a/mods/farming/license.txt +++ b/mods/farming/license.txt @@ -1,61 +1,182 @@ -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: +Copyright (c) 2016 TenPlus1 -The above copyright notice and this permission notice shall be included in all copies or -substantial portions of the Software. +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 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. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -For more details: -https://opensource.org/licenses/MIT +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. -License of media (textures) ---------------------------- +License of media (textures): +---------------------------- +Created by PilzAdam (License: CC BY 3.0): + farming_bread.png + farming_soil.png + farming_soil_wet.png + farming_soil_wet_side.png + farming_string.png -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 +Created by Napiophelios (CC BY-SA 3.0): + farming_cotton.png -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. +Created by Calinou (License: CC BY-SA): + farming_tool_bronzehoe.png + farming_tool_steelhoe.png + farming_tool_stonehoe.png + farming_tool_woodhoe.png + farming_tool_mesehoe.png + farming_tool_diamondhoe.png -Under the following terms: +Created by VanessaE (License: CC BY 3.0): + farming_cotton_seed.png + farming_wheat_seed.png + farming_flour.png + farming_wheat.png + farming_wheat_1.png + farming_wheat_2.png + farming_wheat_3.png + farming_wheat_4.png + farming_wheat_5.png + farming_wheat_5.png + farming_wheat_7.png + farming_wheat_8.png + farming_cotton_1.png + farming_cotton_2.png + farming_cotton_3.png + farming_cotton_4.png + farming_cotton_5.png + farming_cotton_6.png + farming_cotton_7.png + farming_cotton_8.png -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. +Created by 7eventy7 (https://www.planetminecraft.com/member/7eventy7/) + farming_melon_top.png + farming_melon_side.png + farming_melon_bottom.png -No additional restrictions — You may not apply legal terms or technological measures that -legally restrict others from doing anything the license permits. +Created by Doc (License: CC BY 3.0): + farming_cucumber.png + farming_cucumber_1.png + farming_cucumber_2.png + farming_cucumber_3.png + farming_cucumber_4.png + farming_potato.png + farming_potato_1.png + farming_potato_2.png + farming_potato_3.png + farming_potato_4.png + farming_raspberries.png + farming_raspberry_1.png + farming_raspberry_2.png + farming_raspberry_3.png + farming_raspberry_4.png -Notices: +Created by Gambit (License: CC BY 3.0): + default_junglegrass.png + farming_carrot.png + farming_carrot_1.png + farming_carrot_2.png + farming_carrot_3.png + farming_carrot_4.png + farming_carrot_5.png + farming_carrot_6.png + farming_carrot_7.png + farming_carrot_8.png -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. +Created by JoseTheCrafter and edited by TenPlus1 (CC BY 3.0): + farming_tomato.png + farming_tomato_1.png + farming_tomato_2.png + farming_tomato_3.png + farming_tomato_4.png + farming_tomato_5.png + farming_tomato_6.png + farming_tomato_7.png + farming_tomato_8.png -For more details: -http://creativecommons.org/licenses/by/3.0/ +Created by GeMinecraft and edited by TenPlus1 (CC BY 3.0): + farming_corn.png + farming_corn_cob.png + farming_corn_1.png + farming_corn_2.png + farming_corn_3.png + farming_corn_4.png + farming_corn_5.png + farming_corn_6.png + farming_corn_7.png + farming_corn_8.png + +Created by TenPlus1 (CC BY 3.0) + farming_cocoa_1.png + farming_cocoa_2.png + farming_cocoa_3.png + farming_cocoa_beans.png + farming_cookie.png + farming_raspberry_smoothie.png + farming_rhubarb_1.png + farming_rhubarb_2.png + farming_rhubarb_3.png + farming_rhubarb.png + farming_rhubarb_pie.png + farming_hemp*.png + farming_tofu*.png + +Created by ademant (CC-BY-3.0) + farming_rye*.png + farming_oat*.png + farming_rice*.png + +Created by PilzAdam and edited by SpaghettiToastBook (CC0): + farming_bread_multigrain.png + +Created by VanessaE and edited by SpaghettiToastBook (CC0): + farming_flour_multigrain.png + +Created by mDiyo (Natura), modified by TenPlus1 (License: CC BY-SA 3.0): + farming_barley.png + +Created by OgelGames (CC BY-SA 4.0) + farming_berry_smoothie.png + farming_cactus_juice.png + farming_salad.png + +Created by Felfa (CC0) + farming_blackberry*.png + farming_lettuce*.png + farming_burger.png + farming_soy*.png + farming_vanilla*.png + farming_artichoke*.png + farming_parsley*.png + farming_paella.png + farming_potato_omelette.png + farming_spanish_potatoes.png + farming_vanilla_flan.png + farming_sunflower*.png + +Created by gorlock (CC0) + farming_salt_crystal.png + +Created by sirrobzeroone (CC0) + farming_gyoza.png + farming_pineapple_ring.png + +Created by TechM8 (https://www.deviantart.com/techm8) + farming_popcorn.png + +Created by RZR0 (CC-BY-NC-SA) + farming_blueberry_pie.png diff --git a/mods/farming/locale/de.txt b/mods/farming/locale/de.txt new file mode 100644 index 0000000..b06202d --- /dev/null +++ b/mods/farming/locale/de.txt @@ -0,0 +1,196 @@ +# German translation of the farming mod by TenPlus1 +# textdomain: farming +# author: Xanthin +# author: TheDarkTiger +# author: SwissalpS +# last update: 2022/Feb/26 + +###### folder . ###### + +### init.lua ### +Seed=Saatgut + +### compatibility.lua ### +Banana=Banane +Banana Leaves=Bananenblätter +Orange=Apfelsine +Strawberry=Erdbeere + +### food.lua ### +Sugar=Zucker +Salt=Salz +Rose Water=Rosenwasser +Turkish Delight=Lokum +Garlic Bread=Knoblauchbrot +Donut=Donut +Chocolate Donut=Schokodonut +Apple Donut=Apfeldonut +Porridge=Haferbrei +Jaffa Cake=Jaffakeks + +### hoes.lua ### +Hoe=Hacke +Wooden Hoe=Holzhacke +Stone Hoe=Steinhacke +Steel Hoe=Stahlhacke +Bronze Hoe=Bronzehacke +Mese Hoe=Mesehacke +Diamond Hoe=Diamanthacke +# Surcharge du mod [Toolranks] à faire # +Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen) +Mithril Scythe (Right-click to harvest and replant crops)=Mithril-Sense (Rechts-Klick zum Ernten und Wiedereinpflanzen) +# Surcharge du mod [Toolranks] à faire # + +### soil.lua ### +Soil=Ackerboden +Wet Soil=Bewässerter Ackerboden + +### utensils.lua ### +Wooden Bowl=Holzschale +Saucepan=Kasserolle +Cooking Pot=Kochtopf +Baking Tray=Kuchenblech +Skillet=Bratpfanne +Mortar and Pestle=Mörser und Stößel +Cutting Board=Schneidebrett +Juicer=Entsafter +Glass Mixing Bowl=Glasschüssel + + +###### folder ./crops ###### + +### barley.lua ### +Barley Seed=Gerstenkörner +Barley=Gerste + +### beans.lua ### +Green Beans=Grüne Bohnen +Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen) + +### beetroot.lua ### +Beetroot=Rote Beete +Beetroot Soup=Rote Beete Suppe + +### blueberry.lua ### +Blueberries=Blaubeeren +Blueberry Muffin=Blaubeermuffin +Blueberry Pie=Blaubeerkuchen + +### carrot.lua ## +Carrot=Möhre +Carrot Juice=Möhrensaft +Golden Carrot=Goldene Möhre + +### chili.lua ### +Chili Pepper=Chili +Bowl of Chili=Chili Schale + +### cocoa.lua ### +Cocoa Beans=Kakaobohne +Cookie=Keks +Bar of Dark Chocolate=Tafel Zartbitterschokolade +Chocolate Block=Schokoladenstück + +### coffee.lua ### +Coffee Beans=Kaffeebohnen +Cup of Coffee=Tasse Kaffee + +### corn.lua ### +Corn=Mais +Corn on the Cob=Maiskolben +Cornstarch=Speisestärke +Bottle of Ethanol=Flasche Ethanol + +### cotton.lua ### +Cotton Seed=Baumwollsamen +Cotton=Baumwolle +String=Faden + +### cucumber.lua ### +Cucumber=Gurke + +### garlic.lua ### +Garlic clove=Knoblauchzehe +Garlic=Knoblauch +Garlic Braid=Knoblauchzopf + +### grapes.lua ### +Grapes=Weintrauben +Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen) + +### hemp.lua ### +Hemp Seed=Hanfsamen +Hemp Leaf=Hanfblatt +Bottle of Hemp Oil=Flasche mit Hanföl +Hemp Fibre=Hanffaser +Hemp Block=Hanfblock +Hemp Rope=Hanfseil + +### melon.lua ### +Melon Slice=Melonenscheibe +Melon=Melone + +### onion.lua ### +Onion=Zwiebel + +### peas.lua ### +Pea Pod=Erbsenschote +Peas=Erbsen +Pea Soup=Erbsensuppe + +### pepper.lua ### +Peppercorn=Pfefferkorn +Pepper=Pfeffer +Ground Pepper=Gemahlener Pfeffer + +### pinapple.lua ### +Pineapple Top=Ananasdeckel +Pineapple=Ananas +Pineapple Ring=Ananasscheibe +Pineapple Juice=Ananassaft + +### potato.lua ### +Potato=Kartoffel +Baked Potato=Ofenkartoffel +Cucumber and Potato Salad=Gurken und Tomatensalat + +### pumpkin.lua ### +Pumpkin Slice=Kürbisscheibe +Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Punch zum Ein- und Ausschalten) +Scarecrow Bottom=Vogelscheuchengestell +Pumpkin Bread=Kürbisbrot +Pumpkin Dough=Kürbisteig +Pumpkin=Kürbis + +### raspberry.lua ### +Raspberries=Himbeeren +Raspberry Smoothie=Himbeersmoothie + +### rhubarb.lua ### +Rhubarb=Rhabarber +Rhubarb Pie=Rhabarberkuchen + +### ryeoatrice.lua ### +Rye=Roggen +Rye seed=Roggensaat +Oat=Hafer +Oat seed=Hafersamen +Rice=Reis +Rice grains=Reissaat +Rice Bread=Reiswaffel +Rice Flour=Reismehl +Multigrain Flour=Mehrkornmehl +Multigrain Bread=Mehrkornbrot + +### tomato.lua ### +Tomato=Tomate + +### wheat.lua ### +Wheat Seed=Weizenkörner +Wheat=Weizen +Straw=Stroh +Flour=Mehl +Bread=Brot +Sliced Bread=Geschnittenes Brot +Toast=Toast +Toast Sandwich=Toast Sandwich diff --git a/mods/farming/locale/es.txt b/mods/farming/locale/es.txt new file mode 100644 index 0000000..c4915ea --- /dev/null +++ b/mods/farming/locale/es.txt @@ -0,0 +1,195 @@ +# Translation of the farming mod by TenPlus1 +# textdomain: farming +# author: PICCORO Lenz McKAY +# author: SwissalpS +# last update: 2022/Feb/26 + +###### folder . ###### + +### init.lua ### +Seed=Semilla + +### compatibility.lua ### +Banana=Banana +Banana Leaves=Hojas de banana +Orange=Naranja +Strawberry=Fresa + +### food.lua ### +Sugar=Azúcar +Salt=Sal +Rose Water=Agua de rosa +Turkish Delight=Delicia turca +Garlic Bread=Pan de ajo +Donut=Dona +Chocolate Donut=Dona de chocolate +Apple Donut=Dona de manzana +Porridge=Papilla +Jaffa Cake=Pastel de jaffa + +### hoes.lua ### +Hoe=Azadón +Wooden Hoe=Azadón de madera +Stone Hoe=Azadón de piedra +Steel Hoe=Azadón de acero +Bronze Hoe=Azadón de bronze +Mese Hoe=Azadón de mese +Diamond Hoe=Azadón de diamante +# Surcharge du mod [Toolranks] à faire # +Hoe Bomb (use or throw on grassy areas to hoe land)=Azadón bomba (usar o tirar en áreas verdes para rozar) +Mithril Scythe (Right-click to harvest and replant crops)=Guadaña de mithril (clic derecho para cosechar y replantar cultivos) +# Surcharge du mod [Toolranks] à faire # + +### soil.lua ### +Soil=Suelo +Wet Soil=Suelo mojado + +### utensils.lua ### +Wooden Bowl=Cuenco de madera +Saucepan=Cacerola +Cooking Pot=Olla +Baking Tray=Bandeja de hornear +Skillet=Sarten +Mortar and Pestle=Mortero y maja +Cutting Board=Tabla de cortar +Juicer=Exprimidor +Glass Mixing Bowl=Tazón de vidrio para mezclar + + +###### folder ./crops ###### + +### barley.lua ### +Barley Seed=Semilla de cebada +Barley=Cebada + +### beans.lua ### +Green Beans=Frijoles verdes +Bean Pole (place on soil before planting beans)=Base de frijol (colocar en el suelo antes de plantar frijoles) + +### beetroot.lua ### +Beetroot=Remolacha +Beetroot Soup=Sopa de remolacha + +### blueberry.lua ### +Blueberries=Arándanos +Blueberry Muffin=Muffin de arándanos +Blueberry Pie=Pastel de arándanos + +### carrot.lua ## +Carrot=Zanahoria +Carrot Juice=Jugo de zanahoria +Golden Carrot=Zanahoria dorada + +### chili.lua ### +Chili Pepper=Ají picante +Bowl of Chili=Tazón de chili + +### cocoa.lua ### +Cocoa Beans=Granos de cacao +Cookie=Galleta +Bar of Dark Chocolate=Barra de chocolate negro +Chocolate Block=Bloque de chocolate + +### coffee.lua ### +Coffee Beans=Granos de café +Cup of Coffee=Taza de café + +### corn.lua ### +Corn=Maíz +Corn on the Cob=Mazorca de maíz +Cornstarch=Almidón de maíz +Bottle of Ethanol=Botella de etanol + +### cotton.lua ### +Cotton Seed=Semilla de algodón +Cotton=Algodón +String=Guita + +### cucumber.lua ### +Cucumber=Pepino + +### garlic.lua ### +Garlic clove=Diente de ajo +Garlic=Ajo +Garlic Braid=Trenza de ajo + +### grapes.lua ### +Grapes=Uvas +Trellis (place on soil before planting grapes)=Enrejado (colocar en el suelo antes de plantar las uvas) + +### hemp.lua ### +Hemp Seed=Semilla de cáñamo +Hemp Leaf=Hoja de cáñamo +Bottle of Hemp Oil=Botella de aceite de cáñamo +Hemp Fibre=Fibra de cáñamo +Hemp Block=Bloque de cáñamo +Hemp Rope=Cuerda de cáñamo + +### melon.lua ### +Melon Slice=Pedazo de Melón +Melon=Melon + +### onion.lua ### +Onion=Cebolla + +### peas.lua ### +Pea Pod=Vaina de guisantes +Peas=Guisantes +Pea Soup=Sopa de guisantes + +### pepper.lua ### +Peppercorn=Grano de pimienta +Pepper=Pimienta +Ground Pepper=Pimienta molida + +### pinapple.lua ### +Pineapple Top=Tapa de piña +Pineapple=Piña +Pineapple Ring=Anillo de piña +Pineapple Juice=Jugo de piña + +### potato.lua ### +Potato=Patata +Baked Potato=Patata al horno +Cucumber and Potato Salad=Ensalada de pepino y patata + +### pumpkin.lua ### +Pumpkin Slice=Pedazo de calabaza +Jack 'O Lantern (punch to turn on and off)=Farol de Jack (golpea para encender o apagar) +Scarecrow Bottom=Espantapájaros abajo +Pumpkin Bread=Pan de calabaza +Pumpkin Dough=Masa de calabaza +Pumpkin=Calabaza + +### raspberry.lua ### +Raspberries=Frambuesa +Raspberry Smoothie=Batido de frambuesa + +### rhubarb.lua ### +Rhubarb=Ruibarbo +Rhubarb Pie=Pastel de ruibarbo + +### ryeoatrice.lua ### +Rye=Centeno +Rye seed=Semilla de centeno +Oat=Avena +Oat seed=Semilla de avena +Rice=Arroz +Rice grains=Granos de arroz +Rice Bread=Pan de arroz +Rice Flour=Harina de arroz +Multigrain Flour=Harina multigrano +Multigrain Bread=Pan multicereales + +### tomato.lua ### +Tomato=Tomate + +### wheat.lua ### +Wheat Seed=Semilla de trigo +Wheat=Trigo +Straw=Paja +Flour=Harina +Bread=Pan +Sliced Bread=Pan rebanado +Toast=Tostadas +Toast Sandwich=Emparedado de tostadas diff --git a/mods/farming/locale/farming.de.tr b/mods/farming/locale/farming.de.tr index 13a363b..3fb935b 100644 --- a/mods/farming/locale/farming.de.tr +++ b/mods/farming/locale/farming.de.tr @@ -1,25 +1,135 @@ -# 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 +# textdomain:farming +%s Hoe=%s Hacke +Apple Donut=Apfeldonut +Apple Pie=Apfelkuchen +Baked Potato=Ofenkartoffel +Baking Tray=Kuchenblech +Banana=Banane +Banana Leaves=Bananenblätter +Bar of Dark Chocolate=Tafel Zartbitterschokolade +Barley=Gerste +Barley Seed=Gerstenkörner +Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen) +Beetroot=Rote Beete +Beetroot Soup=Rote Beete Suppe +Bibimbap=Bibimbap +Wild Blueberries=Wilde Blaubeeren +Blueberry Muffin=Blaubeermuffin +Blueberry Pie=Blaubeerkuchen +Bottle of Ethanol=Flasche Ethanol +Bottle of Hemp Oil=Flasche mit Hanföl +Bowl of Chili=Chili Schale Bread=Brot -Cotton Seed=Baumwollsamen -String=Faden -Soil=Ackerboden -Wet Soil=Nasser Ackerboden -Dry Soil=Trockener Ackerboden -Wet Dry Soil=Nasser trockener Ackerboden -Desert Sand Soil=Wüsensandackerboden -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 +Bronze Hoe=Bronzehacke +Cabbage=Kohl +Cactus Juice=Kaktussaft +Carrot=Möhre +Carrot Juice=Möhrensaft +Chili Pepper=Chili +Chocolate Block=Schokoladenstück +Chocolate Donut=Schokodonut +Cocoa Beans=Kakaobohne +Coffee Beans=Kaffeebohnen +Cookie=Keks +Cooking Pot=Kochtopf +Corn=Mais +Corn on the Cob=Maiskolben +Cornstarch=Speisestärke Cotton=Baumwolle +Cotton Seed=Baumwollsamen +Cucumber=Gurke +Cucumber and Potato Salad=Gurken und Tomatensalat +Cup of Coffee=Tasse Kaffee +Cutting Board=Schneidebrett +Diamond Hoe=Diamanthacke +Donut=Donut +Flour=Mehl +Garlic=Knoblauch +Garlic Braid=Knoblauchzopf +Garlic Bread=Knoblauchbrot +Garlic clove=Knoblauchzehe +Glass Mixing Bowl=Glasschüssel +Golden Carrot=Goldene Möhre +Grapes=Weintrauben +Green Beans=Grüne Bohnen +Ground Pepper=Gemahlener Pfeffer +Hemp Block=Hanfblock +Hemp Fibre=Hanffaser +Hemp Leaf=Hanfblatt +Hemp Rope=Hanfseil +Hemp Seed=Hanfsamen +Hoe=Hacke +Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen) +Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Punch zum Ein- und Ausschalten) +Jaffa Cake=Jaffakeks +Juicer=Entsafter +Melon=Melone +Melon Slice=Melonenscheibe +Mese Hoe=Mesehacke +Mint Leaf=Minzblatt +Mint Seeds=Minzsamen +Mint Tea=Minztee +Mithril Scythe (Right-click to harvest and replant crops)=Mithril-Sense (Rechts-Klick zum Ernten und Wiedereinpflanzen) +Mortar and Pestle=Mörser und Stößel +Multigrain Bread=Mehrkornbrot +Multigrain Flour=Mehrkornmehl +Oat seed=Hafersamen +Oats=Hafer +Onion=Zwiebel +Onion Soup=Zwiebelsuppe +Orange=Apfelsine +Pasta=Pasta +Pea Pod=Erbsenschote +Pea Soup=Erbsensuppe +Peas=Erbsen +Pepper=Pfeffer +Peppercorn=Pfefferkorn +Pineapple=Ananas +Pineapple Juice=Ananassaft +Pineapple Ring=Ananasscheibe +Pineapple Top=Ananasdeckel +Porridge=Haferbrei +Potato=Kartoffel +Pumpkin=Kürbis +Pumpkin Bread=Kürbisbrot +Pumpkin Dough=Kürbisteig +Pumpkin Slice=Kürbisscheibe +Raspberries=Himbeeren +Raspberry Smoothie=Himbeersmoothie +Rhubarb=Rhabarber +Rhubarb Pie=Rhabarberkuchen +Rice=Reis +Rice Bread=Reiswaffel +Rice Flour=Reismehl +Rice grains=Reissaat +Rose Water=Rosenwasser +Rye=Roggen +Rye seed=Roggensaat +Salt=Salz +Salad=Salat +Saucepan=Kasserolle +Savanna Soil=Savannaerde +Scarecrow Bottom=Vogelscheuchengestell +Seed=Saatgut +Skillet=Bratpfanne +Sliced Bread=Geschnittenes Brot +Soil=Ackerboden +Spaghetti=Spaghetti +Steel Hoe=Stahlhacke +Stone Hoe=Steinhacke +Straw=Stroh +Strawberry=Erdbeere +String=Faden +Sugar=Zucker +Toast=Toast +Toast Sandwich=Toast Sandwich +Tomato=Tomate +Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen) +Turkish Delight=Lokum +Wet Savanna Soil=Feuchte Savannaerde +Wet Soil=Bewässerter Ackerboden +Wheat=Weizen +Wheat Seed=Weizenkörner +Wild Cotton=Wilde Baumwolle +Wooden Bowl=Holzschale +Wooden Hoe=Holzhacke diff --git a/mods/farming/locale/farming.en.tr b/mods/farming/locale/farming.en.tr new file mode 100644 index 0000000..22df74a --- /dev/null +++ b/mods/farming/locale/farming.en.tr @@ -0,0 +1,134 @@ +# textdomain:farming +#%s Hoe= +#Apple Donut= +#Apple Pie= +#Baked Potato= +#Baking Tray= +#Banana= +#Banana Leaves= +#Bar of Dark Chocolate= +#Barley= +#Barley Seed= +#Bean Pole (place on soil before planting beans)= +#Beetroot= +#Beetroot Soup= +#Bibimbap= +#Wild Blueberries= +#Blueberry Muffin= +#Blueberry Pie= +#Bottle of Ethanol= +#Bottle of Hemp Oil= +#Bowl of Chili= +#Bread= +#Bronze Hoe= +#Cabbage= +#Cactus Juice= +#Carrot= +#Carrot Juice= +#Chili Pepper= +#Chocolate Block= +#Chocolate Donut= +#Cocoa Beans= +#Coffee Beans= +#Cookie= +#Cooking Pot= +#Corn= +#Corn on the Cob= +#Cornstarch= +#Cotton= +#Cotton Seed= +#Cucumber= +#Cucumber and Potato Salad= +#Cup of Coffee= +#Cutting Board= +#Diamond Hoe= +#Donut= +#Flour= +#Garlic= +#Garlic Braid= +#Garlic Bread= +#Garlic clove= +#Glass Mixing Bowl= +#Golden Carrot= +#Grapes= +#Green Beans= +#Ground Pepper= +#Hemp Block= +#Hemp Fibre= +#Hemp Leaf= +#Hemp Rope= +#Hemp Seed= +#Hoe= +#Hoe Bomb (use or throw on grassy areas to hoe land)= +#Jack 'O Lantern (punch to turn on and off)= +#Jaffa Cake= +#Juicer= +#Melon= +#Melon Slice= +#Mese Hoe= +#Mint Leaf= +#Mint Seeds= +#Mint Tea= +#Mithril Scythe (Right-click to harvest and replant crops)= +#Mortar and Pestle= +#Multigrain Bread= +#Multigrain Flour= +#Oat seed= +#Oats= +#Onion= +#Onion Soup= +#Orange= +#Pasta= +#Pea Pod= +#Pea Soup= +#Peas= +#Pepper= +#Peppercorn= +#Pineapple= +#Pineapple Juice= +#Pineapple Ring= +#Pineapple Top= +#Porridge= +#Potato= +#Pumpkin= +#Pumpkin Bread= +#Pumpkin Dough= +#Pumpkin Slice= +#Raspberries= +#Raspberry Smoothie= +#Rhubarb= +#Rhubarb Pie= +#Rice= +#Rice Bread= +#Rice Flour= +#Rice grains= +#Rose Water= +#Rye= +#Rye seed= +#Salt= +#Saucepan= +#Savanna Soil= +#Scarecrow Bottom= +#Seed= +#Skillet= +#Sliced Bread= +#Soil= +#Spaghetti= +#Steel Hoe= +#Stone Hoe= +#Straw= +#Strawberry= +#String= +#Sugar= +#Toast= +#Toast Sandwich= +#Tomato= +#Trellis (place on soil before planting grapes)= +#Turkish Delight= +#Wet Savanna Soil= +#Wet Soil= +#Wheat= +#Wheat Seed= +#Wild Cotton= +#Wooden Bowl= +#Wooden Hoe= diff --git a/mods/farming/locale/farming.es.tr b/mods/farming/locale/farming.es.tr index f935a7b..773ac90 100644 --- a/mods/farming/locale/farming.es.tr +++ b/mods/farming/locale/farming.es.tr @@ -1,25 +1,134 @@ -# 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 +# textdomain:farming +%s Hoe=%s Azadón +Apple Donut=Dona de manzana +Apple Pie=Pastel de manzana +Baked Potato=Patata al horno +Baking Tray=Bandeja de hornear +Banana=Banana +Banana Leaves=Hojas de banana +Bar of Dark Chocolate=Barra de chocolate negro +Barley=Cebada +Barley Seed=Semilla de cebada +Bean Pole (place on soil before planting beans)=Base de frijol (colocar en el suelo antes de plantar frijoles) +Beetroot=Remolacha +Beetroot Soup=Sopa de remolacha +#Bibimbap= +Wild Blueberries=Arándanos silvestres +Blueberry Muffin=Muffin de arándanos +Blueberry Pie=Pastel de arándanos +Bottle of Ethanol=Botella de etanol +Bottle of Hemp Oil=Botella de aceite de cáñamo +Bowl of Chili=Tazón de chili 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 +Bronze Hoe=Azadón de bronze +Cabbage=Repollo +Cactus Juice=Jugo de cactus +Carrot=Zanahoria +Carrot Juice=Jugo de zanahoria +Chili Pepper=Ají picante +Chocolate Block=Bloque de chocolate +Chocolate Donut=Dona de chocolate +Cocoa Beans=Granos de cacao +Coffee Beans=Granos de café +Cookie=Galleta +Cooking Pot=Olla +Corn=Maíz +Corn on the Cob=Mazorca de maíz +Cornstarch=Almidón de maíz Cotton=Algodón +Cotton Seed=Semilla de algodón +Cucumber=Pepino +Cucumber and Potato Salad=Ensalada de pepino y patata +Cup of Coffee=Taza de café +Cutting Board=Tabla de cortar +Diamond Hoe=Azadón de diamante +Donut=Dona +Flour=Harina +Garlic=Ajo +Garlic Braid=Trenza de ajo +Garlic Bread=Pan de ajo +Garlic clove=Diente de ajo +Glass Mixing Bowl=Tazón de vidrio para mezclar +Golden Carrot=Zanahoria dorada +Grapes=Uvas +Green Beans=Frijoles verdes +Ground Pepper=Pimienta molida +Hemp Block=Bloque de cáñamo +Hemp Fibre=Fibra de cáñamo +Hemp Leaf=Hoja de cáñamo +Hemp Rope=Cuerda de cáñamo +Hemp Seed=Semilla de cáñamo +Hoe=Azadón +Hoe Bomb (use or throw on grassy areas to hoe land)=Azadón bomba (usar o tirar en áreas verdes para rozar) +Jack 'O Lantern (punch to turn on and off)=Farol de Jack (golpea para encender o apagar) +Jaffa Cake=Pastel de jaffa +Juicer=Exprimidor +Melon=Sandía +Melon Slice=Rebanada de sandía +Mese Hoe=Azadón de mese +Mint Leaf=Hoja de menta +Mint Seeds=Semilla de menta +Mint Tea=Té de menta +Mithril Scythe (Right-click to harvest and replant crops)=Guadaña de mithril (clic derecho para cosechar y replantar cultivos) +Mortar and Pestle=Mortero y maja +Multigrain Bread=Pan multicereales +Multigrain Flour=Harina multigrano +Oat seed=Semilla de avena +Oats=Avena +Onion=Cebolla +Onion Soup=Sopa de cebolla +Orange=Naranja +Pasta=Pasta +Pea Pod=Vaina de guisantes +Pea Soup=Sopa de guisantes +Peas=Guisantes +Pepper=Pimienta +Peppercorn=Grano de pimienta +Pineapple=Piña +Pineapple Juice=Jugo de piña +Pineapple Ring=Anillo de piña +Pineapple Top=Tapa de piña +Porridge=Papilla +Potato=Patata +Pumpkin=Calabaza +Pumpkin Bread=Pan de calabaza +Pumpkin Dough=Masa de calabaza +Pumpkin Slice=Pedazo de calabaza +Raspberries=Frambuesa +Raspberry Smoothie=Batido de frambuesa +Rhubarb=Ruibarbo +Rhubarb Pie=Pastel de ruibarbo +Rice=Arroz +Rice Bread=Pan de arroz +Rice Flour=Harina de arroz +Rice grains=Granos de arroz +Rose Water=Agua de rosa +Rye=Centeno +Rye seed=Semilla de centeno +Salt=Sal +Saucepan=Cacerola +Savanna Soil=Suelo de sabana +Scarecrow Bottom=Espantapájaros abajo +Seed=Semilla +Skillet=Sarten +Sliced Bread=Pan rebanado +Soil=Suelo +Spaghetti=Espaguetis +Steel Hoe=Azadón de acero +Stone Hoe=Azadón de piedra +Straw=Paja +Strawberry=Fresa +String=Guita +Sugar=Azúcar +Toast=Tostadas +Toast Sandwich=Emparedado de tostadas +Tomato=Tomate +Trellis (place on soil before planting grapes)=Enrejado (colocar en el suelo antes de plantar las uvas) +Turkish Delight=Delicia turca +Wet Savanna Soil=Suelo humedo de savana +Wet Soil=Suelo mojado +Wheat=Trigo +Wheat Seed=Semilla de trigo +Wild Cotton=Algodón salvaje +Wooden Bowl=Cuenco de madera +Wooden Hoe=Azadón de madera diff --git a/mods/farming/locale/farming.fr.tr b/mods/farming/locale/farming.fr.tr index cd05997..4da1c81 100644 --- a/mods/farming/locale/farming.fr.tr +++ b/mods/farming/locale/farming.fr.tr @@ -1,25 +1,134 @@ -# 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 +# textdomain:farming +%s Hoe=Binette de %s +Apple Donut=Beignet aux pommes +Apple Pie=Tarte aux pommes +Baked Potato=Pomme de terre cuite +Baking Tray=Lèche-frite +Banana=Banane +Banana Leaves=Feuilles de banane +Bar of Dark Chocolate=Tablette de chocolat noir +Barley=Orge +Barley Seed=Graine d'orge +Bean Pole (place on soil before planting beans)=Tuteur pour haricots (placer sur le sol avant de planter des haricots) +Beetroot=Betterave +Beetroot Soup=Soupe de betterave +Bibimbap=Bibimbap +Wild Blueberries=Myrtilles sauvages +Blueberry Muffin=Muffin aux myrtilles +Blueberry Pie=Tarte aux myrtilles +Bottle of Ethanol=Bouteille d'éthanol +Bottle of Hemp Oil=Bouteille d'huile de chanvre +Bowl of Chili=Bol de chilli 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é +Bronze Hoe=Binette en bronze +Cabbage=Chou +Cactus Juice=Jus de cactus +Carrot=Carotte +Carrot Juice=Jus de carotte +Chili Pepper=Piment fort +Chocolate Block=Bloc de chocolat +Chocolate Donut=Beignet au chocolat +Cocoa Beans=Fèves de cacao +Coffee Beans=Grains de café +Cookie=Biscuit +Cooking Pot=Marmitte +Corn=Maïs +Corn on the Cob=Cobette (maïs cuit) +Cornstarch=Fécule de maïs Cotton=Coton +Cotton Seed=Graines de coton +Cucumber=Concombre +Cucumber and Potato Salad=Salade de pomme de terre et concombre +Cup of Coffee=Tasse de café +Cutting Board=Planche à découper +Diamond Hoe=Binette en diamant +Donut=Beignet +Flour=Farine +Garlic=Tête d'ail +Garlic Braid=Ail tressé +Garlic Bread=Pain à l'ail +Garlic clove=Gousse d'ail +Glass Mixing Bowl=Terrine en verre +Golden Carrot=Carotte dorée +Grapes=Raisins +Green Beans=Haricots verts +Ground Pepper=Poivre moulu +Hemp Block=Bloc de chanvre +Hemp Fibre=Fibre de chanvre +Hemp Leaf=Feuille de chanvre +Hemp Rope=Corde de chanvre +Hemp Seed=Graines de chanvre +Hoe=Binette +Hoe Bomb (use or throw on grassy areas to hoe land)=Bombe à binnage (Actionner ou lancer sur une zone herbeuse pour la binner) +Jack 'O Lantern (punch to turn on and off)=Jack 'O Lantern (Frapper pour allumer et éteindre) +Jaffa Cake=Petit gâteau à l'orange "Jaffa" +Juicer=Presse-agrumes +Melon=Melon +Melon Slice=Tranche de melon +Mese Hoe=Binette en mese +Mint Leaf=Feuille de menthe +Mint Seeds=Graine de menthe +Mint Tea=Thé à la menthe +Mithril Scythe (Right-click to harvest and replant crops)=Faux en mithril (Récolte et replante des graines) +Mortar and Pestle=Mortier et pilon +Multigrain Bread=Pain aux céréales +Multigrain Flour=Farine multi-céréales +Oat seed=Grains d'orge +Oats=Avoine +Onion=Oignon +Onion Soup=Soupe à l'oignon +Orange=Orange +Pasta=Pâtes +Pea Pod=Cosse de petit-pois +Pea Soup=Soupe de petit-pois +Peas=Petit-pois +Pepper=Poivron +Peppercorn=Grain de poivre +Pineapple=Ananas +Pineapple Juice=Jus d'ananas +Pineapple Ring=Tranche d'ananas +Pineapple Top=Pousse d'ananas +Porridge=Gruau de céréales +Potato=Pomme de terre +Pumpkin=Citrouille +Pumpkin Bread=Pain à la citrouille +Pumpkin Dough=Pâton de pain à la citrouille +Pumpkin Slice=Tranche de citrouille +Raspberries=Framboises +Raspberry Smoothie=Smoothie aux framboises +Rhubarb=Rhubarbe +Rhubarb Pie=Tarte à la rhubarbe +Rice=Riz +Rice Bread=Pain de riz +Rice Flour=Farine de riz +Rice grains=Grain de riz +Rose Water=Eau de rose +Rye=Seigle +Rye seed=Grains de seigle +Salt=Sel +Saucepan=Casserole +Savanna Soil=Terre de la savane binnée +Scarecrow Bottom=Base d'épouventail +Seed=Graine +Skillet=Poêle +Sliced Bread=Tranche de pain +Soil=Terre binnée +Spaghetti=Spaghetti +Steel Hoe=Binette en acier +Stone Hoe=Binette en pierre +Straw=Paille +Strawberry=Fraise +String=Ficelle +Sugar=Sucre +Toast=Pain grillé +Toast Sandwich=Sandwich au pain grillé +Tomato=Tomate +Trellis (place on soil before planting grapes)=Treillis (placer sur le sol avant de planter la vigne) +Turkish Delight=Douceur turque +Wet Savanna Soil=Terre humide et binnée de la savane +Wet Soil=Terre humide et binnée +Wheat=Blé +Wheat Seed=Grain de blé +Wild Cotton=Coton sauvage +Wooden Bowl=Bol en bois +Wooden Hoe=Binette en bois diff --git a/mods/farming/locale/farming.it.tr b/mods/farming/locale/farming.it.tr index 95c1478..d041ac2 100644 --- a/mods/farming/locale/farming.it.tr +++ b/mods/farming/locale/farming.it.tr @@ -1,25 +1,134 @@ -# 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 +# textdomain:farming +#%s Hoe= +Apple Donut=Ciambella alla mela +#Apple Pie= +Baked Potato=Patata arrostita +Baking Tray=Teglia da forno +Banana=Banana +Banana Leaves=Foglie di banano +Bar of Dark Chocolate=Barra di cioccolato fondente +Barley=Orzo +Barley Seed=Seme d'orzo +Bean Pole (place on soil before planting beans)=Palina per fagiolini (mettila sul terreno coltivabile prima di piantare i fagiolini) +Beetroot=Barbabietola +Beetroot Soup=Zuppa di barbabietola +#Bibimbap= +Wild Blueberries=Mirtilli Selvatici +Blueberry Muffin=Focaccina di mirtilli +Blueberry Pie=Tortino di mirtilli +Bottle of Ethanol=Bottiglia di alcol etilico +Bottle of Hemp Oil=Bottiglia d'olio di canapa +Bowl of Chili=Ciotola di peperoncino +Bread=Pane +Bronze Hoe=Zappa di bronzo +#Cabbage= +#Cactus Juice= +Carrot=Carota +Carrot Juice=Succo di carota +Chili Pepper=Peperoncino +Chocolate Block=Blocco di cioccolato +Chocolate Donut=Ciambella al cioccolato +Cocoa Beans=Chicchi di cacao +Coffee Beans=Chicchi di caffè +Cookie=Biscotto +Cooking Pot=Pentola da cottura +Corn=Mais +Corn on the Cob=Pannocchia arrostita +Cornstarch=Amido di mais +Cotton=Cotone +Cotton Seed=Seme di cotone +Cucumber=Cetriolo +Cucumber and Potato Salad=Insalata di patate e cetrioli +Cup of Coffee=Tazza di caffè +Cutting Board=Tagliere +Diamond Hoe=Zappa di diamante +Donut=Ciambella +Flour=Farina +Garlic=Aglio +Garlic Braid=Treccia d'aglio +Garlic Bread=Pane all'aglio +Garlic clove=Spicchio d'aglio +Glass Mixing Bowl=Terrina di vetro +Golden Carrot=Carota d'oro +Grapes=Chicchi d'uva +Green Beans=Fagiolini +Ground Pepper=Pepe macinato +Hemp Block=Blocco di canapa +Hemp Fibre=Fibra di canapa +Hemp Leaf=Foglia di canapa +Hemp Rope=Corda di canapa +Hemp Seed=Seme di canapa +Hoe=Zappa +Hoe Bomb (use or throw on grassy areas to hoe land)=Bomba zappa (usala o lanciala sulle aree erbose per zappare il terreno) +Jack 'O Lantern (punch to turn on and off)=Jack Lanterna (colpirlo per accenderlo e spegnerlo) +Jaffa Cake=Torta di jaffa +Juicer=Spremiagrumi +Melon=Anguria +Melon Slice=Fetta d'anguria +Mese Hoe=Zappa di mese +#Mint Leaf= +#Mint Seeds= +#Mint Tea= +Mithril Scythe (Right-click to harvest and replant crops)=Falce di mithril (clicca col destro per raccogliere e ripiantare le prose) +Mortar and Pestle=Mortaio e pestello +Multigrain Bread=Pane multicereale +Multigrain Flour=Farina multicereale +Oat seed=Seme d'avena +#Oats= +Onion=Cipolla +#Onion Soup= +Orange=Arancia +#Pasta= +Pea Pod=Baccello di piselli +Pea Soup=Zuppa di piselli +Peas=Piselli +Pepper=Pepe +Peppercorn=Grano di pepe +Pineapple=Ananas +Pineapple Juice=Succo d'ananas +Pineapple Ring=Anello d'ananas +Pineapple Top=Cima d'ananas +Porridge=Porridge +Potato=Patata +Pumpkin=Zucca +Pumpkin Bread=Pane alla zucca +Pumpkin Dough=Pasta di zucca +Pumpkin Slice=Fetta di zucca +Raspberries=Lamponi +Raspberry Smoothie=Purea di lamponi +Rhubarb=Rabarbaro +Rhubarb Pie=Tortino al rabarbaro +Rice=Riso +Rice Bread=Pane di riso +Rice Flour=Farina di riso +Rice grains=Chicchi di riso +Rose Water=Acqua di rose +Rye=Segale +Rye seed=Seme di segale +Salt=Sale +Saucepan=Casseruola +#Savanna Soil= +Scarecrow Bottom=Fondo dello spaventapasseri +Seed=Seme +Skillet=Padella +Sliced Bread=Pane a fette +Soil=Terreno coltivabile +#Spaghetti= +Steel Hoe=Zappa d'acciaio +Stone Hoe=Zappa di pietra +Straw=Paglia +Strawberry=Fragola +String=Filo +Sugar=Zucchero +Toast=Pane tostato +Toast Sandwich=Panino di pane tostato +Tomato=Pomodoro +Trellis (place on soil before planting grapes)=Graticcio (mettilo sul terreno coltivabile prima di piantare i chicchi d'uva) +Turkish Delight=Lokum +#Wet Savanna Soil= +Wet Soil=Terreno coltivabile bagnato +Wheat=Grano +Wheat Seed=Seme di grano +#Wild Cotton= +Wooden Bowl=Ciotola di legno +Wooden Hoe=Zappa di legno diff --git a/mods/farming/locale/farming.ms.tr b/mods/farming/locale/farming.ms.tr deleted file mode 100644 index 408f495..0000000 --- a/mods/farming/locale/farming.ms.tr +++ /dev/null @@ -1,25 +0,0 @@ -# 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.pt.tr b/mods/farming/locale/farming.pt.tr new file mode 100644 index 0000000..c2c2248 --- /dev/null +++ b/mods/farming/locale/farming.pt.tr @@ -0,0 +1,134 @@ +# textdomain:farming +#%s Hoe= +Apple Donut=Donut de Maça +#Apple Pie= +Baked Potato=Batata Cozida +#Baking Tray= +#Banana= +#Banana Leaves= +Bar of Dark Chocolate=Barra de Chocolate Preto +Barley=Cevada +Barley Seed=Sementes de Cevada +Bean Pole (place on soil before planting beans)=Apoio de feijao (coloque no solo antes de plantar feijao) +#Beetroot= +#Beetroot Soup= +#Bibimbap= +Wild Blueberries=Mirtilos Selvagens +Blueberry Muffin=Muffin de Mirtilos +#Blueberry Pie= +Bottle of Ethanol=Garrafa de Etanol +Bottle of Hemp Oil=Garrafa de Oleo de Canhamo +#Bowl of Chili= +Bread=Pao +Bronze Hoe=Enxada de Bronze +#Cabbage= +#Cactus Juice= +Carrot=Cenoura +#Carrot Juice= +#Chili Pepper= +#Chocolate Block= +Chocolate Donut=Donut de Chocolate +Cocoa Beans=Amendoas de Cacau +Coffee Beans=Grao de Cafe +Cookie=Cookie +#Cooking Pot= +Corn=Milho +Corn on the Cob=Espiga de Milho +#Cornstarch= +Cotton=Algodao +Cotton Seed=Sementes de Algodao +Cucumber=Pepino +#Cucumber and Potato Salad= +Cup of Coffee=Xicara de Cafe +#Cutting Board= +Diamond Hoe=Enxada de Diamante +Donut=Donut +Flour=Farinha +#Garlic= +#Garlic Braid= +#Garlic Bread= +#Garlic clove= +#Glass Mixing Bowl= +Golden Carrot=Cenoura Dourada +Grapes=Uvas +Green Beans=Feijoes Verdes +#Ground Pepper= +#Hemp Block= +Hemp Fibre=Fibra de Canhamo +Hemp Leaf=Folha de Canhamo +Hemp Rope=Corda de Canhamo +Hemp Seed=Sementes de Canhamo +Hoe=Enxada +#Hoe Bomb (use or throw on grassy areas to hoe land)= +Jack 'O Lantern (punch to turn on and off)=Jack 'O Lantern (Socos para ligar e desligar) +#Jaffa Cake= +#Juicer= +Melon=Melancia +Melon Slice=Sementes de Melancia +Mese Hoe=Enxada de Mese +#Mint Leaf= +#Mint Seeds= +#Mint Tea= +#Mithril Scythe (Right-click to harvest and replant crops)= +#Mortar and Pestle= +#Multigrain Bread= +#Multigrain Flour= +#Oat seed= +#Oats= +#Onion= +#Onion Soup= +#Orange= +#Pasta= +#Pea Pod= +#Pea Soup= +#Peas= +#Pepper= +#Peppercorn= +#Pineapple= +#Pineapple Juice= +#Pineapple Ring= +#Pineapple Top= +#Porridge= +Potato=Batata +Pumpkin=Abobora +Pumpkin Bread=Pao de Abobora +Pumpkin Dough=Massa de Abobora +Pumpkin Slice=Pedaço de Abobora +Raspberries=Framboesa +Raspberry Smoothie=Batida de Framboesa +Rhubarb=Ruibarbo +Rhubarb Pie=Torta de Ruibarbo +#Rice= +#Rice Bread= +#Rice Flour= +#Rice grains= +#Rose Water= +#Rye= +#Rye seed= +#Salt= +#Saucepan= +#Savanna Soil= +#Scarecrow Bottom= +Seed=Sementes +#Skillet= +#Sliced Bread= +Soil=Solo +#Spaghetti= +Steel Hoe=Enxada de Aço +Stone Hoe=Enxada de Pedra +Straw=Palha +#Strawberry= +#String= +Sugar=Açucar +#Toast= +#Toast Sandwich= +Tomato=Tomate +Trellis (place on soil before planting grapes)=Grade de Ripas (colocar no solo antes de plantar uvas) +#Turkish Delight= +#Wet Savanna Soil= +Wet Soil=Solo Seco +Wheat=Trigo +Wheat Seed=Sementes de Trigo +#Wild Cotton= +#Wooden Bowl= +Wooden Hoe=Enxada de Madeira diff --git a/mods/farming/locale/farming.ru.tr b/mods/farming/locale/farming.ru.tr index ad6249b..dce5eb1 100644 --- a/mods/farming/locale/farming.ru.tr +++ b/mods/farming/locale/farming.ru.tr @@ -1,25 +1,134 @@ -# textdomain: farming -Wooden Hoe=Деревянная Мотыга -Stone Hoe=Каменная Мотыга -Steel Hoe=Стальная Мотыга -Bronze Hoe=Бронзовая Мотыга -Mese Hoe=Месе Мотыга -Diamond Hoe=Алмазная Мотыга -Wheat Seed=Семена Пшеницы -Flour=Мука +# textdomain:farming +%s Hoe=%s мотыга +Apple Donut=Яблочный пончик +Apple Pie=Яблочный пирог +Baked Potato=Печеный картофель +Baking Tray=Противень +Banana=Банан +Banana Leaves=Листья банана +Bar of Dark Chocolate=Плитка темного шоколада +Barley=Ячмень +Barley Seed=Семена ячменя +Bean Pole (place on soil before planting beans)=Жердь для бобовых (установите на почву перед посадкой бобовых) +Beetroot=Свекла +Beetroot Soup=Борщ +#Bibimbap= +Wild Blueberries=Голубика +Blueberry Muffin=Кекс с голубикой +Blueberry Pie=Пирог с голубикой +Bottle of Ethanol=Бутылка спирта +Bottle of Hemp Oil=Бутылка конопляного масла +Bowl of Chili=Миска чили 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=Пшеница +Bronze Hoe=Бронзовая мотыга +#Cabbage= +Cactus Juice=Кактусовый сок +Carrot=Морковь +Carrot Juice=Морковный сок +Chili Pepper=Перец чили +Chocolate Block=Шоколадный блок +Chocolate Donut=Шоколадный пончик +Cocoa Beans=Какао-бобы +Coffee Beans=Кофейные зерна +Cookie=Печенье +Cooking Pot=Котел +Corn=Кукуруза +Corn on the Cob=Початок кукурузы +Cornstarch=Кукурузный крахмал Cotton=Хлопок +Cotton Seed=Семена хлопка +Cucumber=Огурец +Cucumber and Potato Salad=Салат из огурцов и картофеля +Cup of Coffee=Чашка кофе +Cutting Board=Разделочная доска +Diamond Hoe=Алмазная мотыга +Donut=Пончик +Flour=Мука +Garlic=Чеснок +Garlic Braid=Связка чеснока +Garlic Bread=Чесночный хлеб +Garlic clove=Зубчик чеснока +Glass Mixing Bowl=Стеклянная чаша +Golden Carrot=Золотая морковь +Grapes=Виноград +Green Beans=Зеленая фасоль +Ground Pepper=Молотый перец +Hemp Block=Блок конопли +Hemp Fibre=Конопляное волокно +Hemp Leaf=Лист конопли +Hemp Rope=Пеньковая веревка +Hemp Seed=Семена конопли +Hoe=Мотыга +Hoe Bomb (use or throw on grassy areas to hoe land)=Мотыгобомба (используйте или бросьте на траву для ее обработки) +Jack 'O Lantern (punch to turn on and off)=Светильник джека (удар для включения и выключения) +Jaffa Cake=Яффский пирог +Juicer=Соковыжималка +Melon=Арбуз +Melon Slice=Долька арбуза +Mese Hoe=Магическая мотыга +Mint Leaf=Лист мяты +Mint Seeds=Семена мяты +Mint Tea=Чай с мятой +Mithril Scythe (Right-click to harvest and replant crops)=Мифриловая коса (Щелкните правой кнопкой мыши для сбора и пересадки растений) +Mortar and Pestle=Ступка и пестик +Multigrain Bread=Мультизерновой хлеб +Multigrain Flour=Мультизерновая мука +Oat seed=Семена овса +#Oats= +Onion=Лук +Onion Soup=Луковый суп +Orange=Апельсин +#Pasta= +Pea Pod=Стручок гороха +Pea Soup=Гороховый суп +Peas=Горох +Pepper=Перец +Peppercorn=Перчинка +Pineapple=Ананас +Pineapple Juice=Ананасовый сок +Pineapple Ring=Кольцо ананаса +Pineapple Top=Верхушка ананаса +Porridge=Каша +Potato=Картофель +Pumpkin=Тыква +Pumpkin Bread=Тыквенный хлеб +Pumpkin Dough=Тыквенное тесто +Pumpkin Slice=Ломтик тыквы +Raspberries=Малина +Raspberry Smoothie=Малиновый смузи +Rhubarb=Ревень +Rhubarb Pie=Пирог с ревенем +Rice=Рис +Rice Bread=Рисовый хлеб +Rice Flour=Рисовая мука +Rice grains=Зёрна риса +Rose Water=Розовая вода +Rye=Рожь +Rye seed=Зёрна ржи +Salt=Соль +Saucepan=Кастрюля +Savanna Soil=Земля саванны +Scarecrow Bottom=Основание пугала +Seed=Семена +Skillet=Сковорода +Sliced Bread=Нарезанный хлеб +Soil=Земля +#Spaghetti= +Steel Hoe=Стальная мотыга +Stone Hoe=Каменная мотыга +Straw=Солома +Strawberry=Земляника +String=Нить +Sugar=Сахар +Toast=Тост +Toast Sandwich=Сэндвич +Tomato=Помидор +Trellis (place on soil before planting grapes)=Решетка (поставьте на почву перед посадкой винограда) +Turkish Delight=Рахат-лукум +Wet Savanna Soil=Увлажненная земля саванны +Wet Soil=Увлажненная земля +Wheat=Пшеница +Wheat Seed=Зёрна пшеницы +Wild Cotton=Дикорастущий хлопок +Wooden Bowl=Деревянная миска +Wooden Hoe=Деревянная мотыга diff --git a/mods/farming/locale/farming.se.tr b/mods/farming/locale/farming.se.tr deleted file mode 100644 index 6218e3a..0000000 --- a/mods/farming/locale/farming.se.tr +++ /dev/null @@ -1,25 +0,0 @@ -# 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.zh_CN.tr b/mods/farming/locale/farming.zh_CN.tr index d856288..adc97fe 100644 --- a/mods/farming/locale/farming.zh_CN.tr +++ b/mods/farming/locale/farming.zh_CN.tr @@ -1,25 +1,134 @@ -# textdomain: farming -Wooden Hoe=木锄头 -Stone Hoe=石锄头 -Steel Hoe=铁锄头 -Bronze Hoe=青铜锄头 -Mese Hoe=黄石锄头 -Diamond Hoe=钻石锄头 -Wheat Seed=小麦种子 -Flour=面粉 +# textdomain:farming +#%s Hoe= +Apple Donut=苹果甜甜圈 +#Apple Pie= +Baked Potato=焗马铃薯 +Baking Tray=烤盘 +Banana=香蕉 +Banana Leaves=香蕉叶 +Bar of Dark Chocolate=黑巧克力条 +Barley=大麦 +Barley Seed=大麦种子 +Bean Pole (place on soil before planting beans)=豆杆(种豆前先放在土上) +Beetroot=甜菜根 +Beetroot Soup=甜菜根汤 +#Bibimbap= +Wild Blueberries=蓝莓 +Blueberry Muffin=蓝莓松糕 +Blueberry Pie=蓝莓派 +Bottle of Ethanol=一瓶乙醇 +Bottle of Hemp Oil=一瓶大麻油 +Bowl of Chili=一碗辣椒 Bread=面包 -Cotton Seed=棉花种子 -String=线 -Soil=土 -Wet Soil=湿土 -Dry Soil=干土 -Wet Dry Soil=湿干土 -Desert Sand Soil=沙漠沙土 -Wet Desert Sand Soil=湿沙漠沙土 +Bronze Hoe=青铜锄头 +#Cabbage= +#Cactus Juice= +Carrot=胡萝卜 +Carrot Juice=胡萝卜汁 +Chili Pepper=辣椒 +Chocolate Block=巧克力块 +Chocolate Donut=巧克力甜甜圈 +Cocoa Beans=可可豆 +Coffee Beans=咖啡豆 +Cookie=曲奇 +Cooking Pot=锅 +Corn=玉米 +Corn on the Cob=玉米棒 +Cornstarch=玉米淀粉 +Cotton=棉花 +Cotton Seed=棉籽 +Cucumber=黄瓜 +Cucumber and Potato Salad=黄瓜土豆沙拉 +Cup of Coffee=一杯咖啡 +Cutting Board=砧板 +Diamond Hoe=钻石锄 +Donut=甜甜圈 +Flour=面粉 +Garlic=大蒜 +Garlic Braid=蒜辫 +Garlic Bread=蒜香面包 +Garlic clove=蒜瓣 +Glass Mixing Bowl=搅拌杯 +Golden Carrot=金萝卜 +Grapes=葡萄 +Green Beans=青豆 +Ground Pepper=胡椒粉 +Hemp Block=麻块 +Hemp Fibre=大麻纤维 +Hemp Leaf=大麻叶 +Hemp Rope=麻绳 +Hemp Seed=大麻籽 +Hoe=锄头 +Hoe Bomb (use or throw on grassy areas to hoe land)=锄弹(在草地上使用或扔在锄地上) +Jack 'O Lantern (punch to turn on and off)=杰克灯(按一下开关) +Jaffa Cake=佳发饼 +Juicer=榨汁机 +Melon=甜瓜 +Melon Slice=西瓜片 +Mese Hoe=黄石锄头 +#Mint Leaf= +#Mint Seeds= +#Mint Tea= +Mithril Scythe (Right-click to harvest and replant crops)=秘银镰刀(右击可收获并重新种植作物) +Mortar and Pestle=研钵 +Multigrain Bread=杂粮面包 +Multigrain Flour=多粒面粉 +Oat seed=燕麦籽 +#Oats= +Onion=洋葱 +#Onion Soup= +Orange=橙色 +#Pasta= +Pea Pod=豌豆荚 +Pea Soup=豌豆汤 +Peas=豌豆 +Pepper=胡椒粉 +Peppercorn=胡椒粉 +Pineapple=菠萝 +Pineapple Juice=菠萝汁 +Pineapple Ring=菠萝圈 +Pineapple Top=菠萝上衣 +Porridge=粥 +Potato=土豆 +Pumpkin=南瓜 +Pumpkin Bread=南瓜面包 +Pumpkin Dough=南瓜面团 +Pumpkin Slice=南瓜片 +Raspberries=覆盆子 +Raspberry Smoothie=覆盆子冰沙 +Rhubarb=大黄 +Rhubarb Pie=大黄派 +Rice=大米 +Rice Bread=米饭面包 +Rice Flour=米粉 +Rice grains=稻谷 +Rose Water=玫瑰汁 +Rye=黑麦 +Rye seed=黑麦种子 +Salt=盐 +Saucepan=平底锅 +#Savanna Soil= +Scarecrow Bottom=稻草人屁股 +Seed=种子 +Skillet=平底锅 +Sliced Bread=切片面包 +Soil=土壤 +#Spaghetti= +Steel Hoe=钢锄头 +Stone Hoe=石锄 Straw=稻草 -Straw Stair=稻草台阶 -Inner Straw Stair=稻草内楼梯 -Outer Straw Stair=稻草外楼梯 -Straw Slab=稻草板 +Strawberry=草莓 +String=线 +Sugar=糖 +Toast=烤面包片 +Toast Sandwich=三明治面包 +Tomato=番茄 +Trellis (place on soil before planting grapes)=棚架(种植葡萄前先放在土壤上) +Turkish Delight=土耳其软糖 +#Wet Savanna Soil= +Wet Soil=湿土 Wheat=小麦 -Cotton=棉 +Wheat Seed=小麦种子 +#Wild Cotton= +Wooden Bowl=木碗 +Wooden Hoe=木锄 diff --git a/mods/farming/locale/farming.zh_TW.tr b/mods/farming/locale/farming.zh_TW.tr index f1b7a7a..1ec8279 100644 --- a/mods/farming/locale/farming.zh_TW.tr +++ b/mods/farming/locale/farming.zh_TW.tr @@ -1,25 +1,134 @@ -# textdomain: farming -Wooden Hoe=木鋤頭 -Stone Hoe=石鋤頭 -Steel Hoe=鐵鋤頭 -Bronze Hoe=青銅鋤頭 -Mese Hoe=黃石鋤頭 -Diamond Hoe=鑽石鋤頭 -Wheat Seed=小麥種子 -Flour=麵粉 +# textdomain:farming +#%s Hoe= +Apple Donut=蘋果甜甜圈 +#Apple Pie= +Baked Potato=焗馬鈴薯 +Baking Tray=烤盤 +Banana=香蕉 +Banana Leaves=香蕉葉 +Bar of Dark Chocolate=黑巧克力條 +Barley=大麥 +Barley Seed=大麥種子 +Bean Pole (place on soil before planting beans)=豆杆(種豆前先放在土上) +Beetroot=甜菜根 +Beetroot Soup=甜菜根湯 +#Bibimbap= +Wild Blueberries=藍莓 +Blueberry Muffin=藍莓鬆糕 +Blueberry Pie=藍莓派 +Bottle of Ethanol=一瓶乙醇 +Bottle of Hemp Oil=一瓶大麻油 +Bowl of Chili=一碗辣椒 Bread=麵包 -Cotton Seed=棉花種子 -String=線 -Soil=土 -Wet Soil=溼土 -Dry Soil=乾土 -Wet Dry Soil=溼乾土 -Desert Sand Soil=沙漠沙土 -Wet Desert Sand Soil=溼沙漠沙土 +Bronze Hoe=青銅鋤頭 +#Cabbage= +#Cactus Juice= +Carrot=胡蘿蔔 +Carrot Juice=胡蘿蔔汁 +Chili Pepper=辣椒 +Chocolate Block=巧克力塊 +Chocolate Donut=巧克力甜甜圈 +Cocoa Beans=可可豆 +Coffee Beans=咖啡豆 +Cookie=曲奇 +Cooking Pot=鍋 +Corn=玉米 +Corn on the Cob=玉米棒 +Cornstarch=玉米澱粉 +Cotton=棉花 +Cotton Seed=棉籽 +Cucumber=黃瓜 +Cucumber and Potato Salad=黃瓜土豆沙拉 +Cup of Coffee=一杯咖啡 +Cutting Board=砧板 +Diamond Hoe=鑽石鋤 +Donut=甜甜圈 +Flour=麵粉 +Garlic=大蒜 +Garlic Braid=蒜辮 +Garlic Bread=蒜香麵包 +Garlic clove=蒜瓣 +Glass Mixing Bowl=攪拌杯 +Golden Carrot=金蘿蔔 +Grapes=葡萄 +Green Beans=青豆 +Ground Pepper=胡椒粉 +Hemp Block=麻塊 +Hemp Fibre=大麻纖維 +Hemp Leaf=大麻葉 +Hemp Rope=麻繩 +Hemp Seed=大麻籽 +Hoe=鋤頭 +Hoe Bomb (use or throw on grassy areas to hoe land)=鋤彈(在草地上使用或扔在鋤地上) +Jack 'O Lantern (punch to turn on and off)=南瓜燈(按一下開關) +Jaffa Cake=佳發餅 +Juicer=榨汁機 +Melon=甜瓜 +Melon Slice=西瓜片 +Mese Hoe=黃石鋤頭 +#Mint Leaf= +#Mint Seeds= +#Mint Tea= +Mithril Scythe (Right-click to harvest and replant crops)=祕銀鐮刀(右擊可收穫並重新種植作物) +Mortar and Pestle=研缽 +Multigrain Bread=雜糧麵包 +Multigrain Flour=多粒麵粉 +Oat seed=燕麥籽 +#Oats= +Onion=洋蔥 +#Onion Soup= +Orange=橙色 +#Pasta= +Pea Pod=豌豆莢 +Pea Soup=豌豆湯 +Peas=豌豆 +Pepper=胡椒粉 +Peppercorn=胡椒粉 +Pineapple=菠蘿 +Pineapple Juice=菠蘿汁 +Pineapple Ring=菠蘿圈 +Pineapple Top=菠蘿上衣 +Porridge=粥 +Potato=土豆 +Pumpkin=南瓜 +Pumpkin Bread=南瓜麵包 +Pumpkin Dough=南瓜麵糰 +Pumpkin Slice=南瓜片 +Raspberries=覆盆子 +Raspberry Smoothie=覆盆子冰沙 +Rhubarb=大黃 +Rhubarb Pie=大黃派 +Rice=大米 +Rice Bread=米飯麵包 +Rice Flour=米粉 +Rice grains=稻穀 +Rose Water=玫瑰汁 +Rye=黑麥 +Rye seed=黑麥種子 +Salt=鹽 +Saucepan=平底鍋 +#Savanna Soil= +Scarecrow Bottom=稻草人屁股 +Seed=種子 +Skillet=平底鍋 +Sliced Bread=切片面包 +Soil=土壤 +#Spaghetti= +Steel Hoe=鋼鋤頭 +Stone Hoe=石鋤 Straw=稻草 -Straw Stair=稻草臺階 -Inner Straw Stair=稻草內樓梯 -Outer Straw Stair=稻草外樓梯 -Straw Slab=稻草板 +Strawberry=草莓 +String=字符串 +Sugar=糖 +Toast=烤麵包片 +Toast Sandwich=三明治麵包 +Tomato=番茄 +Trellis (place on soil before planting grapes)=棚架(種植葡萄前先放在土壤上) +Turkish Delight=土耳其軟糖 +#Wet Savanna Soil= +Wet Soil=溼土 Wheat=小麥 -Cotton=棉 +Wheat Seed=小麥種子 +#Wild Cotton= +Wooden Bowl=木碗 +Wooden Hoe=木鋤 diff --git a/mods/farming/locale/fr.txt b/mods/farming/locale/fr.txt new file mode 100644 index 0000000..95559a7 --- /dev/null +++ b/mods/farming/locale/fr.txt @@ -0,0 +1,196 @@ +# Traduction Française du mod farming par TenPlus1 +# textdomain: farming +# author: Papaou30 +# author: TheDarkTiger +# author: SwissalpS +# last update: 2022/Feb/26 + +###### folder . ###### + +### init.lua ### +Seed=Graine + +### compatibility.lua ### +Banana=Banane +Banana Leaves=Feuilles de banane +Orange=Orange +Strawberry=Fraise + +### food.lua ### +Sugar=Sucre +Salt=Sel +Rose Water=Eau de rose +Turkish Delight=Douceur turque +Garlic Bread=Pain à l'ail +Donut=Beignet +Chocolate Donut=Beignet au chocolat +Apple Donut=Beignet aux pommes +Porridge=Gruau de céréales +Jaffa Cake=Petit gâteau à l'orange "Jaffa" + +### hoes.lua ### +Hoe=Binette +Wooden Hoe=Binette en bois +Stone Hoe=Binette en pierre +Steel Hoe=Binette en acier +Bronze Hoe=Binette en bronze +Mese Hoe=Binette en mese +Diamond Hoe=Binette en diamant +# Surcharge du mod [Toolranks] à faire # +Hoe Bomb (use or throw on grassy areas to hoe land)=Bombe à binnage (Actionner ou lancer sur une zone herbeuse pour la binner) +Mithril Scythe (Right-click to harvest and replant crops)=Faux en mithril (Récolte et replante des graines) +# Surcharge du mod [Toolranks] à faire # + +### soil.lua ### +Soil=Terre binnée +Wet Soil=Terre humide et binnée + +### utensils.lua ### +Wooden Bowl=Bol en bois +Saucepan=Casserole +Cooking Pot=Marmitte +Baking Tray=Lèche-frite +Skillet=Poêle +Mortar and Pestle=Mortier et pilon +Cutting Board=Planche à découper +Juicer=Presse-agrumes +Glass Mixing Bowl=Terrine en verre + + +###### folder ./crops ###### + +### barley.lua ### +Barley Seed=Graine d'orge +Barley=Orge + +### beans.lua ### +Green Beans=Haricots verts +Bean Pole (place on soil before planting beans)=Tuteur pour haricots (placer sur le sol avant de planter des haricots) + +### beetroot.lua ### +Beetroot=Betterave +Beetroot Soup=Soupe de betterave + +### blueberry.lua ### +Blueberries=Myrtilles +Blueberry Muffin=Muffin aux myrtilles +Blueberry Pie=Tarte aux myrtilles + +### carrot.lua ## +Carrot=Carotte +Carrot Juice=Jus de carotte +Golden Carrot=Carotte dorée + +### chili.lua ### +Chili Pepper=Piment fort +Bowl of Chili=Bol de chilli + +### cocoa.lua ### +Cocoa Beans=Fèves de cacao +Cookie=Biscuit +Bar of Dark Chocolate=Tablette de chocolat noir +Chocolate Block=Bloc de chocolat + +### coffee.lua ### +Coffee Beans=Grains de café +Cup of Coffee=Tasse de café + +### corn.lua ### +Corn=Maïs +Corn on the Cob=Cobette (maïs cuit) +Cornstarch=Fécule de maïs +Bottle of Ethanol=Bouteille d'éthanol + +### cotton.lua ### +Cotton Seed=Graines de coton +Cotton=Coton +String=Ficelle + +### cucumber.lua ### +Cucumber=Concombre + +### garlic.lua ### +Garlic clove=Gousse d'ail +Garlic=Tête d'ail +Garlic Braid=Ail tressé + +### grapes.lua ### +Grapes=Raisins +Trellis (place on soil before planting grapes)=Treillis (placer sur le sol avant de planter la vigne) + +### hemp.lua ### +Hemp Seed=Graines de chanvre +Hemp Leaf=Feuille de chanvre +Bottle of Hemp Oil=Bouteille d'huile de chanvre +Hemp Fibre=Fibre de chanvre +Hemp Block=Bloc de chanvre +Hemp Rope=Corde de chanvre + +### melon.lua ### +Melon Slice=Tranche de melon +Melon=Melon + +### onion.lua ### +Onion=Oignon + +### peas.lua ### +Pea Pod=Cosse de petit-pois +Peas=Petit-pois +Pea Soup=Soupe de petit-pois + +### pepper.lua ### +Peppercorn=Grain de poivre +Pepper=Poivron +Ground Pepper=Poivre moulu + +### pinapple.lua ### +Pineapple Top=Pousse d'ananas +Pineapple=Ananas +Pineapple Ring=Tranche d'ananas +Pineapple Juice=Jus d'ananas + +### potato.lua ### +Potato=Pomme de terre +Baked Potato=Pomme de terre cuite +Cucumber and Potato Salad=Salade de pomme de terre et concombre + +### pumpkin.lua ### +Pumpkin Slice=Tranche de citrouille +Jack 'O Lantern (punch to turn on and off)=Jack 'O Lantern (Frapper pour allumer et éteindre) +Scarecrow Bottom=Base d'épouventail +Pumpkin Bread=Pain à la citrouille +Pumpkin Dough=Pâton de pain à la citrouille +Pumpkin=Citrouille + +### raspberry.lua ### +Raspberries=Framboises +Raspberry Smoothie=Smoothie aux framboises + +### rhubarb.lua ### +Rhubarb=Rhubarbe +Rhubarb Pie=Tarte à la rhubarbe + +### ryeoatrice.lua ### +Rye=Seigle +Rye seed=Grains de seigle +Oat=Orge +Oat seed=Grains d'orge +Rice=Riz +Rice grains=Grain de riz +Rice Bread=Pain de riz +Rice Flour=Farine de riz +Multigrain Flour=Farine multi-céréales +Multigrain Bread=Pain aux céréales + +### tomato.lua ### +Tomato=Tomate + +### wheat.lua ### +Wheat Seed=Grain de blé +Wheat=Blé +Straw=Paille +Flour=Farine +Bread=Pain +Sliced Bread=Tranche de pain +Toast=Pain grillé +Toast Sandwich=Sandwich au pain grillé diff --git a/mods/farming/locale/it.txt b/mods/farming/locale/it.txt new file mode 100644 index 0000000..cbb6a2d --- /dev/null +++ b/mods/farming/locale/it.txt @@ -0,0 +1,194 @@ +# Translation of the farming mod by TenPlus1 +# textdomain: farming +# author: (Hamlet) +# last update: 2020/Jun/02 + +###### folder . ###### + +### init.lua ### +Seed=Seme + +### compatibility.lua ### +Banana=Banana +Banana Leaves=Foglie di banano +Orange=Arancia +Strawberry=Fragola + +### food.lua ### +Sugar=Zucchero +Salt=Sale +Rose Water=Acqua di rose +Turkish Delight=Lokum +Garlic Bread=Pane all'aglio +Donut=Ciambella +Chocolate Donut=Ciambella al cioccolato +Apple Donut=Ciambella alla mela +Porridge=Porridge +Jaffa Cake=Torta di jaffa + +### hoes.lua ### +Hoe=Zappa +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 +# Surcharge du mod [Toolranks] à faire # +Hoe Bomb (use or throw on grassy areas to hoe land)=Bomba zappa (usala o lanciala sulle aree erbose per zappare il terreno) +Mithril Scythe (Right-click to harvest and replant crops)=Falce di mithril (clicca col destro per raccogliere e ripiantare le prose) +# Surcharge du mod [Toolranks] à faire # + +### soil.lua ### +Soil=Terreno coltivabile +Wet Soil=Terreno coltivabile bagnato + +### utensils.lua ### +Wooden Bowl=Ciotola di legno +Saucepan=Casseruola +Cooking Pot=Pentola da cottura +Baking Tray=Teglia da forno +Skillet=Padella +Mortar and Pestle=Mortaio e pestello +Cutting Board=Tagliere +Juicer=Spremiagrumi +Glass Mixing Bowl=Terrina di vetro + + +###### folder ./crops ###### + +### barley.lua ### +Barley Seed=Seme d'orzo +Barley=Orzo + +### beans.lua ### +Green Beans=Fagiolini +Bean Pole (place on soil before planting beans)=Palina per fagiolini (mettila sul terreno coltivabile prima di piantare i fagiolini) + +### beetroot.lua ### +Beetroot=Barbabietola +Beetroot Soup=Zuppa di barbabietola + +### blueberry.lua ### +Blueberries=Mirtilli +Blueberry Muffin=Focaccina di mirtilli +Blueberry Pie=Tortino di mirtilli + +### carrot.lua ## +Carrot=Carota +Carrot Juice=Succo di carota +Golden Carrot=Carota d'oro + +### chili.lua ### +Chili Pepper=Peperoncino +Bowl of Chili=Ciotola di peperoncino + +### cocoa.lua ### +Cocoa Beans=Chicchi di cacao +Cookie=Biscotto +Bar of Dark Chocolate=Barra di cioccolato fondente +Chocolate Block=Blocco di cioccolato + +### coffee.lua ### +Coffee Beans=Chicchi di caffè +Cup of Coffee=Tazza di caffè + +### corn.lua ### +Corn=Mais +Corn on the Cob=Pannocchia arrostita +Cornstarch=Amido di mais +Bottle of Ethanol=Bottiglia di alcol etilico + +### cotton.lua ### +Cotton Seed=Seme di cotone +Cotton=Cotone +String=Filo + +### cucumber.lua ### +Cucumber=Cetriolo + +### garlic.lua ### +Garlic clove=Spicchio d'aglio +Garlic=Aglio +Garlic Braid=Treccia d'aglio + +### grapes.lua ### +Grapes=Chicchi d'uva +Trellis (place on soil before planting grapes)=Graticcio (mettilo sul terreno coltivabile prima di piantare i chicchi d'uva) + +### hemp.lua ### +Hemp Seed=Seme di canapa +Hemp Leaf=Foglia di canapa +Bottle of Hemp Oil=Bottiglia d'olio di canapa +Hemp Fibre=Fibra di canapa +Hemp Block=Blocco di canapa +Hemp Rope=Corda di canapa + +### melon.lua ### +Melon Slice=Fetta d'anguria +Melon=Anguria + +### onion.lua ### +Onion=Cipolla + +### peas.lua ### +Pea Pod=Baccello di piselli +Peas=Piselli +Pea Soup=Zuppa di piselli + +### pepper.lua ### +Peppercorn=Grano di pepe +Pepper=Pepe +Ground Pepper=Pepe macinato + +### pinapple.lua ### +Pineapple Top=Cima d'ananas +Pineapple=Ananas +Pineapple Ring=Anello d'ananas +Pineapple Juice=Succo d'ananas + +### potato.lua ### +Potato=Patata +Baked Potato=Patata arrostita +Cucumber and Potato Salad=Insalata di patate e cetrioli + +### pumpkin.lua ### +Pumpkin Slice=Fetta di zucca +Jack 'O Lantern (punch to turn on and off)=Jack Lanterna (colpirlo per accenderlo e spegnerlo) +Scarecrow Bottom=Fondo dello spaventapasseri +Pumpkin Bread=Pane alla zucca +Pumpkin Dough=Pasta di zucca +Pumpkin=Zucca + +### raspberry.lua ### +Raspberries=Lamponi +Raspberry Smoothie=Purea di lamponi + +### rhubarb.lua ### +Rhubarb=Rabarbaro +Rhubarb Pie=Tortino al rabarbaro + +### ryeoatrice.lua ### +Rye=Segale +Rye seed=Seme di segale +Oat=Avena +Oat seed=Seme d'avena +Rice=Riso +Rice grains=Chicchi di riso +Rice Bread=Pane di riso +Rice Flour=Farina di riso +Multigrain Flour=Farina multicereale +Multigrain Bread=Pane multicereale + +### tomato.lua ### +Tomato=Pomodoro + +### wheat.lua ### +Wheat Seed=Seme di grano +Wheat=Grano +Straw=Paglia +Flour=Farina +Bread=Pane +Sliced Bread=Pane a fette +Toast=Pane tostato +Toast Sandwich=Panino di pane tostato diff --git a/mods/farming/locale/pt.txt b/mods/farming/locale/pt.txt new file mode 100644 index 0000000..a4c504c --- /dev/null +++ b/mods/farming/locale/pt.txt @@ -0,0 +1,195 @@ +# Portuguese translation of the farming mod by TenPlus1 +# textdomain: farming +# author: BrunoMine +# author: TheDarkTiger +# last update: 2020/Apr/26 + +###### folder . ###### + +### init.lua ### +Seed=Sementes + +### compatibility.lua ### +Banana= +Banana Leaves= +Orange= +Strawberry= + +### food.lua ### +Sugar=Açucar +Salt= +Rose Water= +Turkish Delight= +Garlic Bread= +Donut=Donut +Chocolate Donut=Donut de Chocolate +Apple Donut=Donut de Maça +Porridge= +Jaffa Cake= + +### hoes.lua ### +Hoe=Enxada +Wooden Hoe=Enxada de Madeira +Stone Hoe=Enxada de Pedra +Steel Hoe=Enxada de Aço +Bronze Hoe=Enxada de Bronze +Mese Hoe=Enxada de Mese +Diamond Hoe=Enxada de Diamante +# Surcharge du mod [Toolranks] à faire # +Hoe Bomb (use or throw on grassy areas to hoe land)= +Mithril Scythe (Right-click to harvest and replant crops)= +# Surcharge du mod [Toolranks] à faire # + +### soil.lua ### +Soil=Solo +Wet Soil=Solo Seco + +### utensils.lua ### +Wooden Bowl= +Saucepan= +Cooking Pot= +Baking Tray= +Skillet= +Mortar and Pestle= +Cutting Board= +Juicer= +Glass Mixing Bowl= + + +###### folder ./crops ###### + +### barley.lua ### +Barley Seed=Sementes de Cevada +Barley=Cevada + +### beans.lua ### +Green Beans=Feijoes Verdes +Bean Pole (place on soil before planting beans)=Apoio de feijao (coloque no solo antes de plantar feijao) + +### beetroot.lua ### +Beetroot= +Beetroot Soup= + +### blueberry.lua ### +Blueberries=Mirtilos +Blueberry Muffin=Muffin de Mirtilos +Blueberry Pie= + +### carrot.lua ## +Carrot=Cenoura +Carrot Juice= +Golden Carrot=Cenoura Dourada + +### chili.lua ### +Chili Pepper= +Bowl of Chili= + +### cocoa.lua ### +Cocoa Beans=Amendoas de Cacau +Cookie=Cookie +Bar of Dark Chocolate=Barra de Chocolate Preto +Chocolate Block= + +### coffee.lua ### +Coffee Beans=Grao de Cafe +Cup of Coffee=Xicara de Cafe + +### corn.lua ### +Corn=Milho +Corn on the Cob=Espiga de Milho +Cornstarch= +Bottle of Ethanol=Garrafa de Etanol + +### cotton.lua ### +Cotton Seed=Sementes de Algodao +Cotton=Algodao +String= + +### cucumber.lua ### +Cucumber=Pepino + +### garlic.lua ### +Garlic clove= +Garlic= +Garlic Braid= + +### grapes.lua ### +Grapes=Uvas +Trellis (place on soil before planting grapes)=Grade de Ripas (colocar no solo antes de plantar uvas) + +### hemp.lua ### +Hemp Seed=Sementes de Canhamo +Hemp Leaf=Folha de Canhamo +Bottle of Hemp Oil=Garrafa de Oleo de Canhamo +Hemp Fibre=Fibra de Canhamo +Hemp Block= +Hemp Rope=Corda de Canhamo + +### melon.lua ### +Melon Slice=Sementes de Melancia +Melon=Melancia + +### onion.lua ### +Onion= + +### peas.lua ### +Pea Pod= +Peas= +Pea Soup= + +### pepper.lua ### +Peppercorn= +Pepper= +Ground Pepper= + +### pinapple.lua ### +Pineapple Top= +Pineapple= +Pineapple Ring= +Pineapple Juice= + +### potato.lua ### +Potato=Batata +Baked Potato=Batata Cozida +Cucumber and Potato Salad= + +### pumpkin.lua ### +Pumpkin Slice=Pedaço de Abobora +Jack 'O Lantern (punch to turn on and off)=Jack 'O Lantern (Socos para ligar e desligar) +Scarecrow Bottom= +Pumpkin Bread=Pao de Abobora +Pumpkin Dough=Massa de Abobora +Pumpkin=Abobora + +### raspberry.lua ### +Raspberries=Framboesa +Raspberry Smoothie=Batida de Framboesa + +### rhubarb.lua ### +Rhubarb=Ruibarbo +Rhubarb Pie=Torta de Ruibarbo + +### ryeoatrice.lua ### +Rye= +Rye seed= +Oat= +Oat seed= +Rice= +Rice grains= +Rice Bread= +Rice Flour= +Multigrain Flour= +Multigrain Bread= + +### tomato.lua ### +Tomato=Tomate + +### wheat.lua ### +Wheat Seed=Sementes de Trigo +Wheat=Trigo +Straw=Palha +Flour=Farinha +Bread=Pao +Sliced Bread= +Toast= +Toast Sandwich= diff --git a/mods/farming/locale/ru.txt b/mods/farming/locale/ru.txt new file mode 100644 index 0000000..8a181f5 --- /dev/null +++ b/mods/farming/locale/ru.txt @@ -0,0 +1,212 @@ +# Russian translation of the farming mod by TenPlus1 +# textdomain: farming +# author: codexp +# author: TheDarkTiger +# author: YELLOW +# last update: 2020/Jun/20 + +###### folder . ###### + +### init.lua ### +Seed=Семена + +### compatibility.lua ### +Banana=Банан +Banana Leaves=Листья банана +Orange=Апельсин +Strawberry=Земляника + +### food.lua ### +Sugar=Сахар +Salt=Соль +Rose Water=Розовая вода +Turkish Delight=Рахат-лукум +Garlic Bread=Чесночный хлеб +Donut=Пончик +Chocolate Donut=Шоколадный пончик +Apple Donut=Яблочный пончик +Porridge=Каша +Jaffa Cake=Яффский пирог +Apple Pie=Яблочный пирог +Cactus Juice=Кактусовый сок + +### hoes.lua ### +Hoe=Мотыга +Wooden Hoe=Деревянная мотыга +Stone Hoe=Каменная мотыга +Steel Hoe=Стальная мотыга +Bronze Hoe=Бронзовая мотыга +Mese Hoe=Магическая мотыга +Diamond Hoe=Алмазная мотыга +# Surcharge du mod [Toolranks] à faire # +Hoe Bomb (use or throw on grassy areas to hoe land)=Мотыгобомба (используйте или бросьте на траву для ее обработки) +Mithril Scythe (Right-click to harvest and replant crops)=Мифриловая коса (Щелкните правой кнопкой мыши для сбора и пересадки растений) +# Surcharge du mod [Toolranks] à faire # +%s Hoe=%s мотыга +Silver=Серебряная +Mithril=Мифриловая +Silver Hoe=Серебряная +Mithril Hoe=Мифриловая + +### soil.lua ### +Soil=Земля +Wet Soil=Увлажненная земля +Savanna Soil=Земля саванны +Wet Savanna Soil=Увлажненная земля саванны + +### utensils.lua ### +Wooden Bowl=Деревянная миска +Saucepan=Кастрюля +Cooking Pot=Котел +Baking Tray=Противень +Skillet=Сковорода +Mortar and Pestle=Ступка и пестик +Cutting Board=Разделочная доска +Juicer=Соковыжималка +Glass Mixing Bowl=Стеклянная чаша + + +###### folder ./crops ###### + +### barley.lua ### +Barley Seed=Семена ячменя +Barley=Ячмень + +### beans.lua ### +Green Beans=Зеленая фасоль +Bean Pole (place on soil before planting beans)=Жердь для бобовых (установите на почву перед посадкой бобовых) + +### beetroot.lua ### +Beetroot=Свекла +Beetroot Soup=Борщ + +### blueberry.lua ### +Blueberries=Голубика +Blueberry Muffin=Кекс с голубикой +Blueberry Pie=Пирог с голубикой + +### carrot.lua ## +Carrot=Морковь +Carrot Juice=Морковный сок +Golden Carrot=Золотая морковь + +### chili.lua ### +Chili Pepper=Перец чили +Bowl of Chili=Миска чили + +### cocoa.lua ### +Cocoa Beans=Какао-бобы +Cookie=Печенье +Bar of Dark Chocolate=Плитка темного шоколада +Chocolate Block=Шоколадный блок + +### coffee.lua ### +Coffee Beans=Кофейные зерна +Cup of Coffee=Чашка кофе + +### corn.lua ### +Corn=Кукуруза +Corn on the Cob=Початок кукурузы +Cornstarch=Кукурузный крахмал +Bottle of Ethanol=Бутылка спирта + +### cotton.lua ### +Wild Cotton=Дикорастущий хлопок +Cotton Seed=Семена хлопка +Cotton=Хлопок +String=Нить + +### cucumber.lua ### +Cucumber=Огурец + +### garlic.lua ### +Garlic clove=Зубчик чеснока +Garlic=Чеснок +Garlic Braid=Связка чеснока + +### grapes.lua ### +Grapes=Виноград +Trellis (place on soil before planting grapes)=Решетка (поставьте на почву перед посадкой винограда) + +### hemp.lua ### +Hemp Seed=Семена конопли +Hemp Leaf=Лист конопли +Bottle of Hemp Oil=Бутылка конопляного масла +Hemp Fibre=Конопляное волокно +Hemp Block=Блок конопли +Hemp Rope=Пеньковая веревка + +### melon.lua ### +Melon Slice=Долька арбуза +Melon=Арбуз + +### mint.lua ### +Mint Seeds=Семена мяты +Mint Leaf=Лист мяты +Mint Tea=Чай с мятой + +### onion.lua ### +Onion=Лук +Onion Soup=Луковый суп + +### peas.lua ### +Pea Pod=Стручок гороха +Peas=Горох +Pea Soup=Гороховый суп + +### pepper.lua ### +Peppercorn=Перчинка +Pepper=Перец +Ground Pepper=Молотый перец + +### pinapple.lua ### +Pineapple Top=Верхушка ананаса +Pineapple=Ананас +Pineapple Ring=Кольцо ананаса +Pineapple Juice=Ананасовый сок + +### potato.lua ### +Potato=Картофель +Baked Potato=Печеный картофель +Cucumber and Potato Salad=Салат из огурцов и картофеля + +### pumpkin.lua ### +Pumpkin Slice=Ломтик тыквы +Jack 'O Lantern (punch to turn on and off)=Светильник джека (удар для включения и выключения) +Scarecrow Bottom=Основание пугала +Pumpkin Bread=Тыквенный хлеб +Pumpkin Dough=Тыквенное тесто +Pumpkin=Тыква + +### raspberry.lua ### +Raspberries=Малина +Raspberry Smoothie=Малиновый смузи + +### rhubarb.lua ### +Rhubarb=Ревень +Rhubarb Pie=Пирог с ревенем + +### ryeoatrice.lua ### +Rye=Рожь +Rye seed=Зёрна ржи +Oat=Овес +Oat seed=Семена овса +Rice grains=Зёрна риса +Rice=Рис +Rice Bread=Рисовый хлеб +Rice Flour=Рисовая мука +Multigrain Flour=Мультизерновая мука +Multigrain Bread=Мультизерновой хлеб + +### tomato.lua ### +Tomato=Помидор + +### wheat.lua ### +Wheat Seed=Зёрна пшеницы +Wheat=Пшеница +Straw=Солома +Flour=Мука +Bread=Хлеб +Sliced Bread=Нарезанный хлеб +Toast=Тост +Toast Sandwich=Сэндвич diff --git a/mods/farming/locale/template.txt b/mods/farming/locale/template.txt index 92d113e..905d9e0 100644 --- a/mods/farming/locale/template.txt +++ b/mods/farming/locale/template.txt @@ -1,25 +1,194 @@ +# Translation of the farming mod by TenPlus1 # textdomain: farming +# author: (you) +# last update: 2020/Apr/26 + +###### folder . ###### + +### init.lua ### +Seed= + +### compatibility.lua ### +Banana= +Banana Leaves= +Orange= +Strawberry= + +### food.lua ### +Sugar= +Salt= +Rose Water= +Turkish Delight= +Garlic Bread= +Donut= +Chocolate Donut= +Apple Donut= +Porridge= +Jaffa Cake= + +### hoes.lua ### +Hoe= Wooden Hoe= Stone Hoe= Steel Hoe= Bronze Hoe= Mese Hoe= Diamond Hoe= -Wheat Seed= -Flour= -Bread= -Cotton Seed= -String= +# Surcharge du mod [Toolranks] faire # +Hoe Bomb (use or throw on grassy areas to hoe land)= +Mithril Scythe (Right-click to harvest and replant crops)= +# Surcharge du mod [Toolranks] faire # + +### soil.lua ### 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= + +### utensils.lua ### +Wooden Bowl= +Saucepan= +Cooking Pot= +Baking Tray= +Skillet= +Mortar and Pestle= +Cutting Board= +Juicer= +Glass Mixing Bowl= + + +###### folder ./crops ###### + +### barley.lua ### +Barley Seed= +Barley= + +### beans.lua ### +Green Beans= +Bean Pole (place on soil before planting beans)= + +### beetroot.lua ### +Beetroot= +Beetroot Soup= + +### blueberry.lua ### +Blueberries= +Blueberry Muffin= +Blueberry Pie= + +### carrot.lua ## +Carrot= +Carrot Juice= +Golden Carrot= + +### chili.lua ### +Chili Pepper= +Bowl of Chili= + +### cocoa.lua ### +Cocoa Beans= +Cookie= +Bar of Dark Chocolate= +Chocolate Block= + +### coffee.lua ### +Coffee Beans= +Cup of Coffee= + +### corn.lua ### +Corn= +Corn on the Cob= +Cornstarch= +Bottle of Ethanol= + +### cotton.lua ### +Cotton Seed= Cotton= +String= + +### cucumber.lua ### +Cucumber= + +### garlic.lua ### +Garlic clove= +Garlic= +Garlic Braid= + +### grapes.lua ### +Grapes= +Trellis (place on soil before planting grapes)= + +### hemp.lua ### +Hemp Seed= +Hemp Leaf= +Bottle of Hemp Oil= +Hemp Fibre= +Hemp Block= +Hemp Rope= + +### melon.lua ### +Melon Slice= +Melon= + +### onion.lua ### +Onion= + +### peas.lua ### +Pea Pod= +Peas= +Pea Soup= + +### pepper.lua ### +Peppercorn= +Pepper= +Ground Pepper= + +### pinapple.lua ### +Pineapple Top= +Pineapple= +Pineapple Ring= +Pineapple Juice= + +### potato.lua ### +Potato= +Baked Potato= +Cucumber and Potato Salad= + +### pumpkin.lua ### +Pumpkin Slice= +Jack 'O Lantern (punch to turn on and off)= +Scarecrow Bottom= +Pumpkin Bread= +Pumpkin Dough= +Pumpkin= + +### raspberry.lua ### +Raspberries= +Raspberry Smoothie= + +### rhubarb.lua ### +Rhubarb= +Rhubarb Pie= + +### ryeoatrice.lua ### +Rye= +Rye seed= +Oat= +Oat seed= +Rice= +Rice grains= +Rice Bread= +Rice Flour= +Multigrain Flour= +Multigrain Bread= + +### tomato.lua ### +Tomato= + +### wheat.lua ### +Wheat Seed= +Wheat= +Straw= +Flour= +Bread= +Sliced Bread= +Toast= +Toast Sandwich= diff --git a/mods/farming/locale/zh_CN.txt b/mods/farming/locale/zh_CN.txt new file mode 100644 index 0000000..2ec4e55 --- /dev/null +++ b/mods/farming/locale/zh_CN.txt @@ -0,0 +1,119 @@ +Seed=种子 +Banana=香蕉 +Banana Leaves=香蕉叶 +Orange=橙色 +Strawberry=草莓 +Sugar=糖 +Salt=盐 +Rose Water=玫瑰汁 +Turkish Delight=土耳其软糖 +Garlic Bread=蒜香面包 +Donut=甜甜圈 +Chocolate Donut=巧克力甜甜圈 +Apple Donut=苹果甜甜圈 +Porridge=粥 +Jaffa Cake=佳发饼 +Hoe=锄头 +Wooden Hoe=木锄 +Stone Hoe=石锄 +Steel Hoe=钢锄头 +Bronze Hoe=青铜锄头 +Mese Hoe=黄石锄头 +Diamond Hoe=钻石锄 +Hoe Bomb (use or throw on grassy areas to hoe land)=锄弹(在草地上使用或扔在锄地上) +Mithril Scythe (Right-click to harvest and replant crops)=秘银镰刀(右击可收获并重新种植作物) +Soil=土壤 +Wet Soil=湿土 +Wooden Bowl=木碗 +Saucepan=平底锅 +Cooking Pot=锅 +Baking Tray=烤盘 +Skillet=平底锅 +Mortar and Pestle=研钵 +Cutting Board=砧板 +Juicer=榨汁机 +Glass Mixing Bowl=搅拌杯 +Barley Seed=大麦种子 +Barley=大麦 +Green Beans=青豆 +Bean Pole (place on soil before planting beans)=豆杆(种豆前先放在土上) +Beetroot=甜菜根 +Beetroot Soup=甜菜根汤 +Blueberries=蓝莓 +Blueberry Muffin=蓝莓松糕 +Blueberry Pie=蓝莓派 +Carrot=胡萝卜 +Carrot Juice=胡萝卜汁 +Golden Carrot=金萝卜 +Chili Pepper=辣椒 +Bowl of Chili=一碗辣椒 +Cocoa Beans=可可豆 +Cookie=曲奇 +Bar of Dark Chocolate=黑巧克力条 +Chocolate Block=巧克力块 +Coffee Beans=咖啡豆 +Cup of Coffee=一杯咖啡 +Corn=玉米 +Corn on the Cob=玉米棒 +Cornstarch=玉米淀粉 +Bottle of Ethanol=一瓶乙醇 +Cotton Seed=棉籽 +Cotton=棉花 +String=线 +Cucumber=黄瓜 +Garlic clove=蒜瓣 +Garlic=大蒜 +Garlic Braid=蒜辫 +Grapes=葡萄 +Trellis (place on soil before planting grapes)=棚架(种植葡萄前先放在土壤上) +Hemp Seed=大麻籽 +Hemp Leaf=大麻叶 +Bottle of Hemp Oil=一瓶大麻油 +Hemp Fibre=大麻纤维 +Hemp Block=麻块 +Hemp Rope=麻绳 +Melon Slice=西瓜片 +Melon=甜瓜 +Onion=洋葱 +Pea Pod=豌豆荚 +Peas=豌豆 +Pea Soup=豌豆汤 +Peppercorn=胡椒粉 +Pepper=胡椒粉 +Ground Pepper=胡椒粉 +Pineapple Top=菠萝上衣 +Pineapple=菠萝 +Pineapple Ring=菠萝圈 +Pineapple Juice=菠萝汁 +Potato=土豆 +Baked Potato=焗马铃薯 +Cucumber and Potato Salad=黄瓜土豆沙拉 +Pumpkin Slice=南瓜片 +Jack 'O Lantern (punch to turn on and off)=杰克灯(按一下开关) +Scarecrow Bottom=稻草人屁股 +Pumpkin Bread=南瓜面包 +Pumpkin Dough=南瓜面团 +Pumpkin=南瓜 +Raspberries=覆盆子 +Raspberry Smoothie=覆盆子冰沙 +Rhubarb=大黄 +Rhubarb Pie=大黄派 +Rye=黑麦 +Rye seed=黑麦种子 +Oat=燕麦 +Oat seed=燕麦籽 +Rice=大米 +Rice grains=稻谷 +Rice Bread=米饭面包 +Rice Flour=米粉 +Multigrain Flour=多粒面粉 +Multigrain Bread=杂粮面包 +Tomato=番茄 +Wheat Seed=小麦种子 +Wheat=小麦 +Straw=稻草 +Flour=面粉 +Bread=面包 +Sliced Bread=切片面包 +Toast=烤面包片 +Toast Sandwich=三明治面包 diff --git a/mods/farming/locale/zh_TW.txt b/mods/farming/locale/zh_TW.txt new file mode 100644 index 0000000..ef96d52 --- /dev/null +++ b/mods/farming/locale/zh_TW.txt @@ -0,0 +1,119 @@ +Seed=種子 +Banana=香蕉 +Banana Leaves=香蕉葉 +Orange=橙色 +Strawberry=草莓 +Sugar=糖 +Salt=鹽 +Rose Water=玫瑰汁 +Turkish Delight=土耳其軟糖 +Garlic Bread=蒜香麵包 +Donut=甜甜圈 +Chocolate Donut=巧克力甜甜圈 +Apple Donut=蘋果甜甜圈 +Porridge=粥 +Jaffa Cake=佳發餅 +Hoe=鋤頭 +Wooden Hoe=木鋤 +Stone Hoe=石鋤 +Steel Hoe=鋼鋤頭 +Bronze Hoe=青銅鋤頭 +Mese Hoe=黃石鋤頭 +Diamond Hoe=鑽石鋤 +Hoe Bomb (use or throw on grassy areas to hoe land)=鋤彈(在草地上使用或扔在鋤地上) +Mithril Scythe (Right-click to harvest and replant crops)=祕銀鐮刀(右擊可收穫並重新種植作物) +Soil=土壤 +Wet Soil=溼土 +Wooden Bowl=木碗 +Saucepan=平底鍋 +Cooking Pot=鍋 +Baking Tray=烤盤 +Skillet=平底鍋 +Mortar and Pestle=研缽 +Cutting Board=砧板 +Juicer=榨汁機 +Glass Mixing Bowl=攪拌杯 +Barley Seed=大麥種子 +Barley=大麥 +Green Beans=青豆 +Bean Pole (place on soil before planting beans)=豆杆(種豆前先放在土上) +Beetroot=甜菜根 +Beetroot Soup=甜菜根湯 +Blueberries=藍莓 +Blueberry Muffin=藍莓鬆糕 +Blueberry Pie=藍莓派 +Carrot=胡蘿蔔 +Carrot Juice=胡蘿蔔汁 +Golden Carrot=金蘿蔔 +Chili Pepper=辣椒 +Bowl of Chili=一碗辣椒 +Cocoa Beans=可可豆 +Cookie=曲奇 +Bar of Dark Chocolate=黑巧克力條 +Chocolate Block=巧克力塊 +Coffee Beans=咖啡豆 +Cup of Coffee=一杯咖啡 +Corn=玉米 +Corn on the Cob=玉米棒 +Cornstarch=玉米澱粉 +Bottle of Ethanol=一瓶乙醇 +Cotton Seed=棉籽 +Cotton=棉花 +String=字符串 +Cucumber=黃瓜 +Garlic clove=蒜瓣 +Garlic=大蒜 +Garlic Braid=蒜辮 +Grapes=葡萄 +Trellis (place on soil before planting grapes)=棚架(種植葡萄前先放在土壤上) +Hemp Seed=大麻籽 +Hemp Leaf=大麻葉 +Bottle of Hemp Oil=一瓶大麻油 +Hemp Fibre=大麻纖維 +Hemp Block=麻塊 +Hemp Rope=麻繩 +Melon Slice=西瓜片 +Melon=甜瓜 +Onion=洋蔥 +Pea Pod=豌豆莢 +Peas=豌豆 +Pea Soup=豌豆湯 +Peppercorn=胡椒粉 +Pepper=胡椒粉 +Ground Pepper=胡椒粉 +Pineapple Top=菠蘿上衣 +Pineapple=菠蘿 +Pineapple Ring=菠蘿圈 +Pineapple Juice=菠蘿汁 +Potato=土豆 +Baked Potato=焗馬鈴薯 +Cucumber and Potato Salad=黃瓜土豆沙拉 +Pumpkin Slice=南瓜片 +Jack 'O Lantern (punch to turn on and off)=南瓜燈(按一下開關) +Scarecrow Bottom=稻草人屁股 +Pumpkin Bread=南瓜麵包 +Pumpkin Dough=南瓜麵糰 +Pumpkin=南瓜 +Raspberries=覆盆子 +Raspberry Smoothie=覆盆子冰沙 +Rhubarb=大黃 +Rhubarb Pie=大黃派 +Rye=黑麥 +Rye seed=黑麥種子 +Oat=燕麥 +Oat seed=燕麥籽 +Rice=大米 +Rice grains=稻穀 +Rice Bread=米飯麵包 +Rice Flour=米粉 +Multigrain Flour=多粒麵粉 +Multigrain Bread=雜糧麵包 +Tomato=番茄 +Wheat Seed=小麥種子 +Wheat=小麥 +Straw=稻草 +Flour=麵粉 +Bread=麵包 +Sliced Bread=切片面包 +Toast=烤麵包片 +Toast Sandwich=三明治麵包 \ No newline at end of file diff --git a/mods/farming/lucky_block.lua b/mods/farming/lucky_block.lua new file mode 100644 index 0000000..c6a2000 --- /dev/null +++ b/mods/farming/lucky_block.lua @@ -0,0 +1,79 @@ + +-- add lucky blocks + +if minetest.get_modpath("lucky_block") then + + lucky_block:add_blocks({ + {"dro", {"farming:corn"}, 5}, + {"dro", {"farming:coffee_cup_hot"}, 1}, + {"dro", {"farming:bread"}, 5}, + {"nod", "farming:jackolantern", 0}, + {"tro", "farming:jackolantern_on"}, + {"nod", "default:river_water_source", 1}, + {"tel"}, + {"dro", {"farming:trellis", "farming:grapes"}, 5}, + {"dro", {"farming:bottle_ethanol"}, 1}, + {"nod", "farming:melon", 0}, + {"dro", {"farming:donut", "farming:donut_chocolate", "farming:donut_apple"}, 5}, + {"dro", {"farming:hemp_leaf", "farming:hemp_fibre", "farming:seed_hemp"}, 10}, + {"nod", "fire:permanent_flame", 1}, + {"dro", {"farming:chili_pepper", "farming:chili_bowl"}, 5}, + {"dro", {"farming:bowl"}, 3}, + {"dro", {"farming:saucepan"}, 1}, + {"dro", {"farming:pot"}, 1}, + {"dro", {"farming:baking_tray"}, 1}, + {"dro", {"farming:skillet"}, 1}, + {"exp", 4}, + {"dro", {"farming:mortar_pestle"}, 1}, + {"dro", {"farming:cutting_board"}, 1}, + {"dro", {"farming:juicer"}, 1}, + {"dro", {"farming:mixing_bowl"}, 1}, + {"dro", {"farming:hoe_bronze"}, 1}, + {"dro", {"farming:hoe_mese"}, 1}, + {"dro", {"farming:hoe_diamond"}, 1}, + {"dro", {"farming:hoe_bomb"}, 10}, + {"dro", {"farming:turkish_delight"}, 5}, + {"lig"}, + {"dro", {"farming:scythe_mithril"}, 1}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:carrot_8"}, + {"farming:cotton_8", "farming:rhubarb_3"}, + }}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:pepper_5"}, + {"farming:cotton_8", "farming:onion_5"}, + }}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:beetroot_5"}, + {"farming:cotton_8", "farming:barley_7"}, + }}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:corn_8"}, + {"farming:cotton_8", "farming:grapes_8"}, + }}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:pea_5"}, + {"farming:cotton_8", "farming:coffee_5"}, + }}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:raspberry_4"}, + {"farming:cotton_8", "farming:tomato_8"}, + }}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:chili_8"}, + {"farming:cotton_8", "farming:cucumber_4"}, + }}, + {"nod", "default:chest", 0, { + {name = "farming:seed_wheat", max = 15}, + {name = "farming:seed_barley", max = 15}, + {name = "farming:seed_barley", max = 15}, + {name = "farming:seed_hemp", max = 15}, + {name = "farming:seed_rye", max = 15}, + {name = "farming:seed_rice", max = 15}, + {name = "farming:seed_oat", max = 15}, + {name = "farming:soil_wet", max = 10}, + {name = "farming:cotton_wild", max = 5}, + {name = "farming:grapebush", max = 5}, + }}, + }) +end diff --git a/mods/farming/mapgen.lua b/mods/farming/mapgen.lua new file mode 100644 index 0000000..fce941d --- /dev/null +++ b/mods/farming/mapgen.lua @@ -0,0 +1,240 @@ +-- what mapgen are we using +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- temp vars +local tmp1, tmp2, tmp3 + +-- decoration function +local function register_plant(name, min, max, spawnon, spawnby, num, rarety) + + -- do not place on mapgen if no value given (or not true) + if not rarety then + return + end + + -- set rarety value or default to farming.rarety if not a number + rarety = tonumber(rarety) or farming.rarety + + minetest.register_decoration({ + deco_type = "simple", + place_on = spawnon or {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = rarety, + spread = {x = 120, y = 120, z = 120}, + seed = 329, + octaves = 2, + persist = 0.6 + }, + y_min = min, + y_max = max, + decoration = "farming:" .. name, + spawn_by = spawnby, + num_spawn_by = num + }) +end + + +-- add crops to mapgen +register_plant("potato_3", 1, 80, nil, "", -1, farming.potato) +register_plant("tomato_7", 5, 40, nil, "", -1, farming.tomato) +register_plant("corn_7", 1, 42, nil, "", -1, farming.corn) +register_plant("raspberry_4", 3, 20, nil, "", -1, farming.raspberry) +register_plant("rhubarb_3", 3, 25, nil, "", -1, farming.rhubarb) +register_plant("blueberry_4", 3, 20, nil, "", -1, farming.blueberry) +register_plant("beanbush", 1, 65, nil, "", -1, farming.beans) +register_plant("grapebush", 2, 85, nil, "", -1, farming.grapes) +register_plant("onion_5", 5, 42, nil, "", -1, farming.onion) +register_plant("garlic_5", 3, 60, nil, "group:tree", 1, farming.garlic) +register_plant("pea_5", 5, 100, nil, "", -1, farming.peas) +register_plant("beetroot_5", 1, 25, nil, "", -1, farming.beetroot) +register_plant("cabbage_6", 2, 20, nil, "", -1, farming.cabbage) +register_plant("lettuce_5", 5, 60, nil, "", -1, farming.lettuce) +register_plant("blackberry_4", 3, 20, nil, "", -1, farming.blackberry) +register_plant("vanilla_7", 5, 65, nil, "", -1, farming.vanilla) +register_plant("parsley_3", 1, 80, nil, "", -1, farming.parsley) +register_plant("sunflower_8", 1, 80, nil, "", -1, farming.sunflower) +register_plant("mint_4", 1, 145, { + "default:dirt_with_grass", "default:dirt_with_coniferous_litter"}, + "group:water", 1, farming.mint) + + +-- v6 mapgen compatibility for specific crops +if mg_name == "v6" then + + register_plant("carrot_8", 1, 60, nil, "group:water", 1, farming.carrot) + register_plant("cucumber_4", 1, 40, nil, "group:water", 1, farming.cucumber) + register_plant("melon_8", 1, 40, nil, "group:water", 1, farming.melon) + register_plant("pumpkin_8", 1, 40, nil, "group:water", 1, farming.pumpkin) + register_plant("coffee_5", 10, 85, nil, "", -1, farming.coffee) + register_plant("soy_6", 10, 100, nil, "", -1, farming.soy) +else + -- v7 maps have a beach so plants growing near water is limited to 6 high + register_plant("carrot_8", 1, 25, nil, "", -1, farming.carrot) + register_plant("cucumber_4", 1, 20, nil, "", -1, farming.cucumber) + register_plant("melon_8", 1, 12, {"default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter"}, "", -1, farming.melon) + register_plant("pumpkin_8", 1, 12, nil, "", -1, farming.pumpkin) + register_plant("coffee_5", 10, 85, {"default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", + "default:dry_dirt_with_dry_grass"}, "", -1, farming.coffee) + register_plant("soy_6", 10, 100, {"default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", + "default:dry_dirt_with_dry_grass"}, "", -1, farming.soy) +end + + +if farming.hemp then +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = tonumber(farming.hemp) or farming.rarety, + spread = {x = 110, y = 110, z = 110}, + seed = 420, + octaves = 3, + persist = 0.6 + }, + y_min = 3, + y_max = 45, + decoration = "farming:hemp_7", + spawn_by = "group:tree", + num_spawn_by = 1 +}) +end + + +if farming.chili then +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = tonumber(farming.chili) or farming.rarety, + spread = {x = 110, y = 110, z = 110}, + seed = 760, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 35, + decoration = {"farming:chili_8"}, + spawn_by = "group:tree", + num_spawn_by = 1 +}) +end + + +if farming.artichoke then +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = tonumber(farming.artichoke) or farming.rarety, + spread = {x = 110, y = 110, z = 110}, + seed = 448, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = 13, + decoration = {"farming:artichoke_5"}, + spawn_by = "group:tree", + num_spawn_by = 1, +}) +end + + +if farming.pepper then + +local tmp1 = {"default:dirt_with_rainforest_litter"} -- v7 + +if mg_name == "v6" then + tmp1 = {"default:dirt_with_grass"} -- v6 +end + +minetest.register_decoration({ + deco_type = "simple", + place_on = tmp1, + sidelen = 16, + noise_params = { + offset = 0, + scale = tonumber(farming.pepper) or farming.rarety, + spread = {x = 100, y = 100, z = 100}, + seed = 933, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 35, + decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"}, + spawn_by = "group:tree", + num_spawn_by = 1 +}) +end + + +if farming.pineapple then + +tmp1 = {"default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass"} +tmp2 = nil +tmp3 = -1 + +if mg_name == "v6" then + tmp1 = {"default:dirt_with_grass"} + tmp2 = "default:desert_sand" + tmp3 = 1 +end + +minetest.register_decoration({ + deco_type = "simple", + place_on = tmp1, + sidelen = 16, + noise_params = { + offset = 0, + scale = tonumber(farming.pineapple) or farming.rarety, + spread = {x = 70, y = 70, z = 70}, + seed = 917, + octaves = 3, + persist = 0.6 + }, + y_min = 8, + y_max = 30, + decoration = {"farming:pineapple_8"}, + spawn_by = tmp2, + num_spawn_by = tmp3 +}) +end + +tmp1 = {"default:dry_dirt_with_dry_grass"} +tmp2 = {"savanna"} + +if mg_name == "v6" then + tmp1 = {"default:dirt_with_grass"} + tmp2 = {"jungle"} +end + +minetest.register_decoration({ + name = "farming:cotton_wild", + deco_type = "simple", + place_on = tmp1, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = 0.1, + spread = {x = 150, y = 150, z = 150}, + seed = 4242, + octaves = 4, + persist = 0.7 + }, + biomes = tmp2, + y_max = 31000, + y_min = 1, + decoration = "farming:cotton_wild" +}) diff --git a/mods/farming/mod.conf b/mods/farming/mod.conf index 9a76a6a..bc6a919 100644 --- a/mods/farming/mod.conf +++ b/mods/farming/mod.conf @@ -1,4 +1,4 @@ name = farming -description = Minetest Game mod: farming -depends = default, wool, stairs -optional_depends = dungeon_loot +depends = default +optional_depends = stairs, intllib, lucky_block, toolranks +description = Adds many plants and food to Minetest diff --git a/mods/farming/nodes.lua b/mods/farming/nodes.lua deleted file mode 100644 index 22dd51c..0000000 --- a/mods/farming/nodes.lua +++ /dev/null @@ -1,242 +0,0 @@ --- 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("Dry 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 Dry 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(), -}) - -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, -}) - - -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 - -minetest.override_item("default:junglegrass", {drop = { - max_items = 1, - items = { - {items = {"farming:seed_cotton"},rarity = 8}, - {items = {"default:junglegrass"}}, - } -}}) diff --git a/mods/farming/screenshot.png b/mods/farming/screenshot.png new file mode 100644 index 0000000..aba30f0 Binary files /dev/null and b/mods/farming/screenshot.png differ diff --git a/mods/farming/settingtypes.txt b/mods/farming/settingtypes.txt new file mode 100644 index 0000000..05f50af --- /dev/null +++ b/mods/farming/settingtypes.txt @@ -0,0 +1,2 @@ +# Contains a value used for speed of crop growth in seconds +farming_stage_length (Farming Stage Length) float 160.0 diff --git a/mods/farming/soil.lua b/mods/farming/soil.lua new file mode 100644 index 0000000..4363323 --- /dev/null +++ b/mods/farming/soil.lua @@ -0,0 +1,160 @@ + +local S = farming.intllib + + +-- default dry soil node +local dry_soil = "farming:soil" + + +-- add soil types to existing dirt blocks +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" + } +}) + +if not minetest.registered_nodes[":default:dirt_with_coniferous_litter"] then + minetest.register_alias("default:dirt_with_coniferous_litter", "default:dirt_with_dry_grass") +end +minetest.override_item("default:dirt_with_coniferous_litter", { + soil = { + base = "default:dirt_with_dry_grass", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +if not minetest.registered_nodes[":default:dry_dirt"] then + minetest.register_alias("default:dry_dirt", "default:dirt") +end +minetest.override_item("default:dry_dirt", { + soil = { + base = "default:dirt", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +if not minetest.registered_nodes[":default:dry_dirt_with_dry_grass"] then + minetest.register_alias("default:dry_dirt_with_dry_grass", "default:dirt_with_dry_grass") +end +minetest.override_item("default:dry_dirt_with_dry_grass", { + soil = { + base = "default:dirt_with_dry_grass", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +-- normal soil +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, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +-- wet soil +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, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + + +-- sand is not soil, change existing sand-soil to use dry soil +minetest.register_alias("farming:desert_sand_soil", dry_soil) +minetest.register_alias("farming:desert_sand_soil_wet", dry_soil .. "_wet") + + +-- if water near soil then change to wet soil +minetest.register_abm({ + nodenames = {"group:field"}, + interval = 15, + chance = 4, + catch_up = false, + + action = function(pos, node) + + local ndef = minetest.registered_nodes[node.name] + if not ndef or not ndef.soil or not ndef.soil.wet + or not ndef.soil.base or not ndef.soil.dry then return end + + pos.y = pos.y + 1 + local nn = minetest.get_node_or_nil(pos) + pos.y = pos.y - 1 + + if nn then nn = nn.name else return end + + -- what's on top of soil, if solid/not plant change soil to dirt + if minetest.registered_nodes[nn] + and minetest.registered_nodes[nn].walkable + and minetest.get_item_group(nn, "plant") == 0 then + minetest.set_node(pos, {name = ndef.soil.base}) + return + end + + -- if map around soil not loaded then skip until loaded + if minetest.find_node_near(pos, 3, {"ignore"}) then + return + end + + -- check if water is within 3 nodes horizontally and 1 below + if #minetest.find_nodes_in_area( + {x = pos.x + 3, y = pos.y - 1, z = pos.z + 3}, + {x = pos.x - 3, y = pos.y , z = pos.z - 3}, + {"group:water"}) > 0 then + + minetest.set_node(pos, {name = ndef.soil.wet}) + + elseif node.name == ndef.soil.wet then + minetest.set_node(pos, {name = ndef.soil.dry}) + + elseif node.name == ndef.soil.dry + and minetest.get_item_group(nn, "plant") == 0 then + minetest.set_node(pos, {name = ndef.soil.base}) + end + end +}) diff --git a/mods/farming/statistics.lua b/mods/farming/statistics.lua new file mode 100644 index 0000000..b892867 --- /dev/null +++ b/mods/farming/statistics.lua @@ -0,0 +1,185 @@ +local statistics = {} +local ROOT_2 = math.sqrt(2.0) + +-- Approximations for erf(x) and erfInv(x) from +-- https://en.wikipedia.org/wiki/Error_function + +local erf +local erf_inv + +local A = 8 * (math.pi - 3.0)/(3.0 * math.pi * (4.0 - math.pi)) +local B = 4.0 / math.pi +local C = 2.0/(math.pi * A) +local D = 1.0 / A + + +erf = function(x) + + if x == 0 then return 0; end + + local xSq = x * x + local aXSq = A * xSq + local v = math.sqrt(1.0 - math.exp(-xSq * (B + aXSq) / (1.0 + aXSq))) + + return (x > 0 and v) or -v +end + + +erf_inv = function(x) + + if x == 0 then return 0; end + + if x <= -1 or x >= 1 then return nil; end + + local y = math.log(1 - x * x) + local u = C + 0.5 * y + local v = math.sqrt(math.sqrt(u * u - D * y) - u) + + return (x > 0 and v) or -v +end + + +local function std_normal(u) + return ROOT_2 * erf_inv(2.0 * u - 1.0) +end + + +local poisson +local cdf_table = {} + + +local function generate_cdf(lambda_index, lambda) + + local max = math.ceil(4 * lambda) + local pdf = math.exp(-lambda) + local cdf = pdf + local t = { [0] = pdf } + + for i = 1, max - 1 do + pdf = pdf * lambda / i + cdf = cdf + pdf + t[i] = cdf + end + + return t +end + + +for li = 1, 100 do + cdf_table[li] = generate_cdf(li, 0.25 * li) +end + + +poisson = function(lambda, max) + + if max < 2 then + return (math.random() < math.exp(-lambda) and 0) or 1 + elseif lambda >= 2 * max then + return max + end + + local u = math.random() + local lambda_index = math.floor(4 * lambda + 0.5) + local cdfs = cdf_table[lambda_index] + + if cdfs then + + lambda = 0.25 * lambda_index + + if u < cdfs[0] then return 0; end + if max > #cdfs then max = #cdfs + 1 else max = math.floor(max); end + if u >= cdfs[max - 1] then return max; end + + if max > 4 then -- Binary search + + local s = 0 + + while s + 1 < max do + + local m = math.floor(0.5 * (s + max)) + + if u < cdfs[m] then max = m; else s = m; end + end + else + for i = 1, max - 1 do + if u < cdfs[i] then return i; end + end + end + + return max + else + local x = lambda + math.sqrt(lambda) * std_normal(u) + + return (x < 0.5 and 0) or (x >= max - 0.5 and max) or math.floor(x + 0.5) + end +end + + +-- Error function. +statistics.erf = erf + +-- Inverse error function. +statistics.erf_inv = erf_inv + +--- Standard normal distribution function (mean 0, standard deviation 1). + -- + -- @return + -- Any real number (actually between -3.0 and 3.0). + +statistics.std_normal = function() + + local u = math.random() + + if u < 0.001 then + return -3.0 + elseif u > 0.999 then + return 3.0 + end + + return std_normal(u) +end + + +--- Standard normal distribution function (mean 0, standard deviation 1). + -- + -- @param mu + -- The distribution mean. + -- @param sigma + -- The distribution standard deviation. + -- @return + -- Any real number (actually between -3*sigma and 3*sigma). + +statistics.normal = function(mu, sigma) + + local u = math.random() + + if u < 0.001 then + return mu - 3.0 * sigma + elseif u > 0.999 then + return mu + 3.0 * sigma + end + + return mu + sigma * std_normal(u) +end + + +--- Poisson distribution function. + -- + -- @param lambda + -- The distribution mean and variance. + -- @param max + -- The distribution maximum. + -- @return + -- An integer between 0 and max (both inclusive). + +statistics.poisson = function(lambda, max) + + lambda, max = tonumber(lambda), tonumber(max) + + if not lambda or not max or lambda <= 0 or max < 1 then return 0; end + + return poisson(lambda, max) +end + + +return statistics diff --git a/mods/farming/textures/crops_garlic.png b/mods/farming/textures/crops_garlic.png new file mode 100644 index 0000000..a73638c Binary files /dev/null and b/mods/farming/textures/crops_garlic.png differ diff --git a/mods/farming/textures/crops_garlic_braid.png b/mods/farming/textures/crops_garlic_braid.png new file mode 100644 index 0000000..f5fa269 Binary files /dev/null and b/mods/farming/textures/crops_garlic_braid.png differ diff --git a/mods/farming/textures/crops_garlic_braid_side.png b/mods/farming/textures/crops_garlic_braid_side.png new file mode 100644 index 0000000..ce467b7 Binary files /dev/null and b/mods/farming/textures/crops_garlic_braid_side.png differ diff --git a/mods/farming/textures/crops_garlic_clove.png b/mods/farming/textures/crops_garlic_clove.png new file mode 100644 index 0000000..bfc1cee Binary files /dev/null and b/mods/farming/textures/crops_garlic_clove.png differ diff --git a/mods/farming/textures/crops_garlic_plant_1.png b/mods/farming/textures/crops_garlic_plant_1.png new file mode 100644 index 0000000..61eb9a8 Binary files /dev/null and b/mods/farming/textures/crops_garlic_plant_1.png differ diff --git a/mods/farming/textures/crops_garlic_plant_2.png b/mods/farming/textures/crops_garlic_plant_2.png new file mode 100644 index 0000000..217fd25 Binary files /dev/null and b/mods/farming/textures/crops_garlic_plant_2.png differ diff --git a/mods/farming/textures/crops_garlic_plant_3.png b/mods/farming/textures/crops_garlic_plant_3.png new file mode 100644 index 0000000..557b017 Binary files /dev/null and b/mods/farming/textures/crops_garlic_plant_3.png differ diff --git a/mods/farming/textures/crops_garlic_plant_4.png b/mods/farming/textures/crops_garlic_plant_4.png new file mode 100644 index 0000000..80ef076 Binary files /dev/null and b/mods/farming/textures/crops_garlic_plant_4.png differ diff --git a/mods/farming/textures/crops_garlic_plant_5.png b/mods/farming/textures/crops_garlic_plant_5.png new file mode 100644 index 0000000..8b8c31a Binary files /dev/null and b/mods/farming/textures/crops_garlic_plant_5.png differ diff --git a/mods/farming/textures/crops_onion.png b/mods/farming/textures/crops_onion.png new file mode 100644 index 0000000..2099c63 Binary files /dev/null and b/mods/farming/textures/crops_onion.png differ diff --git a/mods/farming/textures/crops_onion_plant_1.png b/mods/farming/textures/crops_onion_plant_1.png new file mode 100644 index 0000000..dea2d4b Binary files /dev/null and b/mods/farming/textures/crops_onion_plant_1.png differ diff --git a/mods/farming/textures/crops_onion_plant_2.png b/mods/farming/textures/crops_onion_plant_2.png new file mode 100644 index 0000000..1f850f1 Binary files /dev/null and b/mods/farming/textures/crops_onion_plant_2.png differ diff --git a/mods/farming/textures/crops_onion_plant_3.png b/mods/farming/textures/crops_onion_plant_3.png new file mode 100644 index 0000000..d9af239 Binary files /dev/null and b/mods/farming/textures/crops_onion_plant_3.png differ diff --git a/mods/farming/textures/crops_onion_plant_4.png b/mods/farming/textures/crops_onion_plant_4.png new file mode 100644 index 0000000..962b21b Binary files /dev/null and b/mods/farming/textures/crops_onion_plant_4.png differ diff --git a/mods/farming/textures/crops_onion_plant_5.png b/mods/farming/textures/crops_onion_plant_5.png new file mode 100644 index 0000000..dfb1f7f Binary files /dev/null and b/mods/farming/textures/crops_onion_plant_5.png differ diff --git a/mods/farming/textures/crops_pepper.png b/mods/farming/textures/crops_pepper.png new file mode 100644 index 0000000..bb8f40c Binary files /dev/null and b/mods/farming/textures/crops_pepper.png differ diff --git a/mods/farming/textures/crops_pepper_ground.png b/mods/farming/textures/crops_pepper_ground.png new file mode 100644 index 0000000..d72405a Binary files /dev/null and b/mods/farming/textures/crops_pepper_ground.png differ diff --git a/mods/farming/textures/crops_pepper_plant_1.png b/mods/farming/textures/crops_pepper_plant_1.png new file mode 100644 index 0000000..43ce6ba Binary files /dev/null and b/mods/farming/textures/crops_pepper_plant_1.png differ diff --git a/mods/farming/textures/crops_pepper_plant_2.png b/mods/farming/textures/crops_pepper_plant_2.png new file mode 100644 index 0000000..556f952 Binary files /dev/null and b/mods/farming/textures/crops_pepper_plant_2.png differ diff --git a/mods/farming/textures/crops_pepper_plant_3.png b/mods/farming/textures/crops_pepper_plant_3.png new file mode 100644 index 0000000..24e92e1 Binary files /dev/null and b/mods/farming/textures/crops_pepper_plant_3.png differ diff --git a/mods/farming/textures/crops_pepper_plant_4.png b/mods/farming/textures/crops_pepper_plant_4.png new file mode 100644 index 0000000..e33554d Binary files /dev/null and b/mods/farming/textures/crops_pepper_plant_4.png differ diff --git a/mods/farming/textures/crops_pepper_plant_5.png b/mods/farming/textures/crops_pepper_plant_5.png new file mode 100644 index 0000000..c2c92eb Binary files /dev/null and b/mods/farming/textures/crops_pepper_plant_5.png differ diff --git a/mods/farming/textures/crops_pepper_plant_6.png b/mods/farming/textures/crops_pepper_plant_6.png new file mode 100644 index 0000000..f2de13a Binary files /dev/null and b/mods/farming/textures/crops_pepper_plant_6.png differ diff --git a/mods/farming/textures/crops_pepper_plant_7.png b/mods/farming/textures/crops_pepper_plant_7.png new file mode 100644 index 0000000..b94526b Binary files /dev/null and b/mods/farming/textures/crops_pepper_plant_7.png differ diff --git a/mods/farming/textures/crops_pepper_red.png b/mods/farming/textures/crops_pepper_red.png new file mode 100644 index 0000000..26802ec Binary files /dev/null and b/mods/farming/textures/crops_pepper_red.png differ diff --git a/mods/farming/textures/crops_pepper_yellow.png b/mods/farming/textures/crops_pepper_yellow.png new file mode 100644 index 0000000..c0273e4 Binary files /dev/null and b/mods/farming/textures/crops_pepper_yellow.png differ diff --git a/mods/farming/textures/crops_peppercorn.png b/mods/farming/textures/crops_peppercorn.png new file mode 100644 index 0000000..0ee3c49 Binary files /dev/null and b/mods/farming/textures/crops_peppercorn.png differ diff --git a/mods/farming/textures/default_junglegrass.png b/mods/farming/textures/default_junglegrass.png new file mode 100644 index 0000000..5d8cdbc Binary files /dev/null and b/mods/farming/textures/default_junglegrass.png differ diff --git a/mods/farming/textures/farming_apple_pie.png b/mods/farming/textures/farming_apple_pie.png new file mode 100644 index 0000000..0e4fdf4 Binary files /dev/null and b/mods/farming/textures/farming_apple_pie.png differ diff --git a/mods/farming/textures/farming_artichoke.png b/mods/farming/textures/farming_artichoke.png new file mode 100644 index 0000000..74af38b Binary files /dev/null and b/mods/farming/textures/farming_artichoke.png differ diff --git a/mods/farming/textures/farming_artichoke_1.png b/mods/farming/textures/farming_artichoke_1.png new file mode 100644 index 0000000..b7f2e02 Binary files /dev/null and b/mods/farming/textures/farming_artichoke_1.png differ diff --git a/mods/farming/textures/farming_artichoke_2.png b/mods/farming/textures/farming_artichoke_2.png new file mode 100644 index 0000000..653637e Binary files /dev/null and b/mods/farming/textures/farming_artichoke_2.png differ diff --git a/mods/farming/textures/farming_artichoke_3.png b/mods/farming/textures/farming_artichoke_3.png new file mode 100644 index 0000000..2d203e9 Binary files /dev/null and b/mods/farming/textures/farming_artichoke_3.png differ diff --git a/mods/farming/textures/farming_artichoke_4.png b/mods/farming/textures/farming_artichoke_4.png new file mode 100644 index 0000000..9a44e92 Binary files /dev/null and b/mods/farming/textures/farming_artichoke_4.png differ diff --git a/mods/farming/textures/farming_artichoke_5.png b/mods/farming/textures/farming_artichoke_5.png new file mode 100644 index 0000000..dac25dd Binary files /dev/null and b/mods/farming/textures/farming_artichoke_5.png differ diff --git a/mods/farming/textures/farming_baked_potato.png b/mods/farming/textures/farming_baked_potato.png new file mode 100644 index 0000000..425c4ae Binary files /dev/null and b/mods/farming/textures/farming_baked_potato.png differ diff --git a/mods/farming/textures/farming_baking_tray.png b/mods/farming/textures/farming_baking_tray.png new file mode 100644 index 0000000..be1711c Binary files /dev/null and b/mods/farming/textures/farming_baking_tray.png differ diff --git a/mods/farming/textures/farming_banana_leaf.png b/mods/farming/textures/farming_banana_leaf.png new file mode 100644 index 0000000..5800cbf Binary files /dev/null and b/mods/farming/textures/farming_banana_leaf.png differ diff --git a/mods/farming/textures/farming_banana_single.png b/mods/farming/textures/farming_banana_single.png new file mode 100644 index 0000000..b15ed2f Binary files /dev/null and b/mods/farming/textures/farming_banana_single.png differ diff --git a/mods/farming/textures/farming_barley.png b/mods/farming/textures/farming_barley.png new file mode 100644 index 0000000..ca929e0 Binary files /dev/null and b/mods/farming/textures/farming_barley.png differ diff --git a/mods/farming/textures/farming_barley_1.png b/mods/farming/textures/farming_barley_1.png new file mode 100644 index 0000000..4a458b1 Binary files /dev/null and b/mods/farming/textures/farming_barley_1.png differ diff --git a/mods/farming/textures/farming_barley_2.png b/mods/farming/textures/farming_barley_2.png new file mode 100644 index 0000000..96610c2 Binary files /dev/null and b/mods/farming/textures/farming_barley_2.png differ diff --git a/mods/farming/textures/farming_barley_3.png b/mods/farming/textures/farming_barley_3.png new file mode 100644 index 0000000..ef14b5b Binary files /dev/null and b/mods/farming/textures/farming_barley_3.png differ diff --git a/mods/farming/textures/farming_barley_4.png b/mods/farming/textures/farming_barley_4.png new file mode 100644 index 0000000..f7c9054 Binary files /dev/null and b/mods/farming/textures/farming_barley_4.png differ diff --git a/mods/farming/textures/farming_barley_5.png b/mods/farming/textures/farming_barley_5.png new file mode 100644 index 0000000..68c0d68 Binary files /dev/null and b/mods/farming/textures/farming_barley_5.png differ diff --git a/mods/farming/textures/farming_barley_6.png b/mods/farming/textures/farming_barley_6.png new file mode 100644 index 0000000..496a218 Binary files /dev/null and b/mods/farming/textures/farming_barley_6.png differ diff --git a/mods/farming/textures/farming_barley_7.png b/mods/farming/textures/farming_barley_7.png new file mode 100644 index 0000000..1c636af Binary files /dev/null and b/mods/farming/textures/farming_barley_7.png differ diff --git a/mods/farming/textures/farming_barley_seed.png b/mods/farming/textures/farming_barley_seed.png new file mode 100644 index 0000000..2f00a20 Binary files /dev/null and b/mods/farming/textures/farming_barley_seed.png differ diff --git a/mods/farming/textures/farming_beanbush.png b/mods/farming/textures/farming_beanbush.png new file mode 100644 index 0000000..637e716 Binary files /dev/null and b/mods/farming/textures/farming_beanbush.png differ diff --git a/mods/farming/textures/farming_beanpole.png b/mods/farming/textures/farming_beanpole.png new file mode 100644 index 0000000..ed07572 Binary files /dev/null and b/mods/farming/textures/farming_beanpole.png differ diff --git a/mods/farming/textures/farming_beanpole_1.png b/mods/farming/textures/farming_beanpole_1.png new file mode 100644 index 0000000..ef2bd5a Binary files /dev/null and b/mods/farming/textures/farming_beanpole_1.png differ diff --git a/mods/farming/textures/farming_beanpole_2.png b/mods/farming/textures/farming_beanpole_2.png new file mode 100644 index 0000000..34143e4 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_2.png differ diff --git a/mods/farming/textures/farming_beanpole_3.png b/mods/farming/textures/farming_beanpole_3.png new file mode 100644 index 0000000..d693f17 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_3.png differ diff --git a/mods/farming/textures/farming_beanpole_4.png b/mods/farming/textures/farming_beanpole_4.png new file mode 100644 index 0000000..c779b25 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_4.png differ diff --git a/mods/farming/textures/farming_beanpole_5.png b/mods/farming/textures/farming_beanpole_5.png new file mode 100644 index 0000000..910f8a0 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_5.png differ diff --git a/mods/farming/textures/farming_beans.png b/mods/farming/textures/farming_beans.png new file mode 100644 index 0000000..ad5cf85 Binary files /dev/null and b/mods/farming/textures/farming_beans.png differ diff --git a/mods/farming/textures/farming_beetroot.png b/mods/farming/textures/farming_beetroot.png new file mode 100644 index 0000000..6a60168 Binary files /dev/null and b/mods/farming/textures/farming_beetroot.png differ diff --git a/mods/farming/textures/farming_beetroot_1.png b/mods/farming/textures/farming_beetroot_1.png new file mode 100644 index 0000000..8b75e10 Binary files /dev/null and b/mods/farming/textures/farming_beetroot_1.png differ diff --git a/mods/farming/textures/farming_beetroot_2.png b/mods/farming/textures/farming_beetroot_2.png new file mode 100644 index 0000000..9c1ce1e Binary files /dev/null and b/mods/farming/textures/farming_beetroot_2.png differ diff --git a/mods/farming/textures/farming_beetroot_3.png b/mods/farming/textures/farming_beetroot_3.png new file mode 100644 index 0000000..0f28e5e Binary files /dev/null and b/mods/farming/textures/farming_beetroot_3.png differ diff --git a/mods/farming/textures/farming_beetroot_4.png b/mods/farming/textures/farming_beetroot_4.png new file mode 100644 index 0000000..35f211b Binary files /dev/null and b/mods/farming/textures/farming_beetroot_4.png differ diff --git a/mods/farming/textures/farming_beetroot_5.png b/mods/farming/textures/farming_beetroot_5.png new file mode 100644 index 0000000..c4b8957 Binary files /dev/null and b/mods/farming/textures/farming_beetroot_5.png differ diff --git a/mods/farming/textures/farming_beetroot_soup.png b/mods/farming/textures/farming_beetroot_soup.png new file mode 100644 index 0000000..4df562e Binary files /dev/null and b/mods/farming/textures/farming_beetroot_soup.png differ diff --git a/mods/farming/textures/farming_berry_smoothie.png b/mods/farming/textures/farming_berry_smoothie.png new file mode 100644 index 0000000..8da2fc5 Binary files /dev/null and b/mods/farming/textures/farming_berry_smoothie.png differ diff --git a/mods/farming/textures/farming_bibimbap.png b/mods/farming/textures/farming_bibimbap.png new file mode 100644 index 0000000..e1a7dfe Binary files /dev/null and b/mods/farming/textures/farming_bibimbap.png differ diff --git a/mods/farming/textures/farming_blackberry.png b/mods/farming/textures/farming_blackberry.png new file mode 100644 index 0000000..01d7ac5 Binary files /dev/null and b/mods/farming/textures/farming_blackberry.png differ diff --git a/mods/farming/textures/farming_blackberry_1.png b/mods/farming/textures/farming_blackberry_1.png new file mode 100644 index 0000000..8dd8832 Binary files /dev/null and b/mods/farming/textures/farming_blackberry_1.png differ diff --git a/mods/farming/textures/farming_blackberry_2.png b/mods/farming/textures/farming_blackberry_2.png new file mode 100644 index 0000000..7d3827c Binary files /dev/null and b/mods/farming/textures/farming_blackberry_2.png differ diff --git a/mods/farming/textures/farming_blackberry_3.png b/mods/farming/textures/farming_blackberry_3.png new file mode 100644 index 0000000..7d89aa0 Binary files /dev/null and b/mods/farming/textures/farming_blackberry_3.png differ diff --git a/mods/farming/textures/farming_blackberry_4.png b/mods/farming/textures/farming_blackberry_4.png new file mode 100644 index 0000000..d9d398d Binary files /dev/null and b/mods/farming/textures/farming_blackberry_4.png differ diff --git a/mods/farming/textures/farming_blueberries.png b/mods/farming/textures/farming_blueberries.png new file mode 100644 index 0000000..b0c4931 Binary files /dev/null and b/mods/farming/textures/farming_blueberries.png differ diff --git a/mods/farming/textures/farming_blueberry_1.png b/mods/farming/textures/farming_blueberry_1.png new file mode 100644 index 0000000..83832c8 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_1.png differ diff --git a/mods/farming/textures/farming_blueberry_2.png b/mods/farming/textures/farming_blueberry_2.png new file mode 100644 index 0000000..308a0ca Binary files /dev/null and b/mods/farming/textures/farming_blueberry_2.png differ diff --git a/mods/farming/textures/farming_blueberry_3.png b/mods/farming/textures/farming_blueberry_3.png new file mode 100644 index 0000000..43d2ab1 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_3.png differ diff --git a/mods/farming/textures/farming_blueberry_4.png b/mods/farming/textures/farming_blueberry_4.png new file mode 100644 index 0000000..75fb69a Binary files /dev/null and b/mods/farming/textures/farming_blueberry_4.png differ diff --git a/mods/farming/textures/farming_blueberry_muffin.png b/mods/farming/textures/farming_blueberry_muffin.png new file mode 100644 index 0000000..b1253d7 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_muffin.png differ diff --git a/mods/farming/textures/farming_blueberry_pie.png b/mods/farming/textures/farming_blueberry_pie.png new file mode 100644 index 0000000..2174686 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_pie.png differ diff --git a/mods/farming/textures/farming_bottle_ethanol.png b/mods/farming/textures/farming_bottle_ethanol.png new file mode 100644 index 0000000..84e6162 Binary files /dev/null and b/mods/farming/textures/farming_bottle_ethanol.png differ diff --git a/mods/farming/textures/farming_bowl.png b/mods/farming/textures/farming_bowl.png new file mode 100644 index 0000000..627c22e Binary files /dev/null and b/mods/farming/textures/farming_bowl.png differ diff --git a/mods/farming/textures/farming_bread.png b/mods/farming/textures/farming_bread.png index 0c25678..bd00e3e 100644 Binary files a/mods/farming/textures/farming_bread.png and b/mods/farming/textures/farming_bread.png differ diff --git a/mods/farming/textures/farming_bread_multigrain.png b/mods/farming/textures/farming_bread_multigrain.png new file mode 100644 index 0000000..66dda07 Binary files /dev/null and b/mods/farming/textures/farming_bread_multigrain.png differ diff --git a/mods/farming/textures/farming_bread_slice.png b/mods/farming/textures/farming_bread_slice.png new file mode 100644 index 0000000..ff2714d Binary files /dev/null and b/mods/farming/textures/farming_bread_slice.png differ diff --git a/mods/farming/textures/farming_burger.png b/mods/farming/textures/farming_burger.png new file mode 100644 index 0000000..c39f7c0 Binary files /dev/null and b/mods/farming/textures/farming_burger.png differ diff --git a/mods/farming/textures/farming_cabbage.png b/mods/farming/textures/farming_cabbage.png new file mode 100644 index 0000000..7f4fa05 Binary files /dev/null and b/mods/farming/textures/farming_cabbage.png differ diff --git a/mods/farming/textures/farming_cabbage_1.png b/mods/farming/textures/farming_cabbage_1.png new file mode 100644 index 0000000..850b0da Binary files /dev/null and b/mods/farming/textures/farming_cabbage_1.png differ diff --git a/mods/farming/textures/farming_cabbage_2.png b/mods/farming/textures/farming_cabbage_2.png new file mode 100644 index 0000000..5ae079f Binary files /dev/null and b/mods/farming/textures/farming_cabbage_2.png differ diff --git a/mods/farming/textures/farming_cabbage_3.png b/mods/farming/textures/farming_cabbage_3.png new file mode 100644 index 0000000..3050229 Binary files /dev/null and b/mods/farming/textures/farming_cabbage_3.png differ diff --git a/mods/farming/textures/farming_cabbage_4.png b/mods/farming/textures/farming_cabbage_4.png new file mode 100644 index 0000000..5064274 Binary files /dev/null and b/mods/farming/textures/farming_cabbage_4.png differ diff --git a/mods/farming/textures/farming_cabbage_5.png b/mods/farming/textures/farming_cabbage_5.png new file mode 100644 index 0000000..45dd777 Binary files /dev/null and b/mods/farming/textures/farming_cabbage_5.png differ diff --git a/mods/farming/textures/farming_cabbage_6.png b/mods/farming/textures/farming_cabbage_6.png new file mode 100644 index 0000000..253f8a7 Binary files /dev/null and b/mods/farming/textures/farming_cabbage_6.png differ diff --git a/mods/farming/textures/farming_cactus_juice.png b/mods/farming/textures/farming_cactus_juice.png new file mode 100644 index 0000000..b4fb5b9 Binary files /dev/null and b/mods/farming/textures/farming_cactus_juice.png differ diff --git a/mods/farming/textures/farming_caramel.png b/mods/farming/textures/farming_caramel.png new file mode 100644 index 0000000..bc7d164 Binary files /dev/null and b/mods/farming/textures/farming_caramel.png differ diff --git a/mods/farming/textures/farming_carrot.png b/mods/farming/textures/farming_carrot.png new file mode 100644 index 0000000..73f2fd4 Binary files /dev/null and b/mods/farming/textures/farming_carrot.png differ diff --git a/mods/farming/textures/farming_carrot_1.png b/mods/farming/textures/farming_carrot_1.png new file mode 100644 index 0000000..bbeae7e Binary files /dev/null and b/mods/farming/textures/farming_carrot_1.png differ diff --git a/mods/farming/textures/farming_carrot_2.png b/mods/farming/textures/farming_carrot_2.png new file mode 100644 index 0000000..b24ecc0 Binary files /dev/null and b/mods/farming/textures/farming_carrot_2.png differ diff --git a/mods/farming/textures/farming_carrot_3.png b/mods/farming/textures/farming_carrot_3.png new file mode 100644 index 0000000..8400505 Binary files /dev/null and b/mods/farming/textures/farming_carrot_3.png differ diff --git a/mods/farming/textures/farming_carrot_4.png b/mods/farming/textures/farming_carrot_4.png new file mode 100644 index 0000000..32ee262 Binary files /dev/null and b/mods/farming/textures/farming_carrot_4.png differ diff --git a/mods/farming/textures/farming_carrot_5.png b/mods/farming/textures/farming_carrot_5.png new file mode 100644 index 0000000..0bcd9c1 Binary files /dev/null and b/mods/farming/textures/farming_carrot_5.png differ diff --git a/mods/farming/textures/farming_carrot_6.png b/mods/farming/textures/farming_carrot_6.png new file mode 100644 index 0000000..a17c6b2 Binary files /dev/null and b/mods/farming/textures/farming_carrot_6.png differ diff --git a/mods/farming/textures/farming_carrot_7.png b/mods/farming/textures/farming_carrot_7.png new file mode 100644 index 0000000..d26eee7 Binary files /dev/null and b/mods/farming/textures/farming_carrot_7.png differ diff --git a/mods/farming/textures/farming_carrot_8.png b/mods/farming/textures/farming_carrot_8.png new file mode 100644 index 0000000..00b6d92 Binary files /dev/null and b/mods/farming/textures/farming_carrot_8.png differ diff --git a/mods/farming/textures/farming_carrot_gold.png b/mods/farming/textures/farming_carrot_gold.png new file mode 100644 index 0000000..b817101 Binary files /dev/null and b/mods/farming/textures/farming_carrot_gold.png differ diff --git a/mods/farming/textures/farming_carrot_juice.png b/mods/farming/textures/farming_carrot_juice.png new file mode 100644 index 0000000..5a03245 Binary files /dev/null and b/mods/farming/textures/farming_carrot_juice.png differ diff --git a/mods/farming/textures/farming_cheese_vegan.png b/mods/farming/textures/farming_cheese_vegan.png new file mode 100644 index 0000000..22c439e Binary files /dev/null and b/mods/farming/textures/farming_cheese_vegan.png differ diff --git a/mods/farming/textures/farming_chili_1.png b/mods/farming/textures/farming_chili_1.png new file mode 100644 index 0000000..aa11988 Binary files /dev/null and b/mods/farming/textures/farming_chili_1.png differ diff --git a/mods/farming/textures/farming_chili_2.png b/mods/farming/textures/farming_chili_2.png new file mode 100644 index 0000000..ae34506 Binary files /dev/null and b/mods/farming/textures/farming_chili_2.png differ diff --git a/mods/farming/textures/farming_chili_3.png b/mods/farming/textures/farming_chili_3.png new file mode 100644 index 0000000..5e1d901 Binary files /dev/null and b/mods/farming/textures/farming_chili_3.png differ diff --git a/mods/farming/textures/farming_chili_4.png b/mods/farming/textures/farming_chili_4.png new file mode 100644 index 0000000..d97769b Binary files /dev/null and b/mods/farming/textures/farming_chili_4.png differ diff --git a/mods/farming/textures/farming_chili_5.png b/mods/farming/textures/farming_chili_5.png new file mode 100644 index 0000000..dd4755d Binary files /dev/null and b/mods/farming/textures/farming_chili_5.png differ diff --git a/mods/farming/textures/farming_chili_6.png b/mods/farming/textures/farming_chili_6.png new file mode 100644 index 0000000..4ee057b Binary files /dev/null and b/mods/farming/textures/farming_chili_6.png differ diff --git a/mods/farming/textures/farming_chili_7.png b/mods/farming/textures/farming_chili_7.png new file mode 100644 index 0000000..5912c2e Binary files /dev/null and b/mods/farming/textures/farming_chili_7.png differ diff --git a/mods/farming/textures/farming_chili_8.png b/mods/farming/textures/farming_chili_8.png new file mode 100644 index 0000000..976eb52 Binary files /dev/null and b/mods/farming/textures/farming_chili_8.png differ diff --git a/mods/farming/textures/farming_chili_bowl.png b/mods/farming/textures/farming_chili_bowl.png new file mode 100644 index 0000000..6454ba3 Binary files /dev/null and b/mods/farming/textures/farming_chili_bowl.png differ diff --git a/mods/farming/textures/farming_chili_pepper.png b/mods/farming/textures/farming_chili_pepper.png new file mode 100644 index 0000000..922cec4 Binary files /dev/null and b/mods/farming/textures/farming_chili_pepper.png differ diff --git a/mods/farming/textures/farming_chocolate_block.png b/mods/farming/textures/farming_chocolate_block.png new file mode 100644 index 0000000..20e5a79 Binary files /dev/null and b/mods/farming/textures/farming_chocolate_block.png differ diff --git a/mods/farming/textures/farming_chocolate_dark.png b/mods/farming/textures/farming_chocolate_dark.png new file mode 100644 index 0000000..03243b2 Binary files /dev/null and b/mods/farming/textures/farming_chocolate_dark.png differ diff --git a/mods/farming/textures/farming_cocoa_1.png b/mods/farming/textures/farming_cocoa_1.png new file mode 100644 index 0000000..18fd362 Binary files /dev/null and b/mods/farming/textures/farming_cocoa_1.png differ diff --git a/mods/farming/textures/farming_cocoa_2.png b/mods/farming/textures/farming_cocoa_2.png new file mode 100644 index 0000000..c304ee0 Binary files /dev/null and b/mods/farming/textures/farming_cocoa_2.png differ diff --git a/mods/farming/textures/farming_cocoa_3.png b/mods/farming/textures/farming_cocoa_3.png new file mode 100644 index 0000000..d66b47d Binary files /dev/null and b/mods/farming/textures/farming_cocoa_3.png differ diff --git a/mods/farming/textures/farming_cocoa_4.png b/mods/farming/textures/farming_cocoa_4.png new file mode 100644 index 0000000..990a8b4 Binary files /dev/null and b/mods/farming/textures/farming_cocoa_4.png differ diff --git a/mods/farming/textures/farming_cocoa_beans.png b/mods/farming/textures/farming_cocoa_beans.png new file mode 100644 index 0000000..9605e51 Binary files /dev/null and b/mods/farming/textures/farming_cocoa_beans.png differ diff --git a/mods/farming/textures/farming_coffee_1.png b/mods/farming/textures/farming_coffee_1.png new file mode 100644 index 0000000..97c207a Binary files /dev/null and b/mods/farming/textures/farming_coffee_1.png differ diff --git a/mods/farming/textures/farming_coffee_2.png b/mods/farming/textures/farming_coffee_2.png new file mode 100644 index 0000000..a659f85 Binary files /dev/null and b/mods/farming/textures/farming_coffee_2.png differ diff --git a/mods/farming/textures/farming_coffee_3.png b/mods/farming/textures/farming_coffee_3.png new file mode 100644 index 0000000..93088c8 Binary files /dev/null and b/mods/farming/textures/farming_coffee_3.png differ diff --git a/mods/farming/textures/farming_coffee_4.png b/mods/farming/textures/farming_coffee_4.png new file mode 100644 index 0000000..37a609f Binary files /dev/null and b/mods/farming/textures/farming_coffee_4.png differ diff --git a/mods/farming/textures/farming_coffee_5.png b/mods/farming/textures/farming_coffee_5.png new file mode 100644 index 0000000..e624fbe Binary files /dev/null and b/mods/farming/textures/farming_coffee_5.png differ diff --git a/mods/farming/textures/farming_coffee_beans.png b/mods/farming/textures/farming_coffee_beans.png new file mode 100644 index 0000000..0786f4e Binary files /dev/null and b/mods/farming/textures/farming_coffee_beans.png differ diff --git a/mods/farming/textures/farming_coffee_cup.png b/mods/farming/textures/farming_coffee_cup.png new file mode 100644 index 0000000..d3820bc Binary files /dev/null and b/mods/farming/textures/farming_coffee_cup.png differ diff --git a/mods/farming/textures/farming_cookie.png b/mods/farming/textures/farming_cookie.png new file mode 100644 index 0000000..e80be35 Binary files /dev/null and b/mods/farming/textures/farming_cookie.png differ diff --git a/mods/farming/textures/farming_corn.png b/mods/farming/textures/farming_corn.png new file mode 100644 index 0000000..2a2894a Binary files /dev/null and b/mods/farming/textures/farming_corn.png differ diff --git a/mods/farming/textures/farming_corn_1.png b/mods/farming/textures/farming_corn_1.png new file mode 100644 index 0000000..60e8b99 Binary files /dev/null and b/mods/farming/textures/farming_corn_1.png differ diff --git a/mods/farming/textures/farming_corn_2.png b/mods/farming/textures/farming_corn_2.png new file mode 100644 index 0000000..6ba6cc9 Binary files /dev/null and b/mods/farming/textures/farming_corn_2.png differ diff --git a/mods/farming/textures/farming_corn_3.png b/mods/farming/textures/farming_corn_3.png new file mode 100644 index 0000000..c5fa80b Binary files /dev/null and b/mods/farming/textures/farming_corn_3.png differ diff --git a/mods/farming/textures/farming_corn_4.png b/mods/farming/textures/farming_corn_4.png new file mode 100644 index 0000000..a43632d Binary files /dev/null and b/mods/farming/textures/farming_corn_4.png differ diff --git a/mods/farming/textures/farming_corn_5.png b/mods/farming/textures/farming_corn_5.png new file mode 100644 index 0000000..7b6fb02 Binary files /dev/null and b/mods/farming/textures/farming_corn_5.png differ diff --git a/mods/farming/textures/farming_corn_6.png b/mods/farming/textures/farming_corn_6.png new file mode 100644 index 0000000..313697b Binary files /dev/null and b/mods/farming/textures/farming_corn_6.png differ diff --git a/mods/farming/textures/farming_corn_7.png b/mods/farming/textures/farming_corn_7.png new file mode 100644 index 0000000..6a937e7 Binary files /dev/null and b/mods/farming/textures/farming_corn_7.png differ diff --git a/mods/farming/textures/farming_corn_8.png b/mods/farming/textures/farming_corn_8.png new file mode 100644 index 0000000..77e442b Binary files /dev/null and b/mods/farming/textures/farming_corn_8.png differ diff --git a/mods/farming/textures/farming_corn_cob.png b/mods/farming/textures/farming_corn_cob.png new file mode 100644 index 0000000..a2fd9da Binary files /dev/null and b/mods/farming/textures/farming_corn_cob.png differ diff --git a/mods/farming/textures/farming_cornstarch.png b/mods/farming/textures/farming_cornstarch.png new file mode 100644 index 0000000..d5f8218 Binary files /dev/null and b/mods/farming/textures/farming_cornstarch.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_cucumber.png b/mods/farming/textures/farming_cucumber.png new file mode 100644 index 0000000..2acb7b2 Binary files /dev/null and b/mods/farming/textures/farming_cucumber.png differ diff --git a/mods/farming/textures/farming_cucumber_1.png b/mods/farming/textures/farming_cucumber_1.png new file mode 100644 index 0000000..e008fd1 Binary files /dev/null and b/mods/farming/textures/farming_cucumber_1.png differ diff --git a/mods/farming/textures/farming_cucumber_2.png b/mods/farming/textures/farming_cucumber_2.png new file mode 100644 index 0000000..9c345ff Binary files /dev/null and b/mods/farming/textures/farming_cucumber_2.png differ diff --git a/mods/farming/textures/farming_cucumber_3.png b/mods/farming/textures/farming_cucumber_3.png new file mode 100644 index 0000000..25f3c54 Binary files /dev/null and b/mods/farming/textures/farming_cucumber_3.png differ diff --git a/mods/farming/textures/farming_cucumber_4.png b/mods/farming/textures/farming_cucumber_4.png new file mode 100644 index 0000000..fc62f2f Binary files /dev/null and b/mods/farming/textures/farming_cucumber_4.png differ diff --git a/mods/farming/textures/farming_cutting_board.png b/mods/farming/textures/farming_cutting_board.png new file mode 100644 index 0000000..90b3f9c Binary files /dev/null and b/mods/farming/textures/farming_cutting_board.png differ diff --git a/mods/farming/textures/farming_desert_sand_soil.png b/mods/farming/textures/farming_desert_sand_soil.png index 3c09ef0..1450e01 100644 Binary files a/mods/farming/textures/farming_desert_sand_soil.png 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 index facc83e..cffa955 100644 Binary files a/mods/farming/textures/farming_desert_sand_soil_wet.png 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 index 41e5a04..fbb2815 100644 Binary files a/mods/farming/textures/farming_desert_sand_soil_wet_side.png and b/mods/farming/textures/farming_desert_sand_soil_wet_side.png differ diff --git a/mods/farming/textures/farming_donut.png b/mods/farming/textures/farming_donut.png new file mode 100644 index 0000000..8985299 Binary files /dev/null and b/mods/farming/textures/farming_donut.png differ diff --git a/mods/farming/textures/farming_donut_apple.png b/mods/farming/textures/farming_donut_apple.png new file mode 100644 index 0000000..6dfe63d Binary files /dev/null and b/mods/farming/textures/farming_donut_apple.png differ diff --git a/mods/farming/textures/farming_donut_chocolate.png b/mods/farming/textures/farming_donut_chocolate.png new file mode 100644 index 0000000..aa4b93f Binary files /dev/null and b/mods/farming/textures/farming_donut_chocolate.png differ diff --git a/mods/farming/textures/farming_flour_multigrain.png b/mods/farming/textures/farming_flour_multigrain.png new file mode 100644 index 0000000..5367bc5 Binary files /dev/null and b/mods/farming/textures/farming_flour_multigrain.png differ diff --git a/mods/farming/textures/farming_garlic_bread.png b/mods/farming/textures/farming_garlic_bread.png new file mode 100644 index 0000000..b760004 Binary files /dev/null and b/mods/farming/textures/farming_garlic_bread.png differ diff --git a/mods/farming/textures/farming_grapebush.png b/mods/farming/textures/farming_grapebush.png new file mode 100644 index 0000000..c2e6620 Binary files /dev/null and b/mods/farming/textures/farming_grapebush.png differ diff --git a/mods/farming/textures/farming_grapes.png b/mods/farming/textures/farming_grapes.png new file mode 100644 index 0000000..aa00ed6 Binary files /dev/null and b/mods/farming/textures/farming_grapes.png differ diff --git a/mods/farming/textures/farming_grapes_1.png b/mods/farming/textures/farming_grapes_1.png new file mode 100644 index 0000000..64a935d Binary files /dev/null and b/mods/farming/textures/farming_grapes_1.png differ diff --git a/mods/farming/textures/farming_grapes_2.png b/mods/farming/textures/farming_grapes_2.png new file mode 100644 index 0000000..6cc2a33 Binary files /dev/null and b/mods/farming/textures/farming_grapes_2.png differ diff --git a/mods/farming/textures/farming_grapes_3.png b/mods/farming/textures/farming_grapes_3.png new file mode 100644 index 0000000..66d6310 Binary files /dev/null and b/mods/farming/textures/farming_grapes_3.png differ diff --git a/mods/farming/textures/farming_grapes_4.png b/mods/farming/textures/farming_grapes_4.png new file mode 100644 index 0000000..57cdc73 Binary files /dev/null and b/mods/farming/textures/farming_grapes_4.png differ diff --git a/mods/farming/textures/farming_grapes_5.png b/mods/farming/textures/farming_grapes_5.png new file mode 100644 index 0000000..aad41f4 Binary files /dev/null and b/mods/farming/textures/farming_grapes_5.png differ diff --git a/mods/farming/textures/farming_grapes_6.png b/mods/farming/textures/farming_grapes_6.png new file mode 100644 index 0000000..2e23a3c Binary files /dev/null and b/mods/farming/textures/farming_grapes_6.png differ diff --git a/mods/farming/textures/farming_grapes_7.png b/mods/farming/textures/farming_grapes_7.png new file mode 100644 index 0000000..9e70b6d Binary files /dev/null and b/mods/farming/textures/farming_grapes_7.png differ diff --git a/mods/farming/textures/farming_grapes_8.png b/mods/farming/textures/farming_grapes_8.png new file mode 100644 index 0000000..5093a06 Binary files /dev/null and b/mods/farming/textures/farming_grapes_8.png differ diff --git a/mods/farming/textures/farming_gyoza.png b/mods/farming/textures/farming_gyoza.png new file mode 100644 index 0000000..c8f036f Binary files /dev/null and b/mods/farming/textures/farming_gyoza.png differ diff --git a/mods/farming/textures/farming_hemp_1.png b/mods/farming/textures/farming_hemp_1.png new file mode 100644 index 0000000..6fb4510 Binary files /dev/null and b/mods/farming/textures/farming_hemp_1.png differ diff --git a/mods/farming/textures/farming_hemp_2.png b/mods/farming/textures/farming_hemp_2.png new file mode 100644 index 0000000..a676173 Binary files /dev/null and b/mods/farming/textures/farming_hemp_2.png differ diff --git a/mods/farming/textures/farming_hemp_3.png b/mods/farming/textures/farming_hemp_3.png new file mode 100644 index 0000000..57136d5 Binary files /dev/null and b/mods/farming/textures/farming_hemp_3.png differ diff --git a/mods/farming/textures/farming_hemp_4.png b/mods/farming/textures/farming_hemp_4.png new file mode 100644 index 0000000..b375cf3 Binary files /dev/null and b/mods/farming/textures/farming_hemp_4.png differ diff --git a/mods/farming/textures/farming_hemp_5.png b/mods/farming/textures/farming_hemp_5.png new file mode 100644 index 0000000..890a3d2 Binary files /dev/null and b/mods/farming/textures/farming_hemp_5.png differ diff --git a/mods/farming/textures/farming_hemp_6.png b/mods/farming/textures/farming_hemp_6.png new file mode 100644 index 0000000..258d4e3 Binary files /dev/null and b/mods/farming/textures/farming_hemp_6.png differ diff --git a/mods/farming/textures/farming_hemp_7.png b/mods/farming/textures/farming_hemp_7.png new file mode 100644 index 0000000..1ce3a8d Binary files /dev/null and b/mods/farming/textures/farming_hemp_7.png differ diff --git a/mods/farming/textures/farming_hemp_8.png b/mods/farming/textures/farming_hemp_8.png new file mode 100644 index 0000000..8d2143f Binary files /dev/null and b/mods/farming/textures/farming_hemp_8.png differ diff --git a/mods/farming/textures/farming_hemp_block.png b/mods/farming/textures/farming_hemp_block.png new file mode 100644 index 0000000..285a2cd Binary files /dev/null and b/mods/farming/textures/farming_hemp_block.png differ diff --git a/mods/farming/textures/farming_hemp_fibre.png b/mods/farming/textures/farming_hemp_fibre.png new file mode 100644 index 0000000..fe3c918 Binary files /dev/null and b/mods/farming/textures/farming_hemp_fibre.png differ diff --git a/mods/farming/textures/farming_hemp_leaf.png b/mods/farming/textures/farming_hemp_leaf.png new file mode 100644 index 0000000..997c8f0 Binary files /dev/null and b/mods/farming/textures/farming_hemp_leaf.png differ diff --git a/mods/farming/textures/farming_hemp_oil.png b/mods/farming/textures/farming_hemp_oil.png new file mode 100644 index 0000000..fa8afe2 Binary files /dev/null and b/mods/farming/textures/farming_hemp_oil.png differ diff --git a/mods/farming/textures/farming_hemp_rope.png b/mods/farming/textures/farming_hemp_rope.png new file mode 100644 index 0000000..03a7082 Binary files /dev/null and b/mods/farming/textures/farming_hemp_rope.png differ diff --git a/mods/farming/textures/farming_hemp_seed.png b/mods/farming/textures/farming_hemp_seed.png new file mode 100644 index 0000000..6be42c8 Binary files /dev/null and b/mods/farming/textures/farming_hemp_seed.png differ diff --git a/mods/farming/textures/farming_hoe_bomb.png b/mods/farming/textures/farming_hoe_bomb.png new file mode 100644 index 0000000..e8db9b1 Binary files /dev/null and b/mods/farming/textures/farming_hoe_bomb.png differ diff --git a/mods/farming/textures/farming_jaffa_cake.png b/mods/farming/textures/farming_jaffa_cake.png new file mode 100644 index 0000000..87cc003 Binary files /dev/null and b/mods/farming/textures/farming_jaffa_cake.png differ diff --git a/mods/farming/textures/farming_juicer.png b/mods/farming/textures/farming_juicer.png new file mode 100644 index 0000000..46265e4 Binary files /dev/null and b/mods/farming/textures/farming_juicer.png differ diff --git a/mods/farming/textures/farming_lettuce.png b/mods/farming/textures/farming_lettuce.png new file mode 100644 index 0000000..3f29fbe Binary files /dev/null and b/mods/farming/textures/farming_lettuce.png differ diff --git a/mods/farming/textures/farming_lettuce_1.png b/mods/farming/textures/farming_lettuce_1.png new file mode 100644 index 0000000..39ce983 Binary files /dev/null and b/mods/farming/textures/farming_lettuce_1.png differ diff --git a/mods/farming/textures/farming_lettuce_2.png b/mods/farming/textures/farming_lettuce_2.png new file mode 100644 index 0000000..0e4ab30 Binary files /dev/null and b/mods/farming/textures/farming_lettuce_2.png differ diff --git a/mods/farming/textures/farming_lettuce_3.png b/mods/farming/textures/farming_lettuce_3.png new file mode 100644 index 0000000..066833b Binary files /dev/null and b/mods/farming/textures/farming_lettuce_3.png differ diff --git a/mods/farming/textures/farming_lettuce_4.png b/mods/farming/textures/farming_lettuce_4.png new file mode 100644 index 0000000..847a2de Binary files /dev/null and b/mods/farming/textures/farming_lettuce_4.png differ diff --git a/mods/farming/textures/farming_lettuce_5.png b/mods/farming/textures/farming_lettuce_5.png new file mode 100644 index 0000000..97651f4 Binary files /dev/null and b/mods/farming/textures/farming_lettuce_5.png differ diff --git a/mods/farming/textures/farming_melon_1.png b/mods/farming/textures/farming_melon_1.png new file mode 100644 index 0000000..3c6ea6d Binary files /dev/null and b/mods/farming/textures/farming_melon_1.png differ diff --git a/mods/farming/textures/farming_melon_2.png b/mods/farming/textures/farming_melon_2.png new file mode 100644 index 0000000..185ed82 Binary files /dev/null and b/mods/farming/textures/farming_melon_2.png differ diff --git a/mods/farming/textures/farming_melon_3.png b/mods/farming/textures/farming_melon_3.png new file mode 100644 index 0000000..6e661f9 Binary files /dev/null and b/mods/farming/textures/farming_melon_3.png differ diff --git a/mods/farming/textures/farming_melon_4.png b/mods/farming/textures/farming_melon_4.png new file mode 100644 index 0000000..d9199f3 Binary files /dev/null and b/mods/farming/textures/farming_melon_4.png differ diff --git a/mods/farming/textures/farming_melon_5.png b/mods/farming/textures/farming_melon_5.png new file mode 100644 index 0000000..755cbd3 Binary files /dev/null and b/mods/farming/textures/farming_melon_5.png differ diff --git a/mods/farming/textures/farming_melon_6.png b/mods/farming/textures/farming_melon_6.png new file mode 100644 index 0000000..b31a5b4 Binary files /dev/null and b/mods/farming/textures/farming_melon_6.png differ diff --git a/mods/farming/textures/farming_melon_7.png b/mods/farming/textures/farming_melon_7.png new file mode 100644 index 0000000..3aebfdd Binary files /dev/null and b/mods/farming/textures/farming_melon_7.png differ diff --git a/mods/farming/textures/farming_melon_bottom.png b/mods/farming/textures/farming_melon_bottom.png new file mode 100644 index 0000000..91d1e6c Binary files /dev/null and b/mods/farming/textures/farming_melon_bottom.png differ diff --git a/mods/farming/textures/farming_melon_side.png b/mods/farming/textures/farming_melon_side.png new file mode 100644 index 0000000..07afb25 Binary files /dev/null and b/mods/farming/textures/farming_melon_side.png differ diff --git a/mods/farming/textures/farming_melon_slice.png b/mods/farming/textures/farming_melon_slice.png new file mode 100644 index 0000000..6ee9775 Binary files /dev/null and b/mods/farming/textures/farming_melon_slice.png differ diff --git a/mods/farming/textures/farming_melon_top.png b/mods/farming/textures/farming_melon_top.png new file mode 100644 index 0000000..29ca92d Binary files /dev/null and b/mods/farming/textures/farming_melon_top.png differ diff --git a/mods/farming/textures/farming_mint_1.png b/mods/farming/textures/farming_mint_1.png new file mode 100644 index 0000000..1f303ae Binary files /dev/null and b/mods/farming/textures/farming_mint_1.png differ diff --git a/mods/farming/textures/farming_mint_2.png b/mods/farming/textures/farming_mint_2.png new file mode 100644 index 0000000..cdcde54 Binary files /dev/null and b/mods/farming/textures/farming_mint_2.png differ diff --git a/mods/farming/textures/farming_mint_3.png b/mods/farming/textures/farming_mint_3.png new file mode 100644 index 0000000..4bfc43f Binary files /dev/null and b/mods/farming/textures/farming_mint_3.png differ diff --git a/mods/farming/textures/farming_mint_4.png b/mods/farming/textures/farming_mint_4.png new file mode 100644 index 0000000..a71a6e3 Binary files /dev/null and b/mods/farming/textures/farming_mint_4.png differ diff --git a/mods/farming/textures/farming_mint_leaf.png b/mods/farming/textures/farming_mint_leaf.png new file mode 100644 index 0000000..9e14467 Binary files /dev/null and b/mods/farming/textures/farming_mint_leaf.png differ diff --git a/mods/farming/textures/farming_mint_seeds.png b/mods/farming/textures/farming_mint_seeds.png new file mode 100644 index 0000000..2e0a0ea Binary files /dev/null and b/mods/farming/textures/farming_mint_seeds.png differ diff --git a/mods/farming/textures/farming_mint_tea.png b/mods/farming/textures/farming_mint_tea.png new file mode 100644 index 0000000..a4b6440 Binary files /dev/null and b/mods/farming/textures/farming_mint_tea.png differ diff --git a/mods/farming/textures/farming_mixing_bowl.png b/mods/farming/textures/farming_mixing_bowl.png new file mode 100644 index 0000000..e96edf0 Binary files /dev/null and b/mods/farming/textures/farming_mixing_bowl.png differ diff --git a/mods/farming/textures/farming_mochi.png b/mods/farming/textures/farming_mochi.png new file mode 100644 index 0000000..7b3b2b5 Binary files /dev/null and b/mods/farming/textures/farming_mochi.png differ diff --git a/mods/farming/textures/farming_mortar_pestle.png b/mods/farming/textures/farming_mortar_pestle.png new file mode 100644 index 0000000..abfeb9e Binary files /dev/null and b/mods/farming/textures/farming_mortar_pestle.png differ diff --git a/mods/farming/textures/farming_oat.png b/mods/farming/textures/farming_oat.png new file mode 100644 index 0000000..e8d5c23 Binary files /dev/null and b/mods/farming/textures/farming_oat.png differ diff --git a/mods/farming/textures/farming_oat_1.png b/mods/farming/textures/farming_oat_1.png new file mode 100644 index 0000000..177fbdf Binary files /dev/null and b/mods/farming/textures/farming_oat_1.png differ diff --git a/mods/farming/textures/farming_oat_2.png b/mods/farming/textures/farming_oat_2.png new file mode 100644 index 0000000..fe051ea Binary files /dev/null and b/mods/farming/textures/farming_oat_2.png differ diff --git a/mods/farming/textures/farming_oat_3.png b/mods/farming/textures/farming_oat_3.png new file mode 100644 index 0000000..5aba108 Binary files /dev/null and b/mods/farming/textures/farming_oat_3.png differ diff --git a/mods/farming/textures/farming_oat_4.png b/mods/farming/textures/farming_oat_4.png new file mode 100644 index 0000000..833b134 Binary files /dev/null and b/mods/farming/textures/farming_oat_4.png differ diff --git a/mods/farming/textures/farming_oat_5.png b/mods/farming/textures/farming_oat_5.png new file mode 100644 index 0000000..ec0803b Binary files /dev/null and b/mods/farming/textures/farming_oat_5.png differ diff --git a/mods/farming/textures/farming_oat_6.png b/mods/farming/textures/farming_oat_6.png new file mode 100644 index 0000000..847adc5 Binary files /dev/null and b/mods/farming/textures/farming_oat_6.png differ diff --git a/mods/farming/textures/farming_oat_7.png b/mods/farming/textures/farming_oat_7.png new file mode 100644 index 0000000..3552811 Binary files /dev/null and b/mods/farming/textures/farming_oat_7.png differ diff --git a/mods/farming/textures/farming_oat_8.png b/mods/farming/textures/farming_oat_8.png new file mode 100644 index 0000000..c7a5540 Binary files /dev/null and b/mods/farming/textures/farming_oat_8.png differ diff --git a/mods/farming/textures/farming_oat_seed.png b/mods/farming/textures/farming_oat_seed.png new file mode 100644 index 0000000..893c93c Binary files /dev/null and b/mods/farming/textures/farming_oat_seed.png differ diff --git a/mods/farming/textures/farming_onigiri.png b/mods/farming/textures/farming_onigiri.png new file mode 100644 index 0000000..86ee7c6 Binary files /dev/null and b/mods/farming/textures/farming_onigiri.png differ diff --git a/mods/farming/textures/farming_onion_soup.png b/mods/farming/textures/farming_onion_soup.png new file mode 100644 index 0000000..cd535ae Binary files /dev/null and b/mods/farming/textures/farming_onion_soup.png differ diff --git a/mods/farming/textures/farming_orange.png b/mods/farming/textures/farming_orange.png new file mode 100644 index 0000000..8b9ec29 Binary files /dev/null and b/mods/farming/textures/farming_orange.png differ diff --git a/mods/farming/textures/farming_paella.png b/mods/farming/textures/farming_paella.png new file mode 100644 index 0000000..1362ac7 Binary files /dev/null and b/mods/farming/textures/farming_paella.png differ diff --git a/mods/farming/textures/farming_parsley.png b/mods/farming/textures/farming_parsley.png new file mode 100644 index 0000000..183ecb7 Binary files /dev/null and b/mods/farming/textures/farming_parsley.png differ diff --git a/mods/farming/textures/farming_parsley_1.png b/mods/farming/textures/farming_parsley_1.png new file mode 100644 index 0000000..632928c Binary files /dev/null and b/mods/farming/textures/farming_parsley_1.png differ diff --git a/mods/farming/textures/farming_parsley_2.png b/mods/farming/textures/farming_parsley_2.png new file mode 100644 index 0000000..fddbf00 Binary files /dev/null and b/mods/farming/textures/farming_parsley_2.png differ diff --git a/mods/farming/textures/farming_parsley_3.png b/mods/farming/textures/farming_parsley_3.png new file mode 100644 index 0000000..e4aacb9 Binary files /dev/null and b/mods/farming/textures/farming_parsley_3.png differ diff --git a/mods/farming/textures/farming_pasta.png b/mods/farming/textures/farming_pasta.png new file mode 100644 index 0000000..af6a48c Binary files /dev/null and b/mods/farming/textures/farming_pasta.png differ diff --git a/mods/farming/textures/farming_pea_1.png b/mods/farming/textures/farming_pea_1.png new file mode 100644 index 0000000..eb48e36 Binary files /dev/null and b/mods/farming/textures/farming_pea_1.png differ diff --git a/mods/farming/textures/farming_pea_2.png b/mods/farming/textures/farming_pea_2.png new file mode 100644 index 0000000..4db7551 Binary files /dev/null and b/mods/farming/textures/farming_pea_2.png differ diff --git a/mods/farming/textures/farming_pea_3.png b/mods/farming/textures/farming_pea_3.png new file mode 100644 index 0000000..980d6ea Binary files /dev/null and b/mods/farming/textures/farming_pea_3.png differ diff --git a/mods/farming/textures/farming_pea_4.png b/mods/farming/textures/farming_pea_4.png new file mode 100644 index 0000000..551eaf4 Binary files /dev/null and b/mods/farming/textures/farming_pea_4.png differ diff --git a/mods/farming/textures/farming_pea_5.png b/mods/farming/textures/farming_pea_5.png new file mode 100644 index 0000000..907760d Binary files /dev/null and b/mods/farming/textures/farming_pea_5.png differ diff --git a/mods/farming/textures/farming_pea_pod.png b/mods/farming/textures/farming_pea_pod.png new file mode 100644 index 0000000..1c19c9f Binary files /dev/null and b/mods/farming/textures/farming_pea_pod.png differ diff --git a/mods/farming/textures/farming_pea_soup.png b/mods/farming/textures/farming_pea_soup.png new file mode 100644 index 0000000..03753cf Binary files /dev/null and b/mods/farming/textures/farming_pea_soup.png differ diff --git a/mods/farming/textures/farming_pineapple.png b/mods/farming/textures/farming_pineapple.png new file mode 100644 index 0000000..febf22a Binary files /dev/null and b/mods/farming/textures/farming_pineapple.png differ diff --git a/mods/farming/textures/farming_pineapple_1.png b/mods/farming/textures/farming_pineapple_1.png new file mode 100644 index 0000000..262eff7 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_1.png differ diff --git a/mods/farming/textures/farming_pineapple_2.png b/mods/farming/textures/farming_pineapple_2.png new file mode 100644 index 0000000..4b96d17 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_2.png differ diff --git a/mods/farming/textures/farming_pineapple_3.png b/mods/farming/textures/farming_pineapple_3.png new file mode 100644 index 0000000..90464a1 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_3.png differ diff --git a/mods/farming/textures/farming_pineapple_4.png b/mods/farming/textures/farming_pineapple_4.png new file mode 100644 index 0000000..be58e53 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_4.png differ diff --git a/mods/farming/textures/farming_pineapple_5.png b/mods/farming/textures/farming_pineapple_5.png new file mode 100644 index 0000000..2526f83 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_5.png differ diff --git a/mods/farming/textures/farming_pineapple_6.png b/mods/farming/textures/farming_pineapple_6.png new file mode 100644 index 0000000..741e0e3 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_6.png differ diff --git a/mods/farming/textures/farming_pineapple_7.png b/mods/farming/textures/farming_pineapple_7.png new file mode 100644 index 0000000..22bad23 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_7.png differ diff --git a/mods/farming/textures/farming_pineapple_8.png b/mods/farming/textures/farming_pineapple_8.png new file mode 100644 index 0000000..5182c4f Binary files /dev/null and b/mods/farming/textures/farming_pineapple_8.png differ diff --git a/mods/farming/textures/farming_pineapple_juice.png b/mods/farming/textures/farming_pineapple_juice.png new file mode 100644 index 0000000..43a54c7 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_juice.png differ diff --git a/mods/farming/textures/farming_pineapple_ring.png b/mods/farming/textures/farming_pineapple_ring.png new file mode 100644 index 0000000..4cf3feb Binary files /dev/null and b/mods/farming/textures/farming_pineapple_ring.png differ diff --git a/mods/farming/textures/farming_pineapple_top.png b/mods/farming/textures/farming_pineapple_top.png new file mode 100644 index 0000000..f653d83 Binary files /dev/null and b/mods/farming/textures/farming_pineapple_top.png differ diff --git a/mods/farming/textures/farming_popcorn.png b/mods/farming/textures/farming_popcorn.png new file mode 100644 index 0000000..6a534b9 Binary files /dev/null and b/mods/farming/textures/farming_popcorn.png differ diff --git a/mods/farming/textures/farming_porridge.png b/mods/farming/textures/farming_porridge.png new file mode 100644 index 0000000..cd4466f Binary files /dev/null and b/mods/farming/textures/farming_porridge.png differ diff --git a/mods/farming/textures/farming_pot.png b/mods/farming/textures/farming_pot.png new file mode 100644 index 0000000..d28411d Binary files /dev/null and b/mods/farming/textures/farming_pot.png differ diff --git a/mods/farming/textures/farming_potato.png b/mods/farming/textures/farming_potato.png new file mode 100644 index 0000000..6e91d6a Binary files /dev/null and b/mods/farming/textures/farming_potato.png differ diff --git a/mods/farming/textures/farming_potato_1.png b/mods/farming/textures/farming_potato_1.png new file mode 100644 index 0000000..a9c0040 Binary files /dev/null and b/mods/farming/textures/farming_potato_1.png differ diff --git a/mods/farming/textures/farming_potato_2.png b/mods/farming/textures/farming_potato_2.png new file mode 100644 index 0000000..c81830c Binary files /dev/null and b/mods/farming/textures/farming_potato_2.png differ diff --git a/mods/farming/textures/farming_potato_3.png b/mods/farming/textures/farming_potato_3.png new file mode 100644 index 0000000..a3d7920 Binary files /dev/null and b/mods/farming/textures/farming_potato_3.png differ diff --git a/mods/farming/textures/farming_potato_4.png b/mods/farming/textures/farming_potato_4.png new file mode 100644 index 0000000..405b7e5 Binary files /dev/null and b/mods/farming/textures/farming_potato_4.png differ diff --git a/mods/farming/textures/farming_potato_omelet.png b/mods/farming/textures/farming_potato_omelet.png new file mode 100644 index 0000000..abdacad Binary files /dev/null and b/mods/farming/textures/farming_potato_omelet.png differ diff --git a/mods/farming/textures/farming_potato_salad.png b/mods/farming/textures/farming_potato_salad.png new file mode 100644 index 0000000..0028c91 Binary files /dev/null and b/mods/farming/textures/farming_potato_salad.png differ diff --git a/mods/farming/textures/farming_pumpkin_1.png b/mods/farming/textures/farming_pumpkin_1.png new file mode 100644 index 0000000..e5b9a2b Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_1.png differ diff --git a/mods/farming/textures/farming_pumpkin_2.png b/mods/farming/textures/farming_pumpkin_2.png new file mode 100644 index 0000000..d977e8c Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_2.png differ diff --git a/mods/farming/textures/farming_pumpkin_3.png b/mods/farming/textures/farming_pumpkin_3.png new file mode 100644 index 0000000..83f8190 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_3.png differ diff --git a/mods/farming/textures/farming_pumpkin_4.png b/mods/farming/textures/farming_pumpkin_4.png new file mode 100644 index 0000000..20de004 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_4.png differ diff --git a/mods/farming/textures/farming_pumpkin_5.png b/mods/farming/textures/farming_pumpkin_5.png new file mode 100644 index 0000000..59fa78e Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_5.png differ diff --git a/mods/farming/textures/farming_pumpkin_6.png b/mods/farming/textures/farming_pumpkin_6.png new file mode 100644 index 0000000..6ae543e Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_6.png differ diff --git a/mods/farming/textures/farming_pumpkin_7.png b/mods/farming/textures/farming_pumpkin_7.png new file mode 100644 index 0000000..79190e0 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_7.png differ diff --git a/mods/farming/textures/farming_pumpkin_8.png b/mods/farming/textures/farming_pumpkin_8.png new file mode 100644 index 0000000..b941442 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_8.png differ diff --git a/mods/farming/textures/farming_pumpkin_bottom.png b/mods/farming/textures/farming_pumpkin_bottom.png new file mode 100644 index 0000000..b23d241 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_bottom.png differ diff --git a/mods/farming/textures/farming_pumpkin_bread.png b/mods/farming/textures/farming_pumpkin_bread.png new file mode 100644 index 0000000..0dfae08 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_bread.png differ diff --git a/mods/farming/textures/farming_pumpkin_dough.png b/mods/farming/textures/farming_pumpkin_dough.png new file mode 100644 index 0000000..62ea7a6 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_dough.png differ diff --git a/mods/farming/textures/farming_pumpkin_face_off.png b/mods/farming/textures/farming_pumpkin_face_off.png new file mode 100644 index 0000000..df70171 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_face_off.png differ diff --git a/mods/farming/textures/farming_pumpkin_face_on.png b/mods/farming/textures/farming_pumpkin_face_on.png new file mode 100644 index 0000000..fa71c9d Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_face_on.png differ diff --git a/mods/farming/textures/farming_pumpkin_side.png b/mods/farming/textures/farming_pumpkin_side.png new file mode 100644 index 0000000..2d30f20 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_side.png differ diff --git a/mods/farming/textures/farming_pumpkin_slice.png b/mods/farming/textures/farming_pumpkin_slice.png new file mode 100644 index 0000000..1fb659e Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_slice.png differ diff --git a/mods/farming/textures/farming_pumpkin_top.png b/mods/farming/textures/farming_pumpkin_top.png new file mode 100644 index 0000000..7928345 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_top.png differ diff --git a/mods/farming/textures/farming_raspberries.png b/mods/farming/textures/farming_raspberries.png new file mode 100644 index 0000000..ab96e1b Binary files /dev/null and b/mods/farming/textures/farming_raspberries.png differ diff --git a/mods/farming/textures/farming_raspberry_1.png b/mods/farming/textures/farming_raspberry_1.png new file mode 100644 index 0000000..d1a7ffc Binary files /dev/null and b/mods/farming/textures/farming_raspberry_1.png differ diff --git a/mods/farming/textures/farming_raspberry_2.png b/mods/farming/textures/farming_raspberry_2.png new file mode 100644 index 0000000..308a0ca Binary files /dev/null and b/mods/farming/textures/farming_raspberry_2.png differ diff --git a/mods/farming/textures/farming_raspberry_3.png b/mods/farming/textures/farming_raspberry_3.png new file mode 100644 index 0000000..43d2ab1 Binary files /dev/null and b/mods/farming/textures/farming_raspberry_3.png differ diff --git a/mods/farming/textures/farming_raspberry_4.png b/mods/farming/textures/farming_raspberry_4.png new file mode 100644 index 0000000..32da6b9 Binary files /dev/null and b/mods/farming/textures/farming_raspberry_4.png differ diff --git a/mods/farming/textures/farming_raspberry_smoothie.png b/mods/farming/textures/farming_raspberry_smoothie.png new file mode 100644 index 0000000..fe178d1 Binary files /dev/null and b/mods/farming/textures/farming_raspberry_smoothie.png differ diff --git a/mods/farming/textures/farming_rhubarb.png b/mods/farming/textures/farming_rhubarb.png new file mode 100644 index 0000000..7d416ab Binary files /dev/null and b/mods/farming/textures/farming_rhubarb.png differ diff --git a/mods/farming/textures/farming_rhubarb_1.png b/mods/farming/textures/farming_rhubarb_1.png new file mode 100644 index 0000000..01585b1 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_1.png differ diff --git a/mods/farming/textures/farming_rhubarb_2.png b/mods/farming/textures/farming_rhubarb_2.png new file mode 100644 index 0000000..71845c7 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_2.png differ diff --git a/mods/farming/textures/farming_rhubarb_3.png b/mods/farming/textures/farming_rhubarb_3.png new file mode 100644 index 0000000..b412f7e Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_3.png differ diff --git a/mods/farming/textures/farming_rhubarb_pie.png b/mods/farming/textures/farming_rhubarb_pie.png new file mode 100644 index 0000000..1f77b53 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_pie.png differ diff --git a/mods/farming/textures/farming_rice.png b/mods/farming/textures/farming_rice.png new file mode 100644 index 0000000..3d64c7e Binary files /dev/null and b/mods/farming/textures/farming_rice.png differ diff --git a/mods/farming/textures/farming_rice_1.png b/mods/farming/textures/farming_rice_1.png new file mode 100644 index 0000000..715bb2e Binary files /dev/null and b/mods/farming/textures/farming_rice_1.png differ diff --git a/mods/farming/textures/farming_rice_2.png b/mods/farming/textures/farming_rice_2.png new file mode 100644 index 0000000..2662d42 Binary files /dev/null and b/mods/farming/textures/farming_rice_2.png differ diff --git a/mods/farming/textures/farming_rice_3.png b/mods/farming/textures/farming_rice_3.png new file mode 100644 index 0000000..fee87b2 Binary files /dev/null and b/mods/farming/textures/farming_rice_3.png differ diff --git a/mods/farming/textures/farming_rice_4.png b/mods/farming/textures/farming_rice_4.png new file mode 100644 index 0000000..97b026f Binary files /dev/null and b/mods/farming/textures/farming_rice_4.png differ diff --git a/mods/farming/textures/farming_rice_5.png b/mods/farming/textures/farming_rice_5.png new file mode 100644 index 0000000..c249851 Binary files /dev/null and b/mods/farming/textures/farming_rice_5.png differ diff --git a/mods/farming/textures/farming_rice_6.png b/mods/farming/textures/farming_rice_6.png new file mode 100644 index 0000000..c0e7233 Binary files /dev/null and b/mods/farming/textures/farming_rice_6.png differ diff --git a/mods/farming/textures/farming_rice_7.png b/mods/farming/textures/farming_rice_7.png new file mode 100644 index 0000000..9d251ee Binary files /dev/null and b/mods/farming/textures/farming_rice_7.png differ diff --git a/mods/farming/textures/farming_rice_8.png b/mods/farming/textures/farming_rice_8.png new file mode 100644 index 0000000..41b37e0 Binary files /dev/null and b/mods/farming/textures/farming_rice_8.png differ diff --git a/mods/farming/textures/farming_rice_bread.png b/mods/farming/textures/farming_rice_bread.png new file mode 100644 index 0000000..f14f741 Binary files /dev/null and b/mods/farming/textures/farming_rice_bread.png differ diff --git a/mods/farming/textures/farming_rice_flour.png b/mods/farming/textures/farming_rice_flour.png new file mode 100644 index 0000000..2722151 Binary files /dev/null and b/mods/farming/textures/farming_rice_flour.png differ diff --git a/mods/farming/textures/farming_rose_water.png b/mods/farming/textures/farming_rose_water.png new file mode 100644 index 0000000..96e546f Binary files /dev/null and b/mods/farming/textures/farming_rose_water.png differ diff --git a/mods/farming/textures/farming_rye.png b/mods/farming/textures/farming_rye.png new file mode 100644 index 0000000..ebc5b37 Binary files /dev/null and b/mods/farming/textures/farming_rye.png differ diff --git a/mods/farming/textures/farming_rye_1.png b/mods/farming/textures/farming_rye_1.png new file mode 100644 index 0000000..932b621 Binary files /dev/null and b/mods/farming/textures/farming_rye_1.png differ diff --git a/mods/farming/textures/farming_rye_2.png b/mods/farming/textures/farming_rye_2.png new file mode 100644 index 0000000..b6a69b7 Binary files /dev/null and b/mods/farming/textures/farming_rye_2.png differ diff --git a/mods/farming/textures/farming_rye_3.png b/mods/farming/textures/farming_rye_3.png new file mode 100644 index 0000000..aaa71c2 Binary files /dev/null and b/mods/farming/textures/farming_rye_3.png differ diff --git a/mods/farming/textures/farming_rye_4.png b/mods/farming/textures/farming_rye_4.png new file mode 100644 index 0000000..ea1246e Binary files /dev/null and b/mods/farming/textures/farming_rye_4.png differ diff --git a/mods/farming/textures/farming_rye_5.png b/mods/farming/textures/farming_rye_5.png new file mode 100644 index 0000000..b359673 Binary files /dev/null and b/mods/farming/textures/farming_rye_5.png differ diff --git a/mods/farming/textures/farming_rye_6.png b/mods/farming/textures/farming_rye_6.png new file mode 100644 index 0000000..749a2ef Binary files /dev/null and b/mods/farming/textures/farming_rye_6.png differ diff --git a/mods/farming/textures/farming_rye_7.png b/mods/farming/textures/farming_rye_7.png new file mode 100644 index 0000000..fc78198 Binary files /dev/null and b/mods/farming/textures/farming_rye_7.png differ diff --git a/mods/farming/textures/farming_rye_8.png b/mods/farming/textures/farming_rye_8.png new file mode 100644 index 0000000..0b7c33e Binary files /dev/null and b/mods/farming/textures/farming_rye_8.png differ diff --git a/mods/farming/textures/farming_rye_seed.png b/mods/farming/textures/farming_rye_seed.png new file mode 100644 index 0000000..e65ba9b Binary files /dev/null and b/mods/farming/textures/farming_rye_seed.png differ diff --git a/mods/farming/textures/farming_salad.png b/mods/farming/textures/farming_salad.png new file mode 100644 index 0000000..febf40f Binary files /dev/null and b/mods/farming/textures/farming_salad.png differ diff --git a/mods/farming/textures/farming_salt.png b/mods/farming/textures/farming_salt.png new file mode 100644 index 0000000..2b23e33 Binary files /dev/null and b/mods/farming/textures/farming_salt.png differ diff --git a/mods/farming/textures/farming_salt_crystal.png b/mods/farming/textures/farming_salt_crystal.png new file mode 100644 index 0000000..e94ed7b Binary files /dev/null and b/mods/farming/textures/farming_salt_crystal.png differ diff --git a/mods/farming/textures/farming_saucepan.png b/mods/farming/textures/farming_saucepan.png new file mode 100644 index 0000000..2625d45 Binary files /dev/null and b/mods/farming/textures/farming_saucepan.png differ diff --git a/mods/farming/textures/farming_scythe_mithril.png b/mods/farming/textures/farming_scythe_mithril.png new file mode 100644 index 0000000..17c89c5 Binary files /dev/null and b/mods/farming/textures/farming_scythe_mithril.png differ diff --git a/mods/farming/textures/farming_skillet.png b/mods/farming/textures/farming_skillet.png new file mode 100644 index 0000000..60d26a1 Binary files /dev/null and b/mods/farming/textures/farming_skillet.png differ diff --git a/mods/farming/textures/farming_soy_1.png b/mods/farming/textures/farming_soy_1.png new file mode 100644 index 0000000..9a64d87 Binary files /dev/null and b/mods/farming/textures/farming_soy_1.png differ diff --git a/mods/farming/textures/farming_soy_2.png b/mods/farming/textures/farming_soy_2.png new file mode 100644 index 0000000..e491594 Binary files /dev/null and b/mods/farming/textures/farming_soy_2.png differ diff --git a/mods/farming/textures/farming_soy_3.png b/mods/farming/textures/farming_soy_3.png new file mode 100644 index 0000000..e8f39ee Binary files /dev/null and b/mods/farming/textures/farming_soy_3.png differ diff --git a/mods/farming/textures/farming_soy_4.png b/mods/farming/textures/farming_soy_4.png new file mode 100644 index 0000000..3012c2a Binary files /dev/null and b/mods/farming/textures/farming_soy_4.png differ diff --git a/mods/farming/textures/farming_soy_5.png b/mods/farming/textures/farming_soy_5.png new file mode 100644 index 0000000..63f0ce4 Binary files /dev/null and b/mods/farming/textures/farming_soy_5.png differ diff --git a/mods/farming/textures/farming_soy_6.png b/mods/farming/textures/farming_soy_6.png new file mode 100644 index 0000000..581def5 Binary files /dev/null and b/mods/farming/textures/farming_soy_6.png differ diff --git a/mods/farming/textures/farming_soy_7.png b/mods/farming/textures/farming_soy_7.png new file mode 100644 index 0000000..eb47e32 Binary files /dev/null and b/mods/farming/textures/farming_soy_7.png differ diff --git a/mods/farming/textures/farming_soy_milk_glass.png b/mods/farming/textures/farming_soy_milk_glass.png new file mode 100644 index 0000000..95c567d Binary files /dev/null and b/mods/farming/textures/farming_soy_milk_glass.png differ diff --git a/mods/farming/textures/farming_soy_pod.png b/mods/farming/textures/farming_soy_pod.png new file mode 100644 index 0000000..eceeec5 Binary files /dev/null and b/mods/farming/textures/farming_soy_pod.png differ diff --git a/mods/farming/textures/farming_soy_sauce.png b/mods/farming/textures/farming_soy_sauce.png new file mode 100644 index 0000000..f32caec Binary files /dev/null and b/mods/farming/textures/farming_soy_sauce.png differ diff --git a/mods/farming/textures/farming_spaghetti.png b/mods/farming/textures/farming_spaghetti.png new file mode 100644 index 0000000..a401281 Binary files /dev/null and b/mods/farming/textures/farming_spaghetti.png differ diff --git a/mods/farming/textures/farming_spanish_potatoes.png b/mods/farming/textures/farming_spanish_potatoes.png new file mode 100644 index 0000000..198b50e Binary files /dev/null and b/mods/farming/textures/farming_spanish_potatoes.png differ diff --git a/mods/farming/textures/farming_straw.png b/mods/farming/textures/farming_straw.png index f9f5fe7..e427772 100644 Binary files a/mods/farming/textures/farming_straw.png and b/mods/farming/textures/farming_straw.png differ diff --git a/mods/farming/textures/farming_strawberry.png b/mods/farming/textures/farming_strawberry.png new file mode 100644 index 0000000..5b43e6b Binary files /dev/null and b/mods/farming/textures/farming_strawberry.png differ diff --git a/mods/farming/textures/farming_sugar.png b/mods/farming/textures/farming_sugar.png new file mode 100644 index 0000000..5cb7fa0 Binary files /dev/null and b/mods/farming/textures/farming_sugar.png differ diff --git a/mods/farming/textures/farming_sunflower.png b/mods/farming/textures/farming_sunflower.png new file mode 100644 index 0000000..06b9387 Binary files /dev/null and b/mods/farming/textures/farming_sunflower.png differ diff --git a/mods/farming/textures/farming_sunflower_1.png b/mods/farming/textures/farming_sunflower_1.png new file mode 100644 index 0000000..719ec40 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_1.png differ diff --git a/mods/farming/textures/farming_sunflower_2.png b/mods/farming/textures/farming_sunflower_2.png new file mode 100644 index 0000000..4ccfff3 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_2.png differ diff --git a/mods/farming/textures/farming_sunflower_3.png b/mods/farming/textures/farming_sunflower_3.png new file mode 100644 index 0000000..719b5f1 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_3.png differ diff --git a/mods/farming/textures/farming_sunflower_4.png b/mods/farming/textures/farming_sunflower_4.png new file mode 100644 index 0000000..2b03eb5 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_4.png differ diff --git a/mods/farming/textures/farming_sunflower_5.png b/mods/farming/textures/farming_sunflower_5.png new file mode 100644 index 0000000..a9c474e Binary files /dev/null and b/mods/farming/textures/farming_sunflower_5.png differ diff --git a/mods/farming/textures/farming_sunflower_6.png b/mods/farming/textures/farming_sunflower_6.png new file mode 100644 index 0000000..a2ee843 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_6.png differ diff --git a/mods/farming/textures/farming_sunflower_7.png b/mods/farming/textures/farming_sunflower_7.png new file mode 100644 index 0000000..e3a0986 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_7.png differ diff --git a/mods/farming/textures/farming_sunflower_8.png b/mods/farming/textures/farming_sunflower_8.png new file mode 100644 index 0000000..5d1022f Binary files /dev/null and b/mods/farming/textures/farming_sunflower_8.png differ diff --git a/mods/farming/textures/farming_sunflower_bread.png b/mods/farming/textures/farming_sunflower_bread.png new file mode 100644 index 0000000..112e8c6 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_bread.png differ diff --git a/mods/farming/textures/farming_sunflower_oil.png b/mods/farming/textures/farming_sunflower_oil.png new file mode 100644 index 0000000..36d139f Binary files /dev/null and b/mods/farming/textures/farming_sunflower_oil.png differ diff --git a/mods/farming/textures/farming_sunflower_seeds.png b/mods/farming/textures/farming_sunflower_seeds.png new file mode 100644 index 0000000..fe67a0c Binary files /dev/null and b/mods/farming/textures/farming_sunflower_seeds.png differ diff --git a/mods/farming/textures/farming_sunflower_seeds_toasted.png b/mods/farming/textures/farming_sunflower_seeds_toasted.png new file mode 100644 index 0000000..1973e48 Binary files /dev/null and b/mods/farming/textures/farming_sunflower_seeds_toasted.png differ diff --git a/mods/farming/textures/farming_toast.png b/mods/farming/textures/farming_toast.png new file mode 100644 index 0000000..8a4524e Binary files /dev/null and b/mods/farming/textures/farming_toast.png differ diff --git a/mods/farming/textures/farming_toast_sandwich.png b/mods/farming/textures/farming_toast_sandwich.png new file mode 100644 index 0000000..c60ff5a Binary files /dev/null and b/mods/farming/textures/farming_toast_sandwich.png differ diff --git a/mods/farming/textures/farming_tofu.png b/mods/farming/textures/farming_tofu.png new file mode 100644 index 0000000..aaa0a2c Binary files /dev/null and b/mods/farming/textures/farming_tofu.png differ diff --git a/mods/farming/textures/farming_tofu_cooked.png b/mods/farming/textures/farming_tofu_cooked.png new file mode 100644 index 0000000..23963ce Binary files /dev/null and b/mods/farming/textures/farming_tofu_cooked.png differ diff --git a/mods/farming/textures/farming_tomato.png b/mods/farming/textures/farming_tomato.png new file mode 100644 index 0000000..586aa56 Binary files /dev/null and b/mods/farming/textures/farming_tomato.png differ diff --git a/mods/farming/textures/farming_tomato_1.png b/mods/farming/textures/farming_tomato_1.png new file mode 100644 index 0000000..d858e58 Binary files /dev/null and b/mods/farming/textures/farming_tomato_1.png differ diff --git a/mods/farming/textures/farming_tomato_2.png b/mods/farming/textures/farming_tomato_2.png new file mode 100644 index 0000000..9d9ed6d Binary files /dev/null and b/mods/farming/textures/farming_tomato_2.png differ diff --git a/mods/farming/textures/farming_tomato_3.png b/mods/farming/textures/farming_tomato_3.png new file mode 100644 index 0000000..fe3dcf0 Binary files /dev/null and b/mods/farming/textures/farming_tomato_3.png differ diff --git a/mods/farming/textures/farming_tomato_4.png b/mods/farming/textures/farming_tomato_4.png new file mode 100644 index 0000000..27c3282 Binary files /dev/null and b/mods/farming/textures/farming_tomato_4.png differ diff --git a/mods/farming/textures/farming_tomato_5.png b/mods/farming/textures/farming_tomato_5.png new file mode 100644 index 0000000..f369a68 Binary files /dev/null and b/mods/farming/textures/farming_tomato_5.png differ diff --git a/mods/farming/textures/farming_tomato_6.png b/mods/farming/textures/farming_tomato_6.png new file mode 100644 index 0000000..0135cb5 Binary files /dev/null and b/mods/farming/textures/farming_tomato_6.png differ diff --git a/mods/farming/textures/farming_tomato_7.png b/mods/farming/textures/farming_tomato_7.png new file mode 100644 index 0000000..4cd85f5 Binary files /dev/null and b/mods/farming/textures/farming_tomato_7.png differ diff --git a/mods/farming/textures/farming_tomato_8.png b/mods/farming/textures/farming_tomato_8.png new file mode 100644 index 0000000..0b49025 Binary files /dev/null and b/mods/farming/textures/farming_tomato_8.png differ diff --git a/mods/farming/textures/farming_tomato_soup.png b/mods/farming/textures/farming_tomato_soup.png new file mode 100644 index 0000000..d58d53d Binary files /dev/null and b/mods/farming/textures/farming_tomato_soup.png differ diff --git a/mods/farming/textures/farming_tool_bronzehoe.png b/mods/farming/textures/farming_tool_bronzehoe.png index 2802d11..ef07a80 100644 Binary files a/mods/farming/textures/farming_tool_bronzehoe.png 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 index 66f1042..093acb8 100644 Binary files a/mods/farming/textures/farming_tool_diamondhoe.png 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 index 4534fba..ffd597a 100644 Binary files a/mods/farming/textures/farming_tool_mesehoe.png 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 index d057af2..893a695 100644 Binary files a/mods/farming/textures/farming_tool_steelhoe.png 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 index 55d8123..4f8dade 100644 Binary files a/mods/farming/textures/farming_tool_stonehoe.png 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 index a287152..8b20d2d 100644 Binary files a/mods/farming/textures/farming_tool_woodhoe.png and b/mods/farming/textures/farming_tool_woodhoe.png differ diff --git a/mods/farming/textures/farming_trellis.png b/mods/farming/textures/farming_trellis.png new file mode 100644 index 0000000..855b932 Binary files /dev/null and b/mods/farming/textures/farming_trellis.png differ diff --git a/mods/farming/textures/farming_turkish_delight.png b/mods/farming/textures/farming_turkish_delight.png new file mode 100644 index 0000000..198ffc4 Binary files /dev/null and b/mods/farming/textures/farming_turkish_delight.png differ diff --git a/mods/farming/textures/farming_vanilla.png b/mods/farming/textures/farming_vanilla.png new file mode 100644 index 0000000..25596ad Binary files /dev/null and b/mods/farming/textures/farming_vanilla.png differ diff --git a/mods/farming/textures/farming_vanilla_1.png b/mods/farming/textures/farming_vanilla_1.png new file mode 100644 index 0000000..fdd10c0 Binary files /dev/null and b/mods/farming/textures/farming_vanilla_1.png differ diff --git a/mods/farming/textures/farming_vanilla_2.png b/mods/farming/textures/farming_vanilla_2.png new file mode 100644 index 0000000..73ba2ca Binary files /dev/null and b/mods/farming/textures/farming_vanilla_2.png differ diff --git a/mods/farming/textures/farming_vanilla_3.png b/mods/farming/textures/farming_vanilla_3.png new file mode 100644 index 0000000..596b9bf Binary files /dev/null and b/mods/farming/textures/farming_vanilla_3.png differ diff --git a/mods/farming/textures/farming_vanilla_4.png b/mods/farming/textures/farming_vanilla_4.png new file mode 100644 index 0000000..5585827 Binary files /dev/null and b/mods/farming/textures/farming_vanilla_4.png differ diff --git a/mods/farming/textures/farming_vanilla_5.png b/mods/farming/textures/farming_vanilla_5.png new file mode 100644 index 0000000..7ac3ef7 Binary files /dev/null and b/mods/farming/textures/farming_vanilla_5.png differ diff --git a/mods/farming/textures/farming_vanilla_6.png b/mods/farming/textures/farming_vanilla_6.png new file mode 100644 index 0000000..10a5bfd Binary files /dev/null and b/mods/farming/textures/farming_vanilla_6.png differ diff --git a/mods/farming/textures/farming_vanilla_7.png b/mods/farming/textures/farming_vanilla_7.png new file mode 100644 index 0000000..f2962ee Binary files /dev/null and b/mods/farming/textures/farming_vanilla_7.png differ diff --git a/mods/farming/textures/farming_vanilla_8.png b/mods/farming/textures/farming_vanilla_8.png new file mode 100644 index 0000000..1801a97 Binary files /dev/null and b/mods/farming/textures/farming_vanilla_8.png differ diff --git a/mods/farming/textures/farming_vanilla_extract.png b/mods/farming/textures/farming_vanilla_extract.png new file mode 100644 index 0000000..c0668ce Binary files /dev/null and b/mods/farming/textures/farming_vanilla_extract.png differ diff --git a/mods/farming/textures/farming_vanilla_flan.png b/mods/farming/textures/farming_vanilla_flan.png new file mode 100644 index 0000000..c8b9ff0 Binary files /dev/null and b/mods/farming/textures/farming_vanilla_flan.png differ diff --git a/mods/farming/textures/farming_water_glass.png b/mods/farming/textures/farming_water_glass.png new file mode 100644 index 0000000..081f8d6 Binary files /dev/null and b/mods/farming/textures/farming_water_glass.png differ diff --git a/mods/farming/textures/vessels_drinking_cup.png b/mods/farming/textures/vessels_drinking_cup.png new file mode 100644 index 0000000..2eba232 Binary files /dev/null and b/mods/farming/textures/vessels_drinking_cup.png differ diff --git a/mods/farming/utensils.lua b/mods/farming/utensils.lua new file mode 100644 index 0000000..f9b2d29 --- /dev/null +++ b/mods/farming/utensils.lua @@ -0,0 +1,160 @@ + +local S = farming.intllib + +-- wooden bowl + +minetest.register_craftitem("farming:bowl", { + description = S("Wooden Bowl"), + inventory_image = "farming_bowl.png", + groups = {food_bowl = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:bowl 4", + recipe = { + {"group:wood", "", "group:wood"}, + {"", "group:wood", ""} + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:bowl", + burntime = 10 +}) + +-- saucepan + +minetest.register_craftitem("farming:saucepan", { + description = S("Saucepan"), + inventory_image = "farming_saucepan.png", + groups = {food_saucepan = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:saucepan", + recipe = { + {"default:steel_ingot", "", ""}, + {"", "group:stick", ""} + } +}) + +-- cooking pot + +minetest.register_craftitem("farming:pot", { + description = S("Cooking Pot"), + inventory_image = "farming_pot.png", + groups = {food_pot = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:pot", + recipe = { + {"group:stick", "default:steel_ingot", "default:steel_ingot"}, + {"", "default:steel_ingot", "default:steel_ingot"} + } +}) + +-- baking tray + +minetest.register_craftitem("farming:baking_tray", { + description = S("Baking Tray"), + inventory_image = "farming_baking_tray.png", + groups = {food_baking_tray = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:baking_tray", + recipe = { + {"default:clay_brick", "default:clay_brick", "default:clay_brick"}, + {"default:clay_brick", "", "default:clay_brick"}, + {"default:clay_brick", "default:clay_brick", "default:clay_brick"} + } +}) + +-- skillet + +minetest.register_craftitem("farming:skillet", { + description = S("Skillet"), + inventory_image = "farming_skillet.png", + groups = {food_skillet = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:skillet", + recipe = { + {"default:steel_ingot", "", ""}, + {"", "default:steel_ingot", ""}, + {"", "", "group:stick"} + } +}) + +-- mortar and pestle + +minetest.register_craftitem("farming:mortar_pestle", { + description = S("Mortar and Pestle"), + inventory_image = "farming_mortar_pestle.png", + groups = {food_mortar_pestle = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:mortar_pestle", + recipe = { + {"default:stone", "group:stick", "default:stone"}, + {"", "default:stone", ""} + } +}) + +-- cutting board + +minetest.register_craftitem("farming:cutting_board", { + description = S("Cutting Board"), + inventory_image = "farming_cutting_board.png", + groups = {food_cutting_board = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:cutting_board", + recipe = { + {"default:steel_ingot", "", ""}, + {"", "group:stick", ""}, + {"", "", "group:wood"} + } +}) + +-- juicer + +minetest.register_craftitem("farming:juicer", { + description = S("Juicer"), + inventory_image = "farming_juicer.png", + groups = {food_juicer = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:juicer", + recipe = { + {"", "default:stone", ""}, + {"default:stone", "", "default:stone"} + } +}) + +-- glass mixing bowl + +minetest.register_craftitem("farming:mixing_bowl", { + description = S("Glass Mixing Bowl"), + inventory_image = "farming_mixing_bowl.png", + groups = {food_mixing_bowl = 1, flammable = 2} +}) + +minetest.register_craft({ + output = "farming:mixing_bowl", + recipe = { + {"default:glass", "group:stick", "default:glass"}, + {"", "default:glass", ""} + } +}) + +minetest.register_craft( { + output = "vessels:glass_fragments", + recipe = {{"farming:mixing_bowl"}} +}) diff --git a/mods/fire/README.md b/mods/fire/README.md new file mode 100644 index 0000000..6ed3f81 --- /dev/null +++ b/mods/fire/README.md @@ -0,0 +1,80 @@ +minetest mod fire +========================== + +Fire featured mod + +Information +----------- + +This mod is named `fire`, it features work from original mod. +This is improved for Chest drops and /fire (on|off) command too to +disable propagation of fire destruction. + +![screenshot.png](screenshot.png) + +Technical informaton +-------------------- + +#### Dependencies + +* default + +#### Configuration + +* `enable_fire` - taken from minetest config file, bool type +* `disable_fire` - taken from minetest config file, bool type + +The `disable_fire` is checked only if `enable_fire` is not defined, +if configure enables or disables usage of fire and flames. + +#### nodes and tools + +| Name | node | notes | +| --------------- | -------------------- | ----- | +| Basic flame | fire:basic_flame | it flames fro a while | +| Permanent flame | fire:permanent_flame | always flaming | +| Flint and Steel | fire:flint_and_steel | it burns flamable things | + +#### chat command + +| Command format | Description | privilegies need | +| ---------------- | -------------------------------------- | ---------------- | +| `/fire ` | Disbles fire spreading when set to OFF | server | + +Licence +------ + +**Source code** + +Originally by Perttu Ahola (celeron55) (LGPL 2.1) +Various Minetest developers and contributors (LGPL 2.1) +Chest drops and /fire (on|off) command additions by TenPlus1 (MIT) + +**Media (textures and model)** + +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 + +Check [lisence.txt](lisence.txt) diff --git a/mods/fire/README.txt b/mods/fire/README.txt deleted file mode 100644 index 25ba26e..0000000 --- a/mods/fire/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -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/depends.txt b/mods/fire/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/mods/fire/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/fire/init.lua b/mods/fire/init.lua index c35207e..6ef5c31 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -1,20 +1,20 @@ --- fire/init.lua - --- Global namespace for functions - -fire = {} - --- Load support for MT game translation. -local S = minetest.get_translator("fire") +fire = { + mod = "redo", + spread = true -- fire spreads by default (when enabled) +} -- '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 @@ -22,20 +22,38 @@ if fire_enabled == nil then end end --- --- Items --- +-- Particle effects + +local function add_effect(pos) + + minetest.add_particlespawner({ + amount = 1, + time = 0.25, + minpos = pos, + maxpos = pos, + minvel = {x = -1, y = 2, z = -1}, + maxvel = {x = 1, y = 4, z = 1}, + minacc = {x = 0, y = 0, z = 0}, + maxacc = {x = 0, y = 0, z = 0}, + minexptime = 1, + maxexptime = 3, + minsize = 2, + maxsize = 5, + texture = "tnt_smoke.png" + }) +end -- Flood flame function local function flood_flame(pos, oldnode, newnode) + -- 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("fire_extinguish_flame", - {pos = pos, max_hear_distance = 16, gain = 0.15}, true) + 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 @@ -63,32 +81,41 @@ minetest.register_node("fire:basic_flame", { sunlight_propagates = true, floodable = true, damage_per_second = 4, - groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "", + groups = {igniter = 2, dig_immediate = 3, fire = 1, not_in_creative_inventory = 1}, + drop = {}, on_timer = function(pos) + local f = minetest.find_node_near(pos, 1, {"group:flammable"}) + if not fire_enabled or not f then - minetest.remove_node(pos) + + minetest.swap_node(pos, {name = "air"}) + return end + -- Restart timer return true end, on_construct = function(pos) + + local n = 0 + + -- if fire not enabled then reduce amount of time flame stays in world if not fire_enabled then - minetest.remove_node(pos) - else - minetest.get_node_timer(pos):start(math.random(30, 60)) + n = 29 end + + minetest.get_node_timer(pos):start(math.random(30 - n, 60 - n)) end, - on_flood = flood_flame, + on_flood = flood_flame }) minetest.register_node("fire:permanent_flame", { - description = S("Permanent Flame"), + description = "Permanent Flame", drawtype = "firelike", tiles = { { @@ -109,55 +136,69 @@ minetest.register_node("fire:permanent_flame", { sunlight_propagates = true, floodable = true, damage_per_second = 4, - groups = {igniter = 2, dig_immediate = 3}, - drop = "", + groups = {igniter = 2, fire = 1, dig_immediate = 3}, + drop = {}, - on_flood = flood_flame, + on_flood = flood_flame }) - -- Flint and steel minetest.register_tool("fire:flint_and_steel", { - description = S("Flint and Steel"), + description = "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 - ) + + 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 + 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) + + minetest.sound_play(wdef.sound.breaks, + {pos = sound_pos, gain = 0.5}, true) end + return itemstack end end @@ -170,152 +211,36 @@ minetest.register_craft({ } }) - -- 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, oldnode) + 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, igniter) + 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 --- - -local flame_sound = minetest.settings:get_bool("flame_sound") -if flame_sound == nil then - -- Enable if no setting present - flame_sound = true -end - -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 + minetest.swap_node(flame_pos, {name = "fire:permanent_flame"}) 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(pos) end - --- --- ABMs --- +-- Enable the following ABMs according to 'enable fire' setting if fire_enabled then @@ -328,8 +253,16 @@ if fire_enabled then interval = 7, chance = 12, catch_up = false, - action = function(pos) + + action = function(pos, node, active_object_count, active_object_count_wider) + + if fire.spread == false + or minetest.find_node_near(pos, 1, {"group:puts_out_fire"}) then + return + end + local p = minetest.find_node_near(pos, 1, {"air"}) + if p then minetest.set_node(p, {name = "fire:basic_flame"}) end @@ -345,20 +278,105 @@ if fire_enabled then interval = 5, chance = 18, catch_up = false, - action = function(pos) - local p = minetest.find_node_near(pos, 1, {"group:flammable"}) - if not p then + + action = function(pos, node, active_object_count, active_object_count_wider) + + if fire.spread == false + or minetest.find_node_near(pos, 1, {"group:puts_out_fire"}) then + + minetest.remove_node(pos) + 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, - }) + local p = minetest.find_node_near(pos, 1, {"group:flammable"}) + + if p then + + 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) + + add_effect(p) + + minetest.check_for_falling(p) + end + end + end + }) end + +-- used to drop items inside a chest or container + +function fire.drop_items(pos, invstring) + + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + for i = 1, inv:get_size(invstring) do + + local m_stack = inv:get_stack(invstring, i) + local obj = minetest.add_item(pos, m_stack) + + if obj then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 1, + z = math.random(-10, 10) / 9 + }) + end + end +end + +-- override default chest to drop contents on burn + +if minetest.registered_nodes["default:chest"] then + + local groups = minetest.registered_nodes["default:chest"].groups + + groups.flammable = 3 + + minetest.override_item("default:chest", { + groups = groups, + + on_burn = function(p) + + fire.drop_items(p, "main") + + minetest.remove_node(p) + end + }) +end + +-- /fire [on/off] command to quickly stop flames spreading without reset + +minetest.register_chatcommand("fire", { + params = "", + description = "Disbles fire spreading when set to OFF", + privs = {server = true}, + + func = function (name, param) + + if not param or param == "" then + return false, "No paramater set, use /fire (on|off)" + end + + if param == "on" or param == "ON" then + + fire.spread = true + + return false, "fire spreading is ON" + + elseif param == "off" or param == "OFF" then + + fire.spread = false + + return false, "fire spreading is OFF" + end + end +}) diff --git a/mods/fire/locale/fire.de.tr b/mods/fire/locale/fire.de.tr deleted file mode 100644 index d6f8dde..0000000 --- a/mods/fire/locale/fire.de.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: fire -Permanent Flame=Permanente Flamme -Flint and Steel=Feuerstein und Stahl diff --git a/mods/fire/locale/fire.es.tr b/mods/fire/locale/fire.es.tr deleted file mode 100644 index 8c1b604..0000000 --- a/mods/fire/locale/fire.es.tr +++ /dev/null @@ -1,3 +0,0 @@ -# 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 deleted file mode 100644 index 268e823..0000000 --- a/mods/fire/locale/fire.fr.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: fire -Permanent Flame=Flamme permanente -Flint and Steel=Briquet à silex en acier diff --git a/mods/fire/locale/fire.it.tr b/mods/fire/locale/fire.it.tr deleted file mode 100644 index 03e8c87..0000000 --- a/mods/fire/locale/fire.it.tr +++ /dev/null @@ -1,3 +0,0 @@ -# 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 deleted file mode 100644 index 67b5bbe..0000000 --- a/mods/fire/locale/fire.ms.tr +++ /dev/null @@ -1,3 +0,0 @@ -# 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 deleted file mode 100644 index e10813b..0000000 --- a/mods/fire/locale/fire.ru.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: fire -Permanent Flame=Вечный Огонь -Flint and Steel=Огниво и Сталь diff --git a/mods/fire/locale/fire.se.tr b/mods/fire/locale/fire.se.tr deleted file mode 100644 index 622925d..0000000 --- a/mods/fire/locale/fire.se.tr +++ /dev/null @@ -1,3 +0,0 @@ -# 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.zh_CN.tr b/mods/fire/locale/fire.zh_CN.tr deleted file mode 100644 index 89aff0e..0000000 --- a/mods/fire/locale/fire.zh_CN.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: fire -Permanent Flame=永久火焰 -Flint and Steel=火石和钢 diff --git a/mods/fire/locale/fire.zh_TW.tr b/mods/fire/locale/fire.zh_TW.tr deleted file mode 100644 index 4c7a293..0000000 --- a/mods/fire/locale/fire.zh_TW.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: fire -Permanent Flame=永久火焰 -Flint and Steel=火石和鋼 diff --git a/mods/fire/locale/template.txt b/mods/fire/locale/template.txt deleted file mode 100644 index 79ea7a2..0000000 --- a/mods/fire/locale/template.txt +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: fire -Permanent Flame= -Flint and Steel= diff --git a/mods/fire/mod.conf b/mods/fire/mod.conf index c70f23b..c305576 100644 --- a/mods/fire/mod.conf +++ b/mods/fire/mod.conf @@ -1,3 +1,2 @@ name = fire -description = Minetest Game mod: fire depends = default diff --git a/mods/fire/screenshot.png b/mods/fire/screenshot.png new file mode 100644 index 0000000..b0f99a8 Binary files /dev/null and b/mods/fire/screenshot.png differ diff --git a/mods/fire/textures/fire_basic_flame.png b/mods/fire/textures/fire_basic_flame.png index 1da0702..989963c 100644 Binary files a/mods/fire/textures/fire_basic_flame.png and b/mods/fire/textures/fire_basic_flame.png differ diff --git a/mods/fire/textures/fire_flint_steel.png b/mods/fire/textures/fire_flint_steel.png index c262ebc..2eb4128 100644 Binary files a/mods/fire/textures/fire_flint_steel.png and b/mods/fire/textures/fire_flint_steel.png differ diff --git a/mods/stairs/README.md b/mods/stairs/README.md new file mode 100644 index 0000000..a6db874 --- /dev/null +++ b/mods/stairs/README.md @@ -0,0 +1,41 @@ +minetest mod Stairs +========================= + +Featured stairs with transparent and glowing stairs, slopes, fuel feature, etc + +Information +----------- + +This mod is named `stairs` and its a featured replacement of default one; +this mod has been amended to add new features like transparent and glowing +stairs, slopes, recipes to return stairs / slopes back into blocks and also for +stairs to be used as fuel for furnaces, also alternative placement functions +that use on_rotate and sneak key. + +![screenshot.png](screenshot.png) + +Tech information +---------------- + +This mod sustitute default one, you must disable the default of minetest +game if present or override it. + +#### Dependencies + +* default +* creative (for newer engines) + +License +------- + +### Authors of source code + +Originally by Kahrl (LGPLv2.1+) and +celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) +http://www.gnu.org/licenses/lgpl-2.1.html + +### License of media (textures and sounds) + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/stairs/README.txt b/mods/stairs/README.txt deleted file mode 100644 index 26317f7..0000000 --- a/mods/stairs/README.txt +++ /dev/null @@ -1,27 +0,0 @@ -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/api.md b/mods/stairs/api.md new file mode 100644 index 0000000..58a885d --- /dev/null +++ b/mods/stairs/api.md @@ -0,0 +1,78 @@ +Stairs API +---------- + +The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those delivered with Minetest Game, to keep them compatible with other mods. + +* `stairs.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +* `stairs.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a slab + * `subname`: Basically the material name (e.g. cobble) used for the slab name. Nodename pattern: "stairs:slab_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble" + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the slab's definition + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +* `stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers an inner corner stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Inner" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +* `stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers an outer corner stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Outer" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +* `stairs.register_slope(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a slope + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Outer" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +* `stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)` + + * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer + * Uses almost the same arguments as stairs.register_stair + * `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed + * `desc_slab`: Description for slab node + + +* `stairs.register_all(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer, stairs.register_slope + * Uses almost the same arguments as stairs.register_stair + * `description`: Description for stair nodes. 'stair' 'slab' 'stair_inner' 'stair_outer' 'Slope' will be prefixed diff --git a/mods/stairs/api.txt b/mods/stairs/api.txt new file mode 100644 index 0000000..3dc50aa --- /dev/null +++ b/mods/stairs/api.txt @@ -0,0 +1,78 @@ +Stairs API +---------- + +The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those delivered with Minetest Game, to keep them compatible with other mods. + +`stairs.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +`stairs.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a slab + * `subname`: Basically the material name (e.g. cobble) used for the slab name. Nodename pattern: "stairs:slab_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble" + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the slab's definition + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers an inner corner stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Inner" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers an outer corner stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Outer" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +`stairs.register_slope(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a slope + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Outer" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + + +`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)` + + * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer + * Uses almost the same arguments as stairs.register_stair + * `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed + * `desc_slab`: Description for slab node + + +`stairs.register_all(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer, stairs.register_slope + * Uses almost the same arguments as stairs.register_stair + * `description`: Description for stair nodes. 'stair' 'slab' 'stair_inner' 'stair_outer' 'Slope' will be prefixed diff --git a/mods/stairs/depends.txt b/mods/stairs/depends.txt new file mode 100644 index 0000000..1f737c1 --- /dev/null +++ b/mods/stairs/depends.txt @@ -0,0 +1,2 @@ +default +creative? diff --git a/mods/stairs/description.txt b/mods/stairs/description.txt new file mode 100644 index 0000000..828523b --- /dev/null +++ b/mods/stairs/description.txt @@ -0,0 +1 @@ +Adds stairs, slabs, inner and outer corners and slopes for blocks. diff --git a/mods/stairs/init.lua b/mods/stairs/init.lua index e2984f6..20eb8a4 100644 --- a/mods/stairs/init.lua +++ b/mods/stairs/init.lua @@ -1,90 +1,174 @@ --- stairs/init.lua --- Minetest 0.4 mod: stairs --- See README.txt for licensing and other information. +-- wool sounds +function default.node_sound_wool_defaults(table) + table = table or {} --- Global namespace for functions + table.footstep = table.footstep or {name = "wool_coat_movement", gain = 1.0} + table.dug = table.dug or {name = "wool_coat_movement", gain = 0.25} + table.place = table.place or {name = "default_place_node", gain = 1.0} -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) + return table end -local function warn_if_exists(nodename) - if minetest.registered_nodes[nodename] then - minetest.log("warning", "Overwriting stairs node: " .. nodename) +-- add new 5.x snow sounds to 0.4.x client +if not minetest.has_feature("object_use_texture_alpha") then + + function default.node_sound_snow_defaults(table) + + table = table or {} + + table.footstep = table.footstep or {name = "default_snow_footstep", gain = 0.1} + table.dug = table.dug or {name = "default_snow_footstep", gain = 0.3} + table.place = table.place or {name = "default_place_node", gain = 1.0} + + return table end end +stairs = { + mod = "redo", + wood = default.node_sound_wood_defaults(), + dirt = default.node_sound_dirt_defaults(), + stone = default.node_sound_stone_defaults(), + glass = default.node_sound_glass_defaults(), + leaves = default.node_sound_leaves_defaults(), + metal = default.node_sound_metal_defaults(), + wool = default.node_sound_wool_defaults() +} --- 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 +-- cache creative +local creative = minetest.settings:get_bool("creative_mode") + +function is_creative_enabled_for(name) + + if creative or minetest.check_player_privs(name, {creative = true}) then + return true + end + + return false +end + + +-- process textures +local set_textures = function(images, worldaligntex) + local stair_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + stair_images[i] = { name = image, - backface_culling = true, + 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 + + return stair_images +end + + +-- placement helper +local stair_place = function(itemstack, placer, pointed_thing, stair_node) + + -- if sneak pressed then use param2 in node pointed at when placing + if placer:is_player() and placer:get_player_control().sneak then + + local name = placer:get_player_name() + local pos_a = pointed_thing.above + local node_a = minetest.get_node(pos_a) + local def_a = minetest.registered_nodes[node_a.name] + + if not def_a.buildable_to + or minetest.is_protected(pos_a, name) then + return itemstack + end + + local pos_u = pointed_thing.under + local node_u = minetest.get_node(pos_u) + + if minetest.get_item_group(node_u.name, "stair") > 0 + or minetest.get_item_group(node_u.name, "slab") > 0 then + + minetest.set_node(pos_a, { + name = stair_node, + param2 = node_u.param2 + }) + + if not is_creative_enabled_for(name) then + itemstack:take_item() + end + + return itemstack + end + end + + core.rotate_and_place(itemstack, placer, pointed_thing, + is_creative_enabled_for(placer:get_player_name()), + {invert_wall = placer:get_player_control().sneak}) + + return itemstack +end + + +-- get node settings to use for stairs +local function get_node_vars(nodename) + + local def = minetest.registered_nodes[nodename] + + if def then + return def.light_source, def.use_texture_alpha, def.sunlight_propagates + end + + return nil, nil, nil +end + + +-- if recipeitem can be burned then stair can be as well +local function set_burn(recipeitem, stair_name, v) + + local burntime = minetest.get_craft_result({ + method = "fuel", width = 1, items = {recipeitem} }).time + + if burntime > 0 then + + minetest.register_craft({ + type = "fuel", + recipe = stair_name, + burntime = math.floor(burntime * v) + }) + end +end + + +-- Node will be called stairs:stair_ +function stairs.register_stair( + subname, recipeitem, groups, images, description, snds, wat) + + local stair_images = set_textures(images, wat) local new_groups = table.copy(groups) + new_groups.stair = 1 - warn_if_exists("stairs:stair_" .. subname) + + local light, alpha, propa = get_node_vars(recipeitem) + minetest.register_node(":stairs:stair_" .. subname, { description = description, drawtype = "nodebox", @@ -92,94 +176,74 @@ function stairs.register_stair(subname, recipeitem, groups, images, description, paramtype = "light", paramtype2 = "facedir", is_ground_content = false, + use_texture_alpha = alpha, + light_source = light, + sunlight_propagates = propa, groups = new_groups, - sounds = sounds, + sounds = snds, 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.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 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, + on_place = function(itemstack, placer, pointed_thing) + + return stair_place(itemstack, placer, pointed_thing, + "stairs:stair_" .. subname) + end }) - -- for replace ABM - if replace then - minetest.register_node(":stairs:stair_" .. subname .. "upside_down", { - replace_name = "stairs:stair_" .. subname, - groups = {slabs_replace = 1}, - }) + -- if no recipe item provided then skip craft recipes + if not recipeitem then + return end - if recipeitem then - -- Recipe matches appearence in inventory - minetest.register_craft({ - output = "stairs:stair_" .. subname .. " 8", - recipe = { - {"", "", recipeitem}, - {"", recipeitem, recipeitem}, - {recipeitem, recipeitem, recipeitem}, - }, - }) + -- stair recipes + 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}, - }, - }) + minetest.register_craft({ + output = "stairs:stair_" .. subname .. " 8", + 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_" .. subname, - burntime = math.floor(baseburntime * 0.75), - }) - end - end + -- stair to original material recipe + minetest.register_craft({ + output = recipeitem .. " 3", + recipe = { + {"stairs:stair_" .. subname, "stairs:stair_" .. subname}, + {"stairs:stair_" .. subname, "stairs:stair_" .. subname} + } + }) + + set_burn(recipeitem, "stairs:stair_" .. subname, 0.75) end --- Register slab -- Node will be called stairs:slab_ +function stairs.register_slab( + subname, recipeitem, groups, images, description, snds, wat) -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 slab_images = set_textures(images, wat) local new_groups = table.copy(groups) + new_groups.slab = 1 - warn_if_exists("stairs:slab_" .. subname) + + local light, alpha, propa = get_node_vars(recipeitem) + minetest.register_node(":stairs:slab_" .. subname, { description = description, drawtype = "nodebox", @@ -187,926 +251,459 @@ function stairs.register_slab(subname, recipeitem, groups, images, description, paramtype = "light", paramtype2 = "facedir", is_ground_content = false, + use_texture_alpha = alpha, + light_source = light, + sunlight_propagates = propa, groups = new_groups, - sounds = sounds, + sounds = snds, node_box = { type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + 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, + return stair_place(itemstack, placer, pointed_thing, + "stairs:slab_" .. subname) + end }) - -- for replace ABM - if replace then - minetest.register_node(":stairs:slab_" .. subname .. "upside_down", { - replace_name = "stairs:slab_".. subname, - groups = {slabs_replace = 1}, - }) + -- if no recipe item provided then skip craft recipes + if not recipeitem then + return end - if recipeitem then - minetest.register_craft({ - output = "stairs:slab_" .. subname .. " 6", - recipe = { - {recipeitem, recipeitem, recipeitem}, - }, - }) + -- slab recipe + 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}, - }, - }) + -- slab to original material recipe + 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 + set_burn(recipeitem, "stairs:slab_" .. subname, 0.5) 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, snds, wat, fdesc) -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 stair_images = set_textures(images, wat) 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) + + local light, alpha, propa = get_node_vars(recipeitem) + minetest.register_node(":stairs:stair_outer_" .. subname, { - description = description, + description = fdesc or "Outer " .. description, drawtype = "nodebox", tiles = stair_images, paramtype = "light", paramtype2 = "facedir", is_ground_content = false, + use_texture_alpha = alpha, + light_source = light, + sunlight_propagates = propa, groups = new_groups, - sounds = sounds, + sounds = snds, 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}, + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 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) + on_place = function(itemstack, placer, pointed_thing) + + return stair_place(itemstack, placer, pointed_thing, + "stairs:stair_outer_" .. subname) + end + }) + + -- add alias for old stairs redo name + minetest.register_alias("stairs:corner_" .. subname, + "stairs:stair_outer_" .. subname) + + -- if no recipe item provided then skip craft recipes + if not recipeitem then + return + end + + -- corner stair recipe + minetest.register_craft({ + output = "stairs:stair_outer_" .. subname .. " 6", + recipe = { + {"", "", ""}, + {"", recipeitem, ""}, + {recipeitem, recipeitem, recipeitem} + }, + }) + + -- corner stair to original material recipe + minetest.register_craft({ + output = recipeitem .. " 2", + recipe = { + {"stairs:stair_outer_" .. subname, + "stairs:stair_outer_" .. subname}, + {"stairs:stair_outer_" .. subname, + "stairs:stair_outer_" .. subname} + } + }) + + set_burn(recipeitem, "stairs:stair_outer_" .. subname, 0.625) +end + + +-- Node will be called stairs:stair_inner_ +function stairs.register_stair_inner( + subname, recipeitem, groups, images, description, snds, wat, fdesc) + + local stair_images = set_textures(images, wat) + local new_groups = table.copy(groups) + + new_groups.stair = 1 + + local light, alpha, propa = get_node_vars(recipeitem) + + minetest.register_node(":stairs:stair_inner_" .. subname, { + description = fdesc or "Inner " .. description, + drawtype = "nodebox", + tiles = stair_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + use_texture_alpha = alpha, + light_source = light, + sunlight_propagates = propa, + groups = new_groups, + sounds = snds, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0.5, 0.5, 0.5}, + {-0.5, 0, -0.5, 0, 0.5, 0} + } + }, + + on_place = function(itemstack, placer, pointed_thing) + + return stair_place(itemstack, placer, pointed_thing, + "stairs:stair_inner_" .. subname) end, }) - if recipeitem then - minetest.register_craft({ - output = "stairs:stair_outer_" .. subname .. " 6", - recipe = { - {"", recipeitem, ""}, - {recipeitem, recipeitem, recipeitem}, - }, - }) + -- add alias for old stairs redo name + minetest.register_alias("stairs:invcorner_" .. subname, + "stairs:stair_inner_" .. 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_outer_" .. subname, - burntime = math.floor(baseburntime * 0.625), - }) - end + -- if no recipe item provided then skip craft recipes + if not recipeitem then + return end + + -- inside corner stair recipe + minetest.register_craft({ + output = "stairs:stair_inner_" .. subname .. " 9", + recipe = { + {recipeitem, recipeitem, ""}, + {recipeitem, recipeitem, recipeitem}, + {recipeitem, recipeitem, recipeitem}, + } + }) + + -- inside corner stair to original material recipe + minetest.register_craft({ + output = recipeitem .. " 3", + recipe = { + {"stairs:stair_inner_" .. subname, + "stairs:stair_inner_" .. subname}, + {"stairs:stair_inner_" .. subname, + "stairs:stair_inner_" .. subname} + } + }) + + set_burn(recipeitem, "stairs:stair_inner_" .. subname, 0.875) +end + + +-- Node will be called stairs:slope_ +function stairs.register_slope( + subname, recipeitem, groups, images, description, snds, wat) + + local stair_images = set_textures(images, wat) + local new_groups = table.copy(groups) + + new_groups.stair = 1 + + local light, alpha, propa = get_node_vars(recipeitem) + + minetest.register_node(":stairs:slope_" .. subname, { + description = description, + drawtype = "mesh", + mesh = "stairs_slope.obj", + tiles = stair_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + use_texture_alpha = alpha, + light_source = light, + sunlight_propagates = propa, + groups = new_groups, + sounds = snds, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0.5, 0.5, 0.5}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0.5, 0.5, 0.5} + }, + }, + + on_place = function(itemstack, placer, pointed_thing) + return stair_place(itemstack, placer, pointed_thing, + "stairs:slope_" .. subname) + end + }) + + -- slope recipe + minetest.register_craft({ + output = "stairs:slope_" .. subname .. " 6", + recipe = { + {recipeitem, "", ""}, + {recipeitem, recipeitem, ""} + } + }) + + -- slope to original material recipe + minetest.register_craft({ + output = recipeitem, + recipe = { + {"stairs:slope_" .. subname, "stairs:slope_" .. subname} + } + }) + + set_burn(recipeitem, "stairs:slope_" .. subname, 0.5) +end + + +-- Node will be called stairs:slope_inner_ +function stairs.register_slope_inner( + subname, recipeitem, groups, images, description, snds, wat) + + local stair_images = set_textures(images, wat) + local new_groups = table.copy(groups) + + new_groups.stair = 1 + + local light, alpha, propa = get_node_vars(recipeitem) + + minetest.register_node(":stairs:slope_inner_" .. subname, { + description = description, + drawtype = "mesh", + mesh = "stairs_slope_inner.obj", + tiles = stair_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + use_texture_alpha = alpha, + light_source = light, + sunlight_propagates = propa, + groups = new_groups, + sounds = snds, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0.5, 0.5, 0.5}, + {-0.5, 0, -0.5, 0, 0.5, 0} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0.5, 0.5, 0.5}, + {-0.5, 0, -0.5, 0, 0.5, 0} + } + }, + + on_place = function(itemstack, placer, pointed_thing) + return stair_place(itemstack, placer, pointed_thing, + "stairs:slope_inner_" .. subname) + end + }) + + -- slope recipe + minetest.register_craft({ + output = "stairs:slope_inner_" .. subname .. " 6", + recipe = { + {"", recipeitem, recipeitem}, + {recipeitem, recipeitem, recipeitem} + } + }) + + -- slope to original material recipe + minetest.register_craft({ + output = recipeitem, + recipe = { + {"stairs:slope_inner_" .. subname, "stairs:slope_inner_" .. subname} + } + }) + + set_burn(recipeitem, "stairs:slope_inner_" .. subname, 0.5) +end + + +-- Node will be called stairs:slope_outer_ +function stairs.register_slope_outer( + subname, recipeitem, groups, images, description, snds, wat) + + local stair_images = set_textures(images, wat) + local new_groups = table.copy(groups) + + new_groups.stair = 1 + + local light, alpha, propa = get_node_vars(recipeitem) + + minetest.register_node(":stairs:slope_outer_" .. subname, { + description = description, + drawtype = "mesh", + mesh = "stairs_slope_outer.obj", + tiles = stair_images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + use_texture_alpha = alpha, + light_source = light, + sunlight_propagates = propa, + groups = new_groups, + sounds = snds, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0, 0.5, 0.5} + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0, 0.5, 0.5} + }, + }, + + on_place = function(itemstack, placer, pointed_thing) + return stair_place(itemstack, placer, pointed_thing, + "stairs:slope_outer_" .. subname) + end + }) + + -- slope recipe + minetest.register_craft({ + output = "stairs:slope_outer_" .. subname .. " 6", + recipe = { + {"", "", recipeitem}, + {"", recipeitem, recipeitem} + } + }) + + -- slope to original material recipe + minetest.register_craft({ + output = recipeitem, + recipe = { + {"stairs:slope_outer_" .. subname, "stairs:slope_outer_" .. subname} + } + }) + + set_burn(recipeitem, "stairs:slope_outer_" .. subname, 0.5) 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, wat) -function stairs.register_stair_and_slab(subname, recipeitem, groups, images, - desc_stair, desc_slab, sounds, worldaligntex) - stairs.register_stair(subname, recipeitem, groups, images, desc_stair, - sounds, worldaligntex) - stairs.register_stair_inner(subname, recipeitem, groups, images, desc_stair, - sounds, worldaligntex) - stairs.register_stair_outer(subname, recipeitem, groups, images, desc_stair, - sounds, worldaligntex) - stairs.register_slab(subname, recipeitem, groups, images, desc_slab, - sounds, worldaligntex) -end + stairs.register_stair( + subname, recipeitem, groups, images, desc_stair, sounds, wat) --- 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) + stairs.register_stair_inner( + subname, recipeitem, groups, images, desc_stair, sounds, wat) + + stairs.register_stair_outer( + subname, recipeitem, groups, images, desc_stair, sounds, wat) + + stairs.register_slab( + subname, recipeitem, groups, images, desc_slab, sounds, wat) end --- Register default stairs and slabs +-- Nodes will be called stairs:{stair,slab,corner,invcorner,slope}_ +function stairs.register_all( + subname, recipeitem, groups, images, desc, snds, wat) -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 -) + stairs.register_stair( + subname, recipeitem, groups, images, desc .. " Stair", snds, wat) -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 -) + stairs.register_slab( + subname, recipeitem, groups, images, desc .. " Slab", snds, wat) -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 -) + stairs.register_stair_inner( + subname, recipeitem, groups, images, desc .. " Stair", snds, wat) -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 -) + stairs.register_stair_outer( + subname, recipeitem, groups, images, desc .. " Stair", snds, wat) -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 -) + stairs.register_slope( + subname, recipeitem, groups, images, desc .. " Slope", snds, wat) -my_register_stair_and_slab( - "stone", - "default:stone", - {cracky = 3}, - {"default_stone.png"}, - "Stone Stair", - "Stone Slab", - default.node_sound_stone_defaults(), - true -) + stairs.register_slope_inner( + subname, recipeitem, groups, images, desc .. " Slope", snds, wat) -my_register_stair_and_slab( - "cobble", - "default:cobble", - {cracky = 3}, - {"default_cobble.png"}, - "Cobblestone Stair", - "Cobblestone Slab", - default.node_sound_stone_defaults(), - true -) + stairs.register_slope_outer( + subname, recipeitem, groups, images, desc .. " Slope", snds, wat) +end -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 -) +-- compatibility function for previous stairs:invcorner_ +function stairs.register_invcorner( + subname, recipeitem, groups, images, desc, snds, wat) -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 -) + stairs.register_stair_inner( + subname, recipeitem, groups, images, desc .. " Stair", snds, wat) +end -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 -) +-- compatibility function for previous stairs:corner_ +function stairs.register_corner( + subname, recipeitem, groups, images, desc, snds, wat) -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 -) + stairs.register_stair_outer( + subname, recipeitem, groups, images, desc .. " Stair", snds, wat) +end -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 -) +-- Register stairs +dofile(minetest.get_modpath("stairs") .. "/stairs.lua") -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_glass_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}, - {"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}, - {"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}, - {"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}, - {"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") ---]] +print ("[MOD] Stairs Redo loaded") diff --git a/mods/stairs/license.txt b/mods/stairs/license.txt deleted file mode 100644 index 57bd98c..0000000 --- a/mods/stairs/license.txt +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 41c055b..0000000 --- a/mods/stairs/locale/stairs.de.tr +++ /dev/null @@ -1,145 +0,0 @@ -# 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 deleted file mode 100644 index 374540c..0000000 --- a/mods/stairs/locale/stairs.es.tr +++ /dev/null @@ -1,145 +0,0 @@ -# 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 deleted file mode 100644 index 81b575e..0000000 --- a/mods/stairs/locale/stairs.fr.tr +++ /dev/null @@ -1,145 +0,0 @@ -# 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.it.tr b/mods/stairs/locale/stairs.it.tr deleted file mode 100644 index 16dfed6..0000000 --- a/mods/stairs/locale/stairs.it.tr +++ /dev/null @@ -1,145 +0,0 @@ -# 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 deleted file mode 100644 index a39c7f6..0000000 --- a/mods/stairs/locale/stairs.ms.tr +++ /dev/null @@ -1,145 +0,0 @@ -# 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 deleted file mode 100644 index 2d5850e..0000000 --- a/mods/stairs/locale/stairs.ru.tr +++ /dev/null @@ -1,145 +0,0 @@ -# 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 deleted file mode 100644 index 0bc0bbc..0000000 --- a/mods/stairs/locale/stairs.se.tr +++ /dev/null @@ -1,144 +0,0 @@ -# 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.zh_CN.tr b/mods/stairs/locale/stairs.zh_CN.tr deleted file mode 100644 index 060ccaf..0000000 --- a/mods/stairs/locale/stairs.zh_CN.tr +++ /dev/null @@ -1,149 +0,0 @@ -# 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 deleted file mode 100644 index 00c43e2..0000000 --- a/mods/stairs/locale/stairs.zh_TW.tr +++ /dev/null @@ -1,149 +0,0 @@ -# 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 deleted file mode 100644 index ca2c865..0000000 --- a/mods/stairs/locale/template.txt +++ /dev/null @@ -1,145 +0,0 @@ -# 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 index 7548fa7..2812c31 100644 --- a/mods/stairs/mod.conf +++ b/mods/stairs/mod.conf @@ -1,3 +1,4 @@ name = stairs -description = Minetest Game mod: stairs depends = default +optional_depends = creative +description = Adds stairs, slabs, inner and outer corners and slopes. diff --git a/mods/stairs/models/stairs_slope.obj b/mods/stairs/models/stairs_slope.obj new file mode 100644 index 0000000..f5434c3 --- /dev/null +++ b/mods/stairs/models/stairs_slope.obj @@ -0,0 +1,71 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib simplyslope_slope.mtl +o stairs_top +v -0.5 0.5 0.5 +v 0.5 0.5 0.5 +o stairs_right +v -0.5 -0.5 -0.5 +v -0.5 -0.5 0.5 +v -0.5 0.5 0.5 +v -0.5 0.0 0.0 +vt 0.0 0.0 +vt 1.0 0.0 +vt 1.0 1.0 +vn -1.0 0.0 0.0 +usemtl None +s 1 +f 3/1/1 4/2/1 5/3/1 +o front +v -0.5 -0.5 -0.5 +v -0.5 0.5 0.5 +v 0.5 0.5 0.5 +v 0.5 -0.5 -0.5 +vt 1.0 0.0 +vt 1.0 0.999938 +vt 0.0 0.999938 +vt 0.0 0.0 +vn 0.0 0.707100 -0.707100 +usemtl None +s 1 +f 7/4/2 8/5/2 9/6/2 10/7/2 +o left +v 0.5 -0.5 -0.5 +v 0.5 0.5 0.5 +v 0.5 -0.5 0.5 +v 0.5 0.0 0.0 +vt 1.0 0.0 +vt 0.0 1.0 +vt 0.0 0.0 +vn 1.0 0.0 0.0 +usemtl None +s 1 +f 11/8/3 12/9/3 13/10/3 +l 14 11 +l 14 12 +o bottom +v -0.5 -0.5 0.5 +v -0.5 -0.5 -0.5 +v 0.5 -0.5 -0.5 +v 0.5 -0.5 0.5 +vt 1.0 0.0 +vt 1.0 1.0 +vt 0.0 1.0 +vt 0.0 0.0 +vn 0.0 -1.0 -0.0 +usemtl None +s 1 +f 15/11/4 16/12/4 17/13/4 18/14/4 +o back +v 0.5 -0.5 0.5 +v 0.5 0.5 0.5 +v -0.5 0.5 0.5 +v -0.5 -0.5 0.5 +vt 1.0 0.0 +vt 1.0 1.0 +vt 0.0 1.0 +vt 0.0 0.0 +vn 0.0 -0.0 1.0 +usemtl None +s 1 +f 19/15/5 20/16/5 21/17/5 22/18/5 \ No newline at end of file diff --git a/mods/stairs/models/stairs_slope_inner.obj b/mods/stairs/models/stairs_slope_inner.obj new file mode 100644 index 0000000..2a780ea --- /dev/null +++ b/mods/stairs/models/stairs_slope_inner.obj @@ -0,0 +1,83 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +g top +v 0.5 0.5 -0.5 +v 0.5 0.5 0.5 +v -0.5 0.5 0.5 +v -0.5 -0.5 -0.5 +v -0.5 -0.5 -0.5 +vt 1.0 1.0 +vt 0.0 1.0 +vt 1.0 0.0 +vt 1.0 1.0 +vt 0.0 1.0 +vt 0.0 0.0 +vn 0.0 0.7071 -0.7071 +vn -0.7071 0.7071 0.0 +s 1 +f 3/1/1 2/2/1 4/3/1 +f 2/4/2 1/5/2 5/6/2 +g bottom +v 0.5 -0.5 0.5 +v 0.5 -0.5 -0.5 +v -0.5 -0.5 0.5 +v -0.5 -0.5 -0.5 +v 0.5 -0.5 0.5 +vt 1.0 1.0 +vt 0.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vn 0.0 -1.0 -0.0 +s 1 +f 9/7/3 7/8/3 6/9/3 8/10/3 +l 8 10 +g right +v -0.5 0.5 0.5 +v -0.5 -0.5 -0.5 +v -0.5 -0.5 0.5 +vt 1.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vn -1.0 0.0 0.0 +s 1 +f 11/11/4 12/12/4 13/13/4 +g left +v 0.5 0.5 -0.5 +v 0.5 0.5 0.5 +v 0.5 -0.5 0.5 +v 0.5 -0.5 -0.5 +v 0.5 -0.5 0.5 +vt 1.0 1.0 +vt 0.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vn 1.0 0.0 0.0 +s 1 +f 14/14/5 15/15/5 16/16/5 17/17/5 +l 15 18 +g back +v 0.5 0.5 0.5 +v 0.5 -0.5 0.5 +v -0.5 0.5 0.5 +v -0.5 -0.5 0.5 +v 0.5 -0.5 0.5 +vt 0.0 0.0 +vt 1.0 0.0 +vt 1.0 1.0 +vt 0.0 1.0 +vn 0.0 -0.0 1.0 +s 1 +f 22/18/6 20/19/6 19/20/6 21/21/6 +l 22 23 +l 19 23 +g front +v 0.5 0.5 -0.5 +v 0.5 -0.5 -0.5 +v -0.5 -0.5 -0.5 +v -0.5 -0.5 -0.5 +vt 0.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vn 0.0 0.0 -1.0 +s 1 +f 24/22/7 25/23/7 27/24/7 diff --git a/mods/stairs/models/stairs_slope_outer.obj b/mods/stairs/models/stairs_slope_outer.obj new file mode 100644 index 0000000..c95d39b --- /dev/null +++ b/mods/stairs/models/stairs_slope_outer.obj @@ -0,0 +1,50 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +g top +v -0.5 -0.5 0.5 +v -0.5 -0.5 -0.5 +v 0.5 -0.5 -0.5 +v 0.5 0.5 0.5 +vt 1.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vt 0.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vn -0.7071 0.7071 0.0 +vn 0.0 0.7071 -0.7071 +s off +f 4/1/1 2/2/1 1/3/1 +f 4/4/2 3/5/2 2/6/2 +g bottom +v 0.5 -0.5 0.5 +v -0.5 -0.5 0.5 +v -0.5 -0.5 -0.5 +v 0.5 -0.5 -0.5 +vt 1.0 1.0 +vt 0.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vn 0.0 -1.0 -0.0 +s off +f 5/7/3 6/8/3 7/9/3 8/10/3 +g right +v 0.5 -0.5 0.5 +v -0.5 -0.5 0.5 +v 0.5 0.5 0.5 +vt 0.0 0.0 +vt 1.0 0.0 +vt 1.0 1.0 +vn 0.0 -0.0 1.0 +s off +f 10/11/4 9/12/4 11/13/4 +g left +v 0.5 -0.5 0.5 +v 0.5 -0.5 -0.5 +v 0.5 0.5 0.5 +vt 0.0 1.0 +vt 0.0 0.0 +vt 1.0 0.0 +vn 1.0 0.0 0.0 +s off +f 14/14/5 12/15/5 13/16/5 diff --git a/mods/stairs/screenshot.png b/mods/stairs/screenshot.png new file mode 100644 index 0000000..5c32901 Binary files /dev/null and b/mods/stairs/screenshot.png differ diff --git a/mods/stairs/sounds/wool_coat_movement.ogg b/mods/stairs/sounds/wool_coat_movement.ogg new file mode 100644 index 0000000..89df47f Binary files /dev/null and b/mods/stairs/sounds/wool_coat_movement.ogg differ diff --git a/mods/stairs/stairs.lua b/mods/stairs/stairs.lua new file mode 100644 index 0000000..cf3ea93 --- /dev/null +++ b/mods/stairs/stairs.lua @@ -0,0 +1,590 @@ + +local grp = {} -- Helper + +--= Default Minetest + +-- Wood types + +stairs.register_all("wood", "default:wood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_wood.png"}, + "Wooden", + stairs.wood, false) + +stairs.register_all("junglewood", "default:junglewood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_junglewood.png"}, + "Jungle Wood", + stairs.wood, false) + +stairs.register_all("pine_wood", "default:pinewood", + {choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, + {"default_pine_wood.png"}, + "Pine Wood", + stairs.wood, false) + +-- 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") + +stairs.register_all("acacia_wood", "default:acacia_wood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_acacia_wood.png"}, + "Acacia Wood", + stairs.wood, false) + +stairs.register_all("aspen_wood", "default:aspen_wood", + {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_aspen_wood.png"}, + "Aspen Wood", + stairs.wood, false) + +-- Stone types + +stairs.register_all("stone", "default:stone", + {cracky = 3}, + {"default_stone.png"}, + "Stone", + stairs.stone, true) + +stairs.register_all("stonebrick", "default:stonebrick", + {cracky = 2}, + {"default_stone_brick.png"}, + "Stone Brick", + stairs.stone, false) + +stairs.register_all("stone_block", "default:stone_block", + {cracky = 2}, + {"default_stone_block.png"}, + "Stone Block", + stairs.stone, true) + +stairs.register_all("cobble", "default:cobble", + {cracky = 3}, + {"default_cobble.png"}, + "Cobble", + stairs.stone, true) + +stairs.register_all("mossycobble", "default:mossycobble", + {cracky = 3}, + {"default_mossycobble.png"}, + "Mossy Cobble", + stairs.stone, true) + +stairs.register_all("desert_stone", "default:desert_stone", + {cracky = 3}, + {"default_desert_stone.png"}, + "Desert Stone", + stairs.stone, true) + +stairs.register_all("desert_stonebrick", "default:desert_stonebrick", + {cracky = 2}, + {"default_desert_stone_brick.png"}, + "Desert Stone Brick", + stairs.stone, false) + +stairs.register_all("desert_stone_block", "default:desert_stone_block", + {cracky = 2}, + {"default_desert_stone_block.png"}, + "Desert Stone Block", + stairs.stone, true) + +stairs.register_all("desert_cobble", "default:desert_cobble", + {cracky = 3}, + {"default_desert_cobble.png"}, + "Desert Cobble", + stairs.stone, true) + +-- Sandstone types + +stairs.register_all("sandstone", "default:sandstone", + {crumbly = 1, cracky = 3}, + {"default_sandstone.png"}, + "Sandstone", + stairs.stone, true) + +stairs.register_all("sandstonebrick", "default:sandstonebrick", + {cracky = 2}, + {"default_sandstone_brick.png"}, + "Sandstone Brick", + stairs.stone, false) + +stairs.register_all("sandstone_block", "default:sandstone_block", + {cracky = 2}, + {"default_sandstone_block.png"}, + "Sandstone Block", + stairs.stone, true) + +stairs.register_all("desert_sandstone", "default:desert_sandstone", + {crumbly = 1, cracky = 3}, + {"default_desert_sandstone.png"}, + "Desert Sandstone", + stairs.stone, true) + +stairs.register_all("desert_sandstone_brick", "default:desert_sandstone_brick", + {cracky = 2}, + {"default_desert_sandstone_brick.png"}, + "Desert Sandstone Brick", + stairs.stone, false) + +stairs.register_all("desert_sandstone_block", "default:desert_sandstone_block", + {cracky = 2}, + {"default_desert_sandstone_block.png"}, + "Desert Sandstone Block", + stairs.stone, true) + +stairs.register_all("silver_sandstone", "default:silver_sandstone", + {crumbly = 1, cracky = 3}, + {"default_silver_sandstone.png"}, + "Silver Sandstone", + stairs.stone, true) + +stairs.register_all("silver_sandstone_brick", "default:silver_sandstone_brick", + {cracky = 2}, + {"default_silver_sandstone_brick.png"}, + "Silver Sandstone Brick", + stairs.stone, false) + +stairs.register_all("silver_sandstone_block", "default:silver_sandstone_block", + {cracky = 2}, + {"default_silver_sandstone_block.png"}, + "Silver Sandstone Block", + stairs.stone, true) + +-- Obsidian + +stairs.register_all("obsidian", "default:obsidian", + {cracky = 1, level = 2}, + {"default_obsidian.png"}, + "Obsidian", + stairs.stone, true) + +stairs.register_all("obsidianbrick", "default:obsidianbrick", + {cracky = 1, level = 2}, + {"default_obsidian_brick.png"}, + "Obsidian Brick", + stairs.stone, false) + +stairs.register_all("obsidian_block", "default:obsidian_block", + {cracky = 1, level = 2}, + {"default_obsidian_block.png"}, + "Obsidian block", + stairs.stone, true) + +-- Cloud (with overrides) + +stairs.register_stair("cloud", "default:cloud", + {unbreakable = 1, not_in_creative_inventory = 1}, + {"default_cloud.png"}, + "Cloud Stair", + stairs.wool) + +minetest.override_item("stairs:stair_cloud", { + on_blast = function() end, + on_drop = function(itemstack, dropper, pos) end, + drop = {}, +}) + +stairs.register_slab("cloud", "default:cloud", + {unbreakable = 1, not_in_creative_inventory = 1}, + {"default_cloud.png"}, + "Cloud Slab", + stairs.wool) + +minetest.override_item("stairs:slab_cloud", { + on_blast = function() end, + on_drop = function(itemstack, dropper, pos) end, + drop = {}, +}) + +-- Ores + +stairs.register_all("coal", "default:coalblock", + {cracky = 3}, + {"default_coal_block.png"}, + "Coal", + stairs.stone, true) + +stairs.register_all("steelblock", "default:steelblock", + {cracky = 1, level = 2}, + {"default_steel_block.png"}, + "Steel", + stairs.metal, true) + +stairs.register_all("copperblock", "default:copperblock", + {cracky = 1, level = 2}, + {"default_copper_block.png"}, + "Copper", + stairs.metal, true) + +stairs.register_all("bronzeblock", "default:bronzeblock", + {cracky = 1, level = 2}, + {"default_bronze_block.png"}, + "Bronze", + stairs.metal, true) + +stairs.register_all("tinblock", "default:tinblock", + {cracky = 1, level = 2}, + {"default_tin_block.png"}, + "Tin", + stairs.metal, true) + +stairs.register_all("mese", "default:mese", + {cracky = 1, level = 2}, + {"default_mese_block.png"}, + "Mese", + stairs.stone) + +stairs.register_all("goldblock", "default:goldblock", + {cracky = 1}, + {"default_gold_block.png"}, + "Gold", + stairs.metal) + +stairs.register_all("diamondblock", "default:diamondblock", + {cracky = 1, level = 3}, + {"default_diamond_block.png"}, + "Diamond", + stairs.stone) + +-- Glass types + +stairs.register_all("glass", "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"default_glass.png"}, + "Glass", + stairs.glass) + +stairs.register_all("obsidian_glass", "default:obsidian_glass", + {cracky = 2}, + {"default_obsidian_glass.png"}, + "Obsidian Glass", + stairs.glass) + +-- Brick, Snow and Ice + +stairs.register_all("brick", "default:brick", + {cracky = 3}, + {"default_brick.png"}, + "Brick", + stairs.stone, false) + +stairs.register_all("snowblock", "default:snowblock", + {crumbly = 3, cools_lava = 1, snowy = 1}, + {"default_snow.png"}, + "Snow Block", + default.node_sound_snow_defaults(), true) + +stairs.register_all("ice", "default:ice", + {cracky = 3, cools_lava = 1}, + {"default_ice.png"}, + "Ice", + default.node_sound_glass_defaults(), true) + +--= More Ores Mod + +if minetest.get_modpath("moreores") then + +grp = {cracky = 1, level = 2} + +stairs.register_all("silver_block", "moreores:silver_block", + grp, + {"moreores_silver_block.png"}, + "Silver", + stairs.metal, true) + +stairs.register_all("mithril_block", "moreores:mithril_block", + grp, + {"moreores_mithril_block.png"}, + "Mithril", + stairs.metal, true) + +end + +--= Mobs Mod + +if minetest.registered_nodes["mobs:cheeseblock"] then + +grp = {crumbly = 3, flammable = 2} + +stairs.register_all("cheeseblock", "mobs:cheeseblock", + grp, + {"mobs_cheeseblock.png"}, + "Cheese Block", + stairs.dirt) + +stairs.register_all("honey_block", "mobs:honey_block", + grp, + {"mobs_honey_block.png"}, + "Honey Block", + stairs.dirt) + +end + +--= Lapis Mod + +if minetest.get_modpath("lapis") then + +grp = {cracky = 3} + +stairs.register_all("lapis_block", "lapis:lapis_block", + grp, + {"lapis_block_side.png"}, + "Lapis", + stairs.stone) + +stairs.register_all("lapis_brick", "lapis:lapis_brick", + grp, + {"lapis_brick.png"}, + "Lapis Brick", + stairs.stone) + +stairs.register_all("lapis_cobble", "lapis:lapis_cobble", + grp, + {"lapis_cobble.png"}, + "Lapis Cobble", + stairs.stone) + +end + +--= Homedecor Mod + +if minetest.get_modpath("homedecor") then + +local grp = {snappy = 3} + +stairs.register_all("shingles_asphalt", "homedecor:shingles_asphalt", + grp, + {"homedecor_shingles_asphalt.png"}, + "Asphalt Shingle", + stairs.leaves) + +stairs.register_all("shingles_terracotta", "homedecor:roof_tile_terracotta", + grp, + {"homedecor_shingles_terracotta.png"}, + "Terracotta Shingle", + stairs.leaves) + +stairs.register_all("shingles_wood", "homedecor:shingles_wood", + grp, + {"homedecor_shingles_wood.png"}, + "Wooden Shingle", + stairs.leaves) + +end + +--= Xanadu Mod + +if minetest.get_modpath("xanadu") then + +grp = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3} + +stairs.register_all("stained_wood_white", "xanadu:stained_wood_white", + grp, + {"stained_wood_white.png"}, + "White Wooden", + stairs.wood, false) + +stairs.register_all("stained_wood_red", "xanadu:stained_wood_red", + grp, + {"stained_wood_red.png"}, + "Red Wooden", + stairs.wood, false) + +-- Decorative blocks + +grp = {cracky = 3} + +stairs.register_all("stone1", "xanadu:stone1", + grp, + {"stone1.png"}, + "Decorative Stone 1", + stairs.stone) + +stairs.register_all("stone2", "xanadu:stone2", + grp, + {"stone2.png"}, + "Decorative Stone 2", + stairs.stone) + +stairs.register_all("stone3", "xanadu:stone3", + grp, + {"stone3.png"}, + "Decorative Stone 3", + stairs.stone) + +stairs.register_all("stone4", "xanadu:stone4", + grp, + {"stone4.png"}, + "Decorative Stone 4", + stairs.stone) + +stairs.register_all("stone5", "xanadu:stone5", + grp, + {"stone5.png"}, + "Decorative Stone 5", + stairs.stone) + +stairs.register_all("stone6", "xanadu:stone6", + grp, + {"stone6.png"}, + "Decorative Stone 6", + stairs.stone) + +stairs.register_all("sandstonebrick1", "xanadu:sandstonebrick1", + grp, + {"sandstonebrick1.png"}, + "Decorative Sandstone 1", + stairs.stone) + +stairs.register_all("sandstonebrick2", "xanadu:sandstonebrick2", + grp, + {"sandstonebrick2.png"}, + "Decorative Sandstone 2", + stairs.stone) + +stairs.register_all("sandstonebrick4", "xanadu:sandstonebrick4", + grp, + {"sandstonebrick4.png"}, + "Decorative Sandstone 4", + stairs.stone) + +stairs.register_slab("desert_cobble1", "xanadu:desert_cobble1", + grp, + {"desert_cobble1.png"}, + "Decorative desert cobble 1 slab", + stairs.stone) + +stairs.register_slab("desert_cobble5", "xanadu:desert_cobble5", + grp, + {"desert_cobble5.png"}, + "Decorative desert cobble 5 slab", + stairs.stone) + +stairs.register_slab("desert_stone1", "xanadu:desert_stone1", + grp, + {"desert_stone1.png"}, + "Decorative desert stone 1 slab", + stairs.stone) + +stairs.register_slab("desert_stone3", "xanadu:desert_stone3", + grp, + {"desert_stone3.png"}, + "Decorative desert stone 3 slab", + stairs.stone) + +stairs.register_slab("desert_stone4", "xanadu:desert_stone4", + grp, + {"desert_stone4.png"}, + "Decorative desert stone 4 slab", + stairs.stone) + +stairs.register_stair("desert_stone4", "xanadu:desert_stone4", + grp, + {"desert_stone4.png"}, + "Decorative desert stone 4 stair", + stairs.stone) + +stairs.register_slab("desert_stone5", "xanadu:desert_stone5", + grp, + {"desert_stone5.png"}, + "Decorative desert stone 5 slab", + stairs.stone) + +stairs.register_slab("red1", "xanadu:red1", + grp, + {"baked_clay_red1.png"}, + "Decorative baked red clay 1 slab", + stairs.stone) + +stairs.register_all("bred2", "xanadu:red2", + grp, + {"baked_clay_red2.png"}, + "Decorative baked red clay 2", + stairs.stone) + +stairs.register_all("compressed_cobble", "xanadu:compressed_cobble", + {cracky = 3, level = 2}, + {"compressed_cobble.png"}, + "Compressed Cobble", + stairs.stone) + +stairs.register_all("compressed_dirt", "xanadu:compressed_dirt", + {crumbly = 2}, + {"compressed_dirt.png"}, + "Compressed Dirt", + stairs.stone) + +stairs.register_slope("steelblock1", "xanadu:steelblock1", + {cracky = 1, level = 2}, + {"steel_block1.png"}, + "Decorative Steelblock 1", + stairs.steel) + +stairs.register_slab("steelblock3", "xanadu:steelblock3", + {cracky = 1, level = 2}, + {"steel_block3.png"}, + "Decorative Steelblock 3", + stairs.steel) + +stairs.register_slope("steelblock5", "xanadu:steelblock5", + {cracky = 1, level = 2}, + {"steel_block5.png"}, + "Decorative Steelblock 5", + stairs.steel) +end + + +--= Castle Mod + +if minetest.get_modpath("castle") then + +grp = {cracky = 2} + +stairs.register_all("dungeon_stone", "castle:dungeon_stone", + grp, + {"castle_dungeon_stone.png"}, + "Dungeon", + stairs.stone) + +stairs.register_all("stonewall", "castle:stonewall", + grp, + {"castle_stonewall.png"}, + "Castle Wall", + stairs.stone) + +end + +--= Wool Mod + +if minetest.get_modpath("wool") then + +local colours = { + {"black", "Black", "#000000b0"}, + {"blue", "Blue", "#015dbb70"}, + {"brown", "Brown", "#a78c4570"}, + {"cyan", "Cyan", "#01ffd870"}, + {"dark_green", "Dark Green", "#005b0770"}, + {"dark_grey", "Dark Grey", "#303030b0"}, + {"green", "Green", "#61ff0170"}, + {"grey", "Grey", "#5b5b5bb0"}, + {"magenta", "Magenta", "#ff05bb70"}, + {"orange", "Orange", "#ff840170"}, + {"pink", "Pink", "#ff65b570"}, + {"red", "Red", "#ff000070"}, + {"violet", "Violet", "#2000c970"}, + {"white", "White", "#abababc0"}, + {"yellow", "Yellow", "#e3ff0070"}, +} + +for i = 1, #colours, 1 do + +stairs.register_all("wool_" .. colours[i][1], "wool:" .. colours[i][1], + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3}, + {"wool_" .. colours[i][1] .. ".png"}, + colours[i][2] .. " Wool", + stairs.wool) + +end -- END for + +end diff --git a/mods/stairs/textures/stairs_glass_outer_stairside.png b/mods/stairs/textures/stairs_glass_outer_stairside.png deleted file mode 100644 index 9b298c8..0000000 Binary files a/mods/stairs/textures/stairs_glass_outer_stairside.png and /dev/null differ diff --git a/mods/stairs/textures/stairs_glass_split.png b/mods/stairs/textures/stairs_glass_split.png deleted file mode 100644 index 6287959..0000000 Binary files a/mods/stairs/textures/stairs_glass_split.png and /dev/null differ diff --git a/mods/stairs/textures/stairs_glass_stairside.png b/mods/stairs/textures/stairs_glass_stairside.png deleted file mode 100644 index c424294..0000000 Binary files a/mods/stairs/textures/stairs_glass_stairside.png and /dev/null differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png b/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png deleted file mode 100644 index 63db4a2..0000000 Binary files a/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png and /dev/null differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_split.png b/mods/stairs/textures/stairs_obsidian_glass_split.png deleted file mode 100644 index 7647b9b..0000000 Binary files a/mods/stairs/textures/stairs_obsidian_glass_split.png and /dev/null differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_stairside.png b/mods/stairs/textures/stairs_obsidian_glass_stairside.png deleted file mode 100644 index 850f4c6..0000000 Binary files a/mods/stairs/textures/stairs_obsidian_glass_stairside.png and /dev/null differ diff --git a/mods/tnt/README.md b/mods/tnt/README.md new file mode 100644 index 0000000..f9d83bc --- /dev/null +++ b/mods/tnt/README.md @@ -0,0 +1,98 @@ +Minetest mod tnt +================ + +Add tnt tool to make explotions + +Information +----------- + +This mod is named `tnt`, it adds TNT to Minetest. TNT is a tool to +help the player in mining or cause mayor damage in area. thiis mod +featured the `tnt_stick` tool + +![screenshot.png](screenshot.png) + +Technical information +--------------------- + +This mod improves more realistic usage of tnt, by the tnt sticks, +for both older and newers engines. + +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. + +The sticks now is the usage for craft TNT's. + +| name | node | craft | usage | +|--- ------ | ------------- | ------------------ | ------ | +| TNT Stick | tnt:tnt_stick | round a paper with 6 tnt sticks | craft tnt | +| TNT | tnt:tnt | using 9 tnt sticks | destruction ratio | +| Gunpowder | tnt:gunpowder | coal and gravel | powder to ignite tnt | + +**NOTE**: The sticks are not usable as an explosive. + +To craft 2 TNT sticks: +``` +G_G +GPG +G_G +``` +* G = gunpowder +* P = paper + +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 by default, configurable. +* Player and object damage radius is 6 nodes. + +License +------- + +See [license.txt](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) + + + diff --git a/mods/tnt/README.txt b/mods/tnt/README.txt index df244fe..f9d83bc 100644 --- a/mods/tnt/README.txt +++ b/mods/tnt/README.txt @@ -1,16 +1,69 @@ -Minetest Game mod: tnt -====================== -See license.txt for license information. +Minetest mod tnt +================ + +Add tnt tool to make explotions + +Information +----------- + +This mod is named `tnt`, it adds TNT to Minetest. TNT is a tool to +help the player in mining or cause mayor damage in area. thiis mod +featured the `tnt_stick` tool + +![screenshot.png](screenshot.png) + +Technical information +--------------------- + +This mod improves more realistic usage of tnt, by the tnt sticks, +for both older and newers engines. + +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. + +The sticks now is the usage for craft TNT's. + +| name | node | craft | usage | +|--- ------ | ------------- | ------------------ | ------ | +| TNT Stick | tnt:tnt_stick | round a paper with 6 tnt sticks | craft tnt | +| TNT | tnt:tnt | using 9 tnt sticks | destruction ratio | +| Gunpowder | tnt:gunpowder | coal and gravel | powder to ignite tnt | + +**NOTE**: The sticks are not usable as an explosive. + +To craft 2 TNT sticks: +``` +G_G +GPG +G_G +``` +* G = gunpowder +* P = paper + +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 by default, configurable. +* Player and object damage radius is 6 nodes. + +License +------- + +See [license.txt](license.txt) for license information. + +**Authors of source code** -Authors of source code ----------------------- PilzAdam (MIT) ShadowNinja (MIT) sofar (sofar@foo-projects.org) (MIT) Various Minetest developers and contributors (MIT) -Authors of media ----------------- +**Authors of media** + BlockMen (CC BY-SA 3.0): All textures not mentioned below. @@ -43,32 +96,3 @@ 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/api.txt b/mods/tnt/api.txt new file mode 100644 index 0000000..e3a09a3 --- /dev/null +++ b/mods/tnt/api.txt @@ -0,0 +1,35 @@ +TNT mod API + +On load TNT mod will gather two settings from the minetest.conf file: + +'enable_tnt' a boolean switch which defaults to enabled in singleplayer and disabled on mulitplayer +'tnt_radius' an integer which provides the blast radius of a TNT explosion (default: 3) + + +We also have some global functions which can be called by other mods so long as 'tnt' appears in their depends.txt file: + +tnt.register_tnt(def) + + 'name' name of tnt node to register + 'description' node description to appear in inventory + 'tiles' texture table for node + 'radius' size of damage area to inflict on surrounding nodes + 'damage_radius' size of area to inflice damage on surrounding entities (defaults to 2x radius) + + +tnt.burn(pos, nodename) + + 'pos' position of node to burn/ignite + 'nodename' the name of the node to burn/ignite (can be nil as it will be gotten) + + +tnt.boom (pos, def) + + 'pos' centre position of explosion + 'def' table definition containing explosion settings: + 'radius' radius of the explosion which explodes surrounding nodes + 'damage_radius' radius of explosion damage which causes harm to surrounding entities + 'ignore_protection' when true will explode protected areas (default: false) + 'disable_drops' when true will not drop node items (default: false) + 'explode_center' when true will apply on_boom and drops for center 'pos' node + 'sound' custom explosion sound (default: "tnt_boom") diff --git a/mods/tnt/depends.txt b/mods/tnt/depends.txt new file mode 100644 index 0000000..5ff216f --- /dev/null +++ b/mods/tnt/depends.txt @@ -0,0 +1,3 @@ +default +fire + diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 1e3f37e..588bb36 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -1,24 +1,22 @@ --- 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") +local enable_tnt = minetest.settings:get_bool("enable_tnt") or true if enable_tnt == nil then enable_tnt = minetest.is_singleplayer() end +-- minetest 5.x check +local mt_50 = minetest.get_translator + -- loss probabilities array (one in X will be lost) local loss_prob = {} +loss_prob["default:sandstone"] = 3 loss_prob["default:cobble"] = 3 loss_prob["default:dirt"] = 4 -local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3) +local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 1) -- Fill a list with data for content IDs, after all nodes are registered local cid_data = {} @@ -58,7 +56,7 @@ local function eject_drops(drops, pos, radius) local take = math.max(1,math.min(radius * radius, count, item:get_stack_max())) - rand_pos(pos, drop_pos, radius) +-- rand_pos(pos, drop_pos, radius) local dropitem = ItemStack(item) dropitem:set_count(take) local obj = minetest.add_item(drop_pos, dropitem) @@ -163,13 +161,13 @@ local function entity_physics(pos, radius, drops) local damage = (4 / dist) * radius if obj:is_player() then - -- we knock the player back 1.0 node, and slightly upwards - -- TODO: switch to add_player_velocity() introduced in 5.1 - local dir = vector.normalize(vector.subtract(obj_pos, pos)) - local moveoff = vector.multiply(dir, dist + 1.0) - local newpos = vector.add(pos, moveoff) - newpos = vector.add(newpos, {x = 0, y = 0.2, z = 0}) - obj:set_pos(newpos) + + -- use player velocity if using minetest 5.x + if mt_50 then + local dir = vector.normalize(vector.subtract(obj_pos, pos)) + local moveoff = vector.multiply(dir, 2 / dist * radius) + obj:add_player_velocity(moveoff) + end obj:set_hp(obj:get_hp() - damage) else @@ -220,7 +218,7 @@ local function add_effects(pos, radius, drops) glow = 15, }) minetest.add_particlespawner({ - amount = 64, + amount = 32, -- 64 time = 0.5, minpos = vector.subtract(pos, radius / 2), maxpos = vector.add(pos, radius / 2), @@ -246,7 +244,7 @@ local function add_effects(pos, radius, drops) most = count local def = minetest.registered_nodes[name] if def then - node = { name = name } + node = {name = name} end if def and def.tiles and def.tiles[1] then texture = def.tiles[1] @@ -255,7 +253,7 @@ local function add_effects(pos, radius, drops) end minetest.add_particlespawner({ - amount = 64, + amount = 32, -- 64 time = 0.1, minpos = vector.subtract(pos, radius / 2), maxpos = vector.add(pos, radius / 2), @@ -265,12 +263,12 @@ local function add_effects(pos, radius, drops) maxacc = {x = 0, y = -10, z = 0}, minexptime = 0.8, maxexptime = 2.0, - minsize = radius * 0.33, - maxsize = radius, + minsize = radius * 0.33, -- * 0.66, + maxsize = radius, -- * 2, texture = texture, -- ^ only as fallback for clients without support for `node` parameter node = node, - collisiondetection = true, + collisiondetection = false -- true }) end @@ -281,14 +279,16 @@ function tnt.burn(pos, nodename) 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) +-- elseif minetest.get_item_group(name, "tnt") > 0 then +-- minetest.swap_node(pos, {name = name .. "_burning"}) +-- minetest.sound_play("tnt_ignite", {pos = pos}) +-- minetest.get_node_timer(pos):start(1) end end -local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owner, explode_center) +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() @@ -297,7 +297,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owne 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 count = 0 ; if explode_center then count = 1 end local c_tnt local c_tnt_burning = minetest.get_content_id("tnt:tnt_burning") local c_tnt_boom = minetest.get_content_id("tnt:boom") @@ -305,11 +305,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owne 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 + c_tnt = c_tnt_burning end for z = pos.z - 2, pos.z + 2 do @@ -400,8 +396,8 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owne queued_data.fn(queued_data.pos) end - minetest.log("action", "TNT owned by " .. owner .. " detonated at " .. - minetest.pos_to_string(pos) .. " with radius " .. radius) +-- minetest.log("action", "TNT owned by " .. owner .. " detonated at " .. +-- minetest.pos_to_string(pos) .. " with radius " .. radius) return drops, radius end @@ -413,11 +409,12 @@ function tnt.boom(pos, def) local meta = minetest.get_meta(pos) local owner = meta:get_string("owner") if not def.explode_center then - minetest.set_node(pos, {name = "tnt:boom"}) + minetest.swap_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) + minetest.sound_play(sound, {pos = pos, gain = 1.5, + max_hear_distance = math.min(def.radius * 20, 128)}) + local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection, def.ignore_on_blast, owner, def.explode_center) -- append entity drops @@ -427,22 +424,22 @@ function tnt.boom(pos, def) 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) +-- minetest.log("action", "A TNT explosion occurred at " .. minetest.pos_to_string(pos) .. +-- " with radius " .. radius) end minetest.register_node("tnt:boom", { drawtype = "airlike", light_source = default.LIGHT_MAX, walkable = false, - drop = "", - groups = {dig_immediate = 3}, + 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"), + description = "Gun Powder", drawtype = "raillike", paramtype = "light", is_ground_content = false, @@ -529,13 +526,16 @@ minetest.register_node("tnt:gunpowder_burning", { type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, - drop = "", + drop = {}, groups = { + not_in_creative_inventory = 1, dig_immediate = 2, attached_node = 1, connect_to_raillike = minetest.raillike_group("gunpowder") }, sounds = default.node_sound_leaves_defaults(), + + -- only explode connecting gunpowder on_timer = function(pos, elapsed) for dx = -1, 1 do for dz = -1, 1 do @@ -555,8 +555,7 @@ minetest.register_node("tnt:gunpowder_burning", { -- unaffected by explosions on_blast = function() end, on_construct = function(pos) - minetest.sound_play("tnt_gunpowder_burning", {pos = pos, - gain = 2}, true) + minetest.sound_play("tnt_gunpowder_burning", {pos = pos, gain = 2}) minetest.get_node_timer(pos):start(1) end, }) @@ -568,7 +567,7 @@ minetest.register_craft({ }) minetest.register_craftitem("tnt:tnt_stick", { - description = S("TNT Stick"), + description = "TNT Stick", inventory_image = "tnt_tnt_stick.png", groups = {flammable = 5}, }) @@ -606,7 +605,7 @@ end function tnt.register_tnt(def) local name - if not def.name:find(':') then + if not def.name:find(":") then name = "tnt:" .. def.name else name = def.name @@ -678,24 +677,33 @@ function tnt.register_tnt(def) tnt_bottom, tnt_side }, light_source = 5, - drop = "", + drop = {}, sounds = default.node_sound_wood_defaults(), - groups = {falling_node = 1}, + 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.sound_play("tnt_ignite", {pos = pos}) minetest.get_node_timer(pos):start(4) minetest.check_for_falling(pos) end, + + -- when falling run custom function to continue timer + falling_step = function(self, pos, dtime) + self.tnt_timer = (self.tnt_timer or 0) + dtime + if self.tnt_timer >= 4 then + tnt.boom(pos, def) + self.object:remove() + end + end }) end tnt.register_tnt({ name = "tnt:tnt", - description = S("TNT"), + description = "TNT", radius = tnt_radius, }) diff --git a/mods/tnt/license.txt b/mods/tnt/license.txt index e59ec6e..c289e1c 100644 --- a/mods/tnt/license.txt +++ b/mods/tnt/license.txt @@ -68,7 +68,7 @@ http://creativecommons.org/licenses/by-sa/3.0/ ==================================================== -CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication for audio files (found in sounds folder) TumeniNodes steveygos93 @@ -97,4 +97,3 @@ When using or citing the work, you should not imply endorsement by the author or 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 deleted file mode 100644 index 62bcb15..0000000 --- a/mods/tnt/locale/template.txt +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: tnt -Gun Powder= -TNT Stick= -TNT= diff --git a/mods/tnt/locale/tnt.de.tr b/mods/tnt/locale/tnt.de.tr deleted file mode 100644 index 09d2ac2..0000000 --- a/mods/tnt/locale/tnt.de.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index d9f3f20..0000000 --- a/mods/tnt/locale/tnt.es.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index 3fe48fb..0000000 --- a/mods/tnt/locale/tnt.fr.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: tnt -Gun Powder=Poudre à canon -TNT Stick=Bâton de TNT -TNT=TNT diff --git a/mods/tnt/locale/tnt.it.tr b/mods/tnt/locale/tnt.it.tr deleted file mode 100644 index bc4ef14..0000000 --- a/mods/tnt/locale/tnt.it.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index c4c5fdd..0000000 --- a/mods/tnt/locale/tnt.ms.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index a8cee43..0000000 --- a/mods/tnt/locale/tnt.ru.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: tnt -Gun Powder=Порох -TNT Stick=Тротиловая Палка -TNT=Тротил diff --git a/mods/tnt/locale/tnt.se.tr b/mods/tnt/locale/tnt.se.tr deleted file mode 100644 index 21fbbd0..0000000 --- a/mods/tnt/locale/tnt.se.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: tnt -Gun Powder=Krut -TNT Stick=Dynamitpinne -TNT=Dynamit \ No newline at end of file diff --git a/mods/tnt/locale/tnt.zh_CN.tr b/mods/tnt/locale/tnt.zh_CN.tr deleted file mode 100644 index 0a3294e..0000000 --- a/mods/tnt/locale/tnt.zh_CN.tr +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index c1b3caf..0000000 --- a/mods/tnt/locale/tnt.zh_TW.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: tnt -Gun Powder=火藥粉 -TNT Stick=炸藥棒 -TNT=炸藥包 diff --git a/mods/tnt/screenshot.png b/mods/tnt/screenshot.png new file mode 100644 index 0000000..aa9b0b0 Binary files /dev/null and b/mods/tnt/screenshot.png differ diff --git a/mods/tnt/sounds/tnt_gunpowder_burning.ogg b/mods/tnt/sounds/tnt_gunpowder_burning.ogg index 8581c2d..5c5bfaf 100644 Binary files a/mods/tnt/sounds/tnt_gunpowder_burning.ogg and b/mods/tnt/sounds/tnt_gunpowder_burning.ogg differ diff --git a/mods/tnt/textures/tnt_blast.png b/mods/tnt/textures/tnt_blast.png index bbb1096..9f32d3c 100644 Binary files a/mods/tnt/textures/tnt_blast.png and b/mods/tnt/textures/tnt_blast.png differ diff --git a/mods/wool/README.md b/mods/wool/README.md new file mode 100644 index 0000000..96e3b99 --- /dev/null +++ b/mods/wool/README.md @@ -0,0 +1,58 @@ +minetest mod wool +================= + +Improved Wool mod for Minetest + +Information +----------- + +It's a simple replacement for the wool mod that allows you to dye any +wool any colour including white, and also added a wool sound when walking +on top of the wool blocks to replace the leaves sound. + +![screenshot.png](screenshot.png) + +Technical info +-------------- + +This is a improved fork from TenPlus1 + +#### Dependencies + +* default + +#### Nodes + +| node name | Description | +| --------------- | --------------- | +| wool:white | White Wool | +| wool:grey | Grey Wool | +| wool:black | Black Wool | +| wool:red | Red Wool | +| wool:yellow | Yellow Wool | +| wool:green | Green Wool | +| wool:cyan | Cyan Wool | +| wool:blue | Blue Wool | +| wool:magenta | Magenta Wool | +| wool:orange | Orange Wool | +| wool:violet | Violet Wool | +| wool:brown | Brown Wool | +| wool:pink | Pink Wool | +| wool:dark_grey | Dark Grey Wool | +| wool:dark_green | Dark Green Wool | +| wool:dark_blue | Dark Blue Wool | +| wool:gold | Gold Wool | + +#### Alias + +| node name | node alias | +| --------------- | --------------- | +| wool:dark_blue | wool:blue | +| wool:gold | wool:yellow | + +License +------- + +Textures are from Gambit's PixelBox texture pack. + +Sound is from freeSFX.co.uk and has a creative-commons license diff --git a/mods/wool/README.txt b/mods/wool/README.txt deleted file mode 100644 index a66677d..0000000 --- a/mods/wool/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -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/depends.txt b/mods/wool/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/mods/wool/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/wool/init.lua b/mods/wool/init.lua index 4cf7dc3..b93fff5 100644 --- a/mods/wool/init.lua +++ b/mods/wool/init.lua @@ -1,52 +1,67 @@ --- 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 +function default.node_wool_defaults(table) ---[[ -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") ---]] + table = table or {} + + table.footstep = table.footstep or + {name = "wool_coat_movement", gain = 1.0} + + table.dug = table.dug or + {name = "default_dug_node", gain = 0.25} + + table.place = table.place or + {name = "default_place_node", gain = 1.0} + + return table +end + +local wool_sound = default.node_wool_defaults() +--local wool_sound = default.node_sound_defaults() + +local wool_dyes = { + {"white", "White"}, + {"grey", "Grey"}, + {"black", "Black"}, + {"red", "Red"}, + {"yellow", "Yellow"}, + {"green", "Green"}, + {"cyan", "Cyan"}, + {"blue", "Blue"}, + {"magenta", "Magenta"}, + {"orange", "Orange"}, + {"violet", "Violet"}, + {"brown", "Brown"}, + {"pink", "Pink"}, + {"dark_grey", "Dark Grey"}, + {"dark_green", "Dark Green"}, +} + +for _, row in pairs(wool_dyes) do + + minetest.register_node("wool:" .. row[1], { + description = row[2] .. " Wool", + tiles = {"wool_" .. row[1] .. ".png"}, + groups = { + snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, + flammable = 3, wool = 1 + }, + sounds = wool_sound, + }) + + minetest.register_craft({ + type = "shapeless", + output = "wool:" .. row[1], + recipe = {"dye:" .. row[1], "group:wool"}, + }) + +end + +minetest.register_craft({ + type = "fuel", + recipe = "group:wool", + burntime = 2, +}) + +print ("[MOD] Wool mod loaded") diff --git a/mods/wool/license.txt b/mods/wool/license.txt deleted file mode 100644 index 9310163..0000000 --- a/mods/wool/license.txt +++ /dev/null @@ -1,60 +0,0 @@ -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 deleted file mode 100644 index 316cd2c..0000000 --- a/mods/wool/locale/template.txt +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index 9b6b8ab..0000000 --- a/mods/wool/locale/wool.de.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index ac15592..0000000 --- a/mods/wool/locale/wool.es.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index 48a60a7..0000000 --- a/mods/wool/locale/wool.fr.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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.it.tr b/mods/wool/locale/wool.it.tr deleted file mode 100644 index 628faf7..0000000 --- a/mods/wool/locale/wool.it.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index 18b5480..0000000 --- a/mods/wool/locale/wool.ms.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index cd8c60b..0000000 --- a/mods/wool/locale/wool.ru.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index 1d82e69..0000000 --- a/mods/wool/locale/wool.se.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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.zh_CN.tr b/mods/wool/locale/wool.zh_CN.tr deleted file mode 100644 index caac9ee..0000000 --- a/mods/wool/locale/wool.zh_CN.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index 290a1fe..0000000 --- a/mods/wool/locale/wool.zh_TW.tr +++ /dev/null @@ -1,16 +0,0 @@ -# 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 index a0ca3f0..5ab8865 100644 --- a/mods/wool/mod.conf +++ b/mods/wool/mod.conf @@ -1,3 +1,3 @@ name = wool -description = Minetest Game mod: wool -depends = default, dye +depends = default +description = Adds wool blocks into game. diff --git a/mods/wool/screenshot.png b/mods/wool/screenshot.png new file mode 100644 index 0000000..d9b1836 Binary files /dev/null and b/mods/wool/screenshot.png differ diff --git a/mods/wool/sounds/wool_coat_movement.ogg b/mods/wool/sounds/wool_coat_movement.ogg new file mode 100644 index 0000000..89df47f Binary files /dev/null and b/mods/wool/sounds/wool_coat_movement.ogg differ diff --git a/mods/wool/textures/wool_black.png b/mods/wool/textures/wool_black.png index 700d439..9a8e140 100644 Binary files a/mods/wool/textures/wool_black.png 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 index a074986..b890e37 100644 Binary files a/mods/wool/textures/wool_blue.png 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 index 2620dfd..a699732 100644 Binary files a/mods/wool/textures/wool_brown.png 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 index 395b6ac..2a2e625 100644 Binary files a/mods/wool/textures/wool_cyan.png 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 index 0e73999..d701c7e 100644 Binary files a/mods/wool/textures/wool_dark_green.png 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 index 7253696..c071cbf 100644 Binary files a/mods/wool/textures/wool_dark_grey.png 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 index dcb663b..d6c5fa7 100644 Binary files a/mods/wool/textures/wool_green.png 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 index 2f4c338..9e2f4b7 100644 Binary files a/mods/wool/textures/wool_grey.png 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 index 5c2c4a7..d93273d 100644 Binary files a/mods/wool/textures/wool_magenta.png 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 index a059f36..6ce44fc 100644 Binary files a/mods/wool/textures/wool_orange.png 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 index 8e90140..7d7d9e8 100644 Binary files a/mods/wool/textures/wool_pink.png 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 index da12ecf..0a0ce71 100644 Binary files a/mods/wool/textures/wool_red.png 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 index d7d6783..155b018 100644 Binary files a/mods/wool/textures/wool_violet.png 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 index 88f1e2f..0798592 100644 Binary files a/mods/wool/textures/wool_white.png 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 index 2b0f048..a29c047 100644 Binary files a/mods/wool/textures/wool_yellow.png and b/mods/wool/textures/wool_yellow.png differ