diff --git a/GROUPS.md b/GROUPS.md index 57c90eb43..cb1f531eb 100644 --- a/GROUPS.md +++ b/GROUPS.md @@ -66,8 +66,10 @@ Please read to learn how digging times ### Groups (mostly) used for crafting recipes * `sand=1`: Sand (any color) -* `sandstone=1`: (Yellow) sandstone and related nodes (chiseled and the like) (only full blocks) -* `redsandstone=1`: Red sandstone and related nodes (chiseled and the like) (only full blocks) +* `sandstone=1`: Sandstone (any color) and related nodes (chiseled and the like) (only full blocks) +* `normal_sandstone=1`: “Normal” (yellow) sandstone and related nodes (chiseled and the like) (only full blocks) +* `red_sandstone=1`: Red sandstone and related nodes (chiseled and the like) (only full blocks) +* `hardened_clay=1`: Terracotta (any color) * `quartz_block=1`: Quartz Block and variants (chiseled, pillar, etc.) (only full blocks) * `stonebrick=1`: Stone Bricks and related nodes (only full blocks) * `shulker_box=1`: Block is a shulker box @@ -166,6 +168,13 @@ These groups are used mostly for informational purposes * `plant=1`: Plant or part of a plant * `double_plant`: Part of a double-sized plant. 1 = lower part, 2 = upper part +* `pickaxe=1`: Pickaxe +* `shovel=1`: Shovel +* `axe=1`: Axe +* `sword=1`: Sword +* `hoe=1`: Hoe (farming tool) +* `shears=1`: Shears + * `weapon=1`: Item is primarily (!) a weapon * `tool=1`: Item is primarily (!) a tool * `craftitem=1`: Item is primarily (!) used for crafting diff --git a/MISSING_ENGINE_FEATURES.md b/MISSING_ENGINE_FEATURES.md index c3bb8a288..313c535f4 100644 --- a/MISSING_ENGINE_FEATURES.md +++ b/MISSING_ENGINE_FEATURES.md @@ -8,8 +8,6 @@ For these features, no easy Lua workaround could be found. ### Lua API #### Tools/wielded item -- Allow **much** faster liquid flowing ([#2810](https://github.com/minetest/minetest/issues/2810)) - - “Lock” hotbar for a brief time after using an item, making it impossible to switch item or to attach/mine/build until the delay is over (For eating with delay) - Tool charging: Holding down the mouse and releasing it, applying a “power level” (For bow and arrows, more charge = higher arrow range) ([issue 5212](https://github.com/minetest/minetest/issues/5212)) - [Dual Wielding](http://minecraft.gamepedia.com/Dual_wield) @@ -21,7 +19,6 @@ For these features, no easy Lua workaround could be found. ## Interface - Inventory: Hold down right mouse button while holding an item stack to drop items into the slots as you move the mouse. Makes crafting MUCH faster -- **Much** more informative item tooltips - Sneak+Leftclick on crafting output crafts as many items as possible and immediately puts it into the player inventory ([issue 5211](https://github.com/minetest/minetest/issues/5211)) - Sneak+click on inventory slot should be able to put items into additional “fallback inventories” if the first inventory is full. Required for large chests - Sneak+click puts items in different inventories depending on the item type (maybe group-based)? Required for sneak-clicking to armor slots @@ -39,8 +36,5 @@ For these features, a workaround (or hack ;-)) by using Lua is theoretically pos - Set damage frequency of `damage_per_second`. In Minecraft many things damage players every half-second rather than every second - Possible to damage players directly when they are with the head inside. This allows to add Minecraft-like suffocation -#### Crafting -- Require tools to be intact in crafting - #### Nice-to-haye - Utility function to rotate pillar-like nodes, requiring only 3 possible orientations (X, Y, Z). Basically this is `minetest.rotate_node` but with less orientations; the purpur pillar would mess up if a mirrored rotation would be possible. This is already implemented in MCL2, See `mcl_util` for more infos diff --git a/README.md b/README.md index 9654821f3..76718595b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # MineClone 2 -An unofficial Minecraft-like game for Minetest. Forked from MineClone by daredevils. +An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils. Developed by Wuzzy and contributors. Not developed or endorsed by Mojang AB. -Version: 0.46.0 +Version: 0.55.1 ### Gameplay You start in a randomly-generated world made entirely of cubes. You can explore @@ -67,7 +67,6 @@ an explanation. #### Incomplete items These items do not work yet, but you can get them with `/giveme` for testing: -* Fishing Rod: `mcl_fishing:fishing_rod` * Activator Rail: `mcl_minecarts:activator_rail` * Minecart with Chest: `mcl_minecarts:chest_minecart` * Minecart with Furnace: `mcl_minecarts:furnace_minecart` @@ -75,13 +74,14 @@ These items do not work yet, but you can get them with `/giveme` for testing: * Minecart with Command Block: `mcl_minecarts:command_block_minecart` ## Installation -This game requires [Minetest](http://minetest.net) to run -(version 0.4.16 or 0.4.17). -So you need to install Minetest first. Only stable versions of Minetest are -officially supported. Minetest 5.0.0 (when released) will NOT be supported (yet). -There is no support whatsoever for running MineClone 2 in development versions of Minetest. -To install MineClone 2, move this directory into the “games” directory of -your Minetest data directory. Consult the help of Minetest to learn more. +This game requires [Minetest](http://minetest.net) to run (version 5.0.0 or +later). So you need to install Minetest first. Only stable versions of Minetest +are officially supported. +There is no support for running MineClone 2 in development versions of Minetest. + +To install MineClone 2 (if you haven't already), move this directory into the +“games” directory of your Minetest data directory. Consult the help of +Minetest to learn more. ## Project description The main goal of **MineClone 2** is to be a clone of Minecraft and to be released as free software. @@ -197,8 +197,10 @@ There are so many people to list (sorry). Check out the respective mod directori ### Coding * [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082): Main programmer of most mods -* daredevils: Creator of MineClone on which MineClone 2 is based on +* davedevils: Creator of MineClone on which MineClone 2 is based on * [ex-bart](https://github.com/ex-bart): Redstone comparators +* [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes +* [aligator](https://github.com/aligator): Improvement of doors * Lots of other people: TO BE WRITTEN (see mod directories for details) ### Textures @@ -218,7 +220,7 @@ Various sources. See the respective mod directories for details. ### Special thanks -* daredevils for starting MineClone, the original version of this game +* davedevils for starting MineClone, the original version of this game * celeron55 for creating Minetest * Minetest's modding community for providing a huge selection of mods, some of which ended up in MineClone 2 * Jordach for the jukebox music compilation from Big Freaking Dig @@ -241,10 +243,10 @@ Here's the detailed legalese for those who need it: ### License of source code MineClone 2 is a clean-room implementation of Minecraft and licensed under the -GNU LGPL v2.1 (Wuzzy, daredevils and countless others) (see `LICENSE.txt`). +GNU LGPL v2.1 (Wuzzy, davedevils and countless others) (see `LICENSE.txt`). MineClone 2 is a direct continuation of the discontinued MineClone -project by daredevils which fell under the same license. +project by davedevils which fell under the same license. Mods credit: See `README.txt` or `README.md` in each mod directory for information about other authors. diff --git a/minetest.conf b/minetest.conf index f7042f5a3..6b6a4d678 100644 --- a/minetest.conf +++ b/minetest.conf @@ -1,7 +1,9 @@ -# This is a game specify minetest.conf file, do not edit +# This is a game specific minetest.conf file, do not edit +# Basic game rules time_speed = 72 +# Player physics movement_acceleration_default = 2.4 movement_acceleration_air = 1.2 #movement_acceleration_fast = 10 @@ -20,4 +22,12 @@ movement_liquid_sink = 23 movement_gravity = 10.4 +# Mapgen stuff + +# altitude_chill and altitude_dry doesn't go well together with MCL2 biomes +# which already include "snowed" variants as you go higher. +# humid_rivers would cause the MushroomIsland biome to appear frequently around rivers. +mgvalleys_spflags = noaltitude_chill,noaltitude_dry,nohumid_rivers,vary_river_depth + +# MCL2-specific stuff keepInventory = false diff --git a/mods/CORE/biomeinfo/API.md b/mods/CORE/biomeinfo/API.md new file mode 100644 index 000000000..7713bf2a8 --- /dev/null +++ b/mods/CORE/biomeinfo/API.md @@ -0,0 +1,42 @@ +# Biome Info API +This document explains the API of this mod. + +## v6 mapgen functions +These are functions for the v6 mapgen only. + +Use these functions only in worlds in which the v6 mapgen is used. +If you use these in any other mapgen, bad things might happen. + +### `biomeinfo.get_v6_humidity(pos)` +Get the biome humidity at pos (for v6 mapgen). + +### `biomeinfo.get_v6_heat(pos)` +Get the biome heat/temperature at pos (for v6 mapgen). + +### `biomeinfo.get_v6_biome(pos)` +Get the v6 biome at pos. +Returns a string, which is the unique biome name. + +Note: This function currently ignores the `biomeblend` v6 mapgen flag, +it just pretends this setting is disabled. +This is normally not a problem, but at areas where biomes blend, +the result is not perfectly accurate and just an estimate. + +### `biomeinfo.get_active_v6_biomes()` +Returns a table containing the names of all v6 biomes that are actively +used in the current world, e.g. those that have been activated +by the use of the mapgen v6 flags (`mgv6_spflags`). + +### `biomeinfo.all_v6_biomes` +This is a table containing all v6 biomes (as strings), even those that +might not be used in the current world. + +### v6 biome names + +These are the biome names used in this mod: + +* Normal +* Desert +* Jungle +* Tundra +* Taiga diff --git a/mods/CORE/biomeinfo/README.md b/mods/CORE/biomeinfo/README.md new file mode 100644 index 000000000..d895dadb5 --- /dev/null +++ b/mods/CORE/biomeinfo/README.md @@ -0,0 +1,11 @@ +# Biome Info API [`biomeinfo`] +This is an API mod for mod developers to add a couple of missing +biome-related functions. +Currently, this mod only adds v6-related functions. +Most importantly, you can get the heat, humidity and biome in the v6 mapgen. + +See `API.md` for the API documentation. + +Current version: 1.0.1 (this is a [SemVer](https://semver.org/)) + +License: MIT License diff --git a/mods/CORE/biomeinfo/init.lua b/mods/CORE/biomeinfo/init.lua new file mode 100644 index 000000000..1ba182840 --- /dev/null +++ b/mods/CORE/biomeinfo/init.lua @@ -0,0 +1,179 @@ +biomeinfo = {} + +-- Copied from mapgen_v6.h +local MGV6_FREQ_HOT = 0.4 +local MGV6_FREQ_SNOW = -0.4 +local MGV6_FREQ_TAIGA = 0.5 +local MGV6_FREQ_JUNGLE = 0.5 + +-- Biome types +local BT_NORMAL = "Normal" +local BT_TUNDRA = "Tundra" +local BT_TAIGA = "Taiga" +local BT_DESERT = "Desert" +local BT_JUNGLE = "Jungle" + +-- Get mapgen settings + +local seed = tonumber(minetest.get_mapgen_setting("seed")) or 0 + +local mgv6_perlin_biome, mgv6_perlin_humidity, mgv6_np_biome + +local v6_flags_str = minetest.get_mapgen_setting("mgv6_spflags") +if v6_flags_str == nil then + v6_flags_str = "" +end +local v6_flags = string.split(v6_flags_str) +local v6_use_snow_biomes = true +local v6_use_jungles = true +-- TODO: Implement biome blend. +-- Currently we pretend biome blend is disabled. +-- This just makes the calculations inaccurate near biome boundaries, +-- but should be fine otherwise. +local v6_use_biome_blend = false +for f=1, #v6_flags do + local flag = v6_flags[f]:trim() + if flag == "nosnowbiomes" then + v6_use_snow_biomes = false + end + if flag == "snowbiomes" then + v6_use_snow_biomes = true + end + if flag == "nojungles" then + v6_use_jungles = false + end + if flag == "jungles" then + v6_use_jungles = true + end + if flag == "nobiomeblend" then + v6_use_biome_blend = false + end +-- TODO +-- if flag == "biomeblend" then +-- v6_use_biome_blend = true +-- end +end +-- Force-enable jungles when snowbiomes flag is set +if v6_use_snow_biomes then + v6_use_jungles = true +end +local v6_freq_desert = tonumber(minetest.get_mapgen_setting("mgv6_freq_desert") or 0.45) + +local NOISE_MAGIC_X = 1619 +local NOISE_MAGIC_Y = 31337 +local NOISE_MAGIC_Z = 52591 +local NOISE_MAGIC_SEED = 1013 +local noise2d = function(x, y, seed) + -- TODO: implement noise2d function for biome blend + return 0 +--[[ + local n = (NOISE_MAGIC_X * x + NOISE_MAGIC_Y * y + + NOISE_MAGIC_SEED * seed) & 0x7fffffff; + n = (n >> 13) ^ n; + n = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; + return 1.0 - n / 0x40000000; +]] +end + +biomeinfo.all_v6_biomes = { + BT_NORMAL, + BT_DESERT, + BT_JUNGLE, + BT_TUNDRA, + BT_TAIGA +} + +local function init_perlins() + if not mgv6_perlin_biome then + mgv6_np_biome = minetest.get_mapgen_setting_noiseparams("mgv6_np_biome") + if mgv6_np_biome then + mgv6_perlin_biome = minetest.get_perlin(mgv6_np_biome) + end + end + if not mgv6_perlin_humidity then + local np_humidity = minetest.get_mapgen_setting_noiseparams("mgv6_np_humidity") + if np_humidity then + mgv6_perlin_humidity = minetest.get_perlin(np_humidity) + end + end +end + +function biomeinfo.get_active_v6_biomes() + local biomes = { BT_NORMAL, BT_DESERT } + if v6_use_jungles then + table.insert(biomes, BT_JUNGLE) + end + if v6_use_snow_biomes then + table.insert(biomes, BT_TUNDRA) + table.insert(biomes, BT_TAIGA) + end + return biomes +end + +function biomeinfo.get_v6_heat(pos) + init_perlins() + local bpos = vector.floor(pos) + -- The temperature noise needs a special offset (see calculateNoise in mapgen_v6.cpp) + return mgv6_perlin_biome:get_2d({x=bpos.x + mgv6_np_biome.spread.x*0.6, y=bpos.z + mgv6_np_biome.spread.z*0.2}) +end + +function biomeinfo.get_v6_humidity(pos) + init_perlins() + local bpos = vector.floor(pos) + return mgv6_perlin_humidity:get_2d({x=bpos.x, y=bpos.z}) +end + +-- Returns the v6 biome at pos. +-- Returns a string representing the biome name. +function biomeinfo.get_v6_biome(pos) + init_perlins() + local bpos = vector.floor(pos) + -- Based on the algorithm MapgenV6::getBiome in mapgen_v6.cpp + + local pos2d = {x=bpos.x, y=bpos.z} + if not mgv6_perlin_biome or not mgv6_perlin_humidity then + return "???" + end + local d = biomeinfo.get_v6_heat(bpos) + local h = biomeinfo.get_v6_humidity(bpos) + + if (v6_use_snow_biomes) then + local blend + if v6_use_biome_blend then + blend = noise2d(pos2d.x, pos2d.y, seed) / 40 + else + blend = 0 + end + + if (d > MGV6_FREQ_HOT + blend) then + if (h > MGV6_FREQ_JUNGLE + blend) then + return BT_JUNGLE + end + return BT_DESERT + end + if (d < MGV6_FREQ_SNOW + blend) then + if (h > MGV6_FREQ_TAIGA + blend) then + return BT_TAIGA + end + return BT_TUNDRA + end + return BT_NORMAL + end + + if (d > v6_freq_desert) then + return BT_DESERT + end + + if ((v6_use_biome_blend) and (d > v6_freq_desert - 0.10) and + ((noise2d(pos2d.x, pos2d.y, seed) + 1.0) > (v6_freq_desert - d) * 20.0)) then + return BT_DESERT + end + + if ((v6_use_jungles) and (h > 0.75)) then + return BT_JUNGLE + end + + return BT_NORMAL +end + + diff --git a/mods/CORE/biomeinfo/mod.conf b/mods/CORE/biomeinfo/mod.conf new file mode 100644 index 000000000..95be561a3 --- /dev/null +++ b/mods/CORE/biomeinfo/mod.conf @@ -0,0 +1,2 @@ +name = biomeinfo +description = Simple API to get data about biomes. diff --git a/mods/CORE/mcl_init/init.lua b/mods/CORE/mcl_init/init.lua index de50bf00a..afbe9dfa3 100644 --- a/mods/CORE/mcl_init/init.lua +++ b/mods/CORE/mcl_init/init.lua @@ -1,12 +1,16 @@ -- Some global variables (don't overwrite them!) mcl_vars = {} ---- GUI / inventory menu colors +--- GUI / inventory menu settings mcl_vars.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]" +-- nonbg is added as formspec prepend in mcl_formspec_prepend +mcl_vars.gui_nonbg = mcl_vars.gui_slots + +-- Background stuff must be manually added by mods (no formspec prepend) mcl_vars.gui_bg = "bgcolor[#080808BB;true]" mcl_vars.gui_bg_img = "" -mcl_vars.inventory_header = mcl_vars.gui_slots .. mcl_vars.gui_bg +mcl_vars.inventory_header = mcl_vars.gui_bg -- Mapgen variables local mg_name = minetest.get_mapgen_setting("mg_name") @@ -81,7 +85,7 @@ end mcl_vars.mg_end_min = -27073 -- Carefully chosen to be at a mapchunk border mcl_vars.mg_end_max_official = mcl_vars.mg_end_min + minecraft_height_limit mcl_vars.mg_end_max = mcl_vars.mg_overworld_min - 2000 -mcl_vars.mg_end_platform_pos = { x = 100, y = mcl_vars.mg_end_min + 80, z = 0 } +mcl_vars.mg_end_platform_pos = { x = 100, y = mcl_vars.mg_end_min + 74, z = 0 } -- Realm barrier used to safely separate the End from the void below the Overworld mcl_vars.mg_realm_barrier_overworld_end_max = mcl_vars.mg_end_max diff --git a/mods/CORE/mcl_loot/init.lua b/mods/CORE/mcl_loot/init.lua index f7eff3f64..35c72539d 100644 --- a/mods/CORE/mcl_loot/init.lua +++ b/mods/CORE/mcl_loot/init.lua @@ -98,3 +98,54 @@ function mcl_loot.get_multi_loot(multi_loot_definitions, pr) end return items end + +--[[ +Returns a table of length `max_slot` and all natural numbers between 1 and `max_slot` +in a random order. +]] +local function get_random_slots(max_slot) + local slots = {} + for s=1, max_slot do + slots[s] = s + end + local slots_out = {} + while #slots > 0 do + local r = math.random(1, #slots) + table.insert(slots_out, slots[r]) + table.remove(slots, r) + end + return slots_out +end + +--[[ +Puts items in an inventory list into random slots. +* inv: InvRef +* listname: Inventory list name +* items: table of items to add + +Items will be added from start of the table to end. +If the inventory already has occupied slots, or is +too small, placement of some items might fail. +]] +function mcl_loot.fill_inventory(inv, listname, items) + local size = inv:get_size(listname) + local slots = get_random_slots(size) + local leftovers = {} + -- 1st pass: Add items into random slots + for i=1, math.min(#items, size) do + local item = items[i] + local slot = slots[i] + local old_item = inv:get_stack(listname, slot) + local leftover = old_item:add_item(item) + inv:set_stack(listname, slot, old_item) + if not leftover:is_empty() then + table.insert(leftovers, item) + end + end + -- 2nd pass: If some items couldn't be added in first pass, + -- try again in a non-random fashion + for l=1, math.min(#leftovers, size) do + inv:add_item(listname, leftovers[l]) + end + -- If there are still items left, tough luck! +end diff --git a/mods/CORE/mcl_sounds/README.txt b/mods/CORE/mcl_sounds/README.txt index 54eeab60e..9fc2ba28f 100644 --- a/mods/CORE/mcl_sounds/README.txt +++ b/mods/CORE/mcl_sounds/README.txt @@ -4,6 +4,9 @@ Licenses of sounds Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) http://creativecommons.org/licenses/by-sa/3.0/ +Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +http://creativecommons.org/licenses/by-sa/4.0/ + Creative Commons Attribution 3.0 Unported (CC BY-SA 3.0) http://creativecommons.org/licenses/by/3.0/ @@ -67,10 +70,13 @@ blukotek (CC0 1.0) https://www.freesound.org/people/blukotek/sounds/251660/ default_dig_snappy.ogg +sonictechtonic (CC BY 3.0) +https://www.freesound.org/people/sonictechtonic/sounds/241872/ + player_damage.ogg + Voxelands project (CC BY-SA 3.0) mcl_sounds_place_node_water.ogg mcl_sounds_dug_water.ogg - player_damage.ogg (Note: Artists from the Voxelands project include: sdzen, darkrose, sapier, Tom Peter, Telaron, juskiddink) @@ -83,5 +89,9 @@ Adam_N (CC0 1.0): player_falling_damage.ogg Source: +Alecia Shepherd (CC BY-SA 4.0): + mcl_sounds_cloth.ogg + Source: SnowSong sound and music pack + Unknown authors (WTFPL): pedology_snow_soft_footstep.*.ogg diff --git a/mods/CORE/mcl_sounds/init.lua b/mods/CORE/mcl_sounds/init.lua index cd3ca96f8..70010fda0 100644 --- a/mods/CORE/mcl_sounds/init.lua +++ b/mods/CORE/mcl_sounds/init.lua @@ -97,6 +97,20 @@ function mcl_sounds.node_sound_wood_defaults(table) return table end +function mcl_sounds.node_sound_wool_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name="mcl_sounds_cloth", gain=0.5} + table.dug = table.dug or + {name="mcl_sounds_cloth", gain=1.0} + table.dig = table.dig or + {name="mcl_sounds_cloth", gain=0.9} + table.place = table.dig or + {name="mcl_sounds_cloth", gain=1.0} + mcl_sounds.node_sound_defaults(table) + return table +end + function mcl_sounds.node_sound_leaves_defaults(table) table = table or {} table.footstep = table.footstep or diff --git a/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.1.ogg b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.1.ogg new file mode 100644 index 000000000..cc304a414 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.2.ogg b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.2.ogg new file mode 100644 index 000000000..8a3c0963f Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.3.ogg b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.3.ogg new file mode 100644 index 000000000..2f682c72b Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.4.ogg b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.4.ogg new file mode 100644 index 000000000..cc60b8f6e Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/mcl_sounds_cloth.4.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/player_damage.ogg b/mods/CORE/mcl_sounds/sounds/player_damage.ogg index 063e6c08c..788808710 100644 Binary files a/mods/CORE/mcl_sounds/sounds/player_damage.ogg and b/mods/CORE/mcl_sounds/sounds/player_damage.ogg differ diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 54d5e363d..b5d5e1bb8 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -174,14 +174,15 @@ function mcl_util.move_item(source_inventory, source_list, source_stack_id, dest if not source_inventory:is_empty(source_list) then local stack = source_inventory:get_stack(source_list, source_stack_id) - local item = stack:get_name() if not stack:is_empty() then - if not destination_inventory:room_for_item(destination_list, item) then + local new_stack = ItemStack(stack) + new_stack:set_count(1) + if not destination_inventory:room_for_item(destination_list, new_stack) then return false end stack:take_item() source_inventory:set_stack(source_list, source_stack_id, stack) - destination_inventory:add_item(destination_list, item) + destination_inventory:add_item(destination_list, new_stack) return true end end diff --git a/mods/CORE/modpack.txt b/mods/CORE/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/ENTITIES/drippingwater/init.lua b/mods/ENTITIES/drippingwater/init.lua index 5cd74cd50..6e23183fb 100644 --- a/mods/ENTITIES/drippingwater/init.lua +++ b/mods/ENTITIES/drippingwater/init.lua @@ -12,15 +12,17 @@ minetest.register_entity("drippingwater:drop_water", { hp_max = 1, physical = true, collide_with_objects = false, - collisionbox = {0,0,0,0,0,0}, + collisionbox = {-0.025,-0.05,-0.025,0.025,-0.01,0.025}, + pointable = false, visual = "cube", visual_size = {x=0.05, y=0.1}, textures = {water_tex, water_tex, water_tex, water_tex, water_tex, water_tex}, spritediv = {x=1, y=1}, initial_sprite_basepos = {x=0, y=0}, + static_save = false, on_activate = function(self, staticdata) - self.object:setsprite({x=0,y=0}, 1, 1, true) + self.object:set_sprite({x=0,y=0}, 1, 1, true) end, on_step = function(self, dtime) @@ -28,11 +30,11 @@ minetest.register_entity("drippingwater:drop_water", { local ownpos = self.object:get_pos() if k==1 then - self.object:setacceleration({x=0, y=-5, z=0}) + self.object:set_acceleration({x=0, y=-5, z=0}) end if minetest.get_node({x=ownpos.x, y=ownpos.y +0.5, z=ownpos.z}).name == "air" then - self.object:setacceleration({x=0, y=-5, z=0}) + self.object:set_acceleration({x=0, y=-5, z=0}) end if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then @@ -50,15 +52,18 @@ minetest.register_entity("drippingwater:drop_lava", { hp_max = 1, physical = true, collide_with_objects = false, - collisionbox = {0,0,0,0,0,0}, + collisionbox = {-0.025,-0.05,-0.025,0.025,-0.01,0.025}, + glow = math.max(7, minetest.registered_nodes["mcl_core:lava_source"].light_source - 3), + pointable = false, visual = "cube", visual_size = {x=0.05, y=0.1}, textures = {lava_tex, lava_tex, lava_tex, lava_tex, lava_tex, lava_tex}, spritediv = {x=1, y=1}, initial_sprite_basepos = {x=0, y=0}, + static_save = false, on_activate = function(self, staticdata) - self.object:setsprite({x=0,y=0}, 1, 0, true) + self.object:set_sprite({x=0,y=0}, 1, 0, true) end, on_step = function(self, dtime) @@ -66,11 +71,11 @@ minetest.register_entity("drippingwater:drop_lava", { local ownpos = self.object:get_pos() if k==1 then - self.object:setacceleration({x=0, y=-5, z=0}) + self.object:set_acceleration({x=0, y=-5, z=0}) end if minetest.get_node({x=ownpos.x, y=ownpos.y +0.5, z=ownpos.z}).name == "air" then - self.object:setacceleration({x=0, y=-5, z=0}) + self.object:set_acceleration({x=0, y=-5, z=0}) end diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index a583a0788..9999b2b75 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -1,3 +1,4 @@ +local S = minetest.get_translator("mcl_boats") -- -- Helper functions -- @@ -33,6 +34,8 @@ local boat_visual_size = {x = 3, y = 3} local driver_visual_size = { x = 1/boat_visual_size.x, y = 1/boat_visual_size.y } local paddling_speed = 22 local boat_y_offset = 0.35 +local boat_y_offset_ground = boat_y_offset + 0.6 +local boat_side_offset = 1.001 -- -- Boat entity @@ -69,7 +72,7 @@ function boat.on_rightclick(self, clicker) mcl_player.player_set_animation(clicker, "stand" , 30) local pos = clicker:get_pos() pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} - clicker:setpos(pos) + clicker:set_pos(pos) elseif not self._driver then local attach = clicker:get_attach() if attach and attach:get_luaentity() then @@ -82,7 +85,7 @@ function boat.on_rightclick(self, clicker) end self._driver = clicker clicker:set_attach(self.object, "", - {x = 0, y = 3.75, z = -1}, {x = 0, y = 0, z = 0}) + {x = 0, y = 0.42, z = -1}, {x = 0, y = 0, z = 0}) clicker:set_properties({ visual_size = driver_visual_size }) mcl_player.player_attached[name] = true minetest.after(0.2, function(name) @@ -91,7 +94,7 @@ function boat.on_rightclick(self, clicker) mcl_player.player_set_animation(player, "sit" , 30) end end, name) - clicker:set_look_horizontal(self.object:getyaw()) + clicker:set_look_horizontal(self.object:get_yaw()) end end @@ -143,13 +146,29 @@ function boat.on_punch(self, puncher) end function boat.on_step(self, dtime) - self._v = get_v(self.object:getvelocity()) * get_sign(self._v) + self._v = get_v(self.object:get_velocity()) * get_sign(self._v) + local on_water = true + local in_water = false + local v_factor = 1 + local v_slowdown = 0.02 + local p = self.object:get_pos() + if (not is_water({x=p.x, y=p.y-boat_y_offset, z=p.z})) then + on_water = false + v_factor = 0.5 + v_slowdown = 0.04 + elseif (is_water({x=p.x, y=p.y-boat_y_offset+1, z=p.z})) then + on_water = false + in_water = true + v_factor = 0.75 + v_slowdown = 0.05 + end + if self._driver then local ctrl = self._driver:get_player_control() - local yaw = self.object:getyaw() + local yaw = self.object:get_yaw() if ctrl.up then -- Forwards - self._v = self._v + 0.1 + self._v = self._v + 0.1 * v_factor -- Paddling animation if self._animation ~= 1 then @@ -158,7 +177,7 @@ function boat.on_step(self, dtime) end elseif ctrl.down then -- Backwards - self._v = self._v - 0.1 + self._v = self._v - 0.1 * v_factor -- Paddling animation, reversed if self._animation ~= -1 then @@ -174,15 +193,15 @@ function boat.on_step(self, dtime) end if ctrl.left then if self._v < 0 then - self.object:setyaw(yaw - (1 + dtime) * 0.03) + self.object:set_yaw(yaw - (1 + dtime) * 0.03 * v_factor) else - self.object:setyaw(yaw + (1 + dtime) * 0.03) + self.object:set_yaw(yaw + (1 + dtime) * 0.03 * v_factor) end elseif ctrl.right then if self._v < 0 then - self.object:setyaw(yaw + (1 + dtime) * 0.03) + self.object:set_yaw(yaw + (1 + dtime) * 0.03 * v_factor) else - self.object:setyaw(yaw - (1 + dtime) * 0.03) + self.object:set_yaw(yaw - (1 + dtime) * 0.03 * v_factor) end end else @@ -192,73 +211,65 @@ function boat.on_step(self, dtime) self._animation = 0 end end - local velo = self.object:getvelocity() - if self._v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then - self.object:setpos(self.object:get_pos()) - return - end local s = get_sign(self._v) - self._v = self._v - 0.02 * s - if s ~= get_sign(self._v) then - self.object:setvelocity({x = 0, y = 0, z = 0}) - self._v = 0 - return + if not on_water and not in_water and math.abs(self._v) > 1.0 then + v_slowdown = math.min(math.abs(self._v) - 1.0, v_slowdown * 5) + elseif in_water and math.abs(self._v) > 1.5 then + v_slowdown = math.min(math.abs(self._v) - 1.5, v_slowdown * 5) end - if math.abs(self._v) > 5 then - self._v = 5 * get_sign(self._v) + self._v = self._v - v_slowdown * s + if s ~= get_sign(self._v) then + self._v = 0 end - local p = self.object:get_pos() p.y = p.y - boat_y_offset local new_velo local new_acce = {x = 0, y = 0, z = 0} if not is_water(p) then + -- Not on water or inside water: Free fall local nodedef = minetest.registered_nodes[minetest.get_node(p).name] - if (not nodedef) or nodedef.walkable then - self._v = 0 - new_acce = {x = 0, y = 1, z = 0} - else - new_acce = {x = 0, y = -9.8, z = 0} - end - new_velo = get_velocity(self._v, self.object:getyaw(), - self.object:getvelocity().y) - self.object:setpos(self.object:get_pos()) + new_acce = {x = 0, y = -9.8, z = 0} + new_velo = get_velocity(self._v, self.object:get_yaw(), + self.object:get_velocity().y) else p.y = p.y + 1 if is_water(p) then - local y = self.object:getvelocity().y - if y >= 5 then - y = 5 - elseif y < 0 then - new_acce = {x = 0, y = 20, z = 0} - else - new_acce = {x = 0, y = 5, z = 0} + -- Inside water: Slowly sink + local y = self.object:get_velocity().y + y = y - 0.01 + if y < -0.2 then + y = -0.2 end - new_velo = get_velocity(self._v, self.object:getyaw(), y) - self.object:setpos(self.object:get_pos()) - else new_acce = {x = 0, y = 0, z = 0} - if math.abs(self.object:getvelocity().y) < 1 then - local pos = self.object:get_pos() - pos.y = math.floor(pos.y) + boat_y_offset - self.object:setpos(pos) - new_velo = get_velocity(self._v, self.object:getyaw(), 0) + new_velo = get_velocity(self._v, self.object:get_yaw(), y) + else + -- On top of water + new_acce = {x = 0, y = 0, z = 0} + if math.abs(self.object:get_velocity().y) < 0 then + new_velo = get_velocity(self._v, self.object:get_yaw(), 0) else - new_velo = get_velocity(self._v, self.object:getyaw(), - self.object:getvelocity().y) - self.object:setpos(self.object:get_pos()) + new_velo = get_velocity(self._v, self.object:get_yaw(), + self.object:get_velocity().y) end end end - self.object:setvelocity(new_velo) - self.object:setacceleration(new_acce) + + -- Terminal velocity: 8 m/s per axis of travel + for _,axis in pairs({"z","y","x"}) do + if math.abs(new_velo[axis]) > 8 then + new_velo[axis] = 8 * get_sign(new_velo[axis]) + end + end + + self.object:set_velocity(new_velo) + self.object:set_acceleration(new_acce) end -- Register one entity for all boat types minetest.register_entity("mcl_boats:boat", boat) local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak" } -local names = { "Oak Boat", "Spruce Boat", "Birch Boat", "Jungle Boat", "Acacia Boat", "Dark Oak Boat" } +local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat") } local craftstuffs = {} if minetest.get_modpath("mcl_core") then craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood" } @@ -273,9 +284,9 @@ for b=1, #boat_ids do -- Only create one help entry for all boats if b == 1 then help = true - longdesc = "Boats are used to travel on the surface of water." - usagehelp = "Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item." - helpname = "Boat" + longdesc = S("Boats are used to travel on the surface of water.") + usagehelp = S("Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.") + helpname = S("Boat") end minetest.register_craftitem(itemstring, { @@ -290,7 +301,7 @@ for b=1, #boat_ids do stack_max = 1, on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then - return + return itemstack end -- Call on_rightclick if the pointed node defines it @@ -301,11 +312,17 @@ for b=1, #boat_ids do end end - if not is_water(pointed_thing.under) then - return + local pos = table.copy(pointed_thing.under) + local dir = vector.subtract(pointed_thing.above, pointed_thing.under) + + if math.abs(dir.x) > 0.9 or math.abs(dir.z) > 0.9 then + pos = vector.add(pos, vector.multiply(dir, boat_side_offset)) + elseif is_water(pos) then + pos = vector.add(pos, vector.multiply(dir, boat_y_offset)) + else + pos = vector.add(pos, vector.multiply(dir, boat_y_offset_ground)) end - pointed_thing.under.y = pointed_thing.under.y + boat_y_offset - local boat = minetest.add_entity(pointed_thing.under, "mcl_boats:boat") + local boat = minetest.add_entity(pos, "mcl_boats:boat") boat:get_luaentity()._itemstring = itemstring boat:set_properties({textures = { "mcl_boats_texture_"..images[b].."_boat.png" }}) boat:set_yaw(placer:get_look_horizontal()) diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.de.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.de.tr new file mode 100644 index 000000000..3c97cf5ec --- /dev/null +++ b/mods/ENTITIES/mcl_boats/locale/mcl_boats.de.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_boats +Acacia Boat=Akazienboot +Birch Boat=Birkenboot +Boat=Boot +Boats are used to travel on the surface of water.=Boote werden benutzt, um sich auf der Wasseroberfläche zu bewegen. +Dark Oak Boat=Schwarzeichenboot +Jungle Boat=Dschungelboot +Oak Boat=Eichenboot +Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Rechtsklicken Sie auf eine Wasserquelle, um das Boot zu platzieren. Rechtsklicken Sie auf das Boot, um es zu betreten. Mit [Links] und [Rechts] lenken, mit [Vorwärts] und [Rückwärts] Geschwindigkeit regeln oder rückwärts fahren. Rechtsklicken Sie erneut auf das Boot, um es zu verlassen, schlagen Sie das Boot, um es als Gegenstand fallen zu lassen. +Spruce Boat=Fichtenboot diff --git a/mods/ENTITIES/mcl_boats/locale/template.txt b/mods/ENTITIES/mcl_boats/locale/template.txt new file mode 100644 index 000000000..9af27b704 --- /dev/null +++ b/mods/ENTITIES/mcl_boats/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: mcl_boats +Acacia Boat= +Birch Boat= +Boat= +Boats are used to travel on the surface of water.= +Dark Oak Boat= +Jungle Boat= +Oak Boat= +Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.= +Spruce Boat= diff --git a/mods/ENTITIES/mcl_falling_nodes/init.lua b/mods/ENTITIES/mcl_falling_nodes/init.lua index 92cca7031..540745673 100644 --- a/mods/ENTITIES/mcl_falling_nodes/init.lua +++ b/mods/ENTITIES/mcl_falling_nodes/init.lua @@ -1,5 +1,5 @@ +local S = minetest.get_translator("mcl_falling_nodes") local dmes = minetest.get_modpath("mcl_death_messages") ~= nil -local hung = minetest.get_modpath("mcl_hunger") ~= nil local get_falling_depth = function(self) if not self._startpos then @@ -49,15 +49,12 @@ local deal_falling_damage = function(self, dtime) -- TODO: Reduce damage if wearing a helmet local msg if minetest.get_item_group(self.node.name, "anvil") ~= 0 then - msg = "%s was smashed by a falling anvil." + msg = S("@1 was smashed by a falling anvil.", v:get_player_name()) else - msg = "%s was smashed by a falling block." + msg = S("@1 was smashed by a falling block.", v:get_player_name()) end if dmes then - mcl_death_messages.player_damage(v, string.format(msg, v:get_player_name())) - end - if hung then - mcl_hunger.exhaust(v:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) + mcl_death_messages.player_damage(v, msg) end end v:set_hp(hp) @@ -145,9 +142,9 @@ minetest.register_entity(":__builtin:falling_node", { on_step = function(self, dtime) -- Set gravity - local acceleration = self.object:getacceleration() + local acceleration = self.object:get_acceleration() if not vector.equals(acceleration, {x = 0, y = -10, z = 0}) then - self.object:setacceleration({x = 0, y = -10, z = 0}) + self.object:set_acceleration({x = 0, y = -10, z = 0}) end -- Turn to actual node when colliding with ground, or continue to move local pos = self.object:get_pos() @@ -204,15 +201,19 @@ minetest.register_entity(":__builtin:falling_node", { for _, callback in pairs(minetest.registered_on_dignodes) do callback(np, n2) end - if minetest.registered_nodes[self.node.name] then + local def = minetest.registered_nodes[self.node.name] + if def then minetest.add_node(np, self.node) - if minetest.registered_nodes[self.node.name]._mcl_after_falling then - minetest.registered_nodes[self.node.name]._mcl_after_falling(np, get_falling_depth(self)) + if def._mcl_after_falling then + def._mcl_after_falling(np, get_falling_depth(self)) end if self.meta then local meta = minetest.get_meta(np) meta:from_table(self.meta) end + if def.sounds and def.sounds.place and def.sounds.place.name then + minetest.sound_play(def.sounds.place, {pos = np}) + end end else -- Drop the *falling node* as an item if the destination node is NOT buildable to @@ -226,7 +227,7 @@ minetest.register_entity(":__builtin:falling_node", { minetest.check_for_falling(np) return end - local vel = self.object:getvelocity() + local vel = self.object:get_velocity() -- Fix position if entity does not move if vector.equals(vel, {x = 0, y = 0, z = 0}) then local npos = vector.round(self.object:get_pos()) @@ -242,8 +243,14 @@ minetest.register_entity(":__builtin:falling_node", { local npos3 = table.copy(npos) npos3.y = npos3.y - 1 minetest.add_node(npos3, self.node) - if minetest.registered_nodes[self.node.name]._mcl_after_falling then - minetest.registered_nodes[self.node.name]._mcl_after_falling(npos3, get_falling_depth(self)) + local def = minetest.registered_nodes[self.node.name] + if def then + if def._mcl_after_falling then + def._mcl_after_falling(npos3, get_falling_depth(self)) + end + if def.sounds and def.sounds.place and def.sounds.place.name then + minetest.sound_play(def.sounds.place, {pos = np}) + end end deal_falling_damage(self, dtime) self.object:remove() diff --git a/mods/ENTITIES/mcl_falling_nodes/locale/mcl_falling_nodes.de.tr b/mods/ENTITIES/mcl_falling_nodes/locale/mcl_falling_nodes.de.tr new file mode 100644 index 000000000..71dfa4be9 --- /dev/null +++ b/mods/ENTITIES/mcl_falling_nodes/locale/mcl_falling_nodes.de.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_falling_nodes +@1 was smashed by a falling anvil.=@1 wurde von einem fallenden Amboss zerschmettert. +@1 was smashed by a falling block.=@1 wurde von einem fallenden Block zerschmettert. diff --git a/mods/ENTITIES/mcl_falling_nodes/locale/template.txt b/mods/ENTITIES/mcl_falling_nodes/locale/template.txt new file mode 100644 index 000000000..4adabaf01 --- /dev/null +++ b/mods/ENTITIES/mcl_falling_nodes/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: mcl_falling_nodes +@1 was smashed by a falling anvil.= +@1 was smashed by a falling block.= diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index d1c502fce..362824494 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -98,14 +98,14 @@ minetest.register_globalstep(function(dtime) local opos = object:get_pos() local vec = vector.subtract(checkpos, opos) vec = vector.add(opos, vector.divide(vec, 2)) - object:moveto(vec) + object:move_to(vec) --fix eternally falling items minetest.after(0, function(object) local lua = object:get_luaentity() if lua then - object:setacceleration({x=0, y=0, z=0}) + object:set_acceleration({x=0, y=0, z=0}) end end, object) @@ -212,7 +212,7 @@ function minetest.handle_node_drops(pos, drops, digger) -- This means there is no digger. This is a special case which allows this function to be called -- by hand. Creative Mode is intentionally ignored in this case. - local doTileDrops = minetest.settings:get_bool("mcl_doTileDrops") or true + local doTileDrops = minetest.settings:get_bool("mcl_doTileDrops", true) if (digger ~= nil and minetest.settings:get_bool("creative_mode")) or doTileDrops == false then return end @@ -245,16 +245,16 @@ function minetest.handle_node_drops(pos, drops, digger) end for _,item in ipairs(drops) do - local count, name + local count if type(item) == "string" then - count = 1 - name = item + count = ItemStack(item):get_count() else count = item:get_count() - name = item:get_name() end + local drop_item = ItemStack(item) + drop_item:set_count(1) for i=1,count do - local obj = core.add_item(pos, name) + local obj = core.add_item(pos, drop_item) if obj ~= nil then local x = math.random(1, 5) if math.random(1,2) == 1 then @@ -264,7 +264,7 @@ function minetest.handle_node_drops(pos, drops, digger) if math.random(1,2) == 1 then z = -z end - obj:setvelocity({x=1/x, y=obj:getvelocity().y, z=1/z}) + obj:set_velocity({x=1/x, y=obj:get_velocity().y, z=1/z}) end end end @@ -285,7 +285,7 @@ function minetest.item_drop(itemstack, dropper, pos) v.x = v.x*4 v.y = v.y*4 + 2 v.z = v.z*4 - obj:setvelocity(v) + obj:set_velocity(v) -- Force collection delay obj:get_luaentity()._insta_collect = false return itemstack @@ -306,6 +306,7 @@ core.register_entity(":__builtin:item", { physical = true, collide_with_objects = false, collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.3, 0.3}, + pointable = false, visual = "wielditem", visual_size = {x = 0.4, y = 0.4}, textures = {""}, @@ -373,7 +374,7 @@ core.register_entity(":__builtin:item", { if not self or not self.object or not self.object:get_luaentity() then return end - local vel = self.object:getvelocity() + local vel = self.object:get_velocity() if vel and vel.x == 0 and vel.z == 0 then local x = math.random(1, 5) if math.random(1,2) == 1 then @@ -384,7 +385,7 @@ core.register_entity(":__builtin:item", { z = -z end local y = math.random(2,4) - self.object:setvelocity({x=1/x, y=y, z=1/z}) + self.object:set_velocity({x=1/x, y=y, z=1/z}) end end, self) end @@ -444,8 +445,8 @@ core.register_entity(":__builtin:item", { self._forcetimer = 0 self.object:set_armor_groups({immortal = 1}) - self.object:setvelocity({x = 0, y = 2, z = 0}) - self.object:setacceleration({x = 0, y = -get_gravity(), z = 0}) + self.object:set_velocity({x = 0, y = 2, z = 0}) + self.object:set_acceleration({x = 0, y = -get_gravity(), z = 0}) self:set_item(self.itemstring) end, @@ -542,8 +543,8 @@ core.register_entity(":__builtin:item", { -- Push item out when stuck inside solid opaque node if def and def.walkable and def.groups and def.groups.opaque == 1 then local shootdir - local cx = p.x % 1 - local cz = p.z % 1 + local cx = (p.x % 1) - 0.5 + local cz = (p.z % 1) - 0.5 local order = {} -- First prepare the order in which the 4 sides are to be checked. @@ -551,7 +552,7 @@ core.register_entity(":__builtin:item", { -- 2nd: other direction -- 3rd and 4th: other axis local cxcz = function(o, cw, one, zero) - if cw > 0 then + if cw < 0 then table.insert(o, { [one]=1, y=0, [zero]=0 }) table.insert(o, { [one]=-1, y=0, [zero]=0 }) else @@ -560,7 +561,7 @@ core.register_entity(":__builtin:item", { end return o end - if math.abs(cx) > math.abs(cz) then + if math.abs(cx) < math.abs(cz) then order = cxcz(order, cx, "x", "z") order = cxcz(order, cz, "z", "x") else @@ -589,8 +590,8 @@ core.register_entity(":__builtin:item", { -- Set new item moving speed accordingly local newv = vector.multiply(shootdir, 3) - self.object:setacceleration({x = 0, y = 0, z = 0}) - self.object:setvelocity(newv) + self.object:set_acceleration({x = 0, y = 0, z = 0}) + self.object:set_velocity(newv) disable_physics(self.object, self, false, false) @@ -643,8 +644,8 @@ core.register_entity(":__builtin:item", { local f = 1.39 -- Set new item moving speed into the direciton of the liquid local newv = vector.multiply(vec, f) - self.object:setacceleration({x = 0, y = 0, z = 0}) - self.object:setvelocity({x = newv.x, y = -0.22, z = newv.z}) + self.object:set_acceleration({x = 0, y = 0, z = 0}) + self.object:set_velocity({x = newv.x, y = -0.22, z = newv.z}) self.physical_state = true self._flowing = true @@ -662,7 +663,7 @@ core.register_entity(":__builtin:item", { -- If node is not registered or node is walkably solid and resting on nodebox local nn = minetest.get_node({x=p.x, y=p.y-0.5, z=p.z}).name - local v = self.object:getvelocity() + local v = self.object:get_velocity() if not core.registered_nodes[nn] or core.registered_nodes[nn].walkable and v.y == 0 then if self.physical_state then diff --git a/mods/ENTITIES/mcl_minecarts/init.lua b/mods/ENTITIES/mcl_minecarts/init.lua index 6454c3ed9..2f9d67302 100644 --- a/mods/ENTITIES/mcl_minecarts/init.lua +++ b/mods/ENTITIES/mcl_minecarts/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_minecarts") + mcl_minecarts = {} mcl_minecarts.modpath = minetest.get_modpath("mcl_minecarts") mcl_minecarts.speed_max = 10 @@ -61,7 +63,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) if puncher:get_player_control().sneak then if self._driver then if self._old_pos then - self.object:setpos(self._old_pos) + self.object:set_pos(self._old_pos) end mcl_player.player_attached[self._driver] = nil local player = minetest.get_player_by_name(self._driver) @@ -98,7 +100,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) return end - local vel = self.object:getvelocity() + local vel = self.object:get_velocity() if puncher:get_player_name() == self._driver then if math.abs(vel.x + vel.z) > 7 then return @@ -121,7 +123,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) end function cart:on_step(dtime) - local vel = self.object:getvelocity() + local vel = self.object:get_velocity() local update = {} if self._last_float_check == nil then self._last_float_check = 0 @@ -139,7 +141,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) -- Detach driver if self._driver then if self._old_pos then - self.object:setpos(self._old_pos) + self.object:set_pos(self._old_pos) end mcl_player.player_attached[self._driver] = nil local player = minetest.get_player_by_name(self._driver) @@ -164,7 +166,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) if self._punched then vel = vector.add(vel, self._velocity) - self.object:setvelocity(vel) + self.object:set_velocity(vel) self._old_dir.y = 0 elseif vector.equals(vel, {x=0, y=0, z=0}) then return @@ -217,8 +219,8 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) (self._old_vel.x * vel.x < 0 or self._old_vel.z * vel.z < 0) then self._old_vel = {x = 0, y = 0, z = 0} self._old_pos = pos - self.object:setvelocity(vector.new()) - self.object:setacceleration(vector.new()) + self.object:set_velocity(vector.new()) + self.object:set_acceleration(vector.new()) return end self._old_vel = vector.new(vel) @@ -292,7 +294,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) new_acc = vector.multiply(dir, acc) end - self.object:setacceleration(new_acc) + self.object:set_acceleration(new_acc) self._old_pos = vector.new(pos) self._old_dir = vector.new(dir) self._old_switch = last_switch @@ -321,7 +323,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) elseif dir.z < 0 then yaw = 1 end - self.object:setyaw(yaw * math.pi) + self.object:set_yaw(yaw * math.pi) end if self._punched then @@ -341,9 +343,9 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) end self.object:set_animation(anim, 1, 0) - self.object:setvelocity(vel) + self.object:set_velocity(vel) if update.pos then - self.object:setpos(pos) + self.object:set_pos(pos) end update = nil end @@ -387,7 +389,7 @@ mcl_minecarts.place_minecart = function(itemstack, pointed_thing) le._railtype = railtype end local cart_dir = mcl_minecarts:get_rail_direction(railpos, {x=1, y=0, z=0}, nil, nil, railtype) - cart:setyaw(minetest.dir_to_yaw(cart_dir)) + cart:set_yaw(minetest.dir_to_yaw(cart_dir)) if not minetest.settings:get_bool("creative_mode") then itemstack:take_item() @@ -470,11 +472,11 @@ end register_minecart( "mcl_minecarts:minecart", "mcl_minecarts:minecart", - "Minecart", - "Minecarts can be used for a quick transportion on rails." .. "\n" .. - "Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.", - "You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving." .. "\n" .. - "To obtain the minecart, punch it while holding down the sneak key.", + S("Minecart"), + S("Minecarts can be used for a quick transportion on rails.") .. "\n" .. + S("Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type."), + S("You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.") .. "\n" .. + S("To obtain the minecart, punch it while holding down the sneak key."), "mcl_minecarts_minecart.b3d", {"mcl_minecarts_minecart.png"}, "mcl_minecarts_minecart_normal.png", @@ -490,11 +492,12 @@ register_minecart( self._start_pos = nil clicker:set_detach() clicker:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0}) + mcl_player.player_set_animation(clicker, "stand" , 30) elseif not self._driver then self._driver = player_name self._start_pos = self.object:get_pos() mcl_player.player_attached[player_name] = true - clicker:set_attach(self.object, "", {x=0, y=8.25, z=-2}, {x=0, y=0, z=0}) + clicker:set_attach(self.object, "", {x=0, y=-1.75, z=-2}, {x=0, y=0, z=0}) mcl_player.player_attached[name] = true minetest.after(0.2, function(name) local player = minetest.get_player_by_name(name) @@ -511,7 +514,7 @@ register_minecart( register_minecart( "mcl_minecarts:chest_minecart", "mcl_minecarts:chest_minecart", - "Minecart with Chest", + S("Minecart with Chest"), nil, nil, "mcl_minecarts_minecart_chest.b3d", { "mcl_chests_normal.png", "mcl_minecarts_minecart.png" }, @@ -523,7 +526,7 @@ register_minecart( register_minecart( "mcl_minecarts:furnace_minecart", "mcl_minecarts:furnace_minecart", - "Minecart with Furnace", + S("Minecart with Furnace"), nil, nil, "mcl_minecarts_minecart_block.b3d", { @@ -566,7 +569,7 @@ register_minecart( register_minecart( "mcl_minecarts:command_block_minecart", "mcl_minecarts:command_block_minecart", - "Minecart with Command Block", + S("Minecart with Command Block"), nil, nil, "mcl_minecarts_minecart_block.b3d", { @@ -587,7 +590,7 @@ register_minecart( register_minecart( "mcl_minecarts:hopper_minecart", "mcl_minecarts:hopper_minecart", - "Minecart with Hopper", + S("Minecart with Hopper"), nil, nil, "mcl_minecarts_minecart_hopper.b3d", { @@ -605,7 +608,7 @@ register_minecart( register_minecart( "mcl_minecarts:tnt_minecart", "mcl_minecarts:tnt_minecart", - "Minecart with TNT", + S("Minecart with TNT"), nil, nil, "mcl_minecarts_minecart_block.b3d", { diff --git a/mods/ENTITIES/mcl_minecarts/locale/mcl_minecarts.de.tr b/mods/ENTITIES/mcl_minecarts/locale/mcl_minecarts.de.tr new file mode 100644 index 000000000..65df678e8 --- /dev/null +++ b/mods/ENTITIES/mcl_minecarts/locale/mcl_minecarts.de.tr @@ -0,0 +1,23 @@ +# textdomain: mcl_minecarts +Minecart=Lore +Minecarts can be used for a quick transportion on rails.=Loren können für eine schnelle Fahrt auf Schienen benutzt werden. +Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.=Loren fahren nur auf Schienen und bleiben immer auf der Strecke. An einer Einmündung ohne einem Weg nach vorne fahren sie nach links. Die Geschwindigkeit hängt vom Schienentyp ab. +You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Sie können die Lore auf Schienen platzieren. Rechtsklicken, um einzusteigen. +To obtain the minecart, punch it while holding down the sneak key.=Um die Lore aufzusammeln, schlagen Sie sie, während Sie die Schleichen-Taste gedrückt halten. +Minecart with Chest=Lore mit Truhe +Minecart with Furnace=Lore mit Ofen +Minecart with Command Block=Lore mit Befehlsblock +Minecart with Hopper=Lore mit Trichter +Minecart with TNT=Lore mit TNT +Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=Bauen Sie sie auf den Boden, um Ihr Schienennetzwerk zu errichten, die Schienen werden sich automatisch verbinden und sich nach Bedarf in Kurven, Einmündungen, Kreuzungen und Steigungen verwandeln. +Rail=Schiene +Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Schienen können benutzt werden, um Strecken für Loren zu bauen. Normale Schienen werden Loren aufgrund von Reibung leicht verlangsamen. +Powered Rail=Antriebsschiene +Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Schienen können benutzt werden, um Strecken für Loren zu bauen. Antriebsschienen können Loren beschleunigen und abbremsen. +Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Ohne Redstone-Energie wird die Schiene Loren abbremsen. Mit Redstone-Energie wird sie sie beschleunigen. +Activator Rail=Aktivierungsschiene +Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=Schienen können benutzt werden, um Strecken für Loren zu bauen. Aktivierungsschienen werden benutzt, um besondere Loren zu aktivieren. +To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=Wenn diese Schiene mit Redstone-Energie versorgt wird, werden alle Loren, die sie passieren, aktiviert. +Detector Rail=Sensorschiene +Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=Schienen können benutzt werden, um Strecken für Loren zu bauen. Eine Sensorschiene kann eine Lore erkennen und versorgt Redstone-Mechanismen. +To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=Um eine Lore zu erkennen und die Redstone-Energie zu aktivieren, verbinden Sie die Schiene mit Redstonestaub oder Redstone-Mechanismen und schicken Sie eine beliebige Lore über die Schiene. diff --git a/mods/ENTITIES/mcl_minecarts/locale/template.txt b/mods/ENTITIES/mcl_minecarts/locale/template.txt new file mode 100644 index 000000000..74bd547b3 --- /dev/null +++ b/mods/ENTITIES/mcl_minecarts/locale/template.txt @@ -0,0 +1,23 @@ +# textdomain: mcl_minecarts +Minecart= +Minecarts can be used for a quick transportion on rails.= +Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.= +You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.= +To obtain the minecart, punch it while holding down the sneak key.= +Minecart with Chest= +Minecart with Furnace= +Minecart with Command Block= +Minecart with Hopper= +Minecart with TNT= +Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.= +Rail= +Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.= +Powered Rail= +Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.= +Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.= +Activator Rail= +Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.= +To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.= +Detector Rail= +Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.= +To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.= diff --git a/mods/ENTITIES/mcl_minecarts/rails.lua b/mods/ENTITIES/mcl_minecarts/rails.lua index 04f420f8d..cf1ebacf1 100644 --- a/mods/ENTITIES/mcl_minecarts/rails.lua +++ b/mods/ENTITIES/mcl_minecarts/rails.lua @@ -1,6 +1,8 @@ +local S = minetest.get_translator("mcl_minecarts") + -- Template rail function local register_rail = function(itemstring, tiles, def_extras, creative) - local groups = {handy=1,pickaxey=1, attached_node=1,rail=1,connect_to_raillike=1,dig_by_water=1,destroy_by_lava_flow=1, transport=1} + local groups = {handy=1,pickaxey=1, attached_node=1,rail=1,connect_to_raillike=minetest.raillike_group("rail"),dig_by_water=1,destroy_by_lava_flow=1, transport=1} if creative == false then groups.not_in_creative_inventory = 1 end @@ -64,14 +66,14 @@ local rail_rules_long = local rail_rules_short = mesecon.rules.pplate -local railuse = "Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed." +local railuse = S("Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.") -- Normal rail register_rail("mcl_minecarts:rail", {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"}, { - description = "Rail", - _doc_items_longdesc = "Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.", + description = S("Rail"), + _doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction."), _doc_items_usagehelp = railuse, } ) @@ -80,9 +82,9 @@ register_rail("mcl_minecarts:rail", register_rail("mcl_minecarts:golden_rail", {"mcl_minecarts_rail_golden.png", "mcl_minecarts_rail_golden_curved.png", "mcl_minecarts_rail_golden_t_junction.png", "mcl_minecarts_rail_golden_crossing.png"}, { - description = "Powered Rail", - _doc_items_longdesc = "Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.", - _doc_items_usagehelp = railuse .. "\n" .. "Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.", + description = S("Powered Rail"), + _doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts."), + _doc_items_usagehelp = railuse .. "\n" .. S("Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power."), _rail_acceleration = -3, mesecons = { conductor = { @@ -118,9 +120,9 @@ register_rail("mcl_minecarts:golden_rail_on", register_rail("mcl_minecarts:activator_rail", {"mcl_minecarts_rail_activator.png", "mcl_minecarts_rail_activator_curved.png", "mcl_minecarts_rail_activator_t_junction.png", "mcl_minecarts_rail_activator_crossing.png"}, { - description = "Activator Rail", - _doc_items_longdesc = "Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.", - _doc_items_usagehelp = railuse .. "\n" .. "To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.", + description = S("Activator Rail"), + _doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts."), + _doc_items_usagehelp = railuse .. "\n" .. S("To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail."), mesecons = { conductor = { state = mesecon.state.off, @@ -157,9 +159,9 @@ register_rail("mcl_minecarts:activator_rail_on", register_rail("mcl_minecarts:detector_rail", {"mcl_minecarts_rail_detector.png", "mcl_minecarts_rail_detector_curved.png", "mcl_minecarts_rail_detector_t_junction.png", "mcl_minecarts_rail_detector_crossing.png"}, { - description = "Detector Rail", - _doc_items_longdesc = "Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.", - _doc_items_usagehelp = railuse .. "\n" .. "To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.", + description = S("Detector Rail"), + _doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms."), + _doc_items_usagehelp = railuse .. "\n" .. S("To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail."), mesecons = { receptor = { state = mesecon.state.off, diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 30b8a582f..fb823270a 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -7,11 +7,9 @@ mobs.version = "20180531" -- don't rely too much on this, rarely updated, if eve local MAX_MOB_NAME_LENGTH = 30 --- Intllib +-- Localize local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP .. "/intllib.lua") -mobs.intllib = S - +local S = minetest.get_translator("mcl_mobs") -- CMI support check local use_cmi = minetest.global_exists("cmi") @@ -33,7 +31,6 @@ end -- localize math functions local pi = math.pi -local square = math.sqrt local sin = math.sin local cos = math.cos local abs = math.abs @@ -71,7 +68,7 @@ local mobs_spawn_chance = tonumber(minetest.settings:get("mobs_spawn_chance") or if peaceful_only then minetest.register_on_joinplayer(function(player) minetest.chat_send_player(player:get_player_name(), - S("** Peaceful Mode Active - No Monsters Will Spawn")) + S("Peaceful mode active! No monsters will spawn.")) end) end @@ -96,18 +93,45 @@ mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dir local mod_weather = minetest.get_modpath("mcl_weather") ~= nil local mod_tnt = minetest.get_modpath("mcl_tnt") ~= nil local mod_mobspawners = minetest.get_modpath("mcl_mobspawners") ~= nil +local mod_hunger = minetest.get_modpath("mcl_hunger") ~= nil -- play sound -local mob_sound = function(self, sound, is_opinion) +local mob_sound = function(self, soundname, is_opinion, fixed_pitch) + local soundinfo + if self.sounds_child and self.child then + soundinfo = self.sounds_child + elseif self.sounds then + soundinfo = self.sounds + end + if not soundinfo then + return + end + local sound = soundinfo[soundname] if sound then if is_opinion and self.opinion_sound_cooloff > 0 then return end + local pitch + if not fixed_pitch then + local base_pitch = soundinfo.base_pitch + if not base_pitch then + base_pitch = 1 + end + if self.child and (not self.sounds_child) then + -- Children have higher pitch + pitch = base_pitch * 1.5 + else + pitch = base_pitch + end + -- randomize the pitch a bit + pitch = pitch + math.random(-10, 10) * 0.005 + end minetest.sound_play(sound, { object = self.object, gain = 1.0, - max_hear_distance = self.sounds.distance + max_hear_distance = self.sounds.distance, + pitch = pitch, }) self.opinion_sound_cooloff = 1 end @@ -126,7 +150,7 @@ local do_attack = function(self, player) -- TODO: Implement war_cry sound without being annoying --if random(0, 100) < 90 then - --mob_sound(self, self.sounds.war_cry, true) + --mob_sound(self, "war_cry", true) --end end @@ -136,15 +160,15 @@ local set_velocity = function(self, v) -- do not move if mob has been ordered to stay if self.order == "stand" then - self.object:setvelocity({x = 0, y = 0, z = 0}) + self.object:set_velocity({x = 0, y = 0, z = 0}) return end local yaw = (self.object:get_yaw() or 0) + self.rotate - self.object:setvelocity({ + self.object:set_velocity({ x = sin(yaw) * -v, - y = self.object:getvelocity().y, + y = self.object:get_velocity().y, z = cos(yaw) * v }) end @@ -153,7 +177,7 @@ end -- calculate mob velocity local get_velocity = function(self) - local v = self.object:getvelocity() + local v = self.object:get_velocity() return (v.x * v.x + v.z * v.z) ^ 0.5 end @@ -184,6 +208,36 @@ function mobs:yaw(self, yaw, delay) set_yaw(self, yaw, delay) end +local add_texture_mod = function(self, mod) + local full_mod = "" + local already_added = false + for i=1, #self.texture_mods do + if mod == self.texture_mods[i] then + already_added = true + end + full_mod = full_mod .. self.texture_mods[i] + end + if not already_added then + full_mod = full_mod .. mod + table.insert(self.texture_mods, mod) + end + self.object:set_texture_mod(full_mod) +end +local remove_texture_mod = function(self, mod) + local full_mod = "" + local remove = {} + for i=1, #self.texture_mods do + if self.texture_mods[i] ~= mod then + full_mod = full_mod .. self.texture_mods[i] + else + table.insert(remove, i) + end + end + for i=#remove, 1 do + table.remove(self.texture_mods, remove[i]) + end + self.object:set_texture_mod(full_mod) +end -- set defined animation local set_animation = function(self, anim) @@ -215,15 +269,6 @@ function mobs:set_animation(self, anim) end --- calculate distance -local get_distance = function(a, b) - - local x, y, z = a.x - b.x, a.y - b.y, a.z - b.z - - return square(x * x + y * y + z * z) -end - - -- check line of sight (BrunoMine) local line_of_sight = function(self, pos1, pos2, stepsize) @@ -248,7 +293,7 @@ local line_of_sight = function(self, pos1, pos2, stepsize) local nn = minetest.get_node(pos).name -- Target Distance (td) to travel - local td = get_distance(pos1, pos2) + local td = vector.distance(pos1, pos2) -- Actual Distance (ad) traveled local ad = 0 @@ -264,7 +309,7 @@ local line_of_sight = function(self, pos1, pos2, stepsize) end -- Moves the analyzed pos - local d = get_distance(pos1, pos2) + local d = vector.distance(pos1, pos2) npos1.x = ((pos2.x - pos1.x) / d * stepsize) + pos1.x npos1.y = ((pos2.y - pos1.y) / d * stepsize) + pos1.y @@ -330,20 +375,28 @@ end -- custom particle effects -local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow) +local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow, go_down) radius = radius or 2 min_size = min_size or 0.5 max_size = max_size or 1 gravity = gravity or -10 glow = glow or 0 + go_down = go_down or false + + local ym + if go_down then + ym = 0 + else + ym = -radius + end minetest.add_particlespawner({ amount = amount, time = 0.25, minpos = pos, maxpos = pos, - minvel = {x = -radius, y = -radius, z = -radius}, + minvel = {x = -radius, y = ym, z = -radius}, maxvel = {x = radius, y = radius, z = radius}, minacc = {x = 0, y = gravity, z = 0}, maxacc = {x = 0, y = gravity, z = 0}, @@ -356,6 +409,29 @@ local effect = function(pos, amount, texture, min_size, max_size, radius, gravit }) end +local damage_effect = function(self, damage) + -- damage particles + if (not disable_blood) and damage > 0 then + + local amount_large = math.floor(damage / 2) + local amount_small = damage % 2 + + local pos = self.object:get_pos() + + pos.y = pos.y + (self.collisionbox[5] - self.collisionbox[2]) * .5 + + local texture = "mobs_blood.png" + -- full heart damage (one particle for each 2 HP damage) + if amount_large > 0 then + effect(pos, amount_large, texture, 2, 2, 1.75, 0, nil, true) + end + -- half heart damage (one additional particle if damage is an odd number) + if amount_small > 0 then + -- TODO: Use "half heart" + effect(pos, amount_small, texture, 1, 1, 1.75, 0, nil, true) + end + end +end local update_tag = function(self) self.object:set_properties({ @@ -371,8 +447,10 @@ local item_drop = function(self, cooked) -- no drops if disabled by setting if not mobs_drop_items then return end - -- no drops for child mobs - if self.child then return end + -- no drops for child mobs (except monster) + if (self.child and self.type ~= "monster") then + return + end local obj, item, num local pos = self.object:get_pos() @@ -402,7 +480,7 @@ local item_drop = function(self, cooked) if obj and obj:get_luaentity() then - obj:setvelocity({ + obj:set_velocity({ x = random(-10, 10) / 9, y = 6, z = random(-10, 10) / 9, @@ -436,9 +514,15 @@ local check_for_death = function(self, cause, cmi_cause) self.health = self.hp_max end - -- play damage sound if health was reduced + -- play damage sound if health was reduced and make mob flash red. if damaged then - mob_sound(self, self.sounds.damage) + add_texture_mod(self, "^[colorize:#FF000040") + minetest.after(.2, function(self) + if self and self.object then + remove_texture_mod(self, "^[colorize:#FF000040") + end + end, self) + mob_sound(self, "damage") end -- backup nametag so we can show health stats @@ -465,7 +549,7 @@ local check_for_death = function(self, cause, cmi_cause) item_drop(self, nil) end - mob_sound(self, self.sounds.death) + mob_sound(self, "death") local pos = self.object:get_pos() @@ -641,7 +725,7 @@ local do_env_damage = function(self) -- don't fall when on ignore, just stand still if self.standing_in == "ignore" then - self.object:setvelocity({x = 0, y = 0, z = 0}) + self.object:set_velocity({x = 0, y = 0, z = 0}) end local nodef = minetest.registered_nodes[self.standing_in] @@ -659,7 +743,7 @@ local do_env_damage = function(self) pos.y = pos.y + 1 -- for particle effect position - -- water + -- water damage if self.water_damage and nodef.groups.water then @@ -667,17 +751,15 @@ local do_env_damage = function(self) self.health = self.health - self.water_damage - effect(pos, 5, "bubble.png", nil, nil, 1, nil) + effect(pos, 5, "tnt_smoke.png", nil, nil, 1, nil) if check_for_death(self, "water", {type = "environment", pos = pos, node = self.standing_in}) then return end end - -- lava or fire + -- lava damage elseif self.lava_damage - and (nodef.groups.lava - or self.standing_in == node_fire - or self.standing_in == node_permanent_flame) then + and (nodef.groups.lava) then if self.lava_damage ~= 0 then @@ -689,6 +771,20 @@ local do_env_damage = function(self) pos = pos, node = self.standing_in}) then return end end + -- fire damage + elseif self.fire_damage + and (nodef.groups.fire) then + + if self.fire_damage ~= 0 then + + self.health = self.health - self.fire_damage + + effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil) + + if check_for_death(self, "fire", {type = "environment", + pos = pos, node = self.standing_in}) then return end + end + -- damage_per_second node check elseif nodef.damage_per_second ~= 0 then @@ -700,6 +796,38 @@ local do_env_damage = function(self) pos = pos, node = self.standing_in}) then return end end + -- Drowning damage + if self.breath_max ~= -1 then + local drowning = false + if self.breathes_in_water then + if minetest.get_item_group(self.standing_in, "water") == 0 then + drowning = true + end + elseif nodef.drowning > 0 then + drowning = true + end + if drowning then + + self.breath = math.max(0, self.breath - 1) + + effect(pos, 2, "bubble.png", nil, nil, 1, nil) + if self.breath <= 0 then + local dmg + if nodef.drowning > 0 then + dmg = nodef.drowning + else + dmg = 4 + end + damage_effect(self, dmg) + self.health = self.health - dmg + end + if check_for_death(self, "drowning", {type = "environment", + pos = pos, node = self.standing_in}) then return end + else + self.breath = math.min(self.breath_max, self.breath + 1) + end + end + --- suffocation inside solid node -- FIXME: Redundant with mcl_playerplus if (self.suffocation == true) @@ -727,7 +855,7 @@ local do_jump = function(self) if not self.jump or self.jump_height == 0 or self.fly - or self.child + or (self.child and self.type ~= "monster") or self.order == "stand" then return false end @@ -737,7 +865,7 @@ local do_jump = function(self) -- something stopping us while moving? if self.state ~= "stand" and get_velocity(self) > 0.5 - and self.object:getvelocity().y ~= 0 then + and self.object:get_velocity().y ~= 0 then return false end @@ -764,6 +892,19 @@ local do_jump = function(self) z = pos.z + dir_z }) + -- this is used to detect if there's a block on top of the block in front of the mob. + -- If there is, there is no point in jumping as we won't manage. + local nodTop = node_ok({ + x = pos.x + dir_x, + y = pos.y + 1.5, + z = pos.z + dir_z + }, "air") + + -- we don't attempt to jump if there's a stack of blocks blocking + if minetest.registered_nodes[nodTop.name] == true then + return false + end + -- thin blocks that do not need to be jumped if nod.name == node_snow then return false @@ -773,19 +914,20 @@ local do_jump = function(self) or minetest.registered_items[nod.name].walkable then if not nod.name:find("fence") - and not nod.name:find("gate") then + and not nod.name:find("fence_gate") + and not nod.name:find("wall") then - local v = self.object:getvelocity() + local v = self.object:get_velocity() v.y = self.jump_height set_animation(self, "jump") -- only when defined - self.object:setvelocity(v) + self.object:set_velocity(v) -- when in air move forward minetest.after(0.3, function(self, v) - if not self.object:get_luaentity() then + if not self.object or not self.object:get_luaentity() then return end self.object:set_acceleration({ @@ -795,11 +937,9 @@ local do_jump = function(self) }) end, self, v) - if get_velocity(self) > 0 then - if self.jump_sound_cooloff <= 0 then - mob_sound(self, self.sounds.jump) - self.jump_sound_cooloff = 0.5 - end + if self.jump_sound_cooloff <= 0 then + mob_sound(self, "jump") + self.jump_sound_cooloff = 0.5 end else self.facing_fence = true @@ -840,7 +980,7 @@ local entity_physics = function(pos, radius) obj_pos = objs[n]:get_pos() - dist = get_distance(pos, obj_pos) + dist = vector.distance(pos, obj_pos) if dist < 1 then dist = 1 end local damage = floor((4 / dist) * radius) @@ -911,7 +1051,7 @@ local breed = function(self) self.on_grown(self) else -- jump when fully grown so as not to fall into ground - self.object:setvelocity({ + self.object:set_velocity({ x = 0, y = self.jump_height, z = 0 @@ -1036,11 +1176,10 @@ end -- find and replace what mob is looking for (grass, wheat etc.) local replace = function(self, pos) - if not mobs_griefing - or not self.replace_rate + if not self.replace_rate or not self.replace_what or self.child == true - or self.object:getvelocity().y ~= 0 + or self.object:get_velocity().y ~= 0 or random(1, self.replace_rate) > 1 then return end @@ -1074,13 +1213,10 @@ local replace = function(self, pos) if on_replace_return ~= false then - minetest.set_node(pos, {name = with}) - - -- when cow/sheep eats grass, replace wool and milk - if self.gotten == true then - self.gotten = false - self.object:set_properties(self) + if mobs_griefing then + minetest.set_node(pos, {name = with}) end + end end end @@ -1266,7 +1402,7 @@ local smart_mobs = function(self, s, p, dist, dtime) end s.y = s.y - sheight - self.object:setpos({x = s.x, y = s.y + 2, z = s.z}) + self.object:set_pos({x = s.x, y = s.y + 2, z = s.z}) else -- dig 2 blocks to make door toward player direction @@ -1317,7 +1453,7 @@ local smart_mobs = function(self, s, p, dist, dtime) else -- yay i found path -- TODO: Implement war_cry sound without being annoying - --mob_sound(self, self.sounds.war_cry, true) + --mob_sound(self, "war_cry", true) set_velocity(self, self.walk_velocity) -- follow path now that it has it @@ -1395,7 +1531,7 @@ local monster_attack = function(self) p = player:get_pos() sp = s - dist = get_distance(p, s) + dist = vector.distance(p, s) -- aim higher to make looking up hills more realistic p.y = p.y + 1 @@ -1441,7 +1577,7 @@ local npc_attack = function(self) p = obj.object:get_pos() sp = s - local dist = get_distance(p, s) + local dist = vector.distance(p, s) -- aim higher to make looking up hills more realistic p.y = p.y + 1 @@ -1529,7 +1665,7 @@ local runaway_from = function(self) p.y = p.y + 1 sp.y = sp.y + 1 - dist = get_distance(p, s) + dist = vector.distance(p, s) -- choose closest player/mpb to runaway from @@ -1579,7 +1715,7 @@ local follow_flop = function(self) for n = 1, #players do - if get_distance(players[n]:get_pos(), s) < self.view_range + if vector.distance(players[n]:get_pos(), s) < self.view_range and not mobs.invis[ players[n]:get_player_name() ] then self.following = players[n] @@ -1627,7 +1763,7 @@ local follow_flop = function(self) if p then - local dist = get_distance(p, s) + local dist = vector.distance(p, s) -- dont follow if out of range if dist > self.view_range then @@ -1669,7 +1805,7 @@ local follow_flop = function(self) if not flight_check(self, s) then self.state = "flop" - self.object:setvelocity({x = 0, y = -5, z = 0}) + self.object:set_velocity({x = 0, y = -5, z = 0}) set_animation(self, "stand") @@ -1886,7 +2022,7 @@ local do_states = function(self, dtime) -- calculate distance from mob and enemy local s = self.object:get_pos() local p = self.attack:get_pos() or s - local dist = get_distance(p, s) + local dist = vector.distance(p, s) -- stop attacking if player invisible or out of range if dist > self.view_range @@ -1932,7 +2068,7 @@ local do_states = function(self, dtime) self.v_start = true self.timer = 0 self.blinktimer = 0 - mob_sound(self, self.sounds.fuse) + mob_sound(self, "fuse", nil, false) -- stop timer if out of reach or direct line of sight elseif self.allow_fuse_reset @@ -1943,7 +2079,7 @@ local do_states = function(self, dtime) self.timer = 0 self.blinktimer = 0 self.blinkstatus = false - self.object:settexturemod("") + remove_texture_mod(self, "^[brighten") end -- walk right up to player unless the timer is active @@ -1969,9 +2105,9 @@ local do_states = function(self, dtime) self.blinktimer = 0 if self.blinkstatus then - self.object:settexturemod("") + remove_texture_mod(self, "^[brighten") else - self.object:settexturemod("^[brighten") + add_texture_mod(self, "^[brighten") end self.blinkstatus = not self.blinkstatus @@ -2025,13 +2161,13 @@ local do_states = function(self, dtime) local me_y = floor(p1.y) local p2 = p local p_y = floor(p2.y + 1) - local v = self.object:getvelocity() + local v = self.object:get_velocity() if flight_check(self, s) then if me_y < p_y then - self.object:setvelocity({ + self.object:set_velocity({ x = v.x, y = 1 * self.walk_velocity, z = v.z @@ -2039,7 +2175,7 @@ local do_states = function(self, dtime) elseif me_y > p_y then - self.object:setvelocity({ + self.object:set_velocity({ x = v.x, y = -1 * self.walk_velocity, z = v.z @@ -2048,7 +2184,7 @@ local do_states = function(self, dtime) else if me_y < p_y then - self.object:setvelocity({ + self.object:set_velocity({ x = v.x, y = 0.01, z = v.z @@ -2056,7 +2192,7 @@ local do_states = function(self, dtime) elseif me_y > p_y then - self.object:setvelocity({ + self.object:set_velocity({ x = v.x, y = -0.01, z = v.z @@ -2164,7 +2300,7 @@ local do_states = function(self, dtime) if line_of_sight(self, p2, s2) == true then -- play attack sound - mob_sound(self, self.sounds.attack) + mob_sound(self, "attack") -- punch player (or what player is attached to) local attached = self.attack:get_attach() @@ -2195,7 +2331,7 @@ local do_states = function(self, dtime) p.y = p.y - .5 s.y = s.y + .5 - local dist = get_distance(p, s) + local dist = vector.distance(p, s) local vec = { x = p.x - s.x, y = p.y - s.y, @@ -2218,29 +2354,39 @@ local do_states = function(self, dtime) set_animation(self, "shoot") -- play shoot attack sound - mob_sound(self, self.sounds.shoot_attack) + mob_sound(self, "shoot_attack") local p = self.object:get_pos() p.y = p.y + (self.collisionbox[2] + self.collisionbox[5]) / 2 + -- Shoot arrow if minetest.registered_entities[self.arrow] then - local obj = minetest.add_entity(p, self.arrow) - local ent = obj:get_luaentity() + local arrow, ent + local v = 1 + if not self.shoot_arrow then + arrow = minetest.add_entity(p, self.arrow) + ent = arrow:get_luaentity() + if ent.velocity then + v = ent.velocity + end + ent.switch = 1 + ent.owner_id = tostring(self.object) -- add unique owner id to arrow + end + local amount = (vec.x * vec.x + vec.y * vec.y + vec.z * vec.z) ^ 0.5 - local v = ent.velocity or 1 -- or set to default - - ent.switch = 1 - ent.owner_id = tostring(self.object) -- add unique owner id to arrow - - -- offset makes shoot aim accurate + -- offset makes shoot aim accurate vec.y = vec.y + self.shoot_offset vec.x = vec.x * (v / amount) vec.y = vec.y * (v / amount) vec.z = vec.z * (v / amount) - - obj:setvelocity(vec) + if self.shoot_arrow then + vec = vector.normalize(vec) + self:shoot_arrow(p, vec) + else + arrow:set_velocity(vec) + end end end end @@ -2256,12 +2402,12 @@ local falling = function(self, pos) end -- floating in water (or falling) - local v = self.object:getvelocity() + local v = self.object:get_velocity() if v.y > 0 then -- apply gravity when moving up - self.object:setacceleration({ + self.object:set_acceleration({ x = 0, y = -10, z = 0 @@ -2270,14 +2416,14 @@ local falling = function(self, pos) elseif v.y <= 0 and v.y > self.fall_speed then -- fall downwards at set speed - self.object:setacceleration({ + self.object:set_acceleration({ x = 0, y = self.fall_speed, z = 0 }) else -- stop accelerating once max fall speed hit - self.object:setacceleration({x = 0, y = 0, z = 0}) + self.object:set_acceleration({x = 0, y = 0, z = 0}) end -- in water then float up @@ -2285,7 +2431,7 @@ local falling = function(self, pos) if self.floats == 1 then - self.object:setacceleration({ + self.object:set_acceleration({ x = 0, y = -self.fall_speed / (max(1, v.y) ^ 2), z = 0 @@ -2295,7 +2441,7 @@ local falling = function(self, pos) -- fall damage onto solid ground if self.fall_damage == 1 - and self.object:getvelocity().y == 0 then + and self.object:get_velocity().y == 0 then local d = (self.old_y or 0) - self.object:get_pos().y @@ -2337,15 +2483,19 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) -- is mob protected? if self.protected and hitter:is_player() and minetest.is_protected(self.object:get_pos(), hitter:get_player_name()) then - minetest.chat_send_player(hitter:get_player_name(), S("Mob has been protected!")) return end - -- weapon wear + -- punch interval local weapon = hitter:get_wielded_item() local punch_interval = 1.4 + -- exhaust attacker + if mod_hunger and hitter:is_player() then + mcl_hunger.exhaust(hitter:get_player_name(), mcl_hunger.EXHAUST_ATTACK) + end + -- calculate mob damage local damage = 0 local armor = self.object:get_armor_groups() or {} @@ -2411,6 +2561,8 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) hitter:set_wielded_item(weapon) end + local die = false + -- only play hit sound and show blood effects if damage is 1 or over if damage >= 1 then @@ -2430,46 +2582,22 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) }) end - -- blood_particles - if self.blood_amount > 0 - and not disable_blood then - - local pos = self.object:get_pos() - - pos.y = pos.y + (-self.collisionbox[2] + self.collisionbox[5]) * .5 - - -- do we have a single blood texture or multiple? - if type(self.blood_texture) == "table" then - - local blood = self.blood_texture[random(1, #self.blood_texture)] - - effect(pos, self.blood_amount, blood, nil, nil, 1, nil) - else - effect(pos, self.blood_amount, self.blood_texture, nil, nil, 1, nil) - end - end + damage_effect(self, damage) -- do damage self.health = self.health - floor(damage) - -- exit here if dead, special item check - if weapon:get_name() == "mobs:pick_lava" then - if check_for_death(self, "lava", {type = "punch", - puncher = hitter}) then - return - end - else - if check_for_death(self, "hit", {type = "punch", - puncher = hitter}) then - return - end + -- skip future functions if dead, except alerting others + if check_for_death(self, "hit", {type = "punch", puncher = hitter}) then + die = true end -- knock back effect (only on full punch) - if self.knock_back + if not die + and self.knock_back and tflp >= punch_interval then - local v = self.object:getvelocity() + local v = self.object:get_velocity() local r = 1.4 - min(punch_interval, 1.4) local kb = r * 2.0 local up = 2 @@ -2490,7 +2618,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) kb = kb * 1.5 end - self.object:setvelocity({ + self.object:set_velocity({ x = dir.x * kb, y = up, z = dir.z * kb @@ -2501,7 +2629,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) end -- END if damage -- if skittish then run away - if self.runaway == true then + if not die and self.runaway == true then local lp = hitter:get_pos() local s = self.object:get_pos() @@ -2528,13 +2656,15 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) -- attack puncher and call other mobs for help if self.passive == false and self.state ~= "flop" - and self.child == false + and (self.child == false or self.type == "monster") and hitter:get_player_name() ~= self.owner and not mobs.invis[ name ] then - -- attack whoever punched mob - self.state = "" - do_attack(self, hitter) + if not die then + -- attack whoever punched mob + self.state = "" + do_attack(self, hitter) + end -- alert others to the attack local objs = minetest.get_objects_inside_radius(hitter:get_pos(), self.view_range) @@ -2546,12 +2676,20 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) if obj then - -- only alert members of same mob - if obj.group_attack == true + -- only alert members of same mob or friends + if obj.group_attack and obj.state ~= "attack" - and obj.owner ~= name - and obj.name == self.name then - do_attack(obj, hitter) + and obj.owner ~= name then + if obj.name == self.name then + do_attack(obj, hitter) + elseif type(obj.group_attack) == "table" then + for i=1, #obj.group_attack do + if obj.name == obj.group_attack[i] then + do_attack(obj, hitter) + break + end + end + end end -- have owned mobs attack player threat @@ -2706,6 +2844,9 @@ local mob_activate = function(self, staticdata, def, dtime) if self.health == 0 then self.health = random (self.hp_min, self.hp_max) end + if self.breath == nil then + self.breath = self.breath_max + end -- pathfinding init self.path = {} @@ -2729,6 +2870,8 @@ local mob_activate = function(self, staticdata, def, dtime) self.jump_sound_cooloff = 0 -- used to prevent jump sound from being played too often in short time self.opinion_sound_cooloff = 0 -- used to prevent sound spam of particular sound types + self.texture_mods = {} + -- check existing nametag if not self.nametag then self.nametag = def.nametag @@ -2884,7 +3027,7 @@ local mob_step = function(self, dtime) -- mob plays random sound at times if random(1, 100) == 1 then - mob_sound(self, self.sounds.random, true) + mob_sound(self, "random", true) end -- environmental damage timer (every 1 second) @@ -2980,6 +3123,15 @@ if def.can_despawn ~= nil then else can_despawn = true end + +local function scale_difficulty(value, default, min, special) + if (not value) or (value == default) or (value == special) then + return default + else + return max(min, value * difficulty) + end +end + minetest.register_entity(name, { stepheight = def.stepheight or 1.1, -- was 0.6 @@ -2997,8 +3149,10 @@ minetest.register_entity(name, { drawtype = def.drawtype, -- DEPRECATED, use rotate instead rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2 lifetimer = def.lifetimer or 57.73, - hp_min = max(1, (def.hp_min or 5) * difficulty), - hp_max = max(1, (def.hp_max or 10) * difficulty), + hp_min = scale_difficulty(def.hp_min, 5, 1), + hp_max = scale_difficulty(def.hp_max, 10, 1), + breath_max = def.breath_max or 15, + breathes_in_water = def.breathes_in_water or false, physical = true, collisionbox = def.collisionbox or {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}, selectionbox = def.selectionbox or def.collisionbox, @@ -3006,14 +3160,15 @@ minetest.register_entity(name, { visual_size = def.visual_size or {x = 1, y = 1}, mesh = def.mesh, makes_footstep_sound = def.makes_footstep_sound or false, - view_range = def.view_range or 5, + view_range = def.view_range or 16, walk_velocity = def.walk_velocity or 1, run_velocity = def.run_velocity or 2, - damage = max(0, (def.damage or 0) * difficulty), + damage = scale_difficulty(def.damage, 0, 0), light_damage = def.light_damage or 0, sunlight_damage = def.sunlight_damage or 0, water_damage = def.water_damage or 0, - lava_damage = def.lava_damage or 0, + lava_damage = def.lava_damage or 8, + fire_damage = def.fire_damage or 1, suffocation = def.suffocation or true, fall_damage = def.fall_damage or 1, fall_speed = def.fall_speed or -10, -- must be lower than -2 (default: -10) @@ -3031,8 +3186,6 @@ minetest.register_entity(name, { group_attack = def.group_attack or false, passive = def.passive or false, knock_back = def.knock_back ~= false, - blood_amount = def.blood_amount or 5, - blood_texture = def.blood_texture or "mobs_blood.png", shoot_offset = def.shoot_offset or 0, floats = def.floats or 1, -- floats in water by default replace_rate = def.replace_rate, @@ -3046,7 +3199,6 @@ minetest.register_entity(name, { pause_timer = 0, horny = false, hornytimer = 0, - child = false, gotten = false, health = 0, reach = def.reach or 3, @@ -3081,7 +3233,13 @@ minetest.register_entity(name, { -- MCL2 extensions ignores_nametag = def.ignores_nametag or false, rain_damage = def.rain_damage or 0, + glow = def.glow, can_despawn = can_despawn, + child = def.child or false, + texture_mods = {}, + shoot_arrow = def.shoot_arrow, + sounds_child = def.sounds_child, + -- End of MCL2 extensions on_spawn = def.on_spawn, @@ -3556,8 +3714,8 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative) inventory_image = invimg, groups = grp, - _doc_items_longdesc = "This allows you to place a single mob.", - _doc_items_usagehelp = "Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.", + _doc_items_longdesc = S("This allows you to place a single mob."), + _doc_items_usagehelp = S("Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns."), on_place = function(itemstack, placer, pointed_thing) @@ -3582,7 +3740,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative) return itemstack end if not privs.maphack then - minetest.chat_send_player(name, "You need the “maphack” privilege to change the mob spawner.") + minetest.chat_send_player(name, S("You need the “maphack” privilege to change the mob spawner.")) return itemstack end mcl_mobspawners.setup_spawner(pointed_thing.under, itemstack:get_name()) @@ -3638,40 +3796,9 @@ function mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso, end --- protect tamed mob with rune item +-- No-op in MCL2 (protecting mobs is not possible). function mobs:protect(self, clicker) - local name = clicker:get_player_name() - local tool = clicker:get_wielded_item() - - if tool:get_name() ~= "mobs:protector" then - return false - end - - if self.tamed == false then - minetest.chat_send_player(name, S("Not tamed!")) - return true -- false - end - - if self.protected == true then - minetest.chat_send_player(name, S("Already protected!")) - return true -- false - end - - if not mobs.is_creative(clicker:get_player_name()) then - tool:take_item() -- take 1 protection rune - clicker:set_wielded_item(tool) - end - - self.protected = true - - local pos = self.object:get_pos() - pos.y = pos.y + self.collisionbox[2] + 0.5 - - effect(self.object:get_pos(), 25, "mobs_protect_particle.png", 0.5, 4, 2, 15) - - mob_sound(self, "mobs_spell") - - return true + return false end @@ -3731,8 +3858,6 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame) self.horny = true end - self.gotten = false - if tame then self.tamed = true @@ -3743,7 +3868,7 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame) end -- make sound when fed so many times - mob_sound(self, self.sounds.random, true) + mob_sound(self, "random", true) end return true diff --git a/mods/ENTITIES/mcl_mobs/api.txt b/mods/ENTITIES/mcl_mobs/api.txt index 157370d0f..96ae363b4 100644 --- a/mods/ENTITIES/mcl_mobs/api.txt +++ b/mods/ENTITIES/mcl_mobs/api.txt @@ -28,8 +28,13 @@ functions needed for the mob to work properly which contains the following: "monster" attacks player or npc on sight. "npc" walk around and will defend themselves if hit first, they kill monsters. - 'hp_min' has the minimum health value the mob can spawn with. - 'hp_max' has the maximum health value the mob can spawn with. + 'hp_min' the minimum health value the mob can spawn with. + 'hp_max' the maximum health value the mob can spawn with. + 'breath_max' The maximum breath value the mob can spawn with and can have. + If -1 (default), mob does not take drowning damage. + 'breathes_in_water' If true, mob loses breath when not in water. Otherwise, + mob loses breath when inside a node with `drowning` attribute + set (default: false). 'armor' holds strength of mob, 100 is normal, lower is more powerful and needs more hits and better weapons to kill. 'passive' when true allows animals to defend themselves when hit, @@ -56,9 +61,11 @@ functions needed for the mob to work properly which contains the following: 'fall_speed' has the maximum speed the mob can fall at, default is -10. 'fall_damage' when true causes falling to inflict damage. 'water_damage' holds the damage per second infliced to mobs when standing in - water. + water (default: 0). 'lava_damage' holds the damage per second inflicted to mobs when standing - in lava or fire. + in lava (default: 8). + 'fire_damage' holds the damage per second inflicted to mobs when standing + in fire (default: 1). 'light_damage' holds the damage per second inflicted to mobs when it's too bright (above 13 light). 'suffocation' when true causes mobs to suffocate inside solid blocks (2 damage per second). @@ -78,6 +85,8 @@ functions needed for the mob to work properly which contains the following: punches when nearby. 'group_attack' when true has same mob type grouping together to attack offender. + [MCL2 extension:] When a table, this is a list of + mob types that will get alerted as well (besides same mob type) 'attack_type' tells the api what a mob does when attacking the player or another mob: 'dogfight' is a melee attack when player is within mob reach. @@ -114,10 +123,6 @@ functions needed for the mob to work properly which contains the following: e.g. {"player", "mobs_animal:chicken"}. 'runaway_from' contains a table with mob names to run away from, add "player" to list to runaway from player also. - 'blood_amount' contains the number of blood droplets to appear when - mob is hit. - 'blood_texture' has the texture name to use for droplets e.g. - "mobs_blood.png", or table {"blood1.png", "blood2.png"} 'pathfinding' set to 1 for mobs to use pathfinder feature to locate player, set to 2 so they can build/break also (only works with dogfight attack and when 'mobs_griefing' @@ -131,6 +136,7 @@ functions needed for the mob to work properly which contains the following: 'makes_footstep_sound' when true you can hear mobs walking. 'sounds' this is a table with sounds of the mob 'distance' maximum distance sounds can be heard, default is 10. + 'base_pitch' base pitch to use adult mobs, default is 1.0 (MCL2 extension) 'random' played randomly from time to time. also played for overfeeding animal. 'war_cry' what you hear when mob starts to attack player. (currently disabled) @@ -142,6 +148,9 @@ functions needed for the mob to work properly which contains the following: 'fuse' sound played when mob explode timer starts. 'explode' sound played when mob explodes. + Note: For all sounds except fuse and explode, the pitch is slightly randomized from the base pitch + The pitch of children is 50% higher. + 'drops' table of items that are dropped when mob is killed, fields are: 'name' name of item to drop. 'chance' chance of drop, 1 for always, 2 for 1-in-2 chance etc. @@ -215,6 +224,14 @@ functions needed for the mob to work properly which contains the following: are in direct sunlight 'spawn_small_alternative': name of a smaller mob to use as replacement if spawning fails due to space requirements + 'glow' same as in entity definition + 'child' if true, spawn mob as child + 'shoot_arrow(self, pos, dir)' function that is called when mob wants to shoot an arrow. + You can spawn your own arrow here. pos is mob position, + dir is mob's aiming direction + 'sounds_child' same as sounds, but for childs. If not defined, childs will use same + sound as adults but with higher pitch + Node Replacement ---------------- @@ -234,8 +251,9 @@ eating. 'replace_rate' how random should the replace rate be (typically 10) 'replace_offset' +/- value to check specific node to replace - 'on_replace(self, pos, oldnode, newnode)' is called when mob is about to - replace a node. + 'on_replace(self, pos, oldnode, newnode)' + is called when mob is about to replace a node. Also called + when not actually replacing due to mobs_griefing setting being false. 'self' ObjectRef of mob 'pos' Position of node to replace 'oldnode' Current node @@ -289,12 +307,18 @@ for each mob. 'self.health' contains current health of mob (cannot exceed self.hp_max) + 'self.breath' contains current breath of mob, if mob takes drowning + damage at all (cannot exceed self.breath_max). Breath + decreases by 1 each second while in a node with drowning + damage and increases by 1 each second otherwise. 'self.texture_list' contains list of all mob textures 'self.child_texture' contains mob child texture when growing up 'self.base_texture' contains current skin texture which was randomly selected from textures list - 'self.gotten' this is used for obtaining milk from cow and wool from - sheep + 'self.gotten' this is used to track whether some special item has been + gotten from the mob, for example, wool from sheep. + Initialized as false, and the mob must set this value + manually. 'self.horny' when animal fed enough it is set to true and animal can breed with same animal 'self.hornytimer' background timer that controls breeding functions and @@ -573,19 +597,13 @@ External Settings for "minetest.conf" 'enable_damage' if true monsters will attack players (default is true) 'only_peaceful_mobs' if true only animals will spawn in game (default is false) - 'mobs_disable_blood' if false blood effects appear when mob is hit (default + 'mobs_disable_blood' if false, damage effects appear when mob is hit (default is false) 'mobs_spawn_protected' if set to false then mobs will not spawn in protected areas (default is true) - 'remove_far_mobs' if true then untamed mobs that are outside players - visual range will be removed (default is true) - 'mobname' can change specific mob chance rate (0 to disable) and - spawn number e.g. mobs_animal:cow = 1000,5 'mob_difficulty' sets difficulty level (health and hit damage multiplied by this number), defaults to 1.0. - 'mob_show_health' if false then punching mob will not show health status - (true by default) - 'mob_chance_multiplier' multiplies chance of all mobs spawning and can be set + 'mob_spawn_chance' multiplies chance of all mobs spawning and can be set to 0.5 to have mobs spawn more or 2.0 to spawn less. e.g. 1 in 7000 * 0.5 = 1 in 3500 so better odds of spawning. diff --git a/mods/ENTITIES/mcl_mobs/crafts.lua b/mods/ENTITIES/mcl_mobs/crafts.lua index 41243bf52..e9e6abf90 100644 --- a/mods/ENTITIES/mcl_mobs/crafts.lua +++ b/mods/ENTITIES/mcl_mobs/crafts.lua @@ -1,11 +1,11 @@ -local S = mobs.intllib +local S = minetest.get_translator("mcl_mobs") -- name tag minetest.register_craftitem("mcl_mobs:nametag", { description = S("Name Tag"), _doc_items_longdesc = S("A name tag is an item to name a mob."), - _doc_items_usagehelp = S("Before you use the name tag, you need to set a name at an anvil. Now you can use the name tag to name a mob with a rightclick. This uses up the name tag."), + _doc_items_usagehelp = S("Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag."), inventory_image = "mobs_nametag.png", wield_image = "mobs_nametag.png", stack_max = 64, diff --git a/mods/ENTITIES/mcl_mobs/depends.txt b/mods/ENTITIES/mcl_mobs/depends.txt index a1d9c9aa2..eb3eb2aa0 100644 --- a/mods/ENTITIES/mcl_mobs/depends.txt +++ b/mods/ENTITIES/mcl_mobs/depends.txt @@ -1,6 +1,7 @@ mcl_core mcl_weather? mcl_tnt? +mcl_hunger? invisibility? intllib? lucky_block? diff --git a/mods/ENTITIES/mcl_mobs/locale/de_DE.po b/mods/ENTITIES/mcl_mobs/locale/de_DE.po deleted file mode 100644 index 210990d8f..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/de_DE.po +++ /dev/null @@ -1,131 +0,0 @@ -# Mobs Redo translation. -# Copyright (C) 2017 TenPlus1 -# This file is distributed under the same license as the mobs package. -# Wuzzy , 2017 -# -msgid "" -msgstr "" -"Project-Id-Version: mobs\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-02 16:48+0200\n" -"PO-Revision-Date: 2017-07-02 14:27+0200\n" -"Last-Translator: Wuzzy \n" -"Language-Team: \n" -"Language: de_DE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "" - -#: api.lua -msgid "Mob has been protected!" -msgstr "Kreatur wurde geschützt!" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "@1 (Gezähmt)" - -#: api.lua -msgid "Not tamed!" -msgstr "Nicht gezähmt!" - -#: api.lua -msgid "@1 is owner!" -msgstr "@1 ist der Besitzer!" - -#: api.lua -msgid "Missed!" -msgstr "Daneben!" - -#: api.lua -msgid "Already protected!" -msgstr "Bereits geschützt!" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "@1 bei voller Gesundheit (@2)" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 wurde gezähmt!" - -#: api.lua -msgid "Enter name:" -msgstr "Namen eingeben:" - -#: api.lua -msgid "Rename" -msgstr "Umbenennen" - -#: crafts.lua -msgid "Name Tag" -msgstr "Namensschild" - -#: crafts.lua -msgid "Leather" -msgstr "Leder" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Rohes Fleisch" - -#: crafts.lua -msgid "Meat" -msgstr "Fleisch" - -#: crafts.lua -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Lasso (Rechtsklick auf Tier, um es zu nehmen)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Netz (Rechtsklick auf Tier, um es zu nehmen)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Stahlschere (Rechtsklick zum Scheren)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "Kreaturschutzrune" - -#: crafts.lua -msgid "Saddle" -msgstr "Sattel" - -#: crafts.lua -msgid "Mob Fence" -msgstr "Kreaturen Zaun" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Kreaturenspawner" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "Kreatur MinLicht MaxLicht Menge SpielerEntfng" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Nicht aktiv (Einstellungen eingeben)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Spawner aktiv (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Kreaturenspawner-Einstellungen gescheitert!" - -#: spawner.lua -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "" -"Syntax: „name min_licht[0-14] max_licht[0-14] max_mobs_im_gebiet[0 zum " -"Deaktivieren] distanz[1-20] y_versatz[-10 bis 10]“" diff --git a/mods/ENTITIES/mcl_mobs/locale/es.po b/mods/ENTITIES/mcl_mobs/locale/es.po deleted file mode 100644 index 849db6671..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/es.po +++ /dev/null @@ -1,128 +0,0 @@ -# Mobs Redo translation. -# Copyright (C) 2017 TenPlus1 -# This file is distributed under the same license as the mobs package. -# Wuzzy , 2017 -# -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-16 16:48+0200\n" -"PO-Revision-Date: 2017-07-16 16:48+0200\n" -"Last-Translator: Aleks \n" -"Language-Team: \n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "" - -#: api.lua -msgid "Mob has been protected!" -msgstr "El mob ha sido protegido!" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "@1 (Domesticado)" - -#: api.lua -msgid "Not tamed!" -msgstr "No domesticado!" - -#: api.lua -msgid "@1 is owner!" -msgstr "@1 es el dueño!" - -#: api.lua -msgid "Missed!" -msgstr "Perdido!" - -#: api.lua -msgid "Already protected!" -msgstr "Ya está protegido!" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "@1 con salud llena (@2)" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 ha sido domesticado!" - -#: api.lua -msgid "Enter name:" -msgstr "Ingrese nombre:" - -#: api.lua -msgid "Rename" -msgstr "Renombrar" - -#: crafts.lua -msgid "Name Tag" -msgstr "Nombrar etiqueta" - -#: crafts.lua -msgid "Leather" -msgstr "Cuero" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Carne cruda" - -#: crafts.lua -msgid "Meat" -msgstr "Carne" - -#: crafts.lua -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Lazo (click derecho en animal para colocar en inventario)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Red (click derecho en animal para colocar en inventario)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Tijera de acero (click derecho para esquilar)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "Runa de protección de Mob" - -#: crafts.lua -msgid "Saddle" -msgstr "Montura" - -#: crafts.lua -msgid "Mob Fence" -msgstr "" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Generador de Mob" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "Mob LuzMin LuzMax Cantidad DistJugador" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Generador no activo (ingrese config)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Generador activo (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Configuracion de generador de Mob falló!" - -#: spawner.lua -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "Sintaxis: “nombre luz_min[0-14] luz_max[0-14] max_mobs_en_area[0 para deshabilitar] " -"distancia[1-20] compensacion[-10 a 10]”" diff --git a/mods/ENTITIES/mcl_mobs/locale/fr.po b/mods/ENTITIES/mcl_mobs/locale/fr.po deleted file mode 100644 index 25b920cd9..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/fr.po +++ /dev/null @@ -1,129 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-29 09:13+0200\n" -"PO-Revision-Date: 2017-07-29 09:20+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Last-Translator: fat115 \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"Language: fr\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "** Mode pacifique activé - Aucun monstre ne sera généré" - -#: api.lua -msgid "Mob has been protected!" -msgstr "L'animal a été protégé !" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "@1 (apprivoisé)" - -#: api.lua -msgid "Not tamed!" -msgstr "Non-apprivoisé !" - -#: api.lua -msgid "@1 is owner!" -msgstr "Appartient à @1 !" - -#: api.lua -msgid "Missed!" -msgstr "Raté !" - -#: api.lua -msgid "Already protected!" -msgstr "Déjà protégé !" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "@1 est en pleine forme (@2) " - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 a été apprivoisé ! " - -#: api.lua -msgid "Enter name:" -msgstr "Saisissez un nom :" - -#: api.lua -msgid "Rename" -msgstr "Renommer" - -#: crafts.lua -msgid "Name Tag" -msgstr "Étiquette pour collier" - -#: crafts.lua -msgid "Leather" -msgstr "Cuir" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Viande crue" - -#: crafts.lua -msgid "Meat" -msgstr "Viande" - -#: crafts.lua -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Lasso (clic droit sur l'animal pour le mettre dans l'inventaire)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Filet (clic droit sur l'animal pour le mettre dans l'inventaire)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Ciseaux à laine (clic droit pour tondre)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "Rune de protection des animaux" - -#: crafts.lua -msgid "Saddle" -msgstr "Selle" - -#: crafts.lua -msgid "Mob Fence" -msgstr "Clôture à animaux" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Générateur de mob" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "Mob MinLumière MaxLumière Quantité DistanceJoueur" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Générateur non actif (entrez les paramètres)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Générateur actif (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Echec des paramètres du générateur" - -#: spawner.lua -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "Syntaxe : “nom min_lumière[0-14] max_lumière[0-14] max_mobs_dans_zone[0 pour désactiver] distance[1-20] décalage_y[-10 à 10]“" diff --git a/mods/ENTITIES/mcl_mobs/locale/it.po b/mods/ENTITIES/mcl_mobs/locale/it.po deleted file mode 100644 index a439f6dea..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/it.po +++ /dev/null @@ -1,131 +0,0 @@ -# ITALIAN LOCALE FILE FOR THE MOBS REDO MODULE -# Copyright (c) 2014 Krupnov Pavel and 2016 TenPlus1 -# This file is distributed under the same license as the MOBS REDO package. -# Hamlet , 2017. -# -msgid "" -msgstr "" -"Project-Id-Version: Italian locale file for the Mobs Redo module\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-02 16:48+0200\n" -"PO-Revision-Date: 2017-08-18 12:18+0100\n" -"Last-Translator: H4mlet \n" -"Language-Team: \n" -"Language: it\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.6.10\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "" - -#: api.lua -msgid "Mob has been protected!" -msgstr "Il mob è stato protetto!" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "@1 (Addomesticat*)" - -#: api.lua -msgid "Not tamed!" -msgstr "Non addomesticat*!" - -#: api.lua -msgid "@1 is owner!" -msgstr "Proprietari* @1!" - -#: api.lua -msgid "Missed!" -msgstr "Mancat*!" - -#: api.lua -msgid "Already protected!" -msgstr "Già protett*!" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "@1 in piena salute (@2)" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 è stat* addomesticat*!" - -#: api.lua -msgid "Enter name:" -msgstr "Inserire il nome:" - -#: api.lua -msgid "Rename" -msgstr "Rinominare" - -#: crafts.lua -msgid "Name Tag" -msgstr "Targhetta" - -#: crafts.lua -msgid "Leather" -msgstr "Pelle" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Carne cruda" - -#: crafts.lua -msgid "Meat" -msgstr "Carne" - -#: crafts.lua -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Lazo (click di destro per mettere l'animale nell'inventario)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Rete (click destro per mettere l'animale nell'inventario)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Cesoie d'acciaio (click destro per tosare)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "Runa di protezione per mob" - -#: crafts.lua -msgid "Saddle" -msgstr "Sella" - -#: crafts.lua -msgid "Mob Fence" -msgstr "" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Generatore di mob" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "Mob LuceMin LuceMax Ammontare DistGiocat." - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Generatore inattivo (inserire le impostazioni)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Generatore attivo (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Impostazioni del generatore di mob fallite!" - -#: spawner.lua -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "" -"Sintassi: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 per " -"disabilitare] distance[1-20] y_offset[-10 to 10]”" diff --git a/mods/ENTITIES/mcl_mobs/locale/mcl_mobs.de.tr b/mods/ENTITIES/mcl_mobs/locale/mcl_mobs.de.tr new file mode 100644 index 000000000..59f65eae8 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/locale/mcl_mobs.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_mobs +Peaceful mode active! No monsters will spawn.=Friedlicher Modus aktiv! Es werden keine Monster auftauchen. +This allows you to place a single mob.=Damit kann man einen Mob platzieren. +Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.=Platzieren Sie dies einfach dort, wo der Mob auftauchen soll. Tiere werden zahm erscheinen, außer, wenn Sie beim Platzieren die Schlichtaste drücken. Platzieren Sie dies auf einem Mobspawner, um den Mob im Mobspawner zu wechseln. +You need the “maphack” privilege to change the mob spawner.=Sie brauchen das „maphack“-Privileg, um den Mobspawner ändern zu können. +Name Tag=Namensschild +A name tag is an item to name a mob.=Ein Namensschild ist ein Gegenstand, um einen Mob zu benennen. +Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=Bevor Sie ein Namensschild benutzen können, müssen Sie ihn an einem Amboss benennen. Dann können können Sie das Namensschild benutztn, um einen Mob zu benennen. Das wird das Namensschild verbrauchen. diff --git a/mods/ENTITIES/mcl_mobs/locale/ms.po b/mods/ENTITIES/mcl_mobs/locale/ms.po deleted file mode 100644 index a2a31f3f8..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/ms.po +++ /dev/null @@ -1,131 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-05 23:40+0800\n" -"PO-Revision-Date: 2018-02-05 23:51+0800\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" -"Last-Translator: MuhdNurHidayat (MNH48) \n" -"Plural-Forms: nplurals=1; plural=0;\n" -"Language: ms\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "** Mod Aman Diaktifkan - Tiada Raksasa Akan Muncul" - -#: api.lua -msgid "Mob has been protected!" -msgstr "Mob telah pun dilindungi!" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "@1 (Jinak)" - -#: api.lua -msgid "Not tamed!" -msgstr "Belum dijinakkan!" - -#: api.lua -msgid "@1 is owner!" -msgstr "Ini hak milik @1!" - -#: api.lua -msgid "Missed!" -msgstr "Terlepas!" - -#: api.lua -msgid "Already protected!" -msgstr "Telah dilindungi!" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "Mata kesihatan @1 telah penuh (@2)" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 telah dijinakkan!" - -#: api.lua -msgid "Enter name:" -msgstr "Masukkan nama:" - -#: api.lua -msgid "Rename" -msgstr "Namakan semula" - -#: crafts.lua -msgid "Name Tag" -msgstr "Tanda Nama" - -#: crafts.lua -msgid "Leather" -msgstr "Kulit" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Daging Mentah" - -#: crafts.lua -msgid "Meat" -msgstr "Daging Bakar" - -#: crafts.lua -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Tanjul (klik-kanan haiwan untuk masukkan ke inventori)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Jaring (klik-kanan haiwan untuk masukkan ke inventori)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Ketam Keluli (klik-kanan untuk mengetam bulu biri-biri)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "Rune Perlindungan Mob" - -#: crafts.lua -msgid "Saddle" -msgstr "Pelana" - -#: crafts.lua -msgid "Mob Fence" -msgstr "Pagar Mob" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Pewujud Mob" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "Mob CahayaMin CahayaMax Amaun JarakPemain" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Pewujud Mob Tidak Aktif (masukkan tetapan)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Pewujud Mob Aktif (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Penetapan Pewujud Mob gagal!" - -#: spawner.lua -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "" -"Sintaks: \"nama cahaya_minimum[0-14] cahaya_maksimum[0-14] " -"amaun_mob_maksimum[0 untuk lumpuhkan] jarak[1-20] ketinggian[-10 hingga 10]\"" diff --git a/mods/ENTITIES/mcl_mobs/locale/pt.po b/mods/ENTITIES/mcl_mobs/locale/pt.po deleted file mode 100644 index b52afd622..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/pt.po +++ /dev/null @@ -1,133 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: mobs\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-02 16:48+0200\n" -"PO-Revision-Date: 2017-07-02 14:55+0200\n" -"Last-Translator: Wuzzy \n" -"Language-Team: \n" -"Language: pt\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "" - -#: api.lua -msgid "Mob has been protected!" -msgstr "" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "" - -#: api.lua -msgid "Not tamed!" -msgstr "Indomesticado!" - -#: api.lua -msgid "@1 is owner!" -msgstr "Dono @1!" - -#: api.lua -msgid "Missed!" -msgstr "Faltou!" - -#: api.lua -msgid "Already protected!" -msgstr "" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "@1 em plena saude (@2)" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 foi domesticado!" - -#: api.lua -msgid "Enter name:" -msgstr "Insira um nome:" - -#: api.lua -msgid "Rename" -msgstr "Renomear" - -#: crafts.lua -msgid "Name Tag" -msgstr "Etiqueta" - -#: crafts.lua -msgid "Leather" -msgstr "Couro" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Carne crua" - -#: crafts.lua -msgid "Meat" -msgstr "Carne" - -#: crafts.lua -#, fuzzy -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Laço (clique-direito no animal para por no inventario)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Net (clique-direito no animal para por no inventario)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Tesoura de Aço (clique-direito para tosquiar)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "" - -#: crafts.lua -msgid "Saddle" -msgstr "" - -#: crafts.lua -msgid "Mob Fence" -msgstr "" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Spawnador de Mob" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "Mob LuzMinima LuzMaxima Valor DistJogador" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Spawnador Inativo (configurar)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Spawnador Ativo (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Configuraçao de Spawnador do Mob falhou!" - -#: spawner.lua -#, fuzzy -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "" -"> nome luz_min[0-14] luz_max[0-14] max_mobs_na_area[0 para desabilitar] " -"distancia[1-20] y_offset[-10 a 10]" diff --git a/mods/ENTITIES/mcl_mobs/locale/ru.po b/mods/ENTITIES/mcl_mobs/locale/ru.po deleted file mode 100644 index 6cde7ef91..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/ru.po +++ /dev/null @@ -1,129 +0,0 @@ -# Russian translation for the mobs_redo mod. -# Copyright (C) 2018 TenPlus1 -# This file is distributed under the same license as the mobs_redo package. -# Oleg720 , 2017. -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-13 15:47+0200\n" -"PO-Revision-Date: 2018-03-23 22:22+0100\n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "** Мирный модус активирован - монстры не спаунятся" - -#: api.lua -msgid "Mob has been protected!" -msgstr "Моб защищен!" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "@1 (Прирученный)" - -#: api.lua -msgid "Not tamed!" -msgstr "Не прирученный" - -#: api.lua -msgid "@1 is owner!" -msgstr "@1 владелец" - -#: api.lua -msgid "Missed!" -msgstr "Промазал!" - -#: api.lua -msgid "Already protected!" -msgstr "Уже защищен!" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "@1 при полном здоровье (@2)" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 приручен" - -#: api.lua -msgid "Enter name:" -msgstr "Введите имя:" - -#: api.lua -msgid "Rename" -msgstr "Переименовать" - -#: crafts.lua -msgid "Name Tag" -msgstr "Новый тэг" - -#: crafts.lua -msgid "Leather" -msgstr "Кожа" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Сырое мясо" - -#: crafts.lua -msgid "Meat" -msgstr "Мясо" - -#: crafts.lua -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Лассо (Правый клик - положить животное в инвентарь)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Сеть (Правый клик - положить животное в инвентарь)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Ножницы (Правый клик - подстричь)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "Защитная руна мобов" - -#: crafts.lua -msgid "Saddle" -msgstr "Седло" - -#: crafts.lua -msgid "Mob Fence" -msgstr "Забор от мобов" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Спаунер моба" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Спаунер не активен (введите настройки)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Активные спаунер (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Настройки спаунера моба провалились" - -#: spawner.lua -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "" diff --git a/mods/ENTITIES/mcl_mobs/locale/template.pot b/mods/ENTITIES/mcl_mobs/locale/template.pot deleted file mode 100644 index af31440e2..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/template.pot +++ /dev/null @@ -1,128 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-02 16:48+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "" - -#: api.lua -msgid "Mob has been protected!" -msgstr "" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "" - -#: api.lua -msgid "Not tamed!" -msgstr "" - -#: api.lua -msgid "@1 is owner!" -msgstr "" - -#: api.lua -msgid "Missed!" -msgstr "" - -#: api.lua -msgid "Already protected!" -msgstr "" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "" - -#: api.lua -msgid "Enter name:" -msgstr "" - -#: api.lua -msgid "Rename" -msgstr "" - -#: crafts.lua -msgid "Name Tag" -msgstr "" - -#: crafts.lua -msgid "Leather" -msgstr "" - -#: crafts.lua -msgid "Raw Meat" -msgstr "" - -#: crafts.lua -msgid "Meat" -msgstr "" - -#: crafts.lua -msgid "Lasso (right-click animal to put in inventory)" -msgstr "" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "" - -#: crafts.lua -msgid "Saddle" -msgstr "" - -#: crafts.lua -msgid "Mob Fence" -msgstr "" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "" - -#: spawner.lua -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "" diff --git a/mods/ENTITIES/mcl_mobs/locale/template.txt b/mods/ENTITIES/mcl_mobs/locale/template.txt new file mode 100644 index 000000000..db0c4d53a --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mcl_mobs +Peaceful mode active! No monsters will spawn.= +This allows you to place a single mob.= +Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.= +You need the “maphack” privilege to change the mob spawner.= +Name Tag= +A name tag is an item to name a mob.= +Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.= diff --git a/mods/ENTITIES/mcl_mobs/locale/tr.po b/mods/ENTITIES/mcl_mobs/locale/tr.po deleted file mode 100644 index 10688e20d..000000000 --- a/mods/ENTITIES/mcl_mobs/locale/tr.po +++ /dev/null @@ -1,133 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: mobs\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-02 16:48+0200\n" -"PO-Revision-Date: 2017-07-02 14:56+0200\n" -"Last-Translator: Wuzzy \n" -"Language-Team: \n" -"Language: tr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: api.lua -msgid "** Peaceful Mode Active - No Monsters Will Spawn" -msgstr "" - -#: api.lua -msgid "Mob has been protected!" -msgstr "" - -#: api.lua -msgid "@1 (Tamed)" -msgstr "" - -#: api.lua -msgid "Not tamed!" -msgstr "Evcil değil!" - -#: api.lua -msgid "@1 is owner!" -msgstr "Sahibi @1!" - -#: api.lua -msgid "Missed!" -msgstr "Kaçırdın!" - -#: api.lua -msgid "Already protected!" -msgstr "" - -#: api.lua -msgid "@1 at full health (@2)" -msgstr "@1 tam canında (@2)" - -#: api.lua -msgid "@1 has been tamed!" -msgstr "@1 tamamen evcilleştirilmiştir!" - -#: api.lua -msgid "Enter name:" -msgstr "İsim gir:" - -#: api.lua -msgid "Rename" -msgstr "Yeniden adlandır" - -#: crafts.lua -msgid "Name Tag" -msgstr "İsim etiketi" - -#: crafts.lua -msgid "Leather" -msgstr "Deri" - -#: crafts.lua -msgid "Raw Meat" -msgstr "Çiğ et" - -#: crafts.lua -msgid "Meat" -msgstr "Et" - -#: crafts.lua -#, fuzzy -msgid "Lasso (right-click animal to put in inventory)" -msgstr "Kement (hayvana sağ tıklayarak envantere koy)" - -#: crafts.lua -msgid "Net (right-click animal to put in inventory)" -msgstr "Ağ (hayvana sağ tıklayarak envantere koy)" - -#: crafts.lua -msgid "Steel Shears (right-click to shear)" -msgstr "Çelik makas (sağ tıklayarak kes)" - -#: crafts.lua -msgid "Mob Protection Rune" -msgstr "" - -#: crafts.lua -msgid "Saddle" -msgstr "" - -#: crafts.lua -msgid "Mob Fence" -msgstr "Canavar Yaratıcı" - -#: spawner.lua -msgid "Mob Spawner" -msgstr "Canavar Yaratıcı" - -#: spawner.lua -msgid "Mob MinLight MaxLight Amount PlayerDist" -msgstr "Mob MinIşık MaxIşık Miktar OyuncuMesafesi" - -#: spawner.lua -msgid "Spawner Not Active (enter settings)" -msgstr "Yaratıcı aktif değil (ayarlara gir)" - -#: spawner.lua -msgid "Spawner Active (@1)" -msgstr "Yaratıcı aktif (@1)" - -#: spawner.lua -msgid "Mob Spawner settings failed!" -msgstr "Yaratıcı ayarları uygulanamadı." - -#: spawner.lua -#, fuzzy -msgid "" -"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] " -"distance[1-20] y_offset[-10 to 10]”" -msgstr "" -"> isim min_isik[0-14] max_isik[0-14] alandaki_max_canavar_sayisi[kapatmak " -"icin 0] mesafe[1-20] y_cikinti[-10 ve 10 arası]" diff --git a/mods/ENTITIES/mcl_mobs/mount.lua b/mods/ENTITIES/mcl_mobs/mount.lua index 04050eb0e..d24fc26fe 100644 --- a/mods/ENTITIES/mcl_mobs/mount.lua +++ b/mods/ENTITIES/mcl_mobs/mount.lua @@ -190,7 +190,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime) end local acce_y = 0 - local velo = entity.object:getvelocity() + local velo = entity.object:get_velocity() entity.v = get_v(velo) * get_sign(entity.v) @@ -215,7 +215,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime) end -- fix mob rotation - entity.object:setyaw(entity.driver:get_look_horizontal() - entity.rotate) + entity.object:set_yaw(entity.driver:get_look_horizontal() - entity.rotate) if can_fly then @@ -275,7 +275,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime) if s ~= get_sign(entity.v) then - entity.object:setvelocity({x = 0, y = 0, z = 0}) + entity.object:set_velocity({x = 0, y = 0, z = 0}) entity.v = 0 return end @@ -348,7 +348,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime) if math.abs(velo.y) < 1 then local pos = entity.object:get_pos() pos.y = math.floor(pos.y) + 0.5 - entity.object:setpos(pos) + entity.object:set_pos(pos) velo.y = 0 end end @@ -360,8 +360,8 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime) new_velo = get_velocity(v, entity.object:get_yaw() - rot_view, velo.y) new_acce.y = new_acce.y + acce_y - entity.object:setvelocity(new_velo) - entity.object:setacceleration(new_acce) + entity.object:set_velocity(new_velo) + entity.object:set_acceleration(new_acce) -- CRASH! if enable_crash then @@ -387,7 +387,7 @@ end function mobs.fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim) local ctrl = entity.driver:get_player_control() - local velo = entity.object:getvelocity() + local velo = entity.object:get_velocity() local dir = entity.driver:get_look_dir() local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands local rot_steer, rot_view = math.pi / 2, 0 @@ -397,24 +397,24 @@ function mobs.fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim) end if ctrl.up then - entity.object:setvelocity({ + entity.object:set_velocity({ x = dir.x * speed, y = dir.y * speed + 2, z = dir.z * speed }) elseif ctrl.down then - entity.object:setvelocity({ + entity.object:set_velocity({ x = -dir.x * speed, y = dir.y * speed + 2, z = -dir.z * speed }) elseif not ctrl.down or ctrl.up or ctrl.jump then - entity.object:setvelocity({x = 0, y = -2, z = 0}) + entity.object:set_velocity({x = 0, y = -2, z = 0}) end - entity.object:setyaw(yaw + math.pi + math.pi / 2 - entity.rotate) + entity.object:set_yaw(yaw + math.pi + math.pi / 2 - entity.rotate) -- firing arrows if ctrl.LMB and ctrl.sneak and shoots then @@ -431,8 +431,8 @@ function mobs.fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim) ent.owner_id = tostring(entity.object) -- so arrows dont hurt entity you are riding local vec = {x = dir.x * 6, y = dir.y * 6, z = dir.z * 6} local yaw = entity.driver:get_look_horizontal() - obj:setyaw(yaw + math.pi / 2) - obj:setvelocity(vec) + obj:set_yaw(yaw + math.pi / 2) + obj:set_velocity(vec) else obj:remove() end diff --git a/mods/ENTITIES/mobs_mc/0_gameconfig.lua b/mods/ENTITIES/mobs_mc/0_gameconfig.lua index 6b1180b73..81229aa27 100644 --- a/mods/ENTITIES/mobs_mc/0_gameconfig.lua +++ b/mods/ENTITIES/mobs_mc/0_gameconfig.lua @@ -157,6 +157,7 @@ mobs_mc.follow = { chicken = { "farming:seed_wheat", "farming:seed_cotton" }, -- seeds in general parrot = { "farming:seed_wheat", "farming:seed_cotton" }, -- seeds in general horse = { mobs_mc.items.apple, mobs_mc.items.sugar, mobs_mc.items.wheat, mobs_mc.items.hay_bale, mobs_mc.items.golden_apple, mobs_mc.items.golden_carrot }, + llama = { mobs_mc.items.wheat, mobs_mc.items.hay_bale, }, pig = { mobs_mc.items.potato, mobs_mc.items.carrot, mobs_mc.items.carrot_on_a_stick, mobs_mc.items.apple, -- Minetest Game extra }, diff --git a/mods/ENTITIES/mobs_mc/1_items_default.lua b/mods/ENTITIES/mobs_mc/1_items_default.lua index f705b7826..f0e1301e9 100644 --- a/mods/ENTITIES/mobs_mc/1_items_default.lua +++ b/mods/ENTITIES/mobs_mc/1_items_default.lua @@ -3,21 +3,20 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes - ---dofile(minetest.get_modpath("mobs").."/api.lua") --THIS IS THE MASTER ITEM LIST TO USE WITH DEFAULT --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +-- NOTE: Most strings intentionally not marked for translation, other mods already have these items. +-- TODO: Remove this file eventually, most items are already outsourced in other mods. + +local S = minetest.get_translator("mobs_mc") local c = mobs_mc.is_item_variable_overridden -- Blaze if c("blaze_rod") then minetest.register_craftitem("mobs_mc:blaze_rod", { - description = S("Blaze Rod"), - _doc_items_longdesc = S("This is a crafting component dropped from dead blazes."), + description = "Blaze Rod", + _doc_items_longdesc = "This is a crafting component dropped from dead blazes.", wield_image = "mcl_mobitems_blaze_rod.png", inventory_image = "mcl_mobitems_blaze_rod.png", }) @@ -43,8 +42,8 @@ end if c("blaze_powder") then minetest.register_craftitem("mobs_mc:blaze_powder", { - description = S("Blaze Powder"), - _doc_items_longdesc = S("This item is mainly used for brewing potions and crafting."), + description = "Blaze Powder", + _doc_items_longdesc = "This item is mainly used for brewing potions and crafting.", wield_image = "mcl_mobitems_blaze_powder.png", inventory_image = "mcl_mobitems_blaze_powder.png", }) @@ -60,8 +59,8 @@ end -- Chicken if c("chicken_raw") then minetest.register_craftitem("mobs_mc:chicken_raw", { - description = S("Raw Chicken"), - _doc_items_longdesc = S("Raw chicken is a food item and can be eaten safely. Cooking it will increase its nutritional value."), + description = "Raw Chicken", + _doc_items_longdesc = "Raw chicken is a food item and can be eaten safely. Cooking it will increase its nutritional value.", inventory_image = "mcl_mobitems_chicken_raw.png", groups = { food = 2, eatable = 2 }, on_use = minetest.item_eat(2), @@ -70,8 +69,8 @@ end if c("chicken_cooked") then minetest.register_craftitem("mobs_mc:chicken_cooked", { - description = S("Cooked Chicken"), - _doc_items_longdesc = S("A cooked chicken is a healthy food item which can be eaten."), + description = "Cooked Chicken", + _doc_items_longdesc = "A cooked chicken is a healthy food item which can be eaten.", inventory_image = "mcl_mobitems_chicken_cooked.png", groups = { food = 2, eatable = 6 }, on_use = minetest.item_eat(6), @@ -89,8 +88,8 @@ end if c("feather") then minetest.register_craftitem("mobs_mc:feather", { - description = S("Feather"), - _doc_items_longdesc = S("Feathers are used in crafting and are dropped from chickens."), + description = "Feather", + _doc_items_longdesc = "Feathers are used in crafting and are dropped from chickens.", inventory_image = "mcl_mobitems_feather.png", }) end @@ -98,8 +97,8 @@ end -- Cow and mooshroom if c("beef_raw") then minetest.register_craftitem("mobs_mc:beef_raw", { - description = S("Raw Beef"), - _doc_items_longdesc = S("Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value."), + description = "Raw Beef", + _doc_items_longdesc = "Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.", inventory_image = "mcl_mobitems_beef_raw.png", groups = { food = 2, eatable = 3 }, on_use = minetest.item_eat(3), @@ -108,8 +107,8 @@ end if c("beef_cooked") then minetest.register_craftitem("mobs_mc:beef_cooked", { - description = S("Steak"), - _doc_items_longdesc = S("Steak is cooked beef from cows and can be eaten."), + description = "Steak", + _doc_items_longdesc = "Steak is cooked beef from cows and can be eaten.", inventory_image = "mcl_mobitems_beef_cooked.png", groups = { food = 2, eatable = 8 }, on_use = minetest.item_eat(8), @@ -129,8 +128,8 @@ end if c("milk") then -- milk minetest.register_craftitem("mobs_mc:milk_bucket", { - description = S("Milk"), - _doc_items_longdesc = S("Milk is a food item obtained by using a bucket on a cow."), + description = "Milk", + _doc_items_longdesc = "Milk is a food item obtained by using a bucket on a cow.", inventory_image = "mobs_bucket_milk.png", groups = { food = 3, eatable = 1 }, on_use = minetest.item_eat(1, "bucket:bucket_empty"), @@ -140,8 +139,8 @@ end if c("bowl") then minetest.register_craftitem("mobs_mc:bowl", { - description = S("Bowl"), - _doc_items_longdesc = S("Bowls are mainly used to hold tasty soups."), + description = "Bowl", + _doc_items_longdesc = "Bowls are mainly used to hold tasty soups.", inventory_image = "mcl_core_bowl.png", }) @@ -162,8 +161,8 @@ end if c("mushroom_stew") then minetest.register_craftitem("mobs_mc:mushroom_stew", { - description = S("Mushroom Stew"), - _doc_items_longdesc = S("Mushroom stew is a healthy soup."), + description = "Mushroom Stew", + _doc_items_longdesc = "Mushroom stew is a healthy soup.", inventory_image = "farming_mushroom_stew.png", groups = { food = 3, eatable = 6 }, on_use = minetest.item_eat(6, "mobs_mc:bowl"), @@ -181,7 +180,7 @@ if c("dragon_egg") then --ender dragon minetest.register_node("mobs_mc:dragon_egg", { - description = S("Dragon Egg"), + description = "Dragon Egg", tiles = { "mcl_end_dragon_egg.png", "mcl_end_dragon_egg.png", @@ -225,7 +224,7 @@ end -- Enderman if c("ender_eye") then minetest.register_craftitem("mobs_mc:ender_eye", { - description = S("Eye of Ender"), + description = "Eye of Ender", _doc_items_longdesc = longdesc_craftitem, inventory_image = "mcl_end_ender_eye.png", groups = { craftitem = 1 }, @@ -243,8 +242,8 @@ end -- Ghast if c("ghast_tear") then minetest.register_craftitem("mobs_mc:ghast_tear", { - description = S("Ghast Tear"), - _doc_items_longdesc = S("A ghast tear is an item used in potion brewing. It is dropped from dead ghasts."), + description = "Ghast Tear", + _doc_items_longdesc = "A ghast tear is an item used in potion brewing. It is dropped from dead ghasts.", wield_image = "mcl_mobitems_ghast_tear.png", inventory_image = "mcl_mobitems_ghast_tear.png", groups = { brewitem = 1 }, @@ -255,9 +254,9 @@ end if c("saddle") then -- Overwrite the saddle from Mobs Redo minetest.register_craftitem(":mobs:saddle", { - description = S("Saddle"), - _doc_items_longdesc = S("Saddles can be put on horses, donkeys, mules and pigs in order to mount them."), - _doc_items_usagehelp = S("Rightclick an animal while holding a saddle to put on the saddle. You can now mount the animal by rightclicking it again."), + description = "Saddle", + _doc_items_longdesc = "Saddles can be put on horses, donkeys, mules and pigs in order to mount them.", + _doc_items_usagehelp = "Rightclick an animal while holding a saddle to put on the saddle. You can now mount the animal by rightclicking it again.", inventory_image = "mcl_mobitems_saddle.png", stack_max = 1, }) @@ -275,7 +274,7 @@ if c("saddle") and c("lether") and c("string") and c("iron_ingot") then end -- Horse Armor -local horse_armor_use = S("Rightclick a horse to put on the horse armor. Donkeys and mules can't wear horse armor.") +local horse_armor_use = S("Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.") -- TODO: Balance the horse armor strength, compare with MC armor strength if c("iron_horse_armor") then minetest.register_craftitem("mobs_mc:iron_horse_armor", { @@ -314,8 +313,8 @@ end -- Pig if c("porkchop_raw") then minetest.register_craftitem("mobs_mc:porkchop_raw", { - description = S("Raw Porkchop"), - _doc_items_longdesc = S("A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value."), + description = "Raw Porkchop", + _doc_items_longdesc = "A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.", inventory_image = "mcl_mobitems_porkchop_raw.png", groups = { food = 2, eatable = 3 }, on_use = minetest.item_eat(3), @@ -324,7 +323,7 @@ end if c("porkchop_cooked") then minetest.register_craftitem("mobs_mc:porkchop_cooked", { - description = S("Cooked Porkchop"), + description = "Cooked Porkchop", _doc_items_longdesc = "Cooked porkchop is the cooked flesh of a pig and is used as food.", inventory_image = "mcl_mobitems_porkchop_cooked.png", groups = { food = 2, eatable = 8 }, @@ -343,9 +342,9 @@ end if c("carrot_on_a_stick") then minetest.register_tool("mobs_mc:carrot_on_a_stick", { - description = S("Carrot on a Stick"), - _doc_items_longdesc = S("A carrot on a stick can be used on saddled pigs to ride them. Pigs will also follow anyone who holds a carrot on a stick near them."), - _doc_items_usagehelp = S("Rightclick a saddled pig with the carrot on a stick to mount it. You can now ride it like a horse."), + description = "Carrot on a Stick", + _doc_items_longdesc = "A carrot on a stick can be used on saddled pigs to ride them. Pigs will also follow anyone who holds a carrot on a stick near them.", + _doc_items_usagehelp = "Rightclick a saddled pig with the carrot on a stick to mount it. You can now ride it like a horse.", wield_image = "mcl_mobitems_carrot_on_a_stick.png", inventory_image = "mcl_mobitems_carrot_on_a_stick.png", sounds = { breaks = "default_tool_breaks" }, @@ -385,8 +384,8 @@ end -- Rabbit if c("rabbit_raw") then minetest.register_craftitem("mobs_mc:rabbit_raw", { - description = S("Raw Rabbit"), - _doc_items_longdesc = S("Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value."), + description = "Raw Rabbit", + _doc_items_longdesc = "Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.", inventory_image = "mcl_mobitems_rabbit_raw.png", groups = { food = 2, eatable = 3 }, on_use = minetest.item_eat(3), @@ -395,8 +394,8 @@ end if c("rabbit_cooked") then minetest.register_craftitem("mobs_mc:rabbit_cooked", { - description = S("Cooked Rabbit"), - _doc_items_longdesc = S("This is a food item which can be eaten."), + description = "Cooked Rabbit", + _doc_items_longdesc = "This is a food item which can be eaten.", inventory_image = "mcl_mobitems_rabbit_cooked.png", groups = { food = 2, eatable = 5 }, on_use = minetest.item_eat(5), @@ -414,8 +413,8 @@ end if c("rabbit_hide") then minetest.register_craftitem("mobs_mc:rabbit_hide", { - description = S("Rabbit Hide"), - _doc_items_longdesc = S("Rabbit hide is used to create leather."), + description = "Rabbit Hide", + _doc_items_longdesc = "Rabbit hide is used to create leather.", inventory_image = "mcl_mobitems_rabbit_hide.png" }) end @@ -432,8 +431,8 @@ end if c("rabbit_foot") then minetest.register_craftitem("mobs_mc:rabbit_foot", { - description = S("Rabbit's Foot"), - _doc_items_longdesc = S("This item is used in brewing."), + description = "Rabbit's Foot", + _doc_items_longdesc = "This item is used in brewing.", inventory_image = "mcl_mobitems_rabbit_foot.png" }) end @@ -441,8 +440,8 @@ end -- Sheep if c("mutton_raw") then minetest.register_craftitem("mobs_mc:mutton_raw", { - description = S("Raw Mutton"), - _doc_items_longdesc = S("Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value."), + description = "Raw Mutton", + _doc_items_longdesc = "Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.", inventory_image = "mcl_mobitems_mutton_raw.png", groups = { food = 2, eatable = 4 }, on_use = minetest.item_eat(4), @@ -451,8 +450,8 @@ end if c("mutton_cooked") then minetest.register_craftitem("mobs_mc:mutton_cooked", { - description = S("Cooked Mutton"), - _doc_items_longdesc = S("Cooked mutton is the cooked flesh from a sheep and is used as food."), + description = "Cooked Mutton", + _doc_items_longdesc = "Cooked mutton is the cooked flesh from a sheep and is used as food.", inventory_image = "mcl_mobitems_mutton_cooked.png", groups = { food = 2, eatable = 8 }, on_use = minetest.item_eat(8), @@ -471,8 +470,8 @@ end -- Shulker if c("shulker_shell") then minetest.register_craftitem("mobs_mc:shulker_shell", { - description = S("Shulker Shell"), - _doc_items_longdesc = S("Shulker shells are used in crafting. They are dropped from dead shulkers."), + description = "Shulker Shell", + _doc_items_longdesc = "Shulker shells are used in crafting. They are dropped from dead shulkers.", inventory_image = "mcl_mobitems_shulker_shell.png", groups = { craftitem = 1 }, }) @@ -481,8 +480,8 @@ end -- Magma cube if c("magma_cream") then minetest.register_craftitem("mobs_mc:magma_cream", { - description = S("Magma Cream"), - _doc_items_longdesc = S("Magma cream is a crafting component."), + description = "Magma Cream", + _doc_items_longdesc = "Magma cream is a crafting component.", wield_image = "mcl_mobitems_magma_cream.png", inventory_image = "mcl_mobitems_magma_cream.png", groups = { brewitem = 1 }, @@ -492,8 +491,8 @@ end -- Slime if c("slimeball") then minetest.register_craftitem("mobs_mc:slimeball", { - description = S("Slimeball"), - _doc_items_longdesc = S("Slimeballs are used in crafting. They are dropped from slimes."), + description = "Slimeball", + _doc_items_longdesc = "Slimeballs are used in crafting. They are dropped from slimes.", inventory_image = "mcl_mobitems_slimeball.png" }) if minetest.get_modpath("mesecons_materials") then @@ -507,8 +506,8 @@ end -- Spider if c("spider_eye") then minetest.register_craftitem("mobs_mc:spider_eye", { - description = S("Spider Eye"), - _doc_items_longdesc = S("Spider eyes are used mainly in crafting and brewing. Spider eyes can be eaten, but they poison you and reduce your health by 2 hit points."), + description = "Spider Eye", + _doc_items_longdesc = "Spider eyes are used mainly in crafting and brewing. Spider eyes can be eaten, but they poison you and reduce your health by 2 hit points.", inventory_image = "mcl_mobitems_spider_eye.png", wield_image = "mcl_mobitems_spider_eye.png", -- Simplified poisonous food @@ -593,8 +592,8 @@ end -- Rotten flesh if c("rotten_flesh") then minetest.register_craftitem("mobs_mc:rotten_flesh", { - description = S("Rotten Flesh"), - _doc_items_longdesc = S("Yuck! This piece of flesh clearly has seen better days. Eating it will only poison you and reduces your health by 4 hit points. But tamed wolves can eat it just fine."), + description = "Rotten Flesh", + _doc_items_longdesc = "Yuck! This piece of flesh clearly has seen better days. Eating it will only poison you and reduces your health by 4 hit points. But tamed wolves can eat it just fine.", inventory_image = "mcl_mobitems_rotten_flesh.png", -- Simplified poisonous food groups = { food = 2, eatable = -4 }, @@ -605,8 +604,8 @@ end -- Misc. if c("nether_star") then minetest.register_craftitem("mobs_mc:nether_star", { - description = S("Nether Star"), - _doc_items_longdesc = S("A nether star is a crafting component. It is dropped from the Wither."), + description = "Nether Star", + _doc_items_longdesc = "A nether star is a crafting component. It is dropped from the Wither.", inventory_image = "mcl_mobitems_nether_star.png" }) end @@ -634,9 +633,9 @@ end if c("bone") then minetest.register_craftitem("mobs_mc:bone", { - description = S("Bone"), - _doc_items_longdesc = S("Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient."), - _doc_items_usagehelp = S("Hold the bone in your hand near wolves to attract them. Rightclick the wolf to give it a bone and tame it."), + description = "Bone", + _doc_items_longdesc = "Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.", + _doc_items_usagehelp = "Hold the bone in your hand near wolves to attract them. Rightclick the wolf to give it a bone and tame it.", inventory_image = "mcl_mobitems_bone.png" }) if minetest.get_modpath("bones") then diff --git a/mods/ENTITIES/mobs_mc/2_throwing.lua b/mods/ENTITIES/mobs_mc/2_throwing.lua index 810c63f22..f3b40691e 100644 --- a/mods/ENTITIES/mobs_mc/2_throwing.lua +++ b/mods/ENTITIES/mobs_mc/2_throwing.lua @@ -3,9 +3,10 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +-- NOTE: Strings intentionally not marked for translation, other mods already have these items. +-- TODO: Remove this file eventually, all items here are already outsourced in other mods. + +local S = minetest.get_translator("mobs_mc") --maikerumines throwing code --arrow (weapon) @@ -14,15 +15,18 @@ local c = mobs_mc.is_item_variable_overridden minetest.register_node("mobs_mc:arrow_box", { drawtype = "nodebox", + is_ground_content = false, node_box = { type = "fixed", fixed = { -- Shaft - {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, - --Spitze + {-6.5/17, -1.5/17, -1.5/17, -4.5/17, 1.5/17, 1.5/17}, + {-4.5/17, -0.5/17, -0.5/17, 5.5/17, 0.5/17, 0.5/17}, + {5.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + -- Tip {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, - --Federn + -- Fletching {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, @@ -35,7 +39,16 @@ minetest.register_node("mobs_mc:arrow_box", { } }, tiles = {"mcl_bows_arrow.png^[transformFX", "mcl_bows_arrow.png^[transformFX", "mcl_bows_arrow_back.png", "mcl_bows_arrow_front.png", "mcl_bows_arrow.png", "mcl_bows_arrow.png^[transformFX"}, - groups = {not_in_creative_inventory=1}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + groups = {not_in_creative_inventory=1, dig_immediate=3}, + node_placement_prediction = "", + on_construct = function(pos) + minetest.log("error", "[mobs_mc] Trying to construct mobs_mc:arrow_box at "..minetest.pos_to_string(pos)) + minetest.remove_node(pos) + end, + drop = "", }) local THROWING_ARROW_ENTITY={ @@ -116,9 +129,9 @@ local throwing_shoot_arrow = function(itemstack, player) local playerpos = player:get_pos() local obj = minetest.add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, arrow[2]) --mc local dir = player:get_look_dir() - obj:setvelocity({x=dir.x*22, y=dir.y*22, z=dir.z*22}) - obj:setacceleration({x=dir.x*-3, y=-10, z=dir.z*-3}) - obj:setyaw(player:get_look_yaw()+math.pi) + obj:set_velocity({x=dir.x*22, y=dir.y*22, z=dir.z*22}) + obj:set_acceleration({x=dir.x*-3, y=-10, z=dir.z*-3}) + obj:set_yaw(player:get_look_yaw()+math.pi) minetest.sound_play("throwing_sound", {pos=playerpos}) if obj:get_luaentity().player == "" then obj:get_luaentity().player = player @@ -132,9 +145,9 @@ end if c("arrow") then minetest.register_craftitem("mobs_mc:arrow", { - description = S("Arrow"), - _doc_items_longdesc = S("Arrows are ammunition for bows."), - _doc_items_usagehelp = S("To use arrows as ammunition for a bow, put them in the inventory slot following the bow. Slots are counted left to right, top to bottom."), + description = "Arrow", + _doc_items_longdesc = "Arrows are ammunition for bows.", + _doc_items_usagehelp = "To use arrows as ammunition for a bow, put them in the inventory slot following the bow. Slots are counted left to right, top to bottom.", inventory_image = "mcl_bows_arrow_inv.png", }) end @@ -152,9 +165,9 @@ end if c("bow") then minetest.register_tool("mobs_mc:bow_wood", { - description = S("Bow"), - _doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes."), - _doc_items_usagehelp = S("To use the bow, you first need to have at least one arrow in slot following the bow. Leftclick to shoot. Each hit deals 3 damage."), + description = "Bow", + _doc_items_longdesc = "Bows are ranged weapons to shoot arrows at your foes.", + _doc_items_usagehelp = "To use the bow, you first need to have at least one arrow in slot following the bow. Leftclick to shoot. Each hit deals 3 damage.", inventory_image = "mcl_bows_bow.png", on_use = function(itemstack, user, pointed_thing) if throwing_shoot_arrow(itemstack, user, pointed_thing) then @@ -197,8 +210,8 @@ if c("egg") then }, nil) end, - hit_mob = function(self, player) - player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, { + hit_mob = function(self, mob) + mob:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {}, }, nil) @@ -267,13 +280,13 @@ if c("egg") then ent.velocity = egg_VELOCITY -- needed for api internal timing ent.switch = 1 -- needed so that egg doesn't despawn straight away - obj:setvelocity({ + obj:set_velocity({ x = dir.x * egg_VELOCITY, y = dir.y * egg_VELOCITY, z = dir.z * egg_VELOCITY }) - obj:setacceleration({ + obj:set_acceleration({ x = dir.x * -3, y = -egg_GRAVITY, z = dir.z * -3 @@ -291,8 +304,8 @@ if c("egg") then end minetest.register_craftitem("mobs_mc:egg", { - description = S("Egg"), - _doc_items_longdesc = S("Eggs can be thrown and break on impact. There is a small chance that 1 or even 4 chicks will pop out"), + description = "Egg", + _doc_items_longdesc = "Eggs can be thrown and break on impact. There is a small chance that 1 or even 4 chicks will pop out", _doc_items_usagehelp = how_to_throw, inventory_image = "mobs_chicken_egg.png", on_use = mobs_shoot_egg, @@ -351,13 +364,13 @@ if c("snowball") then ent.velocity = snowball_VELOCITY -- needed for api internal timing ent.switch = 1 -- needed so that egg doesn't despawn straight away - obj:setvelocity({ + obj:set_velocity({ x = dir.x * snowball_VELOCITY, y = dir.y * snowball_VELOCITY, z = dir.z * snowball_VELOCITY }) - obj:setacceleration({ + obj:set_acceleration({ x = dir.x * -3, y = -snowball_GRAVITY, z = dir.z * -3 @@ -377,8 +390,8 @@ if c("snowball") then -- Snowball minetest.register_craftitem("mobs_mc:snowball", { - description = S("Snowball"), - _doc_items_longdesc = S("Snowballs can be thrown at your enemies. A snowball deals 3 damage to blazes, but is harmless to anything else."), + description = "Snowball", + _doc_items_longdesc = "Snowballs can be thrown at your enemies. A snowball deals 3 damage to blazes, but is harmless to anything else.", _doc_items_usagehelp = how_to_throw, inventory_image = "mcl_throwing_snowball.png", on_use = mobs_shoot_snowball, diff --git a/mods/ENTITIES/mobs_mc/3_shared.lua b/mods/ENTITIES/mobs_mc/3_shared.lua index 411033598..fce0850b4 100644 --- a/mods/ENTITIES/mobs_mc/3_shared.lua +++ b/mods/ENTITIES/mobs_mc/3_shared.lua @@ -53,7 +53,7 @@ mobs_mc.make_owner_teleport_function = function(dist, teleport_check_interval) if minetest.registered_nodes[minetest.get_node(telepos).name].walkable == false and minetest.registered_nodes[minetest.get_node(telepos_below).name].walkable == true then -- Correct position found! Let's teleport. - self.object:setpos(telepos) + self.object:set_pos(telepos) return end end diff --git a/mods/ENTITIES/mobs_mc/4_heads.lua b/mods/ENTITIES/mobs_mc/4_heads.lua index 80c971988..01b8ee577 100644 --- a/mods/ENTITIES/mobs_mc/4_heads.lua +++ b/mods/ENTITIES/mobs_mc/4_heads.lua @@ -1,9 +1,10 @@ --MC Heads for minetest --maikerumine --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +-- NOTE: Strings intentionally not marked for translation, other mods already have these items. +-- TODO: Remove this file eventually, all items here are already outsourced in other mods. + +local S = minetest.get_translator("mobs_mc") -- Heads system @@ -55,7 +56,7 @@ local function addhead(mobname, desc, longdesc) end -- Add heads -addhead("zombie", S("Zombie Head"), S("A zombie head is a small decorative block which resembles the head of a zombie.")) -addhead("creeper", S("Creeper Head"), S("A creeper head is a small decorative block which resembles the head of a creeper.")) -addhead("skeleton", S("Skeleton Skull"), S("A skeleton skull is a small decorative block which resembles the skull of a skeleton.")) -addhead("wither_skeleton", S("Wither Skeleton Skull"), S("A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton.")) +addhead("zombie", "Zombie Head", "A zombie head is a small decorative block which resembles the head of a zombie.") +addhead("creeper", "Creeper Head", "A creeper head is a small decorative block which resembles the head of a creeper.") +addhead("skeleton", "Skeleton Skull", "A skeleton skull is a small decorative block which resembles the skull of a skeleton.") +addhead("wither_skeleton", "Wither Skeleton Skull", "A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton.") diff --git a/mods/ENTITIES/mobs_mc/LICENSE-media.md b/mods/ENTITIES/mobs_mc/LICENSE-media.md index 7cad2241c..696150480 100644 --- a/mods/ENTITIES/mobs_mc/LICENSE-media.md +++ b/mods/ENTITIES/mobs_mc/LICENSE-media.md @@ -81,6 +81,9 @@ Origin of those models: * PilzAdam and Wuzzy (CC0) * `mobs_mc_chicken_lay_egg.ogg` +* [AGFX](http://www.freesound.org/people/DrMinky/sounds/) (CC0) + * `mobs_mc_chicken_child.ogg` + * Source: * Randomation (CC0) * `green_slime_damage.ogg` * `green_slime_attack.ogg` diff --git a/mods/ENTITIES/mobs_mc/agent.lua b/mods/ENTITIES/mobs_mc/agent.lua index 9de2292e8..0a5f0354f 100644 --- a/mods/ENTITIES/mobs_mc/agent.lua +++ b/mods/ENTITIES/mobs_mc/agent.lua @@ -2,9 +2,7 @@ --################### AGENT --################### --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:agent", { type = "npc", @@ -21,6 +19,7 @@ mobs:register_mob("mobs_mc:agent", { }, -- TODO: sounds visual_size = {x=3, y=3}, + walk_chance = 0, walk_velocity = 0.6, run_velocity = 2, jump = true, diff --git a/mods/ENTITIES/mobs_mc/bat.lua b/mods/ENTITIES/mobs_mc/bat.lua index 6021b424f..36415470a 100644 --- a/mods/ENTITIES/mobs_mc/bat.lua +++ b/mods/ENTITIES/mobs_mc/bat.lua @@ -1,8 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:bat", { type = "animal", @@ -42,9 +40,6 @@ mobs:register_mob("mobs_mc:bat", { ]] }, - water_damage = 1, - lava_damage = 4, - light_damage = 0, fall_damage = 0, view_range = 16, diff --git a/mods/ENTITIES/mobs_mc/blaze.lua b/mods/ENTITIES/mobs_mc/blaze.lua index 0f8476358..400a5339f 100644 --- a/mods/ENTITIES/mobs_mc/blaze.lua +++ b/mods/ENTITIES/mobs_mc/blaze.lua @@ -3,11 +3,8 @@ -- Model and mobs_blaze.png see https://github.com/22i/minecraft-voxel-blender-models -- blaze.lua partial copy of mobs_mc/ghast.lua --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") ---dofile(minetest.get_modpath("mobs").."/api.lua") --################### --################### BLAZE --################### @@ -56,6 +53,7 @@ mobs:register_mob("mobs_mc:blaze", { -- MC Wiki: takes 1 damage every half second while in water water_damage = 2, lava_damage = 0, + fire_damage = 0, fall_damage = 0, fall_speed = -2.25, light_damage = 0, @@ -68,8 +66,8 @@ mobs:register_mob("mobs_mc:blaze", { jump_height = 4, fly = true, jump_chance = 98, - fear_height = 120, - blood_amount = 0, + fear_height = 0, + glow = 14, }) mobs:spawn_specific("mobs_mc:blaze", mobs_mc.spawn.nether_fortress, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 5000, 3, mobs_mc.spawn_height.nether_min, mobs_mc.spawn_height.nether_max) @@ -89,8 +87,8 @@ mobs:register_arrow("mobs_mc:blaze_fireball", { }, nil) end, - hit_mob = function(self, player) - player:punch(self.object, 1.0, { + hit_mob = function(self, mob) + mob:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 5}, }, nil) @@ -101,7 +99,7 @@ mobs:register_arrow("mobs_mc:blaze_fireball", { if node.name == "air" then minetest.set_node(pos_above, {name=mobs_mc.items.fire}) else - local v = self.object:getvelocity() + local v = self.object:get_velocity() v = vector.normalize(v) local crashpos = vector.subtract(pos, v) local crashnode = minetest.get_node(crashpos) diff --git a/mods/ENTITIES/mobs_mc/chicken.lua b/mods/ENTITIES/mobs_mc/chicken.lua index 0c3d0510f..e5c9ba80b 100644 --- a/mods/ENTITIES/mobs_mc/chicken.lua +++ b/mods/ENTITIES/mobs_mc/chicken.lua @@ -1,11 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - - ---dofile(minetest.get_modpath("mobs").."/api.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### CHICKEN @@ -40,9 +35,6 @@ mobs:register_mob("mobs_mc:chicken", { min = 0, max = 2,}, }, - water_damage = 1, - lava_damage = 4, - light_damage = 0, fall_damage = 0, fall_speed = -2.25, sounds = { @@ -50,6 +42,12 @@ mobs:register_mob("mobs_mc:chicken", { -- TODO: death, damage distance = 16, }, + sounds_child = { + random = "mobs_mc_chicken_child", + damage = "mobs_mc_chicken_child", + death = "mobs_mc_chicken_child", + distance = 16, + }, animation = { stand_speed = 25, walk_speed = 25, run_speed = 50, stand_start = 0, stand_end = 0, diff --git a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua index 48a6aac7a..cfc4991f5 100644 --- a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua +++ b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua @@ -1,8 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") local cow_def = { type = "animal", @@ -28,9 +26,6 @@ local cow_def = { min = 0, max = 2,}, }, - water_damage = 1, - lava_damage = 5, - light_damage = 0, runaway = true, sounds = { random = "mobs_mc_cow", @@ -100,10 +95,10 @@ mooshroom_def.on_rightclick = function(self, clicker) minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_red .. " 5") end - local oldyaw = self.object:getyaw() + local oldyaw = self.object:get_yaw() self.object:remove() local cow = minetest.add_entity(pos, "mobs_mc:cow") - cow:setyaw(oldyaw) + cow:set_yaw(oldyaw) if not minetest.settings:get_bool("creative_mode") then item:add_wear(mobs_mc.misc.shears_wear) diff --git a/mods/ENTITIES/mobs_mc/creeper.lua b/mods/ENTITIES/mobs_mc/creeper.lua index 77fd06ac7..07750ff28 100644 --- a/mods/ENTITIES/mobs_mc/creeper.lua +++ b/mods/ENTITIES/mobs_mc/creeper.lua @@ -1,11 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") - +local S = minetest.get_translator("mobs_mc") --################### --################### CREEPER @@ -119,10 +114,7 @@ mobs:register_mob("mobs_mc:creeper", { }, floats = 1, fear_height = 4, - lava_damage = 4, - light_damage = 0, view_range = 16, - blood_amount = 0, }) diff --git a/mods/ENTITIES/mobs_mc/depends.txt b/mods/ENTITIES/mobs_mc/depends.txt index 2b399cc63..b37d4adb9 100644 --- a/mods/ENTITIES/mobs_mc/depends.txt +++ b/mods/ENTITIES/mobs_mc/depends.txt @@ -8,5 +8,4 @@ mcl_fishing? bones? mesecons_materials? mobs_mc_gameconfig? -intllib? doc_items? diff --git a/mods/ENTITIES/mobs_mc/ender_dragon.lua b/mods/ENTITIES/mobs_mc/ender_dragon.lua index 1492fde53..ccd2fe30d 100644 --- a/mods/ENTITIES/mobs_mc/ender_dragon.lua +++ b/mods/ENTITIES/mobs_mc/ender_dragon.lua @@ -2,39 +2,8 @@ --################### ENDERDRAGON --################### --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") ---[[ -mobs:register_mob("mobs_mc:12enderdragon", { - type = "animal", - passive = true, - runaway = true, - stepheight = 1.2, - hp_min = 30, - hp_max = 60, - armor = 150, - collisionbox = {-0.35, -0.01, -0.35, 0.35, 2, 0.35}, - visual = "mesh", - mesh = "enderdragon.b3d", - textures = { - {"enderdragon.png"}, - }, - visual_size = {x=1, y=1}, - walk_velocity = 0.6, - run_velocity = 2, - jump = true, - animation = { - speed_normal = 25, speed_run = 50, - stand_start = 0, stand_end = 20, - walk_start = 0, walk_end = 20, - run_start = 0, run_end = 20, - }, -}) - -mobs:register_egg("mobs_mc:12enderdragon", "Enderdragon", "enderdragon_inv.png", 0) -]] mobs:register_mob("mobs_mc:enderdragon", { type = "monster", pathfinding = 1, @@ -65,7 +34,6 @@ mobs:register_mob("mobs_mc:enderdragon", { jump_height = 14, stepheight = 1.2, jump_chance = 100, - fear_height = 120, fly = true, fly_in = {"air"}, dogshoot_switch = 1, @@ -79,9 +47,8 @@ mobs:register_mob("mobs_mc:enderdragon", { min = 1, max = 1}, }, - water_damage = 0, lava_damage = 0, - light_damage = 0, + fire_damage = 0, on_rightclick = nil, attack_type = "dogshoot", arrow = "mobs_mc:fireball2", @@ -93,7 +60,6 @@ mobs:register_mob("mobs_mc:enderdragon", { walk_start = 0, walk_end = 20, run_start = 0, run_end = 20, }, - blood_amount = 0, ignores_nametag = true, }) @@ -126,7 +92,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", { for _,obj in ipairs(objects) do local name = self.name if name~="mobs_mc:roar_of_the_dragon2" and name ~= "mobs_mc:enderdragon" then - obj:set_hp(obj:get_hp()-0.05) + obj:set_hp(obj:get_hp()-5) if (obj:get_hp() <= 0) then if (not obj:is_player()) and name ~= self.object:get_luaentity().name then obj:remove() diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index 06998175c..124a2c9df 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -10,12 +10,7 @@ -- and they are provoked by looking directly at them. -- TODO: Implement MC behaviour. --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") - +local S = minetest.get_translator("mobs_mc") --################### --################### ENDERMAN @@ -314,7 +309,7 @@ mobs:register_mob("mobs_mc:enderman", { end end if telepos then - self.object:setpos(telepos) + self.object:set_pos(telepos) end end end, @@ -325,14 +320,11 @@ mobs:register_mob("mobs_mc:enderman", { end end, water_damage = 8, - lava_damage = 4, - light_damage = 0, -- TODO: Increase view range when it detects being seen -- Low view range to emulate that behaviour somehow view_range = 4, fear_height = 4, attack_type = "dogfight", - blood_amount = 0, }) diff --git a/mods/ENTITIES/mobs_mc/endermite.lua b/mods/ENTITIES/mobs_mc/endermite.lua index 6cdcaf765..5a9793cd4 100644 --- a/mods/ENTITIES/mobs_mc/endermite.lua +++ b/mods/ENTITIES/mobs_mc/endermite.lua @@ -2,9 +2,7 @@ --################### ENDERMITE --################### --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:endermite", { type = "monster", @@ -29,14 +27,10 @@ mobs:register_mob("mobs_mc:endermite", { walk_velocity = 1, run_velocity = 2, jump = true, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fear_height = 4, view_range = 16, damage = 2, reach = 1, - blood_amount = 0, }) mobs:register_egg("mobs_mc:endermite", S("Endermite"), "mobs_mc_spawn_icon_endermite.png", 0) diff --git a/mods/ENTITIES/mobs_mc/ghast.lua b/mods/ENTITIES/mobs_mc/ghast.lua index 26912f43f..fe14e0e6e 100644 --- a/mods/ENTITIES/mobs_mc/ghast.lua +++ b/mods/ENTITIES/mobs_mc/ghast.lua @@ -3,11 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### GHAST @@ -57,8 +53,6 @@ mobs:register_mob("mobs_mc:ghast", { walk_start = 0, walk_end = 40, run_start = 0, run_end = 40, }, - lava_damage = 4, - light_damage = 0, fall_damage = 0, view_range = 100, --attack_type = "dogshoot", @@ -77,8 +71,6 @@ mobs:register_mob("mobs_mc:ghast", { fly = true, fly_in = {"air"}, jump_chance = 98, - fear_height = 120, - blood_amount = 0, }) @@ -99,8 +91,8 @@ mobs:register_arrow(":mobs_monster:fireball", { }, nil) end, - hit_mob = function(self, player) - player:punch(self.object, 1.0, { + hit_mob = function(self, mob) + mob:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8}, }, nil) diff --git a/mods/ENTITIES/mobs_mc/guardian.lua b/mods/ENTITIES/mobs_mc/guardian.lua index 56bda522f..503417d21 100644 --- a/mods/ENTITIES/mobs_mc/guardian.lua +++ b/mods/ENTITIES/mobs_mc/guardian.lua @@ -4,14 +4,13 @@ --################### GUARDIAN --################### --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:guardian", { type = "monster", hp_min = 30, hp_max = 30, + breath_max = -1, passive = false, attack_type = "dogfight", pathfinding = 1, @@ -78,10 +77,6 @@ mobs:register_mob("mobs_mc:guardian", { stepheight = 0.1, jump = false, view_range = 16, - water_damage = 0, - lava_damage = 4, - light_damage = 0, - blood_amount = 0, }) mobs:spawn_specific("mobs_mc:guardian", mobs_mc.spawn.water, mobs_mc.spawn_water, 0, minetest.LIGHT_MAX+1, 30, 25000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.water - 10) diff --git a/mods/ENTITIES/mobs_mc/guardian_elder.lua b/mods/ENTITIES/mobs_mc/guardian_elder.lua index 11dba11a9..61f5097d4 100644 --- a/mods/ENTITIES/mobs_mc/guardian_elder.lua +++ b/mods/ENTITIES/mobs_mc/guardian_elder.lua @@ -4,14 +4,13 @@ --################### GUARDIAN --################### --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:guardian_elder", { type = "monster", hp_min = 80, hp_max = 80, + breath_max = -1, passive = false, attack_type = "dogfight", pathfinding = 1, @@ -82,11 +81,7 @@ mobs:register_mob("mobs_mc:guardian_elder", { fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source }, stepheight = 0.1, jump = false, - water_damage = 0, - lava_damage = 4, - light_damage = 0, view_range = 16, - blood_amount = 0, }) mobs:spawn_specific("mobs_mc:guardian_elder", mobs_mc.spawn.water, mobs_mc.spawn_water, 0, minetest.LIGHT_MAX+1, 30, 40000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.water-18) diff --git a/mods/ENTITIES/mobs_mc/horse.lua b/mods/ENTITIES/mobs_mc/horse.lua index 45ff5ee81..7eea999ad 100644 --- a/mods/ENTITIES/mobs_mc/horse.lua +++ b/mods/ENTITIES/mobs_mc/horse.lua @@ -3,9 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### HORSE @@ -118,8 +116,6 @@ local horse = { hp_min = 15, hp_max = 30, floats = 1, - lava_damage = 4, - water_damage = 1, makes_footstep_sound = true, jump = true, jump_height = 5.75, -- can clear 2.5 blocks @@ -142,7 +138,7 @@ local horse = { self.max_speed_reverse = 2 self.accel = 6 self.terrain_type = 3 - self.driver_attach_at = {x = 0, y = 7.5, z = -1.75} + self.driver_attach_at = {x = 0, y = 4.17, z = -1.75} self.driver_eye_offset = {x = 0, y = 3, z = 0} self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y} end @@ -326,6 +322,7 @@ mobs:register_mob("mobs_mc:horse", horse) -- Skeleton horse local skeleton_horse = table.copy(horse) +skeleton_horse.breath_max = -1 skeleton_horse.textures = {{"blank.png", "mobs_mc_horse_skeleton.png", "blank.png"}} skeleton_horse.drops = { {name = mobs_mc.items.bone, @@ -339,11 +336,11 @@ skeleton_horse.sounds = { damage = "mobs_mc_skeleton_hurt", distance = 16, } -skeleton_horse.blood_amount = 0 mobs:register_mob("mobs_mc:skeleton_horse", skeleton_horse) -- Zombie horse local zombie_horse = table.copy(horse) +zombie_horse.breath_max = -1 zombie_horse.textures = {{"blank.png", "mobs_mc_horse_zombie.png", "blank.png"}} zombie_horse.drops = { {name = mobs_mc.items.rotten_flesh, diff --git a/mods/ENTITIES/mobs_mc/intllib.lua b/mods/ENTITIES/mobs_mc/intllib.lua deleted file mode 100644 index 6669d7202..000000000 --- a/mods/ENTITIES/mobs_mc/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/mods/ENTITIES/mobs_mc/iron_golem.lua b/mods/ENTITIES/mobs_mc/iron_golem.lua index ebd93dc64..046c655ac 100644 --- a/mods/ENTITIES/mobs_mc/iron_golem.lua +++ b/mods/ENTITIES/mobs_mc/iron_golem.lua @@ -3,11 +3,8 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") ---dofile(minetest.get_modpath("mobs").."/api.lua") --################### --################### IRON GOLEM --################### @@ -19,6 +16,7 @@ mobs:register_mob("mobs_mc:iron_golem", { passive = true, hp_min = 100, hp_max = 100, + breath_max = -1, collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.69, 0.7}, visual = "mesh", mesh = "mobs_mc_iron_golem.b3d", @@ -51,9 +49,6 @@ mobs:register_mob("mobs_mc:iron_golem", { min = 0, max = 2,}, }, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fall_damage = 0, animation = { stand_speed = 15, walk_speed = 15, run_speed = 25, punch_speed = 15, @@ -63,7 +58,6 @@ mobs:register_mob("mobs_mc:iron_golem", { punch_start = 40, punch_end = 50, }, jump = true, - blood_amount = 0, }) diff --git a/mods/ENTITIES/mobs_mc/llama.lua b/mods/ENTITIES/mobs_mc/llama.lua index 711fb1344..079567613 100644 --- a/mods/ENTITIES/mobs_mc/llama.lua +++ b/mods/ENTITIES/mobs_mc/llama.lua @@ -1,6 +1,4 @@ --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### LLAMA @@ -34,9 +32,6 @@ mobs:register_mob("mobs_mc:llama", { min = 0, max = 2,}, }, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fear_height = 4, sounds = { random = "mobs_mc_llama", @@ -58,7 +53,7 @@ mobs:register_mob("mobs_mc:llama", { look_start = 78, look_end = 108, }, - follow = mobs_mc.items.horse, + follow = mobs_mc.follow.llama, view_range = 16, do_custom = function(self, dtime) @@ -69,7 +64,7 @@ mobs:register_mob("mobs_mc:llama", { self.max_speed_reverse = 2 self.accel = 4 self.terrain_type = 3 - self.driver_attach_at = {x = 0, y = 7.5, z = -1.5} + self.driver_attach_at = {x = 0, y = 4.17, z = -1.5} self.driver_eye_offset = {x = 0, y = 3, z = 0} self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y} end diff --git a/mods/ENTITIES/mobs_mc/locale/de_DE.po b/mods/ENTITIES/mobs_mc/locale/de_DE.po deleted file mode 100644 index 21ce7900d..000000000 --- a/mods/ENTITIES/mobs_mc/locale/de_DE.po +++ /dev/null @@ -1,742 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-25 18:45+0100\n" -"PO-Revision-Date: 2018-01-25 18:48+0100\n" -"Last-Translator: Wuzzy \n" -"Language-Team: \n" -"Language: de_DE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.5\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: 1_items_default.lua -msgid "Blaze Rod" -msgstr "Lohenrute" - -#: 1_items_default.lua -msgid "This is a crafting component dropped from dead blazes." -msgstr "Dies ist eine Fertigungskomponente, welche von toten Lohen abfällt." - -#: 1_items_default.lua -msgid "Blaze Powder" -msgstr "Lohenstaub" - -#: 1_items_default.lua -msgid "This item is mainly used for brewing potions and crafting." -msgstr "" -"Dieser Gegenstand wird hauptsächlich für die Trankzubereitung und die " -"Fertigung benutzt." - -#: 1_items_default.lua -msgid "Raw Chicken" -msgstr "Rohes Hühnchen" - -#: 1_items_default.lua -msgid "" -"Raw chicken is a food item and can be eaten safely. Cooking it will increase " -"its nutritional value." -msgstr "" -"Rohes Hühnchen ist ein Lebensmittel und kann problemlos gegessen werden. Es " -"kann gegart werden, um den Nährwert zu erhöhen." - -#: 1_items_default.lua -msgid "Cooked Chicken" -msgstr "Gebratenes Hühnchen" - -#: 1_items_default.lua -msgid "A cooked chicken is a healthy food item which can be eaten." -msgstr "Ein gekochtes Hühnchen ist ein gesundes essbares Lebensmittel." - -#: 1_items_default.lua -msgid "Feather" -msgstr "Feder" - -#: 1_items_default.lua -msgid "Feathers are used in crafting and are dropped from chickens." -msgstr "" -"Federn werden für die Fertigung benutzt und werden von Hühnern fallen " -"gelassen." - -#: 1_items_default.lua -msgid "Raw Beef" -msgstr "Rohes Rindfleisch" - -#: 1_items_default.lua -msgid "" -"Raw beef is the flesh from cows and can be eaten safely. Cooking it will " -"greatly increase its nutritional value." -msgstr "" -"Rohes Rindfleisch ist das Fleisch von Kühen und kann problemlos gegessen " -"werden. Es kann gegart werden, um den Nährwert deutlich zu erhöhen." - -#: 1_items_default.lua -msgid "Steak" -msgstr "Steak" - -#: 1_items_default.lua -msgid "Steak is cooked beef from cows and can be eaten." -msgstr "Steak ist gebratenes Rindfleisch und kann gegessen werden." - -#: 1_items_default.lua -msgid "Milk" -msgstr "Milch" - -#: 1_items_default.lua -msgid "Milk is a food item obtained by using a bucket on a cow." -msgstr "" -"Milch ist ein Lebensmittel, das man erhält, wenn man einen Eimer an einer " -"Kuh benutzt." - -#: 1_items_default.lua -msgid "Bowl" -msgstr "Schale" - -#: 1_items_default.lua -msgid "Bowls are mainly used to hold tasty soups." -msgstr "Schüsseln werden benutzt, um leckere Suppen zu transportieren." - -#: 1_items_default.lua -msgid "Mushroom Stew" -msgstr "Pilzsuppe" - -#: 1_items_default.lua -msgid "Mushroom stew is a healthy soup." -msgstr "Pilzsuppe ist ein leckeres Gericht." - -#: 1_items_default.lua -msgid "Dragon Egg" -msgstr "Drachenei" - -#: 1_items_default.lua -msgid "Eye of Ender" -msgstr "Enderauge" - -#: 1_items_default.lua -msgid "Ghast Tear" -msgstr "Ghastträne" - -#: 1_items_default.lua -msgid "" -"A ghast tear is an item used in potion brewing. It is dropped from dead " -"ghasts." -msgstr "" -"Eine Ghastträne kann für die Trankzubereitung benutzt werden. Sie wird von " -"toten Ghasts abgeworfen." - -#: 1_items_default.lua -msgid "Saddle" -msgstr "Sattel" - -#: 1_items_default.lua -msgid "" -"Saddles can be put on horses, donkeys, mules and pigs in order to mount them." -msgstr "" -"Sattel können auf Pferden, Eseln, Maultieren und Schweinen platziert werden, " -"um sich aufzusatteln." - -#: 1_items_default.lua -msgid "" -"Rightclick an animal while holding a saddle to put on the saddle. You can " -"now mount the animal by rightclicking it again." -msgstr "" -"Rechtsklick auf ein Tier mit einem Sattel in der Hand, um den Sattel zu " -"platzieren. Sie können sich nun mit Rechtsklick auf das Tier setzen." - -#: 1_items_default.lua -msgid "" -"Rightclick a horse to put on the horse armor. Donkeys and mules can't wear " -"horse armor." -msgstr "" -"Rechts auf ein Pferd klicken, um die Pferderüstung zu benutzen. Das " -"funktioniert nicht mit Eseln und Maultieren." - -#: 1_items_default.lua -msgid "Iron Horse Armor" -msgstr "Eiserne Pferderüstung" - -#: 1_items_default.lua -msgid "" -"Iron horse armor can be worn by horses to increase their protection from " -"harm a bit." -msgstr "" -"Die Eisenpferderüstung kann von Pferden getragen werden, um sie etwas vor " -"Schaden zu schützen." - -#: 1_items_default.lua -msgid "Golden Horse Armor" -msgstr "Goldene Pferderüstung" - -#: 1_items_default.lua -msgid "" -"Golden horse armor can be worn by horses to increase their protection from " -"harm." -msgstr "" -"Die Goldpferderüstung kann von Pferden getragen werden, um sie vor Schaden " -"zu schützen." - -#: 1_items_default.lua -msgid "Diamond Horse Armor" -msgstr "Diamantene Pferderüstung" - -#: 1_items_default.lua -msgid "" -"Diamond horse armor can be worn by horses to greatly increase their " -"protection from harm." -msgstr "" -"Die Diamantpferderüstung kann von Pferden getragen werden, um ihre " -"Schadenstoleranz stark zu erhöhen." - -#: 1_items_default.lua -msgid "Raw Porkchop" -msgstr "Rohes Schweinefleisch" - -#: 1_items_default.lua -msgid "" -"A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it " -"will greatly increase its nutritional value." -msgstr "" -"Ein rohes Stück Schweinefleisch kann bedenkenlos gegessen werden. Man kann " -"es braten, um seinen Nährwert stark zu erhöhen." - -#: 1_items_default.lua -msgid "Cooked Porkchop" -msgstr "Gebratenes Schweinefleisch" - -#: 1_items_default.lua -msgid "Carrot on a Stick" -msgstr "Karottenrute" - -#: 1_items_default.lua -msgid "" -"A carrot on a stick can be used on saddled pigs to ride them. Pigs will also " -"follow anyone who holds a carrot on a stick near them." -msgstr "" -"Eine Karottenrute kann auf gesattelten Schweinen angewendet werden, um sie " -"zu reiten. Schweine folgen auch jeden, der eine Karottenrüte trägt." - -#: 1_items_default.lua -msgid "" -"Rightclick a saddled pig with the carrot on a stick to mount it. You can now " -"ride it like a horse." -msgstr "" -"Rechts auf ein gesatteltes Schwein klicken, um sich draufzusetzen. Jetzt " -"kann das Schwein wie ein Pferd geritten werden." - -#: 1_items_default.lua -msgid "Raw Rabbit" -msgstr "Rohes Kaninchen" - -#: 1_items_default.lua -msgid "" -"Raw rabbit is a food item from a dead rabbit. It can be eaten safely. " -"Cooking it will increase its nutritional value." -msgstr "" -"Rohes Kaninchenfleisch ist ein Lebensmittel, welches bedenkenlos verzehrt " -"werden kann. Es kann gebraten werden, um seinen Nährwert zu erhöhen." - -#: 1_items_default.lua -msgid "Cooked Rabbit" -msgstr "Gebratenes Kaninchen" - -#: 1_items_default.lua -msgid "This is a food item which can be eaten." -msgstr "Dies ist ein Lebensmittel." - -#: 1_items_default.lua -msgid "Rabbit Hide" -msgstr "Kaninchenfell" - -#: 1_items_default.lua -msgid "Rabbit hide is used to create leather." -msgstr "Aus Kaninchenfellen wird Leder gefertigt." - -#: 1_items_default.lua -msgid "Rabbit's Foot" -msgstr "Hasenpfote" - -#: 1_items_default.lua -msgid "This item is used in brewing." -msgstr "Dieser Gegenstand wird zum Brauen benutzt." - -#: 1_items_default.lua -msgid "Raw Mutton" -msgstr "Rohes Hammelfleisch" - -#: 1_items_default.lua -msgid "" -"Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it " -"will greatly increase its nutritional value." -msgstr "" -"Rohes Hammelfleisch ist das Fleisch eines Schafes und ein Lebensmittel, " -"welches bedenkenlos verzehrt werden kann. Es kann gebraten werden, um seinen " -"Nährwert deutlich zu erhöhen." - -#: 1_items_default.lua -msgid "Cooked Mutton" -msgstr "Gebratenes Hammelfleisch" - -#: 1_items_default.lua -msgid "Cooked mutton is the cooked flesh from a sheep and is used as food." -msgstr "" -"Gebratenes Hammelfleisch ist das gebratene Fleisch eines Schafs und dient " -"als Lebensmittel." - -#: 1_items_default.lua -msgid "Shulker Shell" -msgstr "Shulkerschale" - -#: 1_items_default.lua -msgid "" -"Shulker shells are used in crafting. They are dropped from dead shulkers." -msgstr "" -"Shulkerschalen werden für die Fertigung verwendet. Sie werden von toten " -"Shulkern fallen gelassen." - -#: 1_items_default.lua -msgid "Magma Cream" -msgstr "Magmacreme" - -#: 1_items_default.lua -msgid "Magma cream is a crafting component." -msgstr "Magmacreme wird zum Fertigen benutzt." - -#: 1_items_default.lua -msgid "Slimeball" -msgstr "Schleimkugel" - -#: 1_items_default.lua -msgid "Slimeballs are used in crafting. They are dropped from slimes." -msgstr "" -"Schleimkugeln werden in der Fertigung benutzt. Sie werden von Schleimen " -"fallen gelassen." - -#: 1_items_default.lua -msgid "Spider Eye" -msgstr "Spinnenauge" - -#: 1_items_default.lua -msgid "" -"Spider eyes are used mainly in crafting and brewing. Spider eyes can be " -"eaten, but they poison you and reduce your health by 2 hit points." -msgstr "" -"Spinnenaugen werden hauptsächlich für die Fertigung und die Trankzubereitung " -"benutzt. Spinnenaugen können gegessen werden, aber sie vergiften Sie und Sie " -"verlieren 2 Trefferpunkte." - -#: 1_items_default.lua -msgid "Totem of Undying" -msgstr "Totem der Unsterblichkeit" - -#: 1_items_default.lua -msgid "" -"A totem of undying is a rare artifact which may safe you from certain death." -msgstr "" -"Ein Totem der Unsterblichkeit ist ein seltenes Artefakt, welches Sie vor dem " -"sicheren Tod bewahren kann." - -#: 1_items_default.lua -msgid "" -"The totem only works while you hold it in your hand. If you receive fatal " -"damage, you are saved from death and you get a second chance with 1 HP. The " -"totem is destroyed in the process, however." -msgstr "" -"Der Totem funktioniert nur, während Sie ihn in der Hand halten. Wenn sie " -"tödlichen Schaden erhalten, werden Sie vom Tod bewahrt und erhalten eine " -"zweite Lebenschance mit 1 HP. Der Totem geht dabei jedoch zu Bruch." - -#: 1_items_default.lua -msgid "Rotten Flesh" -msgstr "Verrottetes Fleisch" - -#: 1_items_default.lua -msgid "" -"Yuck! This piece of flesh clearly has seen better days. Eating it will only " -"poison you and reduces your health by 4 hit points. But tamed wolves can eat " -"it just fine." -msgstr "" -"Igitt! Dieses Stück Fleisch hat wohl bessere Tage gesehen. Wenn Sie es " -"essen, werden Sie sofort vergiftet und erleiden einen Schaden von 4 " -"Trefferpunkten. Aber gezähmte Wölfe können es problemlos fressen." - -#: 1_items_default.lua -msgid "Nether Star" -msgstr "Netherstern" - -#: 1_items_default.lua -msgid "A nether star is a crafting component. It is dropped from the Wither." -msgstr "" -"Ein Netherstern ist eine Fertigungskomponente. Er wird vom Wither abgeworfen." - -#: 1_items_default.lua -msgid "Bone" -msgstr "Knochen" - -#: 1_items_default.lua -msgid "" -"Bones can be used to tame wolves so they will protect you. They are also " -"useful as a crafting ingredient." -msgstr "" -"Knochen können benutzt werden, um Wölfe zu zähmen, damit sie einen " -"beschützen. Sie außerdem nützlich in der Fertigung." - -#: 1_items_default.lua -msgid "" -"Hold the bone in your hand near wolves to attract them. Rightclick the wolf " -"to give it a bone and tame it." -msgstr "" -"Halten Sie einen Knochen in der Nähe eines Wolfes, um ihn anzulocken. " -"Rechtsklick auf den Wolf, um ihn den Knochen zu geben un zu zähmen." - -#: 2_throwing.lua -msgid "Arrow" -msgstr "Pfeil" - -#: 2_throwing.lua -msgid "Arrows are ammunition for bows." -msgstr "Pfeile sind Munition für Bögen." - -#: 2_throwing.lua -msgid "" -"To use arrows as ammunition for a bow, put them in the inventory slot " -"following the bow. Slots are counted left to right, top to bottom." -msgstr "" -"Um Pfeile als Munition für einen Bogen zu benutzen, legen Sie sie in das " -"Inventarfeld, das dem des Bogens folgt. Inventarfelder werden von links nach " -"rechts, dann von oben nach unten gezählt." - -#: 2_throwing.lua -msgid "Bow" -msgstr "Bogen" - -#: 2_throwing.lua -msgid "Bows are ranged weapons to shoot arrows at your foes." -msgstr "Bögen sind Fernwaffen, um Pfeile auf Ihre Gegner zu schießen." - -#: 2_throwing.lua -msgid "" -"To use the bow, you first need to have at least one arrow in slot following " -"the bow. Leftclick to shoot. Each hit deals 3 damage." -msgstr "" -"Um den Bogen zu benutzen, brauchen Sie zuerest mindestens einen Pfeil in dem " -"Inventarfeld nach dem des Bogens. Linksklick zum Schießen. Jeder Treffer " -"richtet 3 Schaden an." - -#: 2_throwing.lua -msgid "Egg" -msgstr "Ei" - -#: 2_throwing.lua -msgid "" -"Eggs can be thrown and break on impact. There is a small chance that 1 or " -"even 4 chicks will pop out" -msgstr "" -"Eier können geworfen werden und zerbrechen bei einem Treffer. Es gibt eine " -"kleine Chance, dass 1 oder sogar 4 Küken auftauchen" - -#: 2_throwing.lua -msgid "Snowball" -msgstr "Schneeball" - -#: 2_throwing.lua -msgid "" -"Snowballs can be thrown at your enemies. A snowball deals 3 damage to " -"blazes, but is harmless to anything else." -msgstr "" -"Werfen Sie Schnebälle auf Ihre Feinde. Ein Schneeball richtet gegenüber " -"Lohen 3 Schaden an, ist aber harmlos für alles andere." - -#: 4_heads.lua -msgid "Zombie Head" -msgstr "Zombiekopf" - -#: 4_heads.lua -msgid "" -"A zombie head is a small decorative block which resembles the head of a " -"zombie." -msgstr "" -"Ein Zombiekopf ist ein kleiner dekorativer Block, der wie der Kopf eines " -"Zombies aussieht." - -#: 4_heads.lua -msgid "Creeper Head" -msgstr "Creeperkopf" - -#: 4_heads.lua -msgid "" -"A creeper head is a small decorative block which resembles the head of a " -"creeper." -msgstr "" -"Ein Creeperkopf ist ein kleiner dekorativer Block, der wie der Kopf eines " -"Creeper aussieht." - -#: 4_heads.lua -msgid "Skeleton Skull" -msgstr "Skelettschädel" - -#: 4_heads.lua -msgid "" -"A skeleton skull is a small decorative block which resembles the skull of a " -"skeleton." -msgstr "" -"Ein Skelettschädel ist ein kleiner dekorativer Block, der wie der Schädel " -"eines Skeletts aussieht." - -#: 4_heads.lua -msgid "Wither Skeleton Skull" -msgstr "Witherskelettschädel" - -#: 4_heads.lua -msgid "" -"A wither skeleton skull is a small decorative block which resembles the " -"skull of a wither skeleton." -msgstr "" -"Ein Witherskelettschädel ist ein kleiner dekorativer Block, der wie der " -"Schädel eines Witherskeletts aussieht." - -#: agent.lua -msgid "Agent" -msgstr "Agent" - -#: bat.lua -msgid "Bat" -msgstr "Fledermaus" - -#: blaze.lua -msgid "Blaze" -msgstr "Lohe" - -#: chicken.lua -msgid "Chicken" -msgstr "Huhn" - -#: cow+mooshroom.lua -msgid "Cow" -msgstr "Kuh" - -#: cow+mooshroom.lua -msgid "Mooshroom" -msgstr "Mooshroom" - -#: creeper.lua -msgid "Creeper" -msgstr "Creeper" - -#: ender_dragon.lua -msgid "Ender Dragon" -msgstr "Enderdrache" - -#: enderman.lua -msgid "Enderman" -msgstr "Enderman" - -#: endermite.lua -msgid "Endermite" -msgstr "Endermite" - -#: ghast.lua -msgid "Ghast" -msgstr "Ghast" - -#: guardian_elder.lua -msgid "Elder Guardian" -msgstr "Großer Wächter" - -#: guardian.lua -msgid "Guardian" -msgstr "Wächter" - -#: horse.lua -msgid "Horse" -msgstr "Pferd" - -#: horse.lua -msgid "Skeleton Horse" -msgstr "Skelettpferd" - -#: horse.lua -msgid "Zombie Horse" -msgstr "Zombiepferd" - -#: horse.lua -msgid "Donkey" -msgstr "Esel" - -#: horse.lua -msgid "Mule" -msgstr "Maultier" - -#: iron_golem.lua -msgid "Iron Golem" -msgstr "Eisengolem" - -#: llama.lua -msgid "Llama" -msgstr "Lama" - -#: ocelot.lua -msgid "Ocelot" -msgstr "Ozelot" - -#: parrot.lua -msgid "Parrot" -msgstr "Papagei" - -#: pig.lua -msgid "Pig" -msgstr "Schwein" - -#: polar_bear.lua -msgid "Polar Bear" -msgstr "Eisbär" - -#: rabbit.lua -msgid "Rabbit" -msgstr "Kaninchen" - -#: rabbit.lua -msgid "Killer Bunny" -msgstr "Killer-Kaninchen" - -#: sheep.lua -msgid "Sheep" -msgstr "Schaf" - -#: shulker.lua -msgid "Shulker" -msgstr "Shulker" - -#: silverfish.lua -msgid "Silverfish" -msgstr "Silberfischchen" - -#: silverfish.lua -msgid "Stone Monster Egg" -msgstr "Silberfischchen-Stein" - -#: silverfish.lua -msgid "Cobblestone Monster Egg" -msgstr "Silberfischchen-Bruchstein" - -#: silverfish.lua -msgid "Mossy Cobblestone Monster Egg" -msgstr "Bemooster Silberfischchen-Bruchstein" - -#: silverfish.lua -msgid "Stone Brick Monster Egg" -msgstr "Silberfischchen-Steinziegel" - -#: silverfish.lua -msgid "Stone Block Monster Egg" -msgstr "Silberfischchen-Steinblock" - -#: skeleton+stray.lua -msgid "Skeleton" -msgstr "Skelett" - -#: skeleton+stray.lua -msgid "Stray" -msgstr "Eiswanderer" - -#: skeleton_wither.lua -msgid "Wither Skeleton" -msgstr "Witherskelett" - -#: slime+magma_cube.lua -msgid "Magma Cube" -msgstr "Magmawürfel" - -#: slime+magma_cube.lua -msgid "Slime" -msgstr "Schleim" - -#: snowman.lua -msgid "Snow Golem" -msgstr "Schneegolem" - -#: spider.lua -msgid "Spider" -msgstr "Spinne" - -#: spider.lua -msgid "Cave Spider" -msgstr "Höhlenspinne" - -#: squid.lua -msgid "Squid" -msgstr "Tintenfisch" - -#: vex.lua -msgid "Vex" -msgstr "Plagegeist" - -#: villager_evoker.lua -msgid "Evoker" -msgstr "Magier" - -#: villager_illusioner.lua -msgid "Illusioner" -msgstr "Illusionist" - -#: villager.lua -msgid "Villager" -msgstr "Dorfbewohner" - -#: villager_vindicator.lua -msgid "Vindicator" -msgstr "Diener" - -#: villager_zombie.lua -msgid "Zombie Villager" -msgstr "Dorfbewohnerzombie" - -#: witch.lua -msgid "Witch" -msgstr "Hexe" - -#: wither.lua -msgid "Wither" -msgstr "Wither" - -#: wolf.lua -msgid "Wolf" -msgstr "Wolf" - -#: zombie.lua -msgid "Husk" -msgstr "Wüstenzombie" - -#: zombie.lua -msgid "Zombie" -msgstr "Zombie" - -#: zombiepig.lua -msgid "Zombie Pigman" -msgstr "Schweinezombie" - -#~ msgid "" -#~ "Hold it in your hand and punch once to instantly get back to full health. " -#~ "The totem gets destroyed in the process." -#~ msgstr "" -#~ "Halten Sie es in der Hand und schlagen Sie zu, um sofort auf die volle " -#~ "Gesundheit zu kommen. Das zerstört das Totem." - -#~ msgid "Enderman Head (WIP)" -#~ msgstr "Endermankopf (unfertig)" - -#~ msgid "Ghast Head (WIP)" -#~ msgstr "Ghastkopf (unfertig)" - -#~ msgid "Spider Head (WIP)" -#~ msgstr "Spinnenkopf (unfertig)" - -#~ msgid "Zombie Pigman Head (WIP)" -#~ msgstr "Schweinezombiekopf (unfertig)" diff --git a/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr b/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr new file mode 100644 index 000000000..1e5140280 --- /dev/null +++ b/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr @@ -0,0 +1,74 @@ +# textdomain: mobs_mc +Totem of Undying=Totem der Unsterblichkeit +A totem of undying is a rare artifact which may safe you from certain death.=Ein Totem der Unsterblichkeit ist ein seltenes Artefakt, dass Sie vor dem sicheren Tod bewahren kann. +The totem only works while you hold it in your hand. If you receive fatal damage, you are saved from death and you get a second chance with 1 HP. The totem is destroyed in the process, however.=Der Totem funktioniert nur, während Sie ihn halten. Wenn Sie normalerweise tödlich hohen Schaden erhalten, werden Sie vor dem Tod bewahrt und Sie erhalten eine zweite Chance mit 1 TP. Der Totem wird dabei zerstört. +Agent=Akteur +Bat=Fledermaus +Blaze=Lohe +Chicken=Huhn +Cow=Kuh +Mooshroom=Pilzkuh +Creeper=Creeper +Ender Dragon=Enderdrache +Enderman=Enderman +Endermite=Endermilbe +Ghast=Ghast +Elder Guardian=Großer Wächter +Guardian=Wächter +Horse=Pferd +Skeleton Horse=Skelettpferd +Zombie Horse=Zombiepferd +Donkey=Esel +Mule=Maultier +Iron Golem=Eisengolem +Llama=Lama +Ocelot=Ozelot +Parrot=Papagei +Pig=Schwein +Polar Bear=Eisbär +Rabbit=Kaninchen +Killer Bunny=Killerkaninchen +Sheep=Schaf +Shulker=Shulker +Silverfish=Silberfischchen +Skeleton=Skelett +Stray=Eiswanderer +Wither Skeleton=Witherskelett +Magma Cube=Magmakubus +Slime=Schleim +Snow Golem=Schneegolem +Spider=Spinne +Cave Spider=Höhlenspinne +Squid=Tintenfisch +Vex=Plagegeist +Evoker=Magier +Illusioner=Illusionist +Villager=Dorfbewohner +Vindicator=Diener +Zombie Villager=Dorfbewohnerzombie +Witch=Hexe +Wither=Wither +Wolf=Wolf +Husk=Wüstenzombie +Zombie=Zombie +Zombie Pigman=Schweinezombie +Iron Horse Armor=Eisenpferderüstung +Iron horse armor can be worn by horses to increase their protection from harm a bit.=Eine Eisenpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden etwas zu erhöhen. +Golden Horse Armor=Goldpferderüstung +Golden horse armor can be worn by horses to increase their protection from harm.=Eine Goldpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden zu erhöhen. +Diamond Horse Armor=Diamantpferderüstung +Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Eine Diamantpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden beträchtlich zu erhöhen. +Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=Platzieren Sie es auf einem Pferd, um die Pferderüstung aufzusetzen. Esel und Maultiere können keine Pferderüstung tragen. +Farmer=Bauer +Fisherman=Fischer +Fletcher=Pfeilmacher +Shepherd=Schäfer +Librarian=Bibliothekar +Cartographer=Kartograph +Armorer=Rüstungsschmied +Leatherworker=Lederarbeiter +Butcher=Metzger +Weapon Smith=Waffenschmied +Tool Smith=Werkzeugschmied +Cleric=Priester +Nitwit=Dorftrottel diff --git a/mods/ENTITIES/mobs_mc/locale/template.pot b/mods/ENTITIES/mobs_mc/locale/template.pot deleted file mode 100644 index f89dc24a7..000000000 --- a/mods/ENTITIES/mobs_mc/locale/template.pot +++ /dev/null @@ -1,647 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-25 18:45+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: 1_items_default.lua -msgid "Blaze Rod" -msgstr "" - -#: 1_items_default.lua -msgid "This is a crafting component dropped from dead blazes." -msgstr "" - -#: 1_items_default.lua -msgid "Blaze Powder" -msgstr "" - -#: 1_items_default.lua -msgid "This item is mainly used for brewing potions and crafting." -msgstr "" - -#: 1_items_default.lua -msgid "Raw Chicken" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Raw chicken is a food item and can be eaten safely. Cooking it will increase " -"its nutritional value." -msgstr "" - -#: 1_items_default.lua -msgid "Cooked Chicken" -msgstr "" - -#: 1_items_default.lua -msgid "A cooked chicken is a healthy food item which can be eaten." -msgstr "" - -#: 1_items_default.lua -msgid "Feather" -msgstr "" - -#: 1_items_default.lua -msgid "Feathers are used in crafting and are dropped from chickens." -msgstr "" - -#: 1_items_default.lua -msgid "Raw Beef" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Raw beef is the flesh from cows and can be eaten safely. Cooking it will " -"greatly increase its nutritional value." -msgstr "" - -#: 1_items_default.lua -msgid "Steak" -msgstr "" - -#: 1_items_default.lua -msgid "Steak is cooked beef from cows and can be eaten." -msgstr "" - -#: 1_items_default.lua -msgid "Milk" -msgstr "" - -#: 1_items_default.lua -msgid "Milk is a food item obtained by using a bucket on a cow." -msgstr "" - -#: 1_items_default.lua -msgid "Bowl" -msgstr "" - -#: 1_items_default.lua -msgid "Bowls are mainly used to hold tasty soups." -msgstr "" - -#: 1_items_default.lua -msgid "Mushroom Stew" -msgstr "" - -#: 1_items_default.lua -msgid "Mushroom stew is a healthy soup." -msgstr "" - -#: 1_items_default.lua -msgid "Dragon Egg" -msgstr "" - -#: 1_items_default.lua -msgid "Eye of Ender" -msgstr "" - -#: 1_items_default.lua -msgid "Ghast Tear" -msgstr "" - -#: 1_items_default.lua -msgid "" -"A ghast tear is an item used in potion brewing. It is dropped from dead " -"ghasts." -msgstr "" - -#: 1_items_default.lua -msgid "Saddle" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Saddles can be put on horses, donkeys, mules and pigs in order to mount them." -msgstr "" - -#: 1_items_default.lua -msgid "" -"Rightclick an animal while holding a saddle to put on the saddle. You can " -"now mount the animal by rightclicking it again." -msgstr "" - -#: 1_items_default.lua -msgid "" -"Rightclick a horse to put on the horse armor. Donkeys and mules can't wear " -"horse armor." -msgstr "" - -#: 1_items_default.lua -msgid "Iron Horse Armor" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Iron horse armor can be worn by horses to increase their protection from " -"harm a bit." -msgstr "" - -#: 1_items_default.lua -msgid "Golden Horse Armor" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Golden horse armor can be worn by horses to increase their protection from " -"harm." -msgstr "" - -#: 1_items_default.lua -msgid "Diamond Horse Armor" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Diamond horse armor can be worn by horses to greatly increase their " -"protection from harm." -msgstr "" - -#: 1_items_default.lua -msgid "Raw Porkchop" -msgstr "" - -#: 1_items_default.lua -msgid "" -"A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it " -"will greatly increase its nutritional value." -msgstr "" - -#: 1_items_default.lua -msgid "Cooked Porkchop" -msgstr "" - -#: 1_items_default.lua -msgid "Carrot on a Stick" -msgstr "" - -#: 1_items_default.lua -msgid "" -"A carrot on a stick can be used on saddled pigs to ride them. Pigs will also " -"follow anyone who holds a carrot on a stick near them." -msgstr "" - -#: 1_items_default.lua -msgid "" -"Rightclick a saddled pig with the carrot on a stick to mount it. You can now " -"ride it like a horse." -msgstr "" - -#: 1_items_default.lua -msgid "Raw Rabbit" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Raw rabbit is a food item from a dead rabbit. It can be eaten safely. " -"Cooking it will increase its nutritional value." -msgstr "" - -#: 1_items_default.lua -msgid "Cooked Rabbit" -msgstr "" - -#: 1_items_default.lua -msgid "This is a food item which can be eaten." -msgstr "" - -#: 1_items_default.lua -msgid "Rabbit Hide" -msgstr "" - -#: 1_items_default.lua -msgid "Rabbit hide is used to create leather." -msgstr "" - -#: 1_items_default.lua -msgid "Rabbit's Foot" -msgstr "" - -#: 1_items_default.lua -msgid "This item is used in brewing." -msgstr "" - -#: 1_items_default.lua -msgid "Raw Mutton" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it " -"will greatly increase its nutritional value." -msgstr "" - -#: 1_items_default.lua -msgid "Cooked Mutton" -msgstr "" - -#: 1_items_default.lua -msgid "Cooked mutton is the cooked flesh from a sheep and is used as food." -msgstr "" - -#: 1_items_default.lua -msgid "Shulker Shell" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Shulker shells are used in crafting. They are dropped from dead shulkers." -msgstr "" - -#: 1_items_default.lua -msgid "Magma Cream" -msgstr "" - -#: 1_items_default.lua -msgid "Magma cream is a crafting component." -msgstr "" - -#: 1_items_default.lua -msgid "Slimeball" -msgstr "" - -#: 1_items_default.lua -msgid "Slimeballs are used in crafting. They are dropped from slimes." -msgstr "" - -#: 1_items_default.lua -msgid "Spider Eye" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Spider eyes are used mainly in crafting and brewing. Spider eyes can be " -"eaten, but they poison you and reduce your health by 2 hit points." -msgstr "" - -#: 1_items_default.lua -msgid "Totem of Undying" -msgstr "" - -#: 1_items_default.lua -msgid "" -"A totem of undying is a rare artifact which may safe you from certain death." -msgstr "" - -#: 1_items_default.lua -msgid "" -"The totem only works while you hold it in your hand. If you receive fatal " -"damage, you are saved from death and you get a second chance with 1 HP. The " -"totem is destroyed in the process, however." -msgstr "" - -#: 1_items_default.lua -msgid "Rotten Flesh" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Yuck! This piece of flesh clearly has seen better days. Eating it will only " -"poison you and reduces your health by 4 hit points. But tamed wolves can eat " -"it just fine." -msgstr "" - -#: 1_items_default.lua -msgid "Nether Star" -msgstr "" - -#: 1_items_default.lua -msgid "A nether star is a crafting component. It is dropped from the Wither." -msgstr "" - -#: 1_items_default.lua -msgid "Bone" -msgstr "" - -#: 1_items_default.lua -msgid "" -"Bones can be used to tame wolves so they will protect you. They are also " -"useful as a crafting ingredient." -msgstr "" - -#: 1_items_default.lua -msgid "" -"Hold the bone in your hand near wolves to attract them. Rightclick the wolf " -"to give it a bone and tame it." -msgstr "" - -#: 2_throwing.lua -msgid "Arrow" -msgstr "" - -#: 2_throwing.lua -msgid "Arrows are ammunition for bows." -msgstr "" - -#: 2_throwing.lua -msgid "" -"To use arrows as ammunition for a bow, put them in the inventory slot " -"following the bow. Slots are counted left to right, top to bottom." -msgstr "" - -#: 2_throwing.lua -msgid "Bow" -msgstr "" - -#: 2_throwing.lua -msgid "Bows are ranged weapons to shoot arrows at your foes." -msgstr "" - -#: 2_throwing.lua -msgid "" -"To use the bow, you first need to have at least one arrow in slot following " -"the bow. Leftclick to shoot. Each hit deals 3 damage." -msgstr "" - -#: 2_throwing.lua -msgid "Egg" -msgstr "" - -#: 2_throwing.lua -msgid "" -"Eggs can be thrown and break on impact. There is a small chance that 1 or " -"even 4 chicks will pop out" -msgstr "" - -#: 2_throwing.lua -msgid "Snowball" -msgstr "" - -#: 2_throwing.lua -msgid "" -"Snowballs can be thrown at your enemies. A snowball deals 3 damage to " -"blazes, but is harmless to anything else." -msgstr "" - -#: 4_heads.lua -msgid "Zombie Head" -msgstr "" - -#: 4_heads.lua -msgid "" -"A zombie head is a small decorative block which resembles the head of a " -"zombie." -msgstr "" - -#: 4_heads.lua -msgid "Creeper Head" -msgstr "" - -#: 4_heads.lua -msgid "" -"A creeper head is a small decorative block which resembles the head of a " -"creeper." -msgstr "" - -#: 4_heads.lua -msgid "Skeleton Skull" -msgstr "" - -#: 4_heads.lua -msgid "" -"A skeleton skull is a small decorative block which resembles the skull of a " -"skeleton." -msgstr "" - -#: 4_heads.lua -msgid "Wither Skeleton Skull" -msgstr "" - -#: 4_heads.lua -msgid "" -"A wither skeleton skull is a small decorative block which resembles the " -"skull of a wither skeleton." -msgstr "" - -#: agent.lua -msgid "Agent" -msgstr "" - -#: bat.lua -msgid "Bat" -msgstr "" - -#: blaze.lua -msgid "Blaze" -msgstr "" - -#: chicken.lua -msgid "Chicken" -msgstr "" - -#: cow+mooshroom.lua -msgid "Cow" -msgstr "" - -#: cow+mooshroom.lua -msgid "Mooshroom" -msgstr "" - -#: creeper.lua -msgid "Creeper" -msgstr "" - -#: ender_dragon.lua -msgid "Ender Dragon" -msgstr "" - -#: enderman.lua -msgid "Enderman" -msgstr "" - -#: endermite.lua -msgid "Endermite" -msgstr "" - -#: ghast.lua -msgid "Ghast" -msgstr "" - -#: guardian_elder.lua -msgid "Elder Guardian" -msgstr "" - -#: guardian.lua -msgid "Guardian" -msgstr "" - -#: horse.lua -msgid "Horse" -msgstr "" - -#: horse.lua -msgid "Skeleton Horse" -msgstr "" - -#: horse.lua -msgid "Zombie Horse" -msgstr "" - -#: horse.lua -msgid "Donkey" -msgstr "" - -#: horse.lua -msgid "Mule" -msgstr "" - -#: iron_golem.lua -msgid "Iron Golem" -msgstr "" - -#: llama.lua -msgid "Llama" -msgstr "" - -#: ocelot.lua -msgid "Ocelot" -msgstr "" - -#: parrot.lua -msgid "Parrot" -msgstr "" - -#: pig.lua -msgid "Pig" -msgstr "" - -#: polar_bear.lua -msgid "Polar Bear" -msgstr "" - -#: rabbit.lua -msgid "Rabbit" -msgstr "" - -#: rabbit.lua -msgid "Killer Bunny" -msgstr "" - -#: sheep.lua -msgid "Sheep" -msgstr "" - -#: shulker.lua -msgid "Shulker" -msgstr "" - -#: silverfish.lua -msgid "Silverfish" -msgstr "" - -#: silverfish.lua -msgid "Stone Monster Egg" -msgstr "" - -#: silverfish.lua -msgid "Cobblestone Monster Egg" -msgstr "" - -#: silverfish.lua -msgid "Mossy Cobblestone Monster Egg" -msgstr "" - -#: silverfish.lua -msgid "Stone Brick Monster Egg" -msgstr "" - -#: silverfish.lua -msgid "Stone Block Monster Egg" -msgstr "" - -#: skeleton+stray.lua -msgid "Skeleton" -msgstr "" - -#: skeleton+stray.lua -msgid "Stray" -msgstr "" - -#: skeleton_wither.lua -msgid "Wither Skeleton" -msgstr "" - -#: slime+magma_cube.lua -msgid "Magma Cube" -msgstr "" - -#: slime+magma_cube.lua -msgid "Slime" -msgstr "" - -#: snowman.lua -msgid "Snow Golem" -msgstr "" - -#: spider.lua -msgid "Spider" -msgstr "" - -#: spider.lua -msgid "Cave Spider" -msgstr "" - -#: squid.lua -msgid "Squid" -msgstr "" - -#: vex.lua -msgid "Vex" -msgstr "" - -#: villager_evoker.lua -msgid "Evoker" -msgstr "" - -#: villager_illusioner.lua -msgid "Illusioner" -msgstr "" - -#: villager.lua -msgid "Villager" -msgstr "" - -#: villager_vindicator.lua -msgid "Vindicator" -msgstr "" - -#: villager_zombie.lua -msgid "Zombie Villager" -msgstr "" - -#: witch.lua -msgid "Witch" -msgstr "" - -#: wither.lua -msgid "Wither" -msgstr "" - -#: wolf.lua -msgid "Wolf" -msgstr "" - -#: zombie.lua -msgid "Husk" -msgstr "" - -#: zombie.lua -msgid "Zombie" -msgstr "" - -#: zombiepig.lua -msgid "Zombie Pigman" -msgstr "" diff --git a/mods/ENTITIES/mobs_mc/locale/template.txt b/mods/ENTITIES/mobs_mc/locale/template.txt new file mode 100644 index 000000000..3cd260ce9 --- /dev/null +++ b/mods/ENTITIES/mobs_mc/locale/template.txt @@ -0,0 +1,74 @@ +# textdomain: mobs_mc +Totem of Undying= +A totem of undying is a rare artifact which may safe you from certain death.= +The totem only works while you hold it in your hand. If you receive fatal damage, you are saved from death and you get a second chance with 1 HP. The totem is destroyed in the process, however.= +Agent= +Bat= +Blaze= +Chicken= +Cow= +Mooshroom= +Creeper= +Ender Dragon= +Enderman= +Endermite= +Ghast= +Elder Guardian= +Guardian= +Horse= +Skeleton Horse= +Zombie Horse= +Donkey= +Mule= +Iron Golem= +Llama= +Ocelot= +Parrot= +Pig= +Polar Bear= +Rabbit= +Killer Bunny= +Sheep= +Shulker= +Silverfish= +Skeleton= +Stray= +Wither Skeleton= +Magma Cube= +Slime= +Snow Golem= +Spider= +Cave Spider= +Squid= +Vex= +Evoker= +Illusioner= +Villager= +Vindicator= +Zombie Villager= +Witch= +Wither= +Wolf= +Husk= +Zombie= +Zombie Pigman= +Iron Horse Armor= +Iron horse armor can be worn by horses to increase their protection from harm a bit.= +Golden Horse Armor= +Golden horse armor can be worn by horses to increase their protection from harm.= +Diamond Horse Armor= +Diamond horse armor can be worn by horses to greatly increase their protection from harm.= +Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.= +Farmer= +Fisherman= +Fletcher= +Shepherd= +Librarian= +Cartographer= +Armorer= +Leatherworker= +Butcher= +Weapon Smith= +Tool Smith= +Cleric= +Nitwit= diff --git a/mods/ENTITIES/mobs_mc/ocelot.lua b/mods/ENTITIES/mobs_mc/ocelot.lua index 58a7d94f9..e2b37220f 100644 --- a/mods/ENTITIES/mobs_mc/ocelot.lua +++ b/mods/ENTITIES/mobs_mc/ocelot.lua @@ -3,9 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### OCELOT AND CAT @@ -44,9 +42,6 @@ local ocelot = { run_velocity = 3, floats = 1, runaway = true, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fall_damage = 0, fear_height = 4, sounds = { diff --git a/mods/ENTITIES/mobs_mc/parrot.lua b/mods/ENTITIES/mobs_mc/parrot.lua index 89e4c77fc..9474c2b77 100644 --- a/mods/ENTITIES/mobs_mc/parrot.lua +++ b/mods/ENTITIES/mobs_mc/parrot.lua @@ -3,12 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") - +local S = minetest.get_translator("mobs_mc") --################### --################### PARROT @@ -49,9 +44,6 @@ mobs:register_mob("mobs_mc:parrot", { --fly_end = 45, }, walk_chance = 100, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fall_damage = 0, fall_speed = -2.25, attack_type = "dogfight", diff --git a/mods/ENTITIES/mobs_mc/pig.lua b/mods/ENTITIES/mobs_mc/pig.lua index cb6bf6a1d..472d8f771 100644 --- a/mods/ENTITIES/mobs_mc/pig.lua +++ b/mods/ENTITIES/mobs_mc/pig.lua @@ -1,8 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:pig", { type = "animal", @@ -27,9 +25,6 @@ mobs:register_mob("mobs_mc:pig", { min = 1, max = 3,}, }, - water_damage = 1, - lava_damage = 4, - light_damage = 0, fear_height = 4, sounds = { random = "mobs_pig", @@ -59,7 +54,7 @@ mobs:register_mob("mobs_mc:pig", { self.max_speed_reverse = 2 self.accel = 4 self.terrain_type = 3 - self.driver_attach_at = {x = 0.0, y = 6.75, z = -1.5} + self.driver_attach_at = {x = 0.0, y = 2.75, z = -1.5} self.driver_eye_offset = {x = 0, y = 3, z = 0} self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y} end diff --git a/mods/ENTITIES/mobs_mc/polar_bear.lua b/mods/ENTITIES/mobs_mc/polar_bear.lua index 84da77e7a..438ea3207 100644 --- a/mods/ENTITIES/mobs_mc/polar_bear.lua +++ b/mods/ENTITIES/mobs_mc/polar_bear.lua @@ -1,10 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### POLARBEAR @@ -18,6 +14,7 @@ mobs:register_mob("mobs_mc:polar_bear", { stepheight = 1.2, hp_min = 30, hp_max = 30, + breath_max = -1, collisionbox = {-0.7, -0.01, -0.7, 0.7, 1.39, 0.7}, visual = "mesh", mesh = "mobs_mc_polarbear.b3d", @@ -45,10 +42,7 @@ mobs:register_mob("mobs_mc:polar_bear", { max = 2,}, }, - water_damage = 0, floats = 1, - lava_damage = 5, - light_damage = 0, fear_height = 4, -- TODO: sounds animation = { diff --git a/mods/ENTITIES/mobs_mc/rabbit.lua b/mods/ENTITIES/mobs_mc/rabbit.lua index a92c93f94..8803b7546 100644 --- a/mods/ENTITIES/mobs_mc/rabbit.lua +++ b/mods/ENTITIES/mobs_mc/rabbit.lua @@ -1,8 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") local rabbit = { type = "animal", @@ -37,9 +35,6 @@ local rabbit = { -- TODO: Drop rabbit's foot when it's useful --{name = mobs_mc.items.rabbit_foot, chance = 10, min = 1, max = 1}, }, - water_damage = 1, - lava_damage = 4, - light_damage = 0, fear_height = 4, animation = { speed_normal = 25, speed_run = 50, diff --git a/mods/ENTITIES/mobs_mc/sheep.lua b/mods/ENTITIES/mobs_mc/sheep.lua index 9ddf9e039..3d643ec89 100644 --- a/mods/ENTITIES/mobs_mc/sheep.lua +++ b/mods/ENTITIES/mobs_mc/sheep.lua @@ -1,8 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### SHEEP @@ -32,6 +30,9 @@ if minetest.get_modpath("mcl_wool") ~= nil then end local sheep_texture = function(color_group) + if not color_group then + color_group = "unicolor_white" + end return { "mobs_mc_sheep_fur.png^[colorize:"..colors[color_group][2], "mobs_mc_sheep.png", @@ -66,9 +67,6 @@ mobs:register_mob("mobs_mc:sheep", { min = 1, max = 1,}, }, - water_damage = 1, - lava_damage = 4, - light_damage = 0, fear_height = 4, sounds = { random = "mobs_sheep", @@ -184,6 +182,10 @@ mobs:register_mob("mobs_mc:sheep", { minetest.log("verbose", "[mobs_mc] " ..item:get_name() .. " " .. minetest.get_item_group(item:get_name(), "dye")) for group, colordata in pairs(colors) do if minetest.get_item_group(item:get_name(), group) == 1 then + if not minetest.settings:get_bool("creative_mode") then + item:take_item() + clicker:set_wielded_item(item) + end self.base_texture = sheep_texture(group) self.object:set_properties({ textures = self.base_texture, @@ -229,6 +231,7 @@ mobs:register_mob("mobs_mc:sheep", { local groups = minetest.registered_items[new_dye].groups for k, v in pairs(groups) do if string.sub(k, 1, 9) == "unicolor_" then + ent_c.color = k ent_c.base_texture = sheep_texture(k) mixed = true break @@ -240,11 +243,12 @@ mobs:register_mob("mobs_mc:sheep", { if not mixed then -- Choose color randomly from one of the parents local p = math.random(1, 2) - if p == 1 then - ent_c.base_texture = sheep_texture(color1) + if p == 1 and color1 then + ent_c.color = color1 else - ent_c.base_texture = sheep_texture(color2) + ent_c.color = color2 end + ent_c.base_texture = sheep_texture(ent_c.color) end child:set_properties({textures = ent_c.base_texture}) ent_c.initial_color_set = true diff --git a/mods/ENTITIES/mobs_mc/shulker.lua b/mods/ENTITIES/mobs_mc/shulker.lua index ddb17e7c3..0a06fe89c 100644 --- a/mods/ENTITIES/mobs_mc/shulker.lua +++ b/mods/ENTITIES/mobs_mc/shulker.lua @@ -3,11 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### SHULKER @@ -48,12 +44,8 @@ mobs:register_mob("mobs_mc:shulker", { run_start = 0, run_end = 45, punch_start = 80, punch_end = 100, }, - blood_amount = 0, view_range = 16, fear_height = 4, - water_damage = 1, - lava_damage = 4, - light_damage = 0, }) -- bullet arrow (weapon) @@ -70,8 +62,8 @@ mobs:register_arrow("mobs_mc:shulkerbullet", { }, nil) end, - hit_mob = function(self, player) - player:punch(self.object, 1.0, { + hit_mob = function(self, mob) + mob:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 4}, }, nil) @@ -82,7 +74,7 @@ mobs:register_arrow("mobs_mc:shulkerbullet", { }) -mobs:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0) +mobs:register_egg("mobs_mc:shulker", S("Schulker"), "mobs_mc_spawn_icon_shulker.png", 0) mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 5000, 2, mobs_mc.spawn_height.end_min, mobs_mc.spawn_height.end_max) diff --git a/mods/ENTITIES/mobs_mc/silverfish.lua b/mods/ENTITIES/mobs_mc/silverfish.lua index dc2a9c92b..f2c111987 100644 --- a/mods/ENTITIES/mobs_mc/silverfish.lua +++ b/mods/ENTITIES/mobs_mc/silverfish.lua @@ -2,9 +2,7 @@ --################### SILVERFISH --################### --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:silverfish", { type = "monster", @@ -31,9 +29,6 @@ mobs:register_mob("mobs_mc:silverfish", { walk_velocity = 0.6, run_velocity = 2, jump = true, - water_damage = 1, - lava_damage = 4, - light_damage = 0, fear_height = 4, replace_what = mobs_mc.replace.silverfish, replace_rate = 2, @@ -47,7 +42,6 @@ mobs:register_mob("mobs_mc:silverfish", { attack_type = "dogfight", damage = 1, reach = 1, - blood_amount = 0, }) mobs:register_egg("mobs_mc:silverfish", S("Silverfish"), "mobs_mc_spawn_icon_silverfish.png", 0) @@ -60,7 +54,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then end end minetest.register_node("mobs_mc:monster_egg_stone", { - description = S("Stone Monster Egg"), + description = "Stone Monster Egg", tiles = {"default_stone.png"}, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, drop = '', @@ -70,7 +64,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then }) minetest.register_node("mobs_mc:monster_egg_cobble", { - description = S("Cobblestone Monster Egg"), + description = "Cobblestone Monster Egg", tiles = {"default_cobble.png"}, is_ground_content = false, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, @@ -80,7 +74,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then }) minetest.register_node("mobs_mc:monster_egg_mossycobble", { - description = S("Mossy Cobblestone Monster Egg"), + description = "Mossy Cobblestone Monster Egg", tiles = {"default_mossycobble.png"}, is_ground_content = false, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, @@ -90,7 +84,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then }) minetest.register_node("mobs_mc:monster_egg_stonebrick", { - description = S("Stone Brick Monster Egg"), + description = "Stone Brick Monster Egg", paramtype2 = "facedir", place_param2 = 0, tiles = {"default_stone_brick.png"}, @@ -102,7 +96,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then }) minetest.register_node("mobs_mc:monster_egg_stone_block", { - description = S("Stone Block Monster Egg"), + description = "Stone Block Monster Egg", tiles = {"default_stone_block.png"}, is_ground_content = false, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, diff --git a/mods/ENTITIES/mobs_mc/skeleton+stray.lua b/mods/ENTITIES/mobs_mc/skeleton+stray.lua index a10fef5ec..4157f750c 100644 --- a/mods/ENTITIES/mobs_mc/skeleton+stray.lua +++ b/mods/ENTITIES/mobs_mc/skeleton+stray.lua @@ -3,12 +3,8 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") - +local S = minetest.get_translator("mobs_mc") +local mod_bows = minetest.get_modpath("mcl_bows") ~= nil --################### --################### SKELETON @@ -20,6 +16,7 @@ local skeleton = { type = "monster", hp_min = 20, hp_max = 20, + breath_max = -1, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.98, 0.3}, pathfinding = 1, group_attack = true, @@ -35,7 +32,6 @@ local skeleton = { random = "mobs_mc_skeleton_random", death = "mobs_mc_skeleton_death", damage = "mobs_mc_skeleton_hurt", - shoot_attack = "mcl_bows_bow_shoot", distance = 16, }, walk_velocity = 1.2, @@ -78,18 +74,22 @@ local skeleton = { die_speed = 15, die_loop = false, }, - water_damage = 1, - lava_damage = 4, sunlight_damage = 1, view_range = 16, fear_height = 4, attack_type = "dogshoot", - arrow = "mobs_mc:arrow_entity", - shoot_interval = 2.5, - shoot_offset = 1, + arrow = "mcl_bows:arrow_entity", + shoot_arrow = function(self, pos, dir) + if mod_bows then + -- 2-4 damage per arrow + local dmg = math.max(4, math.random(2, 8)) + mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg) + end + end, + shoot_interval = 2, + shoot_offset = 1.5, dogshoot_switch = 1, dogshoot_count_max =1.8, - blood_amount = 0, } mobs:register_mob("mobs_mc:skeleton", skeleton) diff --git a/mods/ENTITIES/mobs_mc/skeleton_wither.lua b/mods/ENTITIES/mobs_mc/skeleton_wither.lua index cd932129c..896df69a8 100644 --- a/mods/ENTITIES/mobs_mc/skeleton_wither.lua +++ b/mods/ENTITIES/mobs_mc/skeleton_wither.lua @@ -3,9 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### WITHER SKELETON @@ -15,6 +13,7 @@ mobs:register_mob("mobs_mc:witherskeleton", { type = "monster", hp_min = 20, hp_max = 20, + breath_max = -1, pathfinding = 1, group_attack = true, collisionbox = {-0.35, -0.01, -0.35, 0.35, 2.39, 0.35}, @@ -76,12 +75,12 @@ mobs:register_mob("mobs_mc:witherskeleton", { }, water_damage = 0, lava_damage = 0, + fire_damage = 0, light_damage = 0, view_range = 16, attack_type = "dogfight", dogshoot_switch = 1, dogshoot_count_max =0.5, - blood_amount = 0, fear_height = 4, }) diff --git a/mods/ENTITIES/mobs_mc/slime+magma_cube.lua b/mods/ENTITIES/mobs_mc/slime+magma_cube.lua index 2c21dcfa8..004864991 100644 --- a/mods/ENTITIES/mobs_mc/slime+magma_cube.lua +++ b/mods/ENTITIES/mobs_mc/slime+magma_cube.lua @@ -1,8 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") -- Returns a function that spawns children in a circle around pos. -- To be used as on_die callback. @@ -60,7 +58,7 @@ end local slime_big = { type = "monster", pathfinding = 1, - group_attack = true, + group_attack = { "mobs_mc:slime_big", "mobs_mc:slime_small", "mobs_mc:slime_tiny" }, hp_min = 16, hp_max = 16, collisionbox = {-1.02, -0.01, -1.02, 1.02, 2.03, 1.02}, @@ -68,7 +66,6 @@ local slime_big = { textures = {{"mobs_mc_slime.png"}}, visual = "mesh", mesh = "mobs_mc_slime.b3d", - blood_texture ="mobs_mc_slime_blood.png", makes_footstep_sound = true, sounds = { jump = "green_slime_jump", @@ -96,9 +93,6 @@ local slime_big = { death_start = 88, death_end = 118, }, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fall_damage = 0, view_range = 16, attack_type = "dogfight", @@ -109,13 +103,14 @@ local slime_big = { walk_chance = 0, jump_height = 5.2, jump_chance = 100, - fear_height = 60, + fear_height = 0, spawn_small_alternative = "mobs_mc:slime_small", on_die = spawn_children_on_die("mobs_mc:slime_small", 4, 1.0, 1.5) } mobs:register_mob("mobs_mc:slime_big", slime_big) local slime_small = table.copy(slime_big) +slime_small.sounds.base_pitch = 1.15 slime_small.hp_min = 4 slime_small.hp_max = 4 slime_small.collisionbox = {-0.51, -0.01, -0.51, 0.51, 1.00, 0.51} @@ -130,6 +125,7 @@ slime_small.on_die = spawn_children_on_die("mobs_mc:slime_tiny", 4, 0.6, 1.0) mobs:register_mob("mobs_mc:slime_small", slime_small) local slime_tiny = table.copy(slime_big) +slime_tiny.sounds.base_pitch = 1.3 slime_tiny.hp_min = 1 slime_tiny.hp_max = 1 slime_tiny.collisionbox = {-0.2505, -0.01, -0.2505, 0.2505, 0.50, 0.2505} @@ -168,7 +164,6 @@ local magma_cube_big = { textures = {{ "mobs_mc_magmacube.png" }}, visual = "mesh", mesh = "mobs_mc_magmacube.b3d", - blood_texture = "mobs_mc_magmacube_blood.png", makes_footstep_sound = true, sounds = { jump = "mobs_mc_magma_cube_big", @@ -204,6 +199,7 @@ local magma_cube_big = { }, water_damage = 0, lava_damage = 0, + fire_damage = 0, light_damage = 0, fall_damage = 0, view_range = 16, @@ -213,7 +209,7 @@ local magma_cube_big = { jump_height = 8, walk_chance = 0, jump_chance = 100, - fear_height = 100000, + fear_height = 0, spawn_small_alternative = "mobs_mc:magma_cube_small", on_die = spawn_children_on_die("mobs_mc:magma_cube_small", 3, 0.8, 1.5) } @@ -241,6 +237,7 @@ mobs:register_mob("mobs_mc:magma_cube_small", magma_cube_small) local magma_cube_tiny = table.copy(magma_cube_big) magma_cube_tiny.sounds.jump = "mobs_mc_magma_cube_small" magma_cube_tiny.sounds.death = "mobs_mc_magma_cube_small" +magma_cube_tiny.sounds.base_pitch = 1.25 magma_cube_tiny.hp_min = 1 magma_cube_tiny.hp_max = 1 magma_cube_tiny.collisionbox = {-0.2505, -0.01, -0.2505, 0.2505, 0.50, 0.2505} diff --git a/mods/ENTITIES/mobs_mc/snowman.lua b/mods/ENTITIES/mobs_mc/snowman.lua index 1c1ad6860..7e74d8d62 100644 --- a/mods/ENTITIES/mobs_mc/snowman.lua +++ b/mods/ENTITIES/mobs_mc/snowman.lua @@ -3,12 +3,12 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") + local snow_trail_frequency = 0.5 -- Time in seconds for checking to add a new snow trail local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false +local mod_throwing = minetest.get_modpath("mcl_throwing") ~= nil local gotten_texture = { "mobs_mc_snowman.png", @@ -29,7 +29,7 @@ mobs:register_mob("mobs_mc:snowman", { view_range = 10, fall_damage = 0, water_damage = 4, - lava_damage = 20, + rain_damage = 4, attacks_monsters = true, collisionbox = {-0.35, -0.01, -0.35, 0.35, 1.89, 0.35}, visual = "mesh", @@ -52,7 +52,12 @@ mobs:register_mob("mobs_mc:snowman", { jump = true, makes_footstep_sound = true, attack_type = "shoot", - arrow = "mobs_mc:snowball_entity", + arrow = "mcl_throwing:snowball_entity", + shoot_arrow = function(self, pos, dir) + if mod_throwing then + mcl_throwing.throw("mcl_throwing:snowball", pos, dir, nil, self.object) + end + end, shoot_interval = 1, shoot_offset = 1, animation = { @@ -70,7 +75,6 @@ mobs:register_mob("mobs_mc:snowman", { die_speed = 25, die_loop = false, }, - blood_amount = 0, do_custom = function(self, dtime) if not mobs_griefing then return @@ -120,8 +124,6 @@ mobs:register_mob("mobs_mc:snowman", { end end end, - - rain_damage = 4, }) -- This is to be called when a pumpkin or jack'o lantern has been placed. Recommended: In the on_construct function diff --git a/mods/ENTITIES/mobs_mc/sounds/mobs_mc_chicken_child.ogg b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_chicken_child.ogg new file mode 100644 index 000000000..5ea33fc07 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_chicken_child.ogg differ diff --git a/mods/ENTITIES/mobs_mc/spider.lua b/mods/ENTITIES/mobs_mc/spider.lua index 2fe6ae53a..5a353c886 100644 --- a/mods/ENTITIES/mobs_mc/spider.lua +++ b/mods/ENTITIES/mobs_mc/spider.lua @@ -3,11 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### SPIDER @@ -50,9 +46,6 @@ local spider = { {name = mobs_mc.items.spider_eye, chance = 3, min = 1, max = 1,}, }, specific_attack = { "player", "mobs_mc:iron_golem" }, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fear_height = 4, animation = { stand_speed = 10, @@ -65,7 +58,6 @@ local spider = { run_start = 0, run_end = 20, }, - blood_amount = 0, } mobs:register_mob("mobs_mc:spider", spider) diff --git a/mods/ENTITIES/mobs_mc/squid.lua b/mods/ENTITIES/mobs_mc/squid.lua index 721f861b8..d2a45f444 100644 --- a/mods/ENTITIES/mobs_mc/squid.lua +++ b/mods/ENTITIES/mobs_mc/squid.lua @@ -4,9 +4,7 @@ --################### SQUID --################### --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") mobs:register_mob("mobs_mc:squid", { type = "animal", @@ -47,15 +45,12 @@ mobs:register_mob("mobs_mc:squid", { stepheight = 0.1, fly = true, fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source }, + breathes_in_water = true, jump = false, fall_speed = 0.5, view_range = 16, - water_damage = 0, - lava_damage = 4, - light_damage = 0, runaway = true, fear_height = 4, - blood_texture = "mobs_mc_squid_blood.png", }) -- TODO: Behaviour: squirt diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_magmacube_blood.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_magmacube_blood.png deleted file mode 100644 index 46b699bee..000000000 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_magmacube_blood.png and /dev/null differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_blue.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_blue.png index b21c4f25f..9181de260 100644 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_blue.png and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_blue.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_green.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_green.png index 448444e34..152acb8f4 100644 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_green.png and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_green.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_red_blue.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_red_blue.png index 03eefc74f..2f14ef1a5 100644 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_red_blue.png and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_red_blue.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_yellow_blue.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_yellow_blue.png index 1979d9076..f35adfd02 100644 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_yellow_blue.png and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_parrot_yellow_blue.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_slime_blood.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_slime_blood.png deleted file mode 100644 index 29e94a0e5..000000000 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_slime_blood.png and /dev/null differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_agent.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_agent.png deleted file mode 100644 index 08e068891..000000000 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_agent.png and /dev/null differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_parrot.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_parrot.png index 0deacd4c1..a9a2895f8 100644 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_parrot.png and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_parrot.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_squid_blood.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_squid_blood.png deleted file mode 100644 index a991d65d5..000000000 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_squid_blood.png and /dev/null differ diff --git a/mods/ENTITIES/mobs_mc/vex.lua b/mods/ENTITIES/mobs_mc/vex.lua index 01f7af707..938e21987 100644 --- a/mods/ENTITIES/mobs_mc/vex.lua +++ b/mods/ENTITIES/mobs_mc/vex.lua @@ -3,9 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### VEX @@ -86,9 +84,6 @@ mobs:register_mob("mobs_mc:vex", { end end end, - water_damage = 0, - lava_damage = 4, - light_damage = 0, fly = true, fly_in = {"air"}, }) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 330250f38..fe1ff5267 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -19,9 +19,8 @@ -- TODO: Internal inventory, pick up items, trade with other villagers -- TODO: Farm stuff --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") +local N = function(s) return s end -- playername-indexed table containing the previously used tradenum local player_tradenum = {} @@ -63,7 +62,7 @@ end local professions = { farmer = { - name = "Farmer", + name = N("Farmer"), texture = "mobs_mc_villager_farmer.png", trades = { { @@ -93,19 +92,19 @@ local professions = { } }, fisherman = { - name = "Fisherman", + name = N("Fisherman"), texture = "mobs_mc_villager_farmer.png", trades = { { { { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 }, { "mcl_fishing:fish_cooked", 6, 6 } }, { { "mcl_mobitems:string", 15, 20 }, E1 }, - { { "mcl_core:coal_lump", 16, 24 }, E1 }, + -- TODO: replace with enchanted fishing rod + { { "mcl_core:emerald", 3, 11 }, { "mcl_fishing:fishing_rod", 1, 1} }, }, - -- TODO: enchanted fishing rod }, }, fletcher = { - name = "Fletcher", + name = N("Fletcher"), texture = "mobs_mc_villager_farmer.png", trades = { { @@ -120,7 +119,7 @@ local professions = { } }, shepherd ={ - name = "Shepherd", + name = N("Shepherd"), texture = "mobs_mc_villager_farmer.png", trades = { { @@ -149,7 +148,7 @@ local professions = { }, }, librarian = { - name = "Librarian", + name = N("Librarian"), texture = "mobs_mc_villager_librarian.png", trades = { { @@ -178,7 +177,7 @@ local professions = { }, }, cartographer = { - name = "Cartographer", + name = N("Cartographer"), texture = "mobs_mc_villager_librarian.png", trades = { { @@ -199,7 +198,7 @@ local professions = { }, }, armorer = { - name = "Armorer", + name = N("Armorer"), texture = "mobs_mc_villager_smith.png", trades = { { @@ -227,7 +226,7 @@ local professions = { }, }, leatherworker = { - name = "Leatherworker", + name = N("Leatherworker"), texture = "mobs_mc_villager_butcher.png", trades = { { @@ -246,7 +245,7 @@ local professions = { }, }, butcher = { - name = "Butcher", + name = N("Butcher"), texture = "mobs_mc_villager_butcher.png", trades = { { @@ -262,7 +261,7 @@ local professions = { }, }, weapon_smith = { - name = "Weapon Smith", + name = N("Weapon Smith"), texture = "mobs_mc_villager_smith.png", trades = { { @@ -286,7 +285,7 @@ local professions = { }, }, tool_smith = { - name = "Tool Smith", + name = N("Tool Smith"), texture = "mobs_mc_villager_smith.png", trades = { { @@ -309,7 +308,7 @@ local professions = { }, }, cleric = { - name = "Cleric", + name = N("Cleric"), texture = "mobs_mc_villager_priest.png", trades = { { @@ -332,7 +331,7 @@ local professions = { }, }, nitwit = { - name = "Nitwit", + name = N("Nitwit"), texture = "mobs_mc_villager.png", -- No trades for nitwit trades = nil, @@ -492,7 +491,7 @@ local function show_trade_formspec(playername, trader, tradenum) .."background[-0.19,-0.25;9.41,9.49;mobs_mc_trading_formspec_bg.png]" ..disabled_img ..mcl_vars.inventory_header - .."label[4,0;"..minetest.formspec_escape(profession).."]" + .."label[4,0;"..minetest.formspec_escape(minetest.colorize("#313131", S(profession))).."]" .."list[current_player;main;0,4.5;9,3;9]" .."list[current_player;main;0,7.74;9,1;]" ..b_prev..b_next @@ -595,7 +594,7 @@ local function return_item(itemstack, dropper, pos, inv_p) v.x = v.x*4 v.y = v.y*4 + 2 v.z = v.z*4 - obj:setvelocity(v) + obj:set_velocity(v) obj:get_luaentity()._insta_collect = false end end @@ -946,9 +945,6 @@ mobs:register_mob("mobs_mc:villager", { die_end = 220, die_loop = false, }, - water_damage = 0, - lava_damage = 4, - light_damage = 0, view_range = 16, fear_height = 4, jump = true, diff --git a/mods/ENTITIES/mobs_mc/villager_evoker.lua b/mods/ENTITIES/mobs_mc/villager_evoker.lua index 6d9fc87a4..7bb48e729 100644 --- a/mods/ENTITIES/mobs_mc/villager_evoker.lua +++ b/mods/ENTITIES/mobs_mc/villager_evoker.lua @@ -3,11 +3,8 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") ---dofile(minetest.get_modpath("mobs").."/api.lua") --################### --################### EVOKER --################### @@ -77,9 +74,6 @@ mobs:register_mob("mobs_mc:evoker", { die_end = 200, die_loop = false, }, - water_damage = 0, - lava_damage = 4, - light_damage = 0, view_range = 16, fear_height = 4, }) diff --git a/mods/ENTITIES/mobs_mc/villager_illusioner.lua b/mods/ENTITIES/mobs_mc/villager_illusioner.lua index e6d1b2c91..9c0429ec0 100644 --- a/mods/ENTITIES/mobs_mc/villager_illusioner.lua +++ b/mods/ENTITIES/mobs_mc/villager_illusioner.lua @@ -3,16 +3,22 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") +local mod_bows = minetest.get_modpath("mcl_bows") ~= nil mobs:register_mob("mobs_mc:illusioner", { type = "monster", attack_type = "shoot", - shoot_interval = 0.5, - arrow = "mobs_mc:arrow_entity", + shoot_interval = 2.5, shoot_offset = 1.5, + arrow = "mcl_bows:arrow_entity", + shoot_arrow = function(self, pos, dir) + if mod_bows then + -- 1-4 damage per arrow + local dmg = math.random(1, 4) + mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg) + end + end, hp_min = 32, hp_max = 32, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, @@ -25,7 +31,6 @@ mobs:register_mob("mobs_mc:illusioner", { }, }, sounds = { -- TODO: more sounds - shoot_attack = "mcl_bows_bow_shoot", distance = 16, }, visual_size = {x=3, y=3}, @@ -50,7 +55,6 @@ mobs:register_mob("mobs_mc:illusioner", { }, view_range = 16, fear_height = 4, - lava_damage = 4, }) mobs:register_egg("mobs_mc:illusioner", S("Illusioner"), "mobs_mc_spawn_icon_illusioner.png", 0) diff --git a/mods/ENTITIES/mobs_mc/villager_vindicator.lua b/mods/ENTITIES/mobs_mc/villager_vindicator.lua index 82eff89be..a228aa560 100644 --- a/mods/ENTITIES/mobs_mc/villager_vindicator.lua +++ b/mods/ENTITIES/mobs_mc/villager_vindicator.lua @@ -3,11 +3,8 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") ---dofile(minetest.get_modpath("mobs").."/api.lua") --################### --################### VINDICATOR --################### @@ -64,9 +61,6 @@ mobs:register_mob("mobs_mc:vindicator", { die_end = 180, die_loop = false, }, - water_damage = 1, - lava_damage = 4, - light_damage = 0, view_range = 16, fear_height = 4, diff --git a/mods/ENTITIES/mobs_mc/villager_zombie.lua b/mods/ENTITIES/mobs_mc/villager_zombie.lua index f340c0436..bc974277c 100644 --- a/mods/ENTITIES/mobs_mc/villager_zombie.lua +++ b/mods/ENTITIES/mobs_mc/villager_zombie.lua @@ -3,9 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") -- TODO: Turn villagers to zombie villager @@ -18,6 +16,7 @@ mobs:register_mob("mobs_mc:villager_zombie", { type = "monster", hp_min = 20, hp_max = 20, + breath_max = -1, armor = 90, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, visual = "mesh", @@ -73,11 +72,9 @@ mobs:register_mob("mobs_mc:villager_zombie", { run_start = 0, run_end = 20, }, - water_damage = 1, - lava_damage = 5, sunlight_damage = 1, view_range = 16, - fear_height = 5, + fear_height = 4, }) diff --git a/mods/ENTITIES/mobs_mc/witch.lua b/mods/ENTITIES/mobs_mc/witch.lua index 7edce46e5..db183e671 100644 --- a/mods/ENTITIES/mobs_mc/witch.lua +++ b/mods/ENTITIES/mobs_mc/witch.lua @@ -3,11 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") +local S = minetest.get_translator("mobs_mc") --################### --################### WITCH @@ -67,9 +63,6 @@ mobs:register_mob("mobs_mc:witch", { shoot_start = 50, shoot_end = 82, }, - water_damage = 1, - lava_damage = 5, - light_damage = 0, view_range = 16, fear_height = 4, @@ -91,8 +84,8 @@ mobs:register_arrow(":mobs:potion_arrow", { }, nil) end, - hit_mob = function(self, player) - player:punch(self.object, 1.0, { + hit_mob = function(self, mob) + mob:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 2}, }, nil) diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index 9602d5a54..871496d00 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -3,18 +3,12 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") ---dofile(minetest.get_modpath("mobs").."/api.lua") - - --################### --################### WITHER --################### - mobs:register_mob("mobs_mc:wither", { type = "monster", hp_max = 300, @@ -47,16 +41,14 @@ mobs:register_mob("mobs_mc:wither", { dogshoot_switch = 1, dogshoot_count_max =1, attack_animals = true, - floats=1, drops = { {name = mobs_mc.items.nether_star, chance = 1, min = 1, max = 1}, }, - water_damage = 0, lava_damage = 0, - light_damage = 0, + fire_damage = 0, attack_type = "dogshoot", explosion_radius = 3, explosion_fire = false, @@ -71,7 +63,6 @@ mobs:register_mob("mobs_mc:wither", { walk_start = 0, walk_end = 20, run_start = 0, run_end = 20, }, - blood_amount = 0, }) local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false @@ -100,7 +91,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon", { for _,obj in ipairs(objects) do local name = self.name if name~="mobs_mc:roar_of_the_dragon" and name ~= "mobs_mc:wither" then - obj:set_hp(obj:get_hp()-0.05) + obj:set_hp(obj:get_hp()-5) if (obj:get_hp() <= 0) then if (not obj:is_player()) and name ~= self.object:get_luaentity().name then obj:remove() @@ -142,7 +133,7 @@ mobs:register_arrow(":mobs_mc:fireball", { hit_mob = function(self, mob) minetest.sound_play("tnt_explode", {pos = mob:get_pos(), gain = 1.5,max_hear_distance = 16}) - player:punch(self.object, 1.0, { + mob:punch(self.object, 1.0, { full_punch_interval = 0.5, damage_groups = {fleshy = 8}, }, nil) diff --git a/mods/ENTITIES/mobs_mc/wolf.lua b/mods/ENTITIES/mobs_mc/wolf.lua index fc73e834e..e8e5de1f7 100644 --- a/mods/ENTITIES/mobs_mc/wolf.lua +++ b/mods/ENTITIES/mobs_mc/wolf.lua @@ -1,8 +1,6 @@ --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") local default_walk_chance = 50 @@ -47,9 +45,6 @@ local wolf = { reach = 2, attack_type = "dogfight", fear_height = 4, - water_damage = 0, - lava_damage = 4, - light_damage = 0, follow = mobs_mc.follow.wolf, on_rightclick = function(self, clicker) -- Try to tame wolf (intentionally does NOT use mobs:feed_tame) diff --git a/mods/ENTITIES/mobs_mc/zombie.lua b/mods/ENTITIES/mobs_mc/zombie.lua index 72c76b329..d75489888 100644 --- a/mods/ENTITIES/mobs_mc/zombie.lua +++ b/mods/ENTITIES/mobs_mc/zombie.lua @@ -3,12 +3,7 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - ---dofile(minetest.get_modpath("mobs").."/api.lua") - +local S = minetest.get_translator("mobs_mc") --################### --################### ZOMBIE @@ -47,6 +42,7 @@ local zombie = { type = "monster", hp_min = 20, hp_max = 20, + breath_max = -1, armor = 90, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, visual = "mesh", @@ -70,8 +66,8 @@ local zombie = { fear_height = 4, pathfinding = 1, jump = true, - --jump_height = 3, - group_attack = true, + jump_height = 4, + group_attack = { "mobs_mc:zombie", "mobs_mc:baby_zombie", "mobs_mc:husk", "mobs_mc:baby_husk" }, drops = drops_zombie, animation = { speed_normal = 25, speed_run = 50, @@ -79,8 +75,6 @@ local zombie = { walk_start = 0, walk_end = 40, run_start = 0, run_end = 40, }, - lava_damage = 4, - -- TODO: Burn mob only when in direct sunlight sunlight_damage = 2, view_range = 16, attack_type = "dogfight", @@ -96,7 +90,7 @@ baby_zombie.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} baby_zombie.visual_size = {x=zombie.visual_size.x/2, y=zombie.visual_size.y/2} baby_zombie.walk_velocity = 1.2 baby_zombie.run_velocity = 2.4 -baby_zombie.sunlight_damage = 0 +baby_zombie.child = 1 mobs:register_mob("mobs_mc:baby_zombie", baby_zombie) @@ -105,7 +99,6 @@ mobs:register_mob("mobs_mc:baby_zombie", baby_zombie) local husk = table.copy(zombie) husk.textures = {{"mobs_mc_husk.png"}} husk.sunlight_damage = 0 -husk.water_damage = 3 husk.drops = drops_common -- TODO: Husks avoid water @@ -118,6 +111,7 @@ baby_husk.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} baby_husk.visual_size = {x=zombie.visual_size.x/2, y=zombie.visual_size.y/2} baby_husk.walk_velocity = 1.2 baby_husk.run_velocity = 2.4 +baby_husk.child = 1 mobs:register_mob("mobs_mc:baby_husk", baby_husk) diff --git a/mods/ENTITIES/mobs_mc/zombiepig.lua b/mods/ENTITIES/mobs_mc/zombiepig.lua index d85c2ceb2..77bd0e196 100644 --- a/mods/ENTITIES/mobs_mc/zombiepig.lua +++ b/mods/ENTITIES/mobs_mc/zombiepig.lua @@ -3,11 +3,8 @@ --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --- intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S = minetest.get_translator("mobs_mc") ---dofile(minetest.get_modpath("mobs").."/api.lua") --################### --################### ZOMBIE PIGMAN --################### @@ -19,9 +16,10 @@ local pigman = { passive = false, hp_min = 20, hp_max = 20, + breath_max = -1, armor = 90, attack_type = "dogfight", - group_attack = true, + group_attack = { "mobs_mc:pigman", "mobs_mc:baby_pigman" }, damage = 9, reach = 2, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, @@ -76,9 +74,8 @@ local pigman = { punch_start = 90, punch_end = 130, }, - water_damage = 1, lava_damage = 0, - light_damage = 0, + fire_damage = 0, fear_height = 4, view_range = 16, } @@ -99,6 +96,7 @@ baby_pigman.textures = { { baby_pigman.walk_velocity = 1.2 baby_pigman.run_velocity = 2.4 baby_pigman.light_damage = 0 +baby_pigman.child = 1 mobs:register_mob("mobs_mc:baby_pigman", baby_pigman) diff --git a/mods/ENTITIES/mobs_mc_gameconfig/init.lua b/mods/ENTITIES/mobs_mc_gameconfig/init.lua index f24952e91..f1f185b7d 100644 --- a/mods/ENTITIES/mobs_mc_gameconfig/init.lua +++ b/mods/ENTITIES/mobs_mc_gameconfig/init.lua @@ -73,7 +73,7 @@ mobs_mc.override.items = { wheat = "mcl_farming:wheat_item", cookie = "mcl_farming:cookie", potato = "mcl_farming:potato_item", - hay_bale = "mcl_farming:hay_bale", + hay_bale = "mcl_farming:hay_block", prismarine_shard = "mcl_ocean:prismarine_shard", prismarine_crystals = "mcl_ocean:prismarine_crystals", apple = "mcl_core:apple", @@ -88,8 +88,7 @@ mobs_mc.override.items = { mycelium = "mcl_core:mycelium", carrot = "mcl_farming:carrot_item", golden_carrot = "mcl_farming:carrot_item_gold", - fishing_rod = "mcl_core:stick", - --TODO: Re-enable: fishing_rod = "mcl_fishing:fishing_rod", + fishing_rod = "mcl_fishing:fishing_rod", fish_raw = "mcl_fishing:fish_raw", salmon_raw = "mcl_fishing:salmon_raw", clownfish_raw = "mcl_fishing:clownfish_raw", @@ -137,7 +136,10 @@ mobs_mc.override.follow = { sheep = { mobs_mc.override.items.wheat }, cow = { mobs_mc.override.items.wheat }, horse = { mobs_mc.override.items.apple, mobs_mc.override.items.sugar, mobs_mc.override.items.wheat, mobs_mc.override.items.hay_bale, mobs_mc.override.items.golden_apple, mobs_mc.override.items.golden_carrot }, + llama = { mobs_mc.override.items.wheat, mobs_mc.override.items.hay_bale }, rabbit = { mobs_mc.override.items.dandelion, mobs_mc.override.items.carrot, mobs_mc.override.items.golden_carrot }, + wolf = { mobs_mc.override.items.bone }, + dog = { mobs_mc.override.items.rabbit_raw, mobs_mc.override.items.rabbit_cooked, mobs_mc.override.items.mutton_raw, mobs_mc.override.items.mutton_cooked, mobs_mc.override.items.beef_raw, mobs_mc.override.items.beef_cooked, mobs_mc.override.items.chicken_raw, mobs_mc.override.items.chicken_cooked, mobs_mc.override.items.rotten_flesh, mobs_mc.override.items.porkchop_raw, mobs_mc.override.items.porkchop_cooked }, } mobs_mc.override.replace = { diff --git a/mods/ENTITIES/modpack.txt b/mods/ENTITIES/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/ENVIRONMENT/lightning/init.lua b/mods/ENVIRONMENT/lightning/init.lua index e3792f7e2..bf077105d 100644 --- a/mods/ENVIRONMENT/lightning/init.lua +++ b/mods/ENVIRONMENT/lightning/init.lua @@ -1,4 +1,3 @@ - --[[ Copyright (C) 2016 - Auke Kok @@ -10,6 +9,8 @@ of the license, or (at your option) any later version. --]] +local S = minetest.get_translator("lightning") + lightning = {} lightning.interval_low = 17 @@ -116,14 +117,56 @@ lightning.strike = function(pos) -- to make the texture lightning bolt hit exactly in the middle of the -- texture (e.g. 127/128 on a 256x wide texture) texture = "lightning_lightning_" .. rng:next(1,3) .. ".png", + glow = minetest.LIGHT_MAX, }) minetest.sound_play({ pos = pos, name = "lightning_thunder", gain = 10, max_hear_distance = 500 }) - -- damage nearby objects, player or not - for _, obj in ipairs(minetest.get_objects_inside_radius(pos, 5)) do - -- nil as param#1 is supposed to work, but core can't handle it. - obj:punch(obj, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy=8}}, nil) + -- damage nearby objects, transform mobs + local objs = minetest.get_objects_inside_radius(pos2, 3.5) + for o=1, #objs do + local obj = objs[o] + local lua = obj:get_luaentity() + if obj:is_player() then + -- Player damage + if minetest.get_modpath("mcl_death_messages") then + mcl_death_messages.player_damage(obj, S("@1 was struck by lightning.", obj:get_player_name())) + end + obj:set_hp(obj:get_hp()-5) + -- Mobs + elseif lua and lua._cmi_is_mob then + -- pig → zombie pigman (no damage) + if lua.name == "mobs_mc:pig" then + local rot = obj:get_yaw() + obj:remove() + obj = minetest.add_entity(pos2, "mobs_mc:pigman") + obj:set_yaw(rot) + -- mooshroom: toggle color red/brown (no damage) + elseif lua.name == "mobs_mc:mooshroom" then + if lua.base_texture[1] == "mobs_mc_mooshroom.png" then + lua.base_texture = { "mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } + else + lua.base_texture = { "mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png" } + end + obj:set_properties({textures = lua.base_texture}) + -- villager → witch (no damage) + elseif lua.name == "mobs_mc:villager" then + -- Witches are incomplete, this code is unused + -- TODO: Enable this code when witches are working. + --[[ + local rot = obj:get_yaw() + obj:remove() + obj = minetest.add_entity(pos2, "mobs_mc:witch") + obj:set_yaw(rot) + ]] + -- TODO: creeper → charged creeper (no damage) + elseif lua.name == "mobs_mc:creeper" then + + -- Other mobs: Just damage + else + obj:set_hp(obj:get_hp()-5, "lightning") + end + end end local playerlist = minetest.get_connected_players() @@ -163,62 +206,15 @@ lightning.strike = function(pos) posadd = {x=math.cos(angle),y=0,z=math.sin(angle)} posadd = vector.normalize(posadd) local mob = minetest.add_entity(vector.add(pos2, posadd), "mobs_mc:skeleton") - mob:setyaw(angle-math.pi/2) + mob:set_yaw(angle-math.pi/2) angle = angle + (math.pi*2) / 3 end - -- Cause a fire, deal damage, transform mobs + -- Cause a fire else minetest.set_node(pos2, {name = "mcl_fire:fire"}) - - local objs = minetest.get_objects_inside_radius(pos2, 3.5) - for o=1, #objs do - local obj = objs[o] - local lua = obj:get_luaentity() - if obj:is_player() then - -- Player damage - if minetest.get_modpath("mcl_death_messages") then - mcl_death_messages.player_damage(obj, string.format("%s was struck by lightning.", obj:get_player_name())) - end - obj:set_hp(obj:get_hp()-5) - -- Mobs - elseif lua and lua._cmi_is_mob then - -- pig → zombie pigman - if lua.name == "mobs_mc:pig" then - local rot = obj:get_yaw() - obj:remove() - obj = minetest.add_entity(pos2, "mobs_mc:pigman") - obj:set_yaw(rot) - -- mooshroom: toggle color red/brown - elseif lua.name == "mobs_mc:mooshroom" then - if lua.base_texture[1] == "mobs_mc_mooshroom.png" then - lua.base_texture = { "mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } - else - lua.base_texture = { "mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png" } - end - obj:set_properties({textures = lua.base_texture}) - -- villager → witch - elseif lua.name == "mobs_mc:villager" then - -- Witches are incomplete, this code is unused - -- TODO: Enable this code when witches are working. - --[[ - local rot = obj:get_yaw() - obj:remove() - obj = minetest.add_entity(pos2, "mobs_mc:witch") - obj:set_yaw(rot) - ]] - -- TODO: creeper → charged creeper - elseif lua.name == "mobs_mc:creeper" then - - -- Other mobs: Just Damage - else - obj:set_hp(obj:get_hp()-5) - end - end - end end end - -- TODO: Charged creeper end end @@ -233,7 +229,7 @@ end) minetest.register_chatcommand("lightning", { params = "[ ]", - description = "Let lightning strike at the specified position or yourself", + description = S("Let lightning strike at the specified position or yourself"), privs = { maphack = true }, func = function(name, param) local pos = {} @@ -254,9 +250,10 @@ minetest.register_chatcommand("lightning", { if player then lightning.strike(player:get_pos()) else - return false, "No position specified and unknown player" + return false, S("No position specified and unknown player") end end return true end, }) + diff --git a/mods/ENVIRONMENT/lightning/locale/lightning.de.tr b/mods/ENVIRONMENT/lightning/locale/lightning.de.tr new file mode 100644 index 000000000..a76c6809e --- /dev/null +++ b/mods/ENVIRONMENT/lightning/locale/lightning.de.tr @@ -0,0 +1,4 @@ +# textdomain: lightning +@1 was struck by lightning.=@1 wurde vom Blitz getroffen. +Let lightning strike at the specified position or yourself=Lassen Sie einen Blitz an die gegebene Position oder auf sich selbst einschlagen. +No position specified and unknown player=Keine Position angegeben und Spieler nicht bekannt diff --git a/mods/ENVIRONMENT/lightning/locale/template.txt b/mods/ENVIRONMENT/lightning/locale/template.txt new file mode 100644 index 000000000..2c07393f6 --- /dev/null +++ b/mods/ENVIRONMENT/lightning/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: lightning +@1 was struck by lightning.= +Let lightning strike at the specified position or yourself= +No position specified and unknown player= diff --git a/mods/ENVIRONMENT/mcl_void_damage/init.lua b/mods/ENVIRONMENT/mcl_void_damage/init.lua index f8f4578f9..5490f5000 100644 --- a/mods/ENVIRONMENT/mcl_void_damage/init.lua +++ b/mods/ENVIRONMENT/mcl_void_damage/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_void_damage") + local voidtimer = 0 minetest.register_globalstep(function(dtime) @@ -24,7 +26,7 @@ minetest.register_globalstep(function(dtime) local spawn = mcl_spawn.get_spawn_pos(obj) obj:set_pos(spawn) mcl_worlds.dimension_change(obj, mcl_worlds.pos_to_dimension(spawn)) - minetest.chat_send_player(obj:get_player_name(), "The void is off-limits to you!") + minetest.chat_send_player(obj:get_player_name(), S("The void is off-limits to you!")) else obj:remove() end @@ -32,7 +34,7 @@ minetest.register_globalstep(function(dtime) -- Damage enabled, not immortal: Deal void damage (4 HP / 0.5 seconds) if obj:get_hp() > 0 then if is_player then - mcl_death_messages.player_damage(obj, string.format("%s fell into the endless void.", obj:get_player_name())) + mcl_death_messages.player_damage(obj, S("@1 fell into the endless void.", obj:get_player_name())) end obj:set_hp(obj:get_hp() - 4) end diff --git a/mods/ENVIRONMENT/mcl_void_damage/locale/mcl_void_damage.de.tr b/mods/ENVIRONMENT/mcl_void_damage/locale/mcl_void_damage.de.tr new file mode 100644 index 000000000..19ef90653 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_void_damage/locale/mcl_void_damage.de.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_void_damage +The void is off-limits to you!=Die Leere ist für Sie tabu! +@1 fell into the endless void.=@1 fiel in die endlose Leere. diff --git a/mods/ENVIRONMENT/mcl_void_damage/locale/template.txt b/mods/ENVIRONMENT/mcl_void_damage/locale/template.txt new file mode 100644 index 000000000..db9050e2f --- /dev/null +++ b/mods/ENVIRONMENT/mcl_void_damage/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: mcl_void_damage +The void is off-limits to you!= +@1 fell into the endless void.= diff --git a/mods/ENVIRONMENT/mcl_weather/locale/mcl_weather.de.tr b/mods/ENVIRONMENT/mcl_weather/locale/mcl_weather.de.tr new file mode 100644 index 000000000..0fc8330ad --- /dev/null +++ b/mods/ENVIRONMENT/mcl_weather/locale/mcl_weather.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_weather +Gives ability to control weather=Fähigkeit, das Wetter zu beeinflussen +Changes the weather to the specified parameter.=Ändert das Wetter. +Error: No weather specified.=Fehler: Kein Wetter angegeben. +Error: Invalid parameters.=Fehler: Ungültige Parameter. +Error: Duration can't be less than 1 second.=Fehler: Dauer darf nicht weniger als 1 Sekunde sein. +Error: Invalid weather specified. Use “clear”, “rain”, “snow” or “thunder”.=Fehler. Ungültiges Wetter. Benutzen Sie „clear“ (klar), „rain“ (Regen), „snow“ (Schnee) oder „thunder“ (Gewittersturm). +Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)=Wechselt das Wetter zwischem klaren Wetter und Wetter mit Niederschlag (zufällig Regen, Gewittersturm oder Schnee) diff --git a/mods/ENVIRONMENT/mcl_weather/locale/template.txt b/mods/ENVIRONMENT/mcl_weather/locale/template.txt new file mode 100644 index 000000000..03555e473 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_weather/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mcl_weather +Gives ability to control weather= +Changes the weather to the specified parameter.= +Error: No weather specified.= +Error: Invalid parameters.= +Error: Duration can't be less than 1 second.= +Error: Invalid weather specified. Use “clear”, “rain”, “snow” or “thunder”.= +Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)= diff --git a/mods/ENVIRONMENT/mcl_weather/rain.lua b/mods/ENVIRONMENT/mcl_weather/rain.lua index 8a4cff087..76e386084 100644 --- a/mods/ENVIRONMENT/mcl_weather/rain.lua +++ b/mods/ENVIRONMENT/mcl_weather/rain.lua @@ -127,7 +127,7 @@ mcl_weather.rain.update_sound = function(player) if player_meta.sound_handler ~= nil then if mcl_weather.rain.last_rp_count == 0 then - minetest.sound_stop(player_meta.sound_handler) + minetest.sound_fade(player_meta.sound_handler, -0.5, 0.0) player_meta.sound_handler = nil end elseif mcl_weather.rain.last_rp_count > 0 then @@ -142,7 +142,7 @@ end mcl_weather.rain.remove_sound = function(player) local player_meta = mcl_weather.players[player:get_player_name()] if player_meta ~= nil and player_meta.sound_handler ~= nil then - minetest.sound_stop(player_meta.sound_handler) + minetest.sound_fade(player_meta.sound_handler, -0.5, 0.0) player_meta.sound_handler = nil player_meta.sound_updated = nil end diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index 180a3f87c..196bd79ff 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -235,7 +235,7 @@ local initsky = function(player) end -- MC-style clouds: Layer 127, thickness 4, fly to the “West” - player:set_clouds({height=mcl_worlds.layer_to_y(127), speed={x=-2, y=0}, thickness=4, color="#FFF0FEF"}) + player:set_clouds({height=mcl_worlds.layer_to_y(127), speed={x=-2, z=0}, thickness=4, color="#FFF0FEF"}) end minetest.register_on_joinplayer(initsky) diff --git a/mods/ENVIRONMENT/mcl_weather/weather_core.lua b/mods/ENVIRONMENT/mcl_weather/weather_core.lua index bec9606dd..29da968f8 100644 --- a/mods/ENVIRONMENT/mcl_weather/weather_core.lua +++ b/mods/ENVIRONMENT/mcl_weather/weather_core.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_weather") + -- weather states, 'none' is default, other states depends from active mods mcl_weather.state = "none" @@ -182,18 +184,18 @@ mcl_weather.get_weather = function() end minetest.register_privilege("weather_manager", { - description = "Gives ability to control weather", + description = S("Gives ability to control weather"), give_to_singleplayer = false }) -- Weather command definition. Set minetest.register_chatcommand("weather", { params = "(clear | rain | snow | thunder) []", - description = "Changes the weather to the specified parameter.", + description = S("Changes the weather to the specified parameter."), privs = {weather_manager = true}, func = function(name, param) if (param == "") then - return false, "Error: No weather specified." + return false, S("Error: No weather specified.") end local new_weather, end_time local parse1, parse2 = string.match(param, "(%w+) ?(%d*)") @@ -204,13 +206,13 @@ minetest.register_chatcommand("weather", { new_weather = parse1 end else - return false, "Error: Invalid parameters." + return false, S("Error: Invalid parameters.") end if parse2 then if type(tonumber(parse2)) == "number" then local duration = tonumber(parse2) if duration < 1 then - return false, "Error: Duration can't be less than 1 second." + return false, S("Error: Duration can't be less than 1 second.") end end_time = minetest.get_gametime() + duration end @@ -220,14 +222,14 @@ minetest.register_chatcommand("weather", { if success then return true else - return false, "Error: Invalid weather specified. Use “clear”, “rain”, “snow” or “thunder”." + return false, S("Error: Invalid weather specified. Use “clear”, “rain”, “snow” or “thunder”.") end end }) minetest.register_chatcommand("toggledownfall", { params = "", - description = "Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)", + description = S("Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)"), privs = {weather_manager = true}, func = function(name, param) -- Currently rain/thunder/snow: Set weather to clear diff --git a/mods/ENVIRONMENT/modpack.conf b/mods/ENVIRONMENT/modpack.conf new file mode 100644 index 000000000..8c40cfab8 --- /dev/null +++ b/mods/ENVIRONMENT/modpack.conf @@ -0,0 +1,2 @@ +name = ENVIRONMENT +description = Meta-modpack containing environment and nature-related mods for MineClone 2 diff --git a/mods/ENVIRONMENT/modpack.txt b/mods/ENVIRONMENT/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/HELP/doc/doc/API.md b/mods/HELP/doc/doc/API.md index 784a66685..49afeb3aa 100644 --- a/mods/HELP/doc/doc/API.md +++ b/mods/HELP/doc/doc/API.md @@ -454,10 +454,6 @@ viewed a category as well, both returned values are `nil`. This is a convenience function for creating a special formspec widget. It creates a widget in which you can insert scrollable multi-line text. -As of Minetest 0.4.14, this function is only provided because Minetest lacks -native support for such a widget. When Minetest supports such a widget natively, -this function may become just a simple wrapper. - #### Parameters * `data`: Text to be written inside the widget * `x`: Formspec X coordinate (optional) diff --git a/mods/HELP/doc/doc/depends.txt b/mods/HELP/doc/doc/depends.txt deleted file mode 100644 index 4907c641d..000000000 --- a/mods/HELP/doc/doc/depends.txt +++ /dev/null @@ -1,5 +0,0 @@ -intllib? -unified_inventory? -sfinv_buttons? -central_message? -inventory_plus? diff --git a/mods/HELP/doc/doc/description.txt b/mods/HELP/doc/doc/description.txt deleted file mode 100644 index 808a218b1..000000000 --- a/mods/HELP/doc/doc/description.txt +++ /dev/null @@ -1 +0,0 @@ -A simple in-game documentation system which enables mods to add help entries based on templates. diff --git a/mods/HELP/doc/doc/init.lua b/mods/HELP/doc/doc/init.lua index 7f4705ef5..dcb4c7857 100644 --- a/mods/HELP/doc/doc/init.lua +++ b/mods/HELP/doc/doc/init.lua @@ -1,16 +1,10 @@ --- Boilerplate to support localized strings if intllib mod is installed. -local S, F -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end -end -F = function(f) return minetest.formspec_escape(S(f)) end +local S = minetest.get_translator("doc") +local F = function(f) return minetest.formspec_escape(S(f)) end -- Compability for 0.4.14 or earlier local colorize -if core.colorize then - colorize = core.colorize +if minetest.colorize then + colorize = minetest.colorize else colorize = function(color, text) return text end end @@ -57,9 +51,6 @@ local CATEGORYFIELDSIZE = { HEIGHT = math.floor(doc.FORMSPEC.HEIGHT-1), } --- Maximum characters per line in the text widget -local TEXT_LINELENGTH = 80 - doc.data = {} doc.data.categories = {} doc.data.aliases = {} @@ -462,66 +453,9 @@ end -- Template function templates, to be used for build_formspec in doc.add_category doc.entry_builders = {} --- Inserts line breaks into a single paragraph and collapses all whitespace (including newlines) --- into spaces -local linebreaker_single = function(text, linelength) - if linelength == nil then - linelength = TEXT_LINELENGTH - end - local remain = linelength - local res = {} - local line = {} - local split = function(s) - local res = {} - for w in string.gmatch(s, "%S+") do - res[#res+1] = w - end - return res - end - - for _, word in ipairs(split(text)) do - if string.len(word) + 1 > remain then - table.insert(res, table.concat(line, " ")) - line = { word } - remain = linelength - string.len(word) - else - table.insert(line, word) - remain = remain - (string.len(word) + 1) - end - end - - table.insert(res, table.concat(line, " ")) - return table.concat(res, "\n") -end - --- Inserts automatic line breaks into an entire text and preserves existing newlines -local linebreaker = function(text, linelength) - local out = "" - for s in string.gmatch(text, "([^\n]*)") do - local l = linebreaker_single(s, linelength) - out = out .. l - if(string.len(l) == 0) then - out = out .. "\n" - end - end - -- Remove last newline - if string.len(out) >= 1 then - out = string.sub(out, 1, string.len(out) - 1) - end - return out -end - --- Inserts text suitable for a textlist (including automatic word-wrap) -local text_for_textlist = function(text, linelength) - text = linebreaker(text, linelength) - text = minetest.formspec_escape(text) - text = string.gsub(text, "\n", ",") - return text -end - -- Scrollable freeform text doc.entry_builders.text = function(data) - local formstring = doc.widgets.text(data, doc.FORMSPEC.ENTRY_START_X, doc.FORMSPEC.ENTRY_START_Y, doc.FORMSPEC.ENTRY_WIDTH - 0.2, doc.FORMSPEC.ENTRY_HEIGHT) + local formstring = doc.widgets.text(data, doc.FORMSPEC.ENTRY_START_X, doc.FORMSPEC.ENTRY_START_Y, doc.FORMSPEC.ENTRY_WIDTH - 0.4, doc.FORMSPEC.ENTRY_HEIGHT) return formstring end @@ -539,7 +473,7 @@ doc.entry_builders.text_and_gallery = function(data, playername) formstring = formstring .. doc.widgets.text(data.text, doc.FORMSPEC.ENTRY_START_X, doc.FORMSPEC.ENTRY_START_Y, - doc.FORMSPEC.ENTRY_WIDTH - 0.2, + doc.FORMSPEC.ENTRY_WIDTH - 0.4, doc.FORMSPEC.ENTRY_HEIGHT - stolen_height) return formstring @@ -547,12 +481,13 @@ end doc.widgets = {} -local text_id = 1 -- Scrollable freeform text doc.widgets.text = function(data, x, y, width, height) if x == nil then x = doc.FORMSPEC.ENTRY_START_X end + -- Offset to table[], which was used for this in a previous version + local xfix = x + 0.35 if y == nil then y = doc.FORMSPEC.ENTRY_START_Y end @@ -562,18 +497,13 @@ doc.widgets.text = function(data, x, y, width, height) if height == nil then height = doc.FORMSPEC.ENTRY_HEIGHT end - local baselength = TEXT_LINELENGTH - local widget_basewidth = doc.FORMSPEC.WIDTH - local linelength = math.max(20, math.floor(baselength * (width / widget_basewidth))) + -- Weird offset for textarea[] + local heightfix = height + 1 - local widget_id = "doc_widget_text"..text_id - text_id = text_id + 1 - -- TODO: Wait for Minetest to provide a native widget for scrollable read-only text with automatic line breaks. - -- Currently, all of this had to be hacked into this script manually by using/abusing the table widget - local formstring = "tablecolumns[text]".. - "tableoptions[background=#000000FF;highlight=#000000FF;border=false]".. - "table["..tostring(x)..","..tostring(y)..";"..tostring(width)..","..tostring(height)..";"..widget_id..";"..text_for_textlist(data, linelength).."]" - return formstring, widget_id + -- Also add background box + local formstring = "box["..tostring(x-0.175)..","..tostring(y)..";"..tostring(width)..","..tostring(height)..";#000000]" .. + "textarea["..tostring(xfix)..","..tostring(y)..";"..tostring(width)..","..tostring(heightfix)..";;;"..minetest.formspec_escape(data).."]" + return formstring end -- Image gallery @@ -731,12 +661,12 @@ function doc.formspec_core(tab) minetest.formspec_escape(S("Category list")) .. "," .. minetest.formspec_escape(S("Entry list")) .. "," .. minetest.formspec_escape(S("Entry")) .. ";" - ..tab..";true;true]" .. - "bgcolor[#343434FF]" + ..tab..";false;false]" + -- Let the Game decide on the style, such as background, etc. end function doc.formspec_main(playername) - local formstring = "label[0,0;"..minetest.formspec_escape(DOC_INTRO) .. "\n" + local formstring = "textarea[0.35,0;"..doc.FORMSPEC.WIDTH..",1;;;"..minetest.formspec_escape(DOC_INTRO) .. "\n" local notify_checkbox_x, notify_checkbox_y if doc.get_category_count() >= 1 then formstring = formstring .. F("Please select a category you wish to learn more about:").."]" @@ -806,7 +736,8 @@ function doc.formspec_error_no_categories() formstring = formstring .. minetest.formspec_escape( colorize(COLOR_ERROR, S("Error: No help available.")) .. "\n\n" .. -S("No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.")) .. "\n\n" .. +S("No categories have been registered, but they are required to provide help.").."\n".. +S("The Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.")) .. "\n\n" .. S("Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.") formstring = formstring .. ";]button_exit[3,5;2,1;okay;"..F("OK").."]" return formstring @@ -941,7 +872,7 @@ function doc.formspec_category(id, playername) if total >= 1 then local revealed = doc.get_revealed_count(playername, id) if revealed == 0 then - formstring = formstring .. "label[0,0.5;"..F("Currently all entries in this category are hidden from you.\nUnlock new entries by progressing in the game.").."]" + formstring = formstring .. "label[0,0.5;"..minetest.formspec_escape(S("Currently all entries in this category are hidden from you.").."\n"..S("Unlock new entries by progressing in the game.")).."]" formstring = formstring .. "button[0,1.5;3,1;doc_button_goto_main;"..F("Go to category list").."]" else formstring = formstring .. "label[0,0.5;"..F("This category has the following entries:").."]" diff --git a/mods/HELP/doc/doc/locale/de.txt b/mods/HELP/doc/doc/locale/de.txt deleted file mode 100644 index 113307ed5..000000000 --- a/mods/HELP/doc/doc/locale/de.txt +++ /dev/null @@ -1,42 +0,0 @@ -< = < -> = > -Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. = Der Zugriff auf den angeforderten Eintrag wurde verweigert; dieser Eintrag ist geheim. Sie können durch weiteren Spielfortschritt den Zugriff freischalten. Finden Sie selbst heraus, wie Sie diesen Eintrag freischalten können. -All entries read. = Alle Einträge gelesen. -All help entries revealed! = Alle Hilfseinträge aufgedeckt! -All help entries are already revealed. = Alle Hilfseinträge sind schon aufgedeckt. -Allows you to reveal all hidden help entries with /help_reveal = Ermöglicht es Ihnen, alle verborgenen Hilfseinträge mit /help_reveal freizuschalten -Category list = Kategorienliste -Currently all entries in this category are hidden from you.\nUnlock new entries by progressing in the game. = Momentan sind alle Einträge in dieser Kategorie vor Ihnen verborgen.\nSchalten Sie neue Einträge frei, indem Sie im Spiel fortschreiten. -Help = Hilfe -Entry = Eintrag -Entry list = Eintragsliste -Error: Access denied. = Fehler: Zugriff verweigert. -Error: No help available. = Fehler: Keine Hilfe verfügbar. -Go to category list = Zur Kategorienliste -Go to entry list = Zur Eintragsliste -Help > (No Category) = Hilfe > (Keine Kategorie) -Help > @1 = Hilfe > @1 -Help > @1 > @2 = Hilfe > @1 > @2 -Help > @1 > (No Entry) = Hilfe > @1 > (Kein Eintrag) -Hidden entries: @1 = Verborgene Einträge: @1 -New entries: @1 = Neue Einträge: @1 -New help entry unlocked: @1 > @2 = Neuen Hilfseintrag freigeschaltet: @1 > @2 -No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again. = Es wurden keine Kategorien registriert, aber sie werden benötigt, um die Hilfe anbieten zu können.\nDas Dokumentationssystem [doc] bringt von sich aus keine eigenen Hilfsinhalte mit, es benötigt zusätzliche Mods, um sie hinzuzufügen. Bitte stellen Sie sicher, dass solche Mods für diese Welt aktiviert sind und versuchen Sie es erneut. -Number of entries: @1 = Anzahl der Einträge: @1 -OK = OK -Open a window providing help entries about Minetest and more = Ein Fenster mit Hilfseinträgen über Minetest und mehr öffnen -Please select a category you wish to learn more about: = Bitte wählen Sie eine Kategorie, über die Sie mehr erfahren möchten, aus: -Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia. = Empfohlene Mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia. -Reveal all hidden help entries to you = Alle für Sie verborgenen Hilfseinträge freischalten -Show entry = Eintrag zeigen -Show category = Kategorie zeigen -Show next entry = Nächsten Eintrag zeigen -Show previous entry = Vorherigen Eintrag zeigen -This category does not have any entries. = Diese Kategorie hat keine Einträge. -This category has the following entries: = Diese Kategorie hat die folgenden Einträge: -This category is empty. = Diese Kategorie ist leer. -This is the help. = Dies ist die Hilfe. -You haven't chosen a category yet. Please choose one in the category list first. = Sie haben noch keine Kategorie gewählt. Bitte wählen Sie zuerst eine Kategorie in der Kategorienliste aus. -You haven't chosen an entry yet. Please choose one in the entry list first. = Sie haben noch keinen Eintrag gewählt. Bitte wählen Sie zuerst einen Eintrag in der Eintragsliste aus. -Nameless entry (@1) = Namenloser Eintrag (@1) -Collection of help texts = Sammlung von Hilfstexten diff --git a/mods/HELP/doc/doc/locale/doc.de.tr b/mods/HELP/doc/doc/locale/doc.de.tr new file mode 100644 index 000000000..39fc72514 --- /dev/null +++ b/mods/HELP/doc/doc/locale/doc.de.tr @@ -0,0 +1,51 @@ +# textdomain:doc +<=< +>=> +Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry.=Der Zugriff auf den angeforderten Eintrag wurde verweigert; dieser Eintrag ist geheim. Sie können durch weiteren Spielfortschritt den Zugriff freischalten. Finden Sie selbst heraus, wie Sie diesen Eintrag freischalten können. +All entries read.=Alle Einträge gelesen. +All help entries revealed!=Alle Hilfseinträge aufgedeckt! +All help entries are already revealed.=Alle Hilfseinträge sind schon aufgedeckt. +Allows you to reveal all hidden help entries with /help_reveal=Ermöglicht es Ihnen, alle verborgenen Hilfseinträge mit /help_reveal freizuschalten +Category list=Kategorienliste +Currently all entries in this category are hidden from you.=Momentan sind alle Einträge in dieser Kategorie vor Ihnen verborgen. +Unlock new entries by progressing in the game.=Schalten Sie neue Einträge frei, indem Sie im Spiel fortschreiten. +Help=Hilfe +Entry=Eintrag +Entry list=Eintragsliste +Error: Access denied.=Fehler: Zugriff verweigert. +Error: No help available.=Fehler: Keine Hilfe verfügbar. +Go to category list=Zur Kategorienliste +Go to entry list=Zur Eintragsliste +Help > (No Category)=Hilfe > (Keine Kategorie) +Help > @1=Hilfe > @1 +Help > @1 > @2=Hilfe > @1 > @2 +Help > @1 > (No Entry)=Hilfe > @1 > (Kein Eintrag) +Hidden entries: @1=Verborgene Einträge: @1 +New entries: @1=Neue Einträge: @1 +New help entry unlocked: @1 > @2=Neuen Hilfseintrag freigeschaltet: @1 > @2 +No categories have been registered, but they are required to provide help.=Es wurden keine Kategorien registriert, aber sie werden benötigt, um die Hilfe anbieten zu können. +The Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.=Das Dokumentationssystem [doc] bringt von sich aus keine eigenen Hilfsinhalte mit, es benötigt zusätzliche Mods, um sie hinzuzufügen. Bitte stellen Sie sicher, dass solche Mods für diese Welt aktiviert sind und versuchen Sie es erneut. +Number of entries: @1=Anzahl der Einträge: @1 +OK=OK +Open a window providing help entries about Minetest and more=Ein Fenster mit Hilfseinträgen über Minetest und mehr öffnen +Please select a category you wish to learn more about:=Bitte wählen Sie eine Kategorie, über die Sie mehr erfahren möchten, aus: +Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.=Empfohlene Mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia. +Reveal all hidden help entries to you=Alle für Sie verborgenen Hilfseinträge freischalten +Show entry=Eintrag zeigen +Show category=Kategorie zeigen +Show next entry=Nächsten Eintrag zeigen +Show previous entry=Vorherigen Eintrag zeigen +This category does not have any entries.=Diese Kategorie hat keine Einträge. +This category has the following entries:=Diese Kategorie hat die folgenden Einträge: +This category is empty.=Diese Kategorie ist leer. +This is the help.=Dies ist die Hilfe. +You haven't chosen a category yet. Please choose one in the category list first.=Sie haben noch keine Kategorie gewählt, Bitte wählen Sie zuerst eine aus. +You haven't chosen an entry yet. Please choose one in the entry list first.=Sie haben noch keinen Eintrag gewählt. Bitte wählen Sie zuerst einen aus. +Nameless entry (@1)=Namenloser Eintrag (@1) +Collection of help texts=Sammlung von Hilfstexten +Notify me when new help is available=Benachrichtigen, wenn neue Hilfe verfügbar ist +Play notification sound when new help is available=Toneffekt abspielen, wenn neue Hilfe verfügbar ist +Show previous image=Vorheriges Bild zeigen +Show previous gallery page=Vorherige Galerieseite zeigen +Show next image=Nächstes Bild zeigen +Show next gallery page=Nächste Galerieseite zeigen diff --git a/mods/HELP/doc/doc/locale/doc.pt.tr b/mods/HELP/doc/doc/locale/doc.pt.tr new file mode 100644 index 000000000..52d683632 --- /dev/null +++ b/mods/HELP/doc/doc/locale/doc.pt.tr @@ -0,0 +1,43 @@ +# textdomain:doc +<= +>= +Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry.=O acesso à entrada solicitada foi negado; essa entrada é secreta. Você pode desbloquear o acesso progredindo no jogo. Descobrir por conta própria como desbloquear essa entrada. +All entries read.=Todas as entradas lidas. +All help entries revealed!=Todas as entradas de ajuda reveladas! +All help entries are already revealed.=Todas as entradas de ajuda já foram reveladas. +Allows you to reveal all hidden help entries with /help_reveal=Permite revelar todas as entradas de ajuda ocultas com /help_reveal +Category list=Lista de Categorias +Currently all entries in this category are hidden from you.\\nUnlock new entries by progressing in the game.=Atualmente, todas as entradas nessa categoria estão ocultas a você.\\nDesbloqueie novas entradas progredindo no jogo. +Help=Ajuda +Entry=Entrada +Entry list=Lista de Entradas +Error: Access denied.=Erro: Acesso negado. +Error: No help available.=Erro: Nenhuma ajuda disponível. +Go to category list=Ver categorias +Go to entry list=Ir para a lista de entradas +Help > @1=Ajuda > @1 +Help > @1 > @2=Ajuda > @1 > @2 +Help > @1 > (No Entry)=Ajuda > @1 > (Nenhuma Entrada) +Help > (No Category)=Ajuda > (Nenhuma Categoria) +Hidden entries: @1=Entradas ocultas: @1 +Nameless entry (@1)=Entrada sem nome (@1) +New entries: @1=Novas entradas: (@1) +New help entry unlocked: @1 > @2=Nova entrada de ajuda desbloqueada: @1 > @2 +No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.=Nenhuma categoria foi registrada, mas é necessário fornecer ajuda.\nO Sistema de Documentação [doc] não vem com o conteúdo de ajuda, ele precisa de mods adicionais para adicionar conteúdo de ajuda. Por favor, certifique-se de que os mods estão habilitados para este mundo e tente novamente. +Number of entries: @1=Número de entradas: @1 +OK=OK +Open a window providing help entries about Minetest and more=Abra uma janela fornecendo entradas de ajuda sobre o Minetest e mais +Please select a category you wish to learn more about:=Por favor, selecione uma categoria sobre a qual você deseja saber mais: +Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.=Mods recomendados: doc_basics, doc_items, doc_identifier, doc_encyclopedia. +Reveal all hidden help entries to you=Revela todas as entradas de ajuda ocultas para você +Show entry=Ver entrada +Show category=Ver categoria +Show next entry=Ver próxima entrada +Show previous entry=Ver entrada anterior +This category does not have any entries.=Essa categoria não possui entradas. +This category has the following entries:=Essa categoria tem as seguintes entradas: +This category is empty.=Essa categoria está vazia. +This is the help.=Essa é a ajuda. +You haven't chosen a category yet. Please choose one in the category list first.=Você ainda não escolheu uma categoria. Por favor, escolha uma na lista de categorias primeiro. +You haven't chosen an entry yet. Please choose one in the entry list first.=Você ainda não escolheu uma entrada. Por favor, escolha uma na lista de entrada primeiro. +Collection of help texts=Coleção de textos de ajuda diff --git a/mods/HELP/doc/doc/locale/doc.pt_BR.tr b/mods/HELP/doc/doc/locale/doc.pt_BR.tr new file mode 100644 index 000000000..52d683632 --- /dev/null +++ b/mods/HELP/doc/doc/locale/doc.pt_BR.tr @@ -0,0 +1,43 @@ +# textdomain:doc +<= +>= +Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry.=O acesso à entrada solicitada foi negado; essa entrada é secreta. Você pode desbloquear o acesso progredindo no jogo. Descobrir por conta própria como desbloquear essa entrada. +All entries read.=Todas as entradas lidas. +All help entries revealed!=Todas as entradas de ajuda reveladas! +All help entries are already revealed.=Todas as entradas de ajuda já foram reveladas. +Allows you to reveal all hidden help entries with /help_reveal=Permite revelar todas as entradas de ajuda ocultas com /help_reveal +Category list=Lista de Categorias +Currently all entries in this category are hidden from you.\\nUnlock new entries by progressing in the game.=Atualmente, todas as entradas nessa categoria estão ocultas a você.\\nDesbloqueie novas entradas progredindo no jogo. +Help=Ajuda +Entry=Entrada +Entry list=Lista de Entradas +Error: Access denied.=Erro: Acesso negado. +Error: No help available.=Erro: Nenhuma ajuda disponível. +Go to category list=Ver categorias +Go to entry list=Ir para a lista de entradas +Help > @1=Ajuda > @1 +Help > @1 > @2=Ajuda > @1 > @2 +Help > @1 > (No Entry)=Ajuda > @1 > (Nenhuma Entrada) +Help > (No Category)=Ajuda > (Nenhuma Categoria) +Hidden entries: @1=Entradas ocultas: @1 +Nameless entry (@1)=Entrada sem nome (@1) +New entries: @1=Novas entradas: (@1) +New help entry unlocked: @1 > @2=Nova entrada de ajuda desbloqueada: @1 > @2 +No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.=Nenhuma categoria foi registrada, mas é necessário fornecer ajuda.\nO Sistema de Documentação [doc] não vem com o conteúdo de ajuda, ele precisa de mods adicionais para adicionar conteúdo de ajuda. Por favor, certifique-se de que os mods estão habilitados para este mundo e tente novamente. +Number of entries: @1=Número de entradas: @1 +OK=OK +Open a window providing help entries about Minetest and more=Abra uma janela fornecendo entradas de ajuda sobre o Minetest e mais +Please select a category you wish to learn more about:=Por favor, selecione uma categoria sobre a qual você deseja saber mais: +Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.=Mods recomendados: doc_basics, doc_items, doc_identifier, doc_encyclopedia. +Reveal all hidden help entries to you=Revela todas as entradas de ajuda ocultas para você +Show entry=Ver entrada +Show category=Ver categoria +Show next entry=Ver próxima entrada +Show previous entry=Ver entrada anterior +This category does not have any entries.=Essa categoria não possui entradas. +This category has the following entries:=Essa categoria tem as seguintes entradas: +This category is empty.=Essa categoria está vazia. +This is the help.=Essa é a ajuda. +You haven't chosen a category yet. Please choose one in the category list first.=Você ainda não escolheu uma categoria. Por favor, escolha uma na lista de categorias primeiro. +You haven't chosen an entry yet. Please choose one in the entry list first.=Você ainda não escolheu uma entrada. Por favor, escolha uma na lista de entrada primeiro. +Collection of help texts=Coleção de textos de ajuda diff --git a/mods/HELP/doc/doc/locale/template.txt b/mods/HELP/doc/doc/locale/template.txt index 7d852e9a4..fdeecfdca 100644 --- a/mods/HELP/doc/doc/locale/template.txt +++ b/mods/HELP/doc/doc/locale/template.txt @@ -1,42 +1,51 @@ -< = -> = -Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. = -All entries read. = -All help entries revealed! = -All help entries are already revealed. = -Allows you to reveal all hidden help entries with /help_reveal = -Category list = -Currently all entries in this category are hidden from you.\\nUnlock new entries by progressing in the game. = -Help = -Entry = -Entry list = -Error: Access denied. = -Error: No help available. = -Go to category list = -Go to entry list = -Help > @1 = -Help > @1 > @2 = -Help > @1 > (No Entry) = -Help > (No Category) = -Hidden entries: @1 = -Nameless entry (@1) = -New entries: @1 = -New help entry unlocked: @1 > @2 = -No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again. = -Number of entries: @1 = -OK = -Open a window providing help entries about Minetest and more = -Please select a category you wish to learn more about: = -Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia. = -Reveal all hidden help entries to you = -Show entry = -Show category = -Show next entry = -Show previous entry = -This category does not have any entries. = -This category has the following entries: = -This category is empty. = -This is the help. = -You haven't chosen a category yet. Please choose one in the category list first. = -You haven't chosen an entry yet. Please choose one in the entry list first. = -Collection of help texts = +# textdomain:doc +<= +>= +Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry.= +All entries read.= +All help entries revealed!= +All help entries are already revealed.= +Allows you to reveal all hidden help entries with /help_reveal= +Category list= +Currently all entries in this category are hidden from you. +Unlock new entries by progressing in the game.= +Help= +Entry= +Entry list= +Error: Access denied.= +Error: No help available.= +Go to category list= +Go to entry list= +Help > @1= +Help > @1 > @2= +Help > @1 > (No Entry)= +Help > (No Category)= +Hidden entries: @1= +Nameless entry (@1)= +New entries: @1= +New help entry unlocked: @1 > @2= +No categories have been registered, but they are required to provide help.= +The Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.= +Number of entries: @1= +OK= +Open a window providing help entries about Minetest and more= +Please select a category you wish to learn more about:= +Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.= +Reveal all hidden help entries to you= +Show entry= +Show category= +Show next entry= +Show previous entry= +This category does not have any entries.= +This category has the following entries:= +This category is empty.= +This is the help.= +You haven't chosen a category yet. Please choose one in the category list first.= +You haven't chosen an entry yet. Please choose one in the entry list first.= +Collection of help texts= +Notify me when new help is available= +Play notification sound when new help is available= +Show previous image= +Show previous gallery page= +Show next image= +Show next gallery page= diff --git a/mods/HELP/doc/doc/mod.conf b/mods/HELP/doc/doc/mod.conf index 5e2f43080..302fd83d1 100644 --- a/mods/HELP/doc/doc/mod.conf +++ b/mods/HELP/doc/doc/mod.conf @@ -1 +1,3 @@ name = doc +optional_depends = unified_inventory, sfinv_buttons, central_message, inventory_plus +description = A simple in-game documentation system which enables mods to add help entries based on templates. diff --git a/mods/HELP/doc/doc_identifier/depends.txt b/mods/HELP/doc/doc_identifier/depends.txt deleted file mode 100644 index b4a65e0db..000000000 --- a/mods/HELP/doc/doc_identifier/depends.txt +++ /dev/null @@ -1,5 +0,0 @@ -doc -doc_items -doc_basics? -mcl_core? -intllib? diff --git a/mods/HELP/doc/doc_identifier/description.txt b/mods/HELP/doc/doc_identifier/description.txt deleted file mode 100644 index 8294c740f..000000000 --- a/mods/HELP/doc/doc_identifier/description.txt +++ /dev/null @@ -1 +0,0 @@ -Adds a tool which shows help entries about almost anything which it punches. diff --git a/mods/HELP/doc/doc_identifier/init.lua b/mods/HELP/doc/doc_identifier/init.lua index b326a3952..2713d3890 100644 --- a/mods/HELP/doc/doc_identifier/init.lua +++ b/mods/HELP/doc/doc_identifier/init.lua @@ -1,10 +1,4 @@ --- Boilerplate to support localized strings if intllib mod is installed. -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s) return s end -end +local S = minetest.get_translator("doc_identifier") local doc_identifier = {} @@ -28,7 +22,7 @@ doc_identifier.identify = function(itemstack, user, pointed_thing) elseif itype == "error_node" then message = S("No help entry for this block could be found.") elseif itype == "error_unknown" then - vsize = vsize + 3 + vsize = vsize + 2 local mod if param ~= nil then local colon = string.find(param, ":") @@ -36,20 +30,23 @@ doc_identifier.identify = function(itemstack, user, pointed_thing) mod = string.sub(param,1,colon-1) end end - message = S("Error: This node, item or object is undefined. This is always an error.\nThis can happen for the following reasons:\n• The mod which is required for it is not enabled\n• The author of the game or a mod has made a mistake") + message = S("Error: This node, item or object is undefined. This is always an error.").."\n".. + S("This can happen for the following reasons:").."\n".. + S("• The mod which is required for it is not enabled").."\n".. + S("• The author of the game or a mod has made a mistake") message = message .. "\n\n" if mod ~= nil then if minetest.get_modpath(mod) ~= nil then - message = message .. string.format(S("It appears to originate from the mod “%s”, which is enabled."), mod) + message = message .. S("It appears to originate from the mod “@1”, which is enabled.", mod) message = message .. "\n" else - message = message .. string.format(S("It appears to originate from the mod “%s”, which is not enabled!"), mod) + message = message .. S("It appears to originate from the mod “@1”, which is not enabled!", mod) message = message .. "\n" end end if param ~= nil then - message = message .. string.format(S("Its identifier is “%s”."), param) + message = message .. S("Its identifier is “@1”.", param) end elseif itype == "error_ignore" then message = S("This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.") @@ -61,9 +58,9 @@ doc_identifier.identify = function(itemstack, user, pointed_thing) minetest.show_formspec( username, "doc_identifier:error_missing_item_info", - "size[12,"..vsize..";]" .. - "label[0,0.2;"..minetest.formspec_escape(message).."]" .. - "button_exit[4.5,"..(-0.5+vsize)..";3,1;okay;"..minetest.formspec_escape(S("OK")).."]" + "size[10,"..vsize..";]" .. + "textarea[0.5,0.2;10,"..(vsize-0.2)..";;;"..minetest.formspec_escape(message).."]" .. + "button_exit[3.75,"..(-0.5+vsize)..";3,1;okay;"..minetest.formspec_escape(S("OK")).."]" ) end if pointed_thing.type == "node" then @@ -165,11 +162,10 @@ end minetest.register_tool("doc_identifier:identifier_solid", { description = S("Lookup Tool"), _doc_items_longdesc = S("This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used."), - _doc_items_usagehelp = S("Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid."), + _doc_items_usagehelp = S("Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by using. In liquid mode, this tool points to liquids as well while in solid mode this is not the case."), _doc_items_hidden = false, tool_capabilities = {}, range = 10, - groups = { disable_repair = 1 }, wield_image = "doc_identifier_identifier.png", inventory_image = "doc_identifier_identifier.png", liquids_pointable = false, @@ -182,7 +178,7 @@ minetest.register_tool("doc_identifier:identifier_liquid", { _doc_items_create_entry = false, tool_capabilities = {}, range = 10, - groups = { not_in_creative_inventory = 1, not_in_craft_guide = 1, disable_repair=1 }, + groups = { not_in_creative_inventory = 1, not_in_craft_guide = 1, disable_repair = 1 }, wield_image = "doc_identifier_identifier_liquid.png", inventory_image = "doc_identifier_identifier_liquid.png", liquids_pointable = true, @@ -191,7 +187,6 @@ minetest.register_tool("doc_identifier:identifier_liquid", { on_secondary_use = doc_identifier.solid_mode, }) ---- TODO: These crafting recipes are temporary. Add a different way to obtain the lookup tool minetest.register_craft({ output = "doc_identifier:identifier_solid", recipe = { {"group:stick", "group:stick" }, diff --git a/mods/HELP/doc/doc_identifier/locale/de.txt b/mods/HELP/doc/doc_identifier/locale/de.txt deleted file mode 100644 index 418bd83b9..000000000 --- a/mods/HELP/doc/doc_identifier/locale/de.txt +++ /dev/null @@ -1,13 +0,0 @@ -Error: This node, item or object is undefined. This is always an error.\nThis can happen for the following reasons:\n• The mod which is required for it is not enabled\n• The author of the game or a mod has made a mistake = Fehler: Dieser Node, Gegenstand oder dieses Objekt ist nicht definiert.\nDas ist immer ein Fehler.\nDies kann aus folgenden Gründen passieren:\n• Die Mod, die dafür benötigt wird, ist nicht aktiv\n• Der Spiel-Autor oder ein Mod-Autor machte einen Fehler -It appears to originate from the mod “%s”, which is enabled. = Es scheint von der Mod »%s« zu stammen. Sie ist aktiv. -It appears to originate from the mod “%s”, which is not enabled! = Es scheint von der Mod »%s« zu stammen. Sie ist nicht aktiv! -Its identifier is “%s”. = Der Identifkator ist »%s«. -Lookup Tool = Nachschlagewerkzeug -No help entry for this block could be found. = Für diesen Block konnte kein Hilfseintrag gefunden werden. -No help entry for this item could be found. = Für diesen Gegenstand konnte kein Hilfseintrag gefunden werden. -No help entry for this object could be found. = Für dieses Objekt konnte kein Hilfseintrag gefunden werden. -OK = OK -Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid. = Schlagen Sie einen beliebigen Block, Gegenstand oder irgendwas, worüber Sie mehr erfahren wollen. Das wird den passenden Hilfseintrag öffnen. Das Werkzeug hat zwei Modi, welcher mit einem Rechtsklick gewechselt werden kann. Im Flüssigmodus (blau) zeigt das Werkzeug auch auf Flüssigkeiten. Im Festmodus (rot) ist das nicht der Fall. Der Flüssigmodis ist notwendig, wenn Sie eine Flüssigkeit identifizieren wollen. -This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds. = Dieser Block kann nicht identifiziert werden, weil sich die Welt an dieser Stelle noch nicht materialisiert hat. Versuch es in ein paar Sekunden erneut. -This is a player. = Dies ist ein Spieler. -This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used. = Dieser nützliche kleine Helfer kann benutzt werden, um schnell etwas über die nähere Umgebung zu erfahren. Er identifiziert und analysiert Blöcke, Gegenstände und andere Dinge und zeigt ausführliche Informationen über all das, worauf man ihn anwendet. diff --git a/mods/HELP/doc/doc_identifier/locale/doc_identifier.de.tr b/mods/HELP/doc/doc_identifier/locale/doc_identifier.de.tr new file mode 100644 index 000000000..beba2e75f --- /dev/null +++ b/mods/HELP/doc/doc_identifier/locale/doc_identifier.de.tr @@ -0,0 +1,17 @@ +# textdomain:doc_identifier +Error: This node, item or object is undefined. This is always an error.=Fehler: Dieser Node, Gegenstand oder dieses Objekt ist nicht definiert. Das ist immer ein Fehler. +This can happen for the following reasons:=Dies kann aus folgenden Gründen passieren: +• The mod which is required for it is not enabled=• Die Mod, die dafür benötigt wird, ist nicht aktiv +• The author of the game or a mod has made a mistake=• Der Spiel-Autor oder ein Mod-Autor machte einen Fehler +It appears to originate from the mod “@1”, which is enabled.=Es scheint von der Mod „@1“ zu stammen. Sie ist aktiv. +It appears to originate from the mod “@1”, which is not enabled!=Es scheint von der Mod „@1“ zu stammen. Sie ist nicht aktiv! +Its identifier is “@1”.=Der Identifikator ist „@1“. +Lookup Tool=Nachschlagewerkzeug +No help entry for this block could be found.=Für diesen Block konnte kein Hilfseintrag gefunden werden. +No help entry for this item could be found.=Für diesen Gegenstand konnte kein Hilfseintrag gefunden werden. +No help entry for this object could be found.=Für dieses Objekt konnte kein Hilfseintrag gefunden werden. +OK=OK +Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by using. In liquid mode, this tool points to liquids as well while in solid mode this is not the case.=Schlagen Sie einen beliebigen Block, Gegenstand oder irgendwas, worüber Sie mehr erfahren wollen. Das wird den passenden Hilfseintrag öffnen. Das Werkzeug hat zwei Modi, welcher mit Benutzen gewechselt werden kann. Im Flüssigmodus zeigt das Werkzeug auch auf Flüssigkeiten. Im Festmodus ist das nicht der Fall. +This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.=Dieser Block kann nicht identifiziert werden, weil sich die Welt an dieser Stelle noch nicht materialisiert hat. Versuchen Sie es in ein paar Sekunden erneut. +This is a player.=Dies ist ein Spieler. +This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used.=Dieser nützliche kleine Helfer kann benutzt werden, um schnell etwas über die nähere Umgebung zu erfahren. Er identifiziert und analysiert Blöcke, Gegenstände und andere Dinge und zeigt ausführliche Informationen über all das, worauf man ihn anwendet. diff --git a/mods/HELP/doc/doc_identifier/locale/doc_identifier.pt.tr b/mods/HELP/doc/doc_identifier/locale/doc_identifier.pt.tr new file mode 100644 index 000000000..cb013c947 --- /dev/null +++ b/mods/HELP/doc/doc_identifier/locale/doc_identifier.pt.tr @@ -0,0 +1,14 @@ +# textdomain:doc_identifier +Error: This node, item or object is undefined. This is always an error.\\nThis can happen for the following reasons:\\n• The mod which is required for it is not enabled\\n• The author of the game or a mod has made a mistake=Erro: Esse bloco, item ou objeto é indefinido. Isso é sempre um erro.\\n Isso pode ter acontecido pelas seguintes rasões:\\n• O mod o qual ele precisa não está habilitado\\n• O autor do jogo ou mod comoteu um erro +It appears to originate from the mod “%s”, which is enabled.=Parece originar do mod “%s”, que está habilitado. +It appears to originate from the mod “%s”, which is not enabled!=Parece originar do mod “%s”, que não está habilitado. +Its identifier is “%s”.=Seu identificador é “%s”. +Lookup tool=Ferramenta de Pesquisa +No help entry for this block could be found.=Nenhuma entrada de ajuda para esse bloco pode ser encontrada. +No help entry for this item could be found.=Nenhuma entrada de ajuda para esse item pode ser encontrada. +No help entry for this object could be found.=Nenhuma entrada de ajuda para esse objeto pode ser encontrada. +OK=OK +Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid.=Soque qualquer bloco, item ou outra coisa sobre a qual você deseja aprender mais. Isso abrirá a entrada de ajuda apropriada. A ferramenta vem em dois modos que são alterados por um clique direito. No modo líquido (azul), esta ferramenta também aponta para líquidos, enquanto no modo sólido (vermelho) não é esse o caso. O modo líquido é necessário se você quiser identificar um líquido. +This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.=Este bloco não pode ser identificado porque o mundo ainda não se materializou neste momento. Tente novamente em alguns segundos. +This is a player.=Este é um jogador. +This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used.=Esse pequeno e útil ajudante pode ser usado para aprender rapidamente sobre as coisas em sua volta. Ele identifica e analisa blocos, itens e outras coisas e mostra informações abrangentes sobre a coisa na qual é usado. diff --git a/mods/HELP/doc/doc_identifier/locale/doc_identifier.pt_BR.tr b/mods/HELP/doc/doc_identifier/locale/doc_identifier.pt_BR.tr new file mode 100644 index 000000000..cb013c947 --- /dev/null +++ b/mods/HELP/doc/doc_identifier/locale/doc_identifier.pt_BR.tr @@ -0,0 +1,14 @@ +# textdomain:doc_identifier +Error: This node, item or object is undefined. This is always an error.\\nThis can happen for the following reasons:\\n• The mod which is required for it is not enabled\\n• The author of the game or a mod has made a mistake=Erro: Esse bloco, item ou objeto é indefinido. Isso é sempre um erro.\\n Isso pode ter acontecido pelas seguintes rasões:\\n• O mod o qual ele precisa não está habilitado\\n• O autor do jogo ou mod comoteu um erro +It appears to originate from the mod “%s”, which is enabled.=Parece originar do mod “%s”, que está habilitado. +It appears to originate from the mod “%s”, which is not enabled!=Parece originar do mod “%s”, que não está habilitado. +Its identifier is “%s”.=Seu identificador é “%s”. +Lookup tool=Ferramenta de Pesquisa +No help entry for this block could be found.=Nenhuma entrada de ajuda para esse bloco pode ser encontrada. +No help entry for this item could be found.=Nenhuma entrada de ajuda para esse item pode ser encontrada. +No help entry for this object could be found.=Nenhuma entrada de ajuda para esse objeto pode ser encontrada. +OK=OK +Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid.=Soque qualquer bloco, item ou outra coisa sobre a qual você deseja aprender mais. Isso abrirá a entrada de ajuda apropriada. A ferramenta vem em dois modos que são alterados por um clique direito. No modo líquido (azul), esta ferramenta também aponta para líquidos, enquanto no modo sólido (vermelho) não é esse o caso. O modo líquido é necessário se você quiser identificar um líquido. +This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.=Este bloco não pode ser identificado porque o mundo ainda não se materializou neste momento. Tente novamente em alguns segundos. +This is a player.=Este é um jogador. +This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used.=Esse pequeno e útil ajudante pode ser usado para aprender rapidamente sobre as coisas em sua volta. Ele identifica e analisa blocos, itens e outras coisas e mostra informações abrangentes sobre a coisa na qual é usado. diff --git a/mods/HELP/doc/doc_identifier/locale/template.txt b/mods/HELP/doc/doc_identifier/locale/template.txt index b57c67f5d..a35201af8 100644 --- a/mods/HELP/doc/doc_identifier/locale/template.txt +++ b/mods/HELP/doc/doc_identifier/locale/template.txt @@ -1,13 +1,17 @@ -Error: This node, item or object is undefined. This is always an error.\\nThis can happen for the following reasons:\\n• The mod which is required for it is not enabled\\n• The author of the game or a mod has made a mistake = -It appears to originate from the mod “%s”, which is enabled. = -It appears to originate from the mod “%s”, which is not enabled! = -Its identifier is “%s”. = -Lookup Tool = -No help entry for this block could be found. = -No help entry for this item could be found. = -No help entry for this object could be found. = -OK = -Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid. = -This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds. = -This is a player. = -This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used. = +# textdomain:doc_identifier +Error: This node, item or object is undefined. This is always an error.= +This can happen for the following reasons:= +• The mod which is required for it is not enabled= +• The author of the game or a mod has made a mistake= +It appears to originate from the mod “@1”, which is enabled.= +It appears to originate from the mod “@1”, which is not enabled!= +Its identifier is “@1”.= +Lookup Tool= +No help entry for this block could be found.= +No help entry for this item could be found.= +No help entry for this object could be found.= +OK= +Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by using. In liquid mode, this tool points to liquids as well while in solid mode this is not the case.= +This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.= +This is a player.= +This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used.= diff --git a/mods/HELP/doc/doc_identifier/mod.conf b/mods/HELP/doc/doc_identifier/mod.conf index df963a0cf..4a7626a4e 100644 --- a/mods/HELP/doc/doc_identifier/mod.conf +++ b/mods/HELP/doc/doc_identifier/mod.conf @@ -1 +1,4 @@ name = doc_identifier +depends = doc, doc_items +optional_depends = doc_basics, mcl_core +description = Adds a tool which shows help entries about almost anything which it punches. diff --git a/mods/HELP/doc/doc_identifier/textures/doc_identifier_identifier_liquid.png b/mods/HELP/doc/doc_identifier/textures/doc_identifier_identifier_liquid.png index 9f3aef969..d3689ec6b 100644 Binary files a/mods/HELP/doc/doc_identifier/textures/doc_identifier_identifier_liquid.png and b/mods/HELP/doc/doc_identifier/textures/doc_identifier_identifier_liquid.png differ diff --git a/mods/HELP/doc/doc_items/depends.txt b/mods/HELP/doc/doc_items/depends.txt deleted file mode 100644 index 31aa39034..000000000 --- a/mods/HELP/doc/doc_items/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -doc -intllib? diff --git a/mods/HELP/doc/doc_items/description.txt b/mods/HELP/doc/doc_items/description.txt deleted file mode 100644 index 7291077e6..000000000 --- a/mods/HELP/doc/doc_items/description.txt +++ /dev/null @@ -1 +0,0 @@ -Adds automatically generated help texts for items. diff --git a/mods/HELP/doc/doc_items/init.lua b/mods/HELP/doc/doc_items/init.lua index bdbba21a4..7ad8d58be 100644 --- a/mods/HELP/doc/doc_items/init.lua +++ b/mods/HELP/doc/doc_items/init.lua @@ -1,10 +1,5 @@ --- Boilerplate to support localized strings if intllib mod is installed. -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end -end +local S = minetest.get_translator("doc_items") +local N = function(s) return s end doc.sub.items = {} @@ -642,7 +637,7 @@ doc.add_category("nodes", { end end local fdap = data.def.groups.fall_damage_add_percent - if fdap ~= nil then + if fdap ~= nil and fdap ~= 0 then if fdap > 0 then datastring = datastring .. S("The fall damage on this block is increased by @1%.", fdap) .. "\n" elseif fdap <= -100 then @@ -664,9 +659,13 @@ doc.add_category("nodes", { datastring = datastring .. S("This block can be climbed.").."\n" end local bouncy = data.def.groups.bouncy - if bouncy ~= nil then + if bouncy ~= nil and bouncy ~= 0 then datastring = datastring .. S("This block will make you bounce off with an elasticity of @1%.", bouncy).."\n" end + local slippery = data.def.groups.slippery + if slippery ~= nil and slippery ~= 0 then + datastring = datastring .. S("This block is slippery.") .. "\n" + end datastring = datastring .. factoid_custom("nodes", "movement", data) datastring = newline2(datastring) end @@ -841,15 +840,15 @@ doc.add_category("nodes", { local dropstring = "" local dropstring_base = "" if max == nil then - dropstring_base = S("This block will drop the following items when mined: %s.") + dropstring_base = N("This block will drop the following items when mined: @1.") elseif max == 1 then if #data.def.drop.items == 1 then - dropstring_base = S("This block will drop the following when mined: %s.") + dropstring_base = N("This block will drop the following when mined: @1.") else - dropstring_base = S("This block will randomly drop one of the following when mined: %s.") + dropstring_base = N("This block will randomly drop one of the following when mined: @1.") end else - dropstring_base = S("This block will randomly drop up to %d drops of the following possible drops when mined: %s.") + dropstring_base = N("This block will randomly drop up to @1 drops of the following possible drops when mined: @2.") end -- Save calculated probabilities into a table for later output local probtables = {} @@ -932,7 +931,7 @@ doc.add_category("nodes", { -- Final list seperator dropstring_this = dropstring_this .. S(" and ") end - local desc = S(itemtable.desc) + local desc = itemtable.desc local count = itemtable.count if count ~= 1 then desc = S("@1×@2", count, desc) @@ -963,9 +962,9 @@ doc.add_category("nodes", { pcount = pcount + 1 end if max ~= nil and max > 1 then - datastring = datastring .. string.format(dropstring_base, max, dropstring) + datastring = datastring .. S(dropstring_base, max, dropstring) else - datastring = datastring .. string.format(dropstring_base, dropstring) + datastring = datastring .. S(dropstring_base, dropstring) end datastring = newline(datastring) end @@ -1369,6 +1368,18 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv end end) +minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info) + if player == nil then return end + local playername = player:get_player_name() + local itemstack + if action == "take" or action == "put" then + itemstack = inventory_info.stack + end + if itemstack ~= nil and playername ~= nil and playername ~= "" and (not itemstack:is_empty()) then + reveal_item(playername, itemstack:get_name()) + end +end) + minetest.register_on_item_eat(function(hp_change, replace_with_item, itemstack, user, pointed_thing) if user == nil then return end local playername = user:get_player_name() @@ -1402,4 +1413,4 @@ minetest.register_globalstep(function(dtime) end end) -minetest.after(0, gather_descs) +minetest.register_on_mods_loaded(gather_descs) diff --git a/mods/HELP/doc/doc_items/locale/de.txt b/mods/HELP/doc/doc_items/locale/de.txt deleted file mode 100644 index 8bc67ad76..000000000 --- a/mods/HELP/doc/doc_items/locale/de.txt +++ /dev/null @@ -1,140 +0,0 @@ -\sUsing it as fuel turns it into: @1. = \sWird dieser Gegenstand als Brennstoff verwendet, verwandelt er sich zu: @1. -@1 seconds = @1 Sekunden -# Item count times item name -@1×@2 = @1×@2 -# Itemname (25%) -@1 (@2%) = @1 (@2%) -# Itemname (<0.5%) -@1 (<0.5%) = @1 (<0,5%) -# Itemname (ca. 25%) -@1 (ca. @2%) = @1 (ca. @2%) -# List separator (e.g. “one, two, three”) -,\s = ,\s -# Final list separator (e.g. “One, two and three”) -\sand\s = \sund\s -1 second = 1 Sekunde -A transparent block, basically empty space. It is usually left behind after digging something. = Ein transparenter Block, praktisch leerer Raum. Er wird üblicherweise hinterlassen, nachdem man etwas ausgegraben hat. -Air = Luft -Blocks = Blöcke -Building another block at this block will place it inside and replace it. = Wird ein anderer Block an diesem Block gebaut, wird dieser andere Block seine Stelle einnehmen. -Building this block is completely silent. = Das Bauen dieses Blocks ist völlig lautlos. -Collidable: @1 = Kollidiert: @1 -Description: @1 = Beschreibung: @1 -Falling blocks can go through this block; they destroy it when doing so. = Fallende Blöcke können diesen Block durchdringen; sie zerstören ihn dabei. -Full punch interval: @1 s = Schlagintervall: @1 s -Hand = Hand -Hold it in your hand, then leftclick to eat it. = Halten Sie es in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um es zu essen. -Hold it in your hand, then leftclick to eat it. But why would you want to do this? = Halten Sie es in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um es zu essen. Aber warum sollten Sie das tun wollen? -Item reference of all wieldable tools and weapons = Gegenstandsreferenz aller tragbaren Werkzeugen und Waffen -Item reference of blocks and other things which are capable of occupying space = Gegenstandsreferenz aller Blöcke und anderen Dingen, die Raum belegen -Item reference of items which are neither blocks, tools or weapons (esp. crafting items) = Gegenstandsreferenz aller Gegenstände, welche weder Blöcke, Werkzeuge oder Waffen sind (insb. Fertigungsgegenstände) -Liquids can flow into this block and destroy it. = Flüssigkeiten können in diesen Block hereinfließen und ihn zerstören. -Maximum stack size: @1 = Maximale Stapelgröße: @1 -Mining level: @1 = Grabestufe: @1 -Mining ratings: = Grabewertungen: -• @1, rating @2: @3 s - @4 s = • @1, Wertung @2: @3 s - @4 s -• @1, rating @2: @3 s = • @1, Wertung @2: @3 s -Mining times: = Grabezeiten: -Mining this block is completely silent. = Das Abbauen dieses Blocks ist völlig lautlos. -Miscellaneous items = Sonstige Gegenstände -No = Nein -Pointable: No = Zeigbar: Nein -Pointable: Only by special items = Zeigbar: Nur von besonderen Gegenständen -Pointable: Yes = Zeigbar: Ja -Punches with this block don't work as usual; melee combat and mining are either not possible or work differently. = Schläge mit diesem Block funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise. -Punches with this item don't work as usual; melee combat and mining are either not possible or work differently. = Schläge mit diesem Gegenstand funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise. -Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently. = Schläge mit diesem Werkzeug funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise. -Range: @1 = Reichweite: @1 -# Range: () -Range: @1 (@2) = Reichweite: @1 (@2) -Range: 4 = Reichweite: 4 -# Rating used for digging times -Rating @1 = Wertung @1 -Rating @1-@2 = Wertung @1-@2 -The fall damage on this block is increased by @1%. = Der Fallschaden auf diesem Block ist um @1% erhöht. -The fall damage on this block is reduced by @1%. = Der Fallschaden auf diesem Block ist um @1% reduziert. -This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly. = Dieser Block ist lichtdurchlässig mit einen geringfügigen Helligkeitsverlust; Sonnenlicht passiert jedoch ohne Verlust. -This block allows light to propagate with a small loss of brightness. = Dieser Block ist lichtdurchlässig mit einen geringfügigen Helligkeitsverlust. -This block allows sunlight to propagate without loss in brightness. = Dieser Block ist vollkommen durchlässig für Sonnenlicht. -This block belongs to the @1 group. = Dieser Block gehört zur Gruppe »@1«. -This block belongs to these groups: @1. = Dieser Block gehört zu den folgenden Gruppen: @1. -This block can be climbed. = Dieser Block kann beklettert werden. -This block can be destroyed by any mining tool immediately. = Dieser Block kann von einem beliebigen Grabewerkzeug sofort zerstört werden. -This block can be destroyed by any mining tool in half a second. = Dieser Block kann von einem beliebigen Grabewerkzeug in einer halben Sekunde zerstört werden. -This block can be mined by any mining tool immediately. = Dieser Block kann von einem beliebigen Grabewerkzeug sofort abgebaut werden. -This block can be mined by any mining tool in half a second. = Dieser Block kann von einem beliebigen Grabewerkzeug in einer halben Sekunde abgebaut werden. -This block can be mined by mining tools which match any of the following mining ratings and its toughness level. = Dieser Block kann von Grabewerkzeugen abgebaut werden, falls sie auf eine der folgenden Grabewertungen sowie seinem Härtegrad passen. -This block can not be destroyed by ordinary mining tools. = Dieser Block kann nicht von Grabewerkzeugen zerstört werden. -This block can not be mined by ordinary mining tools. = Dieser Block kann nicht von gewöhnlichen Grabewerkzeugen abgebaut werden. -This block can serve as a smelting fuel with a burning time of @1. = Dieser Block kann als Brennstoff mit einer Brenndauer von @1 dienen. -This block causes a damage of @1 hit point per second. = Dieser Block richtet einen Schaden von @1 Trefferpunkt pro Sekunde an. -This block causes a damage of @1 hit points per second. = Dieser Block richtet einen Schaden von @1 Trefferpunkten pro Sekunde an. -This block connects to blocks of the @1 group. = Dieser Block verbindet sich mit Blöcken der Gruppe »@1«. -This block connects to blocks of the following groups: @1. = Dieser Block verbindet sich mit Blöcken der folgenden Gruppen: @1. -This block connects to these blocks: @1. = Dieser Block verbindet sich mit den folgenden Blöcken: @1. -This block connects to this block: @1. = Dieser Block verbindet sich mit diesem Block: @1. -This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds. = Dieser Block reduziert Ihren Atem und verursacht beim Ertrinken einen Schaden von @1 Trefferpunkt alle 2 Sekunden. -This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds. = Dieser Block reduziert Ihren Atem und verursacht beim Ertrinken einen Schaden von @1 Trefferpunkten alle 2 Sekunden. -This block glows faintly. It is barely noticable. = Dieser Block leuchtet schwach. Es ist kaum merklich. -This block is a light source with a light level of @1. = Dieser Block ist eine Lichtquelle mit einer Helligkeitsstufe von @1. -This block glows faintly with a light level of @1. = Dieser Block leuchtet schwach mit einer Helligkeitsstufe von @1. -This block is a building block for creating various buildings. = Dieser Block ist für den Bau diverser Gebäude vorgesehen. -This block is a liquid with these properties: = Dieser Block ist eine Flüssigkeit mit folgenden Eigenschaften: -This block is affected by gravity and can fall. = Dieser Block wird von der Schwerkraft beeinflusst und kann fallen. -This block is completely silent when mined or built. = Dieser Block kann vollkommen lautlos gebaut oder abgebaut werden. -This block is completely silent when walked on, mined or built. = Es ist vollkommen lautlos, wenn man auf diesen Block geht, ihn baut oder abbaut. -This block is destroyed when a falling block ends up inside it. = Dieser Block wird zerstört, wenn ein fallender Block in ihm landet. -This block negates all fall damage. = Auf diesem Block gibt es keinen Fallschaden. -This block points to liquids. = Mit diesem Block zeigt man auf Flüssigkeiten. -This block will drop as an item when a falling block ends up inside it. = Dieser Block wird sich als Gegenstand abwerfen, wenn ein fallender Block in ihn landet. -This block will drop as an item when it is not attached to a surrounding block. = Dieser Block wird sich als Gegenstand abwerfen, wenn er nicht an einen benachbarten Block befestigt ist. -This block will drop as an item when no collidable block is below it. = Dieser Block wird sich als Gegenstand abwerfen, wenn kein kollidierender Block unter ihn liegt. -This block will drop the following items when mined: %s. = Dieser Block wird nach dem Abbauen die folgenden Gegenstände abwerfen: %s. -This block will drop the following when mined: @1×@2. = Dieser Block wird nach dem Abbauen folgendes abwerfen: @1×@2. -This block will drop the following when mined: @1. = Dieser Block wird nach dem Abbauen folgendes abwerfen: @1. -This block will drop the following when mined: %s. = Dieser Block wird nach dem Abbauen folgendes abwerfen: %s. -This block will make you bounce off with an elasticity of @1%. = Dieser Block wird Sie mit einer Elastizität von @1% abprallen lassen. -This block will randomly drop one of the following when mined: %s. = Dieser Block wird nach dem Abbauen zufällig eines von den folgenden Dingen abwerfen: %s. -This block will randomly drop up to %d drops of the following possible drops when mined: %s. = Dieser Block nach dem Abbauen wird zufällig bis zu %d Abwürfe von den folgenden möglichen Abwürfen abwerfen: %s. -This block won't drop anything when mined. = Dieser Block wird nach dem Abbauen nichts abwerfen. -This is a decorational block. = Dieser Block dient zur Dekoration. -This is a melee weapon which deals damage by punching. = Dies ist eine Nahkampfwaffe, welche Schaden durch Schläge verursacht. -Maximum damage per hit: = Maximaler Schaden pro Treffer: -This item belongs to the @1 group. = Dieser Gegenstand gehört zur Gruppe »@1«. -This item belongs to these groups: @1. = Dieser Gegenstand gehört zu den folgenden Gruppen: @1. -This item can serve as a smelting fuel with a burning time of @1. = Dieser Gegenstand kann als Brennstoff mit einer Brenndauer von @1 dienen. -This item is primarily used for crafting other items. = Dieser Gegenstand wird primär für die Fertigung von anderen Gegenständen benutzt. -This item points to liquids. = Mit diesem Gegenstand zeigt man auf Flüssigkeiten. -This tool belongs to the @1 group. = Dieses Werkzeug gehört zur Gruppe »@1«. -This tool belongs to these groups: @1. = Dieses Werkzeug gehört zu den folgenden Gruppen: @1. -This tool can serve as a smelting fuel with a burning time of @1. = Dieses Werkzeug kann als Brennstoff mit einer Brenndauer von @1 dienen. -This tool is capable of mining. = Dies ist ein Grabewerkzeug. -Maximum toughness levels: = Maximale Härtegrade: -This tool points to liquids. = Mit diesem Werkzeug zeigt man auf Flüssigkeiten. -Tools and weapons = Werkzeuge und Waffen -Unknown Node = Unbekannter Node -Usage help: @1 = Benutzung: @1 -Walking on this block is completely silent. = Auf diesem Block sind Schritte lautlos. -Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand. = Wenn Sie keinen Gegenstand halten, benutzen Sie die Hand, welches als ein Werkzeug mit seinen eigenen Fägihkeiten dient. Wenn Sie einen Gegenstand halten, der kein Grabewerkzeug oder eine Waffe ist, wird er sich verhalten als wäre er die Hand. -Yes = Ja -You can not jump while standing on this block. = Man kann von diesem Block nicht abspringen. -any level = beliebige Stufe -level 0 = Stufe 0 -level 0-@1 = Stufen 0-@1 -unknown = unbekannt -Unknown item (@1) = Unbekannter Gegenstand (@1) -• @1: @2 = • @1: @2 -• @1: @2 HP = • @1: @2 TP -• @1: @2, @3 = • @1: @2, @3 -• Flowing range: @1 = • Fließweite: @1 -• No flowing = • Kein Fließen -• Not renewable = • Nicht erneuerbar -• Renewable = • Erneuerbar -• Viscosity: @1 = • Zähflüssigkeit: @1 -Itemstring: "@1" = Itemstring: »@1« -Durability: @1 uses = Haltbarkeit: @1 Benutzungen -Durability: @1 = Haltbarkeit: @1 -Mining durability: = Grabehaltbarkeit: -• @1, level @2: @3 uses = • @1, Stufe @2: @3 Benutzungen -• @1, level @2: Unlimited = • @1, Stufe @2: Unbegrenzt -This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead. = Die Rotation dieses Blocks hängt davon ab, wie sie ihn platzieren: Platzieren Sie ihn auf den Boden oder an die Decke, um ihn vertikal aufzustellen; platzieren Sie in an der Seite für eine horizontale Ausrichtung. Wenn Sie während des Bauens schleichen, wird der Block stattdessen senkrecht zur üblichen Ausrichtung rotiert. diff --git a/mods/HELP/doc/doc_items/locale/doc_items.de.tr b/mods/HELP/doc/doc_items/locale/doc_items.de.tr new file mode 100644 index 000000000..b4a53a8a7 --- /dev/null +++ b/mods/HELP/doc/doc_items/locale/doc_items.de.tr @@ -0,0 +1,142 @@ +# textdomain:doc_items + Using it as fuel turns it into: @1.= Wird dieser Gegenstand als Brennstoff verwendet, verwandelt er sich zu: @1. +@1 seconds=@1 Sekunden +# Item count times item name +@1×@2=@1×@2 +# Itemname (25%) +@1 (@2%)=@1 (@2%) +# Itemname (<0.5%) +@1 (<0.5%)=@1 (<0,5%) +# Itemname (ca. 25%) +@1 (ca. @2%)=@1 (ca. @2%) +# List separator (e.g. “one, two, three”) +, =, +# Final list separator (e.g. “One, two and three”) + and = und +1 second=1 Sekunde +A transparent block, basically empty space. It is usually left behind after digging something.=Ein transparenter Block, praktisch leerer Raum. Er wird üblicherweise hinterlassen, nachdem man etwas ausgegraben hat. +Air=Luft +Blocks=Blöcke +Building another block at this block will place it inside and replace it.=Wird ein anderer Block an diesem Block gebaut, wird dieser andere Block seine Stelle einnehmen. +Building this block is completely silent.=Das Bauen dieses Blocks ist völlig lautlos. +Collidable: @1=Kollidiert: @1 +Description: @1=Beschreibung: @1 +Falling blocks can go through this block; they destroy it when doing so.=Fallende Blöcke können diesen Block durchdringen; sie zerstören ihn dabei. +Full punch interval: @1 s=Schlagintervall: @1 s +Hand=Hand +Hold it in your hand, then leftclick to eat it.=Halten Sie es in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um es zu essen. +Hold it in your hand, then leftclick to eat it. But why would you want to do this?=Halten Sie es in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um es zu essen. Aber warum sollten Sie das tun wollen? +Item reference of all wieldable tools and weapons=Gegenstandsreferenz aller tragbaren Werkzeugen und Waffen +Item reference of blocks and other things which are capable of occupying space=Gegenstandsreferenz aller Blöcke und anderen Dingen, die Raum belegen +Item reference of items which are neither blocks, tools or weapons (esp. crafting items)=Gegenstandsreferenz aller Gegenstände, welche weder Blöcke, Werkzeuge oder Waffen sind (insb. Fertigungsgegenstände) +Liquids can flow into this block and destroy it.=Flüssigkeiten können in diesen Block hereinfließen und ihn zerstören. +Maximum stack size: @1=Maximale Stapelgröße: @1 +Mining level: @1=Grabestufe: @1 +Mining ratings:=Grabewertungen: +• @1, rating @2: @3 s - @4 s=• @1, Wertung @2: @3 s - @4 s +• @1, rating @2: @3 s=• @1, Wertung @2: @3 s +Mining times:=Grabezeiten: +Mining this block is completely silent.=Das Abbauen dieses Blocks ist völlig lautlos. +Miscellaneous items=Sonstige Gegenstände +No=Nein +Pointable: No=Zeigbar: Nein +Pointable: Only by special items=Zeigbar: Nur von besonderen Gegenständen +Pointable: Yes=Zeigbar: Ja +Punches with this block don't work as usual; melee combat and mining are either not possible or work differently.=Schläge mit diesem Block funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise. +Punches with this item don't work as usual; melee combat and mining are either not possible or work differently.=Schläge mit diesem Gegenstand funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise. +Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently.=Schläge mit diesem Werkzeug funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise. +Range: @1=Reichweite: @1 +# Range: () +Range: @1 (@2)=Reichweite: @1 (@2) +Range: 4=Reichweite: 4 +# Rating used for digging times +Rating @1=Wertung @1 +Rating @1-@2=Wertung @1-@2 +The fall damage on this block is increased by @1%.=Der Fallschaden auf diesem Block ist um @1% erhöht. +The fall damage on this block is reduced by @1%.=Der Fallschaden auf diesem Block ist um @1% reduziert. +This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly.=Dieser Block ist lichtdurchlässig mit einen geringfügigen Helligkeitsverlust; Sonnenlicht passiert jedoch ohne Verlust. +This block allows light to propagate with a small loss of brightness.=Dieser Block ist lichtdurchlässig mit einen geringfügigen Helligkeitsverlust. +This block allows sunlight to propagate without loss in brightness.=Dieser Block ist vollkommen durchlässig für Sonnenlicht. +This block belongs to the @1 group.=Dieser Block gehört zur Gruppe „@1“. +This block belongs to these groups: @1.=Dieser Block gehört zu den folgenden Gruppen: @1. +This block can be climbed.=Dieser Block kann beklettert werden. +This block can be destroyed by any mining tool immediately.=Dieser Block kann von einem beliebigen Grabewerkzeug sofort zerstört werden. +This block can be destroyed by any mining tool in half a second.=Dieser Block kann von einem beliebigen Grabewerkzeug in einer halben Sekunde zerstört werden. +This block can be mined by any mining tool immediately.=Dieser Block kann von einem beliebigen Grabewerkzeug sofort abgebaut werden. +This block can be mined by any mining tool in half a second.=Dieser Block kann von einem beliebigen Grabewerkzeug in einer halben Sekunde abgebaut werden. +This block can be mined by mining tools which match any of the following mining ratings and its toughness level.=Dieser Block kann von Grabewerkzeugen abgebaut werden, falls sie auf eine der folgenden Grabewertungen sowie seinem Härtegrad passen. +This block can not be destroyed by ordinary mining tools.=Dieser Block kann nicht von Grabewerkzeugen zerstört werden. +This block can not be mined by ordinary mining tools.=Dieser Block kann nicht von gewöhnlichen Grabewerkzeugen abgebaut werden. +This block can serve as a smelting fuel with a burning time of @1.=Dieser Block kann als Brennstoff mit einer Brenndauer von @1 dienen. +This block causes a damage of @1 hit point per second.=Dieser Block richtet einen Schaden von @1 Trefferpunkt pro Sekunde an. +This block causes a damage of @1 hit points per second.=Dieser Block richtet einen Schaden von @1 Trefferpunkten pro Sekunde an. +This block connects to blocks of the @1 group.=Dieser Block verbindet sich mit Blöcken der Gruppe „@1“. +This block connects to blocks of the following groups: @1.=Dieser Block verbindet sich mit Blöcken der folgenden Gruppen: @1. +This block connects to these blocks: @1.=Dieser Block verbindet sich mit den folgenden Blöcken: @1. +This block connects to this block: @1.=Dieser Block verbindet sich mit diesem Block: @1. +This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds.=Dieser Block reduziert Ihren Atem und verursacht beim Ertrinken einen Schaden von @1 Trefferpunkt alle 2 Sekunden. +This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds.=Dieser Block reduziert Ihren Atem und verursacht beim Ertrinken einen Schaden von @1 Trefferpunkten alle 2 Sekunden. +This block glows faintly. It is barely noticable.=Dieser Block leuchtet schwach. Es ist kaum merklich. +This block is a light source with a light level of @1.=Dieser Block ist eine Lichtquelle mit einer Helligkeitsstufe von @1. +This block glows faintly with a light level of @1.=Dieser Block leuchtet schwach mit einer Helligkeitsstufe von @1. +This block is a building block for creating various buildings.=Dieser Block ist für den Bau diverser Gebäude vorgesehen. +This block is a liquid with these properties:=Dieser Block ist eine Flüssigkeit mit folgenden Eigenschaften: +This block is affected by gravity and can fall.=Dieser Block wird von der Schwerkraft beeinflusst und kann fallen. +This block is completely silent when mined or built.=Dieser Block kann vollkommen lautlos gebaut oder abgebaut werden. +This block is completely silent when walked on, mined or built.=Es ist vollkommen lautlos, wenn man auf diesen Block geht, ihn baut oder abbaut. +This block is destroyed when a falling block ends up inside it.=Dieser Block wird zerstört, wenn ein fallender Block in ihm landet. +This block negates all fall damage.=Auf diesem Block gibt es keinen Fallschaden. +This block points to liquids.=Mit diesem Block zeigt man auf Flüssigkeiten. +This block will drop as an item when a falling block ends up inside it.=Dieser Block wird sich als Gegenstand abwerfen, wenn ein fallender Block in ihn landet. +This block will drop as an item when it is not attached to a surrounding block.=Dieser Block wird sich als Gegenstand abwerfen, wenn er nicht an einen benachbarten Block befestigt ist. +This block will drop as an item when no collidable block is below it.=Dieser Block wird sich als Gegenstand abwerfen, wenn kein kollidierender Block unter ihn liegt. +This block will drop the following items when mined: @1.=Dieser Block wird nach dem Abbauen die folgenden Gegenstände abwerfen: @1. +This block will drop the following when mined: @1×@2.=Dieser Block wird nach dem Abbauen folgendes abwerfen: @1×@2. +This block will drop the following when mined: @1.=Dieser Block wird nach dem Abbauen folgendes abwerfen: @1. +This block will drop the following when mined: @1.=Dieser Block wird nach dem Abbauen folgendes abwerfen: @1. +This block will make you bounce off with an elasticity of @1%.=Dieser Block wird Sie mit einer Elastizität von @1% abprallen lassen. +This block will randomly drop one of the following when mined: @1.=Dieser Block wird nach dem Abbauen zufällig eines von den folgenden Dingen abwerfen: @1. +This block will randomly drop up to @1 drops of the following possible drops when mined: @2.=Dieser Block nach dem Abbauen wird zufällig bis zu @1 Abwürfe von den folgenden möglichen Abwürfen abwerfen: @2. +This block won't drop anything when mined.=Dieser Block wird nach dem Abbauen nichts abwerfen. +This is a decorational block.=Dieser Block dient zur Dekoration. +This is a melee weapon which deals damage by punching.=Dies ist eine Nahkampfwaffe, welche Schaden durch Schläge verursacht. +Maximum damage per hit:=Maximaler Schaden pro Treffer: +This item belongs to the @1 group.=Dieser Gegenstand gehört zur Gruppe „@1“. +This item belongs to these groups: @1.=Dieser Gegenstand gehört zu den folgenden Gruppen: @1. +This item can serve as a smelting fuel with a burning time of @1.=Dieser Gegenstand kann als Brennstoff mit einer Brenndauer von @1 dienen. +This item is primarily used for crafting other items.=Dieser Gegenstand wird primär für die Fertigung von anderen Gegenständen benutzt. +This item points to liquids.=Mit diesem Gegenstand zeigt man auf Flüssigkeiten. +This tool belongs to the @1 group.=Dieses Werkzeug gehört zur Gruppe „@1“. +This tool belongs to these groups: @1.=Dieses Werkzeug gehört zu den folgenden Gruppen: @1. +This tool can serve as a smelting fuel with a burning time of @1.=Dieses Werkzeug kann als Brennstoff mit einer Brenndauer von @1 dienen. +This tool is capable of mining.=Dies ist ein Grabewerkzeug. +Maximum toughness levels:=Maximale Härtegrade: +This tool points to liquids.=Mit diesem Werkzeug zeigt man auf Flüssigkeiten. +Tools and weapons=Werkzeuge und Waffen +Unknown Node=Unbekannter Node +Usage help: @1=Benutzung: @1 +Walking on this block is completely silent.=Auf diesem Block sind Schritte lautlos. +Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand.=Wenn Sie keinen Gegenstand halten, benutzen Sie die Hand, welches als ein Werkzeug mit seinen eigenen Fägihkeiten dient. Wenn Sie einen Gegenstand halten, der kein Grabewerkzeug oder eine Waffe ist, wird er sich verhalten als wäre er die Hand. +Yes=Ja +You can not jump while standing on this block.=Man kann von diesem Block nicht abspringen. +any level=beliebige Stufe +level 0=Stufe 0 +level 0-@1=Stufen 0-@1 +unknown=unbekannt +Unknown item (@1)=Unbekannter Gegenstand (@1) +• @1: @2=• @1: @2 +• @1: @2 HP=• @1: @2 TP +• @1: @2, @3=• @1: @2, @3 +• Flowing range: @1=• Fließweite: @1 +• No flowing=• Kein Fließen +• Not renewable=• Nicht erneuerbar +• Renewable=• Erneuerbar +• Viscosity: @1=• Zähflüssigkeit: @1 +Itemstring: "@1"=Itemstring: „@1“ +Durability: @1 uses=Haltbarkeit: @1 Benutzungen +Durability: @1=Haltbarkeit: @1 +Mining durability:=Grabehaltbarkeit: +• @1, level @2: @3 uses=• @1, Stufe @2: @3 Benutzungen +• @1, level @2: Unlimited=• @1, Stufe @2: Unbegrenzt +This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead.=Die Rotation dieses Blocks hängt davon ab, wie sie ihn platzieren: Platzieren Sie ihn auf den Boden oder an die Decke, um ihn vertikal aufzustellen; platzieren Sie in an der Seite für eine horizontale Ausrichtung. Wenn Sie während des Bauens schleichen, wird der Block stattdessen senkrecht zur üblichen Ausrichtung rotiert. +Toughness level: @1=Härtegrad: @1 diff --git a/mods/HELP/doc/doc_items/locale/doc_items.pt.tr b/mods/HELP/doc/doc_items/locale/doc_items.pt.tr new file mode 100644 index 000000000..648e14569 --- /dev/null +++ b/mods/HELP/doc/doc_items/locale/doc_items.pt.tr @@ -0,0 +1,141 @@ +# textdomain:doc_items + Using it as fuel turns it into: @1.= Usar isso como combustivel o transforma em: @1. +@1 seconds=@1 segundos +# Item count times item name +%@1×@2=%@1×@2 +# Itemname (25%) +@1 (@2%)=@1 (@2%) +# Itemname (<0.5%) +@1 (<0.5%)=@1 (<0.5%) +# Itemname (ca. 25%) +@1 (ca. @2%)= +# List separator (e.g. “one, two, three”) +, =, +# Final list separator (e.g. “One, two and three”) + and = e +1 second=1 segundo +A transparent block, basically empty space. It is usually left behind after digging something.=Um bloco transparente, basicamente um vazio. Isso geralmente fica no lugar de um bloco removido. +Air=Ár +Blocks=Blocos +Building another block at this block will place it inside and replace it.=Construir outro bloco nesse bloco vai subistitui-lo. +Building this block is completely silent.=Construir esse bloco é completamente silencioso. +Collidable: @1=Coledível: @1 +Description: @1=Descrição: @1 +Falling blocks can go through this block; they destroy it when doing so.=Blocos caindo podem atravessar esse bloco destruindo-o. +Full punch interval: @1 s=Intervalo completo de golpe: @1 s +Hand=Mão +Hold it in your hand, then leftclick to eat it.=Segure-o na sua mão, depois clique com o botão esquerdo para comer. +Hold it in your hand, then leftclick to eat it. But why would you want to do this?=Segure-o na sua mão, depois clique com o botão esquerdo para comer. Mas por que você quer fazer isso? +Item reference of all wieldable tools and weapons=Referência de item de todas as ferramentas e armas que podem ser usadas +Item reference of blocks and other things which are capable of occupying space=Referência de item de blocos e outras coisas que são capazes de ocupar espaço +Item reference of items which are neither blocks, tools or weapons (esp. crafting items)=Referência de itens que não são blocos, ferramentas ou armas (especialmente itens de criação) +Liquids can flow into this block and destroy it.=Líquidos podem fluir por esse bloco destruindo-o. +Maximum stack size: @1=Tamanho máximo de empilhamento: @1 +Mining level: @1=Nível de mineração: @1 +Mining ratings:=Classificações de mineração: +• @1, rating @2: @3 s - @4 s= +• @1, rating @2: @3 s= +Mining times:=Tempos de mineração: +Mining this block is completely silent.=Minerar esse bloco é completamente silencioso. +Miscellaneous items=Itens variados +No=Não +Pointable: No=Apontável: Não +Pointable: Only by special items=Apontável: Apenas por itens especiais +Pointable: Yes=Apontável: Sim +Punches with this block don't work as usual; melee combat and mining are either not possible or work differently.=Socos com esse bloco não funcionam de forma comum; Combate corpo a corpo e mineração não são possíveis ou funcionam de forma diferente. +Punches with this item don't work as usual; melee combat and mining are either not possible or work differently.=Socos com esse item não funcionam de forma comum; Combate corpo a corpo e mineração não são possíveis ou funcionam de forma diferente. +Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently.=Socos com essa ferramenta não funcionam de forma comum; Combate corpo a corpo e mineração não são possíveis ou funcionam de forma diferente. +Range: @1=Alcance: @1 +# Range: () +Range: @1 (@2)=Alcance: @1 (@2) +Range: 4=Range: 4 +# Rating used for digging times +Rating @1=Classificação @1 +# @1 is minimal rating, @2 is maximum rating +Rating @1-@2=Classificação @1-@2 +The fall damage on this block is increased by @1%.=O dano por queda nesse bloco é aumentado em @ 1%. +The fall damage on this block is reduced by @1%.=O dano por queda nesse bloco é reduzido em @ 1%. +This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly.=Esse bloco permite que a luz se propague com uma pequena perda de brilho, e a luz solar pode até passar sem perdas. +This block allows light to propagate with a small loss of brightness.=Esse bloco permite que a luz se propague com uma pequena perda de brilho. +This block allows sunlight to propagate without loss in brightness.=Esse bloco permite que a luz solar se propague sem perda de brilho. +This block belongs to the @1 group.=Esse bloco pertence ao grupo @1. +This block belongs to these groups: @1.=Esse bloco pertence a estes grupos: @1. +This block can be climbed.=Esse bloco pode ser escalado. +This block can be destroyed by any mining tool immediately.=Esse bloco pode ser destruído de forma imediata por qualquer ferramenta de mineração. +This block can be destroyed by any mining tool in half a second.=Esse bloco pode ser destruído em meio segundo por qualquer ferramenta de mineração. +This block can be mined by any mining tool immediately.=Esse bloco pode ser extraído de forma imediata por qualquer ferramenta de mineração. +This block can be mined by any mining tool in half a second.=Esse bloco pode ser extraído em meio segundo por qualquer ferramenta de mineração. +This block can be mined by mining tools which match any of the following mining ratings and its toughness level.=Esse bloco pode ser extraído por ferramentas de mineração que correspondem a qualquer uma das seguintes classificações de mineração e seu nível de resistência. +This block can not be destroyed by ordinary mining tools.=Esse bloco não pode ser destruído por ferramentas de mineração comuns. +This block can not be mined by ordinary mining tools.=Esse bloco não pode ser extraído por ferramentas de mineração comuns. +This block can serve as a smelting fuel with a burning time of @1.=Esse bloco pode servir como combustível de fundição com um tempo de queima de @1. +This block causes a damage of @1 hit point per second.=Esse bloco causa um dano de @1 ponto de impacto por segundo. +This block causes a damage of @1 hit points per second.=Esse bloco causa um dano de @1 pontos de impacto por segundo. +This block connects to blocks of the @1 group.=Esse bloco se conecta a blocos do grupo @1. +This block connects to blocks of the following groups: @1.=Esse bloco se conecta a dos seguintes grupos: @1. +This block connects to these blocks: @1.=Esse bloco se conecta aos seguintes blocos: @1. +This block connects to this block: @1.=Esse bloco se conecta a esse bloco: @1. +This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds.=Esse bloco diminui a sua respiração e causa um dano por afogamento de @1 ponto de vida a cada 2 segundos. +This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds.=Esse bloco diminui a sua respiração e causa um dano por afogamento de @1 pontos de vida a cada 2 segundos. +This block is a light source with a light level of @1.=Esse bloco é uma fonte de luz com um nível de luz de @1. +This block glows faintly with a light level of @1.=Esse bloco tem um brilho fraco com um nível de luz de @ 1. +This block is a building block for creating various buildings.=Esse bloco é um bloco de construção para criar vários edifícios. +This block is a liquid with these properties:=Esse bloco é um líquido com as seguintes propriedades: +This block is affected by gravity and can fall.=Esse bloco é afetado pela gravidade e pode cair. +This block is completely silent when mined or built.=Esse bloco é completamente silencioso quando extraído ou construído. +This block is completely silent when walked on, mined or built.=Esse bloco é completamente silencioso quando pisado, extraído ou construído. +This block is destroyed when a falling block ends up inside it.=Esse bloco é destruído quando um bloco em queda acaba dentro dele. +This block negates all fall damage.=Esse bloco nega todos os danos por queda. +This block points to liquids.=Esse bloco pode ser apontado para líquidos. +This block will drop as an item when a falling block ends up inside it.=Esse bloco vai cair como um item quando um bloco caindo acaba dentro dele. +This block will drop as an item when it is not attached to a surrounding block.=Esse bloco irá cair como um item quando não estiver anexado a um bloco adjacente. +This block will drop as an item when no collidable block is below it.=Esse bloco irá cair como um item quando nenhum bloco colidível estiver abaixo dele. +This block will drop the following items when mined: %s.=Esse bloco soltará os seguintes itens quando minerados: %s. +This block will drop the following when mined: @1×@2.=Esse bloco irá deixar cair o seguinte quando extraído: @1×@2. +This block will drop the following when mined: @1.=Esse bloco irá deixar cair o seguinte quando extraído: @1. +This block will drop the following when mined: %s.=Esse bloco irá deixar cair o seguinte quando extraído: %s. +This block will make you bounce off with an elasticity of @1%.=Esse bloco fará você saltar com uma elasticidade de @1%. +This block will randomly drop one of the following when mined: %s.=Esse bloco irá deixar cair aleatoriamente um dos seguintes quando extraído: %s. +This block will randomly drop up to %d drops of the following possible drops when mined: %s.=Esse bloco irá cair aleatoriamente %d vezes das seguintes possíveis formas quando extraído: %s. +This block won't drop anything when mined.=Esse bloco não vai deixar cair nada quando extraído. +This is a decorational block.=Esse é um bloco decorativo. +This is a melee weapon which deals damage by punching.=Essa é uma arma corpo-a-corpo que causa dano ao socar. +Maximum damage per hit:=Dano máximo por acerto: +This item belongs to the @1 group.=Esse item pertence ao grupo @1. +This item belongs to these groups: @1.=Esse item pertence aos seguintes grupos: @1. +This item can serve as a smelting fuel with a burning time of @1.=Esse item pode servir como combustível de fundição com um tempo de queima de @1. +This item is primarily used for crafting other items.=Esse item é usado principalmente para criar outros itens. +This item points to liquids.=Esse item pode ser apontado para líquidos. +This tool belongs to the @1 group.=Essa ferramenta pertence ao grupo @1. +This tool belongs to these groups: @1.=Essa ferramenta pertence aos seguintes grupos: @1. +This tool can serve as a smelting fuel with a burning time of @1.=Essa ferramenta pode servir como combustível de fundição com um tempo de queima de @1. +This tool is capable of mining.=Essa ferramenta é capaz de minerar. +Maximum toughness levels:=Níveis máximos de dureza: +This tool points to liquids.=Essa ferramenta pode ser apontada para líquidos. +Tools and weapons=Ferramentas e armas +Unknown Node=Bloco Desconhecido +Usage help: @1=Como usar: @1 +Walking on this block is completely silent.= +Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand.=Sempre que você não estiver empunhando nenhum item, você usa a mão que atua como uma ferramentacom caracteristicas próprias. Quando você está empunhando um item que não é uma ferramenta de mineração ou uma arma, ele se comportará como se fosse a mão. +Yes=Sim +You can not jump while standing on this block.= Você não pode pular enquanto estiver neste bloco. +any level=qualquer nível +level 0=nível 0 +level 0-@1=nivel 0-@1 +unknown=desconhecido +Unknown item (@1)=Item desconhecido +• @1: @2= +• @1: @2 HP= +• @1: @2, @3= +• Flowing range: @1= +• No flowing= +• Not renewable= +• Renewable= +• Viscosity: @1= +Itemstring: "@1"= +Durability: @1 uses= +Durability: @1= +Mining durability:= +• @1, level @2: @3 uses= +• @1, level @2: Unlimited= +This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead.= diff --git a/mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr b/mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr new file mode 100644 index 000000000..648e14569 --- /dev/null +++ b/mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr @@ -0,0 +1,141 @@ +# textdomain:doc_items + Using it as fuel turns it into: @1.= Usar isso como combustivel o transforma em: @1. +@1 seconds=@1 segundos +# Item count times item name +%@1×@2=%@1×@2 +# Itemname (25%) +@1 (@2%)=@1 (@2%) +# Itemname (<0.5%) +@1 (<0.5%)=@1 (<0.5%) +# Itemname (ca. 25%) +@1 (ca. @2%)= +# List separator (e.g. “one, two, three”) +, =, +# Final list separator (e.g. “One, two and three”) + and = e +1 second=1 segundo +A transparent block, basically empty space. It is usually left behind after digging something.=Um bloco transparente, basicamente um vazio. Isso geralmente fica no lugar de um bloco removido. +Air=Ár +Blocks=Blocos +Building another block at this block will place it inside and replace it.=Construir outro bloco nesse bloco vai subistitui-lo. +Building this block is completely silent.=Construir esse bloco é completamente silencioso. +Collidable: @1=Coledível: @1 +Description: @1=Descrição: @1 +Falling blocks can go through this block; they destroy it when doing so.=Blocos caindo podem atravessar esse bloco destruindo-o. +Full punch interval: @1 s=Intervalo completo de golpe: @1 s +Hand=Mão +Hold it in your hand, then leftclick to eat it.=Segure-o na sua mão, depois clique com o botão esquerdo para comer. +Hold it in your hand, then leftclick to eat it. But why would you want to do this?=Segure-o na sua mão, depois clique com o botão esquerdo para comer. Mas por que você quer fazer isso? +Item reference of all wieldable tools and weapons=Referência de item de todas as ferramentas e armas que podem ser usadas +Item reference of blocks and other things which are capable of occupying space=Referência de item de blocos e outras coisas que são capazes de ocupar espaço +Item reference of items which are neither blocks, tools or weapons (esp. crafting items)=Referência de itens que não são blocos, ferramentas ou armas (especialmente itens de criação) +Liquids can flow into this block and destroy it.=Líquidos podem fluir por esse bloco destruindo-o. +Maximum stack size: @1=Tamanho máximo de empilhamento: @1 +Mining level: @1=Nível de mineração: @1 +Mining ratings:=Classificações de mineração: +• @1, rating @2: @3 s - @4 s= +• @1, rating @2: @3 s= +Mining times:=Tempos de mineração: +Mining this block is completely silent.=Minerar esse bloco é completamente silencioso. +Miscellaneous items=Itens variados +No=Não +Pointable: No=Apontável: Não +Pointable: Only by special items=Apontável: Apenas por itens especiais +Pointable: Yes=Apontável: Sim +Punches with this block don't work as usual; melee combat and mining are either not possible or work differently.=Socos com esse bloco não funcionam de forma comum; Combate corpo a corpo e mineração não são possíveis ou funcionam de forma diferente. +Punches with this item don't work as usual; melee combat and mining are either not possible or work differently.=Socos com esse item não funcionam de forma comum; Combate corpo a corpo e mineração não são possíveis ou funcionam de forma diferente. +Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently.=Socos com essa ferramenta não funcionam de forma comum; Combate corpo a corpo e mineração não são possíveis ou funcionam de forma diferente. +Range: @1=Alcance: @1 +# Range: () +Range: @1 (@2)=Alcance: @1 (@2) +Range: 4=Range: 4 +# Rating used for digging times +Rating @1=Classificação @1 +# @1 is minimal rating, @2 is maximum rating +Rating @1-@2=Classificação @1-@2 +The fall damage on this block is increased by @1%.=O dano por queda nesse bloco é aumentado em @ 1%. +The fall damage on this block is reduced by @1%.=O dano por queda nesse bloco é reduzido em @ 1%. +This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly.=Esse bloco permite que a luz se propague com uma pequena perda de brilho, e a luz solar pode até passar sem perdas. +This block allows light to propagate with a small loss of brightness.=Esse bloco permite que a luz se propague com uma pequena perda de brilho. +This block allows sunlight to propagate without loss in brightness.=Esse bloco permite que a luz solar se propague sem perda de brilho. +This block belongs to the @1 group.=Esse bloco pertence ao grupo @1. +This block belongs to these groups: @1.=Esse bloco pertence a estes grupos: @1. +This block can be climbed.=Esse bloco pode ser escalado. +This block can be destroyed by any mining tool immediately.=Esse bloco pode ser destruído de forma imediata por qualquer ferramenta de mineração. +This block can be destroyed by any mining tool in half a second.=Esse bloco pode ser destruído em meio segundo por qualquer ferramenta de mineração. +This block can be mined by any mining tool immediately.=Esse bloco pode ser extraído de forma imediata por qualquer ferramenta de mineração. +This block can be mined by any mining tool in half a second.=Esse bloco pode ser extraído em meio segundo por qualquer ferramenta de mineração. +This block can be mined by mining tools which match any of the following mining ratings and its toughness level.=Esse bloco pode ser extraído por ferramentas de mineração que correspondem a qualquer uma das seguintes classificações de mineração e seu nível de resistência. +This block can not be destroyed by ordinary mining tools.=Esse bloco não pode ser destruído por ferramentas de mineração comuns. +This block can not be mined by ordinary mining tools.=Esse bloco não pode ser extraído por ferramentas de mineração comuns. +This block can serve as a smelting fuel with a burning time of @1.=Esse bloco pode servir como combustível de fundição com um tempo de queima de @1. +This block causes a damage of @1 hit point per second.=Esse bloco causa um dano de @1 ponto de impacto por segundo. +This block causes a damage of @1 hit points per second.=Esse bloco causa um dano de @1 pontos de impacto por segundo. +This block connects to blocks of the @1 group.=Esse bloco se conecta a blocos do grupo @1. +This block connects to blocks of the following groups: @1.=Esse bloco se conecta a dos seguintes grupos: @1. +This block connects to these blocks: @1.=Esse bloco se conecta aos seguintes blocos: @1. +This block connects to this block: @1.=Esse bloco se conecta a esse bloco: @1. +This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds.=Esse bloco diminui a sua respiração e causa um dano por afogamento de @1 ponto de vida a cada 2 segundos. +This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds.=Esse bloco diminui a sua respiração e causa um dano por afogamento de @1 pontos de vida a cada 2 segundos. +This block is a light source with a light level of @1.=Esse bloco é uma fonte de luz com um nível de luz de @1. +This block glows faintly with a light level of @1.=Esse bloco tem um brilho fraco com um nível de luz de @ 1. +This block is a building block for creating various buildings.=Esse bloco é um bloco de construção para criar vários edifícios. +This block is a liquid with these properties:=Esse bloco é um líquido com as seguintes propriedades: +This block is affected by gravity and can fall.=Esse bloco é afetado pela gravidade e pode cair. +This block is completely silent when mined or built.=Esse bloco é completamente silencioso quando extraído ou construído. +This block is completely silent when walked on, mined or built.=Esse bloco é completamente silencioso quando pisado, extraído ou construído. +This block is destroyed when a falling block ends up inside it.=Esse bloco é destruído quando um bloco em queda acaba dentro dele. +This block negates all fall damage.=Esse bloco nega todos os danos por queda. +This block points to liquids.=Esse bloco pode ser apontado para líquidos. +This block will drop as an item when a falling block ends up inside it.=Esse bloco vai cair como um item quando um bloco caindo acaba dentro dele. +This block will drop as an item when it is not attached to a surrounding block.=Esse bloco irá cair como um item quando não estiver anexado a um bloco adjacente. +This block will drop as an item when no collidable block is below it.=Esse bloco irá cair como um item quando nenhum bloco colidível estiver abaixo dele. +This block will drop the following items when mined: %s.=Esse bloco soltará os seguintes itens quando minerados: %s. +This block will drop the following when mined: @1×@2.=Esse bloco irá deixar cair o seguinte quando extraído: @1×@2. +This block will drop the following when mined: @1.=Esse bloco irá deixar cair o seguinte quando extraído: @1. +This block will drop the following when mined: %s.=Esse bloco irá deixar cair o seguinte quando extraído: %s. +This block will make you bounce off with an elasticity of @1%.=Esse bloco fará você saltar com uma elasticidade de @1%. +This block will randomly drop one of the following when mined: %s.=Esse bloco irá deixar cair aleatoriamente um dos seguintes quando extraído: %s. +This block will randomly drop up to %d drops of the following possible drops when mined: %s.=Esse bloco irá cair aleatoriamente %d vezes das seguintes possíveis formas quando extraído: %s. +This block won't drop anything when mined.=Esse bloco não vai deixar cair nada quando extraído. +This is a decorational block.=Esse é um bloco decorativo. +This is a melee weapon which deals damage by punching.=Essa é uma arma corpo-a-corpo que causa dano ao socar. +Maximum damage per hit:=Dano máximo por acerto: +This item belongs to the @1 group.=Esse item pertence ao grupo @1. +This item belongs to these groups: @1.=Esse item pertence aos seguintes grupos: @1. +This item can serve as a smelting fuel with a burning time of @1.=Esse item pode servir como combustível de fundição com um tempo de queima de @1. +This item is primarily used for crafting other items.=Esse item é usado principalmente para criar outros itens. +This item points to liquids.=Esse item pode ser apontado para líquidos. +This tool belongs to the @1 group.=Essa ferramenta pertence ao grupo @1. +This tool belongs to these groups: @1.=Essa ferramenta pertence aos seguintes grupos: @1. +This tool can serve as a smelting fuel with a burning time of @1.=Essa ferramenta pode servir como combustível de fundição com um tempo de queima de @1. +This tool is capable of mining.=Essa ferramenta é capaz de minerar. +Maximum toughness levels:=Níveis máximos de dureza: +This tool points to liquids.=Essa ferramenta pode ser apontada para líquidos. +Tools and weapons=Ferramentas e armas +Unknown Node=Bloco Desconhecido +Usage help: @1=Como usar: @1 +Walking on this block is completely silent.= +Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand.=Sempre que você não estiver empunhando nenhum item, você usa a mão que atua como uma ferramentacom caracteristicas próprias. Quando você está empunhando um item que não é uma ferramenta de mineração ou uma arma, ele se comportará como se fosse a mão. +Yes=Sim +You can not jump while standing on this block.= Você não pode pular enquanto estiver neste bloco. +any level=qualquer nível +level 0=nível 0 +level 0-@1=nivel 0-@1 +unknown=desconhecido +Unknown item (@1)=Item desconhecido +• @1: @2= +• @1: @2 HP= +• @1: @2, @3= +• Flowing range: @1= +• No flowing= +• Not renewable= +• Renewable= +• Viscosity: @1= +Itemstring: "@1"= +Durability: @1 uses= +Durability: @1= +Mining durability:= +• @1, level @2: @3 uses= +• @1, level @2: Unlimited= +This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead.= diff --git a/mods/HELP/doc/doc_items/locale/template.txt b/mods/HELP/doc/doc_items/locale/template.txt index 5f71c75a6..68d2d0a7d 100644 --- a/mods/HELP/doc/doc_items/locale/template.txt +++ b/mods/HELP/doc/doc_items/locale/template.txt @@ -1,140 +1,142 @@ -\sUsing it as fuel turns it into: @1. = -@1 seconds = +# textdomain:doc_items +Using it as fuel turns it into: @1.= +@1 seconds= # Item count times item name -%@1×@2 = +%@1×@2= # Itemname (25%) -@1 (@2%) = +@1 (@2%)= # Itemname (<0.5%) -@1 (<0.5%) = +@1 (<0.5%)= # Itemname (ca. 25%) -@1 (ca. @2%) = +@1 (ca. @2%)= # List separator (e.g. “one, two, three”) -,\s = +, = # Final list separator (e.g. “One, two and three”) -\sand\s = -1 second = -A transparent block, basically empty space. It is usually left behind after digging something. = -Air = -Blocks = -Building another block at this block will place it inside and replace it. = -Building this block is completely silent. = -Collidable: @1 = -Description: @1 = -Falling blocks can go through this block; they destroy it when doing so. = -Full punch interval: @1 s = -Hand = -Hold it in your hand, then leftclick to eat it. = -Hold it in your hand, then leftclick to eat it. But why would you want to do this? = -Item reference of all wieldable tools and weapons = -Item reference of blocks and other things which are capable of occupying space = -Item reference of items which are neither blocks, tools or weapons (esp. crafting items) = -Liquids can flow into this block and destroy it. = -Maximum stack size: @1 = -Mining level: @1 = -Mining ratings: = -• @1, rating @2: @3 s - @4 s = -• @1, rating @2: @3 s = -Mining times: = -Mining this block is completely silent. = -Miscellaneous items = -No = -Pointable: No = -Pointable: Only by special items = -Pointable: Yes = -Punches with this block don't work as usual; melee combat and mining are either not possible or work differently. = -Punches with this item don't work as usual; melee combat and mining are either not possible or work differently. = -Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently. = -Range: @1 = + and = +1 second= +A transparent block, basically empty space. It is usually left behind after digging something.= +Air= +Blocks= +Building another block at this block will place it inside and replace it.= +Building this block is completely silent.= +Collidable: @1= +Description: @1= +Falling blocks can go through this block; they destroy it when doing so.= +Full punch interval: @1 s= +Hand= +Hold it in your hand, then leftclick to eat it.= +Hold it in your hand, then leftclick to eat it. But why would you want to do this?= +Item reference of all wieldable tools and weapons= +Item reference of blocks and other things which are capable of occupying space= +Item reference of items which are neither blocks, tools or weapons (esp. crafting items)= +Liquids can flow into this block and destroy it.= +Maximum stack size: @1= +Mining level: @1= +Mining ratings:= +• @1, rating @2: @3 s - @4 s= +• @1, rating @2: @3 s= +Mining times:= +Mining this block is completely silent.= +Miscellaneous items= +No= +Pointable: No= +Pointable: Only by special items= +Pointable: Yes= +Punches with this block don't work as usual; melee combat and mining are either not possible or work differently.= +Punches with this item don't work as usual; melee combat and mining are either not possible or work differently.= +Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently.= +Range: @1= # Range: () -Range: @1 (@2) = -Range: 4 = +Range: @1 (@2)= +Range: 4= # Rating used for digging times -Rating @1 = +Rating @1= # @1 is minimal rating, @2 is maximum rating -Rating @1-@2 = -The fall damage on this block is increased by @1%. = -The fall damage on this block is reduced by @1%. = -This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly. = -This block allows light to propagate with a small loss of brightness. = -This block allows sunlight to propagate without loss in brightness. = -This block belongs to the @1 group. = -This block belongs to these groups: @1. = -This block can be climbed. = -This block can be destroyed by any mining tool immediately. = -This block can be destroyed by any mining tool in half a second. = -This block can be mined by any mining tool immediately. = -This block can be mined by any mining tool in half a second. = -This block can be mined by mining tools which match any of the following mining ratings and its toughness level. = -This block can not be destroyed by ordinary mining tools. = -This block can not be mined by ordinary mining tools. = -This block can serve as a smelting fuel with a burning time of @1. = -This block causes a damage of @1 hit point per second. = -This block causes a damage of @1 hit points per second. = -This block connects to blocks of the @1 group. = -This block connects to blocks of the following groups: @1. = -This block connects to these blocks: @1. = -This block connects to this block: @1. = -This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds. = -This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds. = -This block is a light source with a light level of @1. = -This block glows faintly with a light level of @1. = -This block is a building block for creating various buildings. = -This block is a liquid with these properties: = -This block is affected by gravity and can fall. = -This block is completely silent when mined or built. = -This block is completely silent when walked on, mined or built. = -This block is destroyed when a falling block ends up inside it. = -This block negates all fall damage. = -This block points to liquids. = -This block will drop as an item when a falling block ends up inside it. = -This block will drop as an item when it is not attached to a surrounding block. = -This block will drop as an item when no collidable block is below it. = -This block will drop the following items when mined: %s. = -This block will drop the following when mined: @1×@2. = -This block will drop the following when mined: @1. = -This block will drop the following when mined: %s. = -This block will make you bounce off with an elasticity of @1%. = -This block will randomly drop one of the following when mined: %s. = -This block will randomly drop up to %d drops of the following possible drops when mined: %s. = -This block won't drop anything when mined. = -This is a decorational block. = -This is a melee weapon which deals damage by punching. = -Maximum damage per hit: = -This item belongs to the @1 group. = -This item belongs to these groups: @1. = -This item can serve as a smelting fuel with a burning time of @1. = -This item is primarily used for crafting other items. = -This item points to liquids. = -This tool belongs to the @1 group. = -This tool belongs to these groups: @1. = -This tool can serve as a smelting fuel with a burning time of @1. = -This tool is capable of mining. = -Maximum toughness levels: = -This tool points to liquids. = -Tools and weapons = -Unknown Node = -Usage help: @1 = -Walking on this block is completely silent. = -Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand. = -Yes = -You can not jump while standing on this block. = -any level = -level 0 = -level 0-@1 = -unknown = -Unknown item (@1) = -• @1: @2 = -• @1: @2 HP = -• @1: @2, @3 = -• Flowing range: @1 = -• No flowing = -• Not renewable = -• Renewable = -• Viscosity: @1 = -Itemstring: "@1" = -Durability: @1 uses = -Durability: @1 = -Mining durability: = -• @1, level @2: @3 uses = -• @1, level @2: Unlimited = -This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead. = +Rating @1-@2= +The fall damage on this block is increased by @1%.= +The fall damage on this block is reduced by @1%.= +This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly.= +This block allows light to propagate with a small loss of brightness.= +This block allows sunlight to propagate without loss in brightness.= +This block belongs to the @1 group.= +This block belongs to these groups: @1.= +This block can be climbed.= +This block can be destroyed by any mining tool immediately.= +This block can be destroyed by any mining tool in half a second.= +This block can be mined by any mining tool immediately.= +This block can be mined by any mining tool in half a second.= +This block can be mined by mining tools which match any of the following mining ratings and its toughness level.= +This block can not be destroyed by ordinary mining tools.= +This block can not be mined by ordinary mining tools.= +This block can serve as a smelting fuel with a burning time of @1.= +This block causes a damage of @1 hit point per second.= +This block causes a damage of @1 hit points per second.= +This block connects to blocks of the @1 group.= +This block connects to blocks of the following groups: @1.= +This block connects to these blocks: @1.= +This block connects to this block: @1.= +This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds.= +This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds.= +This block is a light source with a light level of @1.= +This block glows faintly with a light level of @1.= +This block is a building block for creating various buildings.= +This block is a liquid with these properties:= +This block is affected by gravity and can fall.= +This block is completely silent when mined or built.= +This block is completely silent when walked on, mined or built.= +This block is destroyed when a falling block ends up inside it.= +This block negates all fall damage.= +This block points to liquids.= +This block will drop as an item when a falling block ends up inside it.= +This block will drop as an item when it is not attached to a surrounding block.= +This block will drop as an item when no collidable block is below it.= +This block will drop the following items when mined: @1.= +This block will drop the following when mined: @1×@2.= +This block will drop the following when mined: @1.= +This block will drop the following when mined: @1.= +This block will make you bounce off with an elasticity of @1%.= +This block will randomly drop one of the following when mined: @1.= +This block will randomly drop up to @1 drops of the following possible drops when mined: @2.= +This block won't drop anything when mined.= +This is a decorational block.= +This is a melee weapon which deals damage by punching.= +Maximum damage per hit:= +This item belongs to the @1 group.= +This item belongs to these groups: @1.= +This item can serve as a smelting fuel with a burning time of @1.= +This item is primarily used for crafting other items.= +This item points to liquids.= +This tool belongs to the @1 group.= +This tool belongs to these groups: @1.= +This tool can serve as a smelting fuel with a burning time of @1.= +This tool is capable of mining.= +Maximum toughness levels:= +This tool points to liquids.= +Tools and weapons= +Unknown Node= +Usage help: @1= +Walking on this block is completely silent.= +Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand.= +Yes= +You can not jump while standing on this block.= +any level= +level 0= +level 0-@1= +unknown= +Unknown item (@1)= +• @1: @2= +• @1: @2 HP= +• @1: @2, @3= +• Flowing range: @1= +• No flowing= +• Not renewable= +• Renewable= +• Viscosity: @1= +Itemstring: "@1"= +Durability: @1 uses= +Durability: @1= +Mining durability:= +• @1, level @2: @3 uses= +• @1, level @2: Unlimited= +This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead.= +Toughness level: @1= diff --git a/mods/HELP/doc/doc_items/mod.conf b/mods/HELP/doc/doc_items/mod.conf index 74fa80dfc..f1c0fbbc5 100644 --- a/mods/HELP/doc/doc_items/mod.conf +++ b/mods/HELP/doc/doc_items/mod.conf @@ -1 +1,3 @@ name = doc_items +depends = doc +description = Adds automatically generated help texts for items. diff --git a/mods/HELP/doc/modpack.conf b/mods/HELP/doc/modpack.conf new file mode 100644 index 000000000..5e2f43080 --- /dev/null +++ b/mods/HELP/doc/modpack.conf @@ -0,0 +1 @@ +name = doc diff --git a/mods/HELP/doc/modpack.txt b/mods/HELP/doc/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/HELP/mcl_craftguide/.luacheckrc b/mods/HELP/mcl_craftguide/.luacheckrc index a21bce1f3..5a495c7af 100644 --- a/mods/HELP/mcl_craftguide/.luacheckrc +++ b/mods/HELP/mcl_craftguide/.luacheckrc @@ -4,4 +4,9 @@ allow_defined_top = true read_globals = { "minetest", "default", + "sfinv", + "sfinv_buttons", + "vector", + "string", + "table", } diff --git a/mods/HELP/mcl_craftguide/API.md b/mods/HELP/mcl_craftguide/API.md new file mode 100644 index 000000000..17b42ee7b --- /dev/null +++ b/mods/HELP/mcl_craftguide/API.md @@ -0,0 +1,171 @@ +## API + +### Custom recipes + +#### Registering a custom crafting type (example) + +```Lua +mcl_craftguide.register_craft_type("digging", { + description = "Digging", + icon = "default_tool_steelpick.png", +}) +``` + +#### Registering a custom crafting recipe (example) + +```Lua +mcl_craftguide.register_craft({ + type = "digging", + width = 1, + output = "default:cobble 2", + items = {"default:stone"}, +}) +``` + +--- + +### Recipe filters + +Recipe filters can be used to filter the recipes shown to players. Progressive +mode is implemented as a recipe filter. + +#### `mcl_craftguide.add_recipe_filter(name, function(recipes, player))` + +Adds a recipe filter with the given name. The filter function should return the +recipes to be displayed, given the available recipes and an `ObjectRef` to the +user. Each recipe is a table of the form returned by +`minetest.get_craft_recipe`. + +Example function to hide recipes for items from a mod called "secretstuff": + +```lua +mcl_craftguide.add_recipe_filter("Hide secretstuff", function(recipes) + local filtered = {} + for _, recipe in ipairs(recipes) do + if recipe.output:sub(1,12) ~= "secretstuff:" then + filtered[#filtered + 1] = recipe + end + end + + return filtered +end) +``` + +#### `mcl_craftguide.remove_recipe_filter(name)` + +Removes the recipe filter with the given name. + +#### `mcl_craftguide.set_recipe_filter(name, function(recipe, player))` + +Removes all recipe filters and adds a new one. + +#### `mcl_craftguide.get_recipe_filters()` + +Returns a map of recipe filters, indexed by name. + +--- + +### Search filters + +Search filters are used to perform specific searches inside the search field. +They can be used like so: `+=,,<...>` + +Examples: + +- `+groups=cracky,crumbly`: search for groups `cracky` and `crumbly` in all items. +- `sand+groups=falling_node`: search for group `falling_node` for items which contain `sand` in their names. + +Notes: +- If `optional name` is omitted, the search filter will apply to all items, without pre-filtering. +- Filters can be combined. +- The `groups` filter is currently implemented by default. + +#### `mcl_craftguide.add_search_filter(name, function(item, values))` + +Adds a search filter with the given name. +The search function should return a boolean value (whether the given item should be listed or not). + +Example function to show items which contain at least a recipe of given width(s): + +```lua +mcl_craftguide.add_search_filter("widths", function(item, widths) + local has_width + local recipes = recipes_cache[item] + + if recipes then + for i = 1, #recipes do + local recipe_width = recipes[i].width + for j = 1, #widths do + local width = tonumber(widths[j]) + if width == recipe_width then + has_width = true + break + end + end + end + end + + return has_width +end) +``` + +#### `mcl_craftguide.remove_search_filter(name)` + +Removes the search filter with the given name. + +#### `mcl_craftguide.get_search_filters()` + +Returns a map of search filters, indexed by name. + +--- + +### Custom formspec elements + +#### `mcl_craftguide.add_formspec_element(name, def)` + +Adds a formspec element to the current formspec. +Supported types: `box`, `label`, `image`, `button`, `tooltip`, `item_image`, `image_button`, `item_image_button` + +Example: + +```lua +mcl_craftguide.add_formspec_element("export", { + type = "button", + element = function(data) + -- Should return a table of parameters according to the formspec element type. + -- Note: for all buttons, the 'name' parameter *must not* be specified! + if data.recipes then + return { + data.iX - 3.7, -- X + sfinv_only and 7.9 or 8, -- Y + 1.6, -- W + 1, -- H + ESC(S("Export")) -- label + } + end + end, + -- Optional. + action = function(player, data) + -- When the button is pressed. + print("Exported!") + end +}) +``` + +#### `mcl_craftguide.remove_formspec_element(name)` + +Removes the formspec element with the given name. + +#### `mcl_craftguide.get_formspec_elements()` + +Returns a map of formspec elements, indexed by name. + +--- + +### Miscellaneous + +#### `mcl_craftguide.show(player_name, item, show_usages)` + +Opens the Crafting Guide with the current filter applied. + + * `player_name`: string param. diff --git a/mods/HELP/mcl_craftguide/LICENSE b/mods/HELP/mcl_craftguide/LICENSE deleted file mode 100644 index fedaf1ee5..000000000 --- a/mods/HELP/mcl_craftguide/LICENSE +++ /dev/null @@ -1,681 +0,0 @@ -┌───────────────────────────────────────────────────────────────────┐ -│ Copyright (c) 2015-2017 kilbith │ -│ │ -│ Code: GPL version 3 │ -│ Textures: WTFPL (credits: Gambit) │ -└───────────────────────────────────────────────────────────────────┘ - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/mods/HELP/mcl_craftguide/README.md b/mods/HELP/mcl_craftguide/README.md index c3b1a1584..f02ad3462 100644 --- a/mods/HELP/mcl_craftguide/README.md +++ b/mods/HELP/mcl_craftguide/README.md @@ -1,14 +1,11 @@ -## ![Preview1](http://i.imgur.com/fIPNYkb.png) Crafting Guide ## +# Crafting Guide (MineClone 2 edition) -#### A Crafting Guide for Minetest that doesn't suck. #### +#### `mcl_craftguide` is based on, `craftguide` the most comprehensive crafting guide on Minetest. +#### Consult the [Minetest Wiki](http://wiki.minetest.net/Crafting_guide) for more details. -#### `craftguide` is simply the most comprehensive mod of his category, with the cleanest code. #### -#### Consult the [Minetest Wiki](http://wiki.minetest.net/Crafting_guide) for more details and comparisons. #### +This crafting guide can be accessed from the invenotory menu (book icon). -#### This crafting guide is usable with a blue book named *"Crafting Guide"*. #### +Crafting guide starts out empty and will be filled with more recipes whenever you hold on +to a new items that you can use to new recipes. -#### This crafting guide features two modes : Standard and Progressive. #### -The Progressive mode is a Terraria-like system that only shows recipes you can craft from items in inventory. -The progressive mode can be enabled with `craftguide_progressive_mode = true` in `minetest.conf`. - -![Preview2](http://i.imgur.com/3q7rVSo.png) +For developers, there's a modding API (see `API.md`). diff --git a/mods/HELP/mcl_craftguide/depends.txt b/mods/HELP/mcl_craftguide/depends.txt index de1a2085e..5bff11578 100644 --- a/mods/HELP/mcl_craftguide/depends.txt +++ b/mods/HELP/mcl_craftguide/depends.txt @@ -2,3 +2,5 @@ mcl_core mcl_compass mcl_clock doc +sfinv? +sfinv_buttons? diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 6b3d41328..fab6aa531 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -1,52 +1,62 @@ mcl_craftguide = {} -local craftguide, datas, mt = {}, {}, minetest --- Progressive Mode: --- true: Only show recipes which include at least one of the items the player posesses --- false: Show all crafting recipes -local progressive_mode = false -if mt.settings:get_bool("craftguide_progressive_mode") == true then - progressive_mode = true -end -local get_recipe = mt.get_craft_recipe -local get_result, show_formspec = mt.get_craft_result, mt.show_formspec -local reg_items = mt.registered_items +local M = minetest +local player_data = {} -local get_recipes = function(query_item) - local recipes = mt.get_all_craft_recipes(query_item) +-- Caches +local init_items = {} +local searches = {} +local recipes_cache = {} +local usages_cache = {} +local fuel_cache = {} - -- Manually add repairing recipes (workaround, because get_all_craft_recipes - -- doesn't return repairing recipes) - if minetest.get_modpath("mcl_core") then - local def = minetest.registered_items[query_item] - if not def then - return - end - if def.type == "tool" then - if recipes == nil then - recipes = {} - end - if minetest.get_item_group(query_item, "disable_repair") ~= 1 then - table.insert(recipes, { - type = "normal", - width = 0, - items = { [1] = query_item, [2] = query_item }, - output = query_item, - -- Special marker for repairing recipes - _is_toolrepair = true, - }) - end - end - end - return recipes -end +local progressive_mode = M.settings:get_bool("mcl_craftguide_progressive_mode", true) +local sfinv_only = false + +local colorize = M.colorize +local reg_items = M.registered_items +local get_result = M.get_craft_result +local show_formspec = M.show_formspec +local get_player_by_name = M.get_player_by_name +local serialize, deserialize = M.serialize, M.deserialize + +local ESC = M.formspec_escape +local S = M.get_translator("mcl_craftguide") + +local maxn, sort, concat, insert, copy = + table.maxn, table.sort, table.concat, table.insert, + table.copy + +local fmt, find, gmatch, match, sub, split, lower = + string.format, string.find, string.gmatch, string.match, + string.sub, string.split, string.lower --- Lua 5.3 removed `table.maxn`, use this alternative in case of breakage: --- https://github.com/kilbith/xdecor/blob/master/handlers/helpers.lua#L1 -local remove, maxn, sort = table.remove, table.maxn, table.sort local min, max, floor, ceil = math.min, math.max, math.floor, math.ceil +local pairs, next, unpack = pairs, next, unpack +local vec_add, vec_mul = vector.add, vector.multiply + +local DEFAULT_SIZE = 10 +local MIN_LIMIT, MAX_LIMIT = 10, 12 +DEFAULT_SIZE = min(MAX_LIMIT, max(MIN_LIMIT, DEFAULT_SIZE)) + +local GRID_LIMIT = 5 +local POLL_FREQ = 0.25 + +local FMT = { + box = "box[%f,%f;%f,%f;%s]", + label = "label[%f,%f;%s]", + image = "image[%f,%f;%f,%f;%s]", + button = "button[%f,%f;%f,%f;%s;%s]", + tooltip = "tooltip[%s;%s]", + item_image = "item_image[%f,%f;%f,%f;%s]", + image_button = "image_button[%f,%f;%f,%f;%s;%s;%s]", + item_image_button = "item_image_button[%f,%f;%f,%f;%s;%s;%s]", +} local group_stereotypes = { + wood = "mcl_core:wood", + stone = "mcl_core:stone", + sand = "mcl_core:sand", wool = "mcl_wool:white", carpet = "mcl_wool:white_carpet", dye = "mcl_dye:red", @@ -61,549 +71,1102 @@ local group_stereotypes = { banner = "mcl_banners:banner_item_white", mesecon_conductor_craftable = "mesecons:wire_00000000_off", purpur_block = "mcl_end:purpur_block", + normal_sandstone = "mcl_core:sandstone", + red_sandstone = "mcl_core:redsandstone", compass = mcl_compass.stereotype, clock = mcl_clock.sterotype, } local group_names = { - shulker_box = "Any shulker box", - wool = "Any wool", - wood = "Any wood planks", - tree = "Any wood", - sand = "Any sand", - sandstone = "Any sandstone (yellow)", - redsandstone = "Any red sandstone", - carpet = "Any carpet", - dye = "Any dye", - water_bucket = "Any water bucket", - flower = "Any flower", - mushroom = "Any mushroom", - wood_slab = "Any wooden slab", - wood_stairs = "Any wooden stairs", - coal = "Any coal", - quartz_block = "Any kind of quartz block", - purpur_block = "Any kind of purpur block", - stonebrick = "Any stone bricks", + shulker_box = S("Any shulker box"), + wool = S("Any wool"), + wood = S("Any wood planks"), + tree = S("Any wood"), + sand = S("Any sand"), + normal_sandstone = S("Any normal sandstone"), + red_sandstone = S("Any red sandstone"), + carpet = S("Any carpet"), + dye = S("Any dye"), + water_bucket = S("Any water bucket"), + flower = S("Any flower"), + mushroom = S("Any mushroom"), + wood_slab = S("Any wooden slab"), + wood_stairs = S("Any wooden stairs"), + coal = S("Any coal"), + quartz_block = S("Any kind of quartz block"), + purpur_block = S("Any kind of purpur block"), + stonebrick = S("Any stone bricks"), + stick = S("Any stick"), } -function craftguide:group_to_item(item) - if item:sub(1,6) == "group:" then - local itemsub = item:sub(7) - if group_stereotypes[itemsub] then - item = group_stereotypes[itemsub] - elseif reg_items["mcl_core:"..itemsub] then - item = item:gsub("group:", "mcl_core:") - else - for name, def in pairs(reg_items) do - if def.groups[item:match("[^,:]+$")] then - item = name - end - end + + +local item_lists = { + "main", + "craft", + "craftpreview", +} + +local function table_merge(t, t2) + t, t2 = t or {}, t2 or {} + local c = #t + + for i = 1, #t2 do + c = c + 1 + t[c] = t2[i] + end + + return t +end + +local function table_replace(t, val, new) + for k, v in pairs(t) do + if v == val then + t[k] = new end end - return item:sub(1,6) == "group:" and "" or item +end + +local function table_diff(t, t2) + local hash = {} + + for i = 1, #t do + local v = t[i] + hash[v] = true + end + + for i = 1, #t2 do + local v = t2[i] + hash[v] = nil + end + + local diff, c = {}, 0 + + for i = 1, #t do + local v = t[i] + if hash[v] then + c = c + 1 + diff[c] = v + end + end + + return diff +end + +local custom_crafts, craft_types = {}, {} + +function mcl_craftguide.register_craft_type(name, def) + local func = "mcl_craftguide.register_craft_guide(): " + assert(name, func .. "'name' field missing") + assert(def.description, func .. "'description' field missing") + assert(def.icon, func .. "'icon' field missing") + + craft_types[name] = def +end + +function mcl_craftguide.register_craft(def) + local func = "mcl_craftguide.register_craft(): " + assert(def.type, func .. "'type' field missing") + assert(def.width, func .. "'width' field missing") + assert(def.output, func .. "'output' field missing") + assert(def.items, func .. "'items' field missing") + + custom_crafts[#custom_crafts + 1] = def +end + +local recipe_filters = {} + +function mcl_craftguide.add_recipe_filter(name, f) + local func = "mcl_craftguide.add_recipe_filter(): " + assert(name, func .. "filter name missing") + assert(f and type(f) == "function", func .. "filter function missing") + + recipe_filters[name] = f +end + +function mcl_craftguide.remove_recipe_filter(name) + recipe_filters[name] = nil +end + +function mcl_craftguide.set_recipe_filter(name, f) + local func = "mcl_craftguide.set_recipe_filter(): " + assert(name, func .. "filter name missing") + assert(f and type(f) == "function", func .. "filter function missing") + + recipe_filters = {[name] = f} +end + +function mcl_craftguide.get_recipe_filters() + return recipe_filters +end + +local function apply_recipe_filters(recipes, player) + for _, filter in pairs(recipe_filters) do + recipes = filter(recipes, player) + end + + return recipes +end + +local search_filters = {} + +function mcl_craftguide.add_search_filter(name, f) + local func = "mcl_craftguide.add_search_filter(): " + assert(name, func .. "filter name missing") + assert(f and type(f) == "function", func .. "filter function missing") + + search_filters[name] = f +end + +function mcl_craftguide.remove_search_filter(name) + search_filters[name] = nil +end + +function mcl_craftguide.get_search_filters() + return search_filters +end + +local formspec_elements = {} + +function mcl_craftguide.add_formspec_element(name, def) + local func = "mcl_craftguide.add_formspec_element(): " + assert(def.element, func .. "'element' field not defined") + assert(def.type, func .. "'type' field not defined") + assert(FMT[def.type], func .. "'" .. def.type .. "' type not supported by the API") + + formspec_elements[name] = { + type = def.type, + element = def.element, + action = def.action, + } +end + +function mcl_craftguide.remove_formspec_element(name) + formspec_elements[name] = nil +end + +function mcl_craftguide.get_formspec_elements() + return formspec_elements +end + +local function item_has_groups(item_groups, groups) + for i = 1, #groups do + local group = groups[i] + if not item_groups[group] then + return + end + end + + return true end local function extract_groups(str) - if str:sub(1,6) ~= "group:" then return end - return str:sub(7):split(",") + return split(sub(str, 7), ",") end -local function colorize(str) - -- If client <= 0.4.14, don't colorize for compatibility. - return mt.colorize and mt.colorize("#FFFF00", str) or str -end - -local function get_fueltime(item) - return get_result({method="fuel", width=1, items={item}}).time -end - -function craftguide:get_tooltip(item, recipe_type, cooktime, groups) - local raw = self:get_tooltip_raw(item, recipe_type, cooktime, groups) - if raw == "" then - return raw - else - local tooltip = "tooltip["..item..";" - tooltip = tooltip .. raw - tooltip = tooltip .. "]" - return tooltip - end -end - -function craftguide:get_tooltip_raw(item, recipe_type, cooktime, groups) - local tooltip, item_desc = "", "" - local fueltime = get_fueltime(item) - local has_extras = groups or recipe_type == "cooking" or fueltime > 0 - - if reg_items[item] then - if not groups then - item_desc = reg_items[item].description +local function item_in_recipe(item, recipe) + for _, recipe_item in pairs(recipe.items) do + if recipe_item == item then + return true end - else - return tooltip.."Unknown Item ("..item..")]" end +end + +local function groups_item_in_recipe(item, recipe) + local item_groups = reg_items[item].groups + for _, recipe_item in pairs(recipe.items) do + if sub(recipe_item, 1, 6) == "group:" then + local groups = extract_groups(recipe_item) + if item_has_groups(item_groups, groups) then + local usage = copy(recipe) + table_replace(usage.items, recipe_item, item) + return usage + end + end + end +end + +local function get_item_usages(item) + local usages, c = {}, 0 + + for _, recipes in pairs(recipes_cache) do + for i = 1, #recipes do + local recipe = recipes[i] + if item_in_recipe(item, recipe) then + c = c + 1 + usages[c] = recipe + else + recipe = groups_item_in_recipe(item, recipe) + if recipe then + c = c + 1 + usages[c] = recipe + end + end + end + end + + if fuel_cache[item] then + usages[#usages + 1] = {type = "fuel", width = 1, items = {item}} + end + + return usages +end + +local function get_filtered_items(player) + local items, c = {}, 0 + + for i = 1, #init_items do + local item = init_items[i] + local recipes = recipes_cache[item] + local usages = usages_cache[item] + + if recipes and #apply_recipe_filters(recipes, player) > 0 or + usages and #apply_recipe_filters(usages, player) > 0 then + c = c + 1 + items[c] = item + end + end + + return items +end + +local function cache_recipes(output) + local recipes = M.get_all_craft_recipes(output) or {} + local c = 0 + + for i = 1, #custom_crafts do + local custom_craft = custom_crafts[i] + if match(custom_craft.output, "%S*") == output then + c = c + 1 + recipes[c] = custom_craft + end + end + + if #recipes > 0 then + recipes_cache[output] = recipes + return true + end +end + +local function get_recipes(item, data, player) + local recipes = recipes_cache[item] + local usages = usages_cache[item] + + if recipes then + recipes = apply_recipe_filters(recipes, player) + end + + local no_recipes = not recipes or #recipes == 0 + if no_recipes and not usages then + return + elseif usages and no_recipes then + data.show_usages = true + end + + if data.show_usages then + recipes = apply_recipe_filters(usages_cache[item], player) + if #recipes == 0 then + return + end + end + + return recipes +end + +local function get_burntime(item) + return get_result({method = "fuel", width = 1, items = {item}}).time +end + +local function cache_fuel(item) + local burntime = get_burntime(item) + if burntime > 0 then + fuel_cache[item] = burntime + return true + end +end + +local function groups_to_item(groups) + if #groups == 1 then + local group = groups[1] + local def_gr = "mcl_core:" .. group + + if group_stereotypes[group] then + return group_stereotypes[group] + elseif reg_items[def_gr] then + return def_gr + end + end + + for name, def in pairs(reg_items) do + if item_has_groups(def.groups, groups) then + return name + end + end + + return "" +end + +local function get_tooltip(item, groups, cooktime, burntime) + local tooltip + if groups then local gcol = "#FFAAFF" - local groupstr if #groups == 1 then local g = group_names[groups[1]] -- Treat the groups “compass” and “clock” as fake groups - -- and just print the normal group name without special formatting + -- and just print the normal item name without special formatting if groups[1] == "compass" or groups[1] == "clock" then - gcol = "" groupstr = reg_items[item].description elseif group_names[groups[1]] then -- Use the special group name string - groupstr = group_names[groups[1]] + groupstr = minetest.colorize(gcol, group_names[groups[1]]) else --[[ Fallback: Generic group explanation: This always works, but the internally used group name (which looks ugly) is exposed to the user. ]] - groupstr = "Any item belonging to the " .. groups[1] .. " group" + groupstr = minetest.colorize(gcol, groups[1]) + groupstr = S("Any item belonging to the @1 group", groupstr) end + tooltip = groupstr else - groupstr = "Any item belonging to the following groups: " - for i=1, #groups do - groupstr = groupstr .. groups[i].. - (groups[i+1] and " and " or "") + + local groupstr, c = {}, 0 + for i = 1, #groups do + c = c + 1 + groupstr[c] = colorize(gcol, groups[i]) end + + groupstr = concat(groupstr, ", ") + tooltip = S("Any item belonging to the groups: @1", groupstr) end - tooltip = tooltip..core.colorize(gcol, groupstr) - end - tooltip = tooltip .. item_desc - if recipe_type == "cooking" then - tooltip = tooltip.."\nCooking time: ".. - colorize(cooktime) - end - if fueltime > 0 and not groups then - tooltip = tooltip.."\nBurning time: ".. - colorize(fueltime) + else + tooltip = reg_items[item].description end - return tooltip + if cooktime then + tooltip = tooltip .. "\n" .. + S("Cooking time: @1", colorize("yellow", cooktime)) + end + + if burntime then + tooltip = tooltip .. "\n" .. + S("Burning time: @1", colorize("yellow", burntime)) + end + + return fmt(FMT.tooltip, item, ESC(tooltip)) end -function craftguide:get_recipe(iY, xoffset, tooltip_raw, item, recipe_num, recipes) - local formspec, recipes_total = "", #recipes - if recipes_total > 1 then - formspec = formspec.. - "button[0,"..(iY+3)..";2,1;alternate;Alternate]".. - "label[0,"..(iY+2)..".5;Recipe ".. - recipe_num.." of "..recipes_total.."]" - end - local recipe_type = recipes[recipe_num].type +local function get_recipe_fs(data, iY) + local fs = {} + local recipe = data.recipes[data.rnum] + local width = recipe.width + local xoffset = data.iX / 2.15 + local cooktime, shapeless - local items = recipes[recipe_num].items - local width = recipes[recipe_num].width - local output = recipes[recipe_num].output - local cooking_time = 10 - local is_shapeless = false - if recipe_type == "normal" and width == 0 then - is_shapeless = true - if #items <= 4 then + if recipe.type == "cooking" then + cooktime, width = width, 1 + elseif width == 0 then + shapeless = true + if #recipe.items <= 4 then width = 2 else - width = min(3, #items) + width = min(3, #recipe.items) end end - --[[ Recipe type symbols ]] + local rows = ceil(maxn(recipe.items) / width) + local rightest, btn_size, s_btn_size = 0, 1.1 - -- Cooking (furnace) - if recipe_type == "cooking" then - cooking_time = width - width = 1 - formspec = formspec.. - "image["..(xoffset-0.8)..","..(iY+1).. - ".5;0.5,0.5;default_furnace_front_active.png]" - -- Shapeless recipes (intertwined arrows) - elseif is_shapeless then - formspec = formspec.. - "image["..(xoffset-0.8)..","..(iY+1).. - ".5;0.5,0.5;craftguide_shapeless.png]" + local btn_lab = data.show_usages and + ESC(S("Usage @1 of @2", data.rnum, #data.recipes)) or + ESC(S("Recipe @1 of @2", data.rnum, #data.recipes)) + + fs[#fs + 1] = fmt(FMT.button, + sfinv_only and 5.8 or data.iX - 2.6, + sfinv_only and 7.9 or iY + 3.3, + 2.2, + 1, + "alternate", + btn_lab) + + if width > GRID_LIMIT or rows > GRID_LIMIT then + fs[#fs + 1] = fmt(FMT.label, + (data.iX / 2) - 2, + iY + 2.2, + ESC(S("Recipe is too big to be displayed (@1×@2)", width, rows))) + + return concat(fs) end - -- Recipe only available in v6 (“v6” icon) - -- TODO/FIXME: This only works for the unique red sand recipe. - -- Remove this when red sand becomes regularily available. - local v6_only_recipe = false - if output == "mcl_core:redsand 8" and - width == 3 and - items[1] == "mcl_core:sand" and - items[2] == "mcl_core:sand" and - items[3] == "mcl_core:sand" and - items[4] == "mcl_core:sand" and - items[5] == "mcl_nether:nether_wart_item" and - items[6] == "mcl_core:sand" and - items[7] == "mcl_core:sand" and - items[8] == "mcl_core:sand" and - items[9] == "mcl_core:sand" then - v6_only_recipe = true + for i, item in pairs(recipe.items) do + local X = ceil((i - 1) % width + xoffset - width) - + (sfinv_only and 0 or 0.2) + local Y = ceil(i / width + (iY + 2) - min(2, rows)) + + if width > 3 or rows > 3 then + btn_size = width > 3 and 3 / width or 3 / rows + s_btn_size = btn_size + X = btn_size * (i % width) + xoffset - 2.65 + Y = btn_size * floor((i - 1) / width) + (iY + 3) - min(2, rows) + end + + if X > rightest then + rightest = X + end + + local groups + if sub(item, 1, 6) == "group:" then + groups = extract_groups(item) + item = groups_to_item(groups) + end + + local label = "" + if groups and (#groups >= 1 and groups[1] ~= "compass" and groups[1] ~= "clock") then + label = "\nG" + end + + fs[#fs + 1] = fmt(FMT.item_image_button, + X, + Y + (sfinv_only and 0.7 or 0.2), + btn_size, + btn_size, + item, + match(item, "%S*"), + ESC(label)) + + local burntime = fuel_cache[item] + + if groups or cooktime or burntime then + fs[#fs + 1] = get_tooltip(item, groups, cooktime, burntime) + end end - if v6_only_recipe then - formspec = formspec.. - "image["..(xoffset-0.8)..","..(iY+2.75).. - ".5;0.5,0.5;mcl_craftguide_v6.png]" + local custom_recipe = craft_types[recipe.type] + + if custom_recipe or shapeless or recipe.type == "cooking" then + local icon = custom_recipe and custom_recipe.icon or + shapeless and "shapeless" or "furnace" + + if recipe.type == "cooking" then + icon = "default_furnace_front_active.png" + elseif not custom_recipe then + icon = fmt("craftguide_%s.png", icon) + end + + fs[#fs + 1] = fmt(FMT.image, + rightest + 1.2, + sfinv_only and 6.2 or iY + 1.7, + 0.5, + 0.5, + icon) + + local tooltip = custom_recipe and custom_recipe.description or + shapeless and S("Shapeless") or S("Cooking") + + fs[#fs + 1] = fmt("tooltip[%f,%f;%f,%f;%s]", + rightest + 1.2, + sfinv_only and 6.2 or iY + 1.7, + 0.5, + 0.5, + ESC(tooltip)) end - -- Render slots + local arrow_X = rightest + (s_btn_size or 1.1) + local output_X = arrow_X + 0.9 - local rows = ceil(maxn(items) / width) - local btn_size, craftgrid_limit = 1, 5 + fs[#fs + 1] = fmt(FMT.image, + arrow_X, + sfinv_only and 6.85 or iY + 2.35, + 0.9, + 0.7, + "craftguide_arrow.png") - if recipe_type == "normal" and - width > craftgrid_limit or rows > craftgrid_limit then - formspec = formspec.. - "label["..xoffset..","..(iY+2).. - ";Recipe is too big to\nbe displayed (".. - width.."x"..rows..")]" + if recipe.type == "fuel" then + fs[#fs + 1] = fmt(FMT.image, + output_X, + sfinv_only and 6.68 or iY + 2.18, + 1.1, + 1.1, + "mcl_craftguide_fuel.png") else - for i, v in pairs(items) do - local X = (i-1) % width + xoffset - 4 + (3 - max(1, width)) - local Y = ceil(i / width + iY+2 - min(2, rows)) + local output_name = match(recipe.output, "%S+") + local burntime = fuel_cache[output_name] - if recipe_type == "normal" and - width > 3 or rows > 3 then - btn_size = width > 3 and 3 / width or 3 / rows - X = btn_size * (i % width) + xoffset - 4 + (3 - max(1, width)) + fs[#fs + 1] = fmt(FMT.item_image_button, + output_X, + sfinv_only and 6.7 or iY + 2.2, + 1.1, + 1.1, + recipe.output, + ESC(output_name), + "") - Y = btn_size * floor((i-1) / width) + iY+3 - - min(2, rows) - end + if burntime then + fs[#fs + 1] = get_tooltip(output_name, nil, nil, burntime) - local groups = extract_groups(v) - local label = "" - -- Add the “G” symbols for group item slots - if groups then - --[[ Exception: Groups “compass” and “clock” since the items in these groups should - be treated as a single item from the user perspective. ]] - if not (#groups == 1 and (groups[1] == "compass" or groups[1] == "clock")) then - label = "\nG" or "" - end - end - local item_r = self:group_to_item(v) - local tltip = self:get_tooltip( - item_r, recipe_type, cooking_time, groups) + fs[#fs + 1] = fmt(FMT.image, + output_X + 1, + sfinv_only and 6.83 or iY + 2.33, + 0.6, + 0.4, + "craftguide_arrow.png") - formspec = formspec.. - "item_image_button["..X..","..Y..";".. - btn_size..","..btn_size..";"..item_r.. - ";"..item_r..";"..label.."]"..tltip + fs[#fs + 1] = fmt(FMT.image, + output_X + 1.6, + sfinv_only and 6.68 or iY + 2.18, + 0.6, + 0.6, + "mcl_craftguide_fuel.png") end end - local label = "" - if recipes[recipe_num]._is_toolrepair then - tooltip_raw = tooltip_raw .. "\n" .. core.colorize("#00FF00", string.format("Repaired by %.0f%%", (mcl_core.repair*100))) - label = "\nR" - end - return formspec.. - "image["..(xoffset-1)..","..(iY+2).. - ".12;0.9,0.7;craftguide_arrow.png]".. - "item_image_button["..(xoffset)..","..(iY+2)..";1,1;".. - output..";"..item.."_out"..";"..label.."]".."tooltip["..item.."_out"..";"..minetest.formspec_escape(tooltip_raw).."]" + + return concat(fs) end -function craftguide:get_formspec(player_name, is_fuel) - local data = datas[player_name] - local iY = data.iX - 5 +local function make_formspec(name) + local data = player_data[name] + local iY = sfinv_only and 4 or data.iX - 5 local ipp = data.iX * iY - if not data.items then - data.items = datas.init_items - end data.pagemax = max(1, ceil(#data.items / ipp)) - local formspec = "size["..data.iX..","..(iY+3)..".6;]".. - mcl_vars.gui_slots .. - mcl_vars.gui_bg .. - [=[background[1,1;1,1;craftguide_bg.png;true] - button[2.4,0.21;0.8,0.5;search;?] - button[3.05,0.21;0.8,0.5;clear;X] - tooltip[search;Search] - tooltip[clear;Reset] - tooltip[size_inc;Increase window size] - tooltip[size_dec;Decrease window size] - field_close_on_enter[filter;false]]=].. - "button["..(data.iX/2)..",-0.02;0.7,1;size_inc;+]".. - "button["..((data.iX/2) + 0.5).. - ",-0.02;0.7,1;size_dec;-]".. - "button["..(data.iX-3)..".4,0;0.8,0.95;prev;<]".. - "label["..(data.iX-2)..".1,0.18;".. - colorize(data.pagenum).." / "..data.pagemax.."]".. - "button["..(data.iX-1)..".2,0;0.8,0.95;next;>]".. - "field[0.3,0.32;2.5,1;filter;;".. - mt.formspec_escape(data.filter).."]" + local fs = {} - local even_num = data.iX % 2 == 0 - local xoffset = data.iX / 2 + (even_num and 0.5 or 0) + 2 + if not sfinv_only then + fs[#fs + 1] = fmt("size[%f,%f;]", data.iX - 0.35, iY + 4) - if not next(data.items) then - local msg = "" - if data.filter == "" then - msg = "You don't know any crafting recipes yet.\nCollect some items and open the recipe book again." - else - msg = "No crafting recipes found.\nReset the search and try again." + fs[#fs + 1] = [[ + background[1,1;1,1;craftguide_bg.png;true] + ]] + + fs[#fs + 1] = fmt([[ tooltip[size_inc;%s] + tooltip[size_dec;%s] ]], + ESC(S("Increase window size")), + ESC(S("Decrease window size"))) + + fs[#fs + 1] = fmt([[ + image_button[%f,0.12;0.8,0.8;craftguide_zoomin_icon.png;size_inc;] + image_button[%f,0.12;0.8,0.8;craftguide_zoomout_icon.png;size_dec;] ]], + data.iX * 0.47, + data.iX * 0.47 + 0.6) + end + + fs[#fs + 1] = [[ + image_button[2.4,0.12;0.8,0.8;craftguide_search_icon.png;search;] + image_button[3.05,0.12;0.8,0.8;craftguide_clear_icon.png;clear;] + field_close_on_enter[filter;false] + ]] + + fs[#fs + 1] = fmt([[ tooltip[search;%s] + tooltip[clear;%s] + tooltip[prev;%s] + tooltip[next;%s] ]], + ESC(S("Search")), + ESC(S("Reset")), + ESC(S("Previous page")), + ESC(S("Next page"))) + + fs[#fs + 1] = fmt("label[%f,%f;%s / %u]", + sfinv_only and 6.3 or data.iX - 2.2, + 0.22, + colorize("yellow", data.pagenum), + data.pagemax) + + fs[#fs + 1] = fmt([[ + image_button[%f,0.12;0.8,0.8;craftguide_prev_icon.png;prev;] + image_button[%f,0.12;0.8,0.8;craftguide_next_icon.png;next;] ]], + sfinv_only and 5.5 or data.iX - 3.1, + sfinv_only and 7.3 or (data.iX - 1.2) - (data.iX >= 11 and 0.08 or 0)) + + fs[#fs + 1] = fmt("field[0.3,0.32;2.5,1;filter;;%s]", ESC(data.filter)) + + if #data.items == 0 then + local no_item = S("No item to show") + local pos = (data.iX / 2) - 1 + + if next(recipe_filters) and #init_items > 0 and data.filter == "" then + no_item = S("Collect items to reveal more recipes") + pos = pos - 1 end - formspec = formspec.."label[0,2;"..mt.formspec_escape(msg).."]" + + fs[#fs + 1] = fmt(FMT.label, pos, 2, ESC(no_item)) end local first_item = (data.pagenum - 1) * ipp for i = first_item, first_item + ipp - 1 do - local name = data.items[i+1] - if not name then break end + local item = data.items[i + 1] + if not item then + break + end + local X = i % data.iX local Y = (i % ipp - X) / data.iX + 1 - formspec = formspec.. - "item_image_button["..X..","..Y..";1,1;".. - name..";"..name.."_inv;]" + fs[#fs + 1] = fmt("item_image_button[%f,%f;%f,%f;%s;%s_inv;]", + X - (sfinv_only and 0 or (X * 0.05)), + Y, + 1.1, + 1.1, + item, + item) end - if data.item and reg_items[data.item] then - local tooltip_raw = self:get_tooltip_raw(data.item) - local tooltip = "" - if tooltip_raw ~= "" then - tooltip = "tooltip["..data.item..";"..minetest.formspec_escape(tooltip_raw).."]" - end - if not data.recipes_item or (is_fuel and not - get_recipe(data.item).items) then - formspec = formspec.. - "image["..(xoffset-1)..","..(iY+2).. - ".12;0.9,0.7;craftguide_arrow.png]".. - "item_image_button["..(xoffset-2)..","..(iY+2).. - ";1,1;"..data.item..";"..data.item..";]".. - tooltip.. - "image["..(xoffset)..",".. - -- TODO: Remove fire icon, find better way to represent fuel - (iY+1.98)..";1,1;mcl_craftguide_fuel.png]" - else - formspec = formspec..self:get_recipe( - iY, xoffset, tooltip_raw, data.item, - data.recipe_num, data.recipes_item) - end + if data.recipes and #data.recipes > 0 then + fs[#fs + 1] = get_recipe_fs(data, iY) end - data.formspec = formspec - show_formspec(player_name, "craftguide", formspec) -end - -local function player_has_item(T) - for i=1, #T do - if T[i] then return true end - end -end - -local function group_to_items(group) - local items_with_group, counter = {}, 0 - for name, def in pairs(reg_items) do - if def.groups[group:sub(7)] then - counter = counter + 1 - items_with_group[counter] = name - end - end - return items_with_group -end - -local function item_in_inv(inv, item) - return inv:contains_item("main", item) -end - --- Returns true if player knows the item. Used for progressive mode (EXPERIMENTAL). -local function knows_item(playername, item) - local has_item = doc.entry_exists("nodes", item) and doc.entry_revealed(playername, "nodes", item) - if not has_item then - has_item = doc.entry_exists("tools", item) and doc.entry_revealed(playername, "tools", item) - end - if not has_item then - has_item = doc.entry_exists("craftitems", item) and doc.entry_revealed(playername, "craftitems", item) - end - return has_item -end - -function craftguide:recipe_in_inv(inv, item_name, recipes_f, playername) - local recipes = recipes_f or get_recipes(item_name) or {} - local show_item_recipes = {} - - for i=1, #recipes do - show_item_recipes[i] = false - for _, item in pairs(recipes[i].items) do - local group_in_inv = false - if item:sub(1,6) == "group:" then - local groups = group_to_items(item) - for j=1, #groups do - if item_in_inv(inv, groups[j]) then - group_in_inv = true - end - end + for elem_name, def in pairs(formspec_elements) do + local element = def.element(data) + if element then + if find(def.type, "button") then + insert(element, #element, elem_name) end - if group_in_inv or item_in_inv(inv, item) or knows_item(playername, item) then - show_item_recipes[i] = true - end - end - end - for i=#show_item_recipes, 1, -1 do - if not show_item_recipes[i] then - remove(recipes, i) + + fs[#fs + 1] = fmt(FMT[def.type], unpack(element)) end end - return recipes, player_has_item(show_item_recipes) + return concat(fs) end -function craftguide:get_init_items() - local items_list, counter = {}, 0 - for name, def in pairs(reg_items) do - local is_fuel = get_fueltime(name) > 0 - local is_tool = def.type == "tool" - if (not def.groups.not_in_craft_guide or def.groups.not_in_craft_guide == 0) - and (get_recipe(name).items or is_fuel or is_tool) - and def.description and def.description ~= "" then - counter = counter + 1 - items_list[counter] = name +local show_fs = function(player, name) + if sfinv_only then + sfinv.set_player_inventory_formspec(player) + else + show_formspec(name, "mcl_craftguide", make_formspec(name)) + end +end + +mcl_craftguide.add_search_filter("groups", function(item, groups) + local itemdef = reg_items[item] + local has_groups = true + + for i = 1, #groups do + local group = groups[i] + if not itemdef.groups[group] then + has_groups = nil + break end end - sort(items_list) - datas.init_items = items_list -end + return has_groups +end) -function craftguide:get_filter_items(data, player) +local function search(data) local filter = data.filter - local items_list = progressive_mode and data.init_filter_items or - datas.init_items - local inv = player:get_inventory() - local filtered_list, counter = {}, 0 - for i=1, #items_list do - local item = items_list[i] - local item_desc = reg_items[item].description:lower() + if searches[filter] then + data.items = searches[filter] + return + end - if filter ~= "" then - if item:find(filter, 1, true) or - item_desc:find(filter, 1, true) then - counter = counter + 1 - filtered_list[counter] = item - end - elseif progressive_mode then - local _, has_item = self:recipe_in_inv(inv, item, nil, player:get_player_name()) - if has_item then - counter = counter + 1 - filtered_list[counter] = item + local filtered_list, c = {}, 0 + local extras = "^(.-)%+([%w_]+)=([%w_,]+)" + local search_filter = next(search_filters) and match(filter, extras) + local filters = {} + + if search_filter then + for filter_name, values in gmatch(filter, sub(extras, 6, -1)) do + if search_filters[filter_name] then + values = split(values, ",") + filters[filter_name] = values end end end - if progressive_mode and not data.items then - data.init_filter_items = filtered_list + for i = 1, #data.items_raw do + local item = data.items_raw[i] + local def = reg_items[item] + local desc = lower(def.description) + local search_in = item .. desc + local to_add + + if search_filter then + for filter_name, values in pairs(filters) do + local func = search_filters[filter_name] + to_add = func(item, values) and (search_filter == "" or + find(search_in, search_filter, 1, true)) + end + else + to_add = find(search_in, filter, 1, true) + end + + if to_add then + c = c + 1 + filtered_list[c] = item + end end + + if not next(recipe_filters) then + -- Cache the results only if searched 2 times + if searches[filter] == nil then + searches[filter] = false + else + searches[filter] = filtered_list + end + end + data.items = filtered_list end -mt.register_on_player_receive_fields(function(player, formname, fields) - if formname ~= "craftguide" then return end - local player_name = player:get_player_name() - local data = datas[player_name] +local function get_inv_items(player) + local inv = player:get_inventory() + local stacks = {} + + for i = 1, #item_lists do + local list = inv:get_list(item_lists[i]) + table_merge(stacks, list) + end + + local inv_items, c = {}, 0 + + for i = 1, #stacks do + local stack = stacks[i] + if not stack:is_empty() then + local name = stack:get_name() + if reg_items[name] then + c = c + 1 + inv_items[c] = name + end + end + end + + return inv_items +end + +local function init_data(name) + player_data[name] = { + filter = "", + pagenum = 1, + iX = sfinv_only and 8 or DEFAULT_SIZE, + items = init_items, + items_raw = init_items, + } +end + +local function reset_data(data) + data.filter = "" + data.pagenum = 1 + data.rnum = 1 + data.query_item = nil + data.show_usages = nil + data.recipes = nil + data.items = data.items_raw +end + +local function cache_usages() + for i = 1, #init_items do + local item = init_items[i] + usages_cache[item] = get_item_usages(item) + end +end + +local function get_init_items() + local c = 0 + for name, def in pairs(reg_items) do + local is_fuel = cache_fuel(name) + if not (def.groups.not_in_craft_guide == 1 or + def.groups.not_in_creative_inventory == 1) and + def.description and def.description ~= "" and + (cache_recipes(name) or is_fuel) then + c = c + 1 + init_items[c] = name + end + end + + sort(init_items) + cache_usages() +end + +local function on_receive_fields(player, fields) + local name = player:get_player_name() + local data = player_data[name] + + for elem_name, def in pairs(formspec_elements) do + if fields[elem_name] and def.action then + return def.action(player, data) + end + end if fields.clear then - data.filter, data.item, data.pagenum, data.recipe_num = - "", nil, 1, 1 - data.items = progressive_mode and data.init_filter_items or - datas.init_items - craftguide:get_formspec(player_name) + reset_data(data) + show_fs(player, name) + elseif fields.alternate then - local recipe = data.recipes_item[data.recipe_num + 1] - data.recipe_num = recipe and data.recipe_num + 1 or 1 - craftguide:get_formspec(player_name) + if #data.recipes == 1 then + return + end + + local num_next = data.rnum + 1 + data.rnum = data.recipes[num_next] and num_next or 1 + show_fs(player, name) + elseif (fields.key_enter_field == "filter" or fields.search) and fields.filter ~= "" then - data.filter = fields.filter:lower() + local fltr = lower(fields.filter) + if data.filter == fltr then + return + end + + data.filter = fltr data.pagenum = 1 - craftguide:get_filter_items(data, player) - craftguide:get_formspec(player_name) + search(data) + show_fs(player, name) + elseif fields.prev or fields.next then + if data.pagemax == 1 then + return + end + data.pagenum = data.pagenum - (fields.prev and 1 or -1) + if data.pagenum > data.pagemax then data.pagenum = 1 elseif data.pagenum == 0 then data.pagenum = data.pagemax end - craftguide:get_formspec(player_name) - elseif (fields.size_inc and data.iX < 12) or - (fields.size_dec and data.iX > 8) then + + show_fs(player, name) + + elseif (fields.size_inc and data.iX < MAX_LIMIT) or + (fields.size_dec and data.iX > MIN_LIMIT) then data.pagenum = 1 - data.iX = data.iX - (fields.size_dec and 1 or -1) - craftguide:get_formspec(player_name) - elseif (fields.quit) then - datas[player_name] = nil + data.iX = data.iX + (fields.size_inc and 1 or -1) + show_fs(player, name) else - for item in pairs(fields) do - if item:find(":") then - if item:sub(-4) == "_inv" or item:sub(-4) == "_out" then - item = item:sub(1,-5) - end - - local is_fuel = get_fueltime(item) > 0 - local recipes = get_recipes(item) - if not recipes and not is_fuel then return end - - if item == data.item then - if data.recipes_item and #data.recipes_item >= 2 then - local recipe = data.recipes_item[data.recipe_num + 1] - data.recipe_num = recipe and data.recipe_num + 1 or 1 - craftguide:get_formspec(player_name) - end - else - - if progressive_mode then - local inv = player:get_inventory() - local _, has_item = craftguide:recipe_in_inv(inv, item, nil, player:get_player_name()) - - if not has_item then return end - recipes = craftguide:recipe_in_inv(inv, item, recipes, player_name) - end - - data.item = item - data.recipe_num = 1 - data.recipes_item = recipes - - craftguide:get_formspec(player_name, is_fuel) + local item + for field in pairs(fields) do + if find(field, ":") then + item = field + break end end + + if not item then + return + elseif sub(item, -4) == "_inv" then + item = sub(item, 1, -5) end - end -end) -function craftguide:on_use(user) - if not datas.init_items then - craftguide:get_init_items() - end - - local player_name = user:get_player_name() - local data = datas[player_name] - - if progressive_mode or not data then - datas[player_name] = {filter="", pagenum=1, iX=9} - if progressive_mode then - craftguide:get_filter_items( - datas[player_name], user) + if item ~= data.query_item then + data.show_usages = nil + else + data.show_usages = not data.show_usages end - craftguide:get_formspec(player_name) - else - show_formspec(player_name, "craftguide", data.formspec) + + local recipes = get_recipes(item, data, player) + if not recipes then + return + end + + data.query_item = item + data.recipes = recipes + data.rnum = 1 + + show_fs(player, name) end end -mcl_craftguide.show_craftguide = function(player) - craftguide:on_use(player) +M.register_on_mods_loaded(get_init_items) + +-- TODO: Remove sfinv support +if sfinv_only then + sfinv.register_page("craftguide:craftguide", { + title = "Craft Guide", + + get = function(self, player, context) + local name = player:get_player_name() + local formspec = make_formspec(name) + + return sfinv.make_formspec(player, context, formspec) + end, + + on_enter = function(self, player, context) + if next(recipe_filters) then + local name = player:get_player_name() + local data = player_data[name] + + data.items_raw = get_filtered_items(player) + search(data) + end + end, + + on_player_receive_fields = function(self, player, context, fields) + on_receive_fields(player, fields) + end, + }) +else + M.register_on_player_receive_fields(function(player, formname, fields) + if formname == "mcl_craftguide" then + on_receive_fields(player, fields) + elseif fields.__mcl_craftguide then + mcl_craftguide.show(player:get_player_name()) + end + end) + + local function on_use(user) + local name = user:get_player_name() + + if next(recipe_filters) then + local data = player_data[name] + data.items_raw = get_filtered_items(user) + search(data) + end + + show_formspec(name, "mcl_craftguide", make_formspec(name)) + end + end -mt.register_on_player_receive_fields(function(player, formname, fields) - if fields.__mcl_craftguide then - craftguide:on_use(player) - end -end) +if progressive_mode then + local function item_in_inv(item, inv_items) + local inv_items_size = #inv_items -mt.register_on_leaveplayer(function(player) - datas[player:get_player_name()] = nil -end) + if sub(item, 1, 6) == "group:" then + local groups = extract_groups(item) + for i = 1, inv_items_size do + local inv_item = reg_items[inv_items[i]] + if inv_item then + local item_groups = inv_item.groups + if item_has_groups(item_groups, groups) then + return true + end + end + end + else + for i = 1, inv_items_size do + if inv_items[i] == item then + return true + end + end + end + end + + local function recipe_in_inv(recipe, inv_items) + for _, item in pairs(recipe.items) do + if not item_in_inv(item, inv_items) then + return + end + end + + return true + end + + local function progressive_filter(recipes, player) + local name = player:get_player_name() + local data = player_data[name] + + if #data.inv_items == 0 then + return {} + end + + local filtered, c = {}, 0 + for i = 1, #recipes do + local recipe = recipes[i] + if recipe_in_inv(recipe, data.inv_items) then + c = c + 1 + filtered[c] = recipe + end + end + + return filtered + end + + -- Workaround. Need an engine call to detect when the contents + -- of the player inventory changed, instead. + local function poll_new_items() + local players = M.get_connected_players() + for i = 1, #players do + local player = players[i] + local name = player:get_player_name() + local data = player_data[name] + local inv_items = get_inv_items(player) + local diff = table_diff(inv_items, data.inv_items) + + if #diff > 0 then + data.inv_items = table_merge(diff, data.inv_items) + end + end + + M.after(POLL_FREQ, poll_new_items) + end + + poll_new_items() + + mcl_craftguide.add_recipe_filter("Default progressive filter", progressive_filter) + + M.register_on_joinplayer(function(player) + local name = player:get_player_name() + init_data(name) + local meta = player:get_meta() + local name = player:get_player_name() + local data = player_data[name] + + data.inv_items = deserialize(meta:get_string("inv_items")) or {} + end) + + local function save_meta(player) + local meta = player:get_meta() + local name = player:get_player_name() + local data = player_data[name] + + meta:set_string("inv_items", serialize(data.inv_items)) + end + + M.register_on_leaveplayer(function(player) + save_meta(player) + local name = player:get_player_name() + player_data[name] = nil + end) + + M.register_on_shutdown(function() + local players = M.get_connected_players() + for i = 1, #players do + local player = players[i] + save_meta(player) + end + end) +else + M.register_on_joinplayer(function(player) + local name = player:get_player_name() + init_data(name) + end) + + M.register_on_leaveplayer(function(player) + local name = player:get_player_name() + player_data[name] = nil + end) +end + +function mcl_craftguide.show(name) + local player = minetest.get_player_by_name(name) + if next(recipe_filters) then + local data = player_data[name] + data.items_raw = get_filtered_items(player) + search(data) + end + show_formspec(name, "mcl_craftguide", make_formspec(name)) +end + +--[[ Custom recipes (>3x3) test code + +M.register_craftitem(":secretstuff:custom_recipe_test", { + description = "Custom Recipe Test", +}) + +local cr = {} +for x = 1, 6 do + cr[x] = {} + for i = 1, 10 - x do + cr[x][i] = {} + for j = 1, 10 - x do + cr[x][i][j] = "group:wood" + end + end + + M.register_craft({ + output = "secretstuff:custom_recipe_test", + recipe = cr[x] + }) +end +]] diff --git a/mods/HELP/mcl_craftguide/license.txt b/mods/HELP/mcl_craftguide/license.txt new file mode 100644 index 000000000..57174d4d6 --- /dev/null +++ b/mods/HELP/mcl_craftguide/license.txt @@ -0,0 +1,58 @@ +License of source code +---------------------- + +The MIT License (MIT) + +Copyright (c) 2015-2019 Jean-Patrick Guerrero 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. + + +Licenses of media (textures) +---------------------------- + +Copyright © Diego Martínez (kaeza): craftguide_*_icon.png (CC BY-SA 3.0) + +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/HELP/mcl_craftguide/locale/mcl_craftguide.de.tr b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.de.tr new file mode 100644 index 000000000..022271948 --- /dev/null +++ b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.de.tr @@ -0,0 +1,37 @@ +# textdomain: mcl_craftguide +Any shulker box=Beliebige Shulkerbox +Any wool=Beliebige Wolle +Any wood planks=Beliebige Holzplanken +Any wood=Beliebiges Holz +Any sand=Beliebiger Sand +Any normal sandstone=Beliebiger normaler Sandstein +Any red sandstone=Beliebiger roter Sandstein +Any carpet=Beliebiger Teppich +Any dye=Beliebiger Farbstoff +Any water bucket=Beliebiger Wassereimer +Any flower=Beliebige Blume +Any mushroom=Beliebiger Pilz +Any wooden slab=Beliebige Holzplatte +Any wooden stairs=Beliebgie Holztreppe +Any coal=Beliebige Kohle +Any kind of quartz block=Beliebiger Quarzblock +Any kind of purpur block=Beliebiger Purpurblock +Any stone bricks=Beliebige Steinziegel +Any stick=Beliebiger Stock +Any item belonging to the @1 group=Beliebiger Gegenstand aus Gruppe: @1 +Any item belonging to the groups: @1=Beliebiger Gegenstand aus den Gruppen: @1 +Search=Suche +Reset=Zurücksetzen +Previous page=Vorherige Seite +Next page=Nächste Seite +Usage @1 of @2=Verwendung @1 von @2 +Recipe @1 of @2=Rezept @1 von @2 +Burning time: @1=Brennzeit: @1 +Cooking time: @1=Kochzeit: @1 +Recipe is too big to be displayed (@1×@2)=Rezept ist zu groß für die Anzeige (@1×@2) +Shapeless=Formlos +Cooking=Kochen +Increase window size=Fenster vergrößern +Decrease window size=Fenster verkleinern +No item to show=Nichts anzuzeigen +Collect items to reveal more recipes=Gegenstände aufsammeln, um mehr Rezepte aufzudecken diff --git a/mods/HELP/mcl_craftguide/locale/mcl_craftguide.fr.tr b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.fr.tr new file mode 100644 index 000000000..59800119e --- /dev/null +++ b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.fr.tr @@ -0,0 +1,37 @@ +# textdomain: mcl_craftguide +Any shulker box= +Any wool= +Any wood planks= +Any wood= +Any sand= +Any normal sandstone= +Any red sandstone= +Any carpet= +Any dye= +Any water bucket= +Any flower= +Any mushroom= +Any wooden slab= +Any wooden stairs= +Any coal= +Any kind of quartz block= +Any kind of purpur block= +Any stone bricks= +Any stick= +Any item belonging to the @1 group= +Any item belonging to the groups: @1= +Search=Rechercher +Reset=Réinitialiser +Previous page=Page précédente +Next page=Page suivante +Usage @1 of @2=Usage @1 de @2 +Recipe @1 of @2=Recette @1 de @2 +Burning time: @1=Temps de combustion : @1 +Cooking time: @1=Temps de cuisson : @1 +Recipe is too big to be displayed (@1×@2)=La recette est trop grande pour être affichée (@1×@2) +Shapeless=Sans forme +Cooking=Cuisson +Increase window size=Agrandir la fenêtre +Decrease window size=Réduire la fenêtre +No item to show=Aucun item à afficher +Collect items to reveal more recipes=Collecte des items pour révéler plus de recettes diff --git a/mods/HELP/mcl_craftguide/locale/mcl_craftguide.ru.tr b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.ru.tr new file mode 100644 index 000000000..b3c148a6d --- /dev/null +++ b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.ru.tr @@ -0,0 +1,38 @@ +# textdomain: mcl_craftguide +Any shulker box= +Any wool= +Any wood planks= +Any wood= +Any sand= +Any normal sandstone= +Any red sandstone= +Any carpet= +Any dye= +Any water bucket= +Any flower= +Any mushroom= +Any wooden slab= +Any wooden stairs= +Any coal= +Any kind of quartz block= +Any kind of purpur block= +Any stone bricks= +Any stick= +Any item belonging to the @1 group= +Any item belonging to the groups: @1= +Search=Поиск +Reset=Сброс +Previous page=Предыдущая страница +Next page=Следущая страница +Usage @1 of @2=использование @1 из @2 +Recipe @1 of @2=Рецепт @1 из @2 +Burning time: @1=Время горения: @1 +Cooking time: @1=Время преготовления: @1 +Any item belonging to the group(s): @1=Любой элемент из группы: @1 +Recipe is too big to be displayed (@1×@2)=Рецепт слишком большой для показа (@1×@2) +Shapeless=Бесформенный +Cooking=Приготовление +Increase window size=Увеличить окно +Decrease window size=Уменьшить окно +No item to show=Нет элемента для показа +Collect items to reveal more recipes=Собирайте предметы, чтобы раскрыть больше рецептов diff --git a/mods/HELP/mcl_craftguide/locale/template.txt b/mods/HELP/mcl_craftguide/locale/template.txt new file mode 100644 index 000000000..f59e97af6 --- /dev/null +++ b/mods/HELP/mcl_craftguide/locale/template.txt @@ -0,0 +1,37 @@ +# textdomain: craftguide +Any shulker box= +Any wool= +Any wood planks= +Any wood= +Any sand= +Any normal sandstone= +Any red sandstone= +Any carpet= +Any dye= +Any water bucket= +Any flower= +Any mushroom= +Any wooden slab= +Any wooden stairs= +Any coal= +Any kind of quartz block= +Any kind of purpur block= +Any stone bricks= +Any stick= +Any item belonging to the @1 group= +Any item belonging to the groups: @1= +Search= +Reset= +Previous page= +Next page= +Usage @1 of @2= +Recipe @1 of @2= +Burning time: @1= +Cooking time: @1= +Recipe is too big to be displayed (@1x@2)= +Shapeless= +Cooking= +Increase window size= +Decrease window size= +No item to show= +Collect items to reveal more recipes= diff --git a/mods/HELP/mcl_craftguide/settingtypes.txt b/mods/HELP/mcl_craftguide/settingtypes.txt new file mode 100644 index 000000000..dd3a5915e --- /dev/null +++ b/mods/HELP/mcl_craftguide/settingtypes.txt @@ -0,0 +1,4 @@ +# If enabled, the recipe book will progressively be filled with new recipes that can be crafted from all items you ever have had in your inventory. +# Recommended for new players and for a spoiler-free gameplay experience. +# If disabled, all recipes will be shown. +mcl_craftguide_progressive_mode (Learn crafting recipes progressively) bool true diff --git a/mods/HELP/mcl_craftguide/textures/craftguide_clear_icon.png b/mods/HELP/mcl_craftguide/textures/craftguide_clear_icon.png new file mode 100644 index 000000000..9244264ad Binary files /dev/null and b/mods/HELP/mcl_craftguide/textures/craftguide_clear_icon.png differ diff --git a/mods/HELP/mcl_craftguide/textures/craftguide_next_icon.png b/mods/HELP/mcl_craftguide/textures/craftguide_next_icon.png new file mode 100644 index 000000000..82cf3d361 Binary files /dev/null and b/mods/HELP/mcl_craftguide/textures/craftguide_next_icon.png differ diff --git a/mods/HELP/mcl_craftguide/textures/craftguide_prev_icon.png b/mods/HELP/mcl_craftguide/textures/craftguide_prev_icon.png new file mode 100644 index 000000000..b26cd157f Binary files /dev/null and b/mods/HELP/mcl_craftguide/textures/craftguide_prev_icon.png differ diff --git a/mods/HELP/mcl_craftguide/textures/craftguide_search_icon.png b/mods/HELP/mcl_craftguide/textures/craftguide_search_icon.png new file mode 100644 index 000000000..aace8044a Binary files /dev/null and b/mods/HELP/mcl_craftguide/textures/craftguide_search_icon.png differ diff --git a/mods/HELP/mcl_craftguide/textures/craftguide_zoomin_icon.png b/mods/HELP/mcl_craftguide/textures/craftguide_zoomin_icon.png new file mode 100644 index 000000000..5b8ecc2cb Binary files /dev/null and b/mods/HELP/mcl_craftguide/textures/craftguide_zoomin_icon.png differ diff --git a/mods/HELP/mcl_craftguide/textures/craftguide_zoomout_icon.png b/mods/HELP/mcl_craftguide/textures/craftguide_zoomout_icon.png new file mode 100644 index 000000000..7db747fda Binary files /dev/null and b/mods/HELP/mcl_craftguide/textures/craftguide_zoomout_icon.png differ diff --git a/mods/HELP/mcl_craftguide/textures/mcl_craftguide_v6.png b/mods/HELP/mcl_craftguide/textures/mcl_craftguide_v6.png deleted file mode 100644 index 50511b9e7..000000000 Binary files a/mods/HELP/mcl_craftguide/textures/mcl_craftguide_v6.png and /dev/null differ diff --git a/mods/HELP/mcl_doc/init.lua b/mods/HELP/mcl_doc/init.lua index b4f292b4c..f5f2f88fe 100644 --- a/mods/HELP/mcl_doc/init.lua +++ b/mods/HELP/mcl_doc/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_doc") + -- Disable built-in factoids; it is planned to add custom ones as replacements doc.sub.items.disable_core_factoid("node_mining") doc.sub.items.disable_core_factoid("tool_capabilities") @@ -14,7 +16,7 @@ end) -- dig_by_water doc.sub.items.register_factoid("nodes", "drop_destroy", function(itemstring, def) if def.groups.dig_by_water then - return "Water can flow into this block and cause it to drop as an item." + return S("Water can flow into this block and cause it to drop as an item.") end return "" end) @@ -22,9 +24,9 @@ end) -- usable by hoes doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def) if def.groups.cultivatable == 2 then - return "This block can be turned into dirt with a hoe." + return S("This block can be turned into dirt with a hoe.") elseif def.groups.cultivatable == 2 then - return "This block can be turned into farmland with a hoe." + return S("This block can be turned into farmland with a hoe.") end return "" end) @@ -33,15 +35,15 @@ end) doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def) local datastring = "" if def.groups.soil_sapling == 2 then - datastring = datastring .. "This block acts as a soil for all saplings." .. "\n" + datastring = datastring .. S("This block acts as a soil for all saplings.") .. "\n" elseif def.groups.soil_sapling == 1 then - datastring = datastring .. "This block acts as a soil for some saplings." .. "\n" + datastring = datastring .. S("This block acts as a soil for some saplings.") .. "\n" end if def.groups.soil_sugarcane then - datastring = datastring .. "Sugar canes will grow on this block." .. "\n" + datastring = datastring .. S("Sugar canes will grow on this block.") .. "\n" end if def.groups.soil_nether_wart then - datastring = datastring .. "Nether wart will grow on this block." .. "\n" + datastring = datastring .. S("Nether wart will grow on this block.") .. "\n" end return datastring end) @@ -50,9 +52,9 @@ doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def) local formstring = "" if def.groups.leafdecay ~= nil then if def.drop ~= "" and def.drop ~= nil and def.drop ~= itemstring then - formstring = string.format("This block quickly decays when there is no wood block of any species within a distance of %d. When decaying, it disappears and may drop one of its regular drops. The block does not decay when the block has been placed by a player.", def.groups.leafdecay) + formstring = S("This block quickly decays when there is no wood block of any species within a distance of @1. When decaying, it disappears and may drop one of its regular drops. The block does not decay when the block has been placed by a player.", def.groups.leafdecay) else - formstring = string.format("This block quickly decays and disappears when there is no wood block of any species within a distance of %d. The block does not decay when the block has been placed by a player.", def.groups.leafdecay) + formstring = S("This block quickly decays and disappears when there is no wood block of any species within a distance of @1. The block does not decay when the block has been placed by a player.", def.groups.leafdecay) end end return formstring @@ -62,9 +64,9 @@ end) doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def) local datastring = "" if def.groups.place_flowerlike == 1 then - return "This plant can only grow on grass blocks and dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher." + return S("This plant can only grow on grass blocks and dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.") elseif def.groups.place_flowerlike == 2 then - return "This plant can grow on grass blocks, podzol, dirt and coarse dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher." + return S("This plant can grow on grass blocks, podzol, dirt and coarse dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.") end return "" end) @@ -72,7 +74,7 @@ end) -- flammable doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def) if def.groups.flammable then - return "This block is flammable." + return S("This block is flammable.") end return "" end) @@ -80,7 +82,7 @@ end) -- destroys_items doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def) if def.groups.destroys_items then - return "This block destroys any item it touches." + return S("This block destroys any item it touches.") end return "" end) @@ -91,25 +93,25 @@ doc.sub.items.register_factoid(nil, "use", function(itemstring, def) local s = "" if def.groups.eatable and not def._doc_items_usagehelp then if def.groups.food == 2 then - s = s .. "To eat it, wield it, then rightclick." + s = s .. S("To eat it, wield it, then rightclick.") if def.groups.can_eat_when_full == 1 then - s = s .. "\n" .. "You can eat this even when your hunger bar is full." + s = s .. "\n" .. S("You can eat this even when your hunger bar is full.") else - s = s .. "\n" .. "You cannot eat this when your hunger bar is full." + s = s .. "\n" .. S("You cannot eat this when your hunger bar is full.") end elseif def.groups.food == 3 then - s = s .. "To drink it, wield it, then rightclick." + s = s .. S("To drink it, wield it, then rightclick.") if def.groups.can_eat_when_full ~= 1 then - s = s .. "\n" .. "You cannot drink this when your hunger bar is full." + s = s .. "\n" .. S("You cannot drink this when your hunger bar is full.") end else - s = s .. "To consume it, wield it, then rightclick." + s = s .. S("To consume it, wield it, then rightclick.") if def.groups.can_eat_when_full ~= 1 then - s = s .. "\n" .. "You cannot consume this when your hunger bar is full." + s = s .. "\n" .. S("You cannot consume this when your hunger bar is full.") end end if def.groups.no_eat_delay ~= 1 then - s = s .. "\n" .. "You have to wait for about 2 seconds before you can eat or drink again." + s = s .. "\n" .. S("You have to wait for about 2 seconds before you can eat or drink again.") end end return s @@ -118,10 +120,10 @@ end) doc.sub.items.register_factoid(nil, "groups", function(itemstring, def) local s = "" if def.groups.eatable and def.groups.eatable > 0 then - s = s .. string.format("Hunger points restored: %d", def.groups.eatable) + s = s .. S("Hunger points restored: @1", def.groups.eatable) end if def._mcl_saturation and def._mcl_saturation > 0 then - s = s .. "\n" .. string.format("Saturation points restored: %.1f", def._mcl_saturation) + s = s .. "\n" .. S("Saturation points restored: @1%.1f", string.format("%.1f", def._mcl_saturation)) end return s end) @@ -132,12 +134,12 @@ doc.sub.items.register_factoid(nil, "groups", function(itemstring, def) local mdef = minetest.registered_items[def._repair_material] local desc if mdef and mdef.description and mdef.description ~= "" then - return string.format("This item can be repaired at an anvil with: %s.", mdef.description) + return S("This item can be repaired at an anvil with: @1.", mdef.description) elseif def._repair_material == "group:wood" then - return "This item can be repaired at an anvil with any wooden planks." + return S("This item can be repaired at an anvil with any wooden planks.") elseif string.sub(def._repair_material, 1, 6) == "group:" then local group = string.sub(def._repair_material, 7) - return string.format("This item can be repaired at an anvil with any item in the “%s” group.", group) + return S("This item can be repaired at an anvil with any item in the “@1” group.", group) end end return "" @@ -145,7 +147,7 @@ end) doc.sub.items.register_factoid(nil, "groups", function(itemstring, def) if minetest.get_item_group(itemstring, "no_rename") == 1 then - return "This item cannot be renamed at an anvil." + return S("This item cannot be renamed at an anvil.") else return "" end @@ -154,7 +156,7 @@ end) doc.sub.items.register_factoid("nodes", "gravity", function(itemstring, def) local s = "" if minetest.get_item_group(itemstring, "crush_after_fall") == 1 then - s = s .. "This block crushes any block it falls into." + s = s .. S("This block crushes any block it falls into.") end return s end) @@ -162,22 +164,22 @@ end) doc.sub.items.register_factoid("nodes", "gravity", function(itemstring, def) local s = "" if minetest.get_item_group(itemstring, "crush_after_fall") == 1 then - s = s .. "When this block falls deeper than 1 block, it causes damage to any player it hits. The damage dealt is B×2−2 hit points with B = number of blocks fallen. The damage can never be more than 40 HP." + s = s .. S("When this block falls deeper than 1 block, it causes damage to any player it hits. The damage dealt is B×2−2 hit points with B = number of blocks fallen. The damage can never be more than 40 HP.") end return s end) -- Mining, hardness and all that doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def) - local pickaxey = { "Diamond Pickaxe", "Iron Pickaxe", "Stone Pickaxe", "Golden Pickaxe", "Wooden Pickaxe" } - local axey = { "Diamond Axe", "Iron Axe", "Stone Axe", "Golden Axe", "Wooden Axe" } - local shovely = { "Diamond Shovel", "Iron Shovel", "Stone Shovel", "Golden Shovel", "Wooden Shovel" } + local pickaxey = { S("Diamond Pickaxe"), S("Iron Pickaxe"), S("Stone Pickaxe"), S("Golden Pickaxe"), S("Wooden Pickaxe") } + local axey = { S("Diamond Axe"), S("Iron Axe"), S("Stone Axe"), S("Golden Axe"), S("Wooden Axe") } + local shovely = { S("Diamond Shovel"), S("Iron Shovel"), S("Stone Shovel"), S("Golden Shovel"), S("Wooden Shovel") } local datastring = "" local groups = def.groups if groups then if groups.dig_immediate == 3 then - datastring = datastring .. "This block can be mined by any tool instantly." .. "\n" + datastring = datastring .. S("This block can be mined by any tool instantly.") .. "\n" else local tool_minable = false @@ -200,20 +202,20 @@ doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def) tool_minable = true end if groups.shearsy or groups.shearsy_wool then - datastring = datastring .. "• Shears" .. "\n" + datastring = datastring .. S("• Shears") .. "\n" tool_minable = true end if groups.swordy or groups.swordy_cobweb then - datastring = datastring .. "• Sword" .. "\n" + datastring = datastring .. S("• Sword") .. "\n" tool_minable = true end if groups.handy then - datastring = datastring .. "• Hand" .. "\n" + datastring = datastring .. S("• Hand") .. "\n" tool_minable = true end if tool_minable then - datastring = "This block can be mined by:\n" .. datastring .. "\n" + datastring = S("This block can be mined by:") .. "\n" .. datastring .. "\n" end end end @@ -222,9 +224,9 @@ doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def) hardness = 0 end if hardness == -1 then - datastring = datastring .. "Hardness: ∞" + datastring = datastring .. S("Hardness: ∞") else - datastring = datastring .. string.format("Hardness: %.2f", hardness) + datastring = datastring .. S("Hardness: @1", string.format("%.2f", hardness)) end local blast = def._mcl_blast_resistance if not blast then @@ -232,7 +234,7 @@ doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def) end -- TODO: Blast resistance as number if blast >= 1000 then - datastring = datastring .. "\n" .. "This block will not be destroyed by TNT explosions." + datastring = datastring .. "\n" .. S("This block will not be destroyed by TNT explosions.") end return datastring end) @@ -240,7 +242,7 @@ end) -- Special drops when mined by shears doc.sub.items.register_factoid("nodes", "drops", function(itemstring, def) if def._mcl_shears_drop == true then - return "This block drops itself when mined by shears." + return S("This block drops itself when mined by shears.") elseif type(def._mcl_shears_drop) == "table" then local drops = {} for d=1, #def._mcl_shears_drop do @@ -255,11 +257,11 @@ doc.sub.items.register_factoid("nodes", "drops", function(itemstring, def) text = itemname end if itemcount > 1 then - text = string.format("%d×%s", itemcount, text) + text = S("@1×@2", itemcount, text) end table.insert(drops, text) end - local ret = string.format("This blocks drops the following when mined by shears: %s", table.concat(drops, ", ")) + local ret = S("This blocks drops the following when mined by shears: @1", table.concat(drops, S(", "))) return ret end return "" diff --git a/mods/HELP/mcl_doc/locale/mcl_doc.de.tr b/mods/HELP/mcl_doc/locale/mcl_doc.de.tr new file mode 100644 index 000000000..b9207b4a6 --- /dev/null +++ b/mods/HELP/mcl_doc/locale/mcl_doc.de.tr @@ -0,0 +1,57 @@ +# textdomain: mcl_doc +Water can flow into this block and cause it to drop as an item.=Wasser kann in diesen Block fließen und ihn als Gegenstand fallen lassen. +This block can be turned into dirt with a hoe.=Dieser Block kann mit einer Hacke zu Erde gemacht werden. +This block can be turned into farmland with a hoe.=Dieser Block kann mit einer Hacke zu Ackerboden gemacht werden. +This block acts as a soil for all saplings.=Dieser Block eignet sich als Nährboden für alle Setzlinge. +This block acts as a soil for some saplings.=Dieser Block eignet sich als Nährboden für einige Setzlinge. +Sugar canes will grow on this block.=Zuckerrohr wird auf diesem Block wachsen. +Nether wart will grow on this block.=Netherwurz wird auf diesem Block wachsen. +This block quickly decays when there is no wood block of any species within a distance of @1. When decaying, it disappears and may drop one of its regular drops. The block does not decay when the block has been placed by a player.=Dieser Block wird rasch absterben, wenn sich kein Holzblock irgendeiner Art innerhalb einer Entfernung von @1 befindet. Beim Absterben wird er verschwinden und wirft dabei vielleicht etwas ab. Der Block wird nicht absterben, wenn er von einem Spieler platziert wurde. +This block quickly decays and disappears when there is no wood block of any species within a distance of @1. The block does not decay when the block has been placed by a player.=Dieser Block wird schnell absterben und verschwinden, wenn sich kein Holzblock irgendeiner Art innerhalb einer Entfernung von @1 befindet. Der Block wird nicht absterben, wenn er von einem Spieler platziert wurde. +This plant can only grow on grass blocks and dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.=Diese Pflanze kann nur auf Grasblöcken und Erde wachsen. Zum Überleben muss sie sich direkt unter dem Himmel befinden oder einer Lichtstärke von 8 oder höher ausgesetzt sein. +This plant can grow on grass blocks, podzol, dirt and coarse dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.=Diese Pflanze wächst auf Grasblöcken, Podsol, Erde und grobe Erde. Zum Überleben muss sie sich direkt unter dem Himmel befinden oder einer Lichtstärke von mindestens 8 ausgesetzt sein. +This block is flammable.=Dieser Block ist entzündlich. +This block destroys any item it touches.=Dieser Block zerstört jeden Gegenstand, der in ihn fällt. +To eat it, wield it, then rightclick.=Um dies zu essen, halten Sie es in der Hand und rechtsklicken Sie. +You can eat this even when your hunger bar is full.=Sie können dies essen, auch wenn Ihre Hungerleiste voll ist. +You cannot eat this when your hunger bar is full.=Sie können dies nicht essen, wenn Ihre Hungerleiste voll ist. +To drink it, wield it, then rightclick.=Um dies zu trinken, halten Sie es, dann rechtklicken Sie. +You cannot drink this when your hunger bar is full.=Sie können dies nicht trinken, wenn Ihre Hungerleiste voll ist. +To consume it, wield it, then rightclick.=Um dies zu konsumieren, halten Sie es, dann rechtsklicken Sie. +You cannot consume this when your hunger bar is full.=Sie können dies nicht konsumieren, wenn Ihre Hungerleiste voll ist. +You have to wait for about 2 seconds before you can eat or drink again.=Sie müssen für etwa 2 Sekunden warten, bevor Sie erneut essen oder trinken können. +Hunger points restored: @1=Erhaltene Hungerpunkte: @1 +Saturation points restored: @1%.1f=Erhaltene Sättigungspunkte: @1 +This item can be repaired at an anvil with: @1.=Dieser Gegenstand kann an einem Amboss repariert werden mit: @1 +This item can be repaired at an anvil with any wooden planks.=Dieser Gegenstand kann an einem Amboss mit beliebigen Holzplanken repariert werden. +This item can be repaired at an anvil with any item in the “@1” group.=Dieser Gegenstand kann an einem Amboss in der „@1“-Gruppe repariert werden. +This item cannot be renamed at an anvil.=Dieser Gegenstand kann an einem Amboss nicht umbenannt werden. +This block crushes any block it falls into.=Dieser Block zertrümmert jeden Block, in den er hereinfällt. +When this block falls deeper than 1 block, it causes damage to any player it hits. The damage dealt is B×2−2 hit points with B @= number of blocks fallen. The damage can never be more than 40 HP.=Wenn dieser Block um mehr als 1 Block tief fällt, richtet er für jeden Spieler, den er trifft, Schaden an. Der Schaden ist B×2-2 Trefferpunkte, wobei B = die Anahl der gefallenen Blöcke. Der Schaden ist nie größer als 40 TP. +Diamond Pickaxe=Diamantspitzhacke +Iron Pickaxe=Eisenspitzhacke +Stone Pickaxe=Steinspitzhacke +Golden Pickaxe=Goldspitzhacke +Wooden Pickaxe=Holzspitzhacke +Diamond Axe=Diamantaxt +Iron Axe=Eisenaxt +Stone Axe=Steinaxt +Golden Axe=Goldaxt +Wooden Axe=Holzaxt +Diamond Shovel=Diamantschaufel +Iron Shovel=Eisenschaufel +Stone Shovel=Steinschaufel +Golden Shovel=Goldschaufel +Wooden Shovel=Holzschaufel +This block can be mined by any tool instantly.=Dieser Block kann mit jedem Werkzeug sofort abgebaut werden. +This block can be mined by:=Dieser Block kann abgebaut werden mit: +Hardness: ∞=Härte: ∞ +Hardness: @1=Härte: @1 +This block will not be destroyed by TNT explosions.=Dieser Block wird von TNT-Explosionen nicht zerstört. +This block drops itself when mined by shears.=Dieser Block wirft sich selbst ab, wenn er mit einer Schere abgebaut wird. +@1×@2=@1×@2 +This blocks drops the following when mined by shears: @1=Dieser Block wird folgendes abwerfen, wenn er mit einer Schere abgebaut wird: @ +, =, +• Shears=• Schere +• Sword=• Schwert +• Hand=• Hand diff --git a/mods/HELP/mcl_doc/locale/template.txt b/mods/HELP/mcl_doc/locale/template.txt new file mode 100644 index 000000000..542d29403 --- /dev/null +++ b/mods/HELP/mcl_doc/locale/template.txt @@ -0,0 +1,57 @@ +# textdomain: mcl_doc +Water can flow into this block and cause it to drop as an item.= +This block can be turned into dirt with a hoe.= +This block can be turned into farmland with a hoe.= +This block acts as a soil for all saplings.= +This block acts as a soil for some saplings.= +Sugar canes will grow on this block.= +Nether wart will grow on this block.= +This block quickly decays when there is no wood block of any species within a distance of @1. When decaying, it disappears and may drop one of its regular drops. The block does not decay when the block has been placed by a player.= +This block quickly decays and disappears when there is no wood block of any species within a distance of @1. The block does not decay when the block has been placed by a player.= +This plant can only grow on grass blocks and dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.= +This plant can grow on grass blocks, podzol, dirt and coarse dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.= +This block is flammable.= +This block destroys any item it touches.= +To eat it, wield it, then rightclick.= +You can eat this even when your hunger bar is full.= +You cannot eat this when your hunger bar is full.= +To drink it, wield it, then rightclick.= +You cannot drink this when your hunger bar is full.= +To consume it, wield it, then rightclick.= +You cannot consume this when your hunger bar is full.= +You have to wait for about 2 seconds before you can eat or drink again.= +Hunger points restored: @1= +Saturation points restored: @1%.1f= +This item can be repaired at an anvil with: @1.= +This item can be repaired at an anvil with any wooden planks.= +This item can be repaired at an anvil with any item in the “@1” group.= +This item cannot be renamed at an anvil.= +This block crushes any block it falls into.= +When this block falls deeper than 1 block, it causes damage to any player it hits. The damage dealt is B×2−2 hit points with B @= number of blocks fallen. The damage can never be more than 40 HP.= +Diamond Pickaxe= +Iron Pickaxe= +Stone Pickaxe= +Golden Pickaxe= +Wooden Pickaxe= +Diamond Axe= +Iron Axe= +Stone Axe= +Golden Axe= +Wooden Axe= +Diamond Shovel= +Iron Shovel= +Stone Shovel= +Golden Shovel= +Wooden Shovel= +This block can be mined by any tool instantly.= +This block can be mined by:= +Hardness: ∞= +Hardness: @1= +This block will not be destroyed by TNT explosions.= +This block drops itself when mined by shears.= +@1×@2= +This blocks drops the following when mined by shears: @1= +, = +• Shears= +• Sword= +• Hand= diff --git a/mods/HELP/mcl_doc_basics/README.md b/mods/HELP/mcl_doc_basics/README.md index 2125bed79..13ac04e4a 100644 --- a/mods/HELP/mcl_doc_basics/README.md +++ b/mods/HELP/mcl_doc_basics/README.md @@ -1,4 +1,4 @@ -# Basic help [`doc_basics`] +# Basic help, MineClone 2 edition [`mcl_doc_basics`] Adds basic help texts about Minetest, controls, gameplay and other basics. This mod uses the Documentation System [`doc`] as a basis and adds these categories: @@ -6,7 +6,5 @@ categories: * Basics: Basic gameplay information (e.g. how to craft) * Advanced usage: Advanced Minetest information (not gameplay-releavant) for power users (e.g. how to use commands) -Version: 1.0.0 - ## License Everything in this mod is licensed under the MIT License. diff --git a/mods/HELP/mcl_doc_basics/depends.txt b/mods/HELP/mcl_doc_basics/depends.txt deleted file mode 100644 index 31aa39034..000000000 --- a/mods/HELP/mcl_doc_basics/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -doc -intllib? diff --git a/mods/HELP/mcl_doc_basics/description.txt b/mods/HELP/mcl_doc_basics/description.txt deleted file mode 100644 index f86a1b591..000000000 --- a/mods/HELP/mcl_doc_basics/description.txt +++ /dev/null @@ -1 +0,0 @@ -Adds some help texts explaining how to use Minetest. diff --git a/mods/HELP/mcl_doc_basics/init.lua b/mods/HELP/mcl_doc_basics/init.lua index f4980bfe1..e700e82bd 100644 --- a/mods/HELP/mcl_doc_basics/init.lua +++ b/mods/HELP/mcl_doc_basics/init.lua @@ -1,15 +1,13 @@ --- Boilerplate to support localized strings if intllib mod is installed. -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s) return s end -end +--[[ +Basic help for MCL2. Fork of doc_basics +]] + +local S = minetest.get_translator("mcl_doc_basics") doc.add_category("basics", { name = S("Basics"), - description = S("Everything you need to know about MineClone 2 to get started with playing"), + description = S("Everything you need to know to get started with playing"), sorting = "custom", sorting_data = {"quick_start", "controls", "point", "items", "inventory", "hotbar", "tools", "weapons", "nodes", "mine", "build", "craft", "cook", "hunger", "mobs", "animals", "minimap", "cam", "sneak", "players", "liquids", "light", "groups", "glossary", "minetest"}, build_formspec = doc.entry_builders.text_and_gallery, @@ -18,7 +16,7 @@ doc.add_category("basics", doc.add_category("advanced", { name = S("Advanced usage"), - description = S("Advanced information about Minetest which may be nice to know, but is not crucial to gameplay"), + description = S("Advanced information which may be nice to know, but is not crucial to gameplay"), sorting = "custom", sorting_data = {"creative", "console", "commands", "privs", "movement_modes", "coordinates", "settings", "online"}, build_formspec = doc.entry_builders.text_and_gallery, @@ -29,7 +27,6 @@ doc.add_entry("basics", "quick_start", { data = { text = S("This is a very brief introduction to the basic gameplay:").."\n\n".. -S("Basic controls:").."\n".. S("• Move mouse to look").."\n".. S("• [W], [A], [S] and [D] to move").."\n".. S("• [E] to sprint").."\n".. @@ -40,7 +37,8 @@ S("• Left-click to mine blocks or attack").."\n".. S("• Recover from swings to deal full damage").."\n".. S("• Right-click to build blocks and use things").."\n".. S("• [I] for the inventory").."\n".. -S("• Lowest row in inventory appears in hotbar below").."\n".. +S("• First items in inventory appear in hotbar below").."\n".. +S("• Read entries in this help to learn the rest").."\n".. S("• [Esc] to close this window").."\n\n".. S("How to play:").."\n".. @@ -54,7 +52,6 @@ S("• Craft a wooden pickaxe so you can dig stone").."\n".. S("• Different tools break different kinds of blocks. Try them out!").."\n".. S("• Read entries in this help to learn the rest").."\n".. S("• Continue playing as you wish. There's no goal. Have fun!") - }}) doc.add_entry("basics", "minetest", { @@ -69,9 +66,8 @@ S("A core feature of Minetest is the built-in modding capability. Mods modify ex S("Minetest can be played alone or online together with multiple players. Online play will work out of the box with any mods, with no need for additional software as they are entirely provided by the server.").."\n\n".. -S("Minetest is usually bundled with a simple default game, named “Minetest Game” (shown in images 1 and 2). You probably already have it. Other games for Minetest can be downloaded from the official Minetest forums .").."\n\n".. +S("Minetest is usually bundled with a simple default game, named “Minetest Game” (shown in images 1 and 2). You probably already have it. Other games for Minetest can be downloaded from the official Minetest forums ."), -S("Minetest as well as Minetest Game are both unfinished at the moment, so please forgive us when not everything works out perfectly."), images = {{image="doc_basics_gameplay_mtg_1.png"}, {image="doc_basics_gameplay_mtg_2.png"}, {image="doc_basics_gameplay_carbone_ng.png"}, {image="doc_basics_gameplay_lott.png"}, {image="doc_basics_gameplay_pixture.png"}, {image="doc_basics_gameplay_outback.png"}, {image="doc_basics_gameplay_moontest.png"}, {image="doc_basics_gameplay_hades.png"}, {image="doc_basics_gameplay_xtraores_xtension.png"},} }}) @@ -86,8 +82,6 @@ S("• Sneak: [Shift]").."\n\n".. S("Sneaking only works when you stand on solid ground, are not in a liquid and don't climb.").."\n\n".. -S("If you jump while holding the sneak key, you also jump slightly higher than usual.").."\n\n".. - S("Sneaking might be disabled by mods. In this case, you still walk slower by sneaking, but you will no longer be stopped at ledges."), images = { { image = "doc_basics_sneak.png" } }, }}) @@ -102,7 +96,7 @@ S("• Moving the mouse around: Look around").."\n".. S("• W: Move forwards").."\n".. S("• A: Move to the left").."\n".. S("• D: Move to the right").."\n".. -S("• S: Move backwards").."\n\n".. +S("• S: Move backwards").."\n".. S("• E: Sprint").."\n\n".. S("While standing on solid ground:").."\n".. @@ -117,13 +111,13 @@ S("Extended movement (requires privileges):").."\n".. S("• J: Toggle fast mode, makes you run or fly fast (requires “fast” privilege)").."\n".. S("• K: Toggle fly mode, makes you move freely in all directions (requires “fly” privilege)").."\n".. S("• H: Toggle noclip mode, makes you go through walls in fly mode (requires “noclip” privilege)").."\n".. -S("• E: Move even faster when in fast mode").."\n\n".. +S("• E: Walk fast in fast mode").."\n\n".. S("World interaction:").."\n".. -S("• Left mouse button: Punch / mine blocks / take items").."\n".. +S("• Left mouse button: Punch / mine blocks").."\n".. S("• Right mouse button: Build or use pointed block").."\n".. S("• Shift+Right mouse button: Build").."\n".. -S("• Roll mouse wheel: Select next/previous item in hotbar").."\n".. +S("• Roll mouse wheel / B / N: Select next/previous item in hotbar").."\n".. S("• 1-9: Select item in hotbar directly").."\n".. S("• Q: Drop item stack").."\n".. S("• Shift+Q: Drop 1 item").."\n".. @@ -133,22 +127,21 @@ S("Inventory interaction:").."\n".. S("See the entry “Basics > Inventory”.").."\n\n".. S("Camera:").."\n".. -S("• Z: Zoom (requires “zoom” privilege)").."\n".. -S("• F7: Toggle camera mode").."\n".. -S("• F8: Toggle cinematic mode").."\n\n".. +S("• Z: Zoom").."\n".. +S("• F7: Toggle camera mode").."\n\n".. S("Interface:").."\n".. S("• Esc: Open menu window (pauses in single-player mode) or close window").."\n".. S("• F1: Show/hide HUD").."\n".. S("• F2: Show/hide chat").."\n".. -S("• F9: Toggle minimap (only works if have a map)").."\n".. +S("• F9: Toggle minimap").."\n".. S("• Shift+F9: Toggle minimap rotation mode").."\n".. S("• F10: Open/close console/chat log").."\n".. S("• F12: Take a screenshot").."\n\n".. S("Server interaction:").."\n".. S("• T: Open chat window (chat requires the “shout” privilege)").."\n".. -S("• /: Start issuing a server command)").."\n\n".. +S("• /: Start issuing a server command").."\n\n".. S("Technical:").."\n".. S("• R: Toggle far view (disables all fog and allows viewing far away, can make game very slow)").."\n".. @@ -156,8 +149,7 @@ S("• +: Increase minimal viewing distance").."\n".. S("• -: Decrease minimal viewing distance").."\n".. S("• F3: Enable/disable fog").."\n".. S("• F5: Enable/disable debug screen which also shows your coordinates").."\n".. -S("• F6: Only useful for developers. Enables/disables profiler").."\n".. -S("• P: Only useful for developers. Writes current stack traces") +S("• F6: Only useful for developers. Enables/disables profiler") }}) doc.add_entry("basics", "players", { @@ -166,17 +158,19 @@ doc.add_entry("basics", "players", { text = S("Players (actually: “player characters”) are the characters which users control.").."\n\n".. -S("Players are living beings which occupy a space of about 1×2×1 cubes. They start with 20 health points (HP) and 10 breath points (BP).").."\n".. +S("Players are living beings. They start with a number of health points (HP) and a number of breath points (BP).").."\n".. S("Players are capable of walking, sneaking, jumping, climbing, swimming, diving, mining, building, fighting and using tools and blocks.").."\n".. -S("Players can take damage for a variety of reasons, here are some:\ -• Taking fall damage\ -• Touching a block which causes direct damage\ -• Drowning\ -• Being attacked by another player\ -• Being attacked by a computer enemy").."\n\n".. +S("Players can take damage for a variety of reasons, here are some:").."\n\n".. -S("At a health of 0, the player dies and loses all items in the inventory. The player can just respawn in the world.").."\n".. +S("• Taking fall damage").."\n".. +S("• Touching a block which causes direct damage").."\n".. +S("• Drowning").."\n".. +S("• Being attacked by another player").."\n".. +S("• Being attacked by a computer enemy").."\n\n".. + +S("At a health of 0, the player dies. The player can just respawn in the world.").."\n".. +S("Other consequences of death depend on the game. The player could lose all items, or lose the round in a competitive game.").."\n\n".. S("Some blocks reduce breath. While being with the head in a block which causes drowning, the breath points are reduced by 1 for every 2 seconds. When all breath is gone, the player starts to suffer drowning damage. Breath is quickly restored in any other block.").."\n\n".. @@ -194,14 +188,14 @@ S("Items are things you can carry along and store in inventories. They can be us S("An item stack is a collection of items of the same type which fits into a single item slot. Item stacks can be dropped on the ground. Items which drop into the same coordinates will form an item stack.").."\n\n".. -S("Items have several properties, including the following:\ -\ -• Maximum stack size: Number of items which fit on 1 item stack\ -• Pointing range: How close things must be to be pointed while wielding this item\ -• Group memberships: See “Basics > Groups”\ -• May be used for crafting or cooking").."\n\n".. +S("Items have several properties, including the following:").."\n\n".. -S("Dropped item stacks will be collected automatically when you stand close to them."), +S("• Maximum stack size: Number of items which fit on 1 item stack").."\n".. +S("• Pointing range: How close things must be to be pointed while wielding this item").."\n".. +S("• Group memberships: See “Basics > Groups”").."\n".. +S("• May be used for crafting or cooking"), + +-- MCL2: Items cannot be taken by punching images = {{image="doc_basics_inventory_detail.png"}, {image="doc_basics_items_dropped.png"}}, }}) @@ -210,9 +204,9 @@ doc.add_entry("basics", "tools", { data = { text = S("Some items may serve as a tool when wielded. Any item which has some special use which can be directly used by its wielder is considered a tool.").."\n\n".. -S("Mining tools are important to break all kinds of blocks. Weapons are another kind of tool. There are some other more specialized tools. Special actions of tools are usually done by right-click.").."\n\n".. +S("A common subset of tools is mining tools. These are important to break all kinds of blocks. Weapons are a kind of tool. There are of course many other possible tools. Special actions of tools are usually done by left-click or right-click.").."\n\n".. -S("When nothing is wielded, players use their hand which may act as tool and weapon. The hand is capable of punching and deals minimum damage.").."\n\n".. +S("When nothing is wielded, players use their hand which may act as tool and weapon.").."\n\n".. S("Many tools will wear off when using them and may eventually get destroyed. The damage is displayed in a damage bar below the tool icon. If no damage bar is shown, the tool is in mint condition. Tools may be repairable by crafting, see “Basics > Crafting”."), images = {{image="doc_basics_tools.png"}, {image="doc_basics_tools_mining.png"}}, @@ -228,7 +222,7 @@ S("• Single punch: Left-click once to deal a single punch").."\n".. S("• Quick punching: Hold down the left mouse button to deal quick repeated punches").."\n\n".. S("There are two core attributes of melee weapons:").."\n".. -S("• Maximum damage: Damage which is dealt after a hit when the weapon was fully recovered)").."\n".. +S("• Maximum damage: Damage which is dealt after a hit when the weapon was fully recovered").."\n".. S("• Full punch interval: Time it takes for fully recovering from a punch").."\n\n".. S("A weapon only deals full damage when it has fully recovered from a previous punch. Otherwise, the weapon will deal only reduced damage. This means, quick punching is very fast, but also deals rather low damage. Note the full punch interval does not limit how fast you can attack.").."\n\n".. @@ -241,7 +235,7 @@ doc.add_entry("basics", "point", { name = S("Pointing"), data = { text = -S("“Pointing” means looking at something in range with the crosshair. Pointing is needed for interaction, like mining, punching, using, etc. Pointable things include blocks, dropped items, players, computer enemies and objects.").."\n\n".. +S("“Pointing” means looking at something in range with the crosshair. Pointing is needed for interaction, like mining, punching, using, etc. Pointable things include blocks, players, computer enemies and objects.").."\n\n".. S("To point something, it must be in the pointing range (also just called “range”) of your wielded item. There's a default range when you are not wielding anything. A pointed thing will be outlined or highlighted (depending on your settings). Pointing is not possible with the 3rd person front camera.").."\n\n".. @@ -253,18 +247,17 @@ doc.add_entry("basics", "cam", { name = S("Camera"), data = { text = -S("Minetest has 3 different views which determine the way you see the world. The modes are:\ -\ -• 1: First-person view (default)\ -• 2: Third-person view from behind\ -• 3: Third-person view from the front").."\n\n".. +S("There are 3 different views which determine the way you see the world. The modes are:").."\n\n".. + +S("• 1: First-person view (default)").."\n".. +S("• 2: Third-person view from behind").."\n".. +S("• 3: Third-person view from the front").."\n\n".. S("You can change the camera mode by pressing [F7].").."\n".. -S("There is also Cinematic Mode which can be toggled with [F8]. With Cinematic Mode enabled, the camera movements become more smooth. Some players don't like it, it is a matter of taste.").."\n".. -S("By holding down [Z], you can zoom the view at your crosshair. You need the “zoom” privilege to do this.").."\n\n".. +S("You might be able to zoom with [Z] to zoom the view at the crosshair. This allows you to look further.").."\n".. +S("Zooming is a gameplay feature that might be enabled or disabled by the game. By default, zooming is enabled when in Creative Mode but disabled otherwise.").."\n\n".. S("• Switch camera mode: [F7]").."\n".. -S("• Toggle Cinematic Mode: [F8]").."\n".. S("• Zoom: [Z]"), images = {{image="doc_basics_camera_ego.png"}, {image="doc_basics_camera_behind.png"}, {image="doc_basics_camera_front.png"}} }}) @@ -273,7 +266,7 @@ doc.add_entry("basics", "nodes", { name = S("Blocks"), data = { text = -S("The world of MineClone 2 is made entirely out of blocks (voxels, to be precise). Blocks can be added or removed with the correct tools.").."\n\n".. +S("The world is made entirely out of blocks (voxels, to be precise). Blocks can be added or removed with the correct tools.").."\n\n".. S("Blocks can have a wide range of different properties which determine mining times, behavior, looks, shape, and much more. Their properties include:").."\n\n".. @@ -287,11 +280,11 @@ S("• Group memberships: Group memberships are used to determine mining propert images = {{image="doc_basics_nodes.png"}} }}) --- TODO: Oh jeez, this explanation is WAY too difficult. Maybe we need to find some way to make it easier to understand. doc.add_entry("basics", "mine", { name = S("Mining"), data = { text = +-- Text changed for MCL2 S("Mining (or digging) is the process of breaking blocks to remove them. To mine a block, point it and hold down the left mouse button until it breaks.").."\n\n".. S("Blocks require a mining tool to be mined. Different blocks are mined by different mining tools, and some blocks can not be mined by any tool. Blocks vary in hardness and tools vary in strength. Mining tools will wear off over time. The mining time and the tool wear depend on the block and the mining tool. The fastest way to find out how efficient your mining tools are is by just trying them out on various blocks. Any items you gather by mining will drop on the ground, ready to be collected.") .. "\n\n".. @@ -301,7 +294,6 @@ S("• Always drops itself (the usual case)").."\n".. S("• Always drops the same items").."\n".. S("• Drops items based on probability").."\n".. S("• Drops nothing"), - images = {{image="doc_basics_tools_mining.png"}}, }}) doc.add_entry("basics", "build", { @@ -327,19 +319,19 @@ doc.add_entry("basics", "liquids", { S("Liquids are special dynamic blocks. Liquids like to spread and flow to their surrounding blocks. Players can swim and drown in them.").."\n\n".. S("Liquids usually come in two forms: In source form (S) and in flowing form (F).").."\n".. -S("Liquid sources have the shape of a full cube. A liquid source will generate flowing liquids around it from time to time, and, if the liquid is renewable, it also generates liquid sources. A liquid source can sustain itself. A long it is left alone, a liquid source will normally keep its place and does not drain out.").."\n".. +S("Liquid sources have the shape of a full cube. A liquid source will generate flowing liquids around it from time to time, and, if the liquid is renewable, it also generates liquid sources. A liquid source can sustain itself. As long it is left alone, a liquid source will normally keep its place and does not drain out.").."\n".. S("Flowing liquids take a sloped form. Flowing liquids spread around the world until they drain. A flowing liquid can not sustain itself and always comes from a liquid source, either directly or indirectly. Without a liquid source, a flowing liquid will eventually drain out and disappear.").."\n".. S("All liquids share the following properties:").."\n".. -S("• All properties of blocks (including drowning damage").."\n".. +S("• All properties of blocks (including drowning damage)").."\n".. S("• Renewability: Renewable liquids can create new sources").."\n".. S("• Flowing range: How many flowing liquids are created at maximum per liquid source, it determines how far the liquid will spread. Possible are ranges from 0 to 8. At 0, no flowing liquids will be created. Image 5 shows a liquid of flowing range 2").."\n".. S("• Viscosity: How slow players move through it and how slow the liquid spreads").."\n\n".. -S("Renewable liquids create new liquid sources at open spaces (image 2). A new liquid source is created when:\ -• Two renewable liquid blocks of the same type touch each other diagonally\ -• These blocks are also on the same height\ -• One of the two “corners” is open space which allows liquids to flow in").."\n\n".. +S("Renewable liquids create new liquid sources at open spaces (image 2). A new liquid source is created when:").."\n".. +S("• Two renewable liquid blocks of the same type touch each other diagonally").."\n".. +S("• These blocks are also on the same height").."\n".. +S("• One of the two “corners” is open space which allows liquids to flow in").."\n\n".. S("When those criteria are met, the open space is filled with a new liquid source of the same type (image 3).").."\n\n".. @@ -377,16 +369,17 @@ S("To craft something, you need one or more items, a crafting grid (C) and a cra S("To complete the craft, take the result item from the output slot, which will consume items from the crafting grid and creates a new item. It is not possible to place items into the output slot.").."\n\n".. -S("A description on how to craft an item is called a “crafting recipe”. These crafting recipes can be found in the crafting guide which you can access from the inventory menu.").."\n\n".. +S("A description on how to craft an item is called a “crafting recipe”. You need this knowledge to craft. There are multiple ways to learn crafting recipes. One way is by using a crafting guide, which contains a list of available crafting recipes. Some games provide crafting guides. There are also some mods which you can download online for installing a crafting guide. Another way is by reading the online manual of the game (if one is available).").."\n\n".. S("Crafting recipes consist of at least one input item and exactly one stack of output items. When performing a single craft, it will consume exactly one item from each stack of the crafting grid, unless the crafting recipe defines replacements.").."\n\n".. -S("There are multiple types of crafting recipes:\ -\ -• Shaped (image 2): Items need to be placed in a particular shape\ -• Shapeless (images 3 and 4): Items need to be placed somewhere in input (both images show the same recipe)\ -• Cooking: Explained in “Basics > Cooking”\ -• Repairing (image 5): Place two damaged tools into the crafting grid anywhere to get a tool which is repaired by 5%.").."\n\n".. +S("There are multiple types of crafting recipes:").."\n\n".. + +S("• Shaped (image 2): Items need to be placed in a particular shape").."\n".. +S("• Shapeless (images 3 and 4): Items need to be placed somewhere in input (both images show the same recipe)").."\n".. +S("• Cooking: Explained in “Basics > Cooking”").."\n".. +-- MCL2 change: call out specific repair percentage +S("• Repairing (image 5): Place two damaged tools into the crafting grid anywhere to get a tool which is repaired by 5%").."\n\n".. S("In some crafting recipes, some input items do not need to be a concrete item, instead they need to be a member of a group (see “Basics > Groups”). These recipes offer a bit more freedom in the input items. Images 6-8 show the same group-based recipe. Here, 8 items of the “stone” group are required, which is true for all of the shown items.").."\n\n".. @@ -402,7 +395,7 @@ doc.add_entry("basics", "cook", { name = S("Cooking"), data = { text = -S("Cooking (or smelting) is a form of crafting which does not involve a crafting grid. Cooking is done with a furnace, an cookable item, a fuel item and time in order to yield a new item.").."\n\n".. +S("Cooking (or smelting) is a form of crafting which does not involve a crafting grid. Cooking is done with a special block (like a furnace), an cookable item, a fuel item and time in order to yield a new item.").."\n\n".. S("Each fuel item has a burning time. This is the time a single item of the fuel keeps a furnace burning.").."\n\n".. @@ -413,12 +406,12 @@ doc.add_entry("basics", "hotbar", { name = S("Hotbar"), data = { text = -S("At the bottom of the screen you see some squares. This is called the “hotbar”. The hotbar allows you to quickly access the lowest row of items in the player inventory.").."\n".. -S("You can change the selected item with the mouse wheel or the number keys.").."\n\n".. +S("At the bottom of the screen you see some squares. This is called the “hotbar”. The hotbar allows you to quickly access the first items from your player inventory.").."\n".. +S("You can change the selected item with the mouse wheel or the keyboard.").."\n\n".. -S("• Select previous item in hotbar: [Mouse wheel up]").."\n".. -S("• Select next item in hotbar: [Mouse wheel down]").."\n".. -S("• Select item in hotbar directly: [0]-[9]").."\n\n".. +S("• Select previous item in hotbar: [Mouse wheel up] or [B]").."\n".. +S("• Select next item in hotbar: [Mouse wheel down] or [N]").."\n".. +S("• Select item in hotbar directly: [1]-[9]").."\n\n".. S("The selected item is also your wielded item."), images = {{image="doc_basics_hotbar.png"}, {image="doc_basics_hotbar_relations.png"}}, @@ -448,7 +441,7 @@ S("• Toggle minimap rotation mode: [Shift]+[F9]"), }}) doc.add_entry("basics", "inventory", { - name="Inventory", + name=S("Inventory"), data = { text = S("Inventories are used to store item stacks. There are other uses, such as crafting. An inventory consists of a rectangular grid of item slots. Each item slot can either be empty or hold one item stack. Item stacks can be moved freely between most slots.").."\n".. @@ -460,11 +453,12 @@ S("Inventory controls:").."\n\n".. S("Taking: You can take items from an occupied slot if the cursor holds nothing.").."\n".. S("• Left click: take entire item stack").."\n".. S("• Right click: take half from the item stack (rounded up)").."\n".. -S("• Middle click: take 10 items from the item stack").."\n\n".. +S("• Middle click: take 10 items from the item stack").."\n".. +S("• Mouse wheel down: take 1 item from the item stack").."\n\n".. S("Putting: You can put items onto a slot if the cursor holds 1 or more items and the slot is either empty or contains an item stack of the same item type.").."\n".. S("• Left click: put entire item stack").."\n".. -S("• Right click: put 1 item of the item stack").."\n".. +S("• Right click or mouse wheel up: put 1 item of the item stack").."\n".. S("• Middle click: put 10 items of the item stack").."\n\n".. S("Exchanging: You can exchange items if the cursor holds 1 or more items and the destination slot is occupied by a different item type.").."\n".. @@ -480,23 +474,15 @@ S("• Sneak+Left click: Automatically transfer item stack"), doc.add_entry("advanced", "online", { name = S("Online help"), data = { text= -S("You may want to check out these online resources related to MineClone 2.").."\n\n".. +S("You may want to check out these online resources related to Minetest:").."\n\n".. -S("MineClone 2 download and forum discussion: ").."\n".. -S("Here you find the most recent version of MineClone 2 and can discuss it.").."\n\n".. +S("Official homepage of Minetest: ").."\n".. +S("The main place to find the most recent version of Minetest.").."\n\n".. -S("Bug tracker: ").."\n".. -S("Report bugs here.").."\n\n\n\n".. +S("Community wiki: ").."\n".. +S("A community-based documentation website for Minetest. Anyone with an account can edit it! It also features a documentation of Minetest Game.").."\n\n".. -S("Minetest links:").."\n".. - -S("Official homepage of Minetest: ").."\n".. -S("The main place to find the most recent version of Minetest, the engine used by MineClone 2.").."\n\n".. - -S("Community wiki: ").."\n".. -S("A community-based documentation website for Minetest. Anyone with an account can edit it.").."\n\n".. - -S("Minetest forums: ").."\n".. +S("Web forums: ").."\n".. S("A web-based discussion platform where you can discuss everything related to Minetest. This is also a place where player-made mods and games are published and discussed. The discussions are mainly in English, but there is also space for discussion in other languages.").."\n\n".. S("Chat: ").."\n".. @@ -554,7 +540,7 @@ S("• Craftitem: An item which is (primarily or only) used for crafting").."\n\ S("Gameplay:").."\n".. S("• “heart”: A single health symbol, indicates 2 HP").."\n".. S("• “bubble”: A single breath symbol, indicates 1 BP").."\n".. -S("• HP: Hit point (equals a half “heart”)").."\n".. +S("• HP: Hit point (equals half 1 “heart”)").."\n".. S("• BP: Breath point, indicates breath when diving").."\n".. S("• Mob: Computer-controlled enemy").."\n".. S("• Crafting: Combining multiple items to create new ones").."\n".. @@ -577,7 +563,6 @@ S("• Protection: Mechanism to own areas of the world, which only allows the ow S("Technical terms:").."\n".. S("• Minetest: This game engine").."\n".. -S("• MineClone 2: What you play right now").."\n".. S("• Minetest Game: A game for Minetest by the Minetest developers").."\n".. S("• Game: A complete playing experience to be used in Minetest; such as a game or sandbox or similar").."\n".. S("• Mod: A single subsystem which adds or modifies functionality; is the basic building block of games and can be used to further enhance or modify them").."\n".. @@ -594,16 +579,21 @@ S("There is a large variety of settings to configure Minetest. Pretty much every S("These are a few of the most important gameplay settings:").."\n\n".. S("• Damage enabled (enable_damage): Enables the health and breath attributes for all players. If disabled, players are immortal").."\n".. -S("• Creative Mode (creative_mode): Enables sandbox-style gameplay focusing on creativity rather than a challenging gameplay. Changes include: Instant digging, easy access to almost all items, tools never wear off, etc.").."\n".. +S("• Creative Mode (creative_mode): Enables sandbox-style gameplay focusing on creativity rather than a challenging gameplay. The meaning depends on the game; usual changes are: Reduced dig times, easy access to almost all items, tools never wear off, etc.").."\n".. S("• PvP (enable_pvp): Short for “Player vs Player”. If enabled, players can deal damage to each other").."\n\n".. -S("For a full list of all available settings, use the “Advanced settings” dialog in the main menu.") +S("For a full list of all available settings, use the “All Settings” dialog in the main menu.") }}) doc.add_entry("advanced", "movement_modes", { name = S("Movement modes"), data = { text = -S("If you have the required privileges, you can use up to three special movement modes. Using these may be considered cheating.").."\n\n".. +S("You can enable some special movement modes that change how you move.").."\n\n".. + +S("Pitch movement mode:").."\n".. +S("• Description: If this mode is activated, the movement keys will move you relative to your current view pitch (vertical look angle) when you're in a liquid or in fly mode.").."\n".. +S("• Default key: [L]").."\n".. +S("• No privilege required").."\n\n".. S("Fast mode:").."\n".. S("• Description: Allows you to move much faster. Hold down the the “Use” key [E] to move faster. In the client configuration, you can further customize fast mode.").."\n".. @@ -712,7 +702,7 @@ S("Players with the “privs” privilege can modify privileges at will:").."\n\ S("• /grant : Grant to ").."\n".. S("• /revoke : Revoke from ").."\n\n".. -S("In single-player mode, you can use “/grant singleplayer all” to unlock all abilities (which is often considered cheating).") +S("In single-player mode, you can use “/grantme all” to unlock all abilities.") }}) doc.add_entry("basics", "light", { @@ -723,7 +713,7 @@ S("As the world is entirely block-based, so is the light in the world. Each bloc S("There are two types of light: Sunlight and artificial light.").."\n\n".. S("Artificial light is emitted by luminous blocks. Artificial light has a light level from 1-14.").."\n".. -S("Sunlight is the brightest light and always goes perfectly straight down from the sky at each time of the day. blocks. At night, the sunlight will become moonlight instead, which still provides a small amount of light. The light level of sunlight is 15.").."\n\n".. +S("Sunlight is the brightest light and always goes perfectly straight down from the sky at each time of the day. At night, the sunlight will become moonlight instead, which still provides a small amount of light. The light level of sunlight is 15.").."\n\n".. S("Blocks have 3 levels of transparency:").."\n\n".. @@ -757,101 +747,7 @@ S("• Follow the sun, then go right: Z increases").."\n".. S("• Follow the sun, then go left: Z decreases").."\n".. S("• The side length of a full cube is 1").."\n\n".. -S("You can view your current position in the debug screen (open with [F5]). This is considered cheating in some games.") -}}) - -doc.add_entry("advanced", "creative", { - name = S("Creative Mode"), - data = { text = -S("Enabling Creative Mode in MineClone 2 applies the following changes:").."\n\n".. - -S("• You keep the things you've placed").."\n".. -S("• Creative inventory is available to obtain most items easily").."\n".. -S("• Hand breaks all default blocks instantly").."\n".. -S("• Greatly increased hand pointing range").."\n".. -S("• Mined blocks don't drop items").."\n".. -S("• Items don't get used up").."\n".. -S("• Tools don't wear off").."\n".. -S("• You can eat food whenever you want").."\n".. -S("• You can always use the minimap").."\n\n".. - -S("Damage is not affected by Creative Mode, it needs to be disabled seperately.") -}}) - -doc.add_entry("basics", "mobs", { - name = S("Mobs"), - data = { text = -S("Mobs are the living beings in the world. This includes animals and monsters.").."\n\n".. - -S("Mobs appear randomly throughout the world. This is called “spawning”. Each mob kind appears on particular block types at a given light level. The height also plays a role. Peaceful mobs tend to spawn at daylight while hostile ones prefer darkness. Most mobs can spawn on any solid block but some blocks only spawn on particular blocks (like grass blocks).").."\n\n".. - -S("Like players, mobs have hit points and sometimes armor points, too (which means you need better weapons to deal any damage at all). Also like players, hostile mobs can attack directly or at a distance. Mobs may drop random items after they die.").."\n\n".. - -S("Most animals roam the world aimlessly while most hostile mobs hunt players. Animals can be fed, tamed and bred.") -}}) - -doc.add_entry("basics", "animals", { - name = S("Animals"), - data = { text = -S("Animals are peaceful beings which roam the world aimlessly. You can feed, tame and breed them.").."\n\n".. - -S("Feeding:").."\n".. -S("Each animal has its own taste for food and doesn't just accept any food. To feed, hold an item in your hand and rightclick the animal.").."\n".. -S("Animals are attraced to the food they like and follow you as long you hold the food item in hand.").."\n".. -S("Feeding an animal has three uses: Taming, healing and breeding.").."\n".. -S("Feeding heals animals instantly, depending on the quality of the food item.").."\n\n".. - -S("Taming:").."\n".. -S("A few animals can be tamed. You can generally do more things with tamed animals and use other items on them. For example, tame horses can be saddled and tame wolves fight on your side.").."\n\n".. - -S("Breeding:").."\n".. -S("When you have fed an animal up to its maximum health, then feed it again, you will activate “Love Mode” and many hearts appear around the animal.").."\n".. -S("Two animals of the same species will start to breed if they are in Love Mode and close to each other. Soon a baby animal will pop up.").."\n\n".. - -S("Baby animals:").."\n".. -S("Baby animals are just like their adult couterparts, but they can't be fed, tamed or bred and don't drop anything when they die. They grow to adults after a short time.") - -}}) - -doc.add_entry("basics", "hunger", { - name = S("Hunger"), - data = { text = -S("Hunger affects your health and your ability to sprint. Hunger is not in effect when damage is disabled.").."\n\n".. - -S("Core hunger rules:").."\n\n".. -S("• You start with 20/20 hunger points (more points = less hungry)").."\n".. -S("• Actions like combat, jumping, sprinting, etc. decrease hunger points").."\n".. -S("• Food restores hunger points").."\n".. -S("• If your hunger bar decreases, you're hungry").."\n".. -S("• At 18-20 hunger points, you regenerate 1 HP every 4 seconds").."\n".. -S("• At 6 hunger points or less, you can't sprint").."\n".. -S("• At 0 hunger points, you lose 1 HP every 4 seconds (down to 1 HP)").."\n".. -S("• Poisonous food decreases your health").."\n\n".. - - -S("Details:").."\n\n".. -S("You have 0-20 hunger points, indicated by 20 drumstick half-icons above the hotbar. You also have an invisible attribute: Saturation.").."\n".. -S("Hunger points reflect how full you are while saturation points reflect how long it takes until you're hungry again.").."\n\n".. - -S("Each food item increases both your hunger level as well your saturation.").."\n".. -S("Food with a high saturation boost has the advantage that it will take longer until you get hungry again.").."\n".. -S("A few food items might induce food poisoning by chance. When you're poisoned, the health and hunger symbols turn sickly green. Food poisoning drains your health by 1 HP per second, down to 1 HP. Food poisoning also drains your saturation. Food poisoning goes away after a while or when you drink milk.").."\n\n".. - -S("You start with 5 saturation points. The maximum saturation is equal to your current hunger level. So with 20 hunger points your maximum saturation is 20. What this means is that food items which restore many saturation points are more effective the more hunger points you have. This is because at low hunger levels, a lot of the saturation boost will be lost due to the low saturation cap.").."\n".. -S("If your saturation reaches 0, you're hungry and start to lose hunger points. Whenever you see the hunger bar decrease, it is a good time to eat.").."\n\n".. - -S("Saturation decreases by doing things which exhaust you (highest exhaustion first):").."\n".. -S("• Regenerating 1 HP").."\n".. -S("• Suffering food poisoning").."\n".. -S("• Sprint-jumping").."\n".. -S("• Sprinting").."\n".. -S("• Attacking").."\n".. -S("• Taking damage").."\n".. -S("• Swimming").."\n".. -S("• Jumping").."\n".. -S("• Mining a block").."\n\n".. - -S("Other actions, like walking, do not exaust you.") - +S("You can view your current position in the debug screen (open with [F5]).") }}) +dofile(minetest.get_modpath(minetest.get_current_modname()).."/mcl_extension.lua") diff --git a/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.de.tr b/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.de.tr new file mode 100644 index 000000000..236d5a6bb --- /dev/null +++ b/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.de.tr @@ -0,0 +1,511 @@ +# textdomain: mcl_doc_basics +Basics=Grundlagen +Everything you need to know to get started with playing=Alles, was Sie zum Spielen wissen sollten +Advanced usage=Fortgeschrittenes +Advanced information which may be nice to know, but is not crucial to gameplay=Fortgeschrittene Informationen, die nett zu wissen sind, aber nicht kritisch für das reguläre Spiel +Quick start=Schnellstart +This is a very brief introduction to the basic gameplay:=Hier ist eine sehr kurze Einführung ins Spiel: +• Move mouse to look=• Mausbewegung zum Umsehen +• [W], [A], [S] and [D] to move=• [W], [A], [S] und [D] zum Bewegen +• [E] to sprint=• [E] zum Sprinten +• [Space] to jump or move upwards=• [Leertaste] zum Springen oder für Aufwärtsbewegung +• [Shift] to sneak or move downwards=• [Umschalt] zum Schleichen oder für Abwärtsbewegung +• Mouse wheel or [1]-[9] to select item=• Mausrad oder [1]-[9], um Gegenstand zu wählen +• Left-click to mine blocks or attack=• Linksklick, um Blöcke abzubauen oder anzugreifen +• Recover from swings to deal full damage=• Warten Sie Schwünge ganz ab, um vollen Schaden anzurichten +• Right-click to build blocks and use things=• Rechtsklick, um Blöcke zu bauen und Dinge zu benutzen +• [I] for the inventory=• [I] für das Inventar +• First items in inventory appear in hotbar below=• Die ersten Gegenstände im Inventar tauchen in der Schnellleiste unten auf +• [F9] for the minimap=• [F9] für die Übersichtskarte +• Put items into crafting grid (usually 3×3 grid) to craft=• Legen Sie Gegenstände ins Fertigungsgitter (normalerweise 3×3-Gitter) zum Fertigen +• Use a crafting guide mod to learn crafting recipes or visit =• Benutzen Sie eine Mod mit Fertigungsführer, um die Fertigungsrezepte zu erlernen oder besuchen Sie +• Read entries in this help to learn the rest=• Lesen Sie Einträge in dieser Hilfe, um den Rest zu lernen +• [Esc] to close this window=• [Esc], um dieses Fenster zu schließen +How to play:=Spielanleitung +• Punch a tree trunk until it breaks and collect wood=• Hauen Sie einen Baumstamm, bis er bricht und sammeln Sie Holz auf +• Place the wood into the 2×2 grid (your “crafting grid”) in your inventory menu and craft 4 wood planks=• Platzieren Sie das Holz in das 2×2-Gitter (Ihr „Fertigungsgitter) in Ihrem Inventar und fertigen Sie 4 Holzplanken +• Place them in a 2×2 shape in the crafting grid to craft a crafting table=• Platzieren Sie sie in eine 2×2-Form im Fertigungsgitter, um eine Werkbank zu errichten +• Place the crafting table on the ground=• Platzieren Sie die Werkbank auf den Boden +• Rightclick it for a 3×3 crafting grid=• Rechtsklicken Sie sie für ein 3×3-Fertigungsgitter +• Use the crafting guide (book icon) to learn all the possible crafting recipes=• Benutzen Sie den Fertigungsführer (Buchsymbol), um die möglichen Fertigungsrezepte zu lernen +• Craft a wooden pickaxe so you can dig stone=• Fertigen Sie eine Holzspitzhacke, damit Sie Stein graben können +• Different tools break different kinds of blocks. Try them out!=• Verschiedene Werkzeuge können verschiedene Blöcke brechen. Probieren Sie einfach! +• Read entries in this help to learn the rest=• Lesen Sie Einträge in dieser Hilfe, um den Rest zu lernen +• Continue playing as you wish. There's no goal. Have fun!=• Spielen Sie weiter, so wie sie wollen. Es gibt kein Ziel. Viel Spaß! +Minetest=Minetest +Minetest is a free software game engine for games based on voxel gameplay, inspired by InfiniMiner, Minecraft, and the like. Minetest was originally created by Perttu Ahola (alias “celeron55”).=Minetest ist eine freie Spiel-Engine für Spiele auf Voxelbasis, inspiriert von InfiniMiner, Minecraft, und so weiter. Minetest wurde ursprünglich erfunden von Perttu Ahola (alias „celeron55“). +The player is thrown into a huge world made out of cubes or blocks. These cubes usually make the landscape they blocks can be removed and placed almost entirely freely. Using the collected items, new tools and other items can be crafted. Games in Minetest can, however, be much more complex than this.=Der Spieler wird in eine große Welt aus Würfeln bzw. Blöcken geworfen. Aus diesen Würfeln besteht die Landschaft; sie können aufgesammelt und wieder platziert werden. Mit den aufgesammelten Gegenständen können neue Werkzeuge und andere Dinge gefertigt werden. Spiele in Minetest können aber viel komplexer sein. +A core feature of Minetest is the built-in modding capability. Mods modify existing gameplay. They can be as simple as adding a few decorational blocks or be very complex by e.g. introducing completely new gameplay concepts, generating a completely different kind of world, and many other things.=Ein Hauptfeature in Minetest ist die eingebaute Modding-Funktionalität. Mods ändern das bestehende Spielgeschehen ab. Sie können recht einfach sein und einfach nur ein paar dekorative Blöcke hinzufügen oder sie können sehr komplex sein, indem sie z.B. völlig neue Spielkonzepte einführen, eine ganz andere Art Welt erschaffen, und viele andere Dinge. +Minetest can be played alone or online together with multiple players. Online play will work out of the box with any mods, with no need for additional software as they are entirely provided by the server.=Minetest kann alleine oder online mit mehreren Spielern gespielt werden. Das Onlinespiel funktioniert mit beliebigen Mods, es muss keine Zusatzsoftware installiert werden, da die Mods komplett vom Server zur Verfügung gestellt werden. +Minetest is usually bundled with a simple default game, named “Minetest Game” (shown in images 1 and 2). You probably already have it. Other games for Minetest can be downloaded from the official Minetest forums .=Minetest wird normalerweise mit einem einfachen Standardspiel ausgeliefert, es heißt „Minetest Game“ (siehe Bilder 1 und 2). Sie haben es vielleicht schon. Andere Spiele für Minetest können von den offiziellen Minetest-Foren heruntergeladen werden. +Sneaking=Schleichen +Sneaking makes you walk slower and prevents you from falling off the edge of a block.=Schleichen verlangsamt Ihre Schritte und hindert Sie daran, vom Rand eines Blocks zu fallen. +To sneak, hold down the sneak key (default: [Shift]). When you release it, you stop sneaking. Careful: When you release the sneak key at a ledge, you might fall!=Zum Schleichen halten Sie die Schleichtaste (Standard: [Umschalt]) gedrückt. Lassen Sie sie los, um nicht mehr zu schleichen. Vorsicht: Wenn sie die Taste an einer Kante loslassen, könnten sie stürzen! +• Sneak: [Shift]=• Schleichen [Umschalt] +Sneaking only works when you stand on solid ground, are not in a liquid and don't climb.=Schleichen funktioniert nur, wenn Sie auf festem Boden stehen, sich nicht in einer Flüssigkeit befinden und nicht klettern. +Sneaking might be disabled by mods. In this case, you still walk slower by sneaking, but you will no longer be stopped at ledges.=Schleichen kann von Mods deaktiviert werden. In diesem Fall gehen Sie immer noch langsamer, aber Sie werden an Kanten nicht mehr anhalten. +Controls=Steuerung +These are the default controls:=Dies ist die Standardsteuerung: +Basic movement:=Bewegen: +• Moving the mouse around: Look around=• Mausbewegung: Umsehen +• W: Move forwards=• W: Vorwärts +• A: Move to the left=• A: Links +• D: Move to the right=• D: Rechts +• S: Move backwards=• S: Rückwärts +• E: Sprint=• E: Sprint +While standing on solid ground:=Auf festem Boden: +• Space: Jump=• Leertaste: Springen +• Shift: Sneak=• Umschalt: Schleichen +While on a ladder, swimming in a liquid or fly mode is active=An einer Leiter, beim Tauchen oder im Flugmodus: +• Space: Move up=• Leertaste: Hoch +• Shift: Move down=• Umschalt: Runter +Extended movement (requires privileges):=Erweiterte Bewegung (benötigt Privilegien): +• J: Toggle fast mode, makes you run or fly fast (requires “fast” privilege)=• J: Schnellmodus, damit laufen oder fliegen Sie schneller (benötigt das „fast“-Privileg) +• K: Toggle fly mode, makes you move freely in all directions (requires “fly” privilege)=• K: Flugmodus, damit fliegen Sie frei in alle Richtungen (benötigt das „fly“-Privileg) +• H: Toggle noclip mode, makes you go through walls in fly mode (requires “noclip” privilege)=• H: Geistmodus, damit fliegen durch Wände im Flugmodus (benötigt das „noclip“-Privileg) +• E: Walk fast in fast mode=• E: Schnell im Schnellmodus gehen +World interaction:=Weltinteraktion: +• Left mouse button: Punch / mine blocks=• Linke Maustaste: Schlagen / Blöcke abbauen +• Right mouse button: Build or use pointed block=• Rechte Maustaste: Bauen oder gezeigten Block benutzen +• Shift+Right mouse button: Build=• Umschalt+Rechte Maustaste: Bauen +• Roll mouse wheel / B / N: Select next/previous item in hotbar=• Mausrad drehen / B / N: Nächten/vorherigen Gegenstand in Schnellleiste wählen +• 0-9: Select item in hotbar directly=• 0-9: Gegenstand in Schnellleiste direkt wählen +• Q: Drop item stack=• Q: Gegenstandsstapel wegwerfen +• Shift+Q: Drop 1 item=• Umschalt+Q: 1 Gegenstand wegwerfen +• I: Show/hide inventory menu=• I: Inventarmenü zeigen/verbergen +Inventory interaction:=Inventarinteraktion: +See the entry “Basics > Inventory”.=Siehe Eintrag „Grundlagen > Inventar“. +Camera:=Kamera: +• Z: Zoom=• Z: Zoom +• F7: Toggle camera mode=• F7: Kameramodus wechseln +• F8: Toggle cinematic mode=• F8: Kinomodus umschalten +Interface:=Benutzeroberfläche: +• Esc: Open menu window (pauses in single-player mode) or close window=• Esc: Menüfenster öffnen (pausiert im Einzelspielermodus) oder Fenster schließen +• F1: Show/hide HUD=• F1: Oberfläche zeigen/verbergen +• F2: Show/hide chat=• F2: Chat zeigen/verbergen +• F9: Toggle minimap=• F9: Übersichtskarte umschalten +• Shift+F9: Toggle minimap rotation mode=• Umschalt+F9: Rotationsmodus der Übersichtskarte wechseln +• F10: Open/close console/chat log=• F10: Konsole/Chatprotokoll öffnen/schließen +• F12: Take a screenshot=• Bildschirmfoto machen +Server interaction:=Serverinteraktion: +• T: Open chat window (chat requires the “shout” privilege)=• T: Chatfenster öffnen (Chat benötigt das „shout“-Privileg) +• /: Start issuing a server command=• Einen Serverbefehl eingeben +Technical:=Technisches: +• R: Toggle far view (disables all fog and allows viewing far away, can make game very slow)=• Weite Sicht (deaktiviert Nebel und erlaubt sehr weite Sicht, kann das Spiel enorm verlangsamen) +• +: Increase minimal viewing distance=• +: Minimale Sichtweite erhöhen +• -: Decrease minimal viewing distance=• -: Minimale Sichtweite verringern +• F3: Enable/disable fog=• F3: Nebel umschalten +• F5: Enable/disable debug screen which also shows your coordinates=• F5: Debug-Anzeige umschalten, was auch Ihre Koordinaten anzeigt +• F6: Only useful for developers. Enables/disables profiler=• F6: Nur nützlich für Entwickler. Schaltet die Profiler-Anzeige um +Players=Spieler +Players (actually: “player characters”) are the characters which users control.=Spieler (genauer: „Spielerfiguren“) sind die Figuren, die die Benutzer steuern. +Players are living beings. They start with a number of health points (HP) and a number of breath points (BP).=Spieler sind Lebewesen. Sie starten mit ein paar Trefferpunkten (TP) und ein paar Atempunkten (AP). +Players are capable of walking, sneaking, jumping, climbing, swimming, diving, mining, building, fighting and using tools and blocks.=Spieler können gehen, schleichen, springen, klettern, tauchen, graben, bauen, kämpfen und Werkzeuge und Blöcke benutzen. +At a health of 0, the player dies. The player can just respawn in the world.=Fällt die Gesundheit auf 0, stirbt der Spieler. Der Spieler kann in der Welt einfach wieder einsteigen. +Other consequences of death depend on the game. The player could lose all items, or lose the round in a competitive game.=Andere Konsequenzen des Todes hängen vom Spiel ab. Der Spieler könnte seinen Besitz verlieren oder eine Runde in einem Wettbewerb verlieren. +Some blocks reduce breath. While being with the head in a block which causes drowning, the breath points are reduced by 1 for every 2 seconds. When all breath is gone, the player starts to suffer drowning damage. Breath is quickly restored in any other block.=Einige Blöcke reduzieren den Atem. In einem Block, der den Atem reduziert, werden die Atempunkte um 1 alle 2 Sekunden reduziert. Wenn der Atem verbraucht ist, erleidet der Spieler Schaden durch Ertrinken. Der Atem wird in jedem anderen Block rasch wiederhergestellt. +Damage can be disabled on any world. Without damage, players are immortal and health and breath are unimportant.=Schaden kann in jeder Welt ausgeschaltet werden. Ohne Schaden sind Spieler unsterblich und Gesundheit und Atem spielen keine Rolle. +In multi-player mode, the name of other players is written above their head.=Im Mehrspielermodus steht der Name anderer Spieler über dem Kopf. +Items=Gegenstände +Items are things you can carry along and store in inventories. They can be used for crafting, smelting, building, mining, and more. Types of items include blocks, tools, weapons and items only used for crafting.=Gegenstände sind Dinge, die sie tragen und in Inventaren aufbewahren können. Sie können für die Fertigung, zum Schmelzen, Bauen, Graben und mehr verwendet werden. Zu Gegenständen zählen Blöcke, Werkzeuge und Gegenstände, die nur in der Fertigung benutzt werden. +An item stack is a collection of items of the same type which fits into a single item slot. Item stacks can be dropped on the ground. Items which drop into the same coordinates will form an item stack.=Ein Gegenstandsstapel ist eine Sammlung von gleichen Gegenständen, die in einem Inventarplatz passen. Gegenstandsstapel können auf den Boden geworfen werden. Gegenstände, die auf die gleichen Koordinaten fallen, bilden einen Gegenstandsstapel. +A dropped item stack can be collected by punching it.=Ein fallen gelassener Gegenstandsstapel kann aufgesammelt werden, indem er geschlagen wird. +Tools=Werkzeuge +Some items may serve as a tool when wielded. Any item which has some special use which can be directly used by its wielder is considered a tool.=Einige Gegenstände können als Werkzeug fungieren, wenn man sie hält. Als Werkzeug zählt jeder Gegenstand, der einen besonderen Zweck hat, der direkt vom Träger ausgelöst werden kann. +A common subset of tools is mining tools. These are important to break all kinds of blocks. Weapons are a kind of tool. There are of course many other possible tools. Special actions of tools are usually done by left-click or right-click.=Eine häufige Werkzeugart sind Grabewerkzeuge. Sie sind wichtig zum Abbauen aller möglichen Blöcke. Waffen sind eine Art Werkzeug. Es gibt natürlich viele weitere Werkzeuge. Sonderaktionen von Werkzeugen weden normalerweise mit Links- oder Rechtsklick ausgelöst. +When nothing is wielded, players use their hand which may act as tool and weapon.=Wird nichts gehalten, benutzen die Spieler ihre Hand, die als Werkzeug und Waffe herhalten kann. +Many tools will wear off when using them and may eventually get destroyed. The damage is displayed in a damage bar below the tool icon. If no damage bar is shown, the tool is in mint condition. Tools may be repairable by crafting, see “Basics > Crafting”.=Viele Werkzeuge werden sich bei Benutzung abnutzen und zerbrechen früher oder später. Der Schaden wird in einer Schadensleiste unter dem Werkzeugsymbol angezeigt. Ohne diese Leiste ist das Werkzeug wie neu. Werkzeuge kann man eventuell mit einer Fertigung reparieren. +Weapons=Waffen +Some items are usable as a melee weapon when wielded. Weapons share most of the properties of tools.=Einige Gegenstände sind als Nahkampfwaffen zu gebrauchen. Waffen teilen die meisten Eigenschaften mit Werkzeugen. +Melee weapons deal damage by punching players and other animate objects. There are two ways to attack:=Nahkampfwaffen richten Schaden an, indem Spieler und andere aktive Objekte geschlagen werden. +• Single punch: Left-click once to deal a single punch=• Einzelner Schlag: Einmal links klicken +• Quick punching: Hold down the left mouse button to deal quick repeated punches=• Schneller Schlag: Linke Maustaste gedrückt halten, um schnelle wiederholte Schläge zu machen +There are two core attributes of melee weapons:=Nahkampfwaffen haben zwei Hauptattribute: +• Maximum damage: Damage which is dealt after a hit when the weapon was fully recovered=• Höchstschaden: Schaden, der angerichtet wird, wenn die Waffe voll ausgeholt ist +• Full punch interval: Time it takes for fully recovering from a punch=• Vollschlagintervall: Zeit, die es braucht, um die Waffe nach einem Schlag wieder stabil zu halten +A weapon only deals full damage when it has fully recovered from a previous punch. Otherwise, the weapon will deal only reduced damage. This means, quick punching is very fast, but also deals rather low damage. Note the full punch interval does not limit how fast you can attack.=Eine Waffe macht nur den vollen Schaden, wenn sie voll ausgeholt ist, d.h. der letzte Schlag war lange genug her. Sonst macht die Waffe nur reduzierten Schaden. Das bedeutet, dass schnelle Schläge wirklich sehr schnell sind, aber geringen Schaden anrichten. Beachten Sie, dass das Vollschlagintervall nicht begrenzt, wie schnell Sie angreifen können. +There is a rule which sometimes makes attacks impossible: Players, animate objects and weapons belong to damage groups. A weapon only deals damage to those who share at least one damage group with it. So if you're using the wrong weapon, you might not deal any damage at all.=Es gibt eine Regel, die es manchmal unmöglich macht, Schaden anzurichten. Spieler, lebendige Objekte und Waffen gehören Schadensgruppen an. Eine Waffe macht nur Schaden auf Sachen, mit denen sie mindestens eine Schadensgruppe teilt. Wenn Sie also die falsche Waffe benutzen, können sie überhaupt keinen Schaden machen. +Pointing=Zeigen +“Pointing” means looking at something in range with the crosshair. Pointing is needed for interaction, like mining, punching, using, etc. Pointable things include blocks, players, computer enemies and objects.=„Zeigen“ bedeutet, dass man auf etwas mit dem Fadenkreuz in Reichweite schaut. Zeigen wird für die Interaktion benutzt, wie Graben, Schlagen, usw. Zu zeigbaren Dingen gehören Blöcke, Spieler, computergesteuerte Feinde und Objekte. +To point something, it must be in the pointing range (also just called “range”) of your wielded item. There's a default range when you are not wielding anything. A pointed thing will be outlined or highlighted (depending on your settings). Pointing is not possible with the 3rd person front camera.=Um auf etwas zu zeigen, muss es sich in der Zeigereichweite (kurz „Reichweite“) Ihres gehaltenen Gegenstands befinden. Es gibt eine Standardreichweite, wenn Sie nichts halten. Ein gezeigtes Ding wird umrandet oder hervorgehoben (abhängig von Ihren Einstellungen). Zeigen ist nicht möglich mit der Dritten-Person-Vorderkamera. +A few things can not be pointed. Most blocks are pointable. A few blocks, like air, can never be pointed. Other blocks, like liquids can only be pointed by special items.=Ein paar Dinge können nicht gezeigt werden. Die meisten Blöcke sind zeigbar. Ein paar Blöcke, wie Luft, können niemals gezeigt werden. Andere Blöcke, wie Flüssigkeiten können nur von besonderen Gegenständen gezeigt werden. +Camera=Kamera +You can change the camera mode by pressing [F7].=Sie wechseln den Kameramodus mit [F7]. +You might be able to zoom with [Z] to zoom the view at the crosshair. This allows you to look further.=Sie sind eventuell in der Lage, mit [Z] zum Fadenkreuz hereinzuzoomen. Damit können Sie weiter sehen. +Zooming is a gameplay feature that might be enabled or disabled by the game. By default, zooming is enabled when in Creative Mode but disabled otherwise.=Zoomen ist eine Spielfunktion, die vom Spiel ein- oder ausgeschaltet werden kann. Standardmäßig ist das Zoomen im Kreativmodus erlaubt, aber sonst deaktiviert. +• Switch camera mode: [F7]=• Kameramodus wechseln: [F7] +• Zoom: [Z]=• Zoom: [Z] +Blocks=Blöcke +The world is made entirely out of blocks (voxels, to be precise). Blocks can be added or removed with the correct tools.=Die Welt besteht aus Blöcken (oder Voxeln, um genau zu sein). Blöcke können mit den richtigen Werkzeugen gebaut oder entfernt werden. +Blocks can have a wide range of different properties which determine mining times, behavior, looks, shape, and much more. Their properties include:=Blöcke haben eine Reihe an verschiedenen Eigenschaften, die die Abbauzeit, ihr Verhalten, Aussehen, Form und vieles mehr beeinflussen. Zu ihren Eigenschaften zählen: +• Collidable: Collidable blocks can not be passed through; players can walk on them. Non-collidable blocks can be passed through freely=• Kollisionsfähig: Kollisionsfähige Blöcke können nicht passiert werden, Spieler können auf ihnen gehen. Nicht kollisionsfähige Blöcke können frei passiert werden +• Pointable: Pointable blocks show a wireframe or a halo box when pointed. But you will just point through non-pointable blocks. Liquids are usually non-pointable but they can be pointed at by some special tools=• Zeigbar: Zeigbare Blöcke zeigen ein Drahtmodell oder eine scheinende Box, wenn sie gezeigt werden. Aber durch nicht-zeigbare Blöcke werden Sie hindurch zeigen. Flüssigkeiten sind üblicherweise nicht-zeigbar, aber mit besonderen Werkzeugen können sie gezeigt werden. +• Mining properties: By which tools it can be mined, how fast and how much it wears off tools=• Grabeeigenschaften: Von welchen Werkzeugen es abgebaut werden kann, wie schnell und wie stark es Werkzeuge abnutzt +• Climbable: While you are at a climbable block, you won't fall and you can move up and down with the jump and sneak keys=• Kletterbar: Wenn Sie sich an einem kletterbaren Block befinden, werden Sie nicht fallen und Sie können sich mit den Sprung- und Schleichtasten auf- und ab bewegen +• Drowning damage: See the entry “Basics > Player”=• Ertrinkenssschaden: Siehe „Grundlagen > Spieler“ +• Liquids: See the entry “Basics > Liquids”=• Flüssigkeiten: Siehe „Grundlagen > Flüssigkeiten“ +• Group memberships: Group memberships are used to determine mining properties, crafting, interactions between blocks and more=• Gruppenmitgliedschaften: Gruppenmitgliedschaften werden benutzt, um Grabeeigenschaften, Fertigungen, Interaktionen zwischen Blöcken und mehr festzulegen +Mining=Abbauen +Mining (or digging) is the process of breaking blocks to remove them. To mine a block, point it and hold down the left mouse button until it breaks.=Das Abbauen (oder Ausgraben) ist der Prozess, in dem Blöcke abgebrochen werden, um sie zu entfernen. Um einen Block abzubauen, zeigen Sie auf ihn und halten Sie die linke Maustaste, bis er bricht. +Short explanation:=Kurzerklärung: +Blocks require a mining tool to be mined. Different blocks are mined by different mining tools, and some blocks can not be mined by any tool. Blocks vary in hardness and tools vary in strength. Mining tools will wear off over time. The mining time and the tool wear depend on the block and the mining tool. The fastest way to find out how efficient your mining tools are is by just trying them out on various blocks. Any items you gather by mining will drop on the ground, ready to be collected.=Blöcke benötigen ein Grabewerkzeug, um abgebaut werden zu können. Verschiedene Blöcke werden von verschiedenen Grabewerkzeugen abgebaut und einige Blöcke können gar nicht abgebaut werden. Blöcke variieren in der Härte und Werkzeuge variieren in ihrer Stärke. Grabewerkzeuge werden sich allmählich abnutzen. Die Grabezeit und die Werkzeugabnutzung hängen vom Block und dem Grabewerkzeug ab. Die schnellste Methode, um herauszufinden, wie effizient Ihre Grabewerkzeuge sind, ist es, sie einfach an verschiedenen Blöcken auszuprobieren. Alles, was Sie aus Blöcken erhalten, wird zu Boden fallen und kann von ihnen aufgesammelt werden. +Detailed explanation:=Detaillierte Erklärung: +Mineable blocks have mining properties (based on groups) and a toughness level. Mining tools have the same properties. Each mining property of a block also has a rating, while tools can be able to break blocks within a range of ratings.=Abbaubare Blöcke haben Abbaueigenschaften (basierend auf Gruppen) und einen Härtegrad. Grabewerkzeuge haben die gleichen Eigenschaften. Jede Abbaueigenschaft eines Blocks hat auch eine Wertung; Werkzeuge hingegen können fähig sein, Blöcke mit einer Reihe von Wertungen abzubauen. +In order to mine a block, these conditions need to be met:=Um einen Block abbauen zu können, müssen diese Bedingungen erfüllt sein: +• The block and tool share at least one mining property for which they have a matching rating=• Der Block und das Werkzeug haben mindestens eine gemeinsame Abbaueigenschaft, für die sie eine gleiche Wertung haben +• The tool's toughness level is equal or greater than the block's toughness level=• Der Härtegrad des Werkzeugs ist größer oder gleich dem Härtegrad des Blocks +Example: A block with the mining property “cracky”, rating 3 and toughness level 0 can only be broken by a tool which is able to break “cracky” blocks at rating 3 and it must have a toughness level of 0 or larger.=Beispiel: Ein Block mit der Abbaueigenschaft „cracky“, Wertung 3 und Härtegrad 0 kann nur von einem Werkzeug, der Blöcke mit Eigenschaft „cracky“ bei Wertung 3 bricht, und er muss einen Härtegrad von 0 oder größer haben. +The time it takes to mine a block depends on the ratings and the toughness levels of both tool and block.=Die Zeit, die gebraucht wird, um einen Block abzubauen, hängt von den Wertungen und dem Härtegrad von sowohl dem Werkzeug als auch dem Block ab. +• The base mining time depends on the ratings of the block and the mining speed of the tool=• Die Grund-Abbauzeit hängt von den Wertungen des Blocks und der Grabegeschwindigkeit des Werkzeugs ab +• The mining speed of the tool differs for each mining property and its rating=• Die Grabezeit der Werkzeug unterscheidet sich für jede Abbaueigenschaft und ihrer Wertung +• The toughness level further modifies the mining speed for this mining property=• Der Härtegrad modifiziert die Abbaugeschwindigkeit für diese Abbaueigenschaft noch weiter +• A high difference in toughness levels decreases the mining time considerably=• Eine hohe Differenz in Härtegraden verringert die Abbauzeit beträchtlich +• If the toughness level difference is 2, the mining time is half of the base mining time=• Wenn der Härtegrad 2 ist, wird die Abbauzeit die Hälfte der Grundabbauzeit sein +• With a difference of 3, the mining time is a third, and so on=• Mit einer Differenz von 3 ist die Abbauzeit ein Drittel, und so weiter +The item help shows the mining times of a tool listed by its mining properties and its ratings. The mining times are often expressed as a range. The low number stands for the mining time for toughness level 0 and the high number for the highest level the tool can mine.=Die Gegenstandshilfe zeigt die Abbauzeiten eines Werkzeuges unterteilt nach seinen Abbaueigenschaften und -wertungen. Die Abbauzeiten werden oft als Intervall angegeben. Die niedrige Zahl steht für die Abbauzeit mit Härtegrad 0 und die hohe Zahl für den höchstmöglichen Härtegrad, der vom Werkzeug abgebaut werden kann. +Mining usually wears off tools. Each time you mine a block, your tool takes some damage until it is destroyed eventually. The wear per mined block is determined by the difference between the tool's toughness level and the block's toughness level. The higher the difference, the lower the wear. This means:=Abbauen nutzt Werkzeuge üblicherweise ab. Jedes mal, wenn Sie einen Block abbauen, nimmt Ihr Werkzeug etwas Schaden, bis es zerstört ist. Die Abnutzung pro abgebautem Block hängt ab von der Differenz zwischen dem Härtegrad des Werkzeugs und dem Härtegrad des Blocks. Je größer die Differenz, desto niedriger die Abnutzung. Das bedeutet: +• High-level blocks wear off your tools faster=• Blöcke mit hohem Härtegrad nutzen Ihre Werkzeuge schneller ab +• You can use high-level tools to compensate this=• Sie können hochgradige Werkzeuge benutzen, um dies zu kompensieren +• The highest wear is caused when the level of both tool and block are equal=• Die höchste Abnutzung tritt ein, wenn der Härtegrad von Werkzeug und Block gleich sind +After mining, a block may leave a “drop” behind. This is a number of items you get after mining. Most commonly, you will get the block itself. There are other possibilities for a drop which depends on the block type. The following drops are possible:=Nach dem Abbauen kann ein Block etwas abwerfen. Das sind ein paar Gegenstände, die Sie nach dem Abbauen erhalten können. Üblicherweise erhalten Sie den Block selbst. Es gibt andere Möglichkeiten für einen Abwurf, der vom Blocktyp abhängt. Die folgenden Abwürfe sind möglich: +• Always drops itself (the usual case)=• Wirft nur sich selbst ab (der Normalfall) +• Always drops the same items=• Wirft immer die gleichen Gegenstände ab +• Drops items based on probability=• Wirft Gegenstände mit einer bestimmten Wahrscheinlichkeit ab +• Drops nothing=• Wirft nichts ab +The drop goes directly into your inventory, unless there's no more space left. In that case, the items literally drop on the floor.=Der Abwurf landet direkt in Iherem Inventar, außer, es gibt keinen Platz mehr. In diesem Fall fallen die Gegenstände zu Boden. +Building=Bauen +Almost all blocks can be built (or placed). Building is very simple and has no delay.=Fast alle Blöcke können gebaut (oder platziert) werden. Bauen ist sehr einfach und hat keine Verzögerung. +To build your wielded block, point at a block in the world and right-click. If this is not possible because the pointed block has a special right-click action, hold down the sneak key before right-clicking.=Um den gehaltenen Block zu bauen, zeigen Sie auf einen Block in der Welt und machen Sie einen Rechtsklick. Wenn dies nicht möglich ist, weil der Block eine besondere Rechtsklick-Aktion hat, halten Sie zusätzlich die Schleichen-Taste gedrückt. +Blocks can almost always be built at pointable blocks. One exception are blocks attached to the floor; these can only be built on the floor.=Blöcke können fast immer an zeigbaren Blöcken gebaut werden. Eine Ausnahme sind Blöcke, die am Boden befestigt sind; diese können nur auf dem Boden gebaut werden. +Normally, blocks are built in front of the pointed side of the pointed block. A few blocks are different: When you try to build at them, they are replaced.=Normalerweise werden Blöcke vor der gezeigten Seite des gezeigten Blocks gebaut. Ein paar Blöcke sind anders: Wenn Sie an sie anbauen, werden sie ersetzt. +Liquids=Flüssigkeiten +Liquids are special dynamic blocks. Liquids like to spread and flow to their surrounding blocks. Players can swim and drown in them.=Flüssigkeiten sind besondere dynamische Blöcke. Flüssigkeiten neigen dazu, sich auszubreiten und zu ihren Nachbarblöcken zu fließen. Spieler können in Flüssigkeiten schwimmen und ertrinken. +Liquids usually come in two forms: In source form (S) and in flowing form (F).=Flüssigkeiten gibt es normalerweise in zwei Formen: Quelle (S) und fließend (F). +Liquid sources have the shape of a full cube. A liquid source will generate flowing liquids around it from time to time, and, if the liquid is renewable, it also generates liquid sources. A liquid source can sustain itself. As long it is left alone, a liquid source will normally keep its place and does not drain out.=Flüssigkeitsquellen nehmen die Form eines ganzen Würfels an. Eine Flüssigkeitsquelle wird um sich herum fließende Flüssigkeitsquellen erzeugen und, falls die Flüssigkeit erneuerbar ist, auch Flüssigkeitsquellen erzeugen. Eine Flüssigkeitsquelle erhält sich selbst. Solange nichts passiert, wird eine Flüssigkeitsquelle normalerweise ihren Platz behalten und nicht austrocknen. +Flowing liquids take a sloped form. Flowing liquids spread around the world until they drain. A flowing liquid can not sustain itself and always comes from a liquid source, either directly or indirectly. Without a liquid source, a flowing liquid will eventually drain out and disappear.=Fließende Flüssigkeiten nehmen eine schräge Form an. Fließende Flüssigkeiten breiten sich in der Welt aus, bis sie austrocknen. Eine fließende Flüssigkeit kann sich nicht selbst erhalten und kommt immer aus einer Flüssigkeitsquelle, entweder direkt oder indirekt. Ohne einer Flüssigkeitsquelle wird eine fließende Flüssigkeit irgendwann austrocknen und verschwinden. +All liquids share the following properties:=Alle Flüssigkeiten teilen die folgenden Eigenschaften: +• All properties of blocks (including drowning damage)=• Alle Eigenschaften von Blöcken (inklusive Ertrinkensschaden) +• Renewability: Renewable liquids can create new sources=• Erneuerbarkeit: Erneuerbare Flüssigkeiten können neue Quellen erschaffen +• Flowing range: How many flowing liquids are created at maximum per liquid source, it determines how far the liquid will spread. Possible are ranges from 0 to 8. At 0, no flowing liquids will be created. Image 5 shows a liquid of flowing range 2=• Fließreichweite: Wie viele fließende Flüssigkeiten maximal je Flüssigkeitsquelle erschaffen werden; das bestimmt, wie weit die Flüssigkeit fließen wird. Mögliche Reichweiten sind zwischen 0 bis 8. Bei 0 werden keine fließenden Flüssigkeiten erzeugt. Bild 5 zeigt eine Flüssigkeit mit einer Fließreichweite von 2. +• Viscosity: How slow players move through it and how slow the liquid spreads=• Zähflüssigkeit: Wie langsam sich Spieler durch sie bewegen und wie langsam sich die Flüssigkeit ausbreitet +When those criteria are met, the open space is filled with a new liquid source of the same type (image 3).=Wenn diese Eigenschaften zutreffen, wird der freie Raum mit einer neuen Flüssigkeitsquelle des selben Typs gefüllt (Bild 3). +Swimming in a liquid is fairly straightforward: The usual direction keys for basic movement, the jump key for rising and the sneak key for sinking.=Schwimmen in einer Flüssigkeit ist einfach: Die normale Richtungstasten für die Grundbewegung, Sprungtaste und Schleichen für Auf- und Abbewegungen. +The physics for swimming and diving in a liquid are:=Die Schwimmphysik: +• The higher the viscosity, the slower you move=• Je höher die Zähflüssigkeit, desto langsamer bewegen Sie sich +• If you rest, you'll slowly sink=• Wenn Sie ruhen, sinken sie langsam +• There is no fall damage for falling into a liquid as such=• Es gibt keinen Fallschaden für das Eintauchen in einer Flüssigkeit als solche +• If you fall into a liquid, you will be slowed down on impact (but don't stop instantly). Your impact depth is determined by your speed and the liquid viscosity. For a safe high drop into a liquid, make sure there is enough liquid above the ground, otherwise you might hit the ground and take fall damage=• Wenn Sie in eine Flüssigkeit stürzen, werden Sie bei Kontakt verlangsamt (aber Sie halten nicht sofort an). Ihre Falltiefe hängt von Ihrer Geschwindigkeit und der Zähflüssigkeit ab. Für einen sicheren hohen Sturz in eine Flüssigkeit, stellen Sie sicher, dass genug Flüssigkeit über dem Boden ist, sonst könnten Sie auf den Boden aufschlagen und Fallschaden nehmen. +Liquids are often not pointable. But some special items are able to point all liquids.=Flüssigkeiten sind generell nicht zeigbar. Aber ein paar besondere Werkzeuge können auf alle Flüssigkeiten zeigen. +Crafting=Fertigung +Crafting is the task of combining several items to form a new item.=Fertigen ist die Tätigkeit, in der man mehrere Gegenstände kombiniert, um einen neuen zu erhalten. +To craft something, you need one or more items, a crafting grid (C) and a crafting recipe. A crafting grid is like a normal inventory which can also be used for crafting. Items need to be put in a certain pattern into the crafting grid. Next to the crafting grid is an output slot (O). Here the result will appear when you placed items correctly. This is just a preview, not the actual item. Crafting grids can come in different sizes which limits the possible recipes you can craft.=Um etwas zu fertigen, brauchen Sie einen oder mehrere Gegenstände, ein Fertigungsgitter (C) und ein Fertigungsrezept. Ein Fertigungsgitter ist wie ein normales Inventar, welches auch zum Fertigen benutzt werden kann. Gegenstände müssen in ein bestimmtes Muster in das Fertigungsgitter platziert werden. Neben dem Fertigungsgitter befindet sich ein Ausgabeplatz (O). Hier wird das Ergebnis auftauchen, wenn Sie die Gegenstände korrekt platziert haben. Das ist nur eine Vorschau, nicht der richtige Gegenstand. Fertigungsgitter können in verschiedenen Größen daher kommen, was die möglichen Rezepte begrenzt. +To complete the craft, take the result item from the output slot, which will consume items from the crafting grid and creates a new item. It is not possible to place items into the output slot.=Um die Fertigung abzuschließen, nehmen Sie sich das Ergebnis vom Ausgabeplatz, was die Gegenstände aus dem Fertigungsgitter verbrauchen und einen neuen Gegenstand erschaffen wird. Es ist nicht möglich, Gegenstände in den Ausgabeplatz zu platzieren. +A description on how to craft an item is called a “crafting recipe”. You need this knowledge to craft. There are multiple ways to learn crafting recipes. One way is by using a crafting guide, which contains a list of available crafting recipes. Some games provide crafting guides. There are also some mods which you can download online for installing a crafting guide. Another way is by reading the online manual of the game (if one is available).=Eine Beschreibung, wie man einen Gegenstand fertigt, nennt man „Fertigungsrezept“. Sie brauchen dieses Wissen, um etwas zu fertigen. Es gibt mehrere Möglichkeiten, Fertigungsrezepte zu lernen. Eine Möglichkeit ist es, einen Fertigungsführer zu benutzen, er enthält eine Liste von verfügbaren Fertigungsrezepten. Einige Spiele bieten Fertigungsführer an. Es gibt auch ein paar Mods, die Sie online herunterladen können, um einen Fertigungsführer zu installieren. Ansonsten können Sie die Online-Anleitung des Spieles lesen (wenn es eine gibt). +Crafting recipes consist of at least one input item and exactly one stack of output items. When performing a single craft, it will consume exactly one item from each stack of the crafting grid, unless the crafting recipe defines replacements.=Fertigungsrezepte bestehen aus mindestens einem Eingabegegenstand und genau einem Stapel von Ausgabegegenständen. Beim Vornehmen einer einzelnen Fertigung wird es genau einen Gegenstand von jedem Stapel im Fertigungsgitter verbrauchen, außer, wenn das Fertigungsrezept Ersätze definiert. +In some crafting recipes, some input items do not need to be a concrete item, instead they need to be a member of a group (see “Basics > Groups”). These recipes offer a bit more freedom in the input items. Images 6-8 show the same group-based recipe. Here, 8 items of the “stone” group are required, which is true for all of the shown items.=In einigen Fertigungsrezepten brauchen ein paar Eingabegegenstände keine konkreten Gegenstände zu sein, sie müssen stattdessen nur Mitglied einer Gruppe sein (siehe „Grundlagen > Gruppen“). Diese Rezepte bieten etwas mehr Freiheit bei der Wahl der Eingabegegenstände. Bilder 6-8 zeigen das gleiche gruppenbasierte Rezept. Hier werden 8 Gegenstände der „Stein“-Gruppe benötigt, was der Fall für alle gezeigten Gegenstände ist. +Rarely, crafting recipes have replacements. This means, whenever you perform a craft, some items in the crafting grid will not be consumed, but instead will be replaced by another item.=Selten können Fertigungsrezepte Ersätze haben. Das bedeutet, wenn Sie eine Fertigung vornehmen, werden einige Gegenstände im Fertigungsgitter nicht verbraucht, sondern durch einen anderen Gegenstand ersetzt. +Cooking=Kochen +Cooking (or smelting) is a form of crafting which does not involve a crafting grid. Cooking is done with a special block (like a furnace), an cookable item, a fuel item and time in order to yield a new item.=Kochen (bzw. Schmelzen) ist eine Art Fertigung, die ohne Fertigungsgitter auskommt. Kochen wird mit einem besonderem Block vorgenommen (wie einem Ofen), einen kochbaren Gegenstand, einem Brennstoff und Zeit, um einen neuen Gegenstand zu erhalten. +Each fuel item has a burning time. This is the time a single item of the fuel keeps a furnace burning.=Jeder Brennstoff hat eine Brennzeit. Das ist die Zeit, die ein einzelner Gegenstand des Brennstoffs den Ofen brennen lässt. +Each cookable item requires time to be cooked. This time is specific to the item type and the item must be “on fire” for the whole cooking time to actually yield the result.=Jeder kochbare Gegenstand braucht Zeit, um gekocht zu werden. Diese Zeit hängt vom Gegenstandstyp ab und der Gegenstand muss für die gesamte Kochzeit „im Feuer“ sein, um tatsächlich gekocht zu werden. +Hotbar=Schnellleiste +At the bottom of the screen you see some squares. This is called the “hotbar”. The hotbar allows you to quickly access the first items from your player inventory.=Unten sehen Sie ein paar Quadrate. Dies ist die „Schnellleiste“. Die Schnellleiste ermöglicht es Ihnen, schnell auf die ersten Gegenstände Ihres Spielerinventars zuzugreifen. +You can change the selected item with the mouse wheel or the keyboard.=Sie können die gewählten Gegenstände mit dem Mausrad oder der Tastatur wechseln. +• Select previous item in hotbar: [Mouse wheel up] or [B]=• Vorherigen Gegenstand in Schnellleiste wählen: [Mausrad rauf] oder [B] +• Select next item in hotbar: [Mouse wheel down] or [N]=• Vorherigen Gegenstand in Schnellleiste wählen: [Mausrad runter] oder [N] +• Select item in hotbar directly: [1]-[9]=• Gegenstand direkt in Schnellleiste wählen: [1]-[9] +The selected item is also your wielded item.=Der gewählte Gegenstand ist auch Ihr gehaltener Gegenstand. +Minimap=Übersichtskarte +Press [F9] to make a minimap appear on the top right. The minimap helps you to find your way around the world. Press it again to select different minimap modes and zoom levels. The minimap also shows the positions of other players.=Drücken Sie [F9], um eine Übersichtskarte rechts oben erscheinen zu lassen. Die Übersichtskarte hilft Ihnen, sich in der Welt zu orientieren. +There are 2 minimap modes and 3 zoom levels.=Es gibt 2 Modi und 3 Zoom-Stufen. +Surface mode (image 1) is a top-down view of the world, roughly resembling the colors of the blocks this world is made of. It only shows the topmost blocks, everything below is hidden, like a satellite photo. Surface mode is useful if you got lost.=Der Bodenmodus (Bild 1) ist eine Draufsicht auf die Welt, er zeigt grob die Farben der Blöcke, aus denen die Welt besteht. Er zeigt nur die obersten Blöcke, alles unter ihnen ist verborgen, wie bei einem Satellitenfoto. Der Bodenmodus ist nützlich, wenn Sie sich verlaufen haben. +Radar mode (image 2) is more complicated. It displays the “denseness” of the area around you and changes with your height. Roughly, the more green an area is, the less “dense” it is. Black areas have many blocks. Use the radar to find caverns, hidden areas, walls and more. The rectangular shapes in image 2 clearly expose the position of a dungeon.=Der Radarmodus (Bild 2) ist etwas komplizierter. Er zeigt die „Dichte“ des Gebiets um Sie herum an und ändert sich mit Ihrer Höhe. Grob gesagt, je grüner ein Gebiet ist, desto „weniger dicht“ ist es. Schwarze Gebiete haben viele Blöcke. Benutzen Sie das Radar, um Höhlen, verborgene Gebiete, Wände und mehr zu finden. Die rechteckigen Formen in Bild 2 verraten deutlich den Ort eines Kerkers. +There are also two different rotation modes. In “square mode”, the rotation of the minimap is fixed. If you press [Shift]+[F9] to switch to “circle mode”, the minimap will instead rotate with your looking direction, so “up” is always your looking direction.=Es gibt auch zwei unterschiedliche Rotationsmodi. Im „Quadratsmodus“ ist die Rotation der Übersichtskarte fest. Drücken Sie [Umschalt]+[F9], um zum „Kreismodus“ zu wechseln, in dem sich die Karte mit Ihrer Blickrichtung dreht, also ist „oben“ immer in Ihrer Blickrichtung. +In some games, the minimap may be disabled.=In einigen Spielen kann die Übersichtskarte deaktiviert sein. +• Toggle minimap mode: [F9]=• Übersichtskartenmodus ändern: [F9] +• Toggle minimap rotation mode: [Shift]+[F9]=• Rotationsmodus der Übersichtskarte ändern: [Umschalt]+[F9] +Inventory=Inventar +Inventories are used to store item stacks. There are other uses, such as crafting. An inventory consists of a rectangular grid of item slots. Each item slot can either be empty or hold one item stack. Item stacks can be moved freely between most slots.=Inventare werden benutzt, um Gegenstandsstapel aufzubewahren. Es gibt andere Verwendungszwecke, wie die Fertigung. Ein Inventar besteht aus einem rechteckigem Raster aus Gegenstandsplätzen. Jeder Gegenstandsplatz kann entweder leer sein, oder einen Gegenstandsstapel enthalten. Gegenstandsstapel können frei zwischen den meisten Plätzen bewegt weren. +You have your own inventory which is called your “player inventory”, you can open it with the inventory key (default: [I]). The first inventory slots are also used as slots in your hotbar.=Sie haben Ihr eigenes Inventar, das „Spielerinventar“, Sie können es mit Ihrer Inventartaste (Standard: [I]) öffnen. Die ersten Inventarplätze werden auch als Plätze in Ihrer Schnellleiste benutzt. +Blocks can also have their own inventory, e.g. chests and furnaces.=Blöcke können auch ihr eigenes Inventar haben, z.B. Truhen und Öfen. +Inventory controls:=Inventarsteuerung: +Taking: You can take items from an occupied slot if the cursor holds nothing.=Nehmen: Sie können Gegenstände aus einem belegten Platz nehmen, wenn der Mauszeiger nichts hält. +• Left click: take entire item stack=• Linksklick: Ganzen Gegenstandsstapel nehmen +• Right click: take half from the item stack (rounded up)=• Rechtsklick: Hälfte des Stapels nehmen (aufgerundet) +• Middle click: take 10 items from the item stack=• Mittelklick: 10 Gegenstände von einem Stapel nehmen +• Mouse wheel down: take 1 item from the item stack=• Mausrad runter: 1 Gegenstand vom Stapel nehmen +Putting: You can put items onto a slot if the cursor holds 1 or more items and the slot is either empty or contains an item stack of the same item type.=Ablegen: Sie können Gegenstände auf einem Platz ablegen, wenn der Mauszeiger einen oder mehrere Gegenstände hält und der Platz entweder leer ist, oder einen Stapel des gleichen Gegenstandstyps enthält. +• Left click: put entire item stack=• Linksklick: Ganzen Stapel ablegen +• Right click or mouse wheel up: put 1 item of the item stack=• Rechtsklick oder Mausrad hoch: 1 Gegenstand des Stapels ablegen +• Middle click: put 10 items of the item stack=• Mittelklick: 10 Gegenstände des Stapels ablegen +Exchanging: You can exchange items if the cursor holds 1 or more items and the destination slot is occupied by a different item type.=Vertauschen: Sie können Gegenstände vertauschen, wenn der Mauszeiger einen oder mehrere Gegenstände hält und der Zielplatz von einem anderen Gegenstandstyp belegt ist. +• Click: exchange item stacks=• Klick: Stapel vertauschen +Throwing away: If you hold an item stack and click with it somewhere outside the menu, the item stack gets thrown away into the environment.=Wegwerfen: Wenn Sie einen Stapel halten und irgendwo außerhalb des Menüs klicken, wird der Stapel in die Umwelt weggeworfen. +Quick transfer: You can quickly transfer an item stack to/from the player inventory to/from another item's inventory slot like a furnace, chest, or any other item with an inventory slot when that item's inventory is accessed. The target inventory is generally the most relevant inventory in this context.=Schnelles Verschieben: Sie können einen Stapel schnell von/zu dem Spielerinventar von/zu einem anderem Inventar (z.B. in einem Inventar einer Truhe oder eines Ofens) verschieben. Das Zielinventar ist normalerweise das relevanteste Inventar des Behälters. +• Sneak+Left click: Automatically transfer item stack=• Schleichtaste+Linksklick: Automatisch Stapel verschieben +Online help=Online-Hilfe +You may want to check out these online resources related to Minetest:=Sie können diese Onlinequellen zum Thema Minetest besuchen: +Official homepage of Minetest: =Offizielle Minetest-Homepage: +The main place to find the most recent version of Minetest.=Dort findet man die neueste Minetest-Version. +Community wiki: =Community-Wiki: +A community-based documentation website for Minetest. Anyone with an account can edit it! It also features a documentation of Minetest Game.=Eine gemeinschaftsbasierte Dokumentationswebpräsenz für Minetest. Jeder mit einem Benutzerkonto kann sie bearbeiten. Enthält auch die Hilfe zu Minetest Game. +Web forums: =Webforen: +A web-based discussion platform where you can discuss everything related to Minetest. This is also a place where player-made mods and games are published and discussed. The discussions are mainly in English, but there is also space for discussion in other languages.=Eine webbasierte Diskussionsplattform, wo Sie über alles zum Thema Minetest diskutieren können. Dort werden auch spielergemachte Mods und Spiele veröffentlicht und diskutiert. +Chat: =Chat: +A generic Internet Relay Chat channel for everything related to Minetest where people can meet to discuss in real-time. If you do not understand IRC, see the Community Wiki for help.=Ein allgemeiner Internet-Relay-Chat-Kanal für alles über Minetest, wo sich Menschen treffen können, um in Echtzeit zu diskutieren. Wenn Sie IRC nicht verstehen, sehen Sie im Community-Wiki für Hilfe nach. +Groups=Gruppen +Items, players and objects (animate and inanimate) can be members of any number of groups. Groups serve multiple purposes:=Gegenstände, Spieler und Objekte (lebend oder nicht) können Mitglieder von einer Reihe von Gruppen sein. Gruppen erfüllen mehrere Zwecke: +• Crafting recipes: Slots in a crafting recipe may not require a specific item, but instead an item which is a member of a particular group, or multiple groups=• Fertigungsrezepte: Plätze in Fertigungsrezepten erfordern nicht unbedingt einen konkreten Gegenstand, sondern einen Gegenstand, der zu einer bestimmten Gruppe, oder mehreren Gruppen, gehört +• Digging times: Diggable blocks belong to groups which are used to determine digging times. Mining tools are capable of digging blocks belonging to certain groups=• Abbauzeiten: Abbaubare Blöcke gehören zu Gruppen, die benutzt werden, um die Abbauzeiten zu bestimmen. Grabewerkzeuge sind fähig, grabbare Blöcke, die zu bestimmten Gruppen gehören, abzubauen +• Block behavior: Blocks may show a special behaviour and interact with other blocks when they belong to a particular group=• Blockverhalten: Blöcke können ein besonderes Verhalten aufweisen und mit anderen Blöcken interagieren, wenn sie zu einer bestimmten Gruppe gehören +• Damage and armor: Objects and players have armor groups, weapons have damage groups. These groups determine damage. See also: “Basics > Weapons”=• Schaden und Rüstung: Objekte und Spieler haben Rüstungsgruppen, Waffen haben Schadensgruppen. Diese Gruppe bestimmen den Schaden. Siehe auch: „Grundlagen > Waffen“ +• Other uses=• Andere Zwecke +In the item help, many important groups are usually mentioned and explained.=In der Gegenstandshilfe werden viele wichtige Gruppen normalerweise erwähnt und erklärt. +Glossary=Glossar +This is a list of commonly used terms:=Dies ist eine Liste von häufig benutzten Begriffen: +Controls:=Steuerung: +• Wielding: Holding an item in hand=• Halten: Einen Gegenstand in der Hand halten +• Pointing: Looking with the crosshair at something in range=• Zeigen: Mit dem Fadenkreuz auf etwas in Reichweite blicken +• Dropping: Throwing an item or item stack to the ground=• Wegwerfen: Gegenstand oder Stapel zu Boden werfen +• Punching: Attacking with left-click, is also used on blocks=• Schlagen: Angriff mit Linksklick, wird auch an Blöcken benutzt +• Sneaking: Walking slowly while (usually) avoiding to fall over edges=• Schleichen: Langsam gehen, während man (normalerweise) verhindert, über die Kante zu fallen +• Climbing: Moving up or down a climbable block=• Klettern: Bei einem kletterbaren Block auf- oder absteigen +Blocks:=Blöcke: +• Block: Cubes that the worlds are made of=• Block: Würfel, aus denen die Welten gemacht sind +• Mining/digging: Using a mining tool to break a block=• Abbauen/Graben: Ein Grabewerkzeug benutzen, um einen Block zu zerbrechen +• Building/placing: Putting a block somewhere=• Bauen/Platzieren: Einen Block irgendwo hin setzen +• Drop: Items you get after mining a block=• Abwurf: Gegenstände, den Sie nach dem Abbauen erhalten +• Using a block: Right-clicking a block to access its special function=• Einen Block benutzen: Rechtsklick auf einem Block, um auf seine Sonderfunktion zuzugreifen +Items:=Gegenstände: +• Item: A single thing that players can possess=• Gegenstand: Ein einzelnes Ding, den Spieler besitzen können +• Item stack: A collection of items of the same kind=• Gegenstandsstapel: Eine Sammlung von gleichen Gegenständen +• Maximum stack size: Maximum amount of items in an item stack=• Maximale Stapelgröße: Maximale Anzahl Gegenstände in einem Gegenstandsstapel +• Slot / inventory slot: Can hold one item stack=• Platz / Inventarplatz: Kann einen Gegenstandsstapel halten +• Inventory: Provides several inventory slots for storage=• Inventar: Bietet mehrere Inventarplätze für die Lagerung +• Player inventory: The main inventory of a player=• Spielerinventar: Das Hauptinventar eines Spielers +• Tool: An item which you can use to do special things with when wielding=• Werkzeug: Ein Gegenstand, mit dem man besondere Dinge beim Halten tun kan +• Range: How far away things can be to be pointed by an item=• Reichweite: Bis zu welcher Entfernung man Dinge zeigen kann +• Mining tool: A tool which allows to break blocks=• Grabewerkzeug: Werkzeug, mit dem man Blöcke brechen kann +• Craftitem: An item which is (primarily or only) used for crafting=• Fertigungsgegenstand: Ein Gegenstand der (hauptsächlich oder nur) für die Fertigung benutzt wird +Gameplay:=Spiel: +• “heart”: A single health symbol, indicates 2 HP=• „Herz“: Ein einzelnes Gesundheitssymbol, steht für 2 TP +• “bubble”: A single breath symbol, indicates 1 BP=• „Luftblase“: Ein einzelnes Atemsymbol, steht für 1 AP +• HP: Hit point (equals half 1 “heart”)=• TP: Trefferpunkt (gleich 1 halbes „Herz“) +• BP: Breath point, indicates breath when diving=• AP: Atempunkt, steht für Atem beim Tauchen +• Mob: Computer-controlled enemy=• Mob: Computergesteuerter Gegner +• Crafting: Combining multiple items to create new ones=• Fertigen: Kombinierung mehrerer Gegenstände, um neue zu erhalten +• Crafting guide: A helper which shows available crafting recipes=• Fertigungsführer: Ein Helferlein, um die verfügbaren Fertigungsrezepte zu zeigen +• Spawning: Appearing in the world=• Einsteigen (spawning): In der Welt auftauchen +• Respawning: Appearing again in the world after death=• Wiedereinsteigen (respawning): Wieder in der Welt auftauchen, nach dem man gestorben ist +• Group: Puts similar things together, often affects gameplay=• Gruppe: Fasst mehrere Dinge zusammen, betrifft oft den Spielverlauf +• noclip: Allows to fly through walls=• Geistmodus / noclip: Damit kann man durch Wände fliegen +Interface=Benutzeroberfläche +• Hotbar: Inventory slots at the bottom=• Schnellleiste: Untere Inventarplätze +• Statbar: Indicator made out of half-symbols, used for health and breath=• Wertleiste: Indikator aus Halbsymbolen, für Gesundheit und Atem benutzt +• Minimap: The map or radar at the top right=• Übersichtskarte: Karte oder Radar oben rechts +• Crosshair: Seen in the middle, used to point at things=• Fadenkreuz: In der Mitte, damit kann man auf Dinge zeigen +Online multiplayer:=Online-Mehrspieler: +• PvP: Player vs Player. If active, players can deal damage to each other=• PvP: Spielerkampf (Player vs Player). Wenn aktiv, können sich Spieler gegenseitig verletzen +• Griefing: Destroying the buildings of other players against their will=• Griefen: Gebäude anderer Spieler gegen ihren Willen zerstören +• Protection: Mechanism to own areas of the world, which only allows the owners to modify blocks inside=• Schutz: Mechanismus, um Eigentum an Gebieten in der der Welt zu erlangen, wodurch nur der Eigentümer die Blöcke verändern kann +Technical terms:=Technische Begriffe: +• Minetest: This game engine=• Minetest: Diese Spiel-Engine +• Minetest Game: A game for Minetest by the Minetest developers=• Minetest Game: Ein Spiel für Minetest von den Minetest-Entwicklern +• Game: A complete playing experience to be used in Minetest; such as a game or sandbox or similar=• Spiel: Ein vollständiges Spielerlebnis für Minetest, also ein richtiges Spiel oder auch nur eine Sandbox oder ähnliches +• Mod: A single subsystem which adds or modifies functionality; is the basic building block of games and can be used to further enhance or modify them=• Mod: Ein einzelnes Untersystem, welches Funktionalität hinzufügt oder modifiziert; ist das Fundament von Spielen und kann benutzt werden, um sie zu erweitern oder zu modifizieren +• Privilege: Allows a player to do something=• Privileg: Erlaubt einem Spieler, etwas zu tun +• Node: Other word for “block”=• Node: Anderes Wort für „Block“ +Settings=Einstellungen +There is a large variety of settings to configure Minetest. Pretty much every aspect can be changed that way.=Es gibt viele Einstellungen, um Minetest einzurichten. Fast jeder Aspekt kann so verändert werden. +These are a few of the most important gameplay settings:=Dies sind ein paar der wichtigsten Spieleinstellungen: +• Damage enabled (enable_damage): Enables the health and breath attributes for all players. If disabled, players are immortal=• Schaden aktiviert (enable_damage): Aktiviert die Gesundheits- und Atemattribute für alle Spieler. Wird dies deaktiviert, sind Spieler unsterblich. +• Creative Mode (creative_mode): Enables sandbox-style gameplay focusing on creativity rather than a challenging gameplay. The meaning depends on the game; usual changes are: Reduced dig times, easy access to almost all items, tools never wear off, etc.=• Kreativmodus (creative_mode): Aktiviert eine Art Sandkastenmodus, der sich auf Kreativität statt auf ein herausforderndes Spiel konzentriert. Die Bedeutung hängt vom Spiel ab; die üblichen Änderungen sind: Verringerte Grabezeiten, leichter Zugriff zu fast allen Dingen, Werkzeuge nutzen sich nie ab, usw. +• PvP (enable_pvp): Short for “Player vs Player”. If enabled, players can deal damage to each other=• PvP (enable_pvp): Wenn aktiv, können sich Spieler gegenseitig verletzen +For a full list of all available settings, use the “All Settings” dialog in the main menu.=Für eine vollständige Liste aller verfügbaren Einstellungen, benutzen Sie den Knopf „Alle Einstellunen“ im Hauptmenü. +Movement modes=Bewegungsmodi +If you have the required privileges, you can use up to three special movement modes.=Wenn Sie die benötigten Privilegien haben, können Sie bis zu drei besondere Bewegungsmodi benutzen. +Fast mode:=Schnellmodus: +• Description: Allows you to move much faster. Hold down the the “Use” key [E] to move faster. In the client configuration, you can further customize fast mode.=• Beschreibung: Damit bewegen Sie sich viel schneller. In der Client-Konfiguration können Sie den Schnellmodus ferner anpassen +• Default key: [J]=• Standardtaste: [J] +• Required privilege: fast=• Benötigtes Privileg: fast +Fly mode:=Flugmodus +• Description: Gravity doesn't affect you and you can move freely in all directions. Use the jump key to rise and the sneak key to sink.=• Beschreibung: Schwerkraft beeinflusst Sie nicht und Sie können sich in alle Richtungen schnell bewegen. Benutzen Sie die Sprungtaste zum Aufsteigen und die Schleichentaste zum Absinken. +• Default key: [K]=• Standardtaste: [K] +• Required privilege: fly=• Benötigtes Privileg: fly +Noclip mode:=Geistmodus: +• Description: Allows you to move through walls. Only works when fly mode is enabled, too.=• Beschreibung: Damit können Sie durch Wände fliegen, wenn der Flugmodus aktiv ist. +• Default key: [H]=• Standardtaste: [H] +• Required privilege: noclip=• Benötigtes Privileg: noclip +Console=Konsole +With [F10] you can open and close the console. The main use of the console is to show the chat log and enter chat messages or server commands.=Mit [F10] öffnen und schließen Sie die Konsole. Der Hauptzweck der Konsole ist die Anzeige des Chatprotokolls und für die Eingabe von Chatnachrichten oder Serverbefehlen. +Using the chat or server command key also opens the console, but it is smaller and will be closed after you sent a message.=Wenn Sie die Chat- oder Serverbefehlstaste benutzen, wird die Konsole auch geöffnet, aber sie ist kleiner und wird geschlossen, nachdem Sie eine Nachricht gesendet haben. +Use the chat to communicate with other players. This requires you to have the “shout” privilege.=Benutzen Sie den Chat, um mit anderen Spielern zu kommunizieren. Dafür brauchen Sie das „shout“-Privileg. +Just type in the message and hit [Enter]. Public chat messages can not begin with “/”.=Geben Sie einfach die Nachricht ein und drücken [Eingabe]. Öffentliche Chatnachrichten können nicht mit „/“ beginnen. +You can send private messages: Say “/msg ” in chat to send “” which can only be seen by .=Sie können private Nachrichten senden: Sagen Sie „/msg “ im Chat, um „“ zu senden, aber nur für sichtbar. +There are some special controls for the console:=Besondere Steuerung für die Konsole: +• [F10] Open/close console=• [F10] Konsole öffnen/schließen +• [Enter]: Send message or command=• [Eingabe] Nachricht oder Befehl senden +• [Tab]: Try to auto-complete a partially-entered player name=• [Tab]: Autovervollständigung von Spielernamen +• [Ctrl]+[Left]: Move cursor to the beginning of the previous word=• [Strg]+[Links]: Cursor zum Anfang des vorherigen Wortes bewegen +• [Ctrl]+[Right]: Move cursor to the beginning of the next word=• [Strg]+[Rechts]: Cursor zum Anfang des vorherigen Wortes bewegen +• [Ctrl]+[Backspace]: Delete previous word=• [Strg]+[Rücktaste]: Vorheriges Wort löschen +• [Ctrl]+[Delete]: Delete next word=• [Strg]+[Entfernen]: Nächstes Wort löschen +• [Ctrl]+[U]: Delete all text before the cursor=• [Strg]+[U]: Text vor dem Cursor löschen +• [Ctrl]+[K]: Delete all text after the cursor=• [Strg]+[K]: Text nach dem Cursor löschen +• [Page up]: Scroll up=• [Bild auf]: Nach oben scrollen +• [Page down]: Scroll down=• [Bild ab]: Nach unten rollen +There is also an input history. Minetest saves your previous console inputs which you can quickly access later:=Es gibt auch eine Eingabe-Historie. Minetest merkt sich Ihre vorherigen Konsoleneingaben, auf die Sie später schnell zugreifen können: +• [Up]: Go to previous entry in history=• [Rauf]: Zum vorherigen Eintrag in der Historie gehen +• [Down]: Go to next entry in history=• [Runter]: Zum nächsten Eintrag in der Historie gehen +Server commands=Serverbefehle +Server commands (also called “chat commands”) are little helpers for advanced users. You don't need to use these commands when playing. But they might come in handy to perform some more technical tasks. Server commands work both in multi-player and single-player mode.=Serverbefehle (auch „Chat-Befehle“ genannt) sind kleine Helferlein für fortgeschrittene Benutzer. Sie müssen diese Befehle im normalen Spielverlauf nicht benutzen. Aber sie können nützlich sein, um ein paar technischere Aufgaben zu erledigen. Serverbefehle funktionieren sowohl im Mehrspieler- als auch im Einzelspielermodus. +Server commands can be entered by players using the chat to perform a special server action. There are a few commands which can be issued by everyone, but some commands only work if you have certain privileges granted on the server. There is a small set of basic commands which are always available, other commands can be added by mods.=Serverbefehle können von Spielern im Chat eingegeben werden, um eine besondere Serveraktion auszulösen. Es gibt ein paar Befehle, die von jedem benutzt werden können, aber einige Befehle benötigen Privilegien, die vom Server gewährt werden. Es gibt eine kleine Menge an Grundbefehlen, die immer verfügbar sind, andere Befehle können von Mods hinzugefügt werden. +To issue a command, simply type it like a chat message or press Minetest's command key (default: [/]). All commands have to begin with “/”, for example “/mods”. The Minetest command key does the same as the chat key, except that the slash is already entered.=Um einen Befehl zu erteilen, geben Sie ihn einfach wie eine Chatnachricht ein oder drücken Sie Minetests Befehlstaste (Standard: [/]). Alle Befehle müssen mit „/“ beginnen, z.B. „/mods“. Die Minetestbefehlstaste macht das gleiche wie die Chattaste, nur, dass der Schrägstrich schon eingegeben wurde. +Commands may or may not give a response in the chat log, but errors will generally be shown in the chat. Try it for yourselves: Close this window and type in the “/mods” command. This will give you the list of available mods on this server.=Befehle können eine Rückmeldung im Chatprotokoll auslösen, müssen aber nicht. Fehlermeldungen tauchen grundsätzlich im Chat auf. Probieren Sie es aus: Schließen Sie dieses Fenster und geben Sie den „/mods“-Befehl ein. Damit erhalten Sie die Liste der vorhandenen Mods auf diesem Server. +“/help all” is a very important command: You get a list of all available commands on the server, a short explanation and the allowed parameters. This command is also important because the available commands often differ per server.=„/help all“ ist ein sehr wichtiger Befehl: Damit erhalten Sie eine Liste aller verfügbaren Befehle auf dem Server, eine kurze Erklärung und die möglichen Parameter. Dieser Befehl ist auch wichtig, weil die Befehle sich je nach Server unterscheiden können. +Commands are followed by zero or more parameters.=Befehle haben null oder mehr Parameter. +In the command reference, you see some placeholders which you need to replace with an actual value. Here's an explanation:=In der Befehlsreferenz sehen Sie einige Platzhalter, die sie mit dem richtigen Wert ersetzen müssen. Hier ist eine Erklärung: +• Text in greater-than and lower-than signs (e.g. “”): Placeholder for a parameter=• Text zwischen Größer-Als- und Kleiner-Als-Zeichen (z.B. „“): Platzhalter für einen Parameter +• Anything in square brackets (e.g. “[text]”) is optional and can be omitted=• Alles in eckigen Klammern (z.B. „[Text]“) ist optional und kann ausgelassen werden +• Pipe or slash (e.g. “text1 | text2 | text3”): Alternation. One of multiple texts must be used (e.g. “text2”)=• Senkrechtstrich (z.B. „Text1 | Text2 | Text3“): Alternativen. Eines von mehreren Texten muss benutzt werden +• Parenthesis: (e.g. “(word1 word2) | word3”): Groups multiple words together, used for alternations=• Klammern (z.B. „(Wort1 Wort2) | Wort3“): Gruppiert mehrere Wörter zusammen, für die Alternativen benutzt +• Everything else is to be read as literal text=• Alles andere muss als wortwörtlicher Text gelesen werden +Here are some examples to illustrate the command syntax:=Ein paar Beispiele, um die Befehlssyntax zu erläutern: +• /mods: No parameters. Just enter “/mods”=• /mods: Keine Parameter. Geben Sie einfach „/mods“ ein +• /me : 1 parameter. You have to enter “/me ” followed by any text, e.g. “/me orders pizza”=• /me : 1 Parameter. Sie müssen „/me “ gefolgt von einem beliebigen Text eingeben, z.B. „/me bestellt Pizza“ +• /give : Two parameters. Example: “/give Player default:apple”=• /give : Zwei Parameter. Beispiel: „/give Spieler default:apple“ +• /help [all|privs|]: Valid inputs are “/help”, “/help all”, “/help privs”, or “/help ” followed by a command name, like “/help time”=• /help [all|privs|]: Gültige Eingaben sind „/help“, „/help all“, „/help privs“ oder „/help “ gefolgt von einem Befehlsnamen, wie „/help time“ +• /spawnentity [,,]: Valid inputs include “/spawnentity boats:boat” and “/spawnentity boats:boat 0,0,0”=• /spawnentity [,,]: Gültige Eingaben beeinhalten „/spawnentity boats:boat“ und „/spawnentity boats:boat 0,0,0“ +Some final remarks:=Ein paar letzte Anmerkungen: +• For /give and /giveme, you need an itemstring. This is an internally used unique item identifier which you may find in the item help if you have the “give” or “debug” privilege=• Für /give und /giveme brauchen Sie einen sog. Itemstring. Das ist ein intern benutzter eindeutiger Gegenstandsidentifikator, den Sie in der Gegenstandshilfe finden, wenn Sie das „give“ oder „debug“-Privileg haben +• For /spawnentity you need an entity name, which is another identifier=• Für /spawnentity brauchen Sie einen Entity-Namen, was ein anderer Identifikator ist +Privileges=Privilegien +Each player has a set of privileges, which differs from server to server. Your privileges determine what you can and can't do. Privileges can be granted and revoked from other players by any player who has the privilege called “privs”.=Jeder Spieler hat eine Menge an Privilegien, die sich von Server zu Server unterscheiden. Ihre Privilegien bestimmen, was Sie tun können und was nicht. Privilegien können von anderen Spielern gewährt und entzogen werden, wenn diese das Privileg namens „privs“ haben. +On a multiplayer server with the default configuration, new players start with the privileges called “interact” and “shout”. The “interact” privilege is required for the most basic gameplay actions such as building, mining, using, etc. The “shout” privilege allows to chat.=In Mehrspielerservern mit der Standardeinstellung starten Spieler mit den Privilegien „interact“ und „shout“. Das „interact“-Privileg wird für die grundlegendsten Spielaktionen so wie Bauen, Abbauen, Benutzen, usw. gebraucht. Das „shout“-Privileg braucht man zum Chatten. +There is a small set of core privileges which you'll find on every server, other privileges might be added by mods.=Es gibt eine kleine Menge an Hauptprivilegien, die Sie auf jeden Server finden, andere Privilegien können von Mods hinzugefügt werden. +To view your own privileges, issue the server command “/privs”.=Um Ihre eigenen Privilegien zu sehen, erteilen Sie den Serverbefehl „/privs“. +Here are a few basic privilege-related commands:=Hier sind ein paar Befehle zum Thema Privilegien: +• /privs: Lists your privileges=• /privs: Listet Ihre Privilegien auf +• /privs : Lists the privileges of =• /privs : Listet die Privilegien von auf +• /help privs: Shows a list and description about all privileges=• /help privs: Zeigt eine Liste und Beschreibung für alle Privilegien an +Players with the “privs” privilege can modify privileges at will:=Spieler mit dem Privileg „privs“ können Privilegien beliebig ändern: +• /grant : Grant to =• /grant : an gewähren +• /revoke : Revoke from =• /revoke : von entziehen +In single-player mode, you can use “/grantme all” to unlock all abilities.=Im Einzelspielermodus können Sie „/grantme all“ benutzen, um alle Fähigkeiten freizuschalten. +Light=Licht +As the world is entirely block-based, so is the light in the world. Each block has its own brightness. The brightness of a block is expressed in a “light level” which ranges from 0 (total darkness) to 15 (as bright as the sun).=Da die Welt völlig auf Blöcken basiert, gilt dies auch für das Licht in der Welt. Jeder Block hat seine eigene Helligkeit. Die Helligkeit eines Blocks wird als „Helligkeitsstufe“ angegeben, die von 0 (völlig dunkel) bis 15 (so hell wie die Sonne) reicht. +There are two types of light: Sunlight and artificial light.=Es gibt zwei Lichttypen: Sonnenlicht und künstliches Licht. +Artificial light is emitted by luminous blocks. Artificial light has a light level from 1-14.=Künstliches List kommt von leuchtenden Blöcken. Künstliches Licht hat eine Helligkeit zwischen 1-14. +Sunlight is the brightest light and always goes perfectly straight down from the sky at each time of the day. At night, the sunlight will become moonlight instead, which still provides a small amount of light. The light level of sunlight is 15.=Sonnenlicht ist das hellste Licht und geht immer von oben vom Himmel schnurgerade nach unten zu jeder Tageszeit. In der Nacht wird aus Sonnenlicht Mondlicht, welches immer noch etwas Licht spendet. +Blocks have 3 levels of transparency:=Blöcke haben 3 Stufen der Transparenz: +• Transparent: Sunlight goes through limitless, artificial light goes through with losses=• Transparent: Sonnenlicht geht unbegrenzt hindurch, künstliches Licht geht mit Verlusten hindurch +• Semi-transparent: Sunlight and artificial light go through with losses=• Halbtransparent: Sonnenlicht und künstliches Licht gehen mit Verlusten durch +• Opaque: No light passes through=• Lichtundurchlässig: Licht kann nicht passieren +Artificial light will lose one level of brightness for each transparent or semi-transparent block it passes through, until only darkness remains (image 1).=Künstliches Licht wird eine Helligkeitsstufe für jeden transparenten oder halbtransparenten Block, den es passiert, einbüßen, bis es völlig verdunkelt ist (Bild 1). +Sunlight will preserve its brightness as long it only passes fully transparent blocks. When it passes through a semi-transparent block, it turns to artificial light. Image 2 shows the difference.=Sonnenlicht wird seine Helligkeit behalten, solange sie nur volltransparente Blöcke passiert. Sobald sie einen halbtransparenten Block passiert, wird es zu künstlichem Licht. Bild 2 zeigt den Unterschied. +Note that “transparency” here only means that the block is able to carry brightness from its neighboring blocks. It is possible for a block to be transparent to light but you can't see trough the other side.=Beachten Sie, dass das Wort „Transparenz“ hier nur bedeutet, dass der Block fähig ist, Helligkeit von seinen Nachbarblöcken weiterzugeben. Es ist möglich, dass ein Block transparent gegenüber Licht ist, aber Sie können nicht durch ihn sehen. +Coordinates=Koordinaten +The world is a large cube. And because of this, a position in the world can be easily expressed with Cartesian coordinates. That is, for each position in the world, there are 3 values X, Y and Z.=Die Welt ist ein großer Würfel. Und daher kann eine Position in der Welt leicht mit kartesischen Koordinaten ausgedrückt weren. Das bedeutet, für jede Position in der Welt gibt es 3 Werte X, Y und Z. +Like this: (5, 45, -12)=So wie dies: (5, 45, -12) +This refers to the position where X@=5, Y@=45 and Z@=-12. The 3 letters are called “axes”: Y is for the height. X and Z are for the horizontal position.=Das bezieht sich auf die Position, in der X@=5, Y@=45 und Z@=-12 sind. Die drei Buchstaben nennt man „Achsen“. Y ist für die Höhe X und Z sind für die horizontale Position. +The values for X, Y and Z work like this:=Die Werte für X, Y und Z funktionieren so: +• If you go up, Y increases=• Wenn Sie aufsteigen, erhöht sich Y +• If you go down, Y decreases=• Steigen Sie ab, verringert sich Y +• If you follow the sun, X increases=• Folgen Sie der Sonne, erhöht sich X +• If you go to the reverse direction, X decreases=• Gehen Sie in die entgegengesetzte Richtung, verringert sich X +• Follow the sun, then go right: Z increases=• Folgen Sie der Sonne, dann gehen Sie nach rechts: Z erhöht sich +• Follow the sun, then go left: Z decreases=• Folgen Sie der Sonne, dann gehen Sie nach links: Z verringert sich +• The side length of a full cube is 1=• Die Seitenlänge eines ganzen Würfels ist 1 +You can view your current position in the debug screen (open with [F5]).=Sie sehen Ihre aktuelle Position im Debug-Bildschirm (mit [F5] öffnen). +Items have several properties, including the following:=Gegenstände haben diverse Eigenschaften, unter anderem: +• Maximum stack size: Number of items which fit on 1 item stack=• Maximale Stapelgröße: Anzahl der Gegenstände, die in einen Gegenstandsstapel passen +• Pointing range: How close things must be to be pointed while wielding this item=• Zeigereichweite: Wie nah Dinge zum Zeigen sein müssen, wenn dieser Gegenstand gehalten wird +• Group memberships: See “Basics > Groups”=• Gruppenmitgliedschaften: Siehe „Grundlagen > Gruppen“ +• May be used for crafting or cooking=• Kann zum Fertigen oder beim Kochen benutzt werden +There are multiple types of crafting recipes:=Es gibt mehrere Arten von Fertigungsrezepten: +• Shaped (image 2): Items need to be placed in a particular shape=• Förmig (Bild 2): Gegenstände müssen in einer bestimmten Form platziert werden +• Shapeless (images 3 and 4): Items need to be placed somewhere in input (both images show the same recipe)=• Formlos (Bilder 3 und 4): Gegenstände müssen irgendwo in der Eingabe platziert werden (beide Bilder zeigen das gleiche Rezept) +• Cooking: Explained in “Basics > Cooking”=• Kochen: Siehe „Grundlagen > Kochen“ +• Repairing (image 5): Place two damaged tools into the crafting grid anywhere to get a tool which is repaired by 5%=• Reparieren (Bild 5): Platzieren sie zwei gleiche beschädigte Werkzeuge in das Fertigungsgitter, um ein Werkzeug zu erhalten, das zu 5% repariert ist +There are 3 different views which determine the way you see the world. The modes are:=Es gibt 3 verschiedene Ansichten, die bestimmen, wie Sie die Welt sehen. Die Modi sind: +• 1: First-person view (default)=• 1: Erste Person (Standard) +• 2: Third-person view from behind=• 2: Dritte Person von hinten +• 3: Third-person view from the front=• 3: Dritte Person von vorne +Players can take damage for a variety of reasons, here are some:=Spieler können aus verschidenen Gründen Schaden erleiden, hier sind ein paar: +• Taking fall damage=• Fallschaden +• Touching a block which causes direct damage=• Einen Block berühren, der Direktschaden anrichtet +• Drowning=• Ertrinken +• Being attacked by another player=• Angriff eines anderen Spielers +• Being attacked by a computer enemy=• Angriff eines Computergegners +Renewable liquids create new liquid sources at open spaces (image 2). A new liquid source is created when:=Erneuerbare Flüssigkeiten erschaffen neue Flüssigkeitsquellen in Freiräumen (Bild 2). Eine neue Flüssigkeitsquelle wird erschaffen, wenn: +• Two renewable liquid blocks of the same type touch each other diagonally=• Zwei gleiche erneuerbare Flüssigkeitsblöcke sich diagonal berühren +• These blocks are also on the same height=• Diese Blöcke sich auch in der gleichen Höhe befinden +• One of the two “corners” is open space which allows liquids to flow in=• Eines der zwei „Ecken“ ein Freiraum ist, in den Flüssigkeiten hereinfließen können +You can enable some special movement modes that change how you move.=Sie können in paar besondere Bewegungsmodi einschalten, die ändern, wie Sie sich bewegen. +Pitch movement mode:=Nick-Bewegungsmodus: +• Description: If this mode is activated, the movement keys will move you relative to your current view pitch (vertical look angle) when you're in a liquid or in fly mode.=• Wenn dieser Modus aktiviert ist, werden die Bewegungstasten Sie relativ zu Ihrem jetzigen Nickwinkel (vertikaler Blickwinkel) bewegen, wenn Sie sich in einer Flüssigkeit befinden oder der Flugmodus aktiv ist. +• Default key: [L]=• Standardtaste: [L] +• No privilege required=• Kein Privileg nötig + +Creative Mode=Kreativmodus +Enabling Creative Mode in MineClone 2 applies the following changes:=Der Kreativmodus in MineClone 2 nimmt die folgenden Änderungen vor: +• You keep the things you've placed=• Sie behalten die Dinge, die Sie platzieren +• Creative inventory is available to obtain most items easily=• Das Kreativinventar ist verfügbar, mit dem Sie die meisten Dinge leicht erhalten +• Hand breaks all default blocks instantly=• Hand zerbricht alle Standardblöcke sofort +• Greatly increased hand pointing range=• Stark erhöhte Zeigereichweite der Hand +• Mined blocks don't drop items=• Gegrabene Blöcke werfen nichts ab +• Items don't get used up=• Gegenstände werden nicht verbraucht +• Tools don't wear off=• Werkzeuge nutzen sich nicht ab +• You can eat food whenever you want=• Sie können essen, wann immer Sie wollen +• You can always use the minimap (including radar mode)=• Sie können die Übersichtskarte immer benutzen (auch den Radarmodus) +Damage is not affected by Creative Mode, it needs to be disabled separately.=Schaden wird vom Kreativmodus nicht beeinflusst, er muss separat ausgeschaltet werden. +Mobs=Mobs +Mobs are the living beings in the world. This includes animals and monsters.=Mobs sind die lebenden Kreaturen in der Welt. Das schließt Tiere und Monster ein. +Mobs appear randomly throughout the world. This is called “spawning”. Each mob kind appears on particular block types at a given light level. The height also plays a role. Peaceful mobs tend to spawn at daylight while hostile ones prefer darkness. Most mobs can spawn on any solid block but some mobs only spawn on particular blocks (like grass blocks).=Monster tauchen zufällig in der Welt auf. Das nennt man „spawnen“. Jeder Mobart taucht auf bestimmten Blocktypen bei einer bestimmten Helligkeit auf. Die Höhe spielt auch eine Rolle. Friedliche Mobs neigen dazu, bei Tageslicht zu spawnen, während feindliche Mobs die Dunkelheit bevorzugen. Die meisten Mobs können auf jedem festen Block spawnen, aber einige Mobs können nur auf bestimmten Blöcken spawnen (wie Grasblöcke). +Like players, mobs have hit points and sometimes armor points, too (which means you need better weapons to deal any damage at all). Also like players, hostile mobs can attack directly or at a distance. Mobs may drop random items after they die.=Wie Spieler haben Mobs Trefferpunkte und manchmal auch Rüstungspunkte (was bedeutet, dass Sie bessere Waffen benötigen, um überhaupt Schaden anrichten zu können). Auch wie bei Spielern können feindliche Mobs direkt angreifen oder aus der Ferne. Mobs können nach ihrem Tod zufällige Gegenstände abwerfen. +Most animals roam the world aimlessly while most hostile mobs hunt players. Animals can be fed, tamed and bred.=Die meisten Tiere wandern in der Welt ziellos umher, während die meisten feindlichen Mobs die Spieler jagen. Tiere können gefüttert, gezähmt und gezüchtet werden. +Animals=Tiere +Animals are peaceful beings which roam the world aimlessly. You can feed, tame and breed them.=Tiere sind friedliche Wesen, die in der Welt ziellos umherwandern. Sie können sie füttern, zähmen und züchten. +Feeding:=Füttern: +Each animal has its own taste for food and doesn't just accept any food. To feed, hold an item in your hand and rightclick the animal.=Jedes Tier hat eine eigene Vorliebe für Nahrung und akzeptiert nicht einfach jedes Lebensmittel. Zum Füttern halten Sie einen Gegenstand in der Hand und rechtsklicken Sie das Tier. +Animals are attraced to the food they like and follow you as long you hold the food item in hand.=Tiere werden von Lebensmitteln, die sie mögen, magisch angezogen und sie folgen Ihnen, solange Sie einen solchen Gegenstand halten. +Feeding an animal has three uses: Taming, healing and breeding.=Füttern hat drei Zwecke: Zähmen, heilen und züchten. +Feeding heals animals instantly, depending on the quality of the food item.=Füttern heilt Tiere sofort, abhängig von der Qualität des Lebensmittels. +Taming:=Zähmen: +A few animals can be tamed. You can generally do more things with tamed animals and use other items on them. For example, tame horses can be saddled and tame wolves fight on your side.=Ein paar Tiere können gezähmt werden. Sie können grundsätzlich mehr Sachen mit gezähmten Tieren machen und andere Gegenstände an ihnen benutzen. Zum Beispiel können zahme Pferde aufgesattelt werden und Wölfe dazu gebracht werden, an Ihrer Seite zu kämpfen. +Breeding:=Züchten: +When you have fed an animal up to its maximum health, then feed it again, you will activate “Love Mode” and many hearts appear around the animal.=Wenn Sie ein Tier bis zur vollen Gesundheit geheilt haben und es erneut füttern, werden Sie den „Liebesmodus“ aktivieren. Viele Herzen tauchen um das Tier herum auf. +Two animals of the same species will start to breed if they are in Love Mode and close to each other. Soon a baby animal will pop up.=Zwei Tiere der gleichen Art werden sich paaren, wenn sie im Liebesmodus sind und nah beieinander stehen. Kurz darauf wird ein Junges auftauchen. +Baby animals:=Junge: +Baby animals are just like their adult couterparts, but they can't be tamed or bred and don't drop anything when they die. They grow to adults after a short time. When fed, they grow to adults faster.=Junge sind wie ihre erwachsenen Artgenossen, aber sie können nicht gezähmt oder gezüchtet werden und werfen nichts ab, wenn sie sterben. Nach einer kurzen Zeit werden sie erwachsen. Werden sie gefüttert, werden sie schneller erwachsen. +Hunger=Hunger +Hunger affects your health and your ability to sprint. Hunger is not in effect when damage is disabled.=Hunger beeinflusst Ihre Gesundheit und Ihre Fähigkeit, zu sprinten. +Core hunger rules:=Haupthungerregeln: +• You start with 20/20 hunger points (more points @= less hungry)=• Sie beginnen mit 20/20 Hungerpunkten (mehr Punkte @= weniger hungrig) +• Actions like combat, jumping, sprinting, etc. decrease hunger points=• Aktionen wie kämpfen, springen, sprinten, usw. verringern die Hungerpunkte +• Food restores hunger points=• Nahrung erhöht die Hungerpunkte +• If your hunger bar decreases, you're hungry=• Wenn sich Ihre Hungerleiste verringert, sind Sie hungrig +• At 18-20 hunger points, you regenerate 1 HP every 4 seconds=• Bei 18-20 Hungerpunkten erhalten Sie 1 TP alle 4 Sekunden +• At 6 hunger points or less, you can't sprint=• Bei 6 Hungerpunkten oder weniger können Sie nicht sprinten +• At 0 hunger points, you lose 1 HP every 4 seconds (down to 1 HP)=• Bei 0 Hungerpunkten verlieren Sie 1 TP alle 4 Sekunden (bis nur 1 TP bleibt) +• Poisonous food decreases your health=• Giftige oder verpestete Nahrung verringert Ihre Gesundheit +Details:=Details: +You have 0-20 hunger points, indicated by 20 drumstick half-icons above the hotbar. You also have an invisible attribute: Saturation.=Sie haben 0-20 Hungerpunkte, was durch 20 Fleischkeulen-Halbsymbole über der Schnellleiste dargestellt wird. +Hunger points reflect how full you are while saturation points reflect how long it takes until you're hungry again.=Hungerpunkte reflektieren, wie satt Sie sind, während Sättigung reflektiert, wie lange es noch braucht, bis Sie wieder hungrig sind. +Each food item increases both your hunger level as well your saturation.=Jedes Lebensmittel erhöht Ihre Hunger- als auch Ihre Sättigungspunkte. +Food with a high saturation boost has the advantage that it will take longer until you get hungry again.=Nahrung mit einer hohen Sättigung hat den Vorteil, dass es länger dauern wird, bis Sie wieder hungrig sind. +A few food items might induce food poisoning by chance. When you're poisoned, the health and hunger symbols turn sickly green. Food poisoning drains your health by 1 HP per second, down to 1 HP. Food poisoning also drains your saturation. Food poisoning goes away after a while or when you drink milk.=Ein paar Lebensmittel können eine Lebensmittelvergiftung verursachen. Wenn Sie vergiftet sind, werden die Gesundheits- und Hungersymbole eine ungesund grüne Farbe annehmen. Die Lebensmittelvergiftung verringert Ihre Gesundheit um 1 TP pro Sekunde, bis nur noch 1 TP verbleibt. Eine Lebensmittelvergiftung reduziert auch Ihre Sättigung. Eine Lebensmittelvergiftung vergeht nach einer Weile, oder, wenn Sie Milch trinken. +You start with 5 saturation points. The maximum saturation is equal to your current hunger level. So with 20 hunger points your maximum saturation is 20. What this means is that food items which restore many saturation points are more effective the more hunger points you have. This is because at low hunger levels, a lot of the saturation boost will be lost due to the low saturation cap.=Sie beginnen mit 5 Sättigungspunkten. Ihre höchstmögliche Sättigung ist gleich der Anzahl Ihrer Hungerpunkte. Wenn Sie also 20 Hungerpunkte haben, ist Ihre höchstmögliche Sättigung 20. Das bedeutet, dass Lebensmittel mit einer hohen Sättigung effektiver sind, je mehr Hungerpunkte Sie haben. Das ist deshalb so, weil bei wenigen Hungerpunkten ein Großteil des Sättigungsbonus aufgrund der niedrigen Maximalsättigung verloren gehen wird. +If your saturation reaches 0, you're hungry and start to lose hunger points. Whenever you see the hunger bar decrease, it is a good time to eat.=Wenn Ihre Sättigung 0 erreicht, haben Sie Hunger und werden allmählich Hungerpunkte verlieren. Wenn Sie sehen, dass die Hungerleiste sich verringert, ist es ein guter Zeitpunkt, etwas zu essen. +Saturation decreases by doing things which exhaust you (highest exhaustion first):=Die Sättigung verringert sich, wenn Sie Dinge tun, die Sie erschöpfen (höchste Erschöpfung zuerst): +• Regenerating 1 HP=• 1 TP regenerieren +• Suffering food poisoning=• Lebensmittelvergiftung erleiden +• Sprint-jumping=• Beim Sprinten springen +• Sprinting=• Sprinten +• Attacking=• Angreifen +• Taking damage=• Schaden nehmen +• Swimming=• Schwimmen +• Jumping=• Springen +• Mining a block=• Einen Block abbauen +Other actions, like walking, do not exaust you.=Andere Aktionen, wie gehen, erschöpfen Sie nicht. +If you have a map item in any of your hotbar slots, you can use the minimap.=Wenn Sie eine Karte in einem beliebigen Platz der Schnellleiste haben, können Sie die Übersichtskarte benutzen. diff --git a/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.it.tr b/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.it.tr new file mode 100644 index 000000000..694735cac --- /dev/null +++ b/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.it.tr @@ -0,0 +1,408 @@ +# textdomain: mcl_doc_basics +Basics=Nozioni di base +Everything you need to know about Minetest to get started with playing=Tutto ciò che vi serve sapere riguardo a Minetest per cominciare a giocare +Advanced usage=Utilizzo avanzato +Advanced information about Minetest which may be nice to know, but is not crucial to gameplay=Informazioni avanzate riguardo a Minetest che possono essere utili da conoscere, ma non sono cruciali per l'esperienza di gioco +Quick start=Partenza rapida +This is a very brief introduction to the basic gameplay:=Questa è una introduzione molto rapida all'esperienza di gioco di base +• Move mouse to look=• Spostare il mouse per guardare attorno +• [W], [A], [S] and [D] to move=• [W], [A], [S] e [D] per muoversi +• [Space] to jump or move upwards=• [Spazio] per saltare o muoversi in su +• [Shift] to sneak or move downwards=• [Maiusc] per strisciare o muoversi in giù +• Mouse wheel or [0]-[9] to select item=• Rotella del mouse o [0]-[9] per scegliere un oggetto +• Left-click to mine blocks or attack=• Click sinistro per scavare i blocchi o attaccare +• Recover from swings to deal full damage=• Riprendersi dall'oscillazione per infliggere un danno completo +• Right-click to build blocks and use things=• Click destro per costruire blocchi e usare gli oggetti +• [I] for the inventory=• [I] per aprire l'inventario +• First items in inventory appear in hotbar below=• I primi oggetti nell'inventario compaiono nella barra di uso frequente sottostante +• [F9] for the minimap=• [F9] per attivare la minimappa +• Put items into crafting grid (usually 3×3 grid) to craft=• Mettete gli oggetti nella griglia di assemblaggio (normalmente una griglia 3x3) per assemblare +• Use a crafting guide mod to learn crafting recipes or visit =• Usate una gruida di assemblaggio per imparare le ricette di assemblaggio o visitate +• Read entries in this help to learn the rest=• Leggete le voci in questa guida per imparare il resto +• [Esc] to close this window=• [Esc] per chiudere questa finestra +Minetest=Minetest +Minetest is a free software game engine for games based on voxel gameplay, inspired by InfiniMiner, Minecraft, and the like. Minetest was originally created by Perttu Ahola (alias “celeron55”).=Minetest è un programma gratuito che funge da motore di gioco per giochi basati sull'esperienza di gioco coi voxel, ispirato da InfiniMiner, Minecraft, e simili. Minetest in origine è stato creato da Perttu Ahola (cioè “celeron55”). +The player is thrown into a huge world made out of cubes or blocks. These cubes usually make the landscape they blocks can be removed and placed almost entirely freely. Using the collected items, new tools and other items can be crafted. Games in Minetest (also called “subgames”) can, however, be much more complex than this.=L'utente è gettat* in un enorme mondo fatto di cubi o blocchi. Questi cubi normalmente compongono il panorama e possono essere tolti o messi quasi completamente liberamente. Usando gli oggetti raccolti, si possono assemblare nuovi strumenti e altri oggetti. I giochi in Minetest (chiamati anche "subgame") possono, comunque, essere molto più complessi. +A core feature of Minetest is the built-in modding capability. Mods modify existing gameplay. They can be as simple as adding a few decorational blocks or be very complex by e.g. introducing completely new gameplay concepts, generating a completely different kind of world, and many other things.=Una caratteristica centrale di Minetest è la capacità integrata di usare moduli. I moduli modificano l'esperienza di gioco esistente. Possono essere tanto semplici da aggiungere qualche blocco decorativo o essere molto complessi, per esempio introducendo concetti di gioco totalmente nuovi, generare un tipo di mondo completamente diverso, e molte altre cose. +Minetest can be played alone or online together with multiple players. Online play will work out of the box with any mods, with no need for additional software as they are entirely provided by the server.=Minetest può essere giocato localmente o in rete assieme a più utenti. Il gioco in rete funzionerà immediatamente senza nessun modulo, senza bisogno di programmi aggiuntivi perché interamente forniti dal server. +Minetest is usually bundled with a simple default game, named “Minetest Game” (shown in images 1 and 2). You probably already have it. Other games for Minetest can be downloaded from the official Minetest forums .=Minetest generalmente include un gioco predefinito semplice, chiamato "Minetest Game" (mostrato nelle immagini 1 e 2). Probabilmente lo avete già. Altri giochi per Minetest possono essere scaricati dai forum ufficiali di Minetest . +Sneaking=Strisciare +Sneaking makes you walk slower and prevents you from falling off the edge of a block.=Strisciare vi fa camminare più lentamente e vi impedisce di cadere dal bordo di un blocco. +To sneak, hold down the sneak key (default: [Shift]). When you release it, you stop sneaking. Careful: When you release the sneak key at a ledge, you might fall!=Per strisciare, tenete premuto il tasto per strisciare (predefinito [Maiusc]). Quando lo rilasciate, smettete di strisciare. Fate attenzione: quando rilasciate il tasto per strisciare vicino a un orlo, potreste cadere! +• Sneak: [Shift]=• Strisciare: [Maiusc] +Sneaking only works when you stand on solid ground, are not in a liquid and don't climb.=È possibile strisciare solo quando siete su un terreno solido, non siete in un liquido e non vi state arrampicando. +Sneaking might be disabled by mods. In this case, you still walk slower by sneaking, but you will no longer be stopped at ledges.=Lo strisciare potrebbe essere disabilitato da dei moduli. In questo caso, strisciando camminerete comunque più lentamente, ma non verrete più fermat* agli orli. +Controls=Controlli +These are the default controls:=Questi sono i controlli predefiniti: +Basic movement:=Movimento di base: +• Moving the mouse around: Look around=• Spostando il mouse in giro: guardarsi attorno +• W: Move forwards=• W: fa avanzare +• A: Move to the left=• A: sposta a sinistra +• D: Move to the right=• D: sposta a destra +• S: Move backwards=• S: fa indietreggiare +While standing on solid ground:=Stando su di un terreno solido: +• Space: Jump=• Spazio: saltare +• Shift: Sneak=• Maiusc: strisciare +While on a ladder, swimming in a liquid or fly mode is active=Stando su di una scala a pioli, nuotando in un liquido o mentre è attiva la modalità di volo +• Space: Move up=• Spazio: fa salire +• Shift: Move down=• Maiusc: fa scendere +Extended movement (requires privileges):=Movimento esteso (richiede privilegi): +• J: Toggle fast mode, makes you run or fly fast (requires “fast” privilege)=• J: Attiva o disattiva la modalità veloce, vi fa correre o volare velocemente (richiede il privilegio “fast”) +• K: Toggle fly mode, makes you move freely in all directions (requires “fly” privilege)=• K: Attiva o disattiva la modalità di volo, vi fa muovere liberamente in tutte le direzioni (richiede il privilegio “fly”) +• H: Toggle noclip mode, makes you go through walls in fly mode (requires “noclip” privilege)=• H: Attiva o disattiva la modalità incorporea, in modalità volo vi fa passare attraverso i muri (richiede il privilegio “noclip”) +• E: Walk fast in fast mode=• E: Camminare velocemente in modalità veloce +World interaction:=Interazione col mondo: +• Left mouse button: Punch / mine blocks / take items=• Pulsante sinistro del mouse: colpire / scavare blocchi / prendere oggetti +• Right mouse button: Build or use pointed block=• Pulsante destro del mouse: costruire o usare il blocco puntato +• Shift+Right mouse button: Build=• Maiusc + pulsante destro del mouse: costruire +• Roll mouse wheel: Select next/previous item in hotbar=• Ruotare la rotella del mouse: selezionare il prossimo/precedente oggetto nella barra di uso frequente +• 0-9: Select item in hotbar directly=• 0-9: selezionare direttamente un oggetto nella barra di uso frequente +• Q: Drop item stack=• Q: lasciare una pila di oggetti +• Shift+Q: Drop 1 item=• Maiusc + Q: lasciare un oggetto +• I: Show/hide inventory menu=• I: mostrare/nascondere il menu dell'inventario +Inventory interaction:=Interazione con l'inventario: +See the entry “Basics > Inventory”.=Si veda la voce “Nozioni di base > Inventario” +Camera:=Telecamera: +• Z: Zoom (requires “zoom” privilege)=• Z: ingrandimento (richiede il privilegio “zoom”) +• F7: Toggle camera mode=• F7: cambiare la modalità della telecamera +• F8: Toggle cinematic mode=• F8: attiva/disattiva la modalità cinematic +Interface:=Interfaccia: +• Esc: Open menu window (pauses in single-player mode) or close window=• Esc: apre la finestra del menu (in modalità gioco locale mette in pausa) o chiude la finestra +• F1: Show/hide HUD=• F1: mostra/nasconde il visore +• F2: Show/hide chat=• F2: mostra/nasconde la messaggistica +• F9: Toggle minimap=• F9: attiva o disattiva la minimappa +• Shift+F9: Toggle minimap rotation mode=• Maiusc + F9: cambia la modalità di rotazione della minimappa +• F10: Open/close console/chat log=• F10: apre/chiude il registro della console/messaggistica +• F12: Take a screenshot=• F12: scatta un'istantanea +Server interaction:=Interazione col server +• T: Open chat window (chat requires the “shout” privilege)=• T: apre la finestra di messaggistica (la messaggistica richiede il privilegio “shout”) +• /: Start issuing a server command)=• /: precede l'invio di un comando al server +Technical:=Tecnici: +• R: Toggle far view (disables all fog and allows viewing far away, can make game very slow)=• R: attiva/disattiva la vista lontana (disabilita la nebbia e permette di vedere distante, può rendere il gioco molto lento) +• +: Increase minimal viewing distance=• +: aumenta la distanza visiva minima +• -: Decrease minimal viewing distance=• -: diminuisce la distanza visiva minima +• F3: Enable/disable fog=• F3: abilita/disabilita la nebbia +• F5: Enable/disable debug screen which also shows your coordinates=• F5: abilita/disabilita la schermata di debug che mostra anche le vostre coordinate +• F6: Only useful for developers. Enables/disables profiler=• F6: utile solo per sviluppatori/trici. Abilita/disabilita il generatore di profili +Players=Utenti +Players (actually: “player characters”) are the characters which users control.=Gli utenti (in realtà: “personaggi utente”) sono i personaggi controllati dagli/dalle utenti. +Players are living beings which occupy a space of about 1×2×1 cubes. They start with 20 health points (HP) and 10 breath points (BP).=Gli/le utenti sono entità viventi che occupano uno spazio di circa 1x2x1 cubi. Iniziano con venti punti salute (PS) e dieci punti ossigeno (PO). +Players are capable of walking, sneaking, jumping, climbing, swimming, diving, mining, building, fighting and using tools and blocks.=Gli/le utenti sono in grado di camminare, strisciare, saltare, arrampicarsi, nuotare, immergersi, scavare, costruire, combattere e di usare strumenti e blocchi. +Players can take damage for a variety of reasons, here are some:\n• Taking fall damage\n• Touching a block which causes direct damage\n• Drowning\n• Being attacked by another player\n• Being attacked by a computer enemy=Gli/le utenti possono ferirsi per una serie di motivi, eccone alcune:\n• Cadendo\n• Toccando un blocco che danneggia\n• Affogando\n• Vendendo attaccat* da un* altr* utente\n• Vendendo attaccat* da un* nemic* controllato dal computer +At a health of 0, the player dies. The player can just respawn in the world.=A salute pari a 0, il/la utente muore. Il/la utente può solo ricomparire nel mondo. +Other consequences of death depend on the subgame. The player could lose all items, or lose the round in a competitive game.=Altre conseguenze della morte dipendono dal gioco. Il/la utente potrebbe perdere tutti gli oggetti, o perdere il turno in un gioco di competizione. +Some blocks reduce breath. While being with the head in a block which causes drowning, the breath points are reduced by 1 for every 2 seconds. When all breath is gone, the player starts to suffer drowning damage. Breath is quickly restored in any other block.=Alcuni blocchi riducono l'ossigeno. Stando con la testa in un blocco che causa l'annegamento, i punti ossigeno vengono ridotti di uno ogni due secondi. Quando tutto l'ossigeno è finito, il/la utente inizia a subire il ferimento da annegamento. L'ossigeno viene ripristinato rapidamente in ogni altro blocco. +Damage can be disabled on any world. Without damage, players are immortal and health and breath are unimportant.=Il ferimento può essere disabilitato in qualunque mondo. Senza ferimento, gli/le utenti sono immortali, e salute e ossigeno non hanno importanza. +In multi-player mode, the name of other players is written above their head.=Durante il gioco in rete, il nome degli/delle altr* giocatori/trici è scritto sopra la loro testa. +Items=Oggetti +Items are things you can carry along and store in inventories. They can be used for crafting, smelting, building, mining, and more. Types of items include blocks, tools, weapons and items only used for crafting.=Gli oggetti sono cose che potete trasportare e immagazzinare negli inventari. Possono essere usati per assemblare, fondere, costruire, scavare, e altro. Tipologie di oggetti includono blocchi, strumenti, armi, e oggetti usati solo per l'assemblaggio. +An item stack is a collection of items of the same type which fits into a single item slot. Item stacks can be dropped on the ground. Items which drop into the same coordinates will form an item stack.=Una pila di oggetti è una raccolta di oggetti dello stesso tipo che sta in un unico scomparto per oggetti. Le pile di oggetti possono essere lasciate a terra. Gli oggetti che si lasciano alle stesse coordinate formeranno una pila di oggetti. +Items have several properties, including the following:\n\n• Maximum stack size: Number of items which fit on 1 item stack\n• Pointing range: How close things must be to be pointed while wielding this item\n• Group memberships: See “Basics > Groups”\n• May be used for crafting or cooking=Gli oggetti possiedono diverse proprietà, incluse le seguenti:\n\n• Dimensione massima della pila: il numero di oggetti che stanno in una pila di oggetti\n• Raggio di puntamento: quanto vicino devono essere le cose per essere puntate mentre si impugna questo oggetto\n• Appartenenza a gruppi: si veda “Nozioni di base > Gruppi”\n• Possono essere usati per assemblare o cucinare +A dropped item stack can be collected by punching it.=Una pila di oggetti lasciata a terra può essere raccolta colpendola. +Tools=Strumenti +Some items may serve as a tool when wielded. Any item which has some special use which can be directly used by its wielder is considered a tool.=Alcuni oggetti possono servire come strumento quando vengono impugnati. Ogni oggetto che possiede qualche uso speciale che può essere utilizzato da chi lo impugna è considerato uno strumento. +A common tool in Minetest are, of course, mining tools. These are important to break all kinds of blocks. Weapons are a kind of tool in Minetest. There are of course many other possible tools. Special actions of tools are usually done by left-click or right-click.=Uno strumento comune in Minetest sono, naturalmente, gli strumenti di scavo. Questi sono importanti per rompere tutti i tipi di blocchi. In Minetest le armi in sono un tipo di strumento. Certamente ci sono molti altri strumenti possibili. Le azioni speciali degli oggetti di solito sono eseguite cliccando il pulsante sinistro o destro. +When nothing is wielded, players use their hand which may act as tool and weapon. The hand is capable of collecting dropped items by punching.=Quando non si impugna nulla, gli/le utenti usano la loro mano che può fungere come strumento e arma. La mano può raccogliere gli oggetti lasciati a terra colpendoli. +Many tools will wear off when using them and may eventually get destroyed. The damage is displayed in a damage bar below the tool icon. If no damage bar is shown, the tool is in mint condition. Tools may be repairable by crafting, see “Basics > Crafting”.=Molti strumenti si consumeranno usandoli e alla fine potrebbero rompersi. L'usura è mostrata in una barra sotto all'icona dello strumento. Se non è mostrata nessuna barra di usura, lo strumento è nuovo di zecca. Gli strumenti potrebbero essere riparabili tramite l'assemblaggio, si veda “Nozioni di base > Assemblaggio”. +Weapons=Armi +Some items are usable as a melee weapon when wielded. Weapons share most of the properties of tools.=Alcuni oggetti sono utilizzabili come armi bianche quando sono impugnati. Le armi condividono la maggior parte delle proprietà degli strumenti. +Melee weapons deal damage by punching players and other animate objects. There are two ways to attack:=Le armi bianche infliggono ferite colpendo i/le utenti e gli altri oggetti animati. Ci sono due modi per attaccare: +• Single punch: Left-click once to deal a single punch=• Colpo singolo: cliccate una volta il pulsante sinistro per sferrare un colpo singolo +• Quick punching: Hold down the left mouse button to deal quick repeated punches=• Colpo rapido: tenete premuto il pulsante sinistro del mouse per sferrare colpi rapidi ripetuti +There are two core attributes of melee weapons:=Esistono due attributi principali delle armi bianche: +• Maximum damage: Damage which is dealt after a hit when the weapon was fully recovered)=• Danno massimo: il ferimento inferto dopo un colpo quando l'arma è stata ritratta completamente +• Full punch interval: Time it takes for fully recovering from a punch=• Intervallo di colpo completo: il tempo richiesto per ritrarre completamente da un colpo +A weapon only deals full damage when it has fully recovered from a previous punch. Otherwise, the weapon will deal only reduced damage. This means, quick punching is very fast, but also deals rather low damage. Note the full punch interval does not limit how fast you can attack.=Un'arma infligge una ferita completa solo quando è stata ritratta completamente dal colpo precedente. Altrimenti, l'arma infliggerà solo un ferimento ridotto. Ciò significa, colpire rapidamente è molto veloce, però infligge ferite piuttosto basse. Si noti che l'intervallo di colpo completo non limita la vostra velocità di attacco. +There is a rule which sometimes makes attacks impossible: Players, animate objects and weapons belong to damage groups. A weapon only deals damage to those who share at least one damage group with it. So if you're using the wrong weapon, you might not deal any damage at all.=C'è una regola che a volte rende impossibili gli attacchi: utenti, oggetti animati e armi appartengono a gruppi di ferimento. Un'arma infligge ferite a quell* che condividono con essa almeno un gruppo di ferimento. Perciò se state usando l'arma sbagliata, potreste non infliggere ferite affatto. +Pointing=Puntare +“Pointing” means looking at something in range with the crosshair. Pointing is needed for interaction, like mining, punching, using, etc. Pointable things include blocks, dropped items, players, computer enemies and objects.=“Puntare” significa guardare qualcosa entro il raggio del mirino. Puntare è necessario per l'interazione, come scavare, colpire, usare, ecc. Le cose puntabili includono blocchi, oggetti lasciati a terra, utenti, nemic* controllat* dal computer e oggetti. +To point something, it must be in the pointing range (also just called “range”) of your wielded item. There's a default range when you are not wielding anything. A pointed thing will be outlined or highlighted (depending on your settings). Pointing is not possible with the 3rd person front camera.=Per puntare qualcosa, deve essere nel raggio di puntamento (chiamato anche solo “raggio”) del vostro oggetto impugnato. +A few things can not be pointed. Most blocks are pointable. A few blocks, like air, can never be pointed. Other blocks, like liquids can only be pointed by special items.=Un po' di cose non possono essere puntate. La maggior parte dei blocchi sono puntabili. Pochi blocchi, come l'aria, non possono mai essere puntati. Altri blocchi, come i liquidi, possono essere puntati solo da oggetti speciali. +Camera=Telecamera +Minetest has 3 different views which determine the way you see the world. The modes are:\n\n• 1: First-person view (default)\n• 2: Third-person view from behind\n• 3: Third-person view from the front=Minetest possiede tre visuali diverse che stabiliscono il modo in cui vedete il mondo. Le modalità sono:\n\n• 1: Visuale in prima persona (predefinita)\n• 2: Visuale in terza persona da dietro\n• 3: Visuale in terza persona da davanti +You can change the camera mode by pressing [F7].=Potete cambiare la modalità della telecamera premendo [F7]. +By holding down [Z], you can zoom the view at your crosshair. You need the “zoom” privilege to do this.=Tenendo premuto il tasto [Z], potete ingrandire la visuale del vostro mirino. Per fare ciò vi serve il privilegio “zoom”. +• Switch camera mode: [F7]=• Cambiare modalità della telecamera: [F7] +• Zoom: [Z]=• Ingrandimento: [Z] +Blocks=Blocchi +The world of Minetest is made entirely out of blocks (voxels, to be precise). Blocks can be added or removed with the correct tools.=Il mondo di Minetest è fatto interamente di blocchi (voxel, per la precisione). I blocchi possono essere messi o tolti per mezzo degli strumenti adatti. +Blocks can have a wide range of different properties which determine mining times, behavior, looks, shape, and much more. Their properties include:=I blocchi possono avere un ampio spettro di proprietà differenti che stabiliscono tempi di scavo, comportamento, aspetto, forma e molto altro. Le loro proprietà includono: +• Collidable: Collidable blocks can not be passed through; players can walk on them. Non-collidable blocks can be passed through freely=• Urtabile: non si può passare attraverso i blocchi urtabili; gli/le utenti possono camminare su di essi. I blocchi non urtabili possono essere attraversati liberamente +• Pointable: Pointable blocks show a wireframe or a halo box when pointed. But you will just point through non-pointable blocks. Liquids are usually non-pointable but they can be pointed at by some special tools=• Puntabile: i blocchi puntabili mostrano una cornice o una scatola luminescente quando vengono puntati. Ma nel caso di blocchi non puntabili potrete solo puntare attraverso di essi. I liquidi normalmente non sono puntabili, ma possono essere puntati da alcuni strumenti speciali. +• Mining properties: By which tools it can be mined, how fast and how much it wears off tools=• Proprietà di scavo: tramite quali strumenti possono essere scavati, quanto velocemente e quanto usurano gli strumenti +• Climbable: While you are at a climbable block, you won't fall and you can move up and down with the jump and sneak keys=• Scalabile: mentre siete su di un blocco scalabile, non cadrete e potrete muovervi su e giù con i tasti di salto e strisciamento +• Drowning damage: See the entry “Basics > Player”=• Ferimento da annegamento: si veda la voce “Nozioni di base > Utenti” +• Liquids: See the entry “Basics > Liquids”=• Liquidi: si veda la voce “Nozioni di base > Liquidi” +• Group memberships: Group memberships are used to determine mining properties, crafting, interactions between blocks and more=• Appartenenze a gruppi: le appartenenze ai gruppi sono usate per stabilire le proprietà di scavo, assemblaggio, l'interazione tra blocchi e altro +Mining=Scavo +Mining (or digging) is the process of breaking blocks to remove them. To mine a block, point it and hold down the left mouse button until it breaks.=Scavare (o minare) è il processo di rompere i blocchi per toglierli. Per scavare un blocco, puntatelo e tenete premuto il pulsante sinistro del mouse finché si rompe. +Short explanation:=Spiegazione breve: +Blocks require a mining tool to be mined. Different blocks are mined by different mining tools, and some blocks can not be mined by any tool. Blocks vary in toughness and tools vary in strength. Mining tools will wear off over time. The mining time and the tool wear depend on the block and the mining tool. The fastest way to find out how efficient your mining tools are is by just trying them out on various blocks. Any items you gather by mining go straight into your inventory.=Per scavare un blocco servono degli strumenti di scavo. Blocchi differenti si scavano con strumenti di scavo diversi, e alcuni blocchi non possono essere scavati da nessuno strumento. I blocchi variano in durezza e gli strumenti variano in forza. Gli strumenti di scavo si usurano nel tempo. Il tempo di scavo e l'usura dello strumento dipendono dal blocco e dallo strumento di scavo. Il modo più veloce di scoprire quanto sono efficienti i vostri strumenti di scavo è quello di provarli su diversi blocchi. Ogni oggetto che ottenete scavando va direttamente nel vostro inventario. +Detailed explanation:=Spiegazione dettagliata: +Mineable blocks have mining properties (based on groups) and a toughness level. Mining tools have the same properties. Each mining property of a block also has a rating, while tools can be able to break blocks within a range of ratings.=I blocchi scavabili possiedono proprietà di scavo (basate sui gruppi) e un livello di durezza. Gli strumenti di scavo possiedono le stesse proprietà. Ogni proprietà di scavo di un blocco ha anche un grado, mentre gli strumenti possono rompere blocchi all'interno di una scala di gradi. +In order to mine a block, these conditions need to be met:=Per scavare un blocco, è necessario soddisfare queste condizioni: +• The block and tool share at least one mining property for which they have a matching rating=• Il blocco e lo strumento condividono almeno una proprietà di scavo per la quale possiedono un grado corrispondente +• The tool's toughness level is equal or less than the block's toughness level=• Il livello di durezza dello strumento è uguale o inferiore alla durezza del blocco +Example: A block with the mining property “cracky”, rating 3 and toughness level 0 can only be broken by a tool which is able to break “cracky” blocks at rating 3 and it must have a toughness level of 0 or larger.=Esempio: un blocco avente la proprietà “cracky”, di grado 3 e un livello di durezza 0 può essere rotto solo da uno strumento che è in grado di rompere blocchi “cracky” di grado 3 e deve avere un livello di durezza pari a 0 o maggiore. +The time it takes to mine a block depends on the ratings and the toughness levels of both tool and block.=Il tempo necessario per scavare un blocco dipende dal grado e dal livello di durezza sia dello strumento che del blocco. +• The base mining time depends on the ratings of the block and the mining speed of the tool=• Il tempo base di scavo dipende dai gradi del blocco e dalla velocità di scavo dello strumento +• The mining speed of the tool differs for each mining property and its rating=• La velocità di scavo dello strumento varia per ogni proprietà di scavo ed il suo grado +• The toughness level further modifies the mining speed for this mining proeprty=• Il livello di durezza modifica ulteriormente la velocità di scavo per questa proprietà di scavo +• A high difference in toughness levels decreases the mining time considerably=• Una elevata differenza in livelli di durezza diminuisce considerevolmente il tempo di scavo +• If the toughness level difference is 2, the mining time is half of the base mining time=• Se la differenza del livello di durezza è pari a 2, il tempo di scavo è la metà del tempo di base di scavo +• If the a difference of 3, the mining time is a third, and so on=• Se la differenza è pari a 3, il tempo di scavo è un terzo, e così via +The item help shows the mining times of a tool listed by its mining properties and its ratings. The mining times are often expressed as a range. The low number stands for the mining time for toughness level 0 and the high number for the highest level the tool can mine.=L'aiuto sull'oggetto mostra i tempi di scavo di uno strumento, elencati dalle sue proprietà di scavo e dai suoi gradi. I tempi di scavo sono spesso espressi come un ventaglio. Il numero basso sta per il tempo di scavo per il livello di durezza 0 e il numero alto sta per il livello massimo che lo strumento può scavare. +Mining usually wears off tools. Each time you mine a block, your tool takes some damage until it is destroyed eventually. The wear per mined block determined by the difference between the tool's toughness level and the block's toughness level. The higher the difference, the lower the wear. This means:=Normalmente scavare usura gli strumenti. Ogni volta che scavate un blocco, il vostro strumento viene danneggiato un po' finché alla fine si rompe. L'usura per ciascun blocco scavato è stabilita dalla differenza tra il livello di durezza dello strumento e quello del blocco. Maggiore è la differenza, minore è l'usura. Ciò significa: +• High-level blocks wear off your tools faster=• Blocchi di alto livello usurano i vostri strumenti più velocemente +• You can use high-level tools to compensate this=• Per compensare ciò potete usare strumenti di alto livello +• The highest wear is caused when the level of both tool and block are equal=• L'usura maggiore è causata quando il livello di strumento e blocco sono uguali +After mining, a block may leave a “drop” behind. This is a number of items you get after mining. Most commonly, you will get the block itself. There are other possibilities for a drop which depends on the block type. The following drops are possible:=Dopo averlo scavato, un blocco potrebbe lasciarsi alle spalle un “rilascio”. Questo è un numero di oggetti che ottenete dopo avere scavato. Più comunemente, otterrete il blocco stesso. Ci sono altre possibilità per un rilascio che dipendono dal tipo di blocco. I rilasci seguenti sono possibili: +• Always drops itself (the usual case)=• Rilascia sempre sé stesso (il caso normale) +• Always drops the same items=• Rilascia sempre gli stessi oggetti +• Drops items based on probability=• Rilascia oggetti in base a probabilità +• Drops nothing=• Non rilascia niente +The drop goes directly into your inventory, unless there's no more space left. In that case, the items literally drop on the floor.=Il rilascio va direttamente nel vostro inventario, a meno che non ci sia più spazio. In quel caso, l'oggetto cade per terra. +Building=Costruzione +Almost all blocks can be built (or placed). Building is very simple and has no delay.=Quasi tutti i blocchi possono essere costruiti (o posizionati). Costruire è molto semplice e non ha ritardo. +To build your wielded block, point at a block in the world and right-click. If this is not possible because the pointed block has a special right-click action, hold down the sneak key before right-clicking.=Per posizionare il blocco che state impugnando, puntate ad un blocco nel mondo e cliccate col pulsante destro. Se ciò non è possibile perché il blocco puntato ha una azione speciale legata al pulsante destro, tenete premuto il tasto per strisciare prima di cliccare col pulsante destro. +Blocks can almost always be built at pointable blocks. One exception are blocks attached to the floor; these can only be built on the floor.=I blocchi possono essere piazzati quasi sempre sui blocchi puntabili. Una eccezione sono i blocchi attaccati al pavimento; questi possono essere costruiti solo sul pavimento. +Normally, blocks are built in front of the pointed side of the pointed block. A few blocks are different: When you try to build at them, they are replaced.=Normalmente, i blocchi vengono posizionati di fronte al lato puntato del blocco puntato. Pochi blocchi sono differenti: quando tentate di costruirci, vengono rimpiazzati. +Liquids=Liquidi +Liquids are special dynamic blocks. Liquids like to spread and flow to their surrounding blocks. Players can swim and drown in them.=I liquidi sono blocchi speciali dinamici. Ai liquidi piace espandersi e fluire verso i blocchi circostanti. Gli/le utenti possono affogarci. +Liquids usually come in two forms: In source form (S) and in flowing form (F).=I liquidi normalmente sono di due tipi: il tipo fonte (S) e il tipo corrente (F). +Liquid sources have the shape of a full cube. A liquid source will generate flowing liquids around it from time to time, and, if the liquid is renewable, it also generates liquid sources. A liquid source can sustain itself. A long it is left alone, a liquid source will normally keep its place and does not drain out.=Le fonti di liquidi hanno la forma di un piccolo cubo. Una fonte di liquidi di tanto in tanto produrrà intorno a sé dei liquidi correnti, e, se il liquido è rinnovabile, produrrà anche fonti di liquidi. Una fonte di liquidi può sostenersi. Finché è lasciata stare, normalmente una fonte di liquidi manterrà il suo posto e non si prosciugherà. +Flowing liquids take a sloped form. Flowing liquids spread around the world until they drain. A flowing liquid can not sustain itself and always comes from a liquid source, either directly or indirectly. Without a liquid source, a flowing liquid will eventually drain out and disappear.=I liquidi correnti assumono una forma inclinata. I liquidi correnti si espandono per il mondo finché si prosciugano. Un liquido corrente non può sostenersi e proviene sempre da una fonte di liquidi, o direttamente o indirettamente. Senza una fonte di liquidi, alla fine un liquido corrente si prosciugherà e sparirà. +All liquids share the following properties:=Tutti i liquidi condividono le proprietà seguenti: +• All properties of blocks (including drowning damage=• Tutte le proprietà dei blocchi (incluso il ferimento da annegamento) +• Renewability: Renewable liquids can create new sources=• Rinnovabilità: i liquidi rinnvabili possono creare nuove fonti +• Flowing range: How many flowing liquids are created at maximum per liquid source, it determines how far the liquid will spread. Possible are ranges from 0 to 8. At 0, no flowing liquids will be created. Image 5 shows a liquid of flowing range 2=• Raggio di flusso: quanti liquidi correnti sono creati al massimo da una fonte di liquidi, stabilisce quanto lontano si espanderà il liquido. Sono possibili raggi da 0 a 8. A 0, non sarà creato nessun liquido corrente. L'immagine 5 mostra un liquido con raggio di flusso pari a 2 +• Viscosity: How slow players move through it and how slow the liquid spreads=• Viscosità: quanto lentamente si muovono gli/le utenti in esso e quanto lentamente si espande il liquido +Renewable liquids create new liquid sources at open spaces (image 2). A new liquid source is created when:\n• Two renewable liquid blocks of the same type touch each other diagonally\n• These blocks are also on the same height\n• One of the two “corners” is open space which allows liquids to flow in=I liquidi rinnovabili generano nuove fonti di liquidi negli spazi aperti (immagine 2). Una nuova fonte di liquidi viene creata quando:\n• Due blocchi di liquidi rinnovabili dello stesso tipo si toccano l'un l'altro diagonalmente\n• Questi blocchi sono anche alla stessa altezza\n• Uno dei due “angoli” è uno spazio aperto che consente ai liquidi di scorrervi dentro +When those criteria are met, the open space is filled with a new liquid source of the same type (image 3).=Quando questi criteri sono soddisfatti, lo spazio aperto viene riempito con una nuova fonte di liquidi dello stesso tipo (immagine 3). +Swimming in a liquid is fairly straightforward: The usual direction keys for basic movement, the jump key for rising and the sneak key for sinking.=Nuotare in un liquido è abbastanza semplice: i soliti tasti direzionali per il movimento di base, il tasto di salto per emergere e il tasto strisciare per immergersi. +The physics for swimming and diving in a liquid are:=Le regole fisiche per nuotare e immergersi in un liquido sono: +• The higher the viscosity, the slower you move=• Maggiore è la viscosità, più lentamente vi muoverete +• If you rest, you'll slowly sink=• Se vi riposate, affonderete lentamente +• There is no fall damage for falling into a liquid as such=• Non c'è nessun ferimento da caduta alla caduta in un liquido in quanto tale +• If you fall into a liquid, you will be slowed down on impact (but don't stop instantly). Your impact depth is determined by your speed and the liquid viscosity. For a safe high drop into a liquid, make sure there is enough liquid above the ground, otherwise you might hit the ground and take fall damage=• Se cadete in un liquido, verrete rallentat* all'impatto (ma non vi fermerete immediatamente). La profondità del vostro impatto è determinata dalla vostra velocità e dalla viscosità del liquido. Per un tuffo sicuro in un liquido da grande altezza, assicuratevi che ci sia abbastanza liquido sopra il terreno, altrimenti potreste colpire il terreno e subire il ferimento da caduta. +Liquids are often not pointable. But some special items are able to point all liquids.=Spesso i liquidi non sono puntabili. Ma alcuni oggetti speciali possono puntare tutti i liquidi. +Crafting=Assemblaggio +Crafting is the task of combining several items to form a new item.=L'assemblaggio è l'azione di combinare diversi oggetti per formarne uno nuovo. +To craft something, you need one or more items, a crafting grid (C) and a crafting recipe. A crafting grid is like a normal inventory which can also be used for crafting. Items need to be put in a certain pattern into the crafting grid. Next to the crafting grid is an output slot (O). Here the result will appear when you placed items correctly. This is just a preview, not the actual item. Crafting grids can come in different sizes which limits the possible recipes you can craft.=Per assemblare qualcosa, vi servono uno o più oggetti, una griglia di assemblaggio (C) e una ricetta di assemblaggio. Una griglia di assemblaggio è come un comune inventario che può anche essere usata per assemblare. Gli oggetti devono essere messi nella griglia di assemblaggio secondo una certa disposizione. Vicino alla griglia di assemblaggio c'è la casella del prodotto (O). Lì comparirà il risultato quando avrete disposto correttamente gli oggetti. Quella è solo un'anteprima, non il vero oggetto. Le griglie di assemblaggio possono essere di varie dimensioni che limitano le possibili ricette che potete assemblare. +To complete the craft, take the result item from the output slot, which will consume items from the crafting grid and creates a new item. It is not possible to place items into the output slot.=Per completare l'assemblaggio, prendete dalla casella del prodotto l'oggetto risultante, così facendo consumerete gli oggetti disposti nella griglia di assemblaggio creando il nuovo oggetto. Non è possibile posizionare oggetti nella casella del prodotto. +A description on how to craft an item is called a “crafting recipe”. You need this knowledge to craft. There are multiple ways to learn crafting recipes. One way is by using a crafting guide, which contains a list of available crafting recipes. Some subgames provide crafting guides. There are also some mods which you can download online for installing a crafting guide. Another way is by reading the online manual of the subgame (if one is available).=La descrizione di come si assembla un oggetto è chiamata “ricetta di assemblaggio”. Per assemblare vi servirà questa conoscenza. Esistono svariati modi per imparare le ricette di assemblaggio. Un modo è usare una guida di assemblaggio, che contiene un elenco delle ricette di assemblaggio disponibili. Alcuni giochi forniscono guide di assemblaggio. Esistono anche alcuni moduli che potete scaricare dalla rete per installare una guida di assemblaggio. Un altro modo è leggere il manuale in rete del gioco (se questo è disponibile). +Crafting recipes consist of at least one input item and exactly one stack of output items. When performing a single craft, it will consume exactly one item from each stack of the crafting grid, unless the crafting recipe defines replacements.=Le ricette di assemblaggio sono formate da almeno un oggetto iniziale ed esattamente una pila di oggetti finali. Quando si esegue un assemblaggio singolo, questo consumerà esattamente un oggetto dalla griglia di assemblaggio, a meno che la ricetta di assemblaggio stabilisca dei rimpiazzi. +There are multiple types of crafting recipes:\n\n• Shaped (image 2): Items need to be placed in a particular shape\n• Shapeless (images 3 and 4): Items need to be placed somewhere in input (both images show the same recipe)\n• Cooking: Explained in “Basics > Cooking”\n• Repairing (image 5): Place two damaged tools into the crafting grid anywhere to get a tool which is repaired by a certain percentage. This recipe may not be available in all subgames=Esistono tipi multipli di ricette di assemblaggio:\n\n• Con una forma (immagine 2): gli oggetti devono essere disposti nella griglia secondo un ordine particolare\n• Senza una forma (immagini 3 e 4): gli oggetti devono essere messi da qualche parte nella griglia (entrambe le immagini mostrano la stessa ricetta)\n• Cottura: spiegata in “Nozioni di base > Cottura”\n• Riparazione (immagine 5): mettete nella griglia due strumenti usurati in punti qualsiasi per ottenere uno strumento riparato per una certa percentuale. Questa ricetta potrebbe non essere disponibile in tutti i giochi +In some crafting recipes, some input items do not need to be a concrete item, instead they need to be a member of a group (see “Basics > Groups”). These recipes offer a bit more freedom in the input items. Images 6-8 show the same group-based recipe. Here, 8 items of the “stone” group are required, which is true for all of the shown items.=In alcune ricette di assemblaggio, alcuni oggetti iniziali non devono essere un oggetto preciso, devono essere invece membri di un gruppo (si veda “Nozioni di base > Gruppi”). Queste ricette offrono una maggiore libertà per gli oggetti iniziali. Le immagini 6-8 mostrano la stessa ricetta basata sui gruppi. In questa, servono otto oggetti del gruppo “stone” (“pietra”), cosa valida per tutti gli oggetti mostrati. +Rarely, crafting recipes have replacements. This means, whenever you perform a craft, some items in the crafting grid will not be consumed, but instead will be replaced by another item.=Raramente, le ricette di assemblaggio hanno dei rimpiazzi. Questo significa, ogni volta che eseguite un assemblaggio, alcuni oggetti nella griglia di assemblaggio non verranno consumati, ma invece verranno rimpiazzati da un altro oggetto. +Cooking=Cottura +Cooking (or smelting) is a form of crafting which does not involve a crafting grid. Cooking is done with a special block (like a furnace), an cookable item, a fuel item and time in order to yield a new item.=La cottura (o fusione) è una forma di creazione che non coinvolge una griglia di assemblaggio. La cottura viene eseguita con un blocco speciale (come una fornace), un oggetto cucinabile, un oggetto combustibile e del tempo per ottenere un nuovo oggetto. +Each fuel item has a burning time. This is the time a single item of the fuel keeps a furnace burning.=Ciascun combustibile possiede un tempo di bruciatura. Questo è il tempo per cui un singolo oggetto di combustibile tiene accesa una fornace. +Each cookable item requires time to be cooked. This time is specific to the item type and the item must be “on fire” for the whole cooking time to actually yield the result.=Ciascun oggetto cucinabile richiede del tempo per essere cotto. Questo tempo è specifico per il tipo di oggetto, e l'oggetto deve essere “sulla fiamma” per l'intero tempo di cottura per produrre effettivamente il risultato. +Hotbar=Barra di uso frequente +At the bottom of the screen you see some squares. This is called the “hotbar”. The hotbar allows you to quickly access the first items from your player inventory.=Nella parte inferiore dello schermo si vedono alcuni riquadri. Questi sono chiamati “barra di uso frequente”. La barra di uso frequente vi permette di accedere rapidamente ai primi oggetti dell'inventario del vostro personaggio. +You can change the selected item with the mouse wheel or the number keys.=Potete cambiare l'oggetto selezionato con la rotella del mouse o i tasti numerici. +• Select previous item in hotbar: [Mouse wheel up]=• Selezionare l'oggetto precedente dalla barra di uso frequente: [Rotella del mouse in avanti] +• Select next item in hotbar: [Mouse wheel down]=• Selezionare l'oggetto successivo dalla barra di uso frequente: [Rotella del mouse indietro] +• Select item in hotbar directly: [0]-[9]=• Selezionare direttamente un oggetto dalla barra di uso frequente: [0]-[9] +The selected item is also your wielded item.=L'oggetto selezionato è anche l'oggetto impugnato. +Minimap=Minimappa +Press [F9] to make a minimap appear on the top right. The minimap helps you to find your way around the world. Press it again to select different minimap modes and zoom levels. The minimap also shows the positions of other players.=Premete [F9] per fare comparire una minimappa in alto a destra. La minimappa vi aiuta a trovare la vostra strada nel mondo. Premetelo ancora per selezionare modalità e livelli di ingrandimento differenti. La minimappa mostra anche la posizione degli/delle altre utenti. +There are 2 minimap modes and 3 zoom levels.=Esistono due modalità della minimappa e tre livelli di ingrandimento. +Surface mode (image 1) is a top-down view of the world, roughly resembling the colors of the blocks this world is made of. It only shows the topmost blocks, everything below is hidden, like a satellite photo. Surface mode is useful if you got lost.=La modalità di superficie (immagine 1) è una visuale del mondo dall'alto, rappresentante approssimativamente i colori dei blocchi di cui è composto questo mondo. Mostra solo i blocchi più elevati, ogni cosa al di sotto è nascosta, come nella foto scattata da un satellite. La modalità di superficie è utile se vi perdete. +Radar mode (image 2) is more complicated. It displays the “denseness” of the area around you and changes with your height. Roughly, the more green an area is, the less “dense” it is. Black areas have many blocks. Use the radar to find caverns, hidden areas, walls and more. The rectangular shapes in image 2 clearly expose the position of a dungeon.=La modalità radar (immagine 2) è più complessa. Mostra la “densità” dell'area che vi circonda e varia col variare della vostra altitudine. Grosso modo, più verde è l'area, e meno “compatta” è. Le aree nere possiedono molti blocchi. Usate il radar per trovare caverne, aree nascoste, muri e altro. Le forme rettangolari nell'immagine 2 rivelano chiaramente la posizione di un sotterraneo. +There are also two different rotation modes. In “square mode”, the rotation of the minimap is fixed. If you press [Shift]+[F9] to switch to “circle mode”, the minimap will instead rotate with your looking direction, so “up” is always your looking direction.=Esistono anche due modalità di rotazione diverse. Nella “modalità quadrata”, la rotazione della minimappa è fissa. Se premete [Maiusc]+[F9] per passare alla “modalità circolare”, la minimappa ruoterà invece con la vostra direzione di sguardo, perciò “su” è sempre la vostra direzione di sguardo. +In some subgames, the minimap may be disabled.=In alcuni giochi, la minimappa potrebbe essere disabilitata. +• Toggle minimap mode: [F9]=• Cambiare la modalità della minimappa: [F9] +• Toggle minimap rotation mode: [Shift]+[F9]=• Cambiare la modalità di rotazione della minimappa: [Maiusc]+[F9] +Inventories are used to store item stacks. There are other uses, such as crafting. An inventory consists of a rectangular grid of item slots. Each item slot can either be empty or hold one item stack. Item stacks can be moved freely between most slots.=Gli inventari sono usati per immagazzinare pile di oggetti. Esistono altri usi, come l'assemblaggio. Un inventario è composto da una griglia rettangolare di alloggi per oggetti. Ogni alloggio per oggetto può essere vuoto o contenere una pila di oggetti. Le pile di oggetti possono essere spostate liberamente nella maggior parte degli alloggi. +You have your own inventory which is called your “player inventory”, you can open it with the inventory key (default: [I]). The first inventory slots are also used as slots in your hotbar.=Voi avete il vostro inventario personale che è chiamato “inventario utente”, potete aprirlo con il tasto dell'inventario (predefinito: [I]). I primi alloggi dell'inventario sono anche usati come alloggi nella vostra barra di uso frequente. +Blocks can also have their own inventory, e.g. chests and furnaces.=Anche i blocchi possono avere il proprio inventario, per es. bauli e fornaci. +Inventory controls:=Controlli dell'inventario +Taking: You can take items from an occupied slot if the cursor holds nothing.=Prendere: potete prendere oggetti da un alloggio occupato se il cursore non sta tenendo nulla. +• Left click: take entire item stack=• Click sinistro: prende tutta la pila di oggetti +• Right click: take half from the item stack (rounded up)=• Click destro: prende metà della pila di oggetti (arrotondando) +• Middle click: take 10 items from the item stack=• Click centrale: prende dieci oggetti dalla pila di oggetti +Putting: You can put items onto a slot if the cursor holds 1 or more items and the slot is either empty or contains an item stack of the same item type.=Mettere: potete mettere oggetti in un alloggio se il cursore sta tenendo uno o più oggetti e se l'alloggio è vuoto o contiene una pila di oggetti dello stesso tipo. +• Left click: put entire item stack=• Click sinistro: mette una intera pila di oggetti +• Right click: put 1 item of the item stack=• Click destro: mette un oggetto della pila di oggetti +• Middle click: put 10 items of the item stack=• Click centrale: mette dieci oggetti della pila di oggetti +Exchanging: You can exchange items if the cursor holds 1 or more items and the destination slot is occupied by a different item type.= Scambiare: potete scambiare gli oggetti se il cursore sta tenendo uno o più oggetti e l'alloggio di destinazione è occupato da un tipo di oggetto differente. +• Click: exchange item stacks=• Click: scambiare le pile di oggetti +Throwing away: If you hold an item stack and click with it somewhere outside the menu, the item stack gets thrown away into the environment.=Gettare via: se state tenendo una pila di oggetti e cliccate con essa da qualche parte fuori dal menu, la pila di oggetti viene gettata nell'ambiente. +Quick transfer: You can quickly transfer an item stack to/from the player inventory to/from another item's inventory slot like a furnace, chest, or any other item with an inventory slot when that item's inventory is accessed. The target inventory is generally the most relevant inventory in this context.=Trasferimento rapido: potete trasferire rapidamente una pila di oggetti da/nell'inventario utente da/in un altro alloggio per oggetti di un inventario come quello di una fornace, un baule, o di ogni altro oggetto che abbia un alloggio per oggetti quando si accede all'inventario di quell'oggetto. In questo contesto generalmente l'inventario di destinazione è quello più importante. +• Sneak+Left click: Automatically transfer item stack=• Strisciare + click sinistro: trasferire automaticamente una pila di oggetti +Online help=Aiuto in rete +You may want to check out these online resources related to Minetest:=Potreste volere controllare queste risorse in rete collegate a Minetest: +Official homepage of Minetest: =Pagina ufficiale di Minetest: +The main place to find the most recent version of Minetest.=Il luogo principale dove trovare la versione più recente di Minetest. +Community wiki: =Wiki della comunità: +A community-based documentation website for Minetest. Anyone with an account can edit it! It also features a documentation of Minetest Game.=Un sito in rete di documentazione per Minetest basato sulla comunità. Chiunque abbia un account può modificarlo! Presenta anche una documentazione del Minetest Game. +Web forums: =Forum in rete: +A web-based discussion platform where you can discuss everything related to Minetest. This is also a place where player-made mods and subgames are published and discussed. The discussions are mainly in English, but there is also space for discussion in other languages.=Una piattaforma di discussione basata sulla rete dove potete discutere ogni cosa riguardante Minetest. Questo è anche il luogo dove sono pubblicati e discussi i moduli e i giochi fatti dagli/dalle utenti. Le conversazioni sono principalmente in Inglese, ma c'è spazio anche per le conversazioni in altre lingue. +Chat: =Messaggistica: +A generic Internet Relay Chat channel for everything related to Minetest where people can meet to discuss in real-time. If you do not understand IRC, see the Community Wiki for help.=Un canale Internet Relay Chat generico per tutto ciò che riguarda Minetest dove le persone possono incontrarsi per discutere in tempo reale. Se non capite IRC, leggete la Wiki della comunità per ottenere aiuto. +Groups=Gruppi +Items, players and objects (animate and inanimate) can be members of any number of groups. Groups serve multiple purposes:=Cose, utenti e oggetti (animati e inanimati) possono essere membri di qualunque numero di gruppi. I gruppi servono a svariati scopi: +• Crafting recipes: Slots in a crafting recipe may not require a specific item, but instead an item which is a member of a particular group, or multiple groups=• Ricette di assemblaggio: gli alloggi in una ricetta di assemblaggio potrebbero non richiedere un oggetto specifico, ma invece un oggetto che sia membro di un gruppo particolare, o di più gruppi +• Digging times: Diggable blocks belong to groups which are used to determine digging times. Mining tools are capable of digging blocks belonging to certain groups=• Tempi di scavo: i blocchi scavabili appartengono a gruppi che sono usati per stabilire i tempi di scavo. Gli strumenti di scavo possono scavare blocchi che appartengono a certi gruppi +• Block behavior: Blocks may show a special behaviour and interact with other blocks when they belong to a particular group=• Comportamento del blocco: i blocchi possono mostrare un comportamento speciale e interagire con altri blocchi quando questi appartengono a un gruppo particolare +• Damage and armor: Objects and players have armor groups, weapons have damage groups. These groups determine damage. See also: “Basics > Weapons”=• Ferimento e armatura: gli oggetti e i personaggi possiedono gruppi di armatura, le armi possiedono gruppi di ferimento. Questi gruppi stabiliscono il ferimento. Si veda anche: “Nozioni di base > Armi” +• Other uses=• Altri usi +In the item help, many important groups are usually mentioned and explained.=Nell'aiuto sull'oggetto, solitamente sono nominati e spiegati molti gruppi importanti. +Glossary=Glossario +This is a list of commonly used terms in Minetest:=Questo è un elenco dei termini usati comunemente in Minetest: +Controls:=Controlli: +• Wielding: Holding an item in hand=• Impugnare: tenere un oggetto nella mano +• Pointing: Looking with the crosshair at something in range=• Puntare: guardare col mirino a qualcosa entro il suo raggio +• Dropping: Throwing an item or item stack to the ground=• Rilasciare: gettare a terra un oggetto o una pila di oggetti +• Punching: Attacking with left-click, is also used on blocks=• Colpire: attaccare cliccando col pulsante destro, si usa anche sui blocchi +• Sneaking: Walking slowly while (usually) avoiding to fall over edges=• Strisciare: camminare lentamente evitando (normalmente) di cadere dagli orgli +• Climbing: Moving up or down a climbable block=• Arrampicarsi: muoversi in alto o in basso su di un blocco arrampicabile +Blocks:=Blocchi: +• Block: Cubes that the worlds are made of=• Blocco: cubi di cui è fatto il mondo +• Mining/digging: Using a mining tool to break a block=• Scavare/minare: usare uno strumento di scavo per rompere un blocco +• Building/placing: Putting a block somewhere=• Costruire/piazzare: mettere un blocco da qualche parte +• Drop: Items you get after mining a block=• Rilascio: oggetti che ottenete dopo avere scavato un blocco +• Using a block: Right-clicking a block to access its special function=• Usare un blocco: cliccare col pulsante destro un blocco per accedere alla sua funzione speciale +Items:=Oggetti: +• Item: A single thing that players can possess=• Oggetto: una cosa singola che gli/le utenti possono possedere +• Item stack: A collection of items of the same kind=• Pila di oggetti: una raccolta di oggetti dello stesso tipo +• Maximum stack size: Maximum amount of items in an item stack=• Dimensione massima della pila: numero massimo di oggetti in una pila di oggetti +• Slot / inventory slot: Can hold one item stack=• Alloggo / alloggio dell'inventario: può contenere una pila di oggetti +• Inventory: Provides several inventory slots for storage=• Inventario: fornisce numerosi alloggi inventario per l'immagazzinamento +• Player inventory: The main inventory of a player=• Inventario utente: l'inventario principale di un* utente +• Tool: An item which you can use to do special things with when wielding=• Strumento: un oggetto che potete usare per fare cose speciali mentre lo impugnate +• Range: How far away things can be to be pointed by an item=• Raggio: quanto possono essere distanti le cose per poter essere puntate da un oggetto +• Mining tool: A tool which allows to break blocks=• Strumento di scavo: uno strumento che permette di rompere blocchi +• Craftitem: An item which is (primarily or only) used for crafting=• Oggetto da assemblaggio: un oggetto che è usato (solamente o principalmente) per assemblare +Gameplay:=Esperienza di gioco: +• “heart”: A single health symbol, indicates 2 HP=• “cuore”: un singolo simbolo di salute, indica 2 PS +• “bubble”: A single breath symbol, indicates 1 BP=• “bolla”: un singolo simbolo di ossigeno, indica 1 PO +• HP: Hit point (equals half 1 “heart”)=• PS: punto salute (pari a metà di 1 “cuore”) +• BP: Breath point, indicates breath when diving=• PO: punto ossigeno, indica l'ossigeno quando ci si immerge +• Mob: Computer-controlled enemy=• Mob: nemic* controllat* dal computer (abbreviazione di “mobile”) +• Crafting: Combining multiple items to create new ones=• Assemblare: combinare diversi oggetti per crearne di nuovi +• Crafting guide: A helper which shows available crafting recipes=• Guida di assemblaggio: una fonte di aiuto che mostra le ricette di assemblaggio disponibili +• Spawning: Appearing in the world=• Comparire: comparire nel mondo +• Respawning: Appearing again in the world after death=• Ricomparire: ricomparire ancora nel mondo dopo la morte +• Group: Puts similar things together, often affects gameplay=• Gruppo: mette assieme cose simili, spesso influenza l'esperienza di gioco +• noclip: Allows to fly through walls=• Modalità incorporea: permette di volare attraverso i muri +Interface=Interfaccia +• Hotbar: Inventory slots at the bottom=• Barra di uso frequente: alloggi dell'inventario sottostanti +• Statbar: Indicator made out of half-symbols, used for health and breath=• Barra delle caratteristiche: indicatore composto di mezzi-simboli, usato per salute e ossigeno +• Minimap: The map or radar at the top right=• Minimappa: la mappa o radar in alto a destra +• Crosshair: Seen in the middle, used to point at things=• Mirino: visibile al centro, usato per puntare le cose +Online multiplayer:=Gioco in rete: +• PvP: Player vs Player. If active, players can deal damage to each other=• UcU: Utente contro Utente (“PvP” in Inglese). Se attivata, gli/le utenti possono ferirsi a vicenda +• Griefing: Destroying the buildings of other players against their will=• Vandalizzare: (“griefing” in Inglese) distruggere le costruzioni degli/delle altr* utenti contro la loro volontà +• Protection: Mechanism to own areas of the world, which only allows the owners to modify blocks inside=• Protezione: meccanismo per possedere aree del mondo, che permette solo al/alla proprietari* di modificare i blocchi al loro interno +Technical terms:=Termini tecnici: +• Minetest: This game engine=• Minetest: questo motore di gioco +• Minetest Game: A subgame for Minetest by the Minetest developers=• Minetest Game: un gioco per Minetest degli sviluppatori di Minetest +• Subgame: A complete playing experience to be used in Minetest; such as a game or sandbox or similar=• Gioco: una esperienza di gioco completa da usarsi in Minetest; come un gioco, una sandbox o simili +• Mod: A single subsystem which adds or modifies functionality; is the basic building block of subgames and can be used to further enhance or modify them=• Modulo: un singolo sottosistema che aggiunge o modifica funzionalità; è il “mattone” di costruzione di base dei giochi e può essere usato per migliorarli o modificarli ulteriormente +• Privilege: Allows a player to do something=• Privilegio: permette a un* utente di fare qualcosa +• Node: Other word for “block”=• Nodo: parola alternativa per “blocco” +Settings=Impostazioni +There is a large variety of settings to configure Minetest. Pretty much every aspect can be changed that way.=Esiste una grande varietà di impostazioni per configurare Minetest. Quasi ogni aspetto può essere cambiato in quel modo. +These are a few of the most important gameplay settings:=Queste sono alcune delle impostazioni di gioco più importanti: +• Damage enabled (enable_damage): Enables the health and breath attributes for all players. If disabled, players are immortal=• Ferimento abilitato (enable_damage): abilita gli attributi di salute e ossigeno per tutt* gli/le utenti. Se è disabilitato, gli/le utenti sono immortali +• Creative Mode (creative_mode): Enables sandbox-style gameplay focusing on creativity rather than a challenging gameplay. The meaning depends on the subgame; usual changes are: Reduced dig times, easy access to almost all items, tools never wear off, etc.=• Modalità creativa (creative_mode): abilita lo stile di gioco sandbox incentrato sulla creatività piuttosto di quello impegnativo. Il significato dipende dal gioco; i cambiamenti comuni sono: tempi di scavo ridotti, accesso facile a quasi tutti gli oggetti, gli strumenti non si usurano mai, ecc. +• PvP (enable_pvp): Short for “Player vs Player”. If enabled, players can deal damage to each other=• UcU (enable_pvp): abbreviazione per “Utente contro Utente” (“PvP” in Inglese). Se abilitata, gli/le utenti possono ferirsi a vicenda. +For a full list of all available settings, use the “Advanced settings” dialog in the main menu.=Per un elenco completo delle impostazioni disponibili, usate il pulsante “Impostazioni avanzate” nel menu principale. +Movement modes=Modalità di movimento +If you have the required privileges, you can use up to three special movement modes. Using these may be considered cheating.=Se disponete dei privilegi necessari, potete usare fino a tre modalità speciali di movimento. Usarle potrebbe essere considerato barare. +Fast mode:=Modalità veloce: +• Description: Allows you to move much faster. Hold down the the “Use” key [E] to move faster. In the client configuration, you can further customize fast mode.=• Descrizione: vi consente di muovervi molto più velocemente. Tenete premuto il tasto “Usare” [E] per muovervi più velocemente. Potete personalizzare ulteriormente la modalità veloce nella configurazione del client. +• Default key: [J]=• Tasto predefinito: [J] +• Required privilege: fast=• Privilegio richiesto: fast (“veloce”) +Fly mode:=Modalità volo: +• Description: Gravity doesn't affect you and you can move freely in all directions. Use the jump key to rise and the sneak key to sink.=• Descrizione: la gravità non ha effetto su di voi e potete muovervi liberamente in tutte le direzioni. Usate il tasto di salto per ascendere e quello di strisciamento per discendere. +• Default key: [K]=• Tasto predefinito: [K] +• Required privilege: fly=• Privilegio richiesto: fly (“volo”) +Noclip mode:=Modalità incorporea: +• Description: Allows you to move through walls. Only works when fly mode is enabled, too.=• Descrizione: vi consente di passare attraverso i muri. Funziona solo quando è attivata anche la modalità volo. +• Default key: [H]=• Tasto predefinito: [H] +• Required privilege: noclip=• Privilegio richiesto: noclip (“nessun aggancio”) +Console=Console +With [F10] you can open and close the console. The main use of the console is to show the chat log and enter chat messages or server commands.=Con [F10] potete aprire e chiudere la console. L'uso principale della console è mostrare il registro della messaggistica, o inviare messaggi, o comandi per il sever. +Using the chat or server command key also opens the console, but it is smaller and will be closed after you sent a message.=La console può essere aperta anche col tasto della messaggistica, o con quello che precede l'invio dei comandi, ma è più piccola e verrà chiusa dopo che avrete inviato un messaggio. +Use the chat to communicate with other players. This requires you to have the “shout” privilege.=Usate la messaggistica per comunicare con gli/le altr* utenti. Ciò richiede il privilegio “shout” (“urlare”). +Just type in the message and hit [Enter]. Public chat messages can not begin with “/”.=Scrivete il messaggio e premete [Invio]. I messaggi inviati pubblicamente non possono iniziare con “/”. +You can send private messages: Say “/msg ” in chat to send “” which can only be seen by .=Potete inviare messaggi privati: scrivete “/msg Nome Messaggio” (senza virgolette) nell'area di messaggistica per mandare un “Messaggio” che potrà essere visto solo da “Nome”. +There are some special controls for the console:=Per la console esistono alcuni controlli speciali: +• [F10] Open/close console=• [F10] apre/chiude la console +• [Enter]: Send message or command=• [Invio]: manda un messaggio o un comando +• [Tab]: Try to auto-complete a partially-entered player name=• [Tab]: prova a completare automaticamente il nome di un* utente già parzialmente scritto +• [Ctrl]+[Left]: Move cursor to the beginning of the previous word=• [Ctrl] + [Sinistra]: sposta il cursore all'inizio della parola precedente +• [Ctrl]+[Right]: Move cursor to the beginning of the next word=• [Ctrl] + [Destra]: sposta il cursore all'inizio della parola successiva +• [Ctrl]+[Backspace]: Delete previous word=• [Ctrl] + [Backspace]: cancella la parola precedente +• [Ctrl]+[Delete]: Delete next word=• [Ctrl] + [Canc]: cancella la parola successiva +• [Ctrl]+[U]: Delete all text before the cursor=• [Ctrl] + [U]: cancella tutto il testo prima del cursore +• [Ctrl]+[K]: Delete all text after the cursor=• [Ctrl] + [K]: cancella tutto il testo dopo il cursore +• [Page up]: Scroll up=• [Pag su]: scorre indietro il testo +• [Page down]: Scroll down=• [Pag giù]: scorre in avanti il testo +There is also an input history. Minetest saves your previous console inputs which you can quickly access later:=Esiste anche uno storico dei contenuti inseriti. Minetest salva i vostri inserimenti precendenti nella console, in modo che possiate accedervi rapidamente più tardi: +• [Up]: Go to previous entry in history=• [Su]: va alla voce precedente nello storico +• [Down]: Go to next entry in history=• [Giù]: va alla voce successiva nello storico +Server commands=Comandi del server +Server commands (also called “chat commands”) are little helpers for advanced users. You don't need to use these commands when playing. But they might come in handy to perform some more technical tasks. Server commands work both in multi-player and single-player mode.=I comandi del server (chiamati anche “comandi di messaggistica”) sono piccoli aiutanti per gli/le utenti avanzat*. Quando giocate non vi serve usare questi comandi. Ma potrebbero esservi utili per eseguire compiti più avanzati. I comandi del server funzionano sia nella modalità di gioco locale che in quella in rete. +Server commands can be entered by players using the chat to perform a special server action. There are a few commands which can be issued by everyone, but some commands only work if you have certain privileges granted on the server. There is a small set of basic commands which are always available, other commands can be added by mods.=I comandi del server possono essere inseriti dai/dalle utenti usando la messaggistica per eseguire una azione speciale del server. Esistono un po' di comandi che possono essere usati da tutt*, ma alcuni comandi funzionano solo se sul server vi sono stati concessi certi privilegi. Esiste un piccolo numero di comandi di base che sono sempre disponibili, altri comandi possono essere aggiunti dai moduli. +To issue a command, simply type it like a chat message or press Minetest's command key (default: [/]). All commands have to begin with “/”, for example “/mods”. The Minetest command key does the same as the chat key, except that the slash is already entered.=Per inviare un comando, scrivetelo come se fosse un messaggio o premete il tasto di comando di Minetest (predefinito: [/]). Tutti i comandi devono iniziare con “/”, per esempio “/mods”. Il tasto di comando di Minetest si comporta come il tasto della messaggistica, eccetto il fatto che la sbarra “/” è già inserita. +Commands may or may not give a response in the chat log, but errors will generally be shown in the chat. Try it for yourselves: Close this window and type in the “/mods” command. This will give you the list of available mods on this server.=I comandi possono non dare una risposta nel registro della messaggistica, ma in genere gli errori saranno mostrati. Provate voi stess*: chiudete questa finestra e inviate il comando “/mods” (senza virgolette). Vi mostrerà l'elenco dei moduli disponibili su questo server. +“/help all” is a very important command: You get a list of all available commands on the server, a short explanation and the allowed parameters. This command is also important because the available commands often differ per server.=“/help all” è un comando molto importante: ottenete un elenco di tutti i comandi disponibili sul server, una breve spiegazione e i parametri consentiti. Questo comando è importante anche perhé i comandi disponibili spesso variano da server a server. +Commands are followed by zero or more parameters.=I comandi sono seguiti da zero o più parametri. +In the command reference, you see some placeholders which you need to replace with an actual value. Here's an explanation:=Nella guida di riferimento dei comandi, vedrete alcuni segnaposto che dovrete sostituire con un valore effettivo. Ecco una spiegazione: +• Text in greater-than and lower-than signs (e.g. “”): Placeholder for a parameter=• Testo racchiuso tra i simboli minore-di e maggiore-di (per es. “”): segnaposto per un parametro +• Anything in square brackets (e.g. “[text]”) is optional and can be omitted=• Tutto quello che è tra parentesi quadre (per esempio “[testo]”) è facoltativo è si può omettere +• Pipe or slash (e.g. “text1 | text2 | text3”): Alternation. One of multiple texts must be used (e.g. “text2”)=• Simbolo alternativo “|” barretta, o “/” sbarra (per es. “testo1 | testo2 | testo3”): alternanza. Si devono usare uno o più testi (per es. “testo2”) +• Parenthesis: (e.g. “(word1 word2) | word3”): Groups multiple words together, used for alternations=• Parentesi tonde (per es. “(parola1 parola2) | parola3”): raggruppano assieme più parole, usate per le alternanze +• Everything else is to be read as literal text=Tutto il resto va letto come testo letterale +Here are some examples to illustrate the command syntax:=Ecco alcuni esempi per illustrare la sintassi dei comandi: +• /mods: No parameters. Just enter “/mods”=• /mods: nessun parametro. Scrivete solo “/mods” +• /me : 1 parameter. You have to enter “/me ” followed by any text, e.g. “/me orders pizza”=• /me : un parametro. Dovete scrivere “/me ” seguito da del testo, per es. “/me ordina una pizza” +• /give : Two parameters. Example: “/give Player default:apple”=• /give : due parametri. Esempio: “/give Utente default:apple” +• /help [all|privs|]: Valid inputs are “/help”, “/help all”, “/help privs”, or “/help ” followed by a command name, like “/help time”=• /help [all|privs|]: i valori validi sono “/help”, “/help all”, “/help privs”, o “/help ” seguito dal nome di un comando, come “/help time” +• /spawnentity [,,]: Valid inputs include “/spawnentity boats:boat” and “/spawnentity boats:boat 0,0,0”=• /spawnentity [,,]: i valori validi includono “/spawnentity boats:boat” e “/spawnentity boats:boat 0,0,0” +Some final remarks:=Alcune osservazioni finali: +• For /give and /giveme, you need an itemstring. This is an internally used unique item identifier which you may find in the item help if you have the “give” or “debug” privilege=Per /give e /giveme, vi serve una stringa oggetto. Questa è un identificatore unico usato internamente che potreste trovare nell'aiuto sull'oggetto se avete il privilegio “give” o “debug” +• For /spawnentity you need an entity name, which is another identifier=• Per /spawnentity vi serve il nome di una entità, che è un altro identificatore +Privileges=Privilegi +Each player has a set of privileges, which differs from server to server. Your privileges determine what you can and can't do. Privileges can be granted and revoked from other players by any player who has the privilege called “privs”.=Ogni utente ha un numero di privilegi, che variano da server a server. I vostri privilegi stabiliscono cosa potete e non potete fare. I privilegi possono essere concessi e revocati ad altr* utenti da qualunque utente che abbia il privilegio chiamato “privs”. +On a multiplayer server with the default configuration, new players start with the privileges called “interact” and “shout”. The “interact” privilege is required for the most basic gameplay actions such as building, mining, using, etc. The “shout” privilege allows to chat.=Su di un server in rete avente la configurazione predefinita, i/le nuov* utenti iniziano coi privilegi chiamati “interact” (“interagire”) e “shout” (“urlare”). Il privilegio “interact” è necessario per le azioni di gioco di base, come costruire, scavare, usare, ecc. Il privilegio “shout” permette di conversare. +There is a small set of core privileges which you'll find on every server, other privileges might be added by mods.=Esiste un piccolo numero di privilegi fondamentali che troverete su ogni server, altri privilegi potrebbero essere aggiunti dai moduli. +To view your own privileges, issue the server command “/privs”.=Per vedere i vostri privilegi, inviate il comando “/privs”. +Here are a few basic privilege-related commands:=Ecco alcuni comandi di base legati ai privilegi: +• /privs: Lists your privileges=• /privs: elenca i vostri privilegi +• /privs : Lists the privileges of =• /privs : elenca i privilegi di +• /help privs: Shows a list and description about all privileges=• /help privs: mostra un elenco e una descrizione di tutti i privilegi +Players with the “privs” privilege can modify privileges at will:=Gli/le utenti con il privilegio “privs” possono cambiare i privilegi a volontà: +• /grant : Grant to =• /grant : concede a +• /revoke : Revoke from =• /revoke : revoca a +In single-player mode, you can use “/grant singleplayer all” to unlock all abilities (which is often considered cheating).=Nella modalità di gioco locale, potete usare “/grant singleplayer all” per sbloccare tutte le abilità (che spesso è considerato barare). +Light=Luce +As the world is entirely block-based, so is the light in the world. Each block has its own brightness. The brightness of a block is expressed in a “light level” which ranges from 0 (total darkness) to 15 (as bright as the sun).=Essendo il mondo completamente basato su blocchi, lo è anche la luce nel mondo. Ogni blocco ha la propria luminosità. La luminosità di un blocco è espressa in un “livello di luce” che va da 0 (oscurità completa) a 15 (luminoso quanto il sole). +There are two types of light: Sunlight and artificial light.=Esistono due tipi di luce: la luce solare e la luce artificiale. +Artificial light is emitted by luminous blocks. Artificial light has a light level from 1-14.=La luce artificiale è emessa dai blocchi luminosi. La luce artificiale ha un livello di luce tra 1 e 14. +Sunlight is the brightest light and always goes perfectly straight down from the sky at each time of the day. blocks. At night, the sunlight will become moonlight instead, which still provides a small amount of light. The light level of sunlight is 15.=La luce solare è quella più luminosa e discende dal cielo perfettamente dritta a ogni ora del giorno. Di notte, la luce solare diverrà invece luce lunare, che fornisce comunque un po' di luce. Il livello di luce della luce solare è 15. +Blocks have 3 levels of transparency:=I blocchi hanno tre livelli di trasparenza: +• Transparent: Sunlight goes through limitless, artificial light goes through with losses=• Trasparente: la luce solare li attraversa senza perdite, la luce artificiale li attraversa con delle perdite +• Semi-transparent: Sunlight and artificial light go through with losses=• Semi-trasparenti: la luce solare e la luce artificiale li attraversano con delle perdite +• Opaque: No light passes through=• Opachi: nessuna luce li attraversa +Artificial light will lose one level of brightness for each transparent or semi-transparent block it passes through, until only darkness remains (image 1).=La luce artificiale perderà un livello di luminosità per ciascun nodo trasparente o semi-trasparente che attraversa, finché resterà solo oscurità (immagine 1). +Sunlight will preserve its brightness as long it only passes fully transparent blocks. When it passes through a semi-transparent block, it turns to artificial light. Image 2 shows the difference.=La luce solare conserverà la propria luminosità finché attraverserà solo blocchi trasparenti. Quando passa attraverso un blocco semi-trasparente, si trasforma in luce artificiale. L'immagine 2 mostra la differenza. +Note that “transparency” here only means that the block is able to carry brightness from its neighboring blocks. It is possible for a block to be transparent to light but you can't see trough the other side.=Si noti che per “trasparenza” qui si intende solo che il blocco può trasferire la luminosità ai nodi vicini. È possibile che un blocco sia trasparente alla luce, ma che voi non possiate guardarci attraverso. +Coordinates=Coordinate +The Minetest world is a large cube. And because of this, a position in the world can be easily expressed with Cartesian coordinates. That is, for each position in the world, there are 3 values X, Y and Z.=Il mondo di Minetest è un grande cubo. E per questo, una posizione nel mondo può essere facilmente espressa tramite coordinate Cartesiane. Cioè, per ogni posizione nel mondo, esistono tre valori: X, Y e Z. +Like this: (5, 45, -12)=Come questi: (5, 45, -12) +This refers to the position where X=5, Y=45 and Z=-12. The 3 letters are called “axes”: Y is for the height. X and Z are for the horizontal position.=Ciò si riferisce alla posizione dove X=5 (si legga “X vale 5”, NdT), Y=45 e Z=-12. Le tre lettere sono chiamate “assi”: Y si riferisce all'altezza. X e Z si riferiscono alla posizione orizzontale. +The values for X, Y and Z work like this:=I valori di X, Y e Z funzionano così: +• If you go up, Y increases=• Se salite, Y aumenta +• If you go down, Y decreases=• Se scendete, Y diminuisce +• If you follow the sun, X increases=• Se seguite il sole, X aumenta +• If you go to the reverse direction, X decreases=• Se andate nella direzione opposta, X diminuisce +• Follow the sun, then go right: Z increases=• Seguite il sole, poi andate a destra: Z aumenta +• Follow the sun, then go left: Z decreases=• Seguite il sole, poi andate a sinistra: Z diminuisce +• The side length of a full cube is 1=• La larghezza di un cubo completo è pari a 1 +You can view your current position in the debug screen (open with [F5]). This is considered cheating in some games.=Potete vedere la vostra posizione attuale nella schermata di debug (visibile con [F5]). In alcuni giochi questo è considerato barare. diff --git a/mods/HELP/mcl_doc_basics/locale/template.txt b/mods/HELP/mcl_doc_basics/locale/template.txt new file mode 100644 index 000000000..4056de574 --- /dev/null +++ b/mods/HELP/mcl_doc_basics/locale/template.txt @@ -0,0 +1,468 @@ +# textdomain: mcl_doc_basics +Basics= +Everything you need to know to get started with playing= +Advanced usage= +Advanced information which may be nice to know, but is not crucial to gameplay= +Quick start= +This is a very brief introduction to the basic gameplay:= +Basic controls:= +• Move mouse to look= +• [W], [A], [S] and [D] to move= +• [E] to sprint= +• [Space] to jump or move upwards= +• [Shift] to sneak or move downwards= +• Mouse wheel or [1]-[9] to select item= +• Left-click to mine blocks or attack= +• Recover from swings to deal full damage= +• Right-click to build blocks and use things= +• [I] for the inventory= +• Lowest row in inventory appears in hotbar below= +• [Esc] to close this window= +How to play:= +• Punch a tree trunk until it breaks and collect wood= +• Place the wood into the 2×2 grid (your “crafting grid”) in your inventory menu and craft 4 wood planks= +• Place them in a 2×2 shape in the crafting grid to craft a crafting table= +• Place the crafting table on the ground= +• Rightclick it for a 3×3 crafting grid= +• Use the crafting guide (book icon) to learn all the possible crafting recipes= +• Craft a wooden pickaxe so you can dig stone= +• Different tools break different kinds of blocks. Try them out!= +• Read entries in this help to learn the rest= +• Continue playing as you wish. There's no goal. Have fun!= +Minetest= +Minetest is a free software game engine for games based on voxel gameplay, inspired by InfiniMiner, Minecraft, and the like. Minetest was originally created by Perttu Ahola (alias “celeron55”).= +The player is thrown into a huge world made out of cubes or blocks. These cubes usually make the landscape they blocks can be removed and placed almost entirely freely. Using the collected items, new tools and other items can be crafted. Games in Minetest can, however, be much more complex than this.= +A core feature of Minetest is the built-in modding capability. Mods modify existing gameplay. They can be as simple as adding a few decorative blocks or be very complex by e.g. introducing completely new gameplay concepts, generating a completely different kind of world, and many other things.= +Minetest can be played alone or online together with multiple players. Online play will work out of the box with any mods, with no need for additional software as they are entirely provided by the server.= +Minetest is usually bundled with a simple default game, named “Minetest Game” (shown in images 1 and 2). You probably already have it. Other games for Minetest can be downloaded from the official Minetest forums .= +Minetest as well as Minetest Game are both unfinished at the moment, so please forgive us when not everything works out perfectly.= +Sneaking= +Sneaking makes you walk slower and prevents you from falling off the edge of a block.= +To sneak, hold down the sneak key (default: [Shift]). When you release it, you stop sneaking. Careful: When you release the sneak key at a ledge, you might fall!= +• Sneak: [Shift]= +Sneaking only works when you stand on solid ground, are not in a liquid and don't climb.= +If you jump while holding the sneak key, you also jump slightly higher than usual.= +Sneaking might be disabled by mods. In this case, you still walk slower by sneaking, but you will no longer be stopped at ledges.= +Controls= +These are the default controls:= +Basic movement:= +• Moving the mouse around: Look around= +• W: Move forwards= +• A: Move to the left= +• D: Move to the right= +• S: Move backwards= +• E: Sprint= +While standing on solid ground:= +• Space: Jump= +• Shift: Sneak= +While on a ladder, swimming in a liquid or fly mode is active= +• Space: Move up= +• Shift: Move down= +Extended movement (requires privileges):= +• J: Toggle fast mode, makes you run or fly fast (requires “fast” privilege)= +• K: Toggle fly mode, makes you move freely in all directions (requires “fly” privilege)= +• H: Toggle noclip mode, makes you go through walls in fly mode (requires “noclip” privilege)= +• E: Move even faster when in fast mode= +World interaction:= +• Left mouse button: Punch / mine blocks / take items= +• Right mouse button: Build or use pointed block= +• Shift+Right mouse button: Build= +• Roll mouse wheel: Select next/previous item in hotbar= +• 1-9: Select item in hotbar directly= +• Q: Drop item stack= +• Shift+Q: Drop 1 item= +• I: Show/hide inventory menu= +Inventory interaction:= +See the entry “Basics > Inventory”.= +Camera:= +• Z: Zoom (requires “zoom” privilege)= +• F7: Toggle camera mode= +• F8: Toggle cinematic mode= +Interface:= +• Esc: Open menu window (pauses in single-player mode) or close window= +• F1: Show/hide HUD= +• F2: Show/hide chat= +• F9: Toggle minimap (only works if have a map)= +• Shift+F9: Toggle minimap rotation mode= +• F10: Open/close console/chat log= +• F12: Take a screenshot= +Server interaction:= +• T: Open chat window (chat requires the “shout” privilege)= +• /: Start issuing a server command)= +Technical:= +• R: Toggle far view (disables all fog and allows viewing far away, can make game very slow)= +• +: Increase minimal viewing distance= +• -: Decrease minimal viewing distance= +• F3: Enable/disable fog= +• F5: Enable/disable debug screen which also shows your coordinates= +• F6: Only useful for developers. Enables/disables profiler= +• P: Only useful for developers. Writes current stack traces= +Players= +Players (actually: “player characters”) are the characters which users control.= +Players are living beings which occupy a space of about 1×2×1 cubes. They start with 20 health points (HP) and 10 breath points (BP).= +Players are capable of walking, sneaking, jumping, climbing, swimming, diving, mining, building, fighting and using tools and blocks.= +At a health of 0, the player dies and loses all items in the inventory. The player can just respawn in the world.= +Some blocks reduce breath. While being with the head in a block which causes drowning, the breath points are reduced by 1 for every 2 seconds. When all breath is gone, the player starts to suffer drowning damage. Breath is quickly restored in any other block.= +Damage can be disabled on any world. Without damage, players are immortal and health and breath are unimportant.= +In multi-player mode, the name of other players is written above their head.= +Items= +Items are things you can carry along and store in inventories. They can be used for crafting, smelting, building, mining, and more. Types of items include blocks, tools, weapons and items only used for crafting.= +An item stack is a collection of items of the same type which fits into a single item slot. Item stacks can be dropped on the ground. Items which drop into the same coordinates will form an item stack.= +Dropped item stacks will be collected automatically when you stand close to them.= +Tools= +Some items may serve as a tool when wielded. Any item which has some special use which can be directly used by its wielder is considered a tool.= +Mining tools are important to break all kinds of blocks. Weapons are another kind of tool. There are some other more specialized tools. Special actions of tools are usually done by right-click.= +When nothing is wielded, players use their hand which may act as tool and weapon. The hand is capable of punching and deals minimum damage.= +Many tools will wear off when using them and may eventually get destroyed. The damage is displayed in a damage bar below the tool icon. If no damage bar is shown, the tool is in mint condition. Tools may be repairable by crafting, see “Basics > Crafting”.= +Weapons= +Some items are usable as a melee weapon when wielded. Weapons share most of the properties of tools.= +Melee weapons deal damage by punching players and other animate objects. There are two ways to attack:= +• Single punch: Left-click once to deal a single punch= +• Quick punching: Hold down the left mouse button to deal quick repeated punches= +There are two core attributes of melee weapons:= +• Maximum damage: Damage which is dealt after a hit when the weapon was fully recovered)= +• Full punch interval: Time it takes for fully recovering from a punch= +A weapon only deals full damage when it has fully recovered from a previous punch. Otherwise, the weapon will deal only reduced damage. This means, quick punching is very fast, but also deals rather low damage. Note the full punch interval does not limit how fast you can attack.= +There is a rule which sometimes makes attacks impossible: Players, animate objects and weapons belong to damage groups. A weapon only deals damage to those who share at least one damage group with it. So if you're using the wrong weapon, you might not deal any damage at all.= +Pointing= +“Pointing” means looking at something in range with the crosshair. Pointing is needed for interaction, like mining, punching, using, etc. Pointable things include blocks, players, computer enemies and objects.= +To point something, it must be in the pointing range (also just called “range”) of your wielded item. There's a default range when you are not wielding anything. A pointed thing will be outlined or highlighted (depending on your settings). Pointing is not possible with the 3rd person front camera.= +A few things can not be pointed. Most blocks are pointable. A few blocks, like air, can never be pointed. Other blocks, like liquids can only be pointed by special items.= +Camera= +You can change the camera mode by pressing [F7].= +There is also Cinematic Mode which can be toggled with [F8]. With Cinematic Mode enabled, the camera movements become more smooth. Some players don't like it, it is a matter of taste.= +By holding down [Z], you can zoom the view at your crosshair. You need the “zoom” privilege to do this.= +• Switch camera mode: [F7]= +• Toggle Cinematic Mode: [F8]= +• Zoom: [Z]= +Blocks= +The world of MineClone 2 is made entirely out of blocks (voxels, to be precise). Blocks can be added or removed with the correct tools.= +Blocks can have a wide range of different properties which determine mining times, behavior, looks, shape, and much more. Their properties include:= +• Collidable: Collidable blocks can not be passed through; players can walk on them. Non-collidable blocks can be passed through freely= +• Pointable: Pointable blocks show a wireframe or a halo box when pointed. But you will just point through non-pointable blocks. Liquids are usually non-pointable but they can be pointed at by some special tools= +• Mining properties: By which tools it can be mined, how fast and how much it wears off tools= +• Climbable: While you are at a climbable block, you won't fall and you can move up and down with the jump and sneak keys= +• Drowning damage: See the entry “Basics > Player”= +• Liquids: See the entry “Basics > Liquids”= +• Group memberships: Group memberships are used to determine mining properties, crafting, interactions between blocks and more= +Mining= +Mining (or digging) is the process of breaking blocks to remove them. To mine a block, point it and hold down the left mouse button until it breaks.= +Blocks require a mining tool to be mined. Different blocks are mined by different mining tools, and some blocks can not be mined by any tool. Blocks vary in hardness and tools vary in strength. Mining tools will wear off over time. The mining time and the tool wear depend on the block and the mining tool. The fastest way to find out how efficient your mining tools are is by just trying them out on various blocks. Any items you gather by mining will drop on the ground, ready to be collected.= +After mining, a block may leave a “drop” behind. This is a number of items you get after mining. Most commonly, you will get the block itself. There are other possibilities for a drop which depends on the block type. The following drops are possible:= +• Always drops itself (the usual case)= +• Always drops the same items= +• Drops items based on probability= +• Drops nothing= +Building= +Almost all blocks can be built (or placed). Building is very simple and has no delay.= +To build your wielded block, point at a block in the world and right-click. If this is not possible because the pointed block has a special right-click action, hold down the sneak key before right-clicking.= +Blocks can almost always be built at pointable blocks. One exception are blocks attached to the floor; these can only be built on the floor.= +Normally, blocks are built in front of the pointed side of the pointed block. A few blocks are different: When you try to build at them, they are replaced.= +Liquids= +Liquids are special dynamic blocks. Liquids like to spread and flow to their surrounding blocks. Players can swim and drown in them.= +Liquids usually come in two forms: In source form (S) and in flowing form (F).= +Liquid sources have the shape of a full cube. A liquid source will generate flowing liquids around it from time to time, and, if the liquid is renewable, it also generates liquid sources. A liquid source can sustain itself. A long it is left alone, a liquid source will normally keep its place and does not drain out.= +Flowing liquids take a sloped form. Flowing liquids spread around the world until they drain. A flowing liquid can not sustain itself and always comes from a liquid source, either directly or indirectly. Without a liquid source, a flowing liquid will eventually drain out and disappear.= +All liquids share the following properties:= +• All properties of blocks (including drowning damage= +• Renewability: Renewable liquids can create new sources= +• Flowing range: How many flowing liquids are created at maximum per liquid source, it determines how far the liquid will spread. Possible are ranges from 0 to 8. At 0, no flowing liquids will be created. Image 5 shows a liquid of flowing range 2= +• Viscosity: How slow players move through it and how slow the liquid spreads= +When those criteria are met, the open space is filled with a new liquid source of the same type (image 3).= +Swimming in a liquid is fairly straightforward: The usual direction keys for basic movement, the jump key for rising and the sneak key for sinking.= +The physics for swimming and diving in a liquid are:= +• The higher the viscosity, the slower you move= +• If you rest, you'll slowly sink= +• There is no fall damage for falling into a liquid as such= +• If you fall into a liquid, you will be slowed down on impact (but don't stop instantly). Your impact depth is determined by your speed and the liquid viscosity. For a safe high drop into a liquid, make sure there is enough liquid above the ground, otherwise you might hit the ground and take fall damage= +Liquids are often not pointable. But some special items are able to point all liquids.= +Crafting= +Crafting is the task of combining several items to form a new item.= +To craft something, you need one or more items, a crafting grid (C) and a crafting recipe. A crafting grid is like a normal inventory which can also be used for crafting. Items need to be put in a certain pattern into the crafting grid. Next to the crafting grid is an output slot (O). Here the result will appear when you placed items correctly. This is just a preview, not the actual item. Crafting grids can come in different sizes which limits the possible recipes you can craft.= +To complete the craft, take the result item from the output slot, which will consume items from the crafting grid and creates a new item. It is not possible to place items into the output slot.= +A description on how to craft an item is called a “crafting recipe”. These crafting recipes can be found in the crafting guide which you can access from the inventory menu.= +Crafting recipes consist of at least one input item and exactly one stack of output items. When performing a single craft, it will consume exactly one item from each stack of the crafting grid, unless the crafting recipe defines replacements.= +In some crafting recipes, some input items do not need to be a concrete item, instead they need to be a member of a group (see “Basics > Groups”). These recipes offer a bit more freedom in the input items. Images 6-8 show the same group-based recipe. Here, 8 items of the “stone” group are required, which is true for all of the shown items.= +Rarely, crafting recipes have replacements. This means, whenever you perform a craft, some items in the crafting grid will not be consumed, but instead will be replaced by another item.= +Cooking= +Cooking (or smelting) is a form of crafting which does not involve a crafting grid. Cooking is done with a furnace, an cookable item, a fuel item and time in order to yield a new item.= +Each fuel item has a burning time. This is the time a single item of the fuel keeps a furnace burning.= +Each cookable item requires time to be cooked. This time is specific to the item type and the item must be “on fire” for the whole cooking time to actually yield the result.= +Hotbar= +At the bottom of the screen you see some squares. This is called the “hotbar”. The hotbar allows you to quickly access the lowest row of items in the player inventory.= +You can change the selected item with the mouse wheel or the number keys.= +• Select previous item in hotbar: [Mouse wheel up]= +• Select next item in hotbar: [Mouse wheel down]= +• Select item in hotbar directly: [0]-[9]= +The selected item is also your wielded item.= +Minimap= +If you have a map item in any of your hotbar slots, you can use the minimap.= +Press [F9] to make a minimap appear on the top right. The minimap helps you to find your way around the world. Press it again to select different minimap modes and zoom levels. The minimap also shows the positions of other players.= +There are 2 minimap modes and 3 zoom levels.= +Surface mode (image 1) is a top-down view of the world, roughly resembling the colors of the blocks this world is made of. It only shows the topmost blocks, everything below is hidden, like a satellite photo. Surface mode is useful if you got lost.= +Radar mode (image 2) is more complicated. It displays the “denseness” of the area around you and changes with your height. Roughly, the more green an area is, the less “dense” it is. Black areas have many blocks. Use the radar to find caverns, hidden areas, walls and more. The rectangular shapes in image 2 clearly expose the position of a dungeon. Radar mode is only available in Creative Mode= +There are also two different rotation modes. In “square mode”, the rotation of the minimap is fixed. If you press [Shift]+[F9] to switch to “circle mode”, the minimap will instead rotate with your looking direction, so “up” is always your looking direction.= +In other games, the minimap may be disabled.= +• Toggle minimap mode: [F9]= +• Toggle minimap rotation mode: [Shift]+[F9]= +Inventories are used to store item stacks. There are other uses, such as crafting. An inventory consists of a rectangular grid of item slots. Each item slot can either be empty or hold one item stack. Item stacks can be moved freely between most slots.= +You have your own inventory which is called your “player inventory”, you can open it with the inventory key (default: [I]). The first inventory slots are also used as slots in your hotbar.= +Blocks can also have their own inventory, e.g. chests and furnaces.= +Inventory controls:= +Taking: You can take items from an occupied slot if the cursor holds nothing.= +• Left click: take entire item stack= +• Right click: take half from the item stack (rounded up)= +• Middle click: take 10 items from the item stack= +Putting: You can put items onto a slot if the cursor holds 1 or more items and the slot is either empty or contains an item stack of the same item type.= +• Left click: put entire item stack= +• Right click: put 1 item of the item stack= +• Middle click: put 10 items of the item stack= +Exchanging: You can exchange items if the cursor holds 1 or more items and the destination slot is occupied by a different item type.= +• Click: exchange item stacks= +Throwing away: If you hold an item stack and click with it somewhere outside the menu, the item stack gets thrown away into the environment.= +Quick transfer: You can quickly transfer an item stack to/from the player inventory to/from another item's inventory slot like a furnace, chest, or any other item with an inventory slot when that item's inventory is accessed. The target inventory is generally the most relevant inventory in this context.= +• Sneak+Left click: Automatically transfer item stack= +Online help= +You may want to check out these online resources related to MineClone 2.= +MineClone 2 download and forum discussion: = +Here you find the most recent version of MineClone 2 and can discuss it.= +Bug tracker: = +Report bugs here.= +Minetest links:= +Official homepage of Minetest: = +The main place to find the most recent version of Minetest, the engine used by MineClone 2.= +Community wiki: = +A community-based documentation website for Minetest. Anyone with an account can edit it.= +Minetest forums: = +A web-based discussion platform where you can discuss everything related to Minetest. This is also a place where player-made mods and games are published and discussed. The discussions are mainly in English, but there is also space for discussion in other languages.= +Chat: = +A generic Internet Relay Chat channel for everything related to Minetest where people can meet to discuss in real-time. If you do not understand IRC, see the Community Wiki for help.= +Groups= +Items, players and objects (animate and inanimate) can be members of any number of groups. Groups serve multiple purposes:= +• Crafting recipes: Slots in a crafting recipe may not require a specific item, but instead an item which is a member of a particular group, or multiple groups= +• Digging times: Diggable blocks belong to groups which are used to determine digging times. Mining tools are capable of digging blocks belonging to certain groups= +• Block behavior: Blocks may show a special behaviour and interact with other blocks when they belong to a particular group= +• Damage and armor: Objects and players have armor groups, weapons have damage groups. These groups determine damage. See also: “Basics > Weapons”= +• Other uses= +In the item help, many important groups are usually mentioned and explained.= +Glossary= +This is a list of commonly used terms:= +Controls:= +• Wielding: Holding an item in hand= +• Pointing: Looking with the crosshair at something in range= +• Dropping: Throwing an item or item stack to the ground= +• Punching: Attacking with left-click, is also used on blocks= +• Sneaking: Walking slowly while (usually) avoiding to fall over edges= +• Climbing: Moving up or down a climbable block= +Blocks:= +• Block: Cubes that the worlds are made of= +• Mining/digging: Using a mining tool to break a block= +• Building/placing: Putting a block somewhere= +• Drop: Items you get after mining a block= +• Using a block: Right-clicking a block to access its special function= +Items:= +• Item: A single thing that players can possess= +• Item stack: A collection of items of the same kind= +• Maximum stack size: Maximum amount of items in an item stack= +• Slot / inventory slot: Can hold one item stack= +• Inventory: Provides several inventory slots for storage= +• Player inventory: The main inventory of a player= +• Tool: An item which you can use to do special things with when wielding= +• Range: How far away things can be to be pointed by an item= +• Mining tool: A tool which allows to break blocks= +• Craftitem: An item which is (primarily or only) used for crafting= +Gameplay:= +• “heart”: A single health symbol, indicates 2 HP= +• “bubble”: A single breath symbol, indicates 1 BP= +• HP: Hit point (equals a half “heart”)= +• BP: Breath point, indicates breath when diving= +• Mob: Computer-controlled enemy= +• Crafting: Combining multiple items to create new ones= +• Crafting guide: A helper which shows available crafting recipes= +• Spawning: Appearing in the world= +• Respawning: Appearing again in the world after death= +• Group: Puts similar things together, often affects gameplay= +• noclip: Allows to fly through walls= +Interface= +• Hotbar: Inventory slots at the bottom= +• Statbar: Indicator made out of half-symbols, used for health and breath= +• Minimap: The map or radar at the top right= +• Crosshair: Seen in the middle, used to point at things= +Online multiplayer:= +• PvP: Player vs Player. If active, players can deal damage to each other= +• Griefing: Destroying the buildings of other players against their will= +• Protection: Mechanism to own areas of the world, which only allows the owners to modify blocks inside= +Technical terms:= +• Minetest: This game engine= +• MineClone 2: What you play right now= +• Minetest Game: A game for Minetest by the Minetest developers= +• Game: A complete playing experience to be used in Minetest; such as a game or sandbox or similar= +• Mod: A single subsystem which adds or modifies functionality; is the basic building block of games and can be used to further enhance or modify them= +• Privilege: Allows a player to do something= +• Node: Other word for “block”= +Settings= +There is a large variety of settings to configure Minetest. Pretty much every aspect can be changed that way.= +These are a few of the most important gameplay settings:= +• Damage enabled (enable_damage): Enables the health and breath attributes for all players. If disabled, players are immortal= +• Creative Mode (creative_mode): Enables sandbox-style gameplay focusing on creativity rather than a challenging gameplay. Changes include: Instant digging, easy access to almost all items, tools never wear off, etc.= +• PvP (enable_pvp): Short for “Player vs Player”. If enabled, players can deal damage to each other= +For a full list of all available settings, use the “Advanced settings” dialog in the main menu.= +Movement modes= +If you have the required privileges, you can use up to three special movement modes. Using these may be considered cheating.= +Fast mode:= +• Description: Allows you to move much faster. Hold down the the “Use” key [E] to move faster. In the client configuration, you can further customize fast mode.= +• Default key: [J]= +• Required privilege: fast= +Fly mode:= +• Description: Gravity doesn't affect you and you can move freely in all directions. Use the jump key to rise and the sneak key to sink.= +• Default key: [K]= +• Required privilege: fly= +Noclip mode:= +• Description: Allows you to move through walls. Only works when fly mode is enabled, too.= +• Default key: [H]= +• Required privilege: noclip= +Console= +With [F10] you can open and close the console. The main use of the console is to show the chat log and enter chat messages or server commands.= +Using the chat or server command key also opens the console, but it is smaller and will be closed after you sent a message.= +Use the chat to communicate with other players. This requires you to have the “shout” privilege.= +Just type in the message and hit [Enter]. Public chat messages can not begin with “/”.= +You can send private messages: Say “/msg ” in chat to send “” which can only be seen by .= +There are some special controls for the console:= +• [F10] Open/close console= +• [Enter]: Send message or command= +• [Tab]: Try to auto-complete a partially-entered player name= +• [Ctrl]+[Left]: Move cursor to the beginning of the previous word= +• [Ctrl]+[Right]: Move cursor to the beginning of the next word= +• [Ctrl]+[Backspace]: Delete previous word= +• [Ctrl]+[Delete]: Delete next word= +• [Ctrl]+[U]: Delete all text before the cursor= +• [Ctrl]+[K]: Delete all text after the cursor= +• [Page up]: Scroll up= +• [Page down]: Scroll down= +There is also an input history. Minetest saves your previous console inputs which you can quickly access later:= +• [Up]: Go to previous entry in history= +• [Down]: Go to next entry in history= +Server commands= +Server commands (also called “chat commands”) are little helpers for advanced users. You don't need to use these commands when playing. But they might come in handy to perform some more technical tasks. Server commands work both in multi-player and single-player mode.= +Server commands can be entered by players using the chat to perform a special server action. There are a few commands which can be issued by everyone, but some commands only work if you have certain privileges granted on the server. There is a small set of basic commands which are always available, other commands can be added by mods.= +To issue a command, simply type it like a chat message or press Minetest's command key (default: [/]). All commands have to begin with “/”, for example “/mods”. The Minetest command key does the same as the chat key, except that the slash is already entered.= +Commands may or may not give a response in the chat log, but errors will generally be shown in the chat. Try it for yourselves: Close this window and type in the “/mods” command. This will give you the list of available mods on this server.= +“/help all” is a very important command: You get a list of all available commands on the server, a short explanation and the allowed parameters. This command is also important because the available commands often differ per server.= +Commands are followed by zero or more parameters.= +In the command reference, you see some placeholders which you need to replace with an actual value. Here's an explanation:= +• Text in greater-than and lower-than signs (e.g. “”): Placeholder for a parameter= +• Anything in square brackets (e.g. “[text]”) is optional and can be omitted= +• Pipe or slash (e.g. “text1 | text2 | text3”): Alternation. One of multiple texts must be used (e.g. “text2”)= +• Parenthesis: (e.g. “(word1 word2) | word3”): Groups multiple words together, used for alternations= +• Everything else is to be read as literal text= +Here are some examples to illustrate the command syntax:= +• /mods: No parameters. Just enter “/mods”= +• /me : 1 parameter. You have to enter “/me ” followed by any text, e.g. “/me orders pizza”= +• /give : Two parameters. Example: “/give Player default:apple”= +• /help [all|privs|]: Valid inputs are “/help”, “/help all”, “/help privs”, or “/help ” followed by a command name, like “/help time”= +• /spawnentity [,,]: Valid inputs include “/spawnentity boats:boat” and “/spawnentity boats:boat 0,0,0”= +Some final remarks:= +• For /give and /giveme, you need an itemstring. This is an internally used unique item identifier which you may find in the item help if you have the “give” or “debug” privilege= +• For /spawnentity you need an entity name, which is another identifier= +Privileges= +Each player has a set of privileges, which differs from server to server. Your privileges determine what you can and can't do. Privileges can be granted and revoked from other players by any player who has the privilege called “privs”.= +On a multiplayer server with the default configuration, new players start with the privileges called “interact” and “shout”. The “interact” privilege is required for the most basic gameplay actions such as building, mining, using, etc. The “shout” privilege allows to chat.= +There is a small set of core privileges which you'll find on every server, other privileges might be added by mods.= +To view your own privileges, issue the server command “/privs”.= +Here are a few basic privilege-related commands:= +• /privs: Lists your privileges= +• /privs : Lists the privileges of = +• /help privs: Shows a list and description about all privileges= +Players with the “privs” privilege can modify privileges at will:= +• /grant : Grant to = +• /revoke : Revoke from = +In single-player mode, you can use “/grant singleplayer all” to unlock all abilities (which is often considered cheating).= +Light= +As the world is entirely block-based, so is the light in the world. Each block has its own brightness. The brightness of a block is expressed in a “light level” which ranges from 0 (total darkness) to 15 (as bright as the sun).= +There are two types of light: Sunlight and artificial light.= +Artificial light is emitted by luminous blocks. Artificial light has a light level from 1-14.= +Sunlight is the brightest light and always goes perfectly straight down from the sky at each time of the day. blocks. At night, the sunlight will become moonlight instead, which still provides a small amount of light. The light level of sunlight is 15.= +Blocks have 3 levels of transparency:= +• Transparent: Sunlight goes through limitless, artificial light goes through with losses= +• Semi-transparent: Sunlight and artificial light go through with losses= +• Opaque: No light passes through= +Artificial light will lose one level of brightness for each transparent or semi-transparent block it passes through, until only darkness remains (image 1).= +Sunlight will preserve its brightness as long it only passes fully transparent blocks. When it passes through a semi-transparent block, it turns to artificial light. Image 2 shows the difference.= +Note that “transparency” here only means that the block is able to carry brightness from its neighboring blocks. It is possible for a block to be transparent to light but you can't see trough the other side.= +Coordinates= +The world is a large cube. And because of this, a position in the world can be easily expressed with Cartesian coordinates. That is, for each position in the world, there are 3 values X, Y and Z.= +Like this: (5, 45, -12)= +This refers to the position where X@=5, Y@=45 and Z@=-12. The 3 letters are called “axes”: Y is for the height. X and Z are for the horizontal position.= +The values for X, Y and Z work like this:= +• If you go up, Y increases= +• If you go down, Y decreases= +• If you follow the sun, X increases= +• If you go to the reverse direction, X decreases= +• Follow the sun, then go right: Z increases= +• Follow the sun, then go left: Z decreases= +• The side length of a full cube is 1= +You can view your current position in the debug screen (open with [F5]). This is considered cheating in some games.= + +# MCL2 extensions +Creative Mode= +Enabling Creative Mode in MineClone 2 applies the following changes:= +• You keep the things you've placed= +• Creative inventory is available to obtain most items easily= +• Hand breaks all default blocks instantly= +• Greatly increased hand pointing range= +• Mined blocks don't drop items= +• Items don't get used up= +• Tools don't wear off= +• You can eat food whenever you want= +• You can always use the minimap (including radar mode)= +Damage is not affected by Creative Mode, it needs to be disabled separately.= +Mobs= +Mobs are the living beings in the world. This includes animals and monsters.= +Mobs appear randomly throughout the world. This is called “spawning”. Each mob kind appears on particular block types at a given light level. The height also plays a role. Peaceful mobs tend to spawn at daylight while hostile ones prefer darkness. Most mobs can spawn on any solid block but some mobs only spawn on particular blocks (like grass blocks).= +Like players, mobs have hit points and sometimes armor points, too (which means you need better weapons to deal any damage at all). Also like players, hostile mobs can attack directly or at a distance. Mobs may drop random items after they die.= +Most animals roam the world aimlessly while most hostile mobs hunt players. Animals can be fed, tamed and bred.= +Animals= +Animals are peaceful beings which roam the world aimlessly. You can feed, tame and breed them.= +Feeding:= +Each animal has its own taste for food and doesn't just accept any food. To feed, hold an item in your hand and rightclick the animal.= +Animals are attraced to the food they like and follow you as long you hold the food item in hand.= +Feeding an animal has three uses: Taming, healing and breeding.= +Feeding heals animals instantly, depending on the quality of the food item.= +Taming:= +A few animals can be tamed. You can generally do more things with tamed animals and use other items on them. For example, tame horses can be saddled and tame wolves fight on your side.= +Breeding:= +When you have fed an animal up to its maximum health, then feed it again, you will activate “Love Mode” and many hearts appear around the animal.= +Two animals of the same species will start to breed if they are in Love Mode and close to each other. Soon a baby animal will pop up.= +Baby animals:= +Baby animals are just like their adult couterparts, but they can't be tamed or bred and don't drop anything when they die. They grow to adults after a short time. When fed, they grow to adults faster.= +Hunger= +Hunger affects your health and your ability to sprint. Hunger is not in effect when damage is disabled.= +Core hunger rules:= +• You start with 20/20 hunger points (more points @= less hungry)= +• Actions like combat, jumping, sprinting, etc. decrease hunger points= +• Food restores hunger points= +• If your hunger bar decreases, you're hungry= +• At 18-20 hunger points, you regenerate 1 HP every 4 seconds= +• At 6 hunger points or less, you can't sprint= +• At 0 hunger points, you lose 1 HP every 4 seconds (down to 1 HP)= +• Poisonous food decreases your health= +Details:= +You have 0-20 hunger points, indicated by 20 drumstick half-icons above the hotbar. You also have an invisible attribute: Saturation.= +Hunger points reflect how full you are while saturation points reflect how long it takes until you're hungry again.= +Each food item increases both your hunger level as well your saturation.= +Food with a high saturation boost has the advantage that it will take longer until you get hungry again.= +A few food items might induce food poisoning by chance. When you're poisoned, the health and hunger symbols turn sickly green. Food poisoning drains your health by 1 HP per second, down to 1 HP. Food poisoning also drains your saturation. Food poisoning goes away after a while or when you drink milk.= +You start with 5 saturation points. The maximum saturation is equal to your current hunger level. So with 20 hunger points your maximum saturation is 20. What this means is that food items which restore many saturation points are more effective the more hunger points you have. This is because at low hunger levels, a lot of the saturation boost will be lost due to the low saturation cap.= +If your saturation reaches 0, you're hungry and start to lose hunger points. Whenever you see the hunger bar decrease, it is a good time to eat.= +Saturation decreases by doing things which exhaust you (highest exhaustion first):= +• Regenerating 1 HP= +• Suffering food poisoning= +• Sprint-jumping= +• Sprinting= +• Attacking= +• Taking damage= +• Swimming= +• Jumping= +• Mining a block= +Other actions, like walking, do not exaust you.= +If you have a map item in any of your hotbar slots, you can use the minimap.= diff --git a/mods/HELP/mcl_doc_basics/mcl_extension.lua b/mods/HELP/mcl_doc_basics/mcl_extension.lua new file mode 100644 index 000000000..c6f9f0aa9 --- /dev/null +++ b/mods/HELP/mcl_doc_basics/mcl_extension.lua @@ -0,0 +1,97 @@ +local S = minetest.get_translator("mcl_doc_basics") + +doc.add_entry("advanced", "creative", { + name = S("Creative Mode"), + data = { text = +S("Enabling Creative Mode in MineClone 2 applies the following changes:").."\n\n".. + +S("• You keep the things you've placed").."\n".. +S("• Creative inventory is available to obtain most items easily").."\n".. +S("• Hand breaks all default blocks instantly").."\n".. +S("• Greatly increased hand pointing range").."\n".. +S("• Mined blocks don't drop items").."\n".. +S("• Items don't get used up").."\n".. +S("• Tools don't wear off").."\n".. +S("• You can eat food whenever you want").."\n".. +S("• You can always use the minimap (including radar mode)").."\n\n".. + +S("Damage is not affected by Creative Mode, it needs to be disabled separately.") +}}) + +doc.add_entry("basics", "mobs", { + name = S("Mobs"), + data = { text = +S("Mobs are the living beings in the world. This includes animals and monsters.").."\n\n".. + +S("Mobs appear randomly throughout the world. This is called “spawning”. Each mob kind appears on particular block types at a given light level. The height also plays a role. Peaceful mobs tend to spawn at daylight while hostile ones prefer darkness. Most mobs can spawn on any solid block but some mobs only spawn on particular blocks (like grass blocks).").."\n\n".. + +S("Like players, mobs have hit points and sometimes armor points, too (which means you need better weapons to deal any damage at all). Also like players, hostile mobs can attack directly or at a distance. Mobs may drop random items after they die.").."\n\n".. + +S("Most animals roam the world aimlessly while most hostile mobs hunt players. Animals can be fed, tamed and bred.") +}}) + +doc.add_entry("basics", "animals", { + name = S("Animals"), + data = { text = +S("Animals are peaceful beings which roam the world aimlessly. You can feed, tame and breed them.").."\n\n".. + +S("Feeding:").."\n".. +S("Each animal has its own taste for food and doesn't just accept any food. To feed, hold an item in your hand and rightclick the animal.").."\n".. +S("Animals are attraced to the food they like and follow you as long you hold the food item in hand.").."\n".. +S("Feeding an animal has three uses: Taming, healing and breeding.").."\n".. +S("Feeding heals animals instantly, depending on the quality of the food item.").."\n\n".. + +S("Taming:").."\n".. +S("A few animals can be tamed. You can generally do more things with tamed animals and use other items on them. For example, tame horses can be saddled and tame wolves fight on your side.").."\n\n".. + +S("Breeding:").."\n".. +S("When you have fed an animal up to its maximum health, then feed it again, you will activate “Love Mode” and many hearts appear around the animal.").."\n".. +S("Two animals of the same species will start to breed if they are in Love Mode and close to each other. Soon a baby animal will pop up.").."\n\n".. + +S("Baby animals:").."\n".. +S("Baby animals are just like their adult couterparts, but they can't be tamed or bred and don't drop anything when they die. They grow to adults after a short time. When fed, they grow to adults faster.") + +}}) + +doc.add_entry("basics", "hunger", { + name = S("Hunger"), + data = { text = +S("Hunger affects your health and your ability to sprint. Hunger is not in effect when damage is disabled.").."\n\n".. + +S("Core hunger rules:").."\n\n".. +S("• You start with 20/20 hunger points (more points = less hungry)").."\n".. +S("• Actions like combat, jumping, sprinting, etc. decrease hunger points").."\n".. +S("• Food restores hunger points").."\n".. +S("• If your hunger bar decreases, you're hungry").."\n".. +S("• At 18-20 hunger points, you regenerate 1 HP every 4 seconds").."\n".. +S("• At 6 hunger points or less, you can't sprint").."\n".. +S("• At 0 hunger points, you lose 1 HP every 4 seconds (down to 1 HP)").."\n".. +S("• Poisonous food decreases your health").."\n\n".. + + +S("Details:").."\n\n".. +S("You have 0-20 hunger points, indicated by 20 drumstick half-icons above the hotbar. You also have an invisible attribute: Saturation.").."\n".. +S("Hunger points reflect how full you are while saturation points reflect how long it takes until you're hungry again.").."\n\n".. + +S("Each food item increases both your hunger level as well your saturation.").."\n".. +S("Food with a high saturation boost has the advantage that it will take longer until you get hungry again.").."\n".. +S("A few food items might induce food poisoning by chance. When you're poisoned, the health and hunger symbols turn sickly green. Food poisoning drains your health by 1 HP per second, down to 1 HP. Food poisoning also drains your saturation. Food poisoning goes away after a while or when you drink milk.").."\n\n".. + +S("You start with 5 saturation points. The maximum saturation is equal to your current hunger level. So with 20 hunger points your maximum saturation is 20. What this means is that food items which restore many saturation points are more effective the more hunger points you have. This is because at low hunger levels, a lot of the saturation boost will be lost due to the low saturation cap.").."\n".. +S("If your saturation reaches 0, you're hungry and start to lose hunger points. Whenever you see the hunger bar decrease, it is a good time to eat.").."\n\n".. + +S("Saturation decreases by doing things which exhaust you (highest exhaustion first):").."\n".. +S("• Regenerating 1 HP").."\n".. +S("• Suffering food poisoning").."\n".. +S("• Sprint-jumping").."\n".. +S("• Sprinting").."\n".. +S("• Attacking").."\n".. +S("• Taking damage").."\n".. +S("• Swimming").."\n".. +S("• Jumping").."\n".. +S("• Mining a block").."\n\n".. + +S("Other actions, like walking, do not exaust you.") + +}}) + diff --git a/mods/HELP/mcl_doc_basics/mod.conf b/mods/HELP/mcl_doc_basics/mod.conf index 8138f7d82..525619045 100644 --- a/mods/HELP/mcl_doc_basics/mod.conf +++ b/mods/HELP/mcl_doc_basics/mod.conf @@ -1 +1,3 @@ -name = doc_basics +name = mcl_doc_basics +depends = doc +description = Adds some help texts explaining how to use MineClone 2. diff --git a/mods/HELP/modpack.txt b/mods/HELP/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/HUD/awards/api.lua b/mods/HUD/awards/api.lua index 09f929176..b25a2aaaf 100644 --- a/mods/HUD/awards/api.lua +++ b/mods/HUD/awards/api.lua @@ -29,10 +29,7 @@ function awards.save() end end -local S = function(s) return s end -function awards.set_intllib(locale) - S = locale -end +local S = minetest.get_translator("awards") function awards.init() awards.players = awards.load() @@ -277,9 +274,9 @@ function awards.unlock(name, award) elseif awards.show_mode == "chat" then local chat_announce if awdef.secret == true then - chat_announce = S("Secret achievement gotten: %s") + chat_announce = S("Secret achievement gotten: @1") else - chat_announce = S("Achievement gotten: %s") + chat_announce = S("Achievement gotten: @1") end -- use the chat console to send it minetest.chat_send_player(name, string.format(chat_announce, title)) @@ -389,12 +386,14 @@ function awards.getFormspec(name, to, sid) if def and def.title then title = def.title end - local status = "%s" + local status if item.got then - status = S("%s (got)") + status = S("@1 (got)", title) + else + status = title end formspec = formspec .. "label[1,2.75;" .. - string.format(status, minetest.formspec_escape(title)) .. + minetest.formspec_escape(status) .. "]" if def and def.icon then formspec = formspec .. "image[1,0;3,3;" .. def.icon .. "]" @@ -469,14 +468,14 @@ function awards.show_to(name, to, sid, text) minetest.chat_send_player(to, S("You have not gotten any awards.")) return end - minetest.chat_send_player(to, string.format(S("%s’s awards:"), name)) + minetest.chat_send_player(to, S("@1’s awards:"), name) for _, str in pairs(awards.players[name].unlocked) do local def = awards.def[str] if def then if def.title then if def.description then - minetest.chat_send_player(to, string.format(S("%s: %s"), def.title, def.description)) + minetest.chat_send_player(to, S("@1: @2", def.title, def.description)) else minetest.chat_send_player(to, def.title) end diff --git a/mods/HUD/awards/chat_commands.lua b/mods/HUD/awards/chat_commands.lua index c386c19cb..6571267db 100644 --- a/mods/HUD/awards/chat_commands.lua +++ b/mods/HUD/awards/chat_commands.lua @@ -14,12 +14,7 @@ -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function ( s ) return s end -end +local S = minetest.get_translator("awards") minetest.register_chatcommand("awards", { params = S("[c|clear|disable|enable]"), diff --git a/mods/HUD/awards/depends.txt b/mods/HUD/awards/depends.txt index cffd94739..80a448a44 100644 --- a/mods/HUD/awards/depends.txt +++ b/mods/HUD/awards/depends.txt @@ -1,3 +1,2 @@ -intllib? sfinv? unified_inventory? diff --git a/mods/HUD/awards/init.lua b/mods/HUD/awards/init.lua index acf8bfdca..63c9303c1 100644 --- a/mods/HUD/awards/init.lua +++ b/mods/HUD/awards/init.lua @@ -14,18 +14,9 @@ -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- - -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function ( s ) return s end -end - dofile(minetest.get_modpath("awards").."/api.lua") dofile(minetest.get_modpath("awards").."/chat_commands.lua") dofile(minetest.get_modpath("awards").."/sfinv.lua") dofile(minetest.get_modpath("awards").."/unified_inventory.lua") dofile(minetest.get_modpath("awards").."/triggers.lua") -awards.set_intllib(S) diff --git a/mods/HUD/awards/locale/awards.de.tr b/mods/HUD/awards/locale/awards.de.tr new file mode 100644 index 000000000..49663d119 --- /dev/null +++ b/mods/HUD/awards/locale/awards.de.tr @@ -0,0 +1,51 @@ +# textdomain:awards +@1: @2=@1: @2 +@1 (got)=@1 (erhalten) +@1’s awards:=Auszeichnungen von @1: +(Secret Award)=(Geheime Auszeichnung) +Achievement gotten!=Auszeichnung erhalten! +Achievement gotten:=Auszeichnung erhalten: +Achievement gotten: @1=Auszeichnung erhalten: @1 +Secret achievement gotten!=Geheime Auszeichnung erhalten! +Secret achievement gotten:=Geheime Auszeichnung erhalten: +Secret achievement gotten: @1=Geheime Auszeichnung erhalten: @1 +Get this achievement to find out what it is.=Verdienen Sie sich diese Auszeichnung, um herauszufinden, was sie ist. +You have not gotten any awards.=Sie haben noch keine Auszeichnungen. +You've disabled awards. Type /awards enable to reenable.=Sie haben die Auszeichnungen deaktiviert. Geben Sie »/awards enable« ein, um sie wieder zu aktivieren. += += +Achievement not found.=Auszeichnung nicht gefunden. +All your awards and statistics have been cleared. You can now start again.=All Ihre Auszeichnugen und Statistiken wurden zurückgesetzt. Sie können nun von vorne anfangen. +Get the achievements statistics for the given player or yourself=Die Statistik der Auszeichnungen eines Spielers zeigen +List awards in chat (deprecated)=Auszeichnungen im Chat anzeigen (veraltet) +Show, clear, disable or enable your achievements=Zeigen, löschen, deaktivieren oder aktivieren Sie Ihre Auszeichnungen +You have disabled your achievements.=Sie haben Ihre Auszeichnungen deaktiviert. +You have enabled your achievements.=Sie haben Ihre Auszeichnungen aktiviert. +[c|clear|disable|enable]=[c|clear|disable|enable] +Awards=Auszeichnungen +@1/@2 crafted=@1/@2 gefertigt +@1/@2 deaths=@1/@2 Tode +@1/@2 dug=@1/@2 abgebaut +@1/@2 game joins=@1/@2 Spielen beigetreten +@1/@2 lines of chat=@1/@2 Chatzeilen +@1/@2 placed=@1/@2 platziert +Die @1 times.=Sterben Sie @1 mal. +Die.=Sterben Sie. +Craft: @1×@2=Fertigen Sie an: @1×@2 +Craft: @1=Fertigen Sie an: @1 +Mine a block: @1=Bauen Sie einen Block ab: @1 +Mine blocks: @1×@2=Bauen Sie Blöcke ab: @1×@2 +Place a block: @1=Platzieren Sie einen Block: @1 +Place blocks: @1×@2=Platzieren Sie Blöcke: @1×@2 +Join the game.=Treten Sie dem Spiel bei. +Join the game @1 times.=Treten Sie dem Spiel @1 mal bei. +Show details of an achievement=Details einer Auszeichnung anzeigen +OK=OK +Error: No awards available.=Fehler: Keine Auszeichnungen vorhanden. +Eat: @1×@2=Essen Sie: @1×@2 +Eat: @1=Essen Sie: @1 +@1/@2 eaten=@1/@2 gegessen +Place @1 block(s).=Platzieren Sie @1 Blöcke. +Dig @1 block(s).=Bauen Sie @1 Blöcke ab. +Eat @1 item(s).=Essen Sie @1 Dinge. +Craft @1 item(s).=Fertigen Sie @1 Gegenstände. diff --git a/mods/HUD/awards/locale/de.txt b/mods/HUD/awards/locale/de.txt deleted file mode 100644 index 3396a34f0..000000000 --- a/mods/HUD/awards/locale/de.txt +++ /dev/null @@ -1,198 +0,0 @@ -A Cat in a Pop-Tart?! = Eine Katze im Pop-Tart?! -Aspiring Farmer = Aufstrebender Bauer -Backpacker = Rucksacktourist -Bankier = Bankier -Bricker = Ziegler -Build a Cave = Höhlenbauer -Castorama = Gießmeister -Craft 10 furnaces. = Fertigen Sie 10 Öfen. -Craft 10 mese lamps. = Fertigen Sie 10 Meselampen. -Craft 100 obsidian bricks. = Fertigen Sie 100 Obsidianziegel. -Craft 100 sandstone bricks. = Fertigen Sie 100 Sandsteinziegel. -Craft 100 sticks. = Fertigen Sie 100 Stöcke. -Craft 100 white dyes. = Fertigen Sie 100 weiße Farbstoffe. -Craft 14 vessels shelves. = Fertigen Sie 14 Gefäßregale. -Craft 15 chests. = Fertigen Sie 15 Truhen. -Craft 15 fancy beds. = Fertigen Sie 15 schicke Betten. -Craft 200 brick blocks. = Fertigen Sie 200 Ziegelblöcke. -Craft 200 stone bricks. = Fertigen Sie 200 Steinziegel. -Craft 24 gold block stairs. = Fertigen Sie 24 Goldblockstufen. -Craft 250 white wool. = Fertigen Sie 250 weiße Wolle. -Craft 3,200 stone bricks. = Fertigen Sie 3200 Steinziegel. -Craft 30 locked chests. = Fertigen Sie 30 abgeschlossene Truhen. -Craft 4 large bags. = Fertigen Sie 4 große Taschen. -Craft 400 blue dyes. = Fertigen Sie 400 blaue Farbstoffe. -Craft 400 desert stone bricks. = Fertigen Sie 400 Wüstensteinziegel. -Craft 400 red dyes. = Fertigen Sie 400 rote Farbstoffe. -Craft 400 yellow dyes. = Fertigen Sie 400 gelbe Farbstoffe. -Craft 7 bookshelves. = Fertigen Sie 7 Bücherregale. -Craft 8 times flint and steel. = Fertigen Sie 8 mal einen Feuerstein und Stahl an. -Craft 800 stone bricks. = Fertigen Sie 800 Steinziegel an. -Craft a diamond block. = Fertigen Sie einen Diamantblock an. -Crafter of Sticks = Stockmacher -Dandelions are Yellow = Löwenzahn ist gelb -Desert Discoverer = Wüstenerkunder -Desert Dweller = Wüstenbewohner -Dig 1,000 copper ores. = Bauen Sie 1000 Kupfererze ab. -Dig 1,000 jungle tree blocks. = Bauen Sie 1000 Dschungelbaumblöcke ab. -Dig 1,000 sand. = Bauen Sie 1000 Sand ab. -Dig 1,000 stone blocks. = Bauen Sie 1000 Steine ab. -Dig 1,296 tree blocks. = Bauen Sie 1296 Baumblöcke ab. -Dig 10,000 stone blocks. = Bauen Sie 10000 Steine ab. -Dig 100 jungle tree blocks. = Bauen Sie 100 Dschungelbaumblöcke ab. -Dig 100 stone blocks. = Bauen Sie 100 Steinblöcke ab. -Dig 216 tree blocks. = Bauen Sie 216 Baumblöcke ab. -Dig 36 tree blocks. = Bauen Sie 36 Baumblöcke ab. -Dig 6 tree blocks. = Bauen Sie 6 Baumblöcke ab. -Far Lands = Ferne Lande -Farming Skills Aquired = Landwirtschaft erlernt -Field Worker = Feldarbeiter -Filthy Rich = Stinkreich -Firefighter = Feuerwehr -First Day in the Woods = Erster Tag im Wald -First Gold Find = Erster Goldfund -First Mese Find = Erster Mesefund -Fortress = Burg -Geraniums are Blue = Geranien sind blau -Girl's Best Friend = Bester Freund der Mädchen -Glacier Discoverer = Gletschererkunder -Glasser = Glasmacher -Gold Rush = Goldrausch -Grasslands Discoverer = Prärieerkunder -Hardened Miner = Abhehärteter Bergarbeiter -Hardest Block on Earth = Härtester Block der Welt -Harvest 125 fully grown wheat plants. = Ernten Sie 125 voll ausgewachsene Getreidepflanzen. -Harvest 25 fully grown wheat plants. = Ernten Sie 25 voll ausgewachsene Getreidepflanzen. -Harvest 625 fully grown wheat plants. = Ernten Sie 625 voll ausgewachsene Getreidepflanzen. -Harvest a fully grown wheat plant. = Ernten Sie eine voll ausgewachsene Getreidepflanze. -Hotelier = Hotelier -House of Obsidian = Haus aus Obsidian -In the Dungeon = Im Verlies -Industrial Age = Industriezeitalter -Jungle Discoverer = Dschungelerkunder -Junglebaby = Dschungelbaby -Jungleman = Dschungelmann -Lava Miner = Lavagräber -Lava and Water = Lava und Wasser -Light It Up = Licht an! -Little Library = Kleine Bücherei -Long Ladder = Lange Leiter -Lumberjack = Holzfäller -Marchand De Sable = -Master Miner = Profibergarbeiter -Mese Mastery = Mesemeister -Mine 18 diamond ores. = Bauen Sie 18 Diamanterze ab. -Mine 45 gold ores. = Bauen Sie 18 Diamanterze ab. -Mine 50 obsidian. = Bauen Sie 50 Obsidian ab. -Mine a mese block. = Bauen Sie einen Meseblock ab. -Mine a mossy cobblestone. = Bauen Sie ein bemoostes Kopfsteinpflaster ab. -Mine a nyan cat. = Bauen Sie eine Nyan Cat ab. -Mine any block while being very close to lava. = Bauen Sie einen beliebigen Block ab, während Sie sehr nahe an der Lava stehen. -Mine some dry grass. = Bauen Sie etwas trockenes Gras ab. -Mine some grass. = Bauen Sie etwas Gras ab. -Mine your first cactus. = Bauen Sie Ihren ersten Kaktus ab. -Mine your first diamond ore. = Bauen Sie Ihr erstes Diamanterz ab. -Mine your first dry shrub. = Bauen Sie Ihren ersten vertrockneten Strauch ab. -Mine your first gold ore. = Bauen Sie Ihr erstes Golderz ab. -Mine your first ice. = Bauen Sie Ihr erstes Eis ab. -Mine your first jungle grass. = Bauen Sie Ihr erstes Dschungelgras ab. -Mine your first mese ore. = Bauen Sie Ihr erstes Meseerz ab. -Mine your first obsidian. = Bauen Sie Ihr erstes Obsidian ab. -Mini Miner = Berganfänger -Obsessed with Obsidian = Von Obsidian besessen -On The Way = Auf dem Weg -Outpost = Außenposten -Pharaoh = Pharao -Place 1,000 torches. = Platzieren Sie 1000 Fackeln. -Place 100 rails. = Platzieren Sie 100 Gleise. -Place 100 stone. = Platzieren Sie 100 Steine. -Place 100 torches. = Platzieren Sie 100 Fackeln. -Place 2 trap stones. = Platzieren Sie 2 Fallensteine. -Place 20 coal checkers. = Platzieren Sie 20 Kohlenschachbrettmuster. -Place 20 iron checkers. = Platzieren Sie 20 Eisenschachbrettmuster. -Place 40 steel ladders. = Platzieren Sie 40 Stahlleitern. -Place 400 wooden ladders. = Platzieren Sie 400 Holzleitern. -Place two snow blocks. = Platzieren Sie zwei Schneeblöcke. -Professional Lumberjack = Profiholzfäller -Put out 1000 fires. = Löschen Sie 1000 Flammen. -Pyromaniac = Pyromane -Really Well Lit = Sehr gute Beleuchtung -Roses Are Red = Rosen sind rot -Saint-Maclou = Saint-Maclou -Sam the Trapper = Sam der Fallensteller -Savannah Discoverer = Savannenerkunder -Semi-pro Lumberjack = Fortgeschrittener Holzfäller -Smelter = Schmelzer -Treasurer = Schatzmeister -Very Simple Snow Man = Sehr simpler Schneemann -Watchtower = Wachturm -Well Lit = Gut ausgeleuchtet -Wheat Magnate = Getreidemagnat -White Color Stock = Weißer Farbstoffvorrat -Wool Over Your Eyes = Wollige Augen -Wow, I am Diamonds! = Wow, ich bin Diamanten! -You’re a copper = Du Kupfer! -%s: %s = %s: %s -%s (got) = %s (erhalten) -%s’s awards: = %ss Auszeichnungen: -(Secret Award) = (Geheime Auszeichnung) -Achievement gotten! = Auszeichnung erhalten! -Achievement gotten: = Auszeichnung erhalten: -Achievement gotten: %s = Auszeichnung erhalten: %s -Secret achievement gotten! = Geheime Auszeichnung erhalten! -Secret achievement gotten: = Geheime Auszeichnung erhalten: -Secret achievement gotten: %s = Geheime Auszeichnung erhalten: %s -Get this achievement to find out what it is. = Verdienen Sie sich diese Auszeichnung, um herauszufinden, was sie ist. -You have not gotten any awards. = Sie haben noch keine Auszeichnungen. -You've disabled awards. Type /awards enable to reenable. = Sie haben die Auszeichnungen deaktiviert. Geben Sie »/awards enable« ein, um sie wieder zu aktivieren. - = - = -Achievement not found. = Auszeichnung nicht gefunden. -All your awards and statistics have been cleared. You can now start again. = All Ihre Auszeichnugen und Statistiken wurden zurückgesetzt. Sie können nun von vorne anfangen. -Get the achievements statistics for the given player or yourself = Die Statistik der Auszeichnungen eines Spielers zeigen -List awards in chat (deprecated) = Auszeichnungen im Chat anzeigen (veraltet) -Show, clear, disable or enable your achievements = Zeigen, löschen, deaktivieren oder aktivieren Sie Ihre Auszeichnungen -You have disabled your achievements. = Sie haben Ihre Auszeichnungen deaktiviert. -You have enabled your achievements. = Sie haben Ihre Auszeichnungen aktiviert. -[c|clear|disable|enable] = [c|clear|disable|enable] -Awards = Auszeichnungen -%d/%d crafted = %d/%d gefertigt -%d/%d deaths = %d/%d Tode -%d/%d dug = %d/%d abgebaut -%d/%d game joins = %d/%d Spielen beigetreten -%d/%d lines of chat = %d/%d Chatzeilen -%d/%d placed = %d/%d platziert -Die %d times. = Sterben Sie %d mal. -Die. = Sterben Sie. -Craft: %d×%s = Fertigen Sie an: %d×%s -Craft: %s = Fertigen Sie an: %s -Mine a block: %s = Bauen Sie einen Block ab: %s -Mine blocks: %d×%s = Bauen Sie Blöcke ab: %d×%s -Place a block: %s = Platzieren Sie einen Block: %s -Place blocks: %d×%s = Platzieren Sie Blöcke: %d×%s -Join the game. = Treten Sie dem Spiel bei. -Join the game %d times. = Treten Sie dem Spiel %d mal bei. -Show details of an achievement = Details einer Auszeichnung anzeigen -OK = OK -Error: No awards available. = Fehler: Keine Auszeichnungen vorhanden. -Eat: %d×%s = Essen Sie: %d×%s -Eat: %s = Essen Sie: %s -%d/%d eaten = %d/%d gegessen -Yummy! = Lecker! -Baker = Bäcker -Eat 10 loaves of bread. = Essen Sie 10 Brote. -Eat 80 apples. = Essen Sie 80 Äpfel. -Tasty Mushrooms = Leckere Pilze -Mushroom Lover = Pilzfreund -Underground Mushroom Farmer = Unterirdischer Pilzbauer -Eat 3 brown mushrooms. = Essen Sie 3 braune Pilze. -Eat 33 brown mushrooms. = Essen Sie 33 braune Pilze. -Eat 333 brown mushrooms. = Essen Sie 333 braune Pilze. -Builder = Bauarbeiter -Constructor = Konstrukteur -Architect = Architekt -Master Architect = Meisterarchitekt -Place %d block(s). = Platzieren Sie %d Blöcke. -Dig %d block(s). = Bauen Sie %d Blöcke ab. -Eat %d item(s). = Essen Sie %d Dinge. -Craft %d item(s). = Fertigen Sie %d Gegenstände. diff --git a/mods/HUD/awards/locale/template.txt b/mods/HUD/awards/locale/template.txt index eecb0c5f8..bcfb67acd 100644 --- a/mods/HUD/awards/locale/template.txt +++ b/mods/HUD/awards/locale/template.txt @@ -1,196 +1,52 @@ -%d/%d chat messages = -%d/%d crafted = -%d/%d deaths = -%d/%d dug = -%d/%d game joins = -%d/%d placed = -%s (got) = -%s: %s = -%s’s awards: = -(Secret Award) = - = - = -A Cat in a Pop-Tart?! = -Achievement gotten! = -Achievement gotten: = -Achievement gotten: %s = -Achievement not found. = -All your awards and statistics have been cleared. You can now start again. = -Aspiring Farmer = -Awards = -Backpacker = -Bankier = -Bricker = -Build a Cave = -Castorama = -Craft 10 furnaces. = -Craft 10 mese lamps. = -Craft 100 obsidian bricks. = -Craft 100 sandstone bricks. = -Craft 100 sticks. = -Craft 100 white dyes. = -Craft 14 vessels shelves. = -Craft 15 chests. = -Craft 15 fancy beds. = -Craft 200 brick blocks. = -Craft 200 stone bricks. = -Craft 24 gold block stairs. = -Craft 250 white wool. = -Craft 3,200 stone bricks. = -Craft 30 locked chests. = -Craft 4 large bags. = -Craft 400 blue dyes. = -Craft 400 desert stone bricks. = -Craft 400 red dyes. = -Craft 400 yellow dyes. = -Craft 7 bookshelves. = -Craft 8 times flint and steel. = -Craft 800 stone bricks. = -Craft a diamond block. = -Craft: %d×%s = -Craft: %s = -Crafter of Sticks = -Dandelions are Yellow = -Desert Discoverer = -Desert Dweller = -Die %d times. = -Die. = -Dig 1,000 copper ores. = -Dig 1,000 jungle tree blocks. = -Dig 1,000 sand. = -Dig 1,000 stone blocks. = -Dig 1,296 tree blocks. = -Dig 10,000 stone blocks. = -Dig 100 jungle tree blocks. = -Dig 100 stone blocks. = -Dig 216 tree blocks. = -Dig 36 tree blocks. = -Dig 6 tree blocks. = -Far Lands = -Farming Skills Aquired = -Field Worker = -Filthy Rich = -Firefighter = -First Day in the Woods = -First Gold Find = -First Mese Find = -Fortress = -Geraniums are Blue = -Get the achievements statistics for the given player or yourself = -Girl's Best Friend = -Glacier Discoverer = -Glasser = -Gold Rush = -Grasslands Discoverer = -Hardened Miner = -Hardest Block on Earth = -Harvest 125 fully grown wheat plants. = -Harvest 25 fully grown wheat plants. = -Harvest 625 fully grown wheat plants. = -Harvest a fully grown wheat plant. = -Hotelier = -House of Obsidian = -In the Dungeon = -Industrial Age = -Join the game %d times. = -Join the game. = -Jungle Discoverer = -Junglebaby = -Jungleman = -Lava Miner = -Lava and Water = -Light It Up = -List awards in chat (deprecated) = -Little Library = -Long Ladder = -Lumberjack = -Marchand De Sable = -Master Miner = -Mese Mastery = -Mine 18 diamond ores. = -Mine 45 gold ores. = -Mine 50 obsidian. = -Mine a block: %s = -Mine a mese block. = -Mine a mossy cobblestone. = -Mine a nyan cat. = -Mine any block while being very close to lava. = -Mine blocks: %d×%s = -Mine some dry grass. = -Mine some grass. = -Mine your first cactus. = -Mine your first diamond ore. = -Mine your first dry shrub. = -Mine your first gold ore. = -Mine your first ice. = -Mine your first jungle grass. = -Mine your first mese ore. = -Mine your first obsidian. = -Mini Miner = -Obsessed with Obsidian = -On The Way = -Outpost = -Pharaoh = -Place 1,000 torches. = -Place 100 rails. = -Place 100 stone. = -Place 100 torches. = -Place 2 trap stones. = -Place 20 coal checkers. = -Place 20 iron checkers. = -Place 40 steel ladders. = -Place 400 wooden ladders. = -Place a block: %s = -Place blocks: %d×%s = -Place two snow blocks. = -Professional Lumberjack = -Put out 1000 fires. = -Pyromaniac = -Really Well Lit = -Roses Are Red = -Saint-Maclou = -Sam the Trapper = -Savannah Discoverer = -Secret Achievement gotten! = -Secret Achievement gotten: = -Secret Achievement gotten: %s = -Semi-pro Lumberjack = -Show details of an achievement = -Show, clear, disable or enable your achievements = -Smelter = -Treasurer = -Get this achievement to find out what it is. = -Very Simple Snow Man = -Watchtower = -Well Lit = -Wheat Magnate = -White Color Stock = -Wool Over Your Eyes = -Wow, I am Diamonds! = -Write %d chat messages. = -Write something in chat. = -You have disabled your achievements. = -You have enabled your achievements. = -You have not gotten any awards. = -You've disabled awards. Type /awards enable to reenable. = -You’re a copper = -[c|clear|disable|enable] = -OK = -Error: No awards available. = -Eat: %d×%s = -Eat: %s = -%d/%d eaten = -Place %d block(s). = -Dig %d block(s). = -Eat %d item(s). = -Craft %d item(s). = -Yummy! = -Baker = -Eat 10 loaves of bread. = -Eat 80 apples. = -Tasty Mushrooms = -Mushroom Lover = -Underground Mushroom Farmer = -Eat 3 brown mushrooms. = -Eat 33 brown mushrooms. = -Eat 333 brown mushrooms. = +# textdomain:awards +@1/@2 chat messages= +@1/@2 crafted= +@1/@2 deaths= +@1/@2 dug= +@1/@2 game joins= +@1/@2 placed= +@1 (got)= +@1: @1= +@1’s awards:= +(Secret Award)= += += +A Cat in a Pop-Tart?!= +Achievement gotten!= +Achievement gotten:= +Achievement gotten: @1= +Achievement not found.= +All your awards and statistics have been cleared. You can now start again.= +Awards= +Craft: @1×@2= +Craft: @1= +Die @1 times.= +Die.= +Get the achievements statistics for the given player or yourself= +Join the game @1 times.= +Join the game.= +List awards in chat (deprecated)= +Place a block: @1= +Place blocks: @1×@2= +Secret Achievement gotten!= +Secret Achievement gotten:= +Secret Achievement gotten: @1= +Show details of an achievement= +Show, clear, disable or enable your achievements= +Get this achievement to find out what it is.= +Write @1 chat messages.= +Write something in chat.= +You have disabled your achievements.= +You have enabled your achievements.= +You have not gotten any awards.= +You've disabled awards. Type /awards enable to reenable.= +[c|clear|disable|enable]= +OK= +Error: No awards available.= +Eat: @1×@2= +Eat: @1= +@1/@2 eaten= +Place @1 block(s).= +Dig @1 block(s).= +Eat @1 item(s).= +Craft @1 item(s).= diff --git a/mods/HUD/awards/sfinv.lua b/mods/HUD/awards/sfinv.lua index de85998c3..5d02cbb58 100644 --- a/mods/HUD/awards/sfinv.lua +++ b/mods/HUD/awards/sfinv.lua @@ -1,10 +1,5 @@ if minetest.get_modpath("sfinv") then - local S - if minetest.get_modpath("intllib") then - S = intllib.Getter() - else - S = function ( s ) return s end - end + local S = minetest.get_translator("awards") sfinv.register_page("awards:awards", { title = S("Awards"), diff --git a/mods/HUD/awards/triggers.lua b/mods/HUD/awards/triggers.lua index 88a952fdf..318a4b281 100644 --- a/mods/HUD/awards/triggers.lua +++ b/mods/HUD/awards/triggers.lua @@ -14,12 +14,7 @@ -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function ( s ) return s end -end +local S = minetest.get_translator("awards") awards.register_trigger("dig", function(def) local tmp = { @@ -37,7 +32,7 @@ awards.register_trigger("dig", function(def) end return { perc = itemcount / tmp.target, - label = string.format(S("%d/%d dug"), itemcount, tmp.target) + label = S("@1/@2 dug", itemcount, tmp.target) } end def.getDefaultDescription = function(self) @@ -47,12 +42,12 @@ awards.register_trigger("dig", function(def) nname = self.trigger.node end if self.trigger.target ~= 1 then - return string.format(S("Mine blocks: %d×%s"), self.trigger.target, nname) + return S("Mine blocks: @1×@2", self.trigger.target, nname) else - return string.format(S("Mine a block: %s"), nname) + return S("Mine a block: @1", nname) end else - return string.format(S("Mine %d block(s)."), self.trigger.target) + return S("Mine @1 block(s).", self.trigger.target) end end end) @@ -73,7 +68,7 @@ awards.register_trigger("place", function(def) end return { perc = itemcount / tmp.target, - label = string.format(S("%d/%d placed"), itemcount, tmp.target) + label = S("@1/@2 placed"), itemcount, tmp.target } end def.getDefaultDescription = function(self) @@ -83,12 +78,12 @@ awards.register_trigger("place", function(def) nname = self.trigger.node end if self.trigger.target ~= 1 then - return string.format(S("Place blocks: %d×%s"), self.trigger.target, nname) + return S("Place blocks: @1×@2", self.trigger.target, nname) else - return string.format(S("Place a block: %s"), nname) + return S("Place a block: @1", nname) end else - return string.format(S("Place %d block(s)."), self.trigger.target) + return S("Place @1 block(s).", self.trigger.target) end end end) @@ -109,7 +104,7 @@ awards.register_trigger("eat", function(def) end return { perc = itemcount / tmp.target, - label = string.format(S("%d/%d eaten"), itemcount, tmp.target) + label = S("@1/@2 eaten", itemcount, tmp.target) } end def.getDefaultDescription = function(self) @@ -119,12 +114,12 @@ awards.register_trigger("eat", function(def) iname = self.trigger.iode end if self.trigger.target ~= 1 then - return string.format(S("Eat: %d×%s"), self.trigger.target, iname) + return S("Eat: @1×@2", self.trigger.target, iname) else - return string.format(S("Eat: %s"), iname) + return S("Eat: @1", iname) end else - return string.format(S("Eat %d item(s)."), self.trigger.target) + return S("Eat @1 item(s).", self.trigger.target) end end end) @@ -139,12 +134,12 @@ awards.register_trigger("death", function(def) local itemcount = data.deaths or 0 return { perc = itemcount / tmp.target, - label = string.format(S("%d/%d deaths"), itemcount, tmp.target) + label = S("@1/@2 deaths", itemcount, tmp.target) } end def.getDefaultDescription = function(self) if self.trigger.target ~= 1 then - return string.format(S("Die %d times."), self.trigger.target) + return S("Die @1 times.", self.trigger.target) else return S("Die.") end @@ -161,12 +156,12 @@ awards.register_trigger("chat", function(def) local itemcount = data.chats or 0 return { perc = itemcount / tmp.target, - label = string.format(S("%d/%d chat messages"), itemcount, tmp.target) + label = S("@1/@2 chat messages", itemcount, tmp.target) } end def.getDefaultDescription = function(self) if self.trigger.target ~= 1 then - return string.format(S("Write %d chat messages."), self.trigger.target) + return S("Write @1 chat messages.", self.trigger.target) else return S("Write something in chat.") end @@ -183,12 +178,12 @@ awards.register_trigger("join", function(def) local itemcount = data.joins or 0 return { perc = itemcount / tmp.target, - label = string.format(S("%d/%d game joins"), itemcount, tmp.target) + label = S("@1/@2 game joins", itemcount, tmp.target) } end def.getDefaultDescription = function(self) if self.trigger.target ~= 1 then - return string.format(S("Join the game %d times."), self.trigger.target) + return S("Join the game @1 times.", self.trigger.target) else return S("Join the game.") end @@ -211,7 +206,7 @@ awards.register_trigger("craft", function(def) end return { perc = itemcount / tmp.target, - label = string.format(S("%d/%d crafted"), itemcount, tmp.target) + label = S("@1/@2 crafted", itemcount, tmp.target) } end def.getDefaultDescription = function(self) @@ -221,12 +216,12 @@ awards.register_trigger("craft", function(def) iname = self.trigger.item end if self.trigger.target ~= 1 then - return string.format(S("Craft: %d×%s"), self.trigger.target, iname) + return S("Craft: @1×@2", self.trigger.target, iname) else - return string.format(S("Craft: %s"), iname) + return S("Craft: @1", iname) end else - return string.format(S("Craft %d item(s)."), self.trigger.target) + return S("Craft @1 item(s).", self.trigger.target) end end end) diff --git a/mods/HUD/awards/unified_inventory.lua b/mods/HUD/awards/unified_inventory.lua index a4bb02dc3..be5ca5f94 100644 --- a/mods/HUD/awards/unified_inventory.lua +++ b/mods/HUD/awards/unified_inventory.lua @@ -1,10 +1,5 @@ if minetest.get_modpath("unified_inventory") ~= nil then - local S - if minetest.get_modpath("intllib") then - S = intllib.Getter() - else - S = function ( s ) return s end - end + local S = minetest.get_translator("awards") unified_inventory.register_button("awards", { type = "image", diff --git a/mods/HUD/hbarmor/locale/de.txt b/mods/HUD/hbarmor/locale/de.txt deleted file mode 100644 index 5a6bacdca..000000000 --- a/mods/HUD/hbarmor/locale/de.txt +++ /dev/null @@ -1,2 +0,0 @@ -Armor = Panzerung -%s: %d%% = %s: %d%% diff --git a/mods/HUD/hbarmor/locale/hbarmor.de.tr b/mods/HUD/hbarmor/locale/hbarmor.de.tr new file mode 100644 index 000000000..d1be86985 --- /dev/null +++ b/mods/HUD/hbarmor/locale/hbarmor.de.tr @@ -0,0 +1,2 @@ +Armor=Panzerung +%s: %d%%=%s: %d%% diff --git a/mods/HUD/hbarmor/locale/it.txt b/mods/HUD/hbarmor/locale/hbarmor.it.tr similarity index 65% rename from mods/HUD/hbarmor/locale/it.txt rename to mods/HUD/hbarmor/locale/hbarmor.it.tr index a2f704b24..f9c8f99e3 100644 --- a/mods/HUD/hbarmor/locale/it.txt +++ b/mods/HUD/hbarmor/locale/hbarmor.it.tr @@ -1,4 +1,4 @@ -Armor = Armatura +Armor=Armatura # Format string for displaying the armor. E.g. "Armor: 100%" -%s: %d%% = +%s: %d%%=%s: %d%% diff --git a/mods/HUD/hbarmor/locale/template.txt b/mods/HUD/hbarmor/locale/template.txt index d898abe48..09bc54cef 100644 --- a/mods/HUD/hbarmor/locale/template.txt +++ b/mods/HUD/hbarmor/locale/template.txt @@ -1,4 +1,4 @@ -Armor = +Armor= # Format string for displaying the armor. E.g. "Armor: 100%" -%s: %d%% = +%s: %d%%= diff --git a/mods/HUD/mcl_achievements/depends.txt b/mods/HUD/mcl_achievements/depends.txt index 1679faebb..203a4c0ab 100644 --- a/mods/HUD/mcl_achievements/depends.txt +++ b/mods/HUD/mcl_achievements/depends.txt @@ -1,2 +1 @@ awards -intllib? diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index fed23ee33..7473568d2 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -3,12 +3,7 @@ -- If true, activates achievements from other Minecraft editions (XBox, PS, etc.) local non_pc_achievements = false -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function ( s ) return s end -end +local S = minetest.get_translator("mcl_achievements") -- Achievements from PC Edition @@ -137,14 +132,11 @@ awards.register_achievement("mcl:acquireIron", { description = S("Take an iron ingot from a furnace's output slot.\nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace."), icon = "default_steel_ingot.png", }) ---[[ --- TODO: Re-enable when fishing rod is available awards.register_achievement("mcl:cookFish", { title = S("Delicious Fish"), description = S("Take a cooked fish from a furnace.\nHint: Use a fishing rod to catch a fish and cook it in a furnace."), icon = "mcl_fishing_fish_cooked.png", }) -]] -- Other achievements triggered outside of mcl_achievements diff --git a/mods/HUD/mcl_achievements/locale/mcl_achievements.de.tr b/mods/HUD/mcl_achievements/locale/mcl_achievements.de.tr new file mode 100644 index 000000000..49c486e48 --- /dev/null +++ b/mods/HUD/mcl_achievements/locale/mcl_achievements.de.tr @@ -0,0 +1,49 @@ +# textdomain:mcl_achievements +Aquire Hardware=Schmied +Bake Bread=Brot backen +Benchmarking=Tischler +Cow Tipper=Kuhschubser +Craft a bookshelf.=Fertigen Sie ein Bücherregal. +Craft a cake using wheat, sugar, milk and an egg.=Fertigen Sie einen Kuchen aus Weizen, Zucker, Milch und einem Ei. +Craft a crafting table from 4 wooden planks.=Fertigen Sie eine Werkbank aus 4 Holzplanken. +Craft a stone pickaxe using sticks and cobblestone.=Fertigen Sie eine Steinspitzhacke aus Stöcken und Kopfsteinpflaster. +Craft a wooden sword using wooden planks and sticks on a crafting table.=Fertigen Sie ein Holzschwert aus Holzplanken und Stöcken an einer Werkbank. +DIAMONDS!=DIAMANTEN! +Delicious Fish=Leckerer Fisch +Dispense With This=Ein Auge darauf werfen +Eat a cooked porkchop.=Essen Sie ein gekochtes Schweinekotelett +Eat a cooked rabbit.=Essen Sie ein gekochtes Kaninchen +Get really desperate and eat rotten flesh.=Verzweifeln Sie und essen Sie Gammelfleisch. +Getting Wood=Holzhacker +Getting an Upgrade=Aufwertung +Hit a skeleton, wither skeleton or stray by bow and arrow from a distance of at least 20 meters.=Treffen Sie ein Skelett, Witherskelett oder einen Eiswanderer mit Bogen und Pfeil aus einer Entfernung von mindestens 20 Metern. +Hot Topic=Heißes Eisen +Into Fire=In das Feuer +Into the Nether=In den Nether +Iron Belly=Eiserner Magen +Librarian=Bibliothekar +Mine emerald ore.=Bauen Sie Smaragderz ab. +On A Rail=Auf der Schiene +Pick up a blaze rod from the floor.=Sammeln Sie eine Lohenrute vom Boden auf. +Pick up a diamond from the floor.=Sammeln Sie einen Diamanten vom Boden auf. +Pick up a wood item from the ground.@nHint: Punch a tree trunk until it pops out as an item.=Sammeln Sie ein Stück Holz vom Boden auf.@nTipp: Hauen Sie einen Baumstamm, bis er als Gegenstand herausploppt. +Pick up leather from the floor.@nHint: Cows and some other animals have a chance to drop leather, when killed.=Sammeln Sie Leder vom Boden auf.@nTipp: Kühe und einige andere Tiere werfen vielleicht Leder ab, wenn sie sterben. +Place a dispenser.=Platzieren Sie einen Werfer +Place a flower pot.=Platzieren Sie einen Blumentopf +Pork Chop=Kassler +Pot Planter=Topfpflanzer +Rabbit Season=Kaninchensaison +Sniper Duel=Scharfschützenduell +Take a cooked fish from a furnace.@nHint: Use a fishing rod to catch a fish and cook it in a furnace.=Nehmen Sie einen gekochten Fisch aus einem Ofen.@nTipp: Benutzen Sie eine Angel, um einen Fisch zu fangen und kochen Sie ihn in einem Ofen. +Take an iron ingot from a furnace's output slot.@nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace.=Nehmen Sie einen Eisenbarren aus dem Ausgabeschlitz eines Ofens.@nTipp: Um einen Eisenbarren zu erhalten, platzieren Sie einen Brennstoff (wie Kohle) und Eisenerz in einen Ofen. +The Haggler=Der Sammler +The Lie=Die Lüge +Time to Farm!=Bauernzeit +Time to Mine!=Zeit zum Graben! +Time to Strike!=Zuschlagen! +Travel by minecart for at least 1000 meters from your starting point in a single ride.=Reisen Sie mit einer Lore für mindestens 1000 Meter vom Startpunkt aus in einer einzigen Fahrt. +Use 8 cobblestones to craft a furnace.=Benutzen Sie 8 Kopfsteinpflaster, um einen Ofen zu fertigen. +Use a crafting table to craft a wooden hoe from wooden planks and sticks.=Benutzen Sie eine Werkbank, um eine Holzhacke aus Holzplanken und Stöcken zu fertigen. +Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Benutzen Sie eine Werkbank, um eine Holzspitzhacke aus Holzplanken und Stöcken zu fertigen. +Use obsidian and a fire starter to construct a Nether portal.=Benutzen Sie Obsidian und ein Feuerzeug, um ein Netherportal zu errichten. +Use wheat to craft a bread.=Benutzen Sie Weizen, um ein Brot zu machen. diff --git a/mods/HUD/mcl_achievements/locale/template.txt b/mods/HUD/mcl_achievements/locale/template.txt new file mode 100644 index 000000000..ecdba2672 --- /dev/null +++ b/mods/HUD/mcl_achievements/locale/template.txt @@ -0,0 +1,49 @@ +# textdomain:mcl_achievements +Aquire Hardware= +Bake Bread= +Benchmarking= +Cow Tipper= +Craft a bookshelf.= +Craft a cake using wheat, sugar, milk and an egg.= +Craft a crafting table from 4 wooden planks.= +Craft a stone pickaxe using sticks and cobblestone.= +Craft a wooden sword using wooden planks and sticks on a crafting table.= +DIAMONDS!= +Delicious Fish= +Dispense With This= +Eat a cooked porkchop.= +Eat a cooked rabbit.= +Get really desperate and eat rotten flesh.= +Getting Wood= +Getting an Upgrade= +Hit a skeleton, wither skeleton or stray by bow and arrow from a distance of at least 20 meters.= +Hot Topic= +Into Fire= +Into the Nether= +Iron Belly= +Librarian= +Mine emerald ore.= +On A Rail= +Pick up a blaze rod from the floor.= +Pick up a diamond from the floor.= +Pick up a wood item from the ground.@nHint: Punch a tree trunk until it pops out as an item.= +Pick up leather from the floor.@nHint: Cows and some other animals have a chance to drop leather, when killed.= +Place a dispenser.= +Place a flower pot.= +Pork Chop= +Pot Planter= +Rabbit Season= +Sniper Duel= +Take a cooked fish from a furnace.@nHint: Use a fishing rod to catch a fish and cook it in a furnace.= +Take an iron ingot from a furnace's output slot.@nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace.= +The Haggler= +The Lie= +Time to Farm!= +Time to Mine!= +Time to Strike!= +Travel by minecart for at least 1000 meters from your starting point in a single ride.= +Use 8 cobblestones to craft a furnace.= +Use a crafting table to craft a wooden hoe from wooden planks and sticks.= +Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.= +Use obsidian and a fire starter to construct a Nether portal.= +Use wheat to craft a bread.= diff --git a/mods/HUD/mcl_death_messages/init.lua b/mods/HUD/mcl_death_messages/init.lua index 00f39ac44..b212e36db 100644 --- a/mods/HUD/mcl_death_messages/init.lua +++ b/mods/HUD/mcl_death_messages/init.lua @@ -1,113 +1,113 @@ +local S = minetest.get_translator("mcl_death_messages") +local N = function(s) return s end + mcl_death_messages = {} -- Death messages local msgs = { ["arrow"] = { - "%s was fatally hit by an arrow.", - "%s has been killed with an arrow.", + N("@1 was fatally hit by an arrow."), + N("@1 has been killed by an arrow."), }, ["arrow_name"] = { - "%s was shot by an arrow from %s.", + N("@1 was shot by an arrow from @2."), }, - ["fire"] = { - "%s has been cooked crisp.", - "%s felt the burn.", - "%s died in the flames.", - "%s died in a fire.", + ["arrow_skeleton"] = { + N("@1 was shot by an arrow from a skeleton."), }, - ["lava"] = { - "%s melted in lava.", - "%s took a bath in a hot lava tub.", - "%s died in lava.", - "%s could not survive in lava.", + ["arrow_stray"] = { + N("@1 was shot by an arrow from a stray."), + }, + ["arrow_illusioner"] = { + N("@1 was shot by an arrow from an illusioner."), + }, + ["arrow_mob"] = { + N("@1 was shot by an arrow."), }, ["drown"] = { - "%s forgot to breathe.", - "%s drowned.", - "%s ran out of oxygen.", - }, - ["starve"] = { - "%s starved.", + N("@1 forgot to breathe."), + N("@1 drowned."), + N("@1 ran out of oxygen."), }, ["murder"] = { - "%s was killed by %s.", + N("@1 was killed by @2."), }, ["mob_kill"] = { - "%s was killed by a mob.", + N("@1 was killed by a mob."), }, ["blaze_fireball"] = { - "%s was burned to death by a blaze's fireball.", - "%s was killed by a fireball from a blaze.", + N("@1 was burned to death by a blaze's fireball."), + N("@1 was killed by a fireball from a blaze."), }, ["fire_charge"] = { - "%s was hit by a fire charge.", + N("@1 was burned by a fire charge."), }, ["ghast_fireball"] = { - "A ghast scared %s to death.", - "%s has been fireballed by a ghast.", + N("A ghast scared @1 to death."), + N("@1 has been fireballed by a ghast."), }, - ["fall_damage"] = { - "%s fell from a high cliff.", - "%s took fatal fall damage.", - "%s fell victim to gravity.", + ["fall"] = { + N("@1 fell from a high cliff."), + N("@1 took fatal fall damage."), + N("@1 fell victim to gravity."), }, ["other"] = { - "%s died.", + N("@1 died."), } } local mobkills = { - ["mobs_mc:zombie"] = "%s was killed by a zombie.", - ["mobs_mc:baby_zombie"] = "%s was killed by a baby zombie.", - ["mobs_mc:blaze"] = "%s was killed by a blaze.", - ["mobs_mc:slime"] = "%s was killed by a slime.", - ["mobs_mc:witch"] = "%s was killed by a witch.", - ["mobs_mc:magma_cube_tiny"] = "%s was killed by a magma cube.", - ["mobs_mc:magma_cube_small"] = "%s was killed by a magma cube.", - ["mobs_mc:magma_cube_big"] = "%s was killed by a magma cube.", - ["mobs_mc:wolf"] = "%s was killed by a wolf.", - ["mobs_mc:cat"] = "%s was killed by a cat.", - ["mobs_mc:ocelot"] = "%s was killed by an ocelot.", - ["mobs_mc:ender_dragon"] = "%s was killed by an ender dragon.", - ["mobs_mc:wither"] = "%s was killed by a wither.", - ["mobs_mc:enderman"] = "%s was killed by an enderman.", - ["mobs_mc:endermite"] = "%s was killed by an endermite.", - ["mobs_mc:ghast"] = "%s was killed by a ghast.", - ["mobs_mc:guardian_elder"] = "%s was killed by an elder guardian.", - ["mobs_mc:guardian"] = "%s was killed by a guardian.", - ["mobs_mc:iron_golem"] = "%s was killed by an iron golem.", - ["mobs_mc:polar_bear"] = "%s was killed by a polar_bear.", - ["mobs_mc:killer_bunny"] = "%s was killed by a killer bunny.", - ["mobs_mc:shulker"] = "%s was killed by a shulker.", - ["mobs_mc:silverfish"] = "%s was killed by a silverfish.", - ["mobs_mc:skeleton"] = "%s was killed by a skeleton.", - ["mobs_mc:stray"] = "%s was killed by a stray.", - ["mobs_mc:slime_tiny"] = "%s was killed by a slime.", - ["mobs_mc:slime_small"] = "%s was killed by a slime.", - ["mobs_mc:slime_big"] = "%s was killed by a slime.", - ["mobs_mc:spider"] = "%s was killed by a spider.", - ["mobs_mc:cave_spider"] = "%s was killed by a cave spider.", - ["mobs_mc:vex"] = "%s was killed by a vex.", - ["mobs_mc:evoker"] = "%s was killed by an evoker.", - ["mobs_mc:illusioner"] = "%s was killed by an illusioner.", - ["mobs_mc:vindicator"] = "%s was killed by a vindicator.", - ["mobs_mc:villager_zombie"] = "%s was killed by a zombie villager.", - ["mobs_mc:husk"] = "%s was killed by a husk.", - ["mobs_mc:baby_husk"] = "%s was killed by a baby husk.", - ["mobs_mc:pigman"] = "%s was killed by a zombie pigman.", - ["mobs_mc:baby_pigman"] = "%s was killed by a baby zombie pigman.", + ["mobs_mc:zombie"] = N("@1 was killed by a zombie."), + ["mobs_mc:baby_zombie"] = N("@1 was killed by a baby zombie."), + ["mobs_mc:blaze"] = N("@1 was killed by a blaze."), + ["mobs_mc:slime"] = N("@1 was killed by a slime."), + ["mobs_mc:witch"] = N("@1 was killed by a witch."), + ["mobs_mc:magma_cube_tiny"] = N("@1 was killed by a magma cube."), + ["mobs_mc:magma_cube_small"] = N("@1 was killed by a magma cube."), + ["mobs_mc:magma_cube_big"] = N("@1 was killed by a magma cube."), + ["mobs_mc:wolf"] = N("@1 was killed by a wolf."), + ["mobs_mc:cat"] = N("@1 was killed by a cat."), + ["mobs_mc:ocelot"] = N("@1 was killed by an ocelot."), + ["mobs_mc:ender_dragon"] = N("@1 was killed by an ender dragon."), + ["mobs_mc:wither"] = N("@1 was killed by a wither."), + ["mobs_mc:enderman"] = N("@1 was killed by an enderman."), + ["mobs_mc:endermite"] = N("@1 was killed by an endermite."), + ["mobs_mc:ghast"] = N("@1 was killed by a ghast."), + ["mobs_mc:guardian_elder"] = N("@1 was killed by an elder guardian."), + ["mobs_mc:guardian"] = N("@1 was killed by a guardian."), + ["mobs_mc:iron_golem"] = N("@1 was killed by an iron golem."), + ["mobs_mc:polar_bear"] = N("@1 was killed by a polar_bear."), + ["mobs_mc:killer_bunny"] = N("@1 was killed by a killer bunny."), + ["mobs_mc:shulker"] = N("@1 was killed by a shulker."), + ["mobs_mc:silverfish"] = N("@1 was killed by a silverfish."), + ["mobs_mc:skeleton"] = N("@1 was killed by a skeleton."), + ["mobs_mc:stray"] = N("@1 was killed by a stray."), + ["mobs_mc:slime_tiny"] = N("@1 was killed by a slime."), + ["mobs_mc:slime_small"] = N("@1 was killed by a slime."), + ["mobs_mc:slime_big"] = N("@1 was killed by a slime."), + ["mobs_mc:spider"] = N("@1 was killed by a spider."), + ["mobs_mc:cave_spider"] = N("@1 was killed by a cave spider."), + ["mobs_mc:vex"] = N("@1 was killed by a vex."), + ["mobs_mc:evoker"] = N("@1 was killed by an evoker."), + ["mobs_mc:illusioner"] = N("@1 was killed by an illusioner."), + ["mobs_mc:vindicator"] = N("@1 was killed by a vindicator."), + ["mobs_mc:villager_zombie"] = N("@1 was killed by a zombie villager."), + ["mobs_mc:husk"] = N("@1 was killed by a husk."), + ["mobs_mc:baby_husk"] = N("@1 was killed by a baby husk."), + ["mobs_mc:pigman"] = N("@1 was killed by a zombie pigman."), + ["mobs_mc:baby_pigman"] = N("@1 was killed by a baby zombie pigman."), } -- Select death message local dmsg = function(mtype, ...) local r = math.random(1, #msgs[mtype]) - return string.format(msgs[mtype][r], ...) + return S(msgs[mtype][r], ...) end -- Select death message for death by mob local mmsg = function(mtype, ...) if mobkills[mtype] then - return string.format(mobkills[mtype], ...) + return S(mobkills[mtype], ...) else return dmsg("mob_kill", ...) end @@ -115,133 +115,157 @@ end local last_damages = { } -minetest.register_on_dieplayer(function(player) +minetest.register_on_dieplayer(function(player, reason) -- Death message local message = minetest.settings:get_bool("mcl_showDeathMessages") - if message == nil then message = true end + if message == nil then + message = true + end if message then local name = player:get_player_name() if not name then return end - - local node = minetest.registered_nodes[minetest.get_node(player:get_pos()).name] local msg - -- Lava - if minetest.get_item_group(node.name, "lava") ~= 0 then - msg = dmsg("lava", name) - -- Drowning - elseif player:get_breath() == 0 then - msg = dmsg("drown", name) - -- Fire - elseif minetest.get_item_group(node.name, "fire") ~= 0 then - msg = dmsg("fire", name) - -- Other - else - -- Killed by entity - if last_damages[name] then - -- Mob - if last_damages[name].hittertype == "mob" then - if last_damages[name].hittername then - msg = dmsg("murder", name, last_damages[name].hittername) - else - msg = mmsg(last_damages[name].hittersubtype, name) - end - -- Player - elseif last_damages[name].hittertype == "player" then - if last_damages[name].hittername == name then - -- Workaround when player somehow punches self. Caused by creeper explosions in mobs mod. - -- FIXME: Remove when self-punching is no longer buggy. - msg = dmsg("other", name) - else - msg = dmsg("murder", name, last_damages[name].hittername) - end - -- Arrow - elseif last_damages[name].hittertype == "arrow" then - if last_damages[name].shooter == nil then - msg = dmsg("arrow", name) - elseif last_damages[name].shooter:is_player() then - msg = dmsg("arrow_name", name, last_damages[name].shooter:get_player_name()) - elseif last_damages[name].shooter:get_luaentity()._cmi_is_mob then - if last_damages[name].shooter:get_luaentity().nametag ~= "" then - msg = dmsg("arrow_name", name, last_damages[name].shooter:get_player_name()) - else - msg = dmsg("arrow", name) - end - else - msg = dmsg("arrow", name) - end - -- Fireball - elseif last_damages[name].hittertype == "blaze_fireball" then - msg = dmsg("blaze_fireball", name) - elseif last_damages[name].hittertype == "ghast_fireball" then - msg = dmsg("ghast_fireball", name) - elseif last_damages[name].hittertype == "fire_charge" then - msg = dmsg("fire_charge", name) - -- Custom death message - elseif last_damages[name].custom then - msg = last_damages[name].message + if reason.type == "node_damage" then + local pos = player:get_pos() + -- Check multiple nodes because players occupy multiple nodes + -- (we add one additional node because the check may fail if the player was + -- just barely touching the node with the head) + local posses = { pos, {x=pos.x,y=pos.y+1,z=pos.z}, {x=pos.x,y=pos.y+2,z=pos.z}} + local highest_damage = 0 + local highest_damage_def = nil + -- Show message for node that dealt the most damage + for p=1, #posses do + local def = minetest.registered_nodes[minetest.get_node(posses[p]).name] + local dmg = def.damage_per_second + if dmg and dmg > highest_damage then + highest_damage = dmg + highest_damage_def = def end - -- Other reason - else - msg = dmsg("other", name) + end + if highest_damage_def and highest_damage_def._mcl_node_death_message then + local field = highest_damage_def._mcl_node_death_message + local field_msg + if type(field) == "table" then + field_msg = field[math.random(1, #field)] + else + field_msg = field + end + local textdomain + if highest_damage_def.mod_origin then + textdomain = highest_damage_def.mod_origin + else + textdomain = "mcl_death_messages" + end + -- We assume the textdomain of the death message in the node definition + -- equals the modname. + msg = minetest.translate(textdomain, field_msg, name) + end + elseif reason.type == "drown" then + msg = dmsg("drown", name) + elseif reason.type == "punch" then + -- Punches + local hitter = reason.object + local hittername, hittertype, hittersubtype, shooter + -- Unknown hitter + if hitter == nil then + msg = dmsg("murder_any") + -- Player + elseif hitter:is_player() then + hittername = hitter:get_player_name() + if hittername ~= nil then + msg = dmsg("murder", name, hittername) + else + msg = dmsg("murder_any", name) + end + -- Mob (according to Common Mob Interface) + elseif hitter:get_luaentity()._cmi_is_mob then + if hitter:get_luaentity().nametag and hitter:get_luaentity().nametag ~= "" then + hittername = hitter:get_luaentity().nametag + end + hittersubtype = hitter:get_luaentity().name + if hittername then + msg = dmsg("murder", name, hittername) + elseif hittersubtype ~= nil and hittersubtype ~= "" then + msg = mmsg(hittersubtype, name) + else + msg = dmsg("murder_any", name) + end + -- Arrow + elseif hitter:get_luaentity().name == "mcl_bows:arrow_entity" or hitter:get_luaentity().name == "mobs_mc:arrow_entity" then + local shooter + if hitter:get_luaentity()._shooter then + shooter = hitter:get_luaentity()._shooter + end + local s_ent = shooter:get_luaentity() + if shooter == nil then + msg = dmsg("arrow", name) + elseif shooter:is_player() then + msg = dmsg("arrow_name", name, shooter:get_player_name()) + elseif s_ent._cmi_is_mob then + if s_ent.nametag ~= "" then + msg = dmsg("arrow_name", name, shooter:get_player_name()) + elseif s_ent.name == "mobs_mc:skeleton" then + msg = dmsg("arrow_skeleton", name) + elseif s_ent.name == "mobs_mc:stray" then + msg = dmsg("arrow_stray", name) + elseif s_ent.name == "mobs_mc:illusioner" then + msg = dmsg("arrow_illusioner", name) + else + msg = dmsg("arrow_mob", name) + end + else + msg = dmsg("arrow", name) + end + -- Blaze fireball + elseif hitter:get_luaentity().name == "mobs_mc:blaze_fireball" then + if hitter:get_luaentity()._shot_from_dispenser then + msg = dmsg("fire_charge", name) + else + msg = dmsg("blaze_fireball", name) + end + -- Ghast fireball + elseif hitter:get_luaentity().name == "mobs_monster:fireball" then + msg = dmsg("ghast_fireball", name) + end + -- Falling + elseif reason.type == "fall" then + msg = dmsg("fall", name) + -- Other + elseif reason.type == "set_hp" then + if last_damages[name] then + msg = last_damages[name].message end end - if msg then - minetest.chat_send_all(msg) + if not msg then + msg = dmsg("other", name) end + minetest.chat_send_all(msg) + last_damages[name] = nil end end) -local start_damage_reset_countdown = function (player) - minetest.after(1, function(playername) - last_damages[playername] = nil - end, player:get_player_name()) +-- dmg_sequence_number is used to discard old damage events +local dmg_sequence_number = 0 +local start_damage_reset_countdown = function (player, sequence_number) + minetest.after(1, function(playername, sequence_number) + if last_damages[playername] and last_damages[playername].sequence_number == sequence_number then + last_damages[playername] = nil + end + end, player:get_player_name(), sequence_number) end -minetest.register_on_punchplayer(function(player, hitter) - if not player or not player:is_player() or not hitter then - return - end - local msg - local hittername, hittertype, hittersubtype, shooter - -- Player - if hitter:is_player() then - hittername = hitter:get_player_name() - hittertype = "player" - -- Mob (according to Common Mob Interface) - elseif hitter:get_luaentity()._cmi_is_mob then - if hitter:get_luaentity().nametag and hitter:get_luaentity().nametag ~= "" then - hittername = hitter:get_luaentity().nametag - end - hittertype = "mob" - hittersubtype = hitter:get_luaentity().name - -- Arrow - elseif hitter:get_luaentity().name == "mcl_bows:arrow_entity" or hitter:get_luaentity().name == "mobs_mc:arrow_entity" then - hittertype = "arrow" - if hitter:get_luaentity()._shooter then - shooter = hitter:get_luaentity()._shooter - end - -- Blaze fireball - elseif hitter:get_luaentity().name == "mobs_mc:blaze_fireball" then - if hitter:get_luaentity()._shot_from_dispenser then - hittertype = "fire_charge" - else - hittertype = "blaze_fireball" - end - -- Ghast fireball - elseif hitter:get_luaentity().name == "mobs_monster:fireball" then - hittertype = "ghast_fireball" - else - return - end - - last_damages[player:get_player_name()] = { shooter = shooter, hittername = hittername, hittertype = hittertype, hittersubtype = hittersubtype } - start_damage_reset_countdown(player) -end) - --- To be called BEFORE damaging a player. If the player died, then message will be used as the death message. +-- Send a custom death mesage when damaging a player via set_hp. +-- To be called directly BEFORE damaging a player via set_hp. +-- The next time the player dies due to a set_hp, the message will be shown. +-- The player must die via set_hp within 0.1 seconds, otherwise the message will be discarded. function mcl_death_messages.player_damage(player, message) - last_damages[player:get_player_name()] = { custom = true, message = message } - start_damage_reset_countdown(player) + last_damages[player:get_player_name()] = { message = message, sequence_number = dmg_sequence_number } + start_damage_reset_countdown(player, dmg_sequence_number) + dmg_sequence_number = dmg_sequence_number + 1 + if dmg_sequence_number >= 65535 then + dmg_sequence_number = 0 + end end + diff --git a/mods/HUD/mcl_death_messages/locale/mcl_death_messages.de.tr b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.de.tr new file mode 100644 index 000000000..a37f556d5 --- /dev/null +++ b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.de.tr @@ -0,0 +1,57 @@ +# textdomain: mcl_death_messages +@1 was fatally hit by an arrow.=@1 wurde tödlich von einem Pfeil getroffen. +@1 has been killed by an arrow.=@1 wurde von einem Pfeil getötet. +@1 was shot by an arrow from @2.=@1 wurde mit einem Pfeil von @2 abgeschossen. +@1 was shot by an arrow from a skeleton.=@1 wurde von einem Skelett mit Pfeil und Bogen abgeschossen. +@1 was shot by an arrow from a stray.=@1 wurde von einem Eiswanderer mit Pfeil und Bogen abgeschossen. +@1 was shot by an arrow from an illusioner.=@1 wurde von einem Illusionisten mit Pfeil und Bogen abgeschossen. +@1 was shot by an arrow.=@1 wurde mit einem Pfeil abgeschossen. +@1 forgot to breathe.=@1 vergaß, zu atmen. +@1 drowned.=@1 ertrank. +@1 ran out of oxygen.=@1 ging die Luft aus. +@1 was killed by @2.=@1 wurde von @2 getötet. +@1 was killed by a mob.=@1 wurde von einem Mob getötet. +@1 was burned to death by a blaze's fireball.=@1 wurde von einem Feuerball einer Lohe zu Tode verbrannt. +@1 was killed by a fireball from a blaze.=@1 wurde von einem Feuerball einer Lohe getötet. +@1 was burned by a fire charge.=@1 wurde von einer Feuerkugel verbrannt. +A ghast scared @1 to death.=Ein Ghast hat @1 zu Tode erschrocken. +@1 has been fireballed by a ghast.=@1 wurde von einem Ghast mit einer Feuerkugel abgeschossen. +@1 fell from a high cliff.=@1 stürzte von einer hohen Klippe. +@1 took fatal fall damage.=@1 nahm tödlichen Fallschaden. +@1 fell victim to gravity.=@1 fiel der Schwerkraft zum Opfer. +@1 died.=@1 starb. +@1 was killed by a zombie.=@1 wurde von einem Zombie getötet. +@1 was killed by a baby zombie.=@1 wurde von einem Zombiebaby getötet. +@1 was killed by a blaze.=@1 wurde von einer Lohe getötet. +@1 was killed by a slime.=@1 wurde von einem Schleim getötet. +@1 was killed by a witch.=@1 wurde von einer Hexe getötet. +@1 was killed by a magma cube.=@1 wurde von einem Magmakubus getötet. +@1 was killed by a wolf.=@1 wurde von einem Wolf getötet. +@1 was killed by a cat.=@1 wurde von einer Katze getötet. +@1 was killed by an ocelot.=@1 wurde von einem Ozelot getötet. +@1 was killed by an ender dragon.=@1 wurde von einem Enderdrachen getötet. +@1 was killed by a wither.=@1 wurde von einem Wither getötet. +@1 was killed by an enderman.=@1 wurde von einem Enderman getötet. +@1 was killed by an endermite.=@1 wurde von einer Endermilbe getötet. +@1 was killed by a ghast.=@1 wurde von einem Ghast getötet. +@1 was killed by an elder guardian.=@1 wurde von einem Großen Wächter getötet. +@1 was killed by a guardian.=@1 wurde von einem Wächter getötet. +@1 was killed by an iron golem.=@1 wurde von einem Eisengolem getötet. +@1 was killed by a polar_bear.=@1 wurde von einem Eisbären getötet. +@1 was killed by a killer bunny.=@1 wurde von einem Killerkaninchen getötet. +@1 was killed by a shulker.=@1 wurde von einem Schulker getötet. +@1 was killed by a silverfish.=@1 wurde von einem Silberfischchen getötet. +@1 was killed by a skeleton.=@1 wurde von einem Skelett getötet. +@1 was killed by a stray.=@1 wurde von einem Eiswanderer getötet. +@1 was killed by a slime.=@1 wurde von einem Schleim getötet. +@1 was killed by a spider.=@1 wurde von einer Spinne getötet. +@1 was killed by a cave spider.=@1 wurde von einer Höhlenspinne getötet. +@1 was killed by a vex.=@1 wurde von einem Plagegeist getötet. +@1 was killed by an evoker.=@1 wurde von einem Magier getötet. +@1 was killed by an illusioner.=@1 wurde von einem Illusionisten getötet. +@1 was killed by a vindicator.=@1 wurde von einem Diener getötet. +@1 was killed by a zombie villager.=@1 wurde von einem Dorfbewohnerzombie getötet. +@1 was killed by a husk.=@1 wurde von einem Wüstenzombie getötet. +@1 was killed by a baby husk.=@1 wurde von einem Wüstenzombiebaby getötet. +@1 was killed by a zombie pigman.=@1 wurde von einem Schweinezombie getötet. +@1 was killed by a baby zombie pigman.=@1 wurde von einem Schweinezombiebaby getötet. diff --git a/mods/HUD/mcl_death_messages/locale/template.txt b/mods/HUD/mcl_death_messages/locale/template.txt new file mode 100644 index 000000000..fc83e2963 --- /dev/null +++ b/mods/HUD/mcl_death_messages/locale/template.txt @@ -0,0 +1,57 @@ +# textdomain: mcl_death_messages +@1 was fatally hit by an arrow.= +@1 has been killed with an arrow.= +@1 was shot by an arrow from @2.= +@1 was shot by an arrow from a skeleton.= +@1 was shot by an arrow from a stray.= +@1 was shot by an arrow from an illusioner.= +@1 was shot by an arrow.= +@1 forgot to breathe.= +@1 drowned.= +@1 ran out of oxygen.= +@1 was killed by @2.= +@1 was killed by a mob.= +@1 was burned to death by a blaze's fireball.= +@1 was killed by a fireball from a blaze.= +@1 was burned by a fire charge.= +A ghast scared @1 to death.= +@1 has been fireballed by a ghast.= +@1 fell from a high cliff.= +@1 took fatal fall damage.= +@1 fell victim to gravity.= +@1 died.= +@1 was killed by a zombie.= +@1 was killed by a baby zombie.= +@1 was killed by a blaze.= +@1 was killed by a slime.= +@1 was killed by a witch.= +@1 was killed by a magma cube.= +@1 was killed by a wolf.= +@1 was killed by a cat.= +@1 was killed by an ocelot.= +@1 was killed by an ender dragon.= +@1 was killed by a wither.= +@1 was killed by an enderman.= +@1 was killed by an endermite.= +@1 was killed by a ghast.= +@1 was killed by an elder guardian.= +@1 was killed by a guardian.= +@1 was killed by an iron golem.= +@1 was killed by a polar_bear.= +@1 was killed by a killer bunny.= +@1 was killed by a shulker.= +@1 was killed by a silverfish.= +@1 was killed by a skeleton.= +@1 was killed by a stray.= +@1 was killed by a slime.= +@1 was killed by a spider.= +@1 was killed by a cave spider.= +@1 was killed by a vex.= +@1 was killed by an evoker.= +@1 was killed by an illusioner.= +@1 was killed by a vindicator.= +@1 was killed by a zombie villager.= +@1 was killed by a husk.= +@1 was killed by a baby husk.= +@1 was killed by a zombie pigman.= +@1 was killed by a baby zombie pigman.= diff --git a/mods/HUD/mcl_formspec_prepend/depends.txt b/mods/HUD/mcl_formspec_prepend/depends.txt new file mode 100644 index 000000000..3b355984e --- /dev/null +++ b/mods/HUD/mcl_formspec_prepend/depends.txt @@ -0,0 +1 @@ +mcl_init diff --git a/mods/HUD/mcl_formspec_prepend/init.lua b/mods/HUD/mcl_formspec_prepend/init.lua new file mode 100644 index 000000000..0eb97de62 --- /dev/null +++ b/mods/HUD/mcl_formspec_prepend/init.lua @@ -0,0 +1,3 @@ +minetest.register_on_joinplayer(function(player) + player:set_formspec_prepend(mcl_vars.gui_nonbg) +end) diff --git a/mods/HUD/mcl_formspec_prepend/mod.conf b/mods/HUD/mcl_formspec_prepend/mod.conf new file mode 100644 index 000000000..c576d4493 --- /dev/null +++ b/mods/HUD/mcl_formspec_prepend/mod.conf @@ -0,0 +1 @@ +name = mcl_formspec_prepend diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index 7125dcb65..bcca4772d 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -1,9 +1,15 @@ +local S = minetest.get_translator("mcl_inventory") +local F = minetest.formspec_escape + -- Prepare player info table local players = {} -- Containing all the items for each Creative Mode tab local inventory_lists = {} +local show_armor = minetest.get_modpath("3d_armor") ~= nil +local mod_player = minetest.get_modpath("mcl_player") ~= nil + -- TODO: Brewing is disabled. Add brewing (uncommented code) when it is implemented properly -- Create tables @@ -156,6 +162,7 @@ local noffset = {} -- numeric tab offset local offset = {} -- string offset: local boffset = {} -- local hoch = {} +local filtername = {} local bg = {} local noffset_x_start = -0.24 @@ -210,6 +217,21 @@ hoch["mobs"] = "^[transformfy" hoch["matr"] = "^[transformfy" hoch["inv"] = "^[transformfy" +filtername = {} +filtername["blocks"] = S("Building Blocks") +filtername["deco"] = S("Decoration Blocks") +filtername["redstone"] = S("Redstone") +filtername["rail"] = S("Transportation") +filtername["misc"] = S("Miscellaneous") +filtername["nix"] = S("Search Items") +filtername["food"] = S("Foodstuffs") +filtername["tools"] = S("Tools") +filtername["combat"] = S("Combat") +filtername["mobs"] = S("Mobs") +--filtername["brew"] = S("Brewing") -- TODO: add brew +filtername["matr"] = S("Materials") +filtername["inv"] = S("Survival Inventory") + local dark_bg = "crafting_creative_bg_dark.png" local function reset_menu_item_bg() @@ -271,15 +293,20 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz inv_bg = "crafting_inventory_creative_survival.png" -- Show armor and player image - local show_armor = minetest.get_modpath("3d_armor") - local img = "player.png" + local img, img_player + if mod_player then + img_player = mcl_player.player_get_preview(player) + else + img_player = "player.png" + end + img = img_player local player_preview = "image[3.9,1.4;1.2333,2.4666;"..img.."]" if show_armor and armor.textures[playername] and armor.textures[playername].preview then img = armor.textures[playername].preview local s1 = img:find("character_preview") if s1 ~= nil then s1 = img:sub(s1+21) - img = "player.png"..s1 + img = img_player..s1 end player_preview = "image[3.9,1.4;1.2333,2.4666;"..img.."]" end @@ -312,26 +339,29 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz player_preview.. -- crafting guide button "image_button[9,1;1,1;craftguide_book.png;__mcl_craftguide;]".. - "tooltip[__mcl_craftguide;Recipe book]".. + "tooltip[__mcl_craftguide;"..F(S("Recipe book")).."]".. -- help button "image_button[9,2;1,1;doc_button_icon_lores.png;__mcl_doc;]".. - "tooltip[__mcl_doc;Help]".. + "tooltip[__mcl_doc;"..F(S("Help")).."]".. + -- skins button + "image_button[9,3;1,1;mcl_skins_button.png;__mcl_skins;]".. + "tooltip[__mcl_skins;"..F(S("Select player skin")).."]".. -- achievements button - "image_button[9,3;1,1;mcl_achievements_button.png;__mcl_achievements;]".. - "tooltip[__mcl_achievements;Achievements]" + "image_button[9,4;1,1;mcl_achievements_button.png;__mcl_achievements;]".. + "tooltip[__mcl_achievements;"..F(S("Achievements")).."]" -- For shortcuts listrings = listrings .. "listring[detached:"..playername.."_armor;armor]".. "listring[current_player;main]" else - inv_bg = inv_bg .. "^crafting_inventory_creative_scroll.png" -- Creative inventory slots main_list = "list[detached:creative_"..playername..";main;0,1.75;9,5;"..tostring(start_i).."]" .. -- ... and scroll bar - "image_button[9.02,1.76;"..tostring(arrow_height)..",0.6;crafting_creative_up.png;creative_prev;]".. - "image[9.033," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";crafting_slider.png]".. - "image_button[9.02,6.15;"..tostring(arrow_height)..",0.6;crafting_creative_down.png;creative_next;]" + "image[9.033,2.230;0.78,4.525;mcl_inventory_slider_bg.png]".. + "image[9.033," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";mcl_inventory_slider.png]".. + "image_button[9.015,1.77;0.85,0.6;crafting_creative_up.png;creative_prev;]".. + "image_button[9.015,6.15;0.85,0.6;crafting_creative_down.png;creative_next;]" end local tab_icon = { @@ -361,9 +391,9 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz "image[" .. offset[this_tab] .. ";1.5,1.44;" .. bg_img .. hoch[this_tab].. "]" .. "image[" .. boffset[this_tab] .. ";1,1;crafting_creative_marker.png]" end - local fnt = "" - if name ~= "inv" then - fnt = "image[0,1;5,0.75;mcl_inventory_fnt_"..name..".png]" + local caption = "" + if name ~= "inv" and filtername[name] then + caption = "label[0,1.2;"..F(minetest.colorize("#313131", filtername[name])).."]" end formspec = "size[10,9.3]".. @@ -371,35 +401,35 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz "background[-0.19,-0.25;10.5,9.87;"..inv_bg.."]".. "label[-5,-5;"..name.."]".. tab(name, "blocks") .. - "tooltip[blocks;Building Blocks]".. + "tooltip[blocks;"..F(filtername["blocks"]).."]".. tab(name, "deco") .. - "tooltip[deco;Decoration Blocks]".. + "tooltip[deco;"..F(filtername["deco"]).."]".. tab(name, "redstone") .. - "tooltip[redstone;Redstone]".. + "tooltip[redstone;"..F(filtername["redstone"]).."]".. tab(name, "rail") .. - "tooltip[rail;Transportation]".. + "tooltip[rail;"..F(filtername["rail"]).."]".. tab(name, "misc") .. - "tooltip[misc;Miscellaneous]".. + "tooltip[misc;"..F(filtername["misc"]).."]".. tab(name, "nix") .. - "tooltip[nix;Search Items]".. - fnt.. + "tooltip[nix;"..F(filtername["nix"]).."]".. + caption.. "list[current_player;main;0,7;9,1;]".. main_list.. tab(name, "food") .. - "tooltip[food;Foodstuffs]".. + "tooltip[food;"..F(filtername["food"]).."]".. tab(name, "tools") .. - "tooltip[tools;Tools]".. + "tooltip[tools;"..F(filtername["tools"]).."]".. tab(name, "combat") .. - "tooltip[combat;Combat]".. + "tooltip[combat;"..F(filtername["combat"]).."]".. tab(name, "mobs") .. - "tooltip[mobs;Mobs]".. + "tooltip[mobs;"..F(filtername["mobs"]).."]".. -- TODO: Add brew --tab(name, "brew") .. - --"tooltip[brew;Brewing]".. + --"tooltip[brew;"..F(filtername["brew"]).."]".. tab(name, "matr") .. - "tooltip[matr;Materials]".. + "tooltip[matr;"..F(filtername["matr"]).."]".. tab(name, "inv") .. - "tooltip[inv;Survival Inventory]".. + "tooltip[inv;"..F(filtername["inv"]).."]".. "list[detached:trash;main;9,7;1,1;]".. "image[9,7;1,1;crafting_creative_trash.png]".. listrings @@ -555,14 +585,45 @@ if minetest.settings:get_bool("creative_mode") then local inv = digger:get_inventory() if inv then for _,item in ipairs(drops) do - item = ItemStack(item):get_name() - if not inv:contains_item("main", item) then + if not inv:contains_item("main", item, true) then inv:add_item("main", item) end end end end + mcl_inventory.update_inventory_formspec = function(player) + local page = nil + + local name = player:get_player_name() + + if players[name].page then + page = players[name].page + else + page = "nix" + end + + -- Figure out current scroll bar from formspec + local formspec = player:get_inventory_formspec() + local start_i = players[name].start_i + + local inv_size + if page == "nix" then + local inv = minetest.get_inventory({type="detached", name="creative_"..name}) + inv_size = inv:get_size("main") + elseif page ~= nil and page ~= "inv" then + inv_size = #(inventory_lists[page]) + else + inv_size = 0 + end + + local filter = players[name].filter + if filter == nil then + filter = "" + end + + mcl_inventory.set_creative_formspec(player, start_i, start_i / (9*5) + 1, inv_size, false, page, filter) + end end minetest.register_on_joinplayer(function(player) diff --git a/mods/HUD/mcl_inventory/depends.txt b/mods/HUD/mcl_inventory/depends.txt index a174c0eee..46d93c42a 100644 --- a/mods/HUD/mcl_inventory/depends.txt +++ b/mods/HUD/mcl_inventory/depends.txt @@ -1,3 +1,4 @@ mcl_init +mcl_player? _mcl_autogroup? 3d_armor? diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index 4bd2ef806..03227e85d 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -1,8 +1,11 @@ +local S = minetest.get_translator("mcl_inventory") +local F = minetest.formspec_escape + mcl_inventory = {} -local show_armor = false -if minetest.get_modpath("3d_armor") ~= nil then show_armor = true end - +local show_armor = minetest.get_modpath("3d_armor") ~= nil +local mod_player = minetest.get_modpath("mcl_player") ~= nil +local mod_craftguide = minetest.get_modpath("mcl_craftguide") ~= nil -- Returns a single itemstack in the given inventory to the main inventory, or drop it when there's no space left local function return_item(itemstack, dropper, pos, inv) @@ -21,7 +24,7 @@ local function return_item(itemstack, dropper, pos, inv) v.x = v.x*4 v.y = v.y*4 + 2 v.z = v.z*4 - obj:setvelocity(v) + obj:set_velocity(v) obj:get_luaentity()._insta_collect = false end end @@ -59,14 +62,20 @@ local function set_inventory(player, armor_change_only) local player_name = player:get_player_name() -- Show armor and player image - local img = "player.png" + local img, img_player + if mod_player then + img_player = mcl_player.player_get_preview(player) + else + img_player = "player.png" + end + img = img_player local player_preview = "image[0.6,0.2;2,4;"..img.."]" if show_armor and armor.textures[player_name] and armor.textures[player_name].preview then img = armor.textures[player_name].preview local s1 = img:find("character_preview") if s1 ~= nil then s1 = img:sub(s1+21) - img = "player.png"..s1 + img = img_player..s1 end player_preview = "image[1.1,0.2;2,4;"..img.."]" end @@ -90,19 +99,24 @@ local function set_inventory(player, armor_change_only) "list[detached:"..player_name.."_armor;armor;0,3;1,1;4]".. armor_slot_imgs.. -- craft and inventory + "label[0,4;"..F(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. + "label[4,0.5;"..F(minetest.colorize("#313131", S("Crafting"))).."]".. "list[current_player;craft;4,1;2,2]".. "list[current_player;craftpreview;7,1.5;1,1;]".. -- crafting guide button "image_button[4.5,3;1,1;craftguide_book.png;__mcl_craftguide;]".. - "tooltip[__mcl_craftguide;Recipe book]".. + "tooltip[__mcl_craftguide;"..F(S("Recipe book")).."]".. -- help button "image_button[8,3;1,1;doc_button_icon_lores.png;__mcl_doc;]".. - "tooltip[__mcl_doc;Help]".. + "tooltip[__mcl_doc;"..F(S("Help")).."]".. + -- skins button + "image_button[3,3;1,1;mcl_skins_button.png;__mcl_skins;]".. + "tooltip[__mcl_skins;"..F(S("Select player skin")).."]".. -- achievements button "image_button[7,3;1,1;mcl_achievements_button.png;__mcl_achievements;]".. - "tooltip[__mcl_achievements;Achievements]".. + "tooltip[__mcl_achievements;"..F(S("Achievements")).."]".. -- for shortcuts "listring[current_player;main]".. "listring[current_player;craft]".. @@ -122,6 +136,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end) +if not minetest.settings:get_bool("creative_mode") then + mcl_inventory.update_inventory_formspec = function(player) + set_inventory(player) + end +end + -- Drop crafting grid items on leaving minetest.register_on_leaveplayer(function(player) return_fields(player, "craft") diff --git a/mods/HUD/mcl_inventory/locale/mcl_inventory.de.tr b/mods/HUD/mcl_inventory/locale/mcl_inventory.de.tr new file mode 100644 index 000000000..2917e1625 --- /dev/null +++ b/mods/HUD/mcl_inventory/locale/mcl_inventory.de.tr @@ -0,0 +1,19 @@ +# textdomain: mcl_inventory +Recipe book=Fertigungsbuch +Help=Hilfe +Select player skin=Spieleraussehen ändern +Achievements=Errungenschaften +Building Blocks=Baublöcke +Decoration Blocks=Dekoblöcke +Redstone=Redstone +Transportation=Transport +Miscellaneous=Sonstiges +Search Items=Gegenstände durchsuchen +Foodstuffs=Lebensmittel +Tools=Werkzeuge +Combat=Kampf +Mobs=Mobs +Materials=Materialien +Survival Inventory=Überlebensinventar +Crafting=Fertigen +Inventory=Inventar diff --git a/mods/HUD/mcl_inventory/locale/template.txt b/mods/HUD/mcl_inventory/locale/template.txt new file mode 100644 index 000000000..e0b729e08 --- /dev/null +++ b/mods/HUD/mcl_inventory/locale/template.txt @@ -0,0 +1,19 @@ +# textdomain: mcl_inventory +Recipe book= +Help= +Select player skin= +Achievements= +Building Blocks= +Decoration Blocks= +Redstone= +Transportation= +Miscellaneous= +Search Items= +Foodstuffs= +Tools= +Combat= +Mobs= +Materials= +Survival Inventory= +Crafting= +Inventory= diff --git a/mods/HUD/mcl_inventory/textures/crafting_creative_down.png b/mods/HUD/mcl_inventory/textures/crafting_creative_down.png index 5a45c1732..4f100aae0 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_creative_down.png and b/mods/HUD/mcl_inventory/textures/crafting_creative_down.png differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_creative_up.png b/mods/HUD/mcl_inventory/textures/crafting_creative_up.png index d6b8eaddb..ec5b2cacc 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_creative_up.png and b/mods/HUD/mcl_inventory/textures/crafting_creative_up.png differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png index 927d0d790..8e6550236 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png and b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png index f5d2d6515..fc70195b5 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png and b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png index e58e0634f..145a1918b 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png and b/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_scroll.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_scroll.png deleted file mode 100644 index fd7dcad35..000000000 Binary files a/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_scroll.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_slider.png b/mods/HUD/mcl_inventory/textures/crafting_slider.png deleted file mode 100644 index 2e41f099b..000000000 Binary files a/mods/HUD/mcl_inventory/textures/crafting_slider.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_blocks.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_blocks.png deleted file mode 100644 index 7bd45b455..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_blocks.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_brew.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_brew.png deleted file mode 100644 index 9664aebb0..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_brew.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_combat.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_combat.png deleted file mode 100644 index 0d37d2885..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_combat.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_deco.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_deco.png deleted file mode 100644 index b2a74cf1b..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_deco.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_food.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_food.png deleted file mode 100644 index 12a353f52..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_food.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_matr.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_matr.png deleted file mode 100644 index ef426a2a7..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_matr.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_misc.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_misc.png deleted file mode 100644 index fafacc557..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_misc.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_mobs.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_mobs.png deleted file mode 100644 index 26308b616..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_mobs.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_nix.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_nix.png deleted file mode 100644 index 7ecf77613..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_nix.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_rail.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_rail.png deleted file mode 100644 index f52fd1bf3..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_rail.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_redstone.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_redstone.png deleted file mode 100644 index e47fc8813..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_redstone.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_tools.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_tools.png deleted file mode 100644 index 97f588fb0..000000000 Binary files a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_tools.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_slider.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_slider.png new file mode 100644 index 000000000..9808b3731 Binary files /dev/null and b/mods/HUD/mcl_inventory/textures/mcl_inventory_slider.png differ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_slider_bg.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_slider_bg.png new file mode 100644 index 000000000..32e6c8eac Binary files /dev/null and b/mods/HUD/mcl_inventory/textures/mcl_inventory_slider_bg.png differ diff --git a/mods/HUD/modpack.txt b/mods/HUD/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/ITEMS/REDSTONE/mcl_comparators/init.lua b/mods/ITEMS/REDSTONE/mcl_comparators/init.lua index 1feb88898..f85586b50 100644 --- a/mods/ITEMS/REDSTONE/mcl_comparators/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_comparators/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_comparators") + -- Functions that get the input/output rules of the comparator local comparator_get_output_rules = function(node) @@ -223,25 +225,20 @@ for _, state in pairs{mesecon.state.on, mesecon.state.off} do -- Help local longdesc, usagehelp, use_help if state_strs[state] == "off" and mode == "comp" then - longdesc = "Redstone comparators are multi-purpose redstone components. ".. - "They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals." + longdesc = S("Redstone comparators are multi-purpose redstone components.").."\n".. + S("They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals.") - usagehelp = "A redstone comparator has 1 main input, 2 side inputs and 1 output. The output is in ".. - "arrow direction, the main input is in the opposite direction. The other 2 sides are the side inputs.".."\n".. - "The main input can powered in 2 ways: First, it can be powered directly by redstone power like any other component. Second, it is powered if, and only if a container (like chest) is placed in front of it and the container contains at least one item.".. - "The side inputs are only powered by normal redstone power.".. - "The redstone can operate in two modes: Transmission mode and subtraction mode. It ".. - "starts in transmission mode and the mode can be changed by a rightclick.".."\n\n".. - "Transmission mode:".. - "The front torch is unlit and lowered. The output is powered if, and only if the main input is powered. The two side inputs are ignored.".."\n".. - "Subtraction mode:".. - "The front torch is lit. The output is powered if, and only if the main input is powered and none of the side inputs is powered." + usagehelp = S("A redstone comparator has 1 main input, 2 side inputs and 1 output. The output is in arrow direction, the main input is in the opposite direction. The other 2 sides are the side inputs.").."\n".. + S("The main input can powered in 2 ways: First, it can be powered directly by redstone power like any other component. Second, it is powered if, and only if a container (like a chest) is placed in front of it and the container contains at least one item.").."\n".. + S("The side inputs are only powered by normal redstone power. The redstone comparator can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by using the block.").."\n\n".. + S("Transmission mode:\nThe front torch is unlit and lowered. The output is powered if, and only if the main input is powered. The two side inputs are ignored.").."\n".. + S("Subtraction mode:\nThe front torch is lit. The output is powered if, and only if the main input is powered and none of the side inputs is powered.") else use_help = false end local nodedef = { - description = "Redstone Comparator", + description = S("Redstone Comparator"), inventory_image = icon, wield_image = icon, _doc_items_create_entry = use_help, diff --git a/mods/ITEMS/REDSTONE/mcl_comparators/locale/mcl_comparators.de.tr b/mods/ITEMS/REDSTONE/mcl_comparators/locale/mcl_comparators.de.tr new file mode 100644 index 000000000..dbbd51a23 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_comparators/locale/mcl_comparators.de.tr @@ -0,0 +1,9 @@ +# textdomain: mcl_comparators +Redstone comparators are multi-purpose redstone components.=Redstonekomparatoren sind Redstonekomponenten mit vielen Verwendungszwecken. +They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals.=Sie können ein Redstonesignal übertragen, erkennen, ob ein Block Gegenstände enthält und mehrere Signale vergleichen. +A redstone comparator has 1 main input, 2 side inputs and 1 output. The output is in arrow direction, the main input is in the opposite direction. The other 2 sides are the side inputs.=Ein Redstonekomparator hat 1 Haupteingang, 2 Seiteneingänge und 1 Ausgang. Der Ausgang ist in Pfeilrichtung, der Haupteingang ist in der gegenüberliegenden Richtung. Die anderen 2 Seiten sind die Seiteneingänge. +The main input can powered in 2 ways: First, it can be powered directly by redstone power like any other component. Second, it is powered if, and only if a container (like a chest) is placed in front of it and the container contains at least one item.=Der Haupteingang kann auf 2 Weisen versorgt werden: Erstens, kann er direkt von Redstoneenergie wie bei jeder anderen Komponente versorgt werden. Zweitens wird er versorgt, wenn, und nur wenn ein Behälter (wie eine Truhe) vor dem Komporator platziert wurde und der Behälter mindestens einen Gegenstand enthält. +The side inputs are only powered by normal redstone power. The redstone comparator can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by using the block.=Die Seiteneingänge akzeptieren nur normale Redstoneenergie. Der Redstonekomparator kann in zwei Modi agieren: Übertragungsmodus und Subtraktionsmodus. Er fängt im Übertragungsmodus an. Der Modus wird beim Benutzen des Blocks geändert. +Transmission mode:@nThe front torch is unlit and lowered. The output is powered if, and only if the main input is powered. The two side inputs are ignored.=Übertragungsmodus:@nDie vordere Fackel ist eingefahren und leuchtet nicht auf. Die Ausgabe gibt ein Signal, wenn, nur nur wenn der Haupteingang bestromt wird. Die zwei Seiteneingänge werden ignoriert. +Subtraction mode:@nThe front torch is lit. The output is powered if, and only if the main input is powered and none of the side inputs is powered.=Subtraktionsmodus:@nDie vordere Fackel leuchtet auf. Die Ausgabe gibt ein Signal wenn, nur nur wenn der Haupteingang versorgt wird und keiner der Seiteneingänge bestromt ist. +Redstone Comparator=Redstonekomparator diff --git a/mods/ITEMS/REDSTONE/mcl_comparators/locale/template.txt b/mods/ITEMS/REDSTONE/mcl_comparators/locale/template.txt new file mode 100644 index 000000000..0f7cb9aba --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_comparators/locale/template.txt @@ -0,0 +1,9 @@ +# textdomain: mcl_comparators +Redstone comparators are multi-purpose redstone components.= +They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals.= +A redstone comparator has 1 main input, 2 side inputs and 1 output. The output is in arrow direction, the main input is in the opposite direction. The other 2 sides are the side inputs.= +The main input can powered in 2 ways: First, it can be powered directly by redstone power like any other component. Second, it is powered if, and only if a container (like a chest) is placed in front of it and the container contains at least one item.= +The side inputs are only powered by normal redstone power. The redstone comparator can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by using the block.= +Transmission mode:@nThe front torch is unlit and lowered. The output is powered if, and only if the main input is powered. The two side inputs are ignored.= +Subtraction mode:@nThe front torch is lit. The output is powered if, and only if the main input is powered and none of the side inputs is powered.= +Redstone Comparator= diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index 2c3c6b789..30d704065 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -7,6 +7,7 @@ All node definitions share a lot of code, so this is the reason why there are so many weird tables below. ]] +local S = minetest.get_translator("mcl_dispensers") -- For after_place_node local setup_dispenser = function(pos) @@ -14,9 +15,10 @@ local setup_dispenser = function(pos) local form = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]".. mcl_vars.inventory_header.. - "image[3,-0.2;5,0.75;mcl_dispensers_fnt_dispenser.png]".. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. + "label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dispenser"))).."]".. "list[current_name;main;3,0.5;3,3;]".. "listring[current_name;main]".. "listring[current_player;main]" @@ -164,9 +166,6 @@ local dispenserdef = { local dropinv = dropmeta:get_inventory() if dropinv:room_for_item(armor_type, dropitem) then dropinv:add_item(armor_type, dropitem) - --[[ FIXME: For some reason, this function is not called after calling add_item, - so we call it manually to update the armor stand entity. - This may need investigation and the following line may be a small hack. ]] minetest.registered_nodes["3d_armor_stand:armor_stand"].on_metadata_inventory_put(standpos) stack:take_item() inv:set_stack("main", stack_id, stack) @@ -281,27 +280,27 @@ local dispenserdef = { -- Horizontal dispenser local horizontal_def = table.copy(dispenserdef) -horizontal_def.description = "Dispenser" -horizontal_def._doc_items_longdesc = "A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots." -horizontal_def._doc_items_usagehelp = [[Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Rightclick the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a single random item. +horizontal_def.description = S("Dispenser") +horizontal_def._doc_items_longdesc = S("A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.") +horizontal_def._doc_items_usagehelp = S("Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.").."\n\n".. -The dispenser will do different things, depending on the dispensed item: +S("The dispenser will do different things, depending on the dispensed item:").."\n\n".. -• Arrows: Are launched -• Eggs and snowballs: Are thrown -• Fire charges: Are fired in a straight line -• Armor: Will be equipped to players and armor stands -• Boats: Are placed on water or are dropped -• Minecart: Are placed on rails or are dropped -• Bone meal: Is applied on the block it is facint -• Empty buckets: Are used to collect a liquid source -• Filled buckets: Are used to place a liquid source -• Heads, pumpkins: Equipped to players and armor stands, or placed as a block -• Shulker boxes: Are placed as a block -• TNT: Is placed and ignited -• Flint and steel: Is used to ignite a fire in air and to ignite TNT -• Spawn eggs: Will summon the mob they contain -• Other items: Are simply dropped]] +S("• Arrows: Are launched").."\n".. +S("• Eggs and snowballs: Are thrown").."\n".. +S("• Fire charges: Are fired in a straight line").."\n".. +S("• Armor: Will be equipped to players and armor stands").."\n".. +S("• Boats: Are placed on water or are dropped").."\n".. +S("• Minecart: Are placed on rails or are dropped").."\n".. +S("• Bone meal: Is applied on the block it is facing").."\n".. +S("• Empty buckets: Are used to collect a liquid source").."\n".. +S("• Filled buckets: Are used to place a liquid source").."\n".. +S("• Heads, pumpkins: Equipped to players and armor stands, or placed as a block").."\n".. +S("• Shulker boxes: Are placed as a block").."\n".. +S("• TNT: Is placed and ignited").."\n".. +S("• Flint and steel: Is used to ignite a fire in air and to ignite TNT").."\n".. +S("• Spawn eggs: Will summon the mob they contain").."\n".. +S("• Other items: Are simply dropped") horizontal_def.after_place_node = function(pos, placer, itemstack, pointed_thing) setup_dispenser(pos) @@ -319,7 +318,7 @@ minetest.register_node("mcl_dispensers:dispenser", horizontal_def) -- Down dispenser local down_def = table.copy(dispenserdef) -down_def.description = "Downwards-Facing Dispenser" +down_def.description = S("Downwards-Facing Dispenser") down_def.after_place_node = setup_dispenser down_def.tiles = { "default_furnace_top.png", "mcl_dispensers_dispenser_front_vertical.png", @@ -334,7 +333,7 @@ minetest.register_node("mcl_dispensers:dispenser_down", down_def) -- Up dispenser -- The up dispenser is almost identical to the down dispenser , it only differs in textures local up_def = table.copy(down_def) -up_def.description = "Upwards-Facing Dispenser" +up_def.description = S("Upwards-Facing Dispenser") up_def.tiles = { "mcl_dispensers_dispenser_front_vertical.png", "default_furnace_bottom.png", "default_furnace_side.png", "default_furnace_side.png", @@ -357,3 +356,13 @@ if minetest.get_modpath("doc") then doc.add_entry_alias("nodes", "mcl_dispensers:dispenser", "nodes", "mcl_dispensers:dispenser_down") doc.add_entry_alias("nodes", "mcl_dispensers:dispenser", "nodes", "mcl_dispensers:dispenser_up") end + +minetest.register_lbm({ + label = "Update dispenser formspecs (0.51.0)", + name = "mcl_dispensers:update_formspecs_0_51_0", + nodenames = { "mcl_dispensers:dispenser", "mcl_dispensers:dispenser_down", "mcl_dispensers:dispenser_up" }, + action = function(pos, node) + setup_dispenser(pos) + minetest.log("action", "[mcl_dispenser] Node formspec updated at "..minetest.pos_to_string(pos)) + end, +}) diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.de.tr b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.de.tr new file mode 100644 index 000000000..1fd2959dd --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.de.tr @@ -0,0 +1,23 @@ +# textdomain: mcl_dispensers +Dispenser=Werfer +A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Ein Werfer ist ein Block, der als eine Redstonekomponente fungiert, die, wenn sie mit Redstoneenergie versorgt ist, einen Gegenstand auswirft. Er hat einen Behälter mit 9 Inventarplätzen. +Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Platzieren Sie den Werfer in einer von 6 möglichen Richtungen. Das „Loch“ ist die Stelle, aus der Dinge aus dem Werfer fliegen. Benutzen Sie den Werfer, um auf das Inventar zuzugreifen. +The dispenser will do different things, depending on the dispensed item:=Der Werfer wird, abhängig vom geworfenem Gegenstand, unterschiedliche Dinge tun: +• Arrows: Are launched=• Pfeile: Werden gefeuert +• Eggs and snowballs: Are thrown=• Eier und Schneebälle: Werden geworfen +• Fire charges: Are fired in a straight line=• Feuerkugeln: Werden schnurgerade abgefeuert +• Armor: Will be equipped to players and armor stands=• Rüstung: Spieler und Rüstungsständer werden ausgerüstet +• Boats: Are placed on water or are dropped=• Boote: Werden auf Wasser platziert oder abgeworfen +• Minecart: Are placed on rails or are dropped=• Loren: Werden auf Schienen platziert oder abgeworfen +• Bone meal: Is applied on the block it is facing=• Knochenmehl: Wird auf den Block, auf den er zeigt, angewandt +• Empty buckets: Are used to collect a liquid source=• Leere Eimer: Sammeln Flüssigkeitsquelle auf +• Filled buckets: Are used to place a liquid source=• Volle Eimer: Platzieren eine Flüssigkeitsquelle +• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=• Köpfe, Kürbisse: Spieler und Rüstungsständer werden ausgerüstet, alternativ werden diese Gegenstände als Block platziert +• Shulker boxes: Are placed as a block=• Schulkerkisten: Werden als Block platziert +• TNT: Is placed and ignited=• TNT: Wird platziert und angezündet +• Flint and steel: Is used to ignite a fire in air and to ignite TNT=• Feuerzeuge: Endzündet ein Feuer in der Luft und zündet TNT an +• Spawn eggs: Will summon the mob they contain=• Spawn-Eier: Beschwören einen Mob +• Other items: Are simply dropped=• Andere Gegenstände: Werden fallen gelassen +Downwards-Facing Dispenser=Nach unten zeigender Werfer +Upwards-Facing Dispenser=Nach oben zeigender Werfer +Inventory=Inventar diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/template.txt b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/template.txt new file mode 100644 index 000000000..ad477dfdf --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/template.txt @@ -0,0 +1,23 @@ +# textdomain: mcl_dispensers +Dispenser= +A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.= +Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.= +The dispenser will do different things, depending on the dispensed item:= +• Arrows: Are launched= +• Eggs and snowballs: Are thrown= +• Fire charges: Are fired in a straight line= +• Armor: Will be equipped to players and armor stands= +• Boats: Are placed on water or are dropped= +• Minecart: Are placed on rails or are dropped= +• Bone meal: Is applied on the block it is facing= +• Empty buckets: Are used to collect a liquid source= +• Filled buckets: Are used to place a liquid source= +• Heads, pumpkins: Equipped to players and armor stands, or placed as a block= +• Shulker boxes: Are placed as a block= +• TNT: Is placed and ignited= +• Flint and steel: Is used to ignite a fire in air and to ignite TNT= +• Spawn eggs: Will summon the mob they contain= +• Other items: Are simply dropped= +Downwards-Facing Dispenser= +Upwards-Facing Dispenser= +Inventory= diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_fnt_dispenser.png b/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_fnt_dispenser.png deleted file mode 100644 index 9e46ca301..000000000 Binary files a/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_fnt_dispenser.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua index be42e79a4..7167de19f 100644 --- a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua @@ -8,15 +8,18 @@ All node definitions share a lot of code, so this is the reason why there are so many weird tables below. ]] +local S = minetest.get_translator("mcl_droppers") + -- For after_place_node local setup_dropper = function(pos) -- Set formspec and inventory local form = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]".. mcl_vars.inventory_header.. - "image[3,-0.2;5,0.75;mcl_droppers_fnt_dropper.png]".. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. + "label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dropper"))).."]".. "list[current_name;main;3,0.5;3,3;]".. "listring[current_name;main]".. "listring[current_player;main]" @@ -144,9 +147,9 @@ local dropperdef = { -- Horizontal dropper local horizontal_def = table.copy(dropperdef) -horizontal_def.description = "Dropper" -horizontal_def._doc_items_longdesc = "A dropper is a redstone component and a container with 9 inventory slots which, when supplied with redstone power, drops an item or puts it into a container in front of it." -horizontal_def._doc_items_usagehelp = "Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Rightclick the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item." +horizontal_def.description = S("Dropper") +horizontal_def._doc_items_longdesc = S("A dropper is a redstone component and a container with 9 inventory slots which, when supplied with redstone power, drops an item or puts it into a container in front of it.") +horizontal_def._doc_items_usagehelp = S("Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Use the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item.") horizontal_def.after_place_node = function(pos, placer, itemstack, pointed_thing) setup_dropper(pos) orientate_dropper(pos, placer) @@ -163,7 +166,7 @@ minetest.register_node("mcl_droppers:dropper", horizontal_def) -- Down dropper local down_def = table.copy(dropperdef) -down_def.description = "Downwards-Facing Dropper" +down_def.description = S("Downwards-Facing Dropper") down_def.after_place_node = setup_dropper down_def.tiles = { "default_furnace_top.png", "mcl_droppers_dropper_front_vertical.png", @@ -178,7 +181,7 @@ minetest.register_node("mcl_droppers:dropper_down", down_def) -- Up dropper -- The up dropper is almost identical to the down dropper, it only differs in textures local up_def = table.copy(down_def) -up_def.description = "Upwards-Facing Dropper" +up_def.description = S("Upwards-Facing Dropper") up_def.tiles = { "mcl_droppers_dropper_front_vertical.png", "default_furnace_bottom.png", "default_furnace_side.png", "default_furnace_side.png", @@ -203,3 +206,13 @@ if minetest.get_modpath("doc") then doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_down") doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_up") end + +minetest.register_lbm({ + label = "Update dropper formspecs (0.51.0)", + name = "mcl_droppers:update_formspecs_0_51_0", + nodenames = { "mcl_droppers:dropper", "mcl_droppers:dropper_down", "mcl_droppers:dropper_up" }, + action = function(pos, node) + setup_dropper(pos) + minetest.log("action", "[mcl_droppers] Node formspec updated at "..minetest.pos_to_string(pos)) + end, +}) diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/init_new.lua b/mods/ITEMS/REDSTONE/mcl_droppers/init_new.lua new file mode 100644 index 000000000..a36a2dbe9 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_droppers/init_new.lua @@ -0,0 +1,219 @@ +--[[ This mod registers 3 nodes: +- One node for the horizontal-facing dropper (mcl_droppers:dropper) +- One node for the upwards-facing droppers (mcl_droppers:dropper_up) +- One node for the downwards-facing droppers (mcl_droppers:dropper_down) + +3 node definitions are needed because of the way the textures are defined. +All node definitions share a lot of code, so this is the reason why there +are so many weird tables below. +]] + +local S = minetest.get_translator("mcl_droppers") + +-- For after_place_node +local setup_dropper = function(pos) + -- Set formspec and inventory + local form = "size[9,8.75]".. + "background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]".. + mcl_vars.inventory_header.. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. + "list[current_player;main;0,4.5;9,3;9]".. + "list[current_player;main;0,7.74;9,1;]".. + "label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dropper"))).."]".. + "list[current_name;main;3,0.5;3,3;]".. + "listring[current_name;main]".. + "listring[current_player;main]" + local meta = minetest.get_meta(pos) + meta:set_string("formspec", form) + local inv = meta:get_inventory() + inv:set_size("main", 9) +end + +local orientate_dropper = function(pos, placer) + -- Not placed by player + if not placer then return end + + -- Pitch in degrees + local pitch = placer:get_look_vertical() * (180 / math.pi) + + if pitch > 55 then + minetest.swap_node(pos, {name="mcl_droppers:dropper_up"}) + elseif pitch < -55 then + minetest.swap_node(pos, {name="mcl_droppers:dropper_down"}) + end +end + +local on_rotate +if minetest.get_modpath("screwdriver") then + on_rotate = screwdriver.rotate_simple +end + +-- Shared core definition table +local dropperdef = { + is_ground_content = false, + sounds = mcl_sounds.node_sound_stone_defaults(), + after_dig_node = function(pos, oldnode, oldmetadata, digger) + local meta = minetest.get_meta(pos) + local meta2 = meta + meta:from_table(oldmetadata) + local inv = meta:get_inventory() + for i=1, inv:get_size("main") do + local stack = inv:get_stack("main", i) + if not stack:is_empty() then + local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} + minetest.add_item(p, stack) + end + end + meta:from_table(meta2:to_table()) + end, + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + local name = player:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return 0 + else + return count + end + end, + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + local name = player:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return 0 + else + return stack:get_count() + end + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + local name = player:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return 0 + else + return stack:get_count() + end + end, + _mcl_blast_resistance = 17.5, + _mcl_hardness = 3.5, + mesecons = {effector = { + -- Drop random item when triggered + action_on = function (pos, node) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local droppos + if node.name == "mcl_droppers:dropper" then + droppos = vector.subtract(pos, minetest.facedir_to_dir(node.param2)) + elseif node.name == "mcl_droppers:dropper_up" then + droppos = {x=pos.x, y=pos.y+1, z=pos.z} + elseif node.name == "mcl_droppers:dropper_down" then + droppos = {x=pos.x, y=pos.y-1, z=pos.z} + end + local dropnode = minetest.get_node(droppos) + -- Do not drop into solid nodes, unless they are containers + local dropnodedef = minetest.registered_nodes[dropnode.name] + if dropnodedef.walkable and not dropnodedef.groups.container then + return + end + local stacks = {} + for i=1,inv:get_size("main") do + local stack = inv:get_stack("main", i) + if not stack:is_empty() then + table.insert(stacks, {stack = stack, stackpos = i}) + end + end + if #stacks >= 1 then + local r = math.random(1, #stacks) + local stack = stacks[r].stack + local dropitem = ItemStack(stack) + dropitem:set_count(1) + local stack_id = stacks[r].stackpos + + -- If it's a container, attempt to put it into the container + local dropped = mcl_util.move_item_container(pos, droppos, nil, stack_id) + -- No container? + if not dropped and not dropnodedef.groups.container then + -- Drop item normally + minetest.add_item(droppos, dropitem) + stack:take_item() + inv:set_stack("main", stack_id, stack) + end + end + end, + rules = mesecon.rules.alldirs, + }}, + on_rotate = on_rotate, +} + +-- Horizontal dropper + +local horizontal_def = table.copy(dropperdef) +horizontal_def.description = S("Dropper") +horizontal_def._doc_items_longdesc = S("A dropper is a redstone component and a container with 9 inventory slots which, when supplied with redstone power, drops an item or puts it into a container in front of it.") +horizontal_def._doc_items_usagehelp = S("Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Use the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item.") +horizontal_def.after_place_node = function(pos, placer, itemstack, pointed_thing) + setup_dropper(pos) + orientate_dropper(pos, placer) +end +horizontal_def.tiles = { + "default_furnace_top.png", "default_furnace_bottom.png", + "default_furnace_side.png", "default_furnace_side.png", + "default_furnace_side.png", "mcl_droppers_dropper_front_horizontal.png" +} +horizontal_def.paramtype2 = "facedir" +horizontal_def.groups = {pickaxey=1, container=2, material_stone=1} + +minetest.register_node("mcl_droppers:dropper", horizontal_def) + +-- Down dropper +local down_def = table.copy(dropperdef) +down_def.description = S("Downwards-Facing Dropper") +down_def.after_place_node = setup_dropper +down_def.tiles = { + "default_furnace_top.png", "mcl_droppers_dropper_front_vertical.png", + "default_furnace_side.png", "default_furnace_side.png", + "default_furnace_side.png", "default_furnace_side.png" +} +down_def.groups = {pickaxey=1, container=2,not_in_creative_inventory=1, material_stone=1} +down_def._doc_items_create_entry = false +down_def.drop = "mcl_droppers:dropper" +minetest.register_node("mcl_droppers:dropper_down", down_def) + +-- Up dropper +-- The up dropper is almost identical to the down dropper, it only differs in textures +local up_def = table.copy(down_def) +up_def.description = S("Upwards-Facing Dropper") +up_def.tiles = { + "mcl_droppers_dropper_front_vertical.png", "default_furnace_bottom.png", + "default_furnace_side.png", "default_furnace_side.png", + "default_furnace_side.png", "default_furnace_side.png" +} +minetest.register_node("mcl_droppers:dropper_up", up_def) + + + +-- Ladies and gentlemen, I present to you: the crafting recipe! +minetest.register_craft({ + output = 'mcl_droppers:dropper', + recipe = { + {"mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble",}, + {"mcl_core:cobble", "", "mcl_core:cobble",}, + {"mcl_core:cobble", "mesecons:redstone", "mcl_core:cobble",}, + } +}) + +-- Add entry aliases for the Help +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_down") + doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_up") +end + +minetest.register_lbm({ + label = "Update dropper formspecs (0.51.0)", + name = "mcl_droppers:update_formspecs_0_51_0", + nodenames = { "mcl_droppers:dropper", "mcl_droppers:dropper_down", "mcl_droppers:dropper_up" }, + action = function(pos, node) + minetest.registered_nodes[node.name].on_construct(pos) + minetest.log("action", "[mcl_droppers] Node formspec updated at "..minetest.pos_to_string(pos)) + end, +}) + diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/locale/mcl_droppers.de.tr b/mods/ITEMS/REDSTONE/mcl_droppers/locale/mcl_droppers.de.tr new file mode 100644 index 000000000..526e48cd7 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_droppers/locale/mcl_droppers.de.tr @@ -0,0 +1,7 @@ +# textdomain: mcl_droppers +Dropper=Spender +A dropper is a redstone component and a container with 9 inventory slots which, when supplied with redstone power, drops an item or puts it into a container in front of it.=Ein Spender ist eine Redstonekomponente und ein Behälter mit 9 Inventarplätzen. Er wird, wenn mit Redstoneenergie versorgt, einen Gegenstand abwerfen oder in einen Behälter, auf den er zeigt, ablegen. +Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Use the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item.=Spender können in 6 mögliche Richtungen platziert werden, Gegenstände fallen aus dem Loch hinaus. Benutzen Sie den Spender, um auf sein Inventar zuzugreifen. Versorgen Sie ihn mit Redstoneenergie, um den Spender einen Gegenstand abwerfen oder in einen Behälter ablegen zu lassen. +Downwards-Facing Dropper=Nach unten zeigender Spender +Upwards-Facing Dropper=Nach oben zeigender Spender +Inventory=Inventar diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/locale/template.txt b/mods/ITEMS/REDSTONE/mcl_droppers/locale/template.txt new file mode 100644 index 000000000..48e6cc79c --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_droppers/locale/template.txt @@ -0,0 +1,7 @@ +# textdomain: mcl_droppers +Dropper= +A dropper is a redstone component and a container with 9 inventory slots which, when supplied with redstone power, drops an item or puts it into a container in front of it.= +Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Use the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item.= +Downwards-Facing Dropper= +Upwards-Facing Dropper= +Inventory= diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/textures/mcl_droppers_fnt_dropper.png b/mods/ITEMS/REDSTONE/mcl_droppers/textures/mcl_droppers_fnt_dropper.png deleted file mode 100644 index 1a15634fa..000000000 Binary files a/mods/ITEMS/REDSTONE/mcl_droppers/textures/mcl_droppers_fnt_dropper.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mcl_observers/init.lua b/mods/ITEMS/REDSTONE/mcl_observers/init.lua index 0017d461f..802e24509 100644 --- a/mods/ITEMS/REDSTONE/mcl_observers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_observers/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_observers") + local rules_flat = { { x = 0, y = 0, z = -1, spread = true }, } @@ -84,9 +86,10 @@ mesecon.register_node("mcl_observers:observer", _mcl_hardness = 3.5, }, { - description = "Observer", - _doc_items_longdesc = "An observer is a redstone component which observes the block in front of it and sends a very short redstone pulse whenever this block changes.", - _doc_items_usagehelp = "Place the observer directly in front of the block you want to observe with the “face” looking at the block. The arrow shows you the side of the output, which is at the opposite side of the “face”. The arrow points to it. You need to place your redstone wire or any other component you want to power here.", + description = S("Observer"), + _doc_items_longdesc = S("An observer is a redstone component which observes the block in front of it and sends a very short redstone pulse whenever this block changes."), + _doc_items_usagehelp = S("Place the observer directly in front of the block you want to observe with the “face” looking at the block. The arrow points to the side of the output, which is at the opposite side of the “face”. You can place your redstone dust or any other component here."), + groups = {pickaxey=1, material_stone=1, not_opaque=1, }, tiles = { "mcl_observers_observer_top.png^[transformR180", "default_furnace_bottom.png", diff --git a/mods/ITEMS/REDSTONE/mcl_observers/locale/mcl_observers.de.tr b/mods/ITEMS/REDSTONE/mcl_observers/locale/mcl_observers.de.tr new file mode 100644 index 000000000..ef23ad494 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_observers/locale/mcl_observers.de.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_observers +Observer=Wächter +An observer is a redstone component which observes the block in front of it and sends a very short redstone pulse whenever this block changes.=Ein Wächter ist eine Redstonekomponente, die den Block vor ihm beobachtet und einen sehr kurzen Redstoneimpuls sendet, wenn sich dieser Block ändert. +Place the observer directly in front of the block you want to observe with the “face” looking at the block. The arrow points to the side of the output, which is at the opposite side of the “face”. You can place your redstone dust or any other component here.=Platzieren Sie den Wächter direkt vor dem Block, den Sie beobachten wollen, so dass das „Gesicht“ zum Block schaut. Der Pfeil zeigt auf die Seite des Signalausgangs, der sich gegenüber vom „Gesicht“ befindet. Hier können Sie Ihren Restonestaub oder eine beliebige andere Komponente platzieren. diff --git a/mods/ITEMS/REDSTONE/mcl_observers/locale/template.txt b/mods/ITEMS/REDSTONE/mcl_observers/locale/template.txt new file mode 100644 index 000000000..40dbfd71f --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_observers/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mcl_observers +Observer= +An observer is a redstone component which observes the block in front of it and sends a very short redstone pulse whenever this block changes.= +Place the observer directly in front of the block you want to observe with the “face” looking at the block. The arrow points to the side of the output, which is at the opposite side of the “face”. You can place your redstone dust or any other component here.= diff --git a/mods/ITEMS/REDSTONE/mesecons_button/init.lua b/mods/ITEMS/REDSTONE/mesecons_button/init.lua index 3e34670e0..9f6599831 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_button/init.lua @@ -1,6 +1,7 @@ -- WALL BUTTON --- A button that when pressed emits power for 1 second --- and then turns off again +-- A button that when pressed emits power for a short moment and then turns off again + +local S = minetest.get_translator("mesecons_button") local button_get_output_rules = mesecon.rules.wallmounted_get @@ -78,7 +79,7 @@ local on_button_place = function(itemstack, placer, pointed_thing) return itemstack end -local buttonuse = "Rightclick the button to push it." +local buttonuse = S("Use the button to push it.") mesecon.register_button = function(basename, description, texture, recipeitem, sounds, plusgroups, button_timer, push_by_arrow, longdesc) local groups_off = table.copy(plusgroups) @@ -191,22 +192,22 @@ end mesecon.register_button( "stone", - "Stone Button", + S("Stone Button"), "default_stone.png", "mcl_core:stone", mcl_sounds.node_sound_stone_defaults(), {material_stone=1,handy=1,pickaxey=1}, 1, false, - "A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second. It can only be placed on solid opaque full cubes (like cobblestone).") + S("A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.")) local woods = { - { "wood", "mcl_core:wood", "default_wood.png", "Oak Button" }, - { "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", "Acacia Button" }, - { "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", "Birch Button" }, - { "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", "Dark Oak Button" }, - { "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", "Spruce Button" }, - { "junglewood", "mcl_core:junglewood", "default_junglewood.png", "Jungle Button" }, + { "wood", "mcl_core:wood", "default_wood.png", S("Oak Button") }, + { "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Button") }, + { "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", S("Birch Button") }, + { "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Button") }, + { "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Button") }, + { "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Button") }, } for w=1, #woods do @@ -219,7 +220,7 @@ for w=1, #woods do {material_wood=1,handy=1,axey=1}, 1.5, true, - "A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. It can only be placed on solid opaque full cubes (like cobblestone). Wooden buttons may also be pushed by arrows.") + S("A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.")) minetest.register_craft({ type = "fuel", diff --git a/mods/ITEMS/REDSTONE/mesecons_button/locale/mesecons_button.de.tr b/mods/ITEMS/REDSTONE/mesecons_button/locale/mesecons_button.de.tr new file mode 100644 index 000000000..60d644378 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_button/locale/mesecons_button.de.tr @@ -0,0 +1,11 @@ +# textdomain: mesecons_button +Use the button to push it.=Benutzen Sie den Knopf, um ihn zu drücken. +Stone Button=Steinknopf +A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Ein Steinknopf ist eine Redstonekomponente aus Stein. Er kann gedrückt werden, um ein Redstonesignal zu senden. Im gedrückten Zustand versorgt er benachbarte Redstonekomponenten für 1 Sekunde mit Redstoneenergie. +Oak Button=Eichenknopf +Acacia Button=Akazienknopf +Birch Button=Birkenknopf +Dark Oak Button=Schwarzeichenknopf +Spruce Button=Fichtenknopf +Jungle Button=Dschungelknopf +A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=Ein Holzknopf ist eine Redstonekomponente aus Holz. Er kann gedrückt werden, um ein Redstonesignal zu senden. Im gedrückten Zustand versorgt er benachbarte Redstonekomponenten für 1,5 Sekunden mit Redstoneenergie. Holzknöpfe können auch von Pfeilen gedrückt werden. diff --git a/mods/ITEMS/REDSTONE/mesecons_button/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_button/locale/template.txt new file mode 100644 index 000000000..5ae22b593 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_button/locale/template.txt @@ -0,0 +1,11 @@ +# textdomain: mesecons_button +Use the button to push it.= +Stone Button= +A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.= +Oak Button= +Acacia Button= +Birch Button= +Dark Oak Button= +Spruce Button= +Jungle Button= +A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.= diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua index acb1a9d00..91c682cbc 100644 --- a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mesecons_commandblock") +local F = minetest.formspec_escape local function construct(pos) local meta = minetest.get_meta(pos) @@ -72,9 +74,9 @@ local function check_commands(commands, player_name) local cmddef = minetest.chatcommands[cmd] if not cmddef then -- Invalid chat command - local msg = "Error: The command “"..cmd.."” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands." + local msg = S("Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands.", cmd) if string.sub(cmd, 1, 1) == "/" then - msg = msg .. " Hint: Try to remove the trailing slash." + msg = S("Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.", cmd) end return false, minetest.colorize("#FF0000", msg) end @@ -83,7 +85,7 @@ local function check_commands(commands, player_name) for cmd_priv, _ in pairs(cmddef.privs) do if player_privs[cmd_priv] ~= true then - local msg = "Error: You have insufficient privileges to use the command “"..cmd.."” (missing privilege: "..cmd_priv..")! The command block has not been changed." + local msg = S("Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.", cmd, cmd_priv) return false, minetest.colorize("#FF0000", msg) end end @@ -127,36 +129,53 @@ local function commandblock_action_off(pos, node) end local on_rightclick = function(pos, node, player, itemstack, pointed_thing) - -- Only allow access in Creative Mode + local can_edit = true + -- Only allow write access in Creative Mode if not minetest.settings:get_bool("creative_mode") then - return + can_edit = false end local pname = player:get_player_name() if minetest.is_protected(pos, pname) then - minetest.record_protection_violation(pos, pname) - return + can_edit = false end local privs = minetest.get_player_privs(pname) if not privs.maphack then - minetest.chat_send_player(pname, "Access denied. You need the “maphack” privilege to edit command blocks.") - return + can_edit = false end local meta = minetest.get_meta(pos) local commands = meta:get_string("commands") + if not commands then + commands = "" + end local commander = meta:get_string("commander") local commanderstr if commander == "" or commander == nil then - commanderstr = "Error: No commander! Block must be replaced." + commanderstr = S("Error: No commander! Block must be replaced.") else - commanderstr = "Commander: "..commander + commanderstr = S("Commander: @1", commander) + end + local textrea_name, submit, textarea + -- If editing is not allowed, only allow read-only access. + -- Player can still view the contents of the command block. + if can_edit then + textarea_name = "commands" + submit = "button_exit[3.3,4.5;2,1;submit;"..F(S("Submit")).."]" + else + textarea_name = "" + submit = "" + end + if not can_edit and commands == "" then + textarea = "label[0.5,0.5;"..F(S("No commands.")).."]" + else + textarea = "textarea[0.5,0.5;8.5,4;"..textarea_name..";"..F(S("Commands:"))..";"..F(commands).."]" end local formspec = "invsize[9,5;]" .. - "textarea[0.5,0.5;8.5,4;commands;Commands;"..commands.."]" .. - "button_exit[3.3,4.5;2,1;submit;Submit]" .. + textarea .. + submit .. "image_button[8,4.5;1,1;doc_button_icon_lores.png;doc;]" .. - "label[0,4;"..minetest.formspec_escape(commanderstr).."]" .. - "tooltip[doc;Help]" + "tooltip[doc;"..F(S("Help")).."]" .. + "label[0,4;"..F(commanderstr).."]" minetest.show_formspec(pname, "commandblock_"..pos.x.."_"..pos.y.."_"..pos.z, formspec) end @@ -175,7 +194,7 @@ local on_place = function(itemstack, placer, pointed_thing) local privs = minetest.get_player_privs(placer:get_player_name()) if not privs.maphack then - minetest.chat_send_player(placer:get_player_name(), "Placement denied. You need the “maphack” privilege to place command blocks.") + minetest.chat_send_player(placer:get_player_name(), S("Placement denied. You need the “maphack” privilege to place command blocks.")) return itemstack end @@ -183,33 +202,30 @@ local on_place = function(itemstack, placer, pointed_thing) end minetest.register_node("mesecons_commandblock:commandblock_off", { - description = "Command Block", + description = S("Command Block"), _doc_items_longdesc = -"Command blocks are mighty redstone components which are able to alter reality itself. In other words, they cause the server to execute server commands when they are supplied with redstone power.", +S("Command blocks are mighty redstone components which are able to alter reality itself. In other words, they cause the server to execute server commands when they are supplied with redstone power."), _doc_items_usagehelp = -[[To use an already existing command block, just supply it with redstone power and see what happens. This will execute the commands once. To execute the commands again, turn the redstone power off and on again. +S("Everyone can activate a command block and look at its commands, but not everyone can edit and place them.").."\n\n".. -To place a command block and change the commands, you need to be in Creative Mode and must have the “maphack” privilege. A new command block does not have any commands and does nothing. Rightclick the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how they work. Each line contains a single command. You enter them like you would in the console, but without the leading slash. The commands will be executed from top to bottom. +S("To view the commands in a command block, use it. To activate the command block, just supply it with redstone power. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.").. +"\n\n".. -All commands will be executed on behalf of the player who placed the command block, as if the player typed in the commands. This player is said to be the “commander” of the block. +S("To be able to place a command block and change the commands, you need to be in Creative Mode and must have the “maphack” privilege. A new command block does not have any commands and does nothing. Use the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how commands work. Each line contains a single command. You enter them like you would in the console, but without the leading slash. The commands will be executed from top to bottom.").."\n\n".. -Command blocks support placeholders, insert one of these placerholders and they will be replaced by a player name: -• “@c”: commander of this command block -• “@n” or “@p”: nearest player from the command block -• “@f” farthest player from the command block -• “@r”: random player currently in the world -• “@@”: literal “@” sign +S("All commands will be executed on behalf of the player who placed the command block, as if the player typed in the commands. This player is said to be the “commander” of the block.").."\n\n".. -Example 1: - time 12000 +S("Command blocks support placeholders, insert one of these placeholders and they will be replaced by some other text:").."\n".. +S("• “@@c”: commander of this command block").."\n".. +S("• “@@n” or “@@p”: nearest player from the command block").."\n".. +S("• “@@f” farthest player from the command block").."\n".. +S("• “@@r”: random player currently in the world").."\n".. +S("• “@@@@”: literal “@@” sign").."\n\n".. -Sets the game clock to 12:00 +S("Example 1:\n time 12000\nSets the game clock to 12:00").."\n\n".. -Example 2: - give @n mcl_core:apple 5 - -→ Gives the nearest player 5 apples]], +S("Example 2:\n give @@n mcl_core:apple 5\nGives the nearest player 5 apples"), tiles = {{name="jeija_commandblock_off.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=2}}}, groups = {creative_breakable=1, mesecon_effector_off=1}, @@ -250,12 +266,12 @@ minetest.register_node("mesecons_commandblock:commandblock_on", { minetest.register_on_player_receive_fields(function(player, formname, fields) if string.sub(formname, 1, 13) == "commandblock_" then - if not fields.submit and not fields.key_enter and not fields.doc then + if (not fields.submit and not fields.key_enter and not fields.doc) or (not fields.commands) then return end local privs = minetest.get_player_privs(player:get_player_name()) if not privs.maphack then - minetest.chat_send_player(player:get_player_name(), "Access denied. You need the “maphack” privilege to edit command blocks.") + minetest.chat_send_player(player:get_player_name(), S("Access denied. You need the “maphack” privilege to edit command blocks.")) return end @@ -268,7 +284,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local pos = {x=tonumber(x), y=tonumber(y), z=tonumber(z)} local meta = minetest.get_meta(pos) if not minetest.settings:get_bool("creative_mode") then - minetest.chat_send_player(player:get_player_name(), "Editing the command block has failed! You can only change the command block in Creative Mode!") + minetest.chat_send_player(player:get_player_name(), S("Editing the command block has failed! You can only change the command block in Creative Mode!")) return end local check, error_message = check_commands(fields.commands, player:get_player_name()) @@ -280,7 +296,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) meta:set_string("commands", fields.commands) end else - minetest.chat_send_player(player:get_player_name(), "Editing the command block has failed! The command block is gone.") + minetest.chat_send_player(player:get_player_name(), S("Editing the command block has failed! The command block is gone.")) end end end) diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.de.tr b/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.de.tr new file mode 100644 index 000000000..35df49980 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.de.tr @@ -0,0 +1,28 @@ +# textdomain: mesecons_commandblock +Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands.=Fehler: Der Befehl „@1“ existiert nicht; Ihr Befehlsblock bleibt unverändert. Benutzen Sie den Chatbefehl „help“ für eine Liste der verfügbaren Befehle. +Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.=Fehler: Der Befehl „@1“ existiert nicht; Ihr Befehlsblock bleibt unverändert. Benutzen Sie den Chatbefehl „help“ für eine Liste der verfügbaren Befehle. Tipp: Versuchen Sie, den Schrägstrich am Anfang zu entfernen. +Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.=Fehler: Sie haben nicht die ausreichenden Privilegien, um den Befehl „@1“ zu benutzen (fehlendes Privileg: @2)! Der Befehlsblock bleibt unverändert. +Error: No commander! Block must be replaced.=Fehler: Kein Kommandant! Block muss ersetzt werden. +Commander: @1=Kommandant: @1 +Submit=OK +No commands.=Keine Befehle. +Commands:=Befehle: +Help=Hilfe +Placement denied. You need the “maphack” privilege to place command blocks.=Platzierung fehlgeschlagen. Sie brauchen das „maphack“-Privileg, um Befehlsblöcke platzieren zu können. +Command Block=Befehlsblock +Command blocks are mighty redstone components which are able to alter reality itself. In other words, they cause the server to execute server commands when they are supplied with redstone power.=Befehlsblöcke sind mächtige Redstonekomponenten, die das Gefüge der Realität selbst verändern können. Mit anderen Worten, sie lassen den Server Serverbefehle ausführen, wenn sie mit Redstoneenergie versorgt werden. +Everyone can activate a command block and look at its commands, but not everyone can edit and place them.=Jeder kann einen Befehlsblock aktivieren und sich seine Befehle ansehen, aber nicht jeder kann sie bearbeiten und platzieren. +To view the commands in a command block, use it. To activate the command block, just supply it with redstone power. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.=Um die Befehle in einem Befehlsblock zu betrachten, benutzen Sie ihn. Um ihn zu aktivieren, versorgen Sie ihn einfach mit Redstoneenergie. Das wird die Befehle einmalig ausführen. Um sie erneut auszuführen, schalten Sie die Redstoneenergie aus und wieder ein. +To be able to place a command block and change the commands, you need to be in Creative Mode and must have the “maphack” privilege. A new command block does not have any commands and does nothing. Use the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how commands work. Each line contains a single command. You enter them like you would in the console, but without the leading slash. The commands will be executed from top to bottom.=Um einen Befehlsblock platzieren und die Befehle ändern zu können, müssen Sie im Kreativmodus sein und das „maphack“-Privileg haben. Ein neuer Befehlsblock hat keine Befehle und tut gar nichts. Benutzen Sie den Befehlsblock (im Kreativmodus!), um seine Befehle zu bearbeiten. Lesen Sie den Hilfeeintrag „Fortgeschrittenes > Serverbefehle“, um zu verstehen, wie Befehle funktionieren. Jede Zeile enthält einen einzigen Befehl. Sie geben Sie wie in der Konsole ein, aber ohne den Schrägstrich am Anfang. +All commands will be executed on behalf of the player who placed the command block, as if the player typed in the commands. This player is said to be the “commander” of the block.=Alle Befehle werden im Namen des Spielers, der den Befehlsblock platziert hat, ausgeführt, als ob der Spieler die Befehle eingegeben hätte. Diesen Spieler nennen wir den „Kommandanten“ des Blocks. +Command blocks support placeholders, insert one of these placeholders and they will be replaced by some other text:=Befehlsblöcke unterstützen Platzhalter. Geben Sie einen dieser Platzhalter ein und sie werden durch einen anderen Text ersetzt: +• “@@c”: commander of this command block=• „@@c“: Kommandant dieses Befehlsblocks +• “@@n” or “@@p”: nearest player from the command block=• „@@n“ oder „@@p“: Nächster Spieler am Befehlsblock +• “@@f” farthest player from the command block=• „@@f“: Der vom Befehlsblock am weitesten entfernte Spieler +• “@@r”: random player currently in the world=• „@@r“: Zufälliger Spieler in der Welt +• “@@@@”: literal “@@” sign=• „@@@@“: Nur das „@@“-Zeichen +Example 1:@n time 12000@nSets the game clock to 12:00=1. Beispiel:@n time 12000@nSetzt die Spieluhr auf 12:00 Uhr +Example 2:@n give @@n mcl_core:apple 5@nGives the nearest player 5 apples=2. Beispiel:@n give @@n mcl_core:apple 5@nGibt dem nächsten Spieler 5 Äpfel +Access denied. You need the “maphack” privilege to edit command blocks.=Zugriff verweigert. Sie brauchen das „maphack“-Privileg, um Befehlsblöcke zu bearbeiten. +Editing the command block has failed! You can only change the command block in Creative Mode!=Bearbeitung des Befehlsblocks fehlgeschlagen! Sie können den Befehlsblock nur im Kreativmodus ändern! +Editing the command block has failed! The command block is gone.=Bearbeiten des Befehlsblocks fehlgeschlagen! Der Befehlsblock ist verschwunden. diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/template.txt new file mode 100644 index 000000000..ffa7d2ab0 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/template.txt @@ -0,0 +1,28 @@ +# textdomain: mesecons_commandblock +Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands.= +Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.= +Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.= +Error: No commander! Block must be replaced.= +Commander: @1= +Submit= +No commands.= +Commands:= +Help= +Placement denied. You need the “maphack” privilege to place command blocks.= +Command Block= +Command blocks are mighty redstone components which are able to alter reality itself. In other words, they cause the server to execute server commands when they are supplied with redstone power.= +Everyone can activate a command block and look at its commands, but not everyone can edit and place them.= +To view the commands in a command block, use it. To activate the command block, just supply it with redstone power. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.= +To be able to place a command block and change the commands, you need to be in Creative Mode and must have the “maphack” privilege. A new command block does not have any commands and does nothing. Use the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how commands work. Each line contains a single command. You enter them like you would in the console, but without the leading slash. The commands will be executed from top to bottom.= +All commands will be executed on behalf of the player who placed the command block, as if the player typed in the commands. This player is said to be the “commander” of the block.= +Command blocks support placeholders, insert one of these placeholders and they will be replaced by some other text:= +• “@@c”: commander of this command block= +• “@@n” or “@@p”: nearest player from the command block= +• “@@f” farthest player from the command block= +• “@@r”: random player currently in the world= +• “@@@@”: literal “@@” sign= +Example 1:@n time 12000@nSets the game clock to 12:00= +Example 2:@n give @@n mcl_core:apple 5@nGives the nearest player 5 apples= +Access denied. You need the “maphack” privilege to edit command blocks.= +Editing the command block has failed! You can only change the command block in Creative Mode!= +Editing the command block has failed! The command block is gone.= diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua b/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua index a17dd7f5a..01bd19018 100644 --- a/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mesecons_delayer") + local DELAYS = { 0.1, 0.2, 0.3, 0.4 } local DEFAULT_DELAY = DELAYS[1] @@ -182,9 +184,9 @@ end local help, longdesc, usagehelp, icon, on_construct if i == 1 then help = true - longdesc = "Redstone repeaters are versatile redstone components with multiple purposes: 1. They only allow signals to travel in one direction. 2. They delay the signal. 3. Optionally, they can lock their output in one state." - usagehelp = "To power a redstone repeater, send a signal in “arrow” direction (the input). The signal goes out on the opposite side (the output) with a delay. To change the delay, rightclick the redstone repeater. The delay is between 0.1 and 0.4 seconds long and can be changed in steps of 0.1 seconds. It is indicated by the position of the moving redstone torch.".."\n".. - "To lock a repeater, send a signal from an adjacent repeater into one of its sides. While locked, the moving redstone torch disappears, the output doesn't change and the input signal is ignored." + longdesc = S("Redstone repeaters are versatile redstone components with multiple purposes: 1. They only allow signals to travel in one direction. 2. They delay the signal. 3. Optionally, they can lock their output in one state.") + usagehelp = S("To power a redstone repeater, send a signal in “arrow” direction (the input). The signal goes out on the opposite side (the output) with a delay. To change the delay, use the redstone repeater. The delay is between 0.1 and 0.4 seconds long and can be changed in steps of 0.1 seconds. It is indicated by the position of the moving redstone torch.").."\n".. + S("To lock a repeater, send a signal from an adjacent repeater into one of its sides. While locked, the moving redstone torch disappears, the output doesn't change and the input signal is ignored.") icon = "mesecons_delayer_item.png" -- Check sides of constructed repeater and lock it, if required @@ -219,7 +221,7 @@ else end minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), { - description = "Redstone Repeater", + description = S("Redstone Repeater"), inventory_image = icon, wield_image = icon, _doc_items_create_entry = help, @@ -292,7 +294,7 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), { minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), { - description = "Redstone Repeater (Powered)", + description = S("Redstone Repeater (Powered)"), _doc_items_create_entry = false, drawtype = "nodebox", tiles = { @@ -366,7 +368,7 @@ end -- Locked repeater minetest.register_node("mesecons_delayer:delayer_off_locked", { - description = "Redstone Repeater (Locked)", + description = S("Redstone Repeater (Locked)"), _doc_items_create_entry = false, drawtype = "nodebox", -- FIXME: Textures of torch and the lock bar overlap. Nodeboxes are (sadly) not suitable for this. @@ -420,7 +422,7 @@ minetest.register_node("mesecons_delayer:delayer_off_locked", { }) minetest.register_node("mesecons_delayer:delayer_on_locked", { - description = "Redstone Repeater (Locked, Powered)", + description = S("Redstone Repeater (Locked, Powered)"), _doc_items_create_entry = false, drawtype = "nodebox", tiles = { diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/locale/mesecons_delayer.de.tr b/mods/ITEMS/REDSTONE/mesecons_delayer/locale/mesecons_delayer.de.tr new file mode 100644 index 000000000..db17d7f69 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_delayer/locale/mesecons_delayer.de.tr @@ -0,0 +1,8 @@ +# textdomain: mesecons_delayer +Redstone repeaters are versatile redstone components with multiple purposes: 1. They only allow signals to travel in one direction. 2. They delay the signal. 3. Optionally, they can lock their output in one state.=Redstoneverstärker sind vielseitige Komponenten mit den folgenden Verwendungszwecken: 1.: Sie lassen Signale nur in eine Richtung durch. 2.: Sie verzögern das Signal. 3.: Sie können optional ihr Ausgangssignal sperren +To power a redstone repeater, send a signal in “arrow” direction (the input). The signal goes out on the opposite side (the output) with a delay. To change the delay, use the redstone repeater. The delay is between 0.1 and 0.4 seconds long and can be changed in steps of 0.1 seconds. It is indicated by the position of the moving redstone torch.=Um einen Redstoneverstärker zu versorgen, senden Sie ein Signal in „Pfeilrichtung“ (dem Eingang). Das Signal geht aus der gegenüberliegenden Seite (dem Ausgang) mit einer Verzögerung hinaus. Um die Verzögerung zu ändern, benutzen Sie den Redstoneverstärker. Die Verzögerung ist zwischen 0,1 bis 0,4 Sekunden lang und kann in Schritten von 0,1 Sekunden geändert werden. Das wird mit der Position der verschiebbaren Redstonefackel angezeigt. +To lock a repeater, send a signal from an adjacent repeater into one of its sides. While locked, the moving redstone torch disappears, the output doesn't change and the input signal is ignored.=Um einen Verstärker zu sperren, senden Sie ein Signal eines benachbarten Verstärkers in eines der Seiten. Im gesperrten Zustand verschwindet die verschiebbare Redstonefackel, die Ausgabe ändert sich nicht mehr und der Eingang wird ignoriert. +Redstone Repeater=Redstoneverstärker +Redstone Repeater (Powered)=Redstoneverstärker (bestromt) +Redstone Repeater (Locked)=Redstoneverstärker (gesperrt) +Redstone Repeater (Locked, Powered)=Redstoneverstärker (gesperrt, bestromt) diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_delayer/locale/template.txt new file mode 100644 index 000000000..e694d70a7 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_delayer/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mesecons_delayer +Redstone repeaters are versatile redstone components with multiple purposes: 1. They only allow signals to travel in one direction. 2. They delay the signal. 3. Optionally, they can lock their output in one state.= +To power a redstone repeater, send a signal in “arrow” direction (the input). The signal goes out on the opposite side (the output) with a delay. To change the delay, use the redstone repeater. The delay is between 0.1 and 0.4 seconds long and can be changed in steps of 0.1 seconds. It is indicated by the position of the moving redstone torch.= +To lock a repeater, send a signal from an adjacent repeater into one of its sides. While locked, the moving redstone torch disappears, the output doesn't change and the input signal is ignored.= +Redstone Repeater= +Redstone Repeater (Powered)= +Redstone Repeater (Locked)= +Redstone Repeater (Locked, Powered)= diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua index 14a72acca..97ef544aa 100644 --- a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua @@ -1,9 +1,11 @@ +local S = minetest.get_translator("mesecons_lightstone") + minetest.register_node("mesecons_lightstone:lightstone_off", { tiles = {"jeija_lightstone_gray_off.png"}, groups = {handy=1, mesecon_effector_off = 1, mesecon = 2}, is_ground_content = false, - description= "Redstone Lamp", - _doc_items_longdesc = "Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.", + description= S("Redstone Lamp"), + _doc_items_longdesc = S("Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power."), sounds = mcl_sounds.node_sound_glass_defaults(), mesecons = {effector = { action_on = function (pos, node) diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.de.tr b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.de.tr new file mode 100644 index 000000000..dd39b80d9 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.de.tr @@ -0,0 +1,3 @@ +# textdomain: mesecons_lightstone +Redstone Lamp=Redstonelampe +Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.=Redstonelampen sind einfache Redstonekomponenten, die hell aufleuchten (Helligkeitspegel von 14), wenn sie Redstoneenergie erhalten. diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt new file mode 100644 index 000000000..3261d768a --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: mesecons_lightstone +Redstone Lamp= +Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.= diff --git a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua index 5e7da9d2b..9eaceb88d 100644 --- a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua @@ -310,27 +310,29 @@ function mesecon.mvps_move_objects(pos, dir, nodestack) local nn = minetest.get_node(np) if not ((not minetest.registered_nodes[nn.name]) or minetest.registered_nodes[nn.name].walkable) then - obj:setpos(np) + obj:set_pos(np) end end end end -mesecon.register_mvps_stopper("mcl_core:obsidian") -mesecon.register_mvps_stopper("mcl_core:bedrock") +-- Unmovable by design mesecon.register_mvps_stopper("mcl_core:barrier") mesecon.register_mvps_stopper("mcl_core:realm_barrier") mesecon.register_mvps_stopper("mcl_core:void") -mesecon.register_mvps_stopper("mcl_chests:chest") -mesecon.register_mvps_stopper("mcl_chests:chest_left") -mesecon.register_mvps_stopper("mcl_chests:chest_right") -mesecon.register_mvps_stopper("mcl_chests:trapped_chest") -mesecon.register_mvps_stopper("mcl_chests:trapped_chest_left") -mesecon.register_mvps_stopper("mcl_chests:trapped_chest_right") -mesecon.register_mvps_stopper("mcl_chests:trapped_chest_on") -mesecon.register_mvps_stopper("mcl_chests:trapped_chest_on_left") -mesecon.register_mvps_stopper("mcl_chests:trapped_chest_on_right") +mesecon.register_mvps_stopper("mcl_core:bedrock") +mesecon.register_mvps_stopper("mcl_core:obsidian") mesecon.register_mvps_stopper("mcl_chests:ender_chest") +mesecon.register_mvps_stopper("mcl_mobspawners:spawner") +mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_off") +mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_on") +mesecon.register_mvps_stopper("mcl_portals:portal") +mesecon.register_mvps_stopper("mcl_portals:portal_end") +mesecon.register_mvps_stopper("mcl_portals:end_portal_frame") +mesecon.register_mvps_stopper("mcl_portals:end_portal_frame_eye") + +-- Unmovable by technical restrictions. +-- Open formspec would screw up if node is destroyed (minor problem) mesecon.register_mvps_stopper("mcl_furnaces:furnace") mesecon.register_mvps_stopper("mcl_furnaces:furnace_active") mesecon.register_mvps_stopper("mcl_hoppers:hopper") @@ -344,24 +346,9 @@ mesecon.register_mvps_stopper("mcl_dispensers:dispenser_down") mesecon.register_mvps_stopper("mcl_anvils:anvil") mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_1") mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_2") -mesecon.register_mvps_stopper("mcl_jukebox:jukebox") -mesecon.register_mvps_stopper("mcl_mobspawners:spawner") -mesecon.register_mvps_stopper("mcl_signs:standing_sign") -mesecon.register_mvps_stopper("mcl_signs:wall_sign") -mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_off") -mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_on") -mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_off") -mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_on") -mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_off") -mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_on") -mesecon.register_mvps_stopper("mesecons_noteblock:noteblock") -mesecon.register_mvps_stopper("3d_armor_stand:armor_stand") -mesecon.register_mvps_stopper("mcl_banners:standing_banner") -mesecon.register_mvps_stopper("mcl_banners:hanging_banner") -mesecon.register_mvps_stopper("mcl_portals:portal") -mesecon.register_mvps_stopper("mcl_portals:portal_end") -mesecon.register_mvps_stopper("mcl_portals:end_portal_frame") -mesecon.register_mvps_stopper("mcl_portals:end_portal_frame_eye") +-- Would screw up on/off state of trapped chest (big problem) + +-- Glazed terracotta: unpullable mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_red") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_orange") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_yellow") diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua index 9d1737ac6..342cbc7c0 100644 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua @@ -1,15 +1,17 @@ +local S = minetest.get_translator("mesecons_noteblock") + minetest.register_node("mesecons_noteblock:noteblock", { - description = "Note Block", - _doc_items_longdesc = "A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power.", - _doc_items_usagehelp = [[Rightclick the note block to choose the next musical note (there are 24 half notes, or 2 octaves). The intrument played depends on the material of the block below the note block: + description = S("Note Block"), + _doc_items_longdesc = S("A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power."), + _doc_items_usagehelp = S("Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:").."\n\n".. -• Glass: Sticks -• Wood: Bass guitar -• Stone: Bass drum -• Sand or gravel: Snare drum -• Anything else: Piano +S("• Glass: Sticks").."\n".. +S("• Wood: Bass guitar").."\n".. +S("• Stone: Bass drum").."\n".. +S("• Sand or gravel: Snare drum").."\n".. +S("• Anything else: Piano").."\n\n".. -The note block will only play a note when it is below air, otherwise, it stays silent.]], +S("The note block will only play a note when it is below air, otherwise, it stays silent."), tiles = {"mesecons_noteblock.png"}, groups = {handy=1,axey=1, material_wood=1}, is_ground_content = false, @@ -20,7 +22,7 @@ The note block will only play a note when it is below air, otherwise, it stays s minetest.record_protection_violation(pos, protname) return end - node.param2 = (node.param2+1)%24 + node.param2 = (node.param2+1)%25 mesecon.noteblock_play(pos, node.param2) minetest.set_node(pos, node) end, @@ -80,6 +82,8 @@ local soundnames_piano = { "mesecons_noteblock_asharp2", "mesecons_noteblock_b2", + -- TODO: Add dedicated sound file? + "mesecons_noteblock_b2", } mesecon.noteblock_play = function (pos, param2) @@ -89,24 +93,32 @@ mesecon.noteblock_play = function (pos, param2) return end - -- Default: One of 24 piano notes - local soundname = soundnames_piano[param2] - local block_below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - if minetest.get_item_group(block_below_name, "material_glass") ~= 0 then - -- TODO: 24 sticks and clicks - soundname="mesecons_noteblock_temp_stick" - elseif minetest.get_item_group(block_below_name, "material_wood") ~= 0 then - -- TODO: 24 bass guitar sounds - soundname="mesecons_noteblock_temp_bass_guitar" - elseif minetest.get_item_group(block_below_name, "material_sand") ~= 0 then - -- TODO: 24 snare drum sounds - soundname="mesecons_noteblock_temp_snare" - elseif minetest.get_item_group(block_below_name, "material_stone") ~= 0 then - -- TODO: 24 bass drum sounds - soundname="mesecons_noteblock_temp_kick" + local param2_to_pitch = function(param2) + return 2^((param2-12)/12) end + local soundname, pitch + if minetest.get_item_group(block_below_name, "material_glass") ~= 0 then + soundname="mesecons_noteblock_stick" + pitch = param2_to_pitch(param2) + elseif minetest.get_item_group(block_below_name, "material_wood") ~= 0 then + soundname="mesecons_noteblock_bass_guitar" + pitch = param2_to_pitch(param2) + elseif minetest.get_item_group(block_below_name, "material_sand") ~= 0 then + soundname="mesecons_noteblock_snare" + pitch = param2_to_pitch(param2) + elseif minetest.get_item_group(block_below_name, "material_stone") ~= 0 then + soundname="mesecons_noteblock_kick" + pitch = param2_to_pitch(param2) + else + -- Default: One of 25 piano notes + soundname = soundnames_piano[param2] + -- Workaround: Final sound gets automatic higher pitch instead + if param2 == 24 then + pitch = 2^(1/12) + end + end + minetest.sound_play(soundname, - {pos = pos, gain = 1.0, max_hear_distance = 48,}) + {pos = pos, gain = 1.0, max_hear_distance = 48, pitch = pitch}) end diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.de.tr b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.de.tr new file mode 100644 index 000000000..272823969 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.de.tr @@ -0,0 +1,10 @@ +# textdomain: mesecons_noteblock +Note Block=Notenblock +A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power.=Ein Notenblock ist ein musikalischer Block, der eine von vielen Noten von verschiedenen Instrumenten spielt, wenn er geschlagen oder mit Redstoneenergie versorgt wird. +Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:=Benutzen Sie den Notenblock, um die nächste Musiknote zu wählen (es gibt 25 Halbtöne, oder 2 Oktaven). Das gespielte Instrument hängt vom Material des Blocks unter dem Notenblock ab: +• Glass: Sticks=• Glas: Stöcke +• Wood: Bass guitar=• Holz: Bassgitarre +• Stone: Bass drum=• Stein: Basstrommel +• Sand or gravel: Snare drum=• Sand oder Kies: Kleine Trommel +• Anything else: Piano=• Alles andere: Klavier +The note block will only play a note when it is below air, otherwise, it stays silent.=Der Notenblock wird nur eine Note spielen, wenn er sich unter Luft befindet, sonst bleibt er stumm. diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/template.txt new file mode 100644 index 000000000..c1d7dc02f --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: mesecons_noteblock +Note Block= +A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power.= +Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:= +• Glass: Sticks= +• Wood: Bass guitar= +• Stone: Bass drum= +• Sand or gravel: Snare drum= +• Anything else: Piano= +The note block will only play a note when it is below air, otherwise, it stays silent.= diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_bass_guitar.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_guitar.ogg similarity index 100% rename from mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_bass_guitar.ogg rename to mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_guitar.ogg diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg new file mode 100644 index 000000000..c73b71178 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_snare.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg similarity index 100% rename from mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_snare.ogg rename to mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_stick.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_stick.ogg similarity index 100% rename from mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_stick.ogg rename to mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_stick.ogg diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_kick.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_kick.ogg deleted file mode 100644 index 10d585b82..000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_temp_kick.ogg and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua index 8c290a50b..65b1e9bea 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mesecons_pistons") + local PISTON_MAXIMUM_PUSH = 12 -- Get mesecon rules of pistons @@ -171,7 +173,7 @@ local pistonspec_normal = { piston_up = "mesecons_pistons:piston_up_normal_off", } -local usagehelp_piston = "This block can have one of 6 possible orientations. On placement, the pusher will face you." +local usagehelp_piston = S("This block can have one of 6 possible orientations.") local on_rotate if minetest.get_modpath("screwdriver") then @@ -180,8 +182,8 @@ end -- offstate minetest.register_node("mesecons_pistons:piston_normal_off", { - description = "Piston", - _doc_items_longdesc = "A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.", + description = S("Piston"), + _doc_items_longdesc = S("A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however."), _doc_items_usagehelp = usagehelp_piston, tiles = { "mesecons_piston_bottom.png^[transformR180", @@ -275,8 +277,8 @@ local pistonspec_sticky = { -- offstate minetest.register_node("mesecons_pistons:piston_sticky_off", { - description = "Sticky Piston", - _doc_items_longdesc = "A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.", + description = S("Sticky Piston"), + _doc_items_longdesc = S("A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled."), _doc_items_usagehelp = usagehelp_piston, tiles = { diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.de.tr b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.de.tr new file mode 100644 index 000000000..cebf84615 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.de.tr @@ -0,0 +1,6 @@ +# textdomain: mesecons_pistons +This block can have one of 6 possible orientations.=Dieser Block kann eine von 6 möglichen Richtungen annehmen. +Piston=Kolben +A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.=Ein Kolben ist eine Redstonekomponente mit einem Schieber den Block oder die Blöcke vor ihm schieben wird, wenn er mit Redstoneenergie versorgt wird. Allerdings können nicht alle Blöcke können geschoben werden. +Sticky Piston=Klebriger Kolben +A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.=Ein klebriger Kolben ist eine Redstonekomponente mit einem klebrigen Schieber, der ein- und ausgefahren werden kann. Er fährt aus, wenn er mit Redstoneenergie versorgt wird. Wenn der Schieber ausgefahren wird, schiebt er den Block oder die Blöcke vor ihm. Wird er eingefahren, zieht er den Block vor ihm zu sich. Nicht alle Blöcke können geschoben oder gezogen werden. diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/template.txt new file mode 100644 index 000000000..2cdd65127 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: mesecons_pistons +This block can have one of 6 possible orientations.= +Piston= +A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.= +Sticky Piston= +A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.= diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua index 395c5130b..6148c7009 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mesecons_pressureplates") + local PRESSURE_PLATE_INTERVAL = 0.04 local pp_box_off = { @@ -95,7 +97,7 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te groups_on.not_in_creative_inventory = 1 groups_on.pressure_plate = 2 if not longdesc then - longdesc = "A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it." + longdesc = S("A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.") end mesecon.register_node(basename, { @@ -144,12 +146,12 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te end local woods = { - { "wood", "mcl_core:wood", "default_wood.png", "Oak Pressure Plate" }, - { "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", "Acacia Pressure Plate" }, - { "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", "Birch Pressure Plate" }, - { "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", "Dark Oak Pressure Plate" }, - { "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", "Spruce Pressure Plate" }, - { "junglewood", "mcl_core:junglewood", "default_junglewood.png", "Jungle Pressure Plate" }, + { "wood", "mcl_core:wood", "default_wood.png", S("Oak Pressure Plate") }, + { "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Pressure Plate") }, + { "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", S("Birch Pressure Plate") }, + { "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Pressure Plate" )}, + { "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Pressure Plate") }, + { "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Pressure Plate") }, } for w=1, #woods do @@ -164,7 +166,7 @@ for w=1, #woods do mcl_sounds.node_sound_wood_defaults(), {axey=1, material_wood=1}, nil, - "A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.") + S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) minetest.register_craft({ type = "fuel", @@ -176,7 +178,7 @@ end mesecon.register_pressure_plate( "mesecons_pressureplates:pressure_plate_stone", - "Stone Pressure Plate", + S("Stone Pressure Plate"), {"default_stone.png"}, {"default_stone.png"}, "default_stone.png", @@ -185,6 +187,6 @@ mesecon.register_pressure_plate( mcl_sounds.node_sound_stone_defaults(), {pickaxey=1, material_stone=1}, { player = true, mob = true }, - "A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.") + S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.")) diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/mesecons_pressureplates.de.tr b/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/mesecons_pressureplates.de.tr new file mode 100644 index 000000000..678e061c4 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/mesecons_pressureplates.de.tr @@ -0,0 +1,12 @@ +# textdomain: mesecons_pressureplates +A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.=Eine Druckplatte ist eine Redstonekomponente, die ihre benachbarten Blöcke mit Redstoneenergie versorgt, wenn sich jemand oder etwas auf ihr befindet. +Oak Pressure Plate=Eichendruckplatte +Acacia Pressure Plate=Akaziendruckplatte +Birch Pressure Plate=Birkendruckplatte +Dark Oak Pressure Plate=Schwarzeichendruckplatte +Spruce Pressure Plate=Fichtendruckplatte +Jungle Pressure Plate=Dschungeldruckplatte +A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Eine Holzdruckplatte ist eine Redstonekomponente, die ihre benachbarten Blöcke mit Redstoneenergie versorgt, solange sich ein beliebiges bewegliches Objekt (wie Gegenstände, Spieler und Mobs) auf ihm befindet. +Stone Pressure Plate=Steindruckplatte +A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Eine Steindruckplatte ist eine Redstonekomponente, die ihre benachbarten Blöcke mit Redstoneenergie versorgt, solange sich ein Spieler oder Mob auf ihm befindet. Sie wird von nichts anderem ausgelöst. + diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/template.txt new file mode 100644 index 000000000..0927706c1 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/template.txt @@ -0,0 +1,11 @@ +# textdomain: mesecons_pressureplates +A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.= +Oak Pressure Plate= +Acacia Pressure Plate= +Birch Pressure Plate= +Dark Oak Pressure Plate= +Spruce Pressure Plate= +Jungle Pressure Plate= +A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.= +Stone Pressure Plate= +A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.= diff --git a/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua b/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua index 0bd0b737a..0ea8ba63d 100644 --- a/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mesecons_solarpanel") + local boxes = { -8/16, -8/16, -8/16, 8/16, -2/16, 8/16 } -- Daylight Sensor @@ -18,7 +20,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_on", { fixed = boxes }, drop = "mesecons_solarpanel:solar_panel_off", - description="Daylight Sensor", + description=S("Daylight Sensor"), _doc_items_create_entry = false, groups = {handy=1,axey=1, not_in_creative_inventory = 1, material_wood=1}, sounds = mcl_sounds.node_sound_glass_defaults(), @@ -56,9 +58,10 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", { fixed = boxes }, groups = {handy=1,axey=1, material_wood=1}, - description="Daylight Sensor", - _doc_items_longdesc = "Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.", - _doc_items_usagehelp = "Rightclick the daylight sensor to turn it into an inverted daylight sensor, which supplies redstone energy when it is in moonlight.", + description=S("Daylight Sensor"), + _doc_items_longdesc = S("Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.").."\n".. + S("In inverted state, they provide redstone power when they are not in sunlight and no power otherwise."), + _doc_items_usagehelp = S("Use the daylight sensor to toggle its state."), sounds = mcl_sounds.node_sound_glass_defaults(), mesecons = {receptor = { state = mesecon.state.off, @@ -136,7 +139,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_on", { }, drop = "mesecons_solarpanel:solar_panel_off", groups = {handy=1,axey=1, not_in_creative_inventory = 1, material_wood=1}, - description="Inverted Daylight Sensor", + description=S("Inverted Daylight Sensor"), _doc_items_create_entry = false, sounds = mcl_sounds.node_sound_glass_defaults(), mesecons = {receptor = { @@ -174,9 +177,8 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_off", { }, drop = "mesecons_solarpanel:solar_panel_off", groups = {handy=1,axey=1, not_in_creative_inventory=1, material_wood=1}, - description="Inverted Daylight Sensor", - _doc_items_longdesc = "An inverted daylight sensor is a variant of the daylight sensor. It is a redstone component which provides redstone power when it in moonlight and no power otherwise. It can turned back into an ordinary daylight sensor.", - _doc_items_usagehelp = "Rightclick the daylight sensor to turn it into a daylight sensor.", + description=S("Inverted Daylight Sensor"), + _doc_items_create_entry = false, sounds = mcl_sounds.node_sound_glass_defaults(), mesecons = {receptor = { state = mesecon.state.off, @@ -233,5 +235,7 @@ minetest.register_craft({ if minetest.get_modpath("doc") then doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_on") - doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_inverted_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_on") + doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_off") + doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_off") + doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_on") end diff --git a/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/mesecons_solarpanel.de.tr b/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/mesecons_solarpanel.de.tr new file mode 100644 index 000000000..b9272882a --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/mesecons_solarpanel.de.tr @@ -0,0 +1,6 @@ +# textdomain: mesecons_solarpanel +Daylight Sensor=Tageslichtsensor +Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.=Tageslichtsensoren sind Redstonekomponenten, die Redstoneenergie liefern, wenn sie im Sonnenlicht stehen, sonst nicht. Sie können auch invertiert werden. +Inverted Daylight Sensor=Invertierter Tageslichtsensor +Use the daylight sensor to toggle its state.=Benutzen Sie den Tageslichtsensor, um seinen Zustand umzuschalten. +In inverted state, they provide redstone power when they are not in sunlight and no power otherwise.=Im invertierten Zustand erzeugen sie Redstoneenergie, wenn sie sich nicht im Tageslicht befinden, ansonsten nicht. diff --git a/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/template.txt new file mode 100644 index 000000000..b776f5074 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: mesecons_solarpanel +Daylight Sensor= +Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.= +Use the daylight sensor to toggle its state.= +Inverted Daylight Sensor= +In inverted state, they provide redstone power when they are not in sunlight and no power otherwise.= diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua index 48c593c44..dabc292e6 100644 --- a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua @@ -1,4 +1,6 @@ --- REDSTONE TORCHES +-- REDSTONE TORCH AND BLOCK OF REDSTONE + +local S = minetest.get_translator("mesecons_torch") local TORCH_COOLOFF = 120 -- Number of seconds it takes for a burned-out torch to reactivate @@ -164,13 +166,9 @@ mcl_torches.register_torch("mesecon_torch_overheated", "Redstone Torch (overheat -mcl_torches.register_torch("mesecon_torch_on", "Redstone Torch", - "A redstone torch is a redstone component which can be used to invert a redstone signal. It supplies its surrounding blocks with redstone power, except for the block it is attached to. A redstone torch is normally lit, but it can also be turned off by powering the block it is attached to. While unlit, a redstone torch does not power anything.", - [[Redstone torches can generally be placed at the side and on the top of full solid opaque blocks. The following exceptions apply: -• Glass, fence, wall, hopper: Can only be placed on top -• Upside-down slab/stair: Can only be placed on top -• Soul sand, mob spawner: Placement possible -• Glowstone and pistons: No placement possible]], +mcl_torches.register_torch("mesecon_torch_on", S("Redstone Torch"), + S("A redstone torch is a redstone component which can be used to invert a redstone signal. It supplies its surrounding blocks with redstone power, except for the block it is attached to. A redstone torch is normally lit, but it can also be turned off by powering the block it is attached to. While unlit, a redstone torch does not power anything."), + S("Redstone torches can be placed at the side and on the top of full solid opaque blocks."), "jeija_torches_on.png", "mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj", {"jeija_torches_on.png"}, @@ -193,8 +191,8 @@ mcl_torches.register_torch("mesecon_torch_on", "Redstone Torch", ) minetest.register_node("mesecons_torch:redstoneblock", { - description = "Block of Redstone", - _doc_items_longdesc = "A block of redstone permanently supplies redstone power to its surrounding blocks.", + description = S("Block of Redstone"), + _doc_items_longdesc = S("A block of redstone permanently supplies redstone power to its surrounding blocks."), tiles = {"redstone_redstone_block.png"}, stack_max = 64, groups = {pickaxey=1}, diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/locale/mesecons_torch.de.tr b/mods/ITEMS/REDSTONE/mesecons_torch/locale/mesecons_torch.de.tr new file mode 100644 index 000000000..2166ccdda --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_torch/locale/mesecons_torch.de.tr @@ -0,0 +1,6 @@ +# textdomain: mesecons_torch +Redstone Torch=Redstonefackel +A redstone torch is a redstone component which can be used to invert a redstone signal. It supplies its surrounding blocks with redstone power, except for the block it is attached to. A redstone torch is normally lit, but it can also be turned off by powering the block it is attached to. While unlit, a redstone torch does not power anything.=Eine Redstonefackel ist eine Redstonekomponente, die benutzt werden kann, um ein Redstonesignal zu invertieren. Sie versorgt die benachbarten Blöcke mit Redstoneenergie, ausgenommen den Block, an dem sie befestigt wurde. Eine Redstonefackel leuchtet normalerweise, aber sie kann auch ausgeschaltet werden, indem der Block, an dem sie befestigt ist, bestromt wird. Wenn sie aus ist, wird sie nichts mit Redstoneenergie versorgen. +Redstone torches can be placed at the side and on the top of full solid opaque blocks.=Redstonefackeln können an der Seite und auf der Oberseite der meisten undurchsichtigen ganzen Blöcke platziert werden. +Block of Redstone=Redstoneblock +A block of redstone permanently supplies redstone power to its surrounding blocks.=Ein Redstoneblock versorgt seine benachbarten Blöcke beständig mit Redstoneenergie. diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_torch/locale/template.txt new file mode 100644 index 000000000..fb5ba71f0 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_torch/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: mesecons_torch +Redstone Torch= +A redstone torch is a redstone component which can be used to invert a redstone signal. It supplies its surrounding blocks with redstone power, except for the block it is attached to. A redstone torch is normally lit, but it can also be turned off by powering the block it is attached to. While unlit, a redstone torch does not power anything.= +Redstone torches can be placed at the side and on the top of full solid opaque blocks.= +Block of Redstone= +A block of redstone permanently supplies redstone power to its surrounding blocks.= diff --git a/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua b/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua index 9db4fe743..3c04f72a2 100644 --- a/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mesecons_wallever") + local lever_get_output_rules = mesecon.rules.buttonlike_get -- LEVER @@ -20,9 +22,9 @@ minetest.register_node("mesecons_walllever:wall_lever_off", { }, groups = {handy=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1}, is_ground_content = false, - description="Lever", - _doc_items_longdesc = "A lever is a redstone component which can be flipped on and off. It supplies redstone power to adjacent blocks while it is in the “on” state.", - _doc_items_usagehelp = "Right-click the lever to flip it on or off.", + description=S("Lever"), + _doc_items_longdesc = S("A lever is a redstone component which can be flipped on and off. It supplies redstone power to adjacent blocks while it is in the “on” state."), + _doc_items_usagehelp = S("Use the lever to flip it on or off."), on_rightclick = function (pos, node) minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_on", param2=node.param2}) mesecon.receptor_on(pos, lever_get_output_rules(node)) @@ -122,7 +124,7 @@ minetest.register_node("mesecons_walllever:wall_lever_on", { groups = {handy=1, not_in_creative_inventory = 1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1}, is_ground_content = false, drop = '"mesecons_walllever:wall_lever_off" 1', - description="Lever", + description=S("Lever"), _doc_items_create_entry = false, on_rightclick = function (pos, node) minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_off", param2=node.param2}) diff --git a/mods/ITEMS/REDSTONE/mesecons_walllever/locale/mesecons_walllever.de.tr b/mods/ITEMS/REDSTONE/mesecons_walllever/locale/mesecons_walllever.de.tr new file mode 100644 index 000000000..053f81917 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_walllever/locale/mesecons_walllever.de.tr @@ -0,0 +1,4 @@ +# textdomain: mesecons_wallever +Lever=Hebel +A lever is a redstone component which can be flipped on and off. It supplies redstone power to adjacent blocks while it is in the “on” state.=Ein Hebel ist eine Redstonekomponente, die ein- und ausgeschaltet werden kann. Er versorgt seine benachbarten Blöcke mit Redstoneenergie, solange er sich im eingeschalteten Zustand befindet. +Use the lever to flip it on or off.=Benutzen Sie den Hebel, um ihn ein- oder auszuschalten. diff --git a/mods/ITEMS/REDSTONE/mesecons_walllever/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_walllever/locale/template.txt new file mode 100644 index 000000000..59988e905 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_walllever/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mesecons_wallever +Lever= +A lever is a redstone component which can be flipped on and off. It supplies redstone power to adjacent blocks while it is in the “on” state.= +Use the lever to flip it on or off.= diff --git a/mods/ITEMS/REDSTONE/mesecons_wires/init.lua b/mods/ITEMS/REDSTONE/mesecons_wires/init.lua index 01bf6bbbb..106f3fb6d 100644 --- a/mods/ITEMS/REDSTONE/mesecons_wires/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_wires/init.lua @@ -4,6 +4,8 @@ -- Where 0 means the wire has no visual connection to that direction and -- 1 means that the wire visually connects to that other node. +local S = minetest.get_translator("mesecons_wires") + -- ####################### -- ## Update wire looks ## -- ####################### @@ -223,23 +225,23 @@ local function register_wires() tiles_off = { dot_off, dot_off, "blank.png", "blank.png", "blank.png", "blank.png" } tiles_on = { dot_on, dot_on, "blank.png", "blank.png", "blank.png", "blank.png" } - longdesc = [[Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail. -A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components. -Redstone power can be received from various redstone components, such as a block of redstone or a button. Redstone power is used to activate numerous mechanisms, such as redstone lamps or pistons.]] - usagehelp = [[Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills. An easy way to power a redstone trail is by placing a redstone torch. + longdesc = S("Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail.").."\n".. +S("A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.").."\n".. +S("Redstone power can be received from various redstone components, such as a block of redstone or a button. Redstone power is used to activate numerous mechanisms, such as redstone lamps or pistons.") + usagehelp = S("Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills.").."\n\n".. -Read the help entries on the other redstone components to learn how redstone components interact.]] +S("Read the help entries on the other redstone components to learn how redstone components interact.") img = "redstone_redstone_dust.png" - desc_off = "Redstone" - desc_on = "Powered Redstone Spot ("..nodeid..")" + desc_off = S("Redstone") + desc_on = S("Powered Redstone Spot (@1)", nodeid) else -- Connected redstone wire table.insert(nodebox, box_center) tiles_off = { crossing_off, crossing_off, straight0_off, straight1_off, straight0_off, straight1_off, } tiles_on = { crossing_on, crossing_on, straight0_on, straight1_on, straight0_on, straight1_on, } wirehelp = false - desc_off = "Redstone Trail ("..nodeid..")" - desc_on = "Powered Redstone Trail ("..nodeid..")" + desc_off = S("Redstone Trail (@1)", nodeid) + desc_on = S("Powered Redstone Trail (@1)", nodeid) end mesecon.register_node(":mesecons:wire_"..nodeid, { diff --git a/mods/ITEMS/REDSTONE/mesecons_wires/locale/mesecons_wires.de.tr b/mods/ITEMS/REDSTONE/mesecons_wires/locale/mesecons_wires.de.tr new file mode 100644 index 000000000..0fa278361 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_wires/locale/mesecons_wires.de.tr @@ -0,0 +1,10 @@ +# textdomain: mesecons_wires +Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail.=Redstone ist ein vielseitiges leitendes Mineral, der Redstoneenergie überträgt. Es kann auf dem Boden in Form einer Spur platziert werden. +A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.=Eine Redstonespur kann einen von zwei Zuständen annehmen: Bestromt und unbestromt. Eine bestromte Redstonespur wird benachbarte Redstonekomponenten bestromen (und somit aktivieren). +Redstone power can be received from various redstone components, such as a block of redstone or a button. Redstone power is used to activate numerous mechanisms, such as redstone lamps or pistons.=Redstoneenergie kann von verschiedenen Redstonekomponenten erhalten werden, wie zum Beispiel einem Redstoneblock oder einem Knopf. Redstoneenergie wird benutzt, um verschiedene Mechanismen zu aktivieren, wie Redstonelampen oder Kolben. +Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills.=Platzieren Sie Redstone auf dem Boden, um eine Redstonespur auszulegen. Die Spuren werden sich automatisch miteinander verbinden und sie können auch über Hügel gehen. +Read the help entries on the other redstone components to learn how redstone components interact.=Lesen Sie die Hilfeeinträge über andere Redstonekomponenten, um zu erfahren, wie sie interagieren. +Redstone=Redstone +Powered Redstone Spot (@1)=Bestromter Redstoneklecks (@1) +Redstone Trail (@1)=Redstonespur (@1) +Powered Redstone Trail (@1)=Bestromte Redstonespur (@1) diff --git a/mods/ITEMS/REDSTONE/mesecons_wires/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_wires/locale/template.txt new file mode 100644 index 000000000..632a3eefc --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_wires/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: mesecons_wires +Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail.= +A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.= +Redstone power can be received from various redstone components, such as a block of redstone or a button. Redstone power is used to activate numerous mechanisms, such as redstone lamps or pistons.= +Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills. An easy way to power a redstone trail is by placing a redstone torch.= +Read the help entries on the other redstone components to learn how redstone components interact.= +Redstone= +Powered Redstone Spot (@1)= +Redstone Trail (@1)= +Powered Redstone Trail (@1)= diff --git a/mods/ITEMS/REDSTONE/modpack.txt b/mods/ITEMS/REDSTONE/modpack.txt deleted file mode 100644 index 33d91f571..000000000 --- a/mods/ITEMS/REDSTONE/modpack.txt +++ /dev/null @@ -1 +0,0 @@ -The presence of this file indicates that the current folder is a modpack. \ No newline at end of file diff --git a/mods/ITEMS/mcl_anvils/init.lua b/mods/ITEMS/mcl_anvils/init.lua index 8b3717a34..b2608cd88 100644 --- a/mods/ITEMS/mcl_anvils/init.lua +++ b/mods/ITEMS/mcl_anvils/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_anvils") + local MAX_NAME_LENGTH = 30 local MAX_WEAR = 65535 local SAME_TOOL_REPAIR_BOOST = math.ceil(MAX_WEAR * 0.12) -- 12% @@ -16,14 +18,16 @@ local function get_anvil_formspec(set_name) return "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;mcl_anvils_inventory.png]".. mcl_vars.inventory_header.. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. "list[context;input;1,2.5;1,1;]".. "list[context;input;4,2.5;1,1;1]".. "list[context;output;8,2.5;1,1;]".. + "label[3,0.1;"..minetest.formspec_escape(minetest.colorize("#313131", S("Repair and Name"))).."]".. "field[3.25,1;4,1;name;;"..minetest.formspec_escape(set_name).."]".. "field_close_on_enter[name;false]".. - "button[7,0.7;2,1;name_button;Set Name]".. + "button[7,0.7;2,1;name_button;"..minetest.formspec_escape(S("Set Name")).."]".. "listring[context;output]".. "listring[current_player;main]".. "listring[context;input]".. @@ -224,6 +228,7 @@ local function damage_anvil(pos) drop_anvil_items(pos, meta) minetest.sound_play(mcl_sounds.node_sound_metal_defaults().dug, {pos=pos, max_hear_distance=16}) minetest.remove_node(pos) + minetest.check_single_for_falling({x=pos.x, y=pos.y+1, z=pos.z}) return true end end @@ -433,20 +438,20 @@ if minetest.get_modpath("screwdriver") then end local anvildef0 = table.copy(anvildef) -anvildef0.description = "Anvil" +anvildef0.description = S("Anvil") anvildef0._doc_items_longdesc = -[[The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!]] +S("The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!") anvildef0._doc_items_usagehelp = -"To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.".."\n".. -"To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.".."\n".. -"There are two possibilities to repair tools (and armor):".."\n".. -"• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.".."\n".. -"• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.".."\n".. -"Armor counts as a tool. It is possible to repair and rename a tool in a single step.".."\n\n".. -"The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed." +S("To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.").."\n".. +S("To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.").."\n".. +S("There are two possibilities to repair tools (and armor):").."\n".. +S("• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.").."\n".. +S("• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.").."\n".. +S("Armor counts as a tool. It is possible to repair and rename a tool in a single step.").."\n\n".. +S("The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.") local anvildef1 = table.copy(anvildef) -anvildef1.description = "Slightly Damaged Anvil" +anvildef1.description = S("Slightly Damaged Anvil") anvildef1._doc_items_create_entry = false anvildef1.groups.not_in_creative_inventory = 1 anvildef1.groups.anvil = 2 @@ -454,7 +459,7 @@ anvildef1._doc_items_create_entry = false anvildef1.tiles = {"mcl_anvils_anvil_top_damaged_1.png^[transformR90", "mcl_anvils_anvil_base.png", "mcl_anvils_anvil_side.png"} local anvildef2 = table.copy(anvildef) -anvildef2.description = "Very Damaged Anvil" +anvildef2.description = S("Very Damaged Anvil") anvildef2._doc_items_create_entry = false anvildef2.groups.not_in_creative_inventory = 1 anvildef2.groups.anvil = 3 diff --git a/mods/ITEMS/mcl_anvils/locale/mcl_anvils.de.tr b/mods/ITEMS/mcl_anvils/locale/mcl_anvils.de.tr new file mode 100644 index 000000000..29010796d --- /dev/null +++ b/mods/ITEMS/mcl_anvils/locale/mcl_anvils.de.tr @@ -0,0 +1,15 @@ +# textdomain: mcl_anvils +Set Name=Name setzen +Repair and Name=Reparieren und benennen +Inventory=Inventar +Anvil=Amboss +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=Der Amboss ermöglicht es, Werkzeuge und Rüstung zu reparieren und Gegenstände zu benennen. Er hat jedoch eine begrenzte Lebensdauer. Lassen Sie ihn nicht auf Ihren Kopf fallen, das könnte ziemlich schmerzhaft sein! +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=Um einen Amboss zu benutzen, rechtsklicken Sie auf ihn. Ein Amboss hat 2 Eingabeplätze (links) und einen Ausgabeplatz (rechts). +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=Um Gegenstände umzubenennen, platzieren Sie einen Gegenstand in einen der Eingangsplätze und lassen Sie den anderen frei. Geben Sie einen Namen ein und drücken Sie die Eingabetaste oder „Name setzen”, dann nehmen Sie den umbenannten Gegenstand an sich. +There are two possibilities to repair tools (and armor):=Es gibt zwei Möglichkeiten, Werkzeuge (und Rüstung) zu reparieren: +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=• Werkzeug + Werkzeug: Platzieren sie zwei gleiche Werkzeuge in die Eingangsplätze. Der Zustand des reparierten Werkzeugs ist die Summe des Zustands beider Eingangswerkzeuge, plus einem Bonus von 12%. +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.=• Werkzeug + Material: Einige Werkzeuge können auch repariert werden, indem man sie mit einem Gegenstand, aus dem sie gemacht worden sind, kombiniert. Zum Beispiel können Eisenspitzhacken mit Eisenbarren repariert werden. Dadurch wird das Werkzeug um 25% repariert. +Armor counts as a tool. It is possible to repair and rename a tool in a single step.=Rüstung zählt als Werkzeug. Es ist möglich, ein Werkzeug in einem Arbeitsschritt zu reparieren und zu benennen. +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=Der Amboss hat begrenze Lebensdauer und 3 Schadensstufen: Kein Schaden, leicht beschädigt, und stark beschädigt. Jedes mal, wenn Sie etwas reparieren oder umbenennen, gibt es eine 12%-ige Chance, dass der Amboss Schaden nimmt. Ambosse können auch beschädigt werden, wenn sie um mehr als 1 Block fallen. Wenn ein sehr beschädigter Amboss erneut beschädigt wird, wird er zerstört. +Slightly Damaged Anvil=Leicht beschädigter Amboss +Very Damaged Anvil=Stark beschädigter Amboss diff --git a/mods/ITEMS/mcl_anvils/locale/template.txt b/mods/ITEMS/mcl_anvils/locale/template.txt new file mode 100644 index 000000000..c76b7174f --- /dev/null +++ b/mods/ITEMS/mcl_anvils/locale/template.txt @@ -0,0 +1,15 @@ +# textdomain: mcl_anvils +Set Name= +Repair and Name= +Inventory= +Anvil= +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!= +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.= +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.= +There are two possibilities to repair tools (and armor):= +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.= +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.= +Armor counts as a tool. It is possible to repair and rename a tool in a single step.= +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.= +Slightly Damaged Anvil= +Very Damaged Anvil= diff --git a/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png b/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png index 24bc392f6..df84b7251 100644 Binary files a/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png and b/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png differ diff --git a/mods/ITEMS/mcl_banners/init.lua b/mods/ITEMS/mcl_banners/init.lua index 5bab2ed76..fc871511e 100644 --- a/mods/ITEMS/mcl_banners/init.lua +++ b/mods/ITEMS/mcl_banners/init.lua @@ -1,3 +1,6 @@ +local S = minetest.get_translator("mcl_banners") +local N = function(s) return s end + local node_sounds if minetest.get_modpath("mcl_sounds") then node_sounds = mcl_sounds.node_sound_wood_defaults() @@ -14,22 +17,22 @@ mcl_banners = {} mcl_banners.colors = { -- Format: -- [ID] = { banner description, wool, unified dyes color group, overlay color, dye, color name for emblazonings } - ["unicolor_white"] = {"white", "White Banner", "mcl_wool:white", "#FFFFFF", "mcl_dye:white", "White" }, - ["unicolor_darkgrey"] = {"grey", "Grey Banner", "mcl_wool:grey", "#303030", "mcl_dye:dark_grey", "Grey" }, - ["unicolor_grey"] = {"silver", "Light Grey Banner", "mcl_wool:silver", "#5B5B5B", "mcl_dye:grey", "Light Grey" }, - ["unicolor_black"] = {"black", "Black Banner", "mcl_wool:black", "#000000", "mcl_dye:black", "Black" }, - ["unicolor_red"] = {"red", "Red Banner", "mcl_wool:red", "#BC0000", "mcl_dye:red", "Red" }, - ["unicolor_yellow"] = {"yellow", "Yellow Banner", "mcl_wool:yellow", "#E6CD00", "mcl_dye:yellow", "Yellow" }, - ["unicolor_dark_green"] = {"green", "Green Banner", "mcl_wool:green", "#006000", "mcl_dye:dark_green", "Green" }, - ["unicolor_cyan"] = {"cyan", "Cyan Banner", "mcl_wool:cyan", "#00ACAC", "mcl_dye:cyan", "Cyan" }, - ["unicolor_blue"] = {"blue", "Blue Banner", "mcl_wool:blue", "#0000AC", "mcl_dye:blue", "Blue" }, - ["unicolor_red_violet"] = {"magenta", "Magenta Banner", "mcl_wool:magenta", "#AC007C", "mcl_dye:magenta", "Magenta"}, - ["unicolor_orange"] = {"orange", "Orange Banner", "mcl_wool:orange", "#E67300", "mcl_dye:orange", "Orange" }, - ["unicolor_violet"] = {"purple", "Purple Banner", "mcl_wool:purple", "#6400AC", "mcl_dye:violet", "Violet" }, - ["unicolor_brown"] = {"brown", "Brown Banner", "mcl_wool:brown", "#603000", "mcl_dye:brown", "Brown" }, - ["unicolor_pink"] = {"pink", "Pink Banner", "mcl_wool:pink", "#DE557C", "mcl_dye:pink", "Pink" }, - ["unicolor_lime"] = {"lime", "Lime Banner", "mcl_wool:lime", "#30AC00", "mcl_dye:green", "Lime" }, - ["unicolor_light_blue"] = {"light_blue", "Light Blue Banner", "mcl_wool:light_blue", "#4040CF", "mcl_dye:lightblue", "Light Blue" }, + ["unicolor_white"] = {"white", S("White Banner"), "mcl_wool:white", "#FFFFFF", "mcl_dye:white", N("White") }, + ["unicolor_darkgrey"] = {"grey", S("Grey Banner"), "mcl_wool:grey", "#303030", "mcl_dye:dark_grey", N("Grey") }, + ["unicolor_grey"] = {"silver", S("Light Grey Banner"), "mcl_wool:silver", "#5B5B5B", "mcl_dye:grey", N("Light Grey") }, + ["unicolor_black"] = {"black", S("Black Banner"), "mcl_wool:black", "#000000", "mcl_dye:black", N("Black") }, + ["unicolor_red"] = {"red", S("Red Banner"), "mcl_wool:red", "#BC0000", "mcl_dye:red", N("Red") }, + ["unicolor_yellow"] = {"yellow", S("Yellow Banner"), "mcl_wool:yellow", "#E6CD00", "mcl_dye:yellow", N("Yellow") }, + ["unicolor_dark_green"] = {"green", S("Green Banner"), "mcl_wool:green", "#006000", "mcl_dye:dark_green", N("Green") }, + ["unicolor_cyan"] = {"cyan", S("Cyan Banner"), "mcl_wool:cyan", "#00ACAC", "mcl_dye:cyan", N("Cyan") }, + ["unicolor_blue"] = {"blue", S("Blue Banner"), "mcl_wool:blue", "#0000AC", "mcl_dye:blue", N("Blue") }, + ["unicolor_red_violet"] = {"magenta", S("Magenta Banner"), "mcl_wool:magenta", "#AC007C", "mcl_dye:magenta", N("Magenta")}, + ["unicolor_orange"] = {"orange", S("Orange Banner"), "mcl_wool:orange", "#E67300", "mcl_dye:orange", N("Orange") }, + ["unicolor_violet"] = {"purple", S("Purple Banner"), "mcl_wool:purple", "#6400AC", "mcl_dye:violet", N("Violet") }, + ["unicolor_brown"] = {"brown", S("Brown Banner"), "mcl_wool:brown", "#603000", "mcl_dye:brown", N("Brown") }, + ["unicolor_pink"] = {"pink", S("Pink Banner"), "mcl_wool:pink", "#DE557C", "mcl_dye:pink", N("Pink") }, + ["unicolor_lime"] = {"lime", S("Lime Banner"), "mcl_wool:lime", "#30AC00", "mcl_dye:green", N("Lime") }, + ["unicolor_light_blue"] = {"light_blue", S("Light Blue Banner"), "mcl_wool:light_blue", "#4040CF", "mcl_dye:lightblue", N("Light Blue") }, } local colors_reverse = {} @@ -47,6 +50,25 @@ local layer_ratio = 255 local standing_banner_entity_offset = { x=0, y=-0.499, z=0 } local hanging_banner_entity_offset = { x=0, y=-1.7, z=0 } +local on_dig_banner = function(pos, node, digger) + -- Check protection + local name = digger:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return + end + -- Drop item + local meta = minetest.get_meta(pos) + local item = meta:get_inventory():get_stack("banner", 1) + if not item:is_empty() then + minetest.handle_node_drops(pos, {item:to_string()}, digger) + else + minetest.handle_node_drops(pos, {"mcl_bannes:banner_item_white"}, digger) + end + -- Remove node + minetest.remove_node(pos) +end + local on_destruct_banner = function(pos, hanging) local offset, nodename if hanging then @@ -56,7 +78,7 @@ local on_destruct_banner = function(pos, hanging) offset = standing_banner_entity_offset nodename = "mcl_banners:standing_banner" end - -- Find this node's banner entity and make it drop as an item + -- Find this node's banner entity and remove it local checkpos = vector.add(pos, offset) local objects = minetest.get_objects_inside_radius(checkpos, 0.5) for _, v in ipairs(objects) do @@ -65,14 +87,6 @@ local on_destruct_banner = function(pos, hanging) v:remove() end end - -- Drop item - local meta = minetest.get_meta(pos) - local item = meta:get_inventory():get_stack("banner", 1) - if not item:is_empty() then - minetest.add_item(pos, item) - else - minetest.add_item(pos, "mcl_banners:banner_item_white") - end end local on_destruct_standing_banner = function(pos) @@ -181,8 +195,9 @@ end minetest.register_node("mcl_banners:standing_banner", { _doc_items_entry_name = "Banner", _doc_items_image = "mcl_banners_item_base.png^mcl_banners_item_overlay.png", - _doc_items_longdesc = "Banners are tall colorful decorative blocks. They can be placed on the floor and at walls. Banners can be emblazoned with a variety of patterns using a lot of dye in crafting.", - _doc_items_usagehelp = "Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 6 layers on a banner that way. You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer.", + _doc_items_longdesc = S("Banners are tall colorful decorative blocks. They can be placed on the floor and at walls. Banners can be emblazoned with a variety of patterns using a lot of dye in crafting."), + _doc_items_usagehelp = S("Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 12 layers on a banner that way. If the banner includes a gradient, only 3 layers are possible.").."\n".. +S("You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer."), walkable = false, is_ground_content = false, paramtype = "light", @@ -202,11 +217,12 @@ minetest.register_node("mcl_banners:standing_banner", { wield_image = "mcl_banners_item_base.png", selection_box = {type = "fixed", fixed= {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} }, - groups = {axey=1,handy=1, attached_node = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1, material_wood=1 }, + groups = {axey=1,handy=1, attached_node = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1, material_wood=1, dig_by_piston=1 }, stack_max = 16, sounds = node_sounds, drop = "", -- Item drops are handled in entity code + on_dig = on_dig_banner, on_destruct = on_destruct_standing_banner, on_punch = function(pos, node) respawn_banner_entity(pos, node) @@ -238,6 +254,7 @@ minetest.register_node("mcl_banners:hanging_banner", { sounds = node_sounds, drop = "", -- Item drops are handled in entity code + on_dig = on_dig_banner, on_destruct = on_destruct_hanging_banner, on_punch = function(pos, node) respawn_banner_entity(pos, node) @@ -454,7 +471,7 @@ local entity_standing = { mesh = "amc_banner.b3d", visual_size = { x=2.499, y=2.499 }, textures = make_banner_texture(), - collisionbox = { 0, 0, 0, 0, 0, 0 }, + pointable = false, _base_color = nil, -- base color of banner _layers = nil, -- table of layers painted over the base color. diff --git a/mods/ITEMS/mcl_banners/locale/mcl_banners.de.tr b/mods/ITEMS/mcl_banners/locale/mcl_banners.de.tr new file mode 100644 index 000000000..958192ba7 --- /dev/null +++ b/mods/ITEMS/mcl_banners/locale/mcl_banners.de.tr @@ -0,0 +1,76 @@ +# textdomain: mcl_banners +White Banner=Weißes Banner +White=weiß +Grey Banner=Graues Banner +Grey=grau +Light Grey Banner=Hellgraues Banner +Light Grey=hellgrau +Black Banner=Schwarzes Banner +Black=schwarz +Red Banner=Rotes Banner +Red=rot +Yellow Banner=Gelbes Banner +Yellow=gelb +Green Banner=Grünes Banner +Green=grün +Cyan Banner=Türkises Banner +Cyan=türkis +Blue Banner=Blaues Banner +Blue=blau +Magenta Banner=Magenta Banner +Magenta=magenta +Orange Banner=Orange Banner +Orange=orange +Purple Banner=Violettes Banner +Purple=violett +Brown Banner=Braunes Banner +Brown=braun +Pink Banner=Rosa Banner +Pink=rosa +Lime Banner=Lindgrünes Banner +Lime=lindgrün +Light Blue Banner=Hellblaues Banner +Light Blue=hellblau +Banners are tall colorful decorative blocks. They can be placed on the floor and at walls. Banners can be emblazoned with a variety of patterns using a lot of dye in crafting.=Banner sind hohe farbige dekorative Blöcke. Sie können auf dem Boden und an Wände platziert werden. Banner können mit einer Vielzahl von Mustern mit Hilfe von Farbstoffen in der Fertigung bemalt werden. +Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 12 layers on a banner that way. If the banner includes a gradient, only 3 layers are possible.=Benutzen Sie die Fertigung, um ein Muster auf einem Banner zu malen. Bemalte Banner können erneut bemalt werden, um verschiedene Muster zu ergeben. Sie können bis zu 12 Schichten auf einen Banner malen. Wenn ein Banner einen Farbverlauf hat, sind nur 3 Schichten möglich. +You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer.=Sie können ein Muster eines Banners kopieren, indem Sie zwei Banner der selben Grundfarbe in das Fertigungsgitter platzieren: Das eine muss bemalt sein, das andere leer. Außerdem können Sie ein Banner an einem Kessel mit Wasser benutzen, um seine oberste Schicht abzuwaschen. +@1 Bordure=Bord (@1) +@1 Bricks=Ziegel (@1) +@1 Roundel=Kugel (@1) +@1 Creeper Charge=Creeper-Figur (@1) +@1 Saltire=Andreaskreuz (@1) +@1 Bordure Indented=Gewellter Bord (@1) +@1 Per Bend Inverted=Schräglinke umgekehrte Teilung (@1) +@1 Per Bend Sinister Inverted=Schrägrechte umgekehrte Teilung (@1) +@1 Per Bend=Schräglinke Teilung (@1) +@1 Per Bend Sinister=Schrägrechte Teilung (@1) +@1 Flower Charge=Blumenfigur (@1) +@1 Gradient=Farbverlauf (@1) +@1 Base Gradient=Fußfarbverlauf (@1) +@1 Per Fess Inverted=Umgekehrte Teilung (@1) +@1 Per Fess=Teilung (@1) +@1 Per Pale=Spaltung (@1) +@1 Per Pale Inverted=Umgekehrte Spaltung (@1) +@1 Thing Charge=Dingsfigur (@1) +@1 Lozenge=Raute (@1) +@1 Skull Charge=Totenkopffigur (@1) +@1 Paly=Pfähle (@1) +@1 Base Dexter Canton=Rechtes Untereck (@1) +@1 Base Sinister Canton=Linkes Untereck (@1) +@1 Chief Dexter Canton=Rechtes Obereck (@1) +@1 Chief Sinister Canton=Linkes Obereck (@1) +@1 Cross=Kreuz (@1) +@1 Base=Fuß (@1) +@1 Pale=Pfahl (@1) +@1 Bend Sinister=Schräglinksbalken (@1) +@1 Bend=Schrägbalken (@1) +@1 Pale Dexter=Rechte Flanke (@1) +@1 Fess=Balken (@1) +@1 Pale Sinister=Linke Flanke (@1) +@1 Chief=Haupt (@1) +@1 Chevron=Sparren (@1) +@1 Chevron Inverted=Gegensparren (@1) +@1 Base Indented=Gezackter Fuß (@1) +@1 Chief Indented=Gezacktes Haupt (@1) +And one additional layer=Und eine zusätzliche Schicht +And @1 additional layers=Und @1 zusätzliche Schichten diff --git a/mods/ITEMS/mcl_banners/locale/template.txt b/mods/ITEMS/mcl_banners/locale/template.txt new file mode 100644 index 000000000..e69629d9c --- /dev/null +++ b/mods/ITEMS/mcl_banners/locale/template.txt @@ -0,0 +1,76 @@ +# textdomain: mcl_banners +White Banner= +White= +Grey Banner= +Grey= +Light Grey Banner= +Light Grey= +Black Banner= +Black= +Red Banner= +Red= +Yellow Banner= +Yellow= +Green Banner= +Green= +Cyan Banner= +Cyan= +Blue Banner= +Blue= +Magenta Banner= +Magenta= +Orange Banner= +Orange= +Purple Banner= +Violet= +Brown Banner= +Brown= +Pink Banner= +Pink= +Lime Banner= +Lime= +Light Blue Banner= +Light Blue= +Banners are tall colorful decorative blocks. They can be placed on the floor and at walls. Banners can be emblazoned with a variety of patterns using a lot of dye in crafting.= +Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 12 layers on a banner that way. If the banner includes a gradient, only 3 layers are possible.= +You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer.= +@1 Bordure= +@1 Bricks= +@1 Roundel= +@1 Creeper Charge= +@1 Saltire= +@1 Bordure Indented= +@1 Per Bend Inverted= +@1 Per Bend Sinister Inverted= +@1 Per Bend= +@1 Per Bend Sinister= +@1 Flower Charge= +@1 Gradient= +@1 Base Gradient= +@1 Per Fess Inverted= +@1 Per Fess= +@1 Per Pale= +@1 Per Pale Inverted= +@1 Thing Charge= +@1 Lozenge= +@1 Skull Charge= +@1 Paly= +@1 Base Dexter Canton= +@1 Base Sinister Canton= +@1 Chief Dexter Canton= +@1 Chief Sinister Canton= +@1 Cross= +@1 Base= +@1 Pale= +@1 Bend Sinister= +@1 Bend= +@1 Pale Dexter= +@1 Fess= +@1 Pale Sinister= +@1 Chief= +@1 Chevron= +@1 Chevron Inverted= +@1 Base Indented= +@1 Chief Indented= +And one additional layer= +And @1 additional layer(s)= diff --git a/mods/ITEMS/mcl_banners/patterncraft.lua b/mods/ITEMS/mcl_banners/patterncraft.lua index 8d202c78c..3f161267d 100644 --- a/mods/ITEMS/mcl_banners/patterncraft.lua +++ b/mods/ITEMS/mcl_banners/patterncraft.lua @@ -1,9 +1,15 @@ +local S = minetest.get_translator("mcl_banners") +local N = function(s) return s end + -- Pattern crafting. This file contains the code for crafting all the -- emblazonings you can put on the banners. It's quite complicated; --- normal 08/15 crafting won't work here. +-- run-of-the-mill crafting won't work here. -- Maximum number of layers which can be put on a banner by crafting. -local max_layers_crafting = 6 +local max_layers_crafting = 12 + +-- Maximum number of layers when banner includes a gradient (workaround, see below). +local max_layers_gradient = 3 -- Max. number lines in the descriptions for the banner layers. -- This is done to avoid huge tooltips. @@ -14,99 +20,99 @@ local d = "group:dye" -- dye local e = "" -- empty slot (one of them must contain the banner) local patterns = { ["border"] = { - name = "%s Bordure", + name = N("@1 Bordure"), { d, d, d }, { d, e, d }, { d, d, d }, }, ["bricks"] = { - name = "%s Bricks", + name = N("@1 Bricks"), type = "shapeless", { e, "mcl_core:brick_block", d }, }, ["circle"] = { - name = "%s Roundel", + name = N("@1 Roundel"), { e, e, e }, { e, d, e }, { e, e, e }, }, ["creeper"] = { - name = "%s Creeper Charge", + name = N("@1 Creeper Charge"), type = "shapeless", { e, "mcl_heads:creeper", d }, }, ["cross"] = { - name = "%s Saltire", + name = N("@1 Saltire"), { d, e, d }, { e, d, e }, { d, e, d }, }, ["curly_border"] = { - name = "%s Bordure Indented", + name = N("@1 Bordure Indented"), type = "shapeless", { e, "mcl_core:vine", d }, }, ["diagonal_up_left"] = { - name = "%s Per Bend Inverted", + name = N("@1 Per Bend Inverted"), { e, e, e }, { d, e, e }, { d, d, e }, }, ["diagonal_up_right"] = { - name = "%s Per Bend Sinister Inverted", + name = N("@1 Per Bend Sinister Inverted"), { e, e, e }, { e, e, d }, { e, d, d }, }, ["diagonal_right"] = { - name = "%s Per Bend", + name = N("@1 Per Bend"), { e, d, d }, { e, e, d }, { e, e, e }, }, ["diagonal_left"] = { - name = "%s Per Bend Sinister", + name = N("@1 Per Bend Sinister"), { d, d, e }, { d, e, e }, { e, e, e }, }, ["flower"] = { - name = "%s Flower Charge", + name = N("@1 Flower Charge"), type = "shapeless", { e, "mcl_flowers:oxeye_daisy", d }, }, ["gradient"] = { - name = "%s Gradient", + name = N("@1 Gradient"), { d, e, d }, { e, d, e }, { e, d, e }, }, ["gradient_up"] = { - name = "%s Base Gradient", + name = N("@1 Base Gradient"), { e, d, e }, { e, d, e }, { d, e, d }, }, ["half_horizontal_bottom"] = { - name = "%s Per Fess Inverted", + name = N("@1 Per Fess Inverted"), { e, e, e }, { d, d, d }, { d, d, d }, }, ["half_horizontal"] = { - name = "%s Per Fess", + name = N("@1 Per Fess"), { d, d, d }, { d, d, d }, { e, e, e }, }, ["half_vertical"] = { - name = "%s Per Pale", + name = N("@1 Per Pale"), { d, d, e }, { d, d, e }, { d, d, e }, }, ["half_vertical_right"] = { - name = "%s Per Pale Inverted", + name = N("@1 Per Pale Inverted"), { e, d, d }, { e, d, d }, { e, d, d }, @@ -114,126 +120,126 @@ local patterns = { ["thing"] = { -- Symbol used for the “Thing”: U+1F65D 🙝 - name = "%s Thing Charge", + name = N("@1 Thing Charge"), type = "shapeless", -- TODO: Replace with enchanted golden apple { e, "mcl_core:apple_gold", d }, }, ["rhombus"] = { - name = "%s Lozenge", + name = N("@1 Lozenge"), { e, d, e }, { d, e, d }, { e, d, e }, }, ["skull"] = { - name = "%s Skull Charge", + name = N("@1 Skull Charge"), type = "shapeless", { e, "mcl_heads:wither_skeleton", d }, }, ["small_stripes"] = { - name = "%s Paly", + name = N("@1 Paly"), { d, e, d }, { d, e, d }, { e, e, e }, }, ["square_bottom_left"] = { - name = "%s Base Dexter Canton", + name = N("@1 Base Dexter Canton"), { e, e, e }, { e, e, e }, { d, e, e }, }, ["square_bottom_right"] = { - name = "%s Base Sinister Canton", + name = N("@1 Base Sinister Canton"), { e, e, e }, { e, e, e }, { e, e, d }, }, ["square_top_left"] = { - name = "%s Chief Dexter Canton", + name = N("@1 Chief Dexter Canton"), { d, e, e }, { e, e, e }, { e, e, e }, }, ["square_top_right"] = { - name = "%s Chief Sinister Canton", + name = N("@1 Chief Sinister Canton"), { e, e, d }, { e, e, e }, { e, e, e }, }, ["straight_cross"] = { - name = "%s Cross", + name = N("@1 Cross"), { e, d, e }, { d, d, d }, { e, d, e }, }, ["stripe_bottom"] = { - name = "%s Base", + name = N("@1 Base"), { e, e, e }, { e, e, e }, { d, d, d }, }, ["stripe_center"] = { - name = "%s Pale", + name = N("@1 Pale"), { e, d, e }, { e, d, e }, { e, d, e }, }, ["stripe_downleft"] = { - name = "%s Bend Sinister", + name = N("@1 Bend Sinister"), { e, e, d }, { e, d, e }, { d, e, e }, }, ["stripe_downright"] = { - name = "%s Bend", + name = N("@1 Bend"), { d, e, e }, { e, d, e }, { e, e, d }, }, ["stripe_left"] = { - name = "%s Pale Dexter", + name = N("@1 Pale Dexter"), { d, e, e }, { d, e, e }, { d, e, e }, }, ["stripe_middle"] = { - name = "%s Fess", + name = N("@1 Fess"), { e, e, e }, { d, d, d }, { e, e, e }, }, ["stripe_right"] = { - name = "%s Pale Sinister", + name = N("@1 Pale Sinister"), { e, e, d }, { e, e, d }, { e, e, d }, }, ["stripe_top"] = { - name = "%s Chief", + name = N("@1 Chief"), { d, d, d }, { e, e, e }, { e, e, e }, }, ["triangle_bottom"] = { - name = "%s Chevron", + name = N("@1 Chevron"), { e, e, e }, { e, d, e }, { d, e, d }, }, ["triangle_top"] = { - name = "%s Chevron Inverted", + name = N("@1 Chevron Inverted"), { d, e, d }, { e, d, e }, { e, e, e }, }, ["triangles_bottom"] = { - name = "%s Base Indented", + name = N("@1 Base Indented"), { e, e, e }, { d, e, d }, { e, d, e }, }, ["triangles_top"] = { - name = "%s Chief Indented", + name = N("@1 Chief Indented"), { e, d, e }, { d, e, d }, { e, e, e }, @@ -262,14 +268,15 @@ mcl_banners.make_advanced_banner_description = function(description, layers) -- Layer text line. local color = mcl_banners.colors[layers[l].color][6] local pattern_name = patterns[layers[l].pattern].name - -- The pattern name is a format string (e.g. “%s Base”) - table.insert(layerstrings, string.format(pattern_name, color)) + -- The pattern name is a format string + -- (e.g. “@1 Base” → “Yellow Base”) + table.insert(layerstrings, S(pattern_name, S(color))) end -- Warn about missing information if #layers == max_layer_lines + 1 then - table.insert(layerstrings, "And one addional layer") + table.insert(layerstrings, S("And one additional layer")) elseif #layers > max_layer_lines + 1 then - table.insert(layerstrings, string.format("And %d addional layers", #layers - max_layer_lines)) + table.insert(layerstrings, S("And @1 additional layers", #layers - max_layer_lines)) end -- Final string concatenations: Just a list of strings @@ -386,6 +393,16 @@ local banner_pattern_craft = function(itemstack, player, old_craft_grid, craft_i if #layers >= max_layers_crafting then return ItemStack("") end + -- Lower layer limit when banner includes any gradient. + -- Workaround to circumvent Minetest bug (https://github.com/minetest/minetest/issues/6210) + -- TODO: Remove this restriction when bug #6210 is fixed. + if #layers >= max_layers_gradient then + for l=1, #layers do + if layers[l].pattern == "gradient" or layers[l].pattern == "gradient_up" then + return ItemStack("") + end + end + end local matching_pattern local max_i = player:get_inventory():get_size("craft") diff --git a/mods/ITEMS/mcl_beds/api.lua b/mods/ITEMS/mcl_beds/api.lua index 4fbbe55eb..efc27b3ea 100644 --- a/mods/ITEMS/mcl_beds/api.lua +++ b/mods/ITEMS/mcl_beds/api.lua @@ -1,3 +1,4 @@ +local S = minetest.get_translator("mcl_beds") local reverse = true @@ -32,22 +33,24 @@ local function kick_player_after_destruct(destruct_pos) end end -local beddesc = "Beds allow you to sleep at night and make the time pass faster." -local beduse = "To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger." +local beddesc = S("Beds allow you to sleep at night and make the time pass faster.") +local beduse = S("To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger.") if minetest.settings:get_bool("enable_bed_respawn") == false then - beddesc = beddesc .. "\n" .. "In local folklore, legends are told of other worlds where setting the start point for your next life would be possible. But this world is not one of them." + beddesc = beddesc .. "\n" .. S("You have heard of other worlds in which a bed would set the start point for your next life. But this world is not one of them.") else - beddesc = beddesc .. "\n" .. "By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed." + beddesc = beddesc .. "\n" .. S("By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.") end if minetest.settings:get_bool("enable_bed_night_skip") == false then - beddesc = beddesc .. "\n" .. "In this strange world, going to bed won't skip the night, but you can skip thunderstorms." + beddesc = beddesc .. "\n" .. S("In this world, going to bed won't skip the night, but it will skip thunderstorms.") else - beddesc = beddesc .. "\n" .. "Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner." + beddesc = beddesc .. "\n" .. S("Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.") end local default_sounds if minetest.get_modpath("mcl_sounds") then - default_sounds = mcl_sounds.node_sound_wood_defaults() + default_sounds = mcl_sounds.node_sound_wood_defaults({ + footstep = { gain = 0.5, name = "mcl_sounds_cloth" }, + }) end function mcl_beds.register_bed(name, def) @@ -65,6 +68,8 @@ function mcl_beds.register_bed(name, def) description = def.description, _doc_items_longdesc = def._doc_items_longdesc or beddesc, _doc_items_usagehelp = def._doc_items_usagehelp or beduse, + _doc_items_create_entry = def._doc_items_create_entry, + _doc_items_entry_name = def._doc_items_entry_name, inventory_image = def.inventory_image, wield_image = def.wield_image, drawtype = "nodebox", diff --git a/mods/ITEMS/mcl_beds/beds.lua b/mods/ITEMS/mcl_beds/beds.lua index 40deac70a..8f41c7a3f 100644 --- a/mods/ITEMS/mcl_beds/beds.lua +++ b/mods/ITEMS/mcl_beds/beds.lua @@ -1,4 +1,5 @@ --- 3D bed +local S = minetest.get_translator("mcl_beds") +local mod_doc = minetest.get_modpath("doc") local nodebox = { bottom = { @@ -15,26 +16,28 @@ local nodebox = { local colors = { -- { ID, decription, wool, dye } - { "red", "Red Bed", "mcl_wool:red", "mcl_dye:red" }, - { "blue", "Blue Bed", "mcl_wool:blue", "mcl_dye:blue" }, - { "cyan", "Cyan Bed", "mcl_wool:cyan", "mcl_dye:cyan" }, - { "grey", "Grey Bed", "mcl_wool:grey", "mcl_dye:dark_grey" }, - { "silver", "Light Grey Bed", "mcl_wool:silver", "mcl_dye:grey" }, - { "black", "Black Bed", "mcl_wool:black", "mcl_dye:black" }, - { "yellow", "Yellow Bed", "mcl_wool:yellow", "mcl_dye:yellow" }, - { "green", "Green Bed", "mcl_wool:green", "mcl_dye:dark_green" }, - { "magenta", "Magenta Bed", "mcl_wool:magenta", "mcl_dye:magenta" }, - { "orange", "Orange Bed", "mcl_wool:orange", "mcl_dye:orange" }, - { "purple", "Purple Bed", "mcl_wool:purple", "mcl_dye:violet" }, - { "brown", "Brown Bed", "mcl_wool:brown", "mcl_dye:brown" }, - { "pink", "Pink Bed", "mcl_wool:pink", "mcl_dye:pink" }, - { "lime", "Lime Bed", "mcl_wool:lime", "mcl_dye:green" }, - { "light_blue", "Light Blue Bed", "mcl_wool:light_blue", "mcl_dye:lightblue" }, - { "white", "White Bed", "mcl_wool:white", "mcl_dye:white" }, + { "red", S("Red Bed"), "mcl_wool:red", "mcl_dye:red" }, + { "blue", S("Blue Bed"), "mcl_wool:blue", "mcl_dye:blue" }, + { "cyan", S("Cyan Bed"), "mcl_wool:cyan", "mcl_dye:cyan" }, + { "grey", S("Grey Bed"), "mcl_wool:grey", "mcl_dye:dark_grey" }, + { "silver", S("Light Grey Bed"), "mcl_wool:silver", "mcl_dye:grey" }, + { "black", S("Black Bed"), "mcl_wool:black", "mcl_dye:black" }, + { "yellow", S("Yellow Bed"), "mcl_wool:yellow", "mcl_dye:yellow" }, + { "green", S("Green Bed"), "mcl_wool:green", "mcl_dye:dark_green" }, + { "magenta", S("Magenta Bed"), "mcl_wool:magenta", "mcl_dye:magenta" }, + { "orange", S("Orange Bed"), "mcl_wool:orange", "mcl_dye:orange" }, + { "purple", S("Purple Bed"), "mcl_wool:purple", "mcl_dye:violet" }, + { "brown", S("Brown Bed"), "mcl_wool:brown", "mcl_dye:brown" }, + { "pink", S("Pink Bed"), "mcl_wool:pink", "mcl_dye:pink" }, + { "lime", S("Lime Bed"), "mcl_wool:lime", "mcl_dye:green" }, + { "light_blue", S("Light Blue Bed"), "mcl_wool:light_blue", "mcl_dye:lightblue" }, + { "white", S("White Bed"), "mcl_wool:white", "mcl_dye:white" }, } +local canonical_color = "red" for c=1, #colors do local colorid = colors[c][1] + local is_canonical = colorid == canonical_color -- Recoloring recipe for white bed if minetest.get_modpath("mcl_dye") then @@ -54,9 +57,19 @@ for c=1, #colors do } end + local entry_name, create_entry + if mod_doc then + if is_canonical then + entry_name = S("Bed") + else + create_entry = false + end + end -- Register bed mcl_beds.register_bed("mcl_beds:bed_"..colorid, { description = colors[c][2], + _doc_items_entry_name = entry_name, + _doc_items_create_entry = create_entry, inventory_image = "mcl_beds_bed_"..colorid..".png", wield_image = "mcl_beds_bed_"..colorid..".png", tiles = { @@ -89,6 +102,10 @@ for c=1, #colors do }, recipe = main_recipe, }) + if mod_doc and not is_canonical then + doc.add_entry_alias("nodes", "mcl_beds:bed_"..canonical_color.."_bottom", "nodes", "mcl_beds:bed_"..colorid.."_bottom") + doc.add_entry_alias("nodes", "mcl_beds:bed_"..canonical_color.."_bottom", "nodes", "mcl_beds:bed_"..colorid.."_top") + end end diff --git a/mods/ITEMS/mcl_beds/depends.txt b/mods/ITEMS/mcl_beds/depends.txt index 3285e5914..34e12adc5 100644 --- a/mods/ITEMS/mcl_beds/depends.txt +++ b/mods/ITEMS/mcl_beds/depends.txt @@ -6,3 +6,4 @@ mcl_dye? mcl_tnt? mcl_weather? mcl_spawn? +doc? diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index 02f72ff5b..73e1cebcb 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -1,3 +1,6 @@ +local S = minetest.get_translator("mcl_beds") +local F = minetest.formspec_escape + local pi = math.pi local player_in_bed = 0 local is_sp = minetest.is_singleplayer() @@ -67,20 +70,20 @@ local function lay_down(player, pos, bed_pos, state, skip) if bed_pos then -- No sleeping if too far away if vector.distance(bed_pos, pos) > 2 then - minetest.chat_send_player(name, "You can't sleep, the bed's too far away!") + minetest.chat_send_player(name, S("You can't sleep, the bed's too far away!")) return false end for _, other_pos in pairs(mcl_beds.bed_pos) do if vector.distance(bed_pos, other_pos) < 0.1 then - minetest.chat_send_player(name, "This bed is already occupied!") + minetest.chat_send_player(name, S("This bed is already occupied!")) return false end end -- No sleeping while moving. Slightly different behaviour than in MC. if vector.length(player:get_player_velocity()) > 0.001 then - minetest.chat_send_player(name, "You have to stop moving before going to bed!") + minetest.chat_send_player(name, S("You have to stop moving before going to bed!")) return false end @@ -96,7 +99,7 @@ local function lay_down(player, pos, bed_pos, state, skip) -- Approximation of monster detection range if def._cmi_is_mob and ((mobname ~= "mobs_mc:pigman" and def.type == "monster" and not monster_exceptions[mobname]) or (mobname == "mobs_mc:pigman" and ent.state == "attack")) then if math.abs(bed_pos.y - obj:get_pos().y) <= 5 then - minetest.chat_send_player(name, "You can't sleep now, monsters are nearby!") + minetest.chat_send_player(name, S("You can't sleep now, monsters are nearby!")) end return false end @@ -127,7 +130,7 @@ local function lay_down(player, pos, bed_pos, state, skip) mcl_player.player_attached[name] = false playerphysics.remove_physics_factor(player, "speed", "mcl_beds:sleeping") playerphysics.remove_physics_factor(player, "jump", "mcl_beds:sleeping") - player:set_attribute("mcl_beds:sleeping", "false") + player:get_meta():set_string("mcl_beds:sleeping", "false") hud_flags.wielditem = true mcl_player.player_set_animation(player, "stand" , 30) mcl_beds.pos[name] = nil @@ -143,10 +146,10 @@ local function lay_down(player, pos, bed_pos, state, skip) local def1 = minetest.registered_nodes[n1.name] local def2 = minetest.registered_nodes[n2.name] if def1.walkable or def2.walkable then - minetest.chat_send_player(name, "You can't sleep, the bed is obstructed!") + minetest.chat_send_player(name, S("You can't sleep, the bed is obstructed!")) return false elseif (def1.damage_per_second ~= nil and def1.damage_per_second > 0) or (def2.damage_per_second ~= nil and def2.damage_per_second > 0) then - minetest.chat_send_player(name, "It's too dangerous to sleep here!") + minetest.chat_send_player(name, S("It's too dangerous to sleep here!")) return false end @@ -162,14 +165,14 @@ local function lay_down(player, pos, bed_pos, state, skip) -- Values taken from Minecraft Wiki with offset of +6000 if tod < 18541 and tod > 5458 and (not weather_mod or (mcl_weather.get_weather() ~= "thunder")) then if spawn_changed then - minetest.chat_send_player(name, "New respawn position set! But you can only sleep at night or during a thunderstorm.") + minetest.chat_send_player(name, S("New respawn position set! But you can only sleep at night or during a thunderstorm.")) else - minetest.chat_send_player(name, "You can only sleep at night or during a thunderstorm.") + minetest.chat_send_player(name, S("You can only sleep at night or during a thunderstorm.")) end return false end if spawn_changed then - minetest.chat_send_player(name, "New respawn position set!") + minetest.chat_send_player(name, S("New respawn position set!")) end mcl_beds.player[name] = 1 @@ -181,7 +184,7 @@ local function lay_down(player, pos, bed_pos, state, skip) player:set_look_horizontal(yaw) player:set_look_vertical(0) - player:set_attribute("mcl_beds:sleeping", "true") + player:get_meta():set_string("mcl_beds:sleeping", "true") playerphysics.add_physics_factor(player, "speed", "mcl_beds:sleeping", 0) playerphysics.add_physics_factor(player, "jump", "mcl_beds:sleeping", 0) player:set_pos(p) @@ -199,8 +202,8 @@ local function update_formspecs(finished) local form_n = "size[8,15;true]" local all_in_bed = ges == player_in_bed local night_skip = is_night_skip_enabled() - local button_leave = "button_exit[2,12;4,0.75;leave;Leave bed]" - local button_abort = "button_exit[2,12;4,0.75;leave;Abort sleep]" + local button_leave = "button_exit[2,12;4,0.75;leave;"..F(S("Leave bed")).."]" + local button_abort = "button_exit[2,12;4,0.75;leave;"..F(S("Abort sleep")).."]" local bg_presleep = "bgcolor[#00000080;true]" local bg_sleep = "bgcolor[#000000FF;true]" @@ -210,33 +213,33 @@ local function update_formspecs(finished) end return elseif not is_sp then - local text = string.format("Players in bed: %d/%d", player_in_bed, ges) + local text = S("Players in bed: @1/@2", player_in_bed, ges) if not night_skip then - text = text .. "\n" .. "Note: Night skip is disabled." + text = text .. "\n" .. S("Note: Night skip is disabled.") form_n = form_n .. bg_presleep form_n = form_n .. button_leave elseif all_in_bed then - text = text .. "\n" .. "You're sleeping." + text = text .. "\n" .. S("You're sleeping.") form_n = form_n .. bg_sleep form_n = form_n .. button_abort else - text = text .. "\n" .. "You will fall asleep when all players are in bed." + text = text .. "\n" .. S("You will fall asleep when all players are in bed.") form_n = form_n .. bg_presleep form_n = form_n .. button_leave end - form_n = form_n .. "label[2.2,7.5;"..minetest.formspec_escape(text).."]" + form_n = form_n .. "label[2.2,7.5;"..F(text).."]" else local text if night_skip then - text = "You're sleeping." + text = S("You're sleeping.") form_n = form_n .. bg_sleep form_n = form_n .. button_abort else - text = "You're in bed." .. "\n" .. "Note: Night skip is disabled." + text = S("You're in bed.") .. "\n" .. S("Note: Night skip is disabled.") form_n = form_n .. bg_presleep form_n = form_n .. button_leave end - form_n = form_n .. "label[2.2,7.5;"..minetest.formspec_escape(text).."]" + form_n = form_n .. "label[2.2,7.5;"..F(text).."]" end for name,_ in pairs(mcl_beds.player) do @@ -296,7 +299,7 @@ end function mcl_beds.on_rightclick(pos, player, is_top) -- Anti-Inception: Don't allow to sleep while you're sleeping - if player:get_attribute("mcl_beds:sleeping") == "true" then + if player:get_meta():get_string("mcl_beds:sleeping") == "true" then return end if minetest.get_modpath("mcl_worlds") then @@ -343,9 +346,10 @@ end -- Callbacks minetest.register_on_joinplayer(function(player) - if player:get_attribute("mcl_beds:sleeping") == "true" then + local meta = player:get_meta() + if meta:get_string("mcl_beds:sleeping") == "true" then -- Make player awake on joining server - player:set_attribute("mcl_beds:sleeping", "false") + meta:set_string("mcl_beds:sleeping", "false") end playerphysics.remove_physics_factor(player, "speed", "mcl_beds:sleeping") playerphysics.remove_physics_factor(player, "jump", "mcl_beds:sleeping") diff --git a/mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr b/mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr new file mode 100644 index 000000000..079951c8d --- /dev/null +++ b/mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr @@ -0,0 +1,40 @@ +# textdomain: mcl_beds +Beds allow you to sleep at night and make the time pass faster.=Mit Betten können Sie in der Nacht schlafen und die Zeit schneller verstreichen lassen. +To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger.=Um ein Bett zu benutzen, stellen Sie sich direkt davor und rechtsklicken Sie darauf, um darin zu schlafen. Schlafen funktioniert nur, wenn die Sonne untergeht, in der Nacht oder während eines Gewittersturms. Das Bett muss außerdem fern von Gefahren sein. +You have heard of other worlds in which a bed would set the start point for your next life. But this world is not one of them.=Sie hörten von anderen Welten, in denen ein Bett den Startpunkt für Ihr nächstes Leben setzen würde. Aber diese Welt ist keine solche. +By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=Indem Sie ein Bett benutzen, setzen Sie den Startpunkt Ihres nächsten Lebens. Wenn Sie sterben, werden Sie Ihr nächstes Leben auf diesem Bett beginnen, es sei denn, es ist blockiert oder zerstört. +In this world, going to bed won't skip the night, but it will skip thunderstorms.=In dieser Welt können mit dem Bett Nächte nicht übersprungen werden, nur Gewitterstürme. +Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=Mit Schlaf können Sie die Nacht überspringen. Die Nacht wird übersprungen, wenn alle Spieler in dieser Welt sich schlafen gelegt haben. Die Nacht wird dann nach ein paar Sekunden übersprungen. Gewitterstürme werden auf die gleiche Weise übersprungen. +Bed=Bett +Red Bed=Rotes Bett +Blue Bed=Blaues Bett +Cyan Bed=Türkises Bett +Grey Bed=Graues Bett +Light Grey Bed=Hellgraues Bett +Black Bed=Schwarzes Bett +Yellow Bed=Gelbes Bett +Green Bed=Grünes Bett +Magenta Bed=Magenta Bett +Orange Bed=Orange Bett +Purple Bed=Violettes Bett +Brown Bed=Braunes Bett +Pink Bed=Rosa Bett +Lime Bed=Lindgrünes Bett +Light Blue Bed=Hellblaues Bett +White Bed=Weißes Bett +You can't sleep, the bed's too far away!=Sie können nicht schlafen, das Bett ist zu weit weg! +This bed is already occupied!=Dieses Bett ist schon belegt! +You have to stop moving before going to bed!=Sie müssen anhalten, bevor Sie zu Bett gehen! +You can't sleep now, monsters are nearby!=Sie können jetzt nicht schlafen, Monster sind in der Nähe! +You can't sleep, the bed is obstructed!=Sie können nicht schlafen, das Bett ist blockiert! +It's too dangerous to sleep here!=Es ist zu gefährlich, hier zu schlafen! +New respawn position set! But you can only sleep at night or during a thunderstorm.=Neue Wiedereinstiegsposition gesetzt! Aber Sie können nur nachts oder während eines Gewittersturms schlafen. +You can only sleep at night or during a thunderstorm.=Sie können nur nachts oder während eines Gewittersturms schlafen. +New respawn position set!=Neue Wiedereinstiegsposition gesetzt! +Leave bed=Bett verlassen +Abort sleep=Schlaf abbrechen +Players in bed: @1/@2=Spieler im Bett: @1/@2 +Note: Night skip is disabled.=Anmerkung: Überspringen der Nacht deaktiviert. +You're sleeping.=Sie schlafen. +You will fall asleep when all players are in bed.=Sie werden einschlafen, wenn alle Spieler im Bett sind. +You're in bed.=Sie sind im Bett. diff --git a/mods/ITEMS/mcl_beds/locale/template.txt b/mods/ITEMS/mcl_beds/locale/template.txt new file mode 100644 index 000000000..9664c8001 --- /dev/null +++ b/mods/ITEMS/mcl_beds/locale/template.txt @@ -0,0 +1,40 @@ +# textdomain: mcl_beds +Beds allow you to sleep at night and make the time pass faster.= +To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger.= +You have heard of other worlds in which a bed would set the start point for your next life. But this world is not one of them. +By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.= +In this world, going to bed won't skip the night, but it will skip thunderstorms.= +Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.= +Bed= +Red Bed= +Blue Bed= +Cyan Bed= +Grey Bed= +Light Grey Bed= +Black Bed= +Yellow Bed= +Green Bed= +Magenta Bed= +Orange Bed= +Purple Bed= +Brown Bed= +Pink Bed= +Lime Bed= +Light Blue Bed= +White Bed= +You can't sleep, the bed's too far away!= +This bed is already occupied!= +You have to stop moving before going to bed!= +You can't sleep now, monsters are nearby!= +You can't sleep, the bed is obstructed!= +It's too dangerous to sleep here!= +New respawn position set! But you can only sleep at night or during a thunderstorm.= +You can only sleep at night or during a thunderstorm.= +New respawn position set!= +Leave bed= +Abort sleep= +Players in bed: @1/@2= +Note: Night skip is disabled.= +You're sleeping.= +You will fall asleep when all players are in bed.= +You're in bed.= diff --git a/mods/ITEMS/mcl_books/init.lua b/mods/ITEMS/mcl_books/init.lua index a2627c77f..87ca31949 100644 --- a/mods/ITEMS/mcl_books/init.lua +++ b/mods/ITEMS/mcl_books/init.lua @@ -1,10 +1,12 @@ +local S =minetest.get_translator("mcl_books") + local max_text_length = 4500 -- TODO: Increase to 12800 when scroll bar was added to written book local max_title_length = 64 -- Book minetest.register_craftitem("mcl_books:book", { - description = "Book", - _doc_items_longdesc = "Books are used to make bookshelves and book and quills.", + description = S("Book"), + _doc_items_longdesc = S("Books are used to make bookshelves and book and quills."), inventory_image = "default_book.png", stack_max = 64, groups = { book=1, craftitem = 1 }, @@ -50,15 +52,15 @@ end local make_description = function(title, author, generation) local desc if generation == 0 then - desc = string.format("“%s”", title) + desc = S("“@1”", title) elseif generation == 1 then - desc = string.format("Copy of “%s”", title) + desc = S("Copy of “@1”", title) elseif generation == 2 then - desc = string.format("Copy of Copy of “%s”", title) + desc = S("Copy of Copy of “@1”", title) else - desc = "Tattered Book" + desc = S("Tattered Book") end - desc = desc .. "\n" .. core.colorize("#AAAAAA", string.format("by %s", author)) + desc = desc .. "\n" .. core.colorize("#AAAAAA", S("by @1", author)) return desc end @@ -81,8 +83,8 @@ local write = function(itemstack, user, pointed_thing) local formspec = "size[8,9]".. "background[-0.5,-0.5;9,10;mcl_books_book_bg.png]".. "textarea[0.75,0.1;7.25,9;text;;"..minetest.formspec_escape(text).."]".. - "button[0.75,7.95;3,1;sign;Sign]".. - "button_exit[4.25,7.95;3,1;ok;Done]" + "button[0.75,7.95;3,1;sign;"..minetest.formspec_escape(S("Sign")).."]".. + "button_exit[4.25,7.95;3,1;ok;"..minetest.formspec_escape(S("Done")).."]" minetest.show_formspec(user:get_player_name(), "mcl_books:writable_book", formspec) end @@ -101,16 +103,16 @@ local read = function(itemstack, user, pointed_thing) local formspec = "size[8,9]".. "background[-0.5,-0.5;9,10;mcl_books_book_bg.png]".. "textarea[0.75,0.1;7.25,9;;"..core.colorize("#000000", minetest.formspec_escape(text))..";]".. - "button_exit[2.25,7.95;3,1;ok;Done]" + "button_exit[2.25,7.95;3,1;ok;"..minetest.formspec_escape(S("Done")).."]" minetest.show_formspec(user:get_player_name(), "mcl_books:written_book", formspec) end -- Book and Quill minetest.register_craftitem("mcl_books:writable_book", { - description = "Book and Quill", - _doc_items_longdesc = "This item can be used to write down some notes.", - _doc_items_usagehelp = "Hold it in the hand, then rightclick to read the current notes and edit then. You can edit the text as often as you like. You can also sign the book which turns it into a written book which you can stack, but it can't be edited anymore.".."\n".. - "A book can hold up to 4500 characters. The title length is limited to 64 characters.", + description = S("Book and Quill"), + _doc_items_longdesc = S("This item can be used to write down some notes."), + _doc_items_usagehelp = S("Hold it in the hand, then rightclick to read the current notes and edit then. You can edit the text as often as you like. You can also sign the book which turns it into a written book which you can stack, but it can't be edited anymore.").."\n".. + S("A book can hold up to 4500 characters. The title length is limited to 64 characters."), inventory_image = "mcl_books_book_writable.png", groups = { book=1 }, stack_max = 1, @@ -134,11 +136,11 @@ minetest.register_on_player_receive_fields(function ( player, formname, fields ) local name = player:get_player_name() local formspec = "size[8,9]".. "background[-0.5,-0.5;9,10;mcl_books_book_bg.png]".. - "field[0.75,1;7.25,1;title;"..core.colorize("#000000", "Enter book title:")..";]".. - "label[0.75,1.5;"..core.colorize("#404040", minetest.formspec_escape("by " .. name)).."]".. - "label[0.75,6.95;"..core.colorize("#000000", "Note: The book will no longer") .. "\n" .. core.colorize("#000000", "be editable after signing.").."]".. - "button_exit[0.75,7.95;3,1;sign;Sign and Close]".. - "button[4.25,7.95;3,1;cancel;Cancel]" + "field[0.75,1;7.25,1;title;"..minetest.formspec_escape(core.colorize("#000000", S("Enter book title:")))..";]".. + "label[0.75,1.5;"..minetest.formspec_escape(core.colorize("#404040", S("by @1", name))).."]".. + "button_exit[0.75,7.95;3,1;sign;"..minetest.formspec_escape(S("Sign and Close")).."]".. + "tooltip[sign;"..minetest.formspec_escape(S("Note: The book will no longer be editable after signing")).."]".. + "button[4.25,7.95;3,1;cancel;"..minetest.formspec_escape(S("Cancel")).."]" minetest.show_formspec(player:get_player_name(), "mcl_books:signing", formspec) end end @@ -149,7 +151,7 @@ minetest.register_on_player_receive_fields(function ( player, formname, fields ) if book:get_name() == "mcl_books:writable_book" then local title = fields.title if string.len(title) == 0 then - title = "Nameless Book" + title = S("Nameless Book") end title = cap_text_length(title, max_title_length) local meta = newbook:get_meta() @@ -184,11 +186,11 @@ end -- Written Book minetest.register_craftitem("mcl_books:written_book", { - description = "Written Book", - _doc_items_longdesc = "Written books contain some text written by someone. They can be read and copied, but not edited.", - _doc_items_usagehelp = [[Hold it in your hand, then rightclick to read the book. + description = S("Written Book"), + _doc_items_longdesc = S("Written books contain some text written by someone. They can be read and copied, but not edited."), + _doc_items_usagehelp = S("Hold it in your hand, then rightclick to read the book.").."\n\n".. -To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied.]], +S("To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied."), inventory_image = "mcl_books_book_written.png", groups = { not_in_creative_inventory=1, book=1, no_rename=1 }, stack_max = 16, @@ -322,8 +324,8 @@ end -- Bookshelf minetest.register_node("mcl_books:bookshelf", { - description = "Bookshelf", - _doc_items_longdesc = "Bookshelves are used for decoration.", + description = S("Bookshelf"), + _doc_items_longdesc = S("Bookshelves are used for decoration."), tiles = {"mcl_books_bookshelf_top.png", "mcl_books_bookshelf_top.png", "default_bookshelf.png"}, stack_max = 64, is_ground_content = false, diff --git a/mods/ITEMS/mcl_books/locale/mcl_books.de.tr b/mods/ITEMS/mcl_books/locale/mcl_books.de.tr new file mode 100644 index 000000000..c4613fd9a --- /dev/null +++ b/mods/ITEMS/mcl_books/locale/mcl_books.de.tr @@ -0,0 +1,25 @@ +# textdomain: mcl_books +Book=Buch +Books are used to make bookshelves and book and quills.=Bücher werden zur Herstellung von Bücherregalen und Büchern mit Federkiel gebraucht. +“@1”=„@1“ +Copy of “@1”=Kopie von „@1“ +Copy of Copy of “@1”=Kopie von Kopie von „@1“ +Tattered Book=Zerfleddertes Buch +by @1=von @1 +Sign=Signieren +Done=Fertig +This item can be used to write down some notes.=Dies kann benutzt werden, um ein paar Notizen aufzuschreiben. +Hold it in the hand, then rightclick to read the current notes and edit then. You can edit the text as often as you like. You can also sign the book which turns it into a written book which you can stack, but it can't be edited anymore.=Halten Sie es in der Hand, dann rechtsklicken Sie, um die Notizen zu sehen und zu ändern. Sie können den Text beliebig ändern. Sie können das Buch auch signieren und in ein geschriebenes Buch verwandeln, das gestapelt, aber nicht mehr geändert werden kann. +A book can hold up to 4500 characters. The title length is limited to 64 characters.=Ein Buch kann bis zu 4500 Zeichen enthalten. Die Titellänge ist begrenzt auf 64 Zeichen. +Enter book title:=Buchtitel eingeben: +Note: The book will no longer be editable after signing=Anmerkung: Das Buch kann nach der Signierung nicht länger@nbearbeitet werden +Sign and Close=Signieren und schließen +Cancel=Abbrechen +Nameless Book=Namenloses Buch +Written Book=Geschriebenes Buch +Written books contain some text written by someone. They can be read and copied, but not edited.=Geschriebene Bücher enthalten etwas Text, den jemand geschrieben hat. Sie können gelesen und kopiert, aber nicht geändert werden. +Hold it in your hand, then rightclick to read the book.=Halten Sie es in Ihrer Hand und rechtsklicken Sie, um das Buch zu lesen. +To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied.=Um den Text zu kopieren, platzieren Sie es ins Fertigungsgitter mit einem Buch mit Federkiel (oder mehreren) und fertigen Sie die Kopie an. Das geschriebene Buch bleibt. Kopien von Kopien können nicht kopiert werden. +Bookshelf=Bücherregal +Bookshelves are used for decoration.=Bücherregale werden zur Dekoration benutzt. +Book and Quill=Buch und Federkiel diff --git a/mods/ITEMS/mcl_books/locale/template.txt b/mods/ITEMS/mcl_books/locale/template.txt new file mode 100644 index 000000000..22c4dae9f --- /dev/null +++ b/mods/ITEMS/mcl_books/locale/template.txt @@ -0,0 +1,27 @@ +# textdomain: mcl_books +Book= +Books are used to make bookshelves and book and quills.= +“@1”= +Copy of “@1”= +Copy of Copy of “@1”= +Tattered Book= +by @1= +# as in “to sign a book” +Sign= +Done= +This item can be used to write down some notes.= +Hold it in the hand, then rightclick to read the current notes and edit then. You can edit the text as often as you like. You can also sign the book which turns it into a written book which you can stack, but it can't be edited anymore.= +A book can hold up to 4500 characters. The title length is limited to 64 characters.= +Enter book title:= +by @1= +Note: The book will no longer be editable after signing= +Sign and Close= +Cancel= +Nameless Book= +Written Book= +Written books contain some text written by someone. They can be read and copied, but not edited.= +Hold it in your hand, then rightclick to read the book.= +To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied.= +Bookshelf= +Bookshelves are used for decoration.= +Book and Quill= diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index 52a857a0e..944748691 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_bows") + -- Time in seconds after which a stuck arrow is deleted local ARROW_TIMEOUT = 60 -- Time after which stuck arrow is rechecked for being stuck @@ -7,16 +9,21 @@ local GRAVITY = 9.81 local YAW_OFFSET = -math.pi/2 -local mod_mcl_hunger = minetest.get_modpath("mcl_hunger") +local dir_to_pitch = function(dir) + local dir2 = vector.normalize(dir) + local xz = math.abs(dir.x) + math.abs(dir.z) + return -math.atan2(-dir.y, xz) +end + local mod_awards = minetest.get_modpath("awards") and minetest.get_modpath("mcl_achievements") local mod_button = minetest.get_modpath("mesecons_button") minetest.register_craftitem("mcl_bows:arrow", { - description = "Arrow", - _doc_items_longdesc = [[Arrows are ammunition for bows and dispensers. -An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage. -Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.]], - _doc_items_usagehelp = "To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.", + description = S("Arrow"), + _doc_items_longdesc = S("Arrows are ammunition for bows and dispensers.").."\n".. +S("An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.").."\n".. +S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."), + _doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."), inventory_image = "mcl_bows_arrow_inv.png", groups = { ammo=1, ammo_bow=1 }, _on_dispense = function(itemstack, dispenserpos, droppos, dropnode, dropdir) @@ -60,6 +67,12 @@ minetest.register_node("mcl_bows:arrow_box", { paramtype2 = "facedir", sunlight_propagates = true, groups = {not_in_creative_inventory=1, dig_immediate=3}, + drop = "", + node_placement_prediction = "", + on_construct = function(pos) + minetest.log("error", "[mcl_bows] Trying to construct mcl_bows:arrow_box at "..minetest.pos_to_string(pos)) + minetest.remove_node(pos) + end, }) local ARROW_ENTITY={ @@ -107,7 +120,7 @@ ARROW_ENTITY.on_step = function(self, dtime) return end -- Drop arrow as item when it is no longer stuck - -- FIXME: Arrows are a bit slot to react and continue to float in mid air for a few seconds. + -- FIXME: Arrows are a bit slow to react and continue to float in mid air for a few seconds. if self._stuckrechecktimer > STUCK_RECHECK_TIME then local stuckin_def if self._stuckin then @@ -183,29 +196,28 @@ ARROW_ENTITY.on_step = function(self, dtime) local is_player = obj:is_player() local lua = obj:get_luaentity() if obj ~= self._shooter and (is_player or (lua and lua._cmi_is_mob)) then - obj:punch(self.object, 1.0, { - full_punch_interval=1.0, - damage_groups={fleshy=self._damage}, - }, nil) + if obj:get_hp() > 0 then + obj:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self._damage}, + }, nil) - if is_player then - if self._shooter and self._shooter:is_player() then - -- “Ding” sound for hitting another player - minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter}) + if is_player then + if self._shooter and self._shooter:is_player() then + -- “Ding” sound for hitting another player + minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter}) + end end - if mod_mcl_hunger then - mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) - end - end - if lua then - local entity_name = lua.name - -- Achievement for hitting skeleton, wither skeleton or stray (TODO) with an arrow at least 50 meters away - -- NOTE: Range has been reduced because mobs unload much earlier than that ... >_> - -- TODO: This achievement should be given for the kill, not just a hit - if self._shooter and self._shooter:is_player() and vector.distance(pos, self._startpos) >= 20 then - if mod_awards and (entity_name == "mobs_mc:skeleton" or entity_name == "mobs_mc:stray" or entity_name == "mobs_mc:witherskeleton") then - awards.unlock(self._shooter:get_player_name(), "mcl:snipeSkeleton") + if lua then + local entity_name = lua.name + -- Achievement for hitting skeleton, wither skeleton or stray (TODO) with an arrow at least 50 meters away + -- NOTE: Range has been reduced because mobs unload much earlier than that ... >_> + -- TODO: This achievement should be given for the kill, not just a hit + if self._shooter and self._shooter:is_player() and vector.distance(pos, self._startpos) >= 20 then + if mod_awards and (entity_name == "mobs_mc:skeleton" or entity_name == "mobs_mc:stray" or entity_name == "mobs_mc:witherskeleton") then + awards.unlock(self._shooter:get_player_name(), "mcl:snipeSkeleton") + end end end end @@ -290,7 +302,9 @@ ARROW_ENTITY.on_step = function(self, dtime) -- Update yaw if not self._stuck then local vel = self.object:get_velocity() - self.object:set_yaw(minetest.dir_to_yaw(vel)+YAW_OFFSET) + local yaw = minetest.dir_to_yaw(vel)+YAW_OFFSET + local pitch = dir_to_pitch(vel) + self.object:set_rotation({ x = 0, y = yaw, z = pitch }) end -- Update internal variable diff --git a/mods/ITEMS/mcl_bows/bow.lua b/mods/ITEMS/mcl_bows/bow.lua index 55a4e0b1d..4f39331d2 100644 --- a/mods/ITEMS/mcl_bows/bow.lua +++ b/mods/ITEMS/mcl_bows/bow.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_bows") + mcl_bows = {} local arrows = { @@ -41,13 +43,13 @@ mcl_bows.shoot_arrow = function(arrow_item, pos, dir, yaw, shooter, power, damag end obj:set_velocity({x=dir.x*power, y=dir.y*power, z=dir.z*power}) obj:set_acceleration({x=0, y=-GRAVITY, z=0}) - obj:setyaw(yaw-math.pi/2) + obj:set_yaw(yaw-math.pi/2) local le = obj:get_luaentity() le._shooter = shooter le._damage = damage le._startpos = pos minetest.sound_play("mcl_bows_bow_shoot", {pos=pos}) - if shooter ~= nil then + if shooter ~= nil and shooter:is_player() then if obj:get_luaentity().player == "" then obj:get_luaentity().player = shooter end @@ -95,10 +97,10 @@ end -- Bow item, uncharged state minetest.register_tool("mcl_bows:bow", { - description = "Bow", - _doc_items_longdesc = [[Bows are ranged weapons to shoot arrows at your foes. -The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.]], - _doc_items_usagehelp = [[To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.]], + description = S("Bow"), + _doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes.").."\n".. +S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead."), + _doc_items_usagehelp = S("To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot."), _doc_items_durability = BOW_DURABILITY, inventory_image = "mcl_bows_bow.png", stack_max = 1, @@ -138,7 +140,7 @@ end -- Bow in charging state for level=0, 2 do minetest.register_tool("mcl_bows:bow_"..level, { - description = "Bow", + description = S("Bow"), _doc_items_create_entry = false, inventory_image = "mcl_bows_bow_"..level..".png", stack_max = 1, diff --git a/mods/ITEMS/mcl_bows/depends.txt b/mods/ITEMS/mcl_bows/depends.txt index 736cd117a..08132ddbf 100644 --- a/mods/ITEMS/mcl_bows/depends.txt +++ b/mods/ITEMS/mcl_bows/depends.txt @@ -1,7 +1,6 @@ controls awards? mcl_achievements? -mcl_hunger? mcl_core? mcl_mobitems? playerphysics? diff --git a/mods/ITEMS/mcl_bows/locale/mcl_bows.de.tr b/mods/ITEMS/mcl_bows/locale/mcl_bows.de.tr new file mode 100644 index 000000000..4ca45c0e1 --- /dev/null +++ b/mods/ITEMS/mcl_bows/locale/mcl_bows.de.tr @@ -0,0 +1,11 @@ +# textdomain: mcl_bows +Arrow=Pfeil +Arrows are ammunition for bows and dispensers.=Pfeile sind Munition für Bögen und Werfer. +An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Ein Bogen von einem Pfeil richtet regulär 1-9 Schaden an. Mit voller Zugkraft gibt es eine 20%-ige Chance auf einen kritischen Treffer mit 10 Schaden. Ein Pfeil aus einem Werfer richtet immer 3 Schaden an. +Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Pfeile können in festen Blöcken stecken bleiben und wieder aufgesammelt werden. Sie können auf Holzknöpfe drücken. +To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Um Pfeile als Munition für dne Bogen zu benutzen, platzieren Sie sie einfach irgendwo im Inventar, sie werden automatisch benutzt. Um Pfeile als Munition für Werfer zu benutzen, platzieren Sie sie ins Inventar eines Werferr. Um einen steckengebliebenen Pfeil aufzusammeln, gehen Sie einfach zu ihm hin. +Bow=Bogen +Bows are ranged weapons to shoot arrows at your foes.=Bogen sind Fernwaffen, um Pfeile auf Ihre Feinde zu schießen. +The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.=Die Geschwindigkeit und der Schaden des Bogens erhöht sich, je länger sie den Bogen spannen. Der reguläre Schaden des Pfeiles ist zwischen 1 und 9. Ist der Bogen voll gespannt, gibt es eine 20%-ig Change für einen kritischen Treffer, der 10 Schaden anrichtet. +To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Um den Bogen zu benutzen, muss sich im Inventar mindestens ein Pfeil befinden (außer im Kreativmodus). Halten sie die rechte Maustaste gedrückt zum Spannen, lassen Sie sie los zum Schießen. +Bow=Bogen diff --git a/mods/ITEMS/mcl_bows/locale/template.txt b/mods/ITEMS/mcl_bows/locale/template.txt new file mode 100644 index 000000000..c6c91b444 --- /dev/null +++ b/mods/ITEMS/mcl_bows/locale/template.txt @@ -0,0 +1,11 @@ +# textdomain: mcl_bows +Arrow= +Arrows are ammunition for bows and dispensers.= +An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.= +Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.= +To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.= +Bow= +Bows are ranged weapons to shoot arrows at your foes.= +The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.= +To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.= +Bow= diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index c5b45c4d4..9b25c21a5 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_buckets") + -- Minetest 0.4 mod: bucket -- See README.txt for licensing and other information. @@ -26,14 +28,14 @@ mcl_buckets.liquids = {} local sound_place = function(itemname, pos) local def = minetest.registered_nodes[itemname] if def and def.sounds and def.sounds.place then - minetest.sound_play(def.sounds.place, {gain=1.0, pos = pos}) + minetest.sound_play(def.sounds.place, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}) end end local sound_take = function(itemname, pos) local def = minetest.registered_nodes[itemname] if def and def.sounds and def.sounds.dug then - minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos}) + minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}) end end @@ -182,9 +184,9 @@ function mcl_buckets.register_liquid(source_place, source_take, itemname, invent end minetest.register_craftitem("mcl_buckets:bucket_empty", { - description = "Empty Bucket", - _doc_items_longdesc = "A bucket can be used to collect and release liquids.", - _doc_items_usagehelp = "Punch a liquid source to collect the liquid. With the filled bucket, you can right-click somewhere to empty the bucket which will create a liquid source at the position you've clicked at.", + description = S("Empty Bucket"), + _doc_items_longdesc = S("A bucket can be used to collect and release liquids."), + _doc_items_usagehelp = S("Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else."), inventory_image = "bucket.png", stack_max = 16, @@ -302,9 +304,9 @@ if mod_mcl_core then {"mcl_core:lava_source", "mcl_nether:nether_lava_source"}, "mcl_buckets:bucket_lava", "bucket_lava.png", - "Lava Bucket", - "A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.", - "Choose a place where you want to empty the bucket, then get in a safe spot somewhere above it. Be prepared to run away when something goes wrong as the lava will soon start to flow after placing. To empty the bucket (which places a lava source), right-click on your chosen place." + S("Lava Bucket"), + S("A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution."), + S("Get in a safe distance and place the bucket to empty it and create a lava source at this spot. Don't burn yourself!") ) -- Water bucket @@ -313,9 +315,9 @@ if mod_mcl_core then {"mcl_core:water_source"}, "mcl_buckets:bucket_water", "bucket_water.png", - "Water Bucket", - "A bucket can be used to collect and release liquids. This one is filled with water.", - "Right-click on any block to empty the bucket and put a water source on this spot.", + S("Water Bucket"), + S("A bucket can be used to collect and release liquids. This one is filled with water."), + S("Place it to empty the bucket and create a water source."), function(pos, placer) -- Check protection local placer_name = "" @@ -355,9 +357,9 @@ if mod_mclx_core then {"mclx_core:river_water_source"}, "mcl_buckets:bucket_river_water", "bucket_river_water.png", - "River Water Bucket", - "A bucket can be used to collect and release liquids. This one is filled with river water.", - "Right-click on any block to empty the bucket and put a river water source on this spot.", + S("River Water Bucket"), + S("A bucket can be used to collect and release liquids. This one is filled with river water."), + S("Place it to empty the bucket and create a river water source."), function(pos, placer) -- Check protection local placer_name = "" diff --git a/mods/ITEMS/mcl_buckets/locale/mcl_buckets.de.tr b/mods/ITEMS/mcl_buckets/locale/mcl_buckets.de.tr new file mode 100644 index 000000000..26bb4ca4c --- /dev/null +++ b/mods/ITEMS/mcl_buckets/locale/mcl_buckets.de.tr @@ -0,0 +1,13 @@ +# textdomain: mcl_buckets +Empty Bucket=Leerer Eimer +A bucket can be used to collect and release liquids.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen. +Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else.=Hauen Sie auf eine Flüssigkeitsquelle, um sie aufzusammeln. Sie können den vollen Eimer dann benutzen, um die Flüssigkeit woanders zu platzieren. +Lava Bucket=Lavaeimer +A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen. Dieser hier ist voller heißer Lava, die sicher in ihm verstaut ist. Mit Vorsicht zu handhaben. +Get in a safe distance and place the bucket to empty it and create a lava source at this spot. Don't burn yourself!=Gehen Sie zu einer sicheren Stelle und platzieren Sie den Eimer, um ihn zu leeren und eine Lavaquelle an dieser Stelle zu erzeugen. Verbrennen Sie sich nicht! +Water Bucket=Wassereimer +A bucket can be used to collect and release liquids. This one is filled with water.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen. Dieser hier ist mit Wasser gefüllt. +Place it to empty the bucket and create a water source.=Platzieren Sie ihn, um den Eimer zu leeren und eine Wasserquelle zu erzeugen. +River Water Bucket=Flusswassereimer +A bucket can be used to collect and release liquids. This one is filled with river water.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen. Dieser hier ist mit Flusswasser gefüllt. +Place it to empty the bucket and create a river water source.=Platzieren Sie ihn, um den Eimer zu leeren und eine Flusswasserquelle zu erzeugen. diff --git a/mods/ITEMS/mcl_buckets/locale/template.txt b/mods/ITEMS/mcl_buckets/locale/template.txt new file mode 100644 index 000000000..6ad479fee --- /dev/null +++ b/mods/ITEMS/mcl_buckets/locale/template.txt @@ -0,0 +1,13 @@ +# textdomain: mcl_buckets +Empty Bucket= +A bucket can be used to collect and release liquids.= +Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else.= +Lava Bucket= +A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.= +Get in a safe distance and place the bucket to empty it and create a lava source at this spot. Don't burn yourself!= +Water Bucket= +A bucket can be used to collect and release liquids. This one is filled with water.= +Place it to empty the bucket and create a water source.= +River Water Bucket= +A bucket can be used to collect and release liquids. This one is filled with river water.= +Place it to empty the bucket and create a river water source.= diff --git a/mods/ITEMS/mcl_cake/init.lua b/mods/ITEMS/mcl_cake/init.lua index ca6f7a556..f3cc02329 100644 --- a/mods/ITEMS/mcl_cake/init.lua +++ b/mods/ITEMS/mcl_cake/init.lua @@ -3,6 +3,8 @@ #!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!# ]]-- +local S = minetest.get_translator("mcl_cake") + local cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"} local slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16} local slice_2 = { -7/16, -8/16, -7/16, -3/16, 0/16, 7/16} @@ -28,9 +30,9 @@ minetest.register_craft({ }) minetest.register_node("mcl_cake:cake", { - description = "Cake", - _doc_items_longdesc = "Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken.", - _doc_items_usagehelp = "Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full.", + description = S("Cake"), + _doc_items_longdesc = S("Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken."), + _doc_items_usagehelp = S("Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full."), tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"}, inventory_image = "cake.png", wield_image = "cake.png", @@ -134,9 +136,9 @@ local register_slice = function(level, nodebox, desc) end end -register_slice(6, slice_6, "Cake (6 Slices Left)") -register_slice(5, slice_5, "Cake (5 Slices Left)") -register_slice(4, slice_4, "Cake (4 Slices Left)") -register_slice(3, slice_3, "Cake (3 Slices Left)") -register_slice(2, slice_2, "Cake (2 Slices Left)") -register_slice(1, slice_1, "Cake (1 Slice Left)") +register_slice(6, slice_6, S("Cake (6 Slices Left)")) +register_slice(5, slice_5, S("Cake (5 Slices Left)")) +register_slice(4, slice_4, S("Cake (4 Slices Left)")) +register_slice(3, slice_3, S("Cake (3 Slices Left)")) +register_slice(2, slice_2, S("Cake (2 Slices Left)")) +register_slice(1, slice_1, S("Cake (1 Slice Left)")) diff --git a/mods/ITEMS/mcl_cake/locale/mcl_cake.de.tr b/mods/ITEMS/mcl_cake/locale/mcl_cake.de.tr new file mode 100644 index 000000000..204f0d4a2 --- /dev/null +++ b/mods/ITEMS/mcl_cake/locale/mcl_cake.de.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_cake +Cake=Kuchen +Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken.=Kuchen können platziert und gegessen werden, um Hungerpunkte wiederherzustellen. Ein Kuchen hat 7 Stücke. Jedes Stück stellt 2 Hungerpunkte und 0,4 Sättigungspunkte wieder her. Kuchen werden zerstört, wenn sie abgebaut werden oder der Block unter ihnen bricht. +Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full.=Platzieren Sie ihn irgendwo, dann rechtsklicken Sie auf ihn, um ein Stück zu essen. Sie können nicht vom Kuchen naschen, wenn ihre Hungerleiste voll ist. +Cake (6 Slices Left)=Kuchen (6 Stücke übrig) +Cake (5 Slices Left)=Kuchen (5 Stücke übrig) +Cake (4 Slices Left)=Kuchen (4 Stücke übrig) +Cake (3 Slices Left)=Kuchen (3 Stücke übrig) +Cake (2 Slices Left)=Kuchen (2 Stücke übrig) +Cake (1 Slice Left)=Kuchen (1 Stück übrig) diff --git a/mods/ITEMS/mcl_cake/locale/template.txt b/mods/ITEMS/mcl_cake/locale/template.txt new file mode 100644 index 000000000..921f9612b --- /dev/null +++ b/mods/ITEMS/mcl_cake/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: mcl_cake +Cake= +Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken.= +Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full.= +Cake (6 Slices Left)= +Cake (5 Slices Left)= +Cake (4 Slices Left)= +Cake (3 Slices Left)= +Cake (2 Slices Left)= +Cake (1 Slice Left)= diff --git a/mods/ITEMS/mcl_cauldrons/init.lua b/mods/ITEMS/mcl_cauldrons/init.lua index 0b447155c..68c507ce7 100644 --- a/mods/ITEMS/mcl_cauldrons/init.lua +++ b/mods/ITEMS/mcl_cauldrons/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_cauldron") + -- Cauldron mod, adds cauldrons. -- TODO: Extinguish fire of burning entities @@ -42,9 +44,9 @@ end -- Empty cauldron minetest.register_node("mcl_cauldrons:cauldron", { - description = "Cauldron", - _doc_items_longdesc = "Cauldrons are used to store water and slowly fill up under rain. They can also be used to wash off banners.", - _doc_items_usagehelp = "Place a water pucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water. Use an emblazoned banner on a cauldron with water to wash off its top layer.", + description = S("Cauldron"), + _doc_items_longdesc = S("Cauldrons are used to store water and slowly fill up under rain."), + _doc_items_usagehelp = S("Place a water pucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water."), wield_image = "mcl_cauldrons_cauldron.png", inventory_image = "mcl_cauldrons_cauldron.png", drawtype = "nodebox", @@ -101,14 +103,14 @@ local register_filled_cauldron = function(water_level, description, river_water) end -- Filled cauldrons (3 levels) -register_filled_cauldron(1, "Cauldron (1/3 Water)") -register_filled_cauldron(2, "Cauldron (2/3 Water)") -register_filled_cauldron(3, "Cauldron (3/3 Water)") +register_filled_cauldron(1, S("Cauldron (1/3 Water)")) +register_filled_cauldron(2, S("Cauldron (2/3 Water)")) +register_filled_cauldron(3, S("Cauldron (3/3 Water)")) if minetest.get_modpath("mclx_core") then - register_filled_cauldron(1, "Cauldron (1/3 River Water)", true) - register_filled_cauldron(2, "Cauldron (2/3 River Water)", true) - register_filled_cauldron(3, "Cauldron (3/3 River Water)", true) + register_filled_cauldron(1, S("Cauldron (1/3 River Water)"), true) + register_filled_cauldron(2, S("Cauldron (2/3 River Water)"), true) + register_filled_cauldron(3, S("Cauldron (3/3 River Water)"), true) end minetest.register_craft({ diff --git a/mods/ITEMS/mcl_cauldrons/locale/mcl_cauldrons.de.tr b/mods/ITEMS/mcl_cauldrons/locale/mcl_cauldrons.de.tr new file mode 100644 index 000000000..0e3a4c41d --- /dev/null +++ b/mods/ITEMS/mcl_cauldrons/locale/mcl_cauldrons.de.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_cauldron +Cauldron=Kessel +Cauldrons are used to store water and slowly fill up under rain.=Kessel werden benutzt, um Wasser zu lagern, im Regen werden sie langsam aufgefüllt. +Place a water pucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water.=Platzieren Sie einen Wassereinmer in den Kessel, um ihn mit Wasser zu füllen. Platzieren Sie einen leeren Eimer auf einen vollen Kessel, um das Wasser aufzusammeln. Platzieren Sie eine Wasserflasche in den Kessel, um ihn zu einem Drittel mit Wasser zu füllen. +Cauldron (1/3 Water)=Kessel (1/3 Wasser) +Cauldron (2/3 Water)=Kessel (2/3 Wasser) +Cauldron (3/3 Water)=Kessel (3/3 Wasser) +Cauldron (1/3 River Water)=Kessel (1/3 Wasser) +Cauldron (2/3 River Water)=Kessel (2/3 Flusswasser) +Cauldron (3/3 River Water)=Kessel (3/3 Flusswasser) diff --git a/mods/ITEMS/mcl_cauldrons/locale/template.txt b/mods/ITEMS/mcl_cauldrons/locale/template.txt new file mode 100644 index 000000000..426d7d69c --- /dev/null +++ b/mods/ITEMS/mcl_cauldrons/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: mcl_cauldron +Cauldron= +Cauldrons are used to store water and slowly fill up under rain. They can also be used to wash off banners.= +Place a water pucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water. Use an emblazoned banner on a cauldron with water to wash off its top layer.= +Cauldron (1/3 Water)= +Cauldron (2/3 Water)= +Cauldron (3/3 Water)= +Cauldron (1/3 River Water)= +Cauldron (2/3 River Water)= +Cauldron (3/3 River Water)= diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index 57c991ce3..39af9a21c 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -1,3 +1,6 @@ +local S = minetest.get_translator("mcl_chests") +local mod_doc = minetest.get_modpath("doc") + local no_rotate, simple_rotate if minetest.get_modpath("screwdriver") then no_rotate = screwdriver.disallow @@ -37,13 +40,8 @@ end local trapped_chest_mesecons_rules = mesecon.rules.pplate --- To be called if a player closed a chest -local player_chest_close = function(player) - local name = player:get_player_name() - if open_chests[name] == nil then - return - end - local pos = open_chests[name].pos +-- To be called when a chest is closed (only relevant for trapped chest atm) +local chest_update_after_close = function(pos) local node = minetest.get_node(pos) if node.name == "mcl_chests:trapped_chest_on" then @@ -64,20 +62,32 @@ local player_chest_close = function(player) minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_left", param2 = node.param2}) mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules) end +end + +-- To be called if a player closed a chest +local player_chest_close = function(player) + local name = player:get_player_name() + if open_chests[name] == nil then + return + end + local pos = open_chests[name].pos + chest_update_after_close(pos) open_chests[name] = nil end -- This is a helper function to register both chests and trapped chests. Trapped chests will make use of the additional parameters -local register_chest = function(basename, desc, longdesc, usagehelp, tiles_table, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop, formspec_basename) +local register_chest = function(basename, desc, longdesc, usagehelp, tiles_table, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop, canonical_basename) -- START OF register_chest FUNCTION BODY if not drop then drop = "mcl_chests:"..basename else drop = "mcl_chests:"..drop end -if not formspec_basename then - formspec_basename = basename +-- The basename of the "canonical" version of the node, if set (e.g.: trapped_chest_on → trapped_chest). +-- Used to get a shared formspec ID and to swap the node back to the canonical version in on_construct. +if not canonical_basename then + canonical_basename = basename end minetest.register_node("mcl_chests:"..basename, { @@ -118,14 +128,16 @@ minetest.register_node("mcl_chests:"..basename, { -- BEGIN OF LISTRING WORKAROUND inv:set_size("input", 1) -- END OF LISTRING WORKAROUND - if minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "right")).name == "mcl_chests:"..basename then - minetest.swap_node(pos, {name="mcl_chests:"..basename.."_right",param2=param2}) + if minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "right")).name == "mcl_chests:"..canonical_basename then + minetest.swap_node(pos, {name="mcl_chests:"..canonical_basename.."_right",param2=param2}) local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right") - minetest.swap_node(p, { name = "mcl_chests:"..basename.."_left", param2 = param2 }) - elseif minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "left")).name == "mcl_chests:"..basename then - minetest.swap_node(pos, {name="mcl_chests:"..basename.."_left",param2=param2}) + minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_left", param2 = param2 }) + elseif minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "left")).name == "mcl_chests:"..canonical_basename then + minetest.swap_node(pos, {name="mcl_chests:"..canonical_basename.."_left",param2=param2}) local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left") - minetest.swap_node(p, { name = "mcl_chests:"..basename.."_right", param2 = param2 }) + minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_right", param2 = param2 }) + else + minetest.swap_node(pos, { name = "mcl_chests:"..canonical_basename, param2 = param2 }) end end, after_dig_node = function(pos, oldnode, oldmetadata, digger) @@ -168,12 +180,13 @@ minetest.register_node("mcl_chests:"..basename, { on_rightclick = function(pos, node, clicker) minetest.show_formspec(clicker:get_player_name(), - "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, + "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, "size[9,8.75]".. mcl_vars.inventory_header.. "background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]".. - "image[0,-0.2;5,0.75;mcl_chests_fnt_chest.png]".. + "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Chest"))).."]".. "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]".. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. "listring[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main]".. @@ -187,7 +200,7 @@ minetest.register_node("mcl_chests:"..basename, { on_destruct = function(pos) local players = minetest.get_connected_players() for p=1, #players do - minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) + minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) end end, mesecons = mesecons, @@ -202,6 +215,15 @@ minetest.register_node("mcl_chests:"..basename.."_left", { drop = drop, is_ground_content = false, sounds = mcl_sounds.node_sound_wood_defaults(), + on_construct = function(pos) + local n = minetest.get_node(pos) + local param2 = n.param2 + local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left") + if not p or minetest.get_node(p).name ~= "mcl_chests:"..canonical_basename.."_right" then + n.name = "mcl_chests:"..canonical_basename + minetest.swap_node(pos, n) + end + end, on_destruct = function(pos) local n = minetest.get_node(pos) if n.name == "mcl_chests:"..basename then @@ -210,7 +232,7 @@ minetest.register_node("mcl_chests:"..basename.."_left", { local players = minetest.get_connected_players() for p=1, #players do - minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) + minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) end local param2 = n.param2 @@ -218,6 +240,9 @@ minetest.register_node("mcl_chests:"..basename.."_left", { if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_right" then return end + for pl=1, #players do + minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z) + end minetest.swap_node(p, { name = "mcl_chests:"..basename, param2 = param2 }) end, after_dig_node = function(pos, oldnode, oldmetadata, digger) @@ -290,12 +315,14 @@ minetest.register_node("mcl_chests:"..basename.."_left", { local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left") minetest.show_formspec(clicker:get_player_name(), - "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, + "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, "size[9,11.5]".. "background[-0.19,-0.25;9.41,12.5;mcl_chests_inventory_chest_large.png]".. mcl_vars.inventory_header.. + "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Large Chest"))).."]".. "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]".. "list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,3.5;9,3;]".. + "label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,7.5;9,3;9]".. "list[current_player;main;0,10.75;9,1;]".. -- BEGIN OF LISTRING WORKAROUND @@ -323,6 +350,15 @@ minetest.register_node("mcl_chests:"..basename.."_right", { drop = drop, is_ground_content = false, sounds = mcl_sounds.node_sound_wood_defaults(), + on_construct = function(pos) + local n = minetest.get_node(pos) + local param2 = n.param2 + local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right") + if not p or minetest.get_node(p).name ~= "mcl_chests:"..canonical_basename.."_left" then + n.name = "mcl_chests:"..canonical_basename + minetest.swap_node(pos, n) + end + end, on_destruct = function(pos) local n = minetest.get_node(pos) if n.name == "mcl_chests:"..basename then @@ -331,7 +367,7 @@ minetest.register_node("mcl_chests:"..basename.."_right", { local players = minetest.get_connected_players() for p=1, #players do - minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) + minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) end local param2 = n.param2 @@ -339,6 +375,9 @@ minetest.register_node("mcl_chests:"..basename.."_right", { if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_left" then return end + for pl=1, #players do + minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z) + end minetest.swap_node(p, { name = "mcl_chests:"..basename, param2 = param2 }) end, after_dig_node = function(pos, oldnode, oldmetadata, digger) @@ -411,13 +450,15 @@ minetest.register_node("mcl_chests:"..basename.."_right", { local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right") minetest.show_formspec(clicker:get_player_name(), - "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, + "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, "size[9,11.5]".. "background[-0.19,-0.25;9.41,12.5;mcl_chests_inventory_chest_large.png]".. mcl_vars.inventory_header.. + "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Large Chest"))).."]".. "list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,0.5;9,3;]".. "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,3.5;9,3;]".. + "label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,7.5;9,3;9]".. "list[current_player;main;0,10.75;9,1;]".. -- BEGIN OF LISTRING WORKAROUND @@ -437,7 +478,7 @@ minetest.register_node("mcl_chests:"..basename.."_right", { on_rotate = no_rotate, }) -if minetest.get_modpath("doc") then +if mod_doc then doc.add_entry_alias("nodes", "mcl_chests:"..basename, "nodes", "mcl_chests:"..basename.."_left") doc.add_entry_alias("nodes", "mcl_chests:"..basename, "nodes", "mcl_chests:"..basename.."_right") end @@ -445,10 +486,12 @@ end -- END OF register_chest FUNCTION BODY end +local chestusage = S("To access its inventory, rightclick it. When broken, the items will drop out.") + register_chest("chest", - "Chest", - "Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.", - "To access the chest's inventory, rightclick the chest. When broken, the items of the chest will drop out.", + S("Chest"), + S("Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other."), + chestusage, { small = {"default_chest_top.png", "mcl_chests_chest_bottom.png", "mcl_chests_chest_right.png", "mcl_chests_chest_left.png", @@ -476,9 +519,9 @@ local traptiles = { } register_chest("trapped_chest", - "Trapped Chest", - "A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.", - "To access the inventory of a trapped chest, rightclick it. When broken, the items will drop out.", + S("Trapped Chest"), + S("A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other."), + chestusage, traptiles, nil, {receptor = { @@ -599,9 +642,9 @@ minetest.register_craft({ }) minetest.register_node("mcl_chests:ender_chest", { - description = "Ender Chest", - _doc_items_longdesc = "Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players.", - _doc_items_usagehelp = "Rightclick the ender chest to access your personal interdimensional inventory.", + description = S("Ender Chest"), + _doc_items_longdesc = S("Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players."), + _doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."), tiles = {"mcl_chests_ender_chest_top.png", "mcl_chests_ender_chest_bottom.png", "mcl_chests_ender_chest_right.png", "mcl_chests_ender_chest_left.png", "mcl_chests_ender_chest_back.png", "mcl_chests_ender_chest_front.png"}, @@ -620,8 +663,9 @@ minetest.register_node("mcl_chests:ender_chest", { "size[9,8.75]".. mcl_vars.inventory_header.. "background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]".. - "image[0,-0.2;5,0.75;mcl_chests_fnt_ender_chest.png]".. + "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Ender Chest"))).."]".. "list[current_player;enderchest;0,0.5;9,3;]".. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. "listring[current_player;enderchest]".. @@ -632,6 +676,16 @@ minetest.register_node("mcl_chests:ender_chest", { on_rotate = simple_rotate, }) +minetest.register_lbm({ + label = "Update ender chest + shulker box formspecs (0.51.0)", + name = "mcl_chests:update_formspecs_0_51_0", + nodenames = { "mcl_chests:ender_chest", "group:shulker_box" }, + action = function(pos, node) + minetest.registered_nodes[node.name].on_construct(pos) + minetest.log("action", "[mcl_chests] Node formspec updated at "..minetest.pos_to_string(pos)) + end, +}) + minetest.register_on_joinplayer(function(player) local inv = player:get_inventory() inv:set_size("enderchest", 9*3) @@ -648,22 +702,22 @@ minetest.register_craft({ -- Shulker boxes local boxtypes = { - white = "White Shulker Box", - grey = "Light Grey Shulker Box", - orange = "Orange Shulker Box", - cyan = "Cyan Shulker Box", - magenta = "Magenta Shulker Box", - violet = "Purple Shulker Box", - lightblue = "Light Blue Shulker Box", - blue = "Blue Shulker Box", - yellow = "Yellow Shulker Box", - brown = "Brown Shulker Box", - green = "Lime Shulker Box", - dark_green = "Green Shulker Box", - pink = "Pink Shulker Box", - red = "Red Shulker Box", - dark_grey = "Grey Shulker Box", - black = "Black Shulker Box", + white = S("White Shulker Box"), + grey = S("Light Grey Shulker Box"), + orange = S("Orange Shulker Box"), + cyan = S("Cyan Shulker Box"), + magenta = S("Magenta Shulker Box"), + violet = S("Purple Shulker Box"), + lightblue = S("Light Blue Shulker Box"), + blue = S("Blue Shulker Box"), + yellow = S("Yellow Shulker Box"), + brown = S("Brown Shulker Box"), + green = S("Lime Shulker Box"), + dark_green = S("Green Shulker Box"), + pink = S("Pink Shulker Box"), + red = S("Red Shulker Box"), + dark_grey = S("Grey Shulker Box"), + black = S("Black Shulker Box"), } local shulker_mob_textures = { @@ -684,13 +738,28 @@ local shulker_mob_textures = { dark_grey = "mobs_mc_shulker_gray.png", black = "mobs_mc_shulker_black.png", } +local canonical_shulker_color = "violet" for color, desc in pairs(boxtypes) do local mob_texture = shulker_mob_textures[color] + local is_canonical = color == canonical_shulker_color + local longdesc, usagehelp, create_entry, entry_name + if mod_doc then + if is_canonical then + longdesc = S("A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.") + usagehelp = S("To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out.") + entry_name = S("Shulker Box") + else + create_entry = false + end + end + minetest.register_node("mcl_chests:"..color.."_shulker_box", { description = desc, - _doc_items_longdesc = "A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.", - _doc_items_usagehelp = "To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out. Place the shulker box again to be able to retrieve its contents.", + _doc_items_create_entry = create_entry, + _doc_items_entry_name = entry_name, + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usagehelp, tiles = { "mcl_chests_"..color.."_shulker_box_top.png", -- top "[combine:16x16:-32,-28="..mob_texture, -- bottom @@ -715,8 +784,9 @@ for color, desc in pairs(boxtypes) do "size[9,8.75]".. mcl_vars.inventory_header.. "background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]".. - "image[0,-0.2;5,0.75;mcl_chests_fnt_shulker_box.png]".. + "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Shulker Box"))).."]".. "list[current_name;main;0,0.5;9,3;]".. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. "listring[current_name;main]".. @@ -793,6 +863,10 @@ for color, desc in pairs(boxtypes) do _mcl_hardness = 6, }) + if mod_doc and not is_canonical then + doc.add_entry_alias("nodes", "mcl_chests:"..canonical_shulker_color.."_shulker_box", "nodes", "mcl_chests:"..color.."_shulker_box") + end + minetest.register_craft({ type = "shapeless", output = 'mcl_chests:'..color..'_shulker_box', @@ -809,3 +883,16 @@ minetest.register_craft({ } }) +minetest.register_lbm({ + -- Disable active/open trapped chests when loaded because nobody could + -- have them open at loading time. + -- Fixes redstone weirdness. + label = "Disable active trapped chests", + name = "mcl_chests:reset_trapped_chests", + nodenames = { "mcl_chests:trapped_chest_on", "mcl_chests:trapped_chest_on_left", "mcl_chests:trapped_chest_on_right" }, + run_at_every_load = true, + action = function(pos, node) + minetest.log("error", "lbm!" ..minetest.pos_to_string(pos)) + chest_update_after_close(pos) + end, +}) diff --git a/mods/ITEMS/mcl_chests/locale/mcl_chests.de.tr b/mods/ITEMS/mcl_chests/locale/mcl_chests.de.tr new file mode 100644 index 000000000..2fac283e9 --- /dev/null +++ b/mods/ITEMS/mcl_chests/locale/mcl_chests.de.tr @@ -0,0 +1,30 @@ +# textdomain: mcl_chests +Chest=Truhe +Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.=Truhen sind Behälter, die 27 Inventarplätze Platz bieten. Truhen verwandeln sich in große Truhen mit der doppelten Kapazität, wenn zwei Truhen nebeneinander platziert werden. +To access its inventory, rightclick it. When broken, the items will drop out.=Um auf das Inventar zuzugreifen, rechtsklicken Sie darauf. Wenn abgebaut, wird der Inhalt hinausfallen. +Trapped Chest=Mechanismustruhe +A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.=Mechanismustruhen sind Behälter, die 27 Inventarplätze Platz bieten. Wenn sie geöffnet wird, sendet sie ein Redstone-Signal zu benachbarten Blöcken, solange sie geöffnet bleibt. Mechanismustruhen verwandeln sich in große Mechanismustruhen mit der doppelten Kapazität, wenn zwei Mechanismustruhen nebeneinander platziert werden. +Ender Chest=Endertruhe +Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players.=Endertruhen gewähren Ihnen Zugriff zu einem einzigartigen persönlichen interdimensionalen Inventar mit 27 Plätzen. Dieses Inventar ist das selbe, egal, welche Endertruhe sie benutzen. Wenn Sie einen Gegenstand in eine Endertruhe platzieren, werden Sie sie in allen anderen Endertruhen vorhinden. Jeder Spieler wird nur seine eigenen Gegenstände sehen, aber nicht die der anderen Spieler. +Rightclick the ender chest to access your personal interdimensional inventory.=Rechtsklicken Sie die Endertruhe, um auf Ihr persönliches interdimensionales Inventar zuzugreifen. +White Shulker Box=Weiße Schulkerkiste +Light Grey Shulker Box=Hellgraue Schulkerkiste +Orange Shulker Box=Orange Schulkerkiste +Cyan Shulker Box=Türkise Schulkerkiste +Magenta Shulker Box=Magenta Schulkerkiste +Purple Shulker Box=Violette Schulkerkiste +Light Blue Shulker Box=Hellblaue Schulkerkiste +Blue Shulker Box=Blaue Schulkerkiste +Yellow Shulker Box=Gelbe Schulkerkiste +Brown Shulker Box=Braune Schulkerkiste +Lime Shulker Box=Lindgrüne Schulkerkiste +Green Shulker Box=Grüne Schulkerkiste +Pink Shulker Box=Rosa Schulkerkiste +Red Shulker Box=Rote Schulkerkiste +Grey Shulker Box=Graue Schulkerkiste +Black Shulker Box=Schwarze Schulkerkiste +A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.=Eine Schulkerkiste ist ein tragbarer Behälter, der 27 Inventarplätze für alle Gegenstände außer Schulkerkisten bietet. Schulkerkisten behalten ihr Inventar, wenn sie abgebaut werden, also können Schulkerkisten so wie ihr Inhalt als einzelne Gegenstände mitgenommen werden. Schulkerkisten gibt es in vielen verschiedenen Farben. +To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out.=Um auf das Inventar einer Schulkerkiste zuzugreifen, platzieren Sie sie und rechtsklicken sie auf ihr. Um eine Schulkerkiste und ihren Inhalt mitzunehmen, bauen Sie sie einfach ab und sammeln Sie sie auf, der Inhalt will nicht hinausfallen. +Shulker Box=Schulkerkiste +Large Chest=Große Truhe +Inventory=Inventar diff --git a/mods/ITEMS/mcl_chests/locale/template.txt b/mods/ITEMS/mcl_chests/locale/template.txt new file mode 100644 index 000000000..14254c14d --- /dev/null +++ b/mods/ITEMS/mcl_chests/locale/template.txt @@ -0,0 +1,30 @@ +# textdomain: mcl_chests +Chest= +Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.= +To access its inventory, rightclick it. When broken, the items will drop out.= +Trapped Chest= +A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.= +Ender Chest= +Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players.= +Rightclick the ender chest to access your personal interdimensional inventory.= +White Shulker Box= +Light Grey Shulker Box= +Orange Shulker Box= +Cyan Shulker Box= +Magenta Shulker Box= +Purple Shulker Box= +Light Blue Shulker Box= +Blue Shulker Box= +Yellow Shulker Box= +Brown Shulker Box= +Lime Shulker Box= +Green Shulker Box= +Pink Shulker Box= +Red Shulker Box= +Grey Shulker Box= +Black Shulker Box= +A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.= +To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out. Place the shulker box again to be able to retrieve its contents.= +Shulker Box= +Large Chest= +Inventory= diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_chest.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_chest.png deleted file mode 100644 index e57e7efbc..000000000 Binary files a/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_chest.png and /dev/null differ diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_ender_chest.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_ender_chest.png deleted file mode 100644 index b470cfd13..000000000 Binary files a/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_ender_chest.png and /dev/null differ diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_shulker_box.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_shulker_box.png deleted file mode 100644 index aa2aad61b..000000000 Binary files a/mods/ITEMS/mcl_chests/textures/mcl_chests_fnt_shulker_box.png and /dev/null differ diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest.png index 01cac2321..eba521e90 100644 Binary files a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest.png and b/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest.png differ diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest_large.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest_large.png index bb7b96afb..bace59eda 100644 Binary files a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest_large.png and b/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest_large.png differ diff --git a/mods/ITEMS/mcl_clock/init.lua b/mods/ITEMS/mcl_clock/init.lua index 0f0b8461a..2e2d1b00a 100644 --- a/mods/ITEMS/mcl_clock/init.lua +++ b/mods/ITEMS/mcl_clock/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_clock") + --[[ mcl_clock, renew of the renew of the watch mod @@ -54,11 +56,11 @@ function watch.register_item(name, image, creative, frame) end local longdesc, usagehelp if use_doc then - longdesc = "Clocks are tools which shows the current time of day in the Overworld." - usagehelp = "The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol." + longdesc = S("Clocks are tools which shows the current time of day in the Overworld.") + usagehelp = S("The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol.") end minetest.register_craftitem(name, { - description = "Clock", + description = S("Clock"), _doc_items_create_entry = use_doc, _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, diff --git a/mods/ITEMS/mcl_clock/locale/mcl_clock.de.tr b/mods/ITEMS/mcl_clock/locale/mcl_clock.de.tr new file mode 100644 index 000000000..f80daa416 --- /dev/null +++ b/mods/ITEMS/mcl_clock/locale/mcl_clock.de.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_clock +Clocks are tools which shows the current time of day in the Overworld.=Uhren sind Werkzeuge, die die Tageszeit in der Oberwelt anzeigen. +The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol.=Die Uhr enthält eine rotierende Scheibe mit einem Sonnensymbol (gelbe Scheibe) und einem Mondsymbol, und sie hat einem kleinen „Pfeil“, der die jetzige Tageszeit anzeigt, indem die reale Position von Sonne und Mond im Himmel abgeschätzt wird. Die Sonne repräsentiert die Mittagszeit und der Mond repräsentiert Mitternacht. +Clock=Uhr diff --git a/mods/ITEMS/mcl_clock/locale/template.txt b/mods/ITEMS/mcl_clock/locale/template.txt new file mode 100644 index 000000000..07ff8cabc --- /dev/null +++ b/mods/ITEMS/mcl_clock/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mcl_clock +Clocks are tools which shows the current time of day in the Overworld.= +The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol.= +Clock= diff --git a/mods/ITEMS/mcl_cocoas/init.lua b/mods/ITEMS/mcl_cocoas/init.lua index fdd9f8c6e..ae9d5cf11 100644 --- a/mods/ITEMS/mcl_cocoas/init.lua +++ b/mods/ITEMS/mcl_cocoas/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_cocoas") + mcl_cocoas = {} -- Place cocoa @@ -70,9 +72,9 @@ end --[[ TODO: Use a mesh for cocoas for perfect texture compability. ]] local crop_def = { - description = "Premature Cocoa", + description = S("Premature Cocoa Pod"), _doc_items_create_entry = true, - _doc_items_longdesc = "Cocoas are plants which grow on the side of jungle trees in 3 stages.", + _doc_items_longdesc = S("Cocoa pods grow on the side of jungle trees in 3 stages."), drawtype = "nodebox", tiles = { "[combine:16x16:6,1=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:6,11=mcl_cocoas_cocoa_stage_0.png", @@ -115,7 +117,7 @@ local crop_def = { -- 2nd stage minetest.register_node("mcl_cocoas:cocoa_1", table.copy(crop_def)) -crop_def.description = "Medium Cocoa" +crop_def.description = S("Medium Cocoa Pod") crop_def._doc_items_create_entry = false crop_def.groups.cocoa = 2 crop_def.tiles = { @@ -146,8 +148,8 @@ crop_def.selection_box = { minetest.register_node("mcl_cocoas:cocoa_2", table.copy(crop_def)) -- Final stage -crop_def.description = "Mature Cocoa" -crop_def._doc_items_longdesc = "A mature cocoa is a plant which grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further." +crop_def.description = S("Mature Cocoa Pod") +crop_def._doc_items_longdesc = S("A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.") crop_def._doc_items_create_entry = true crop_def.groups.cocoa = 3 crop_def.tiles = { @@ -181,7 +183,7 @@ minetest.register_node("mcl_cocoas:cocoa_3", table.copy(crop_def)) minetest.register_abm({ - label = "Cocoa growth", + label = "Cocoa pod growth", nodenames = {"mcl_cocoas:cocoa_1", "mcl_cocoas:cocoa_2"}, -- Same as potatoes -- TODO: Tweak/balance the growth speed diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.de.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.de.tr new file mode 100644 index 000000000..479e3845e --- /dev/null +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.de.tr @@ -0,0 +1,6 @@ +# textdomain: mcl_cocoas +Premature Cocoa Pod=Junge Kakaoschote +Cocoa pods grow on the side of jungle trees in 3 stages.=Kakaoschoten wachsen an der Seite von Dschungelbäumen in 3 Stufen. +Medium Cocoa Pod=Mittelgroße Kakaoschote +Mature Cocoa Pod=Ausgewachsene Kakaoschote +A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.=Eine ausgewachsene Kakaoschote wuchs an einem Dschugelbaum zur vollen Größe heran. Sie ist erntereif und kann für Kakaobohnen geerntet werden. Sie wird nicht weiter wachsen. diff --git a/mods/ITEMS/mcl_cocoas/locale/template.txt b/mods/ITEMS/mcl_cocoas/locale/template.txt new file mode 100644 index 000000000..f68318cae --- /dev/null +++ b/mods/ITEMS/mcl_cocoas/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: mcl_cocoas +Premature Cocoa Pod= +Cocoa pods grow on the side of jungle trees in 3 stages.= +Medium Cocoa Pod= +Mature Cocoa Pod= +A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.= diff --git a/mods/ITEMS/mcl_colorblocks/depends.txt b/mods/ITEMS/mcl_colorblocks/depends.txt index 7f3fdc37e..c9db3b289 100644 --- a/mods/ITEMS/mcl_colorblocks/depends.txt +++ b/mods/ITEMS/mcl_colorblocks/depends.txt @@ -1,4 +1,5 @@ mcl_core mcl_sounds mcl_dye +doc? screwdriver? diff --git a/mods/ITEMS/mcl_colorblocks/init.lua b/mods/ITEMS/mcl_colorblocks/init.lua index 57e96e4d7..15c12ab37 100644 --- a/mods/ITEMS/mcl_colorblocks/init.lua +++ b/mods/ITEMS/mcl_colorblocks/init.lua @@ -1,34 +1,37 @@ local init = os.clock() +local S = minetest.get_translator("mcl_colorblocks") +local doc_mod = minetest.get_modpath("doc") local block = {} block.dyes = { - {"white", "White", "white"}, - {"grey", "Grey", "dark_grey"}, - {"silver", "Light Grey", "grey"}, - {"black", "Black", "black"}, - {"red", "Red", "red"}, - {"yellow", "Yellow", "yellow"}, - {"green", "Green", "dark_green"}, - {"cyan", "Cyan", "cyan"}, - {"blue", "Blue", "blue"}, - {"magenta", "Magenta", "magenta"}, - {"orange", "Orange", "orange"}, - {"purple", "Purple", "violet"}, - {"brown", "Brown", "brown"}, - {"pink", "Pink", "pink"}, - {"lime", "Lime", "green"}, - {"light_blue", "Light Blue", "lightblue"}, + {"white", S("White Terracotta"), S("White Glazed Terracotta"), S("White Concrete Powder"), S("White Concrete"), "white"}, + {"grey", S("Grey Terracotta"), S("Grey Glazed Terracotta"), S("Grey Concrete Powder"), S("Grey Concrete"), "dark_grey"}, + {"silver", S("Light Grey Terracotta"), S("Light Grey Glazed Terracotta"), S("Light Grey Concrete Powder"), S("Light Grey Concrete"), "grey"}, + {"black", S("Black Terracotta"), S("Black Glazed Terracotta"), S("Black Concrete Powder"), S("Black Concrete"), "black"}, + {"red", S("Red Terracotta"), S("Red Glazed Terracotta"), S("Red Concrete Powder"), S("Red Concrete"), "red"}, + {"yellow", S("Yellow Terracotta"), S("Yellow Glazed Terracotta"), S("Yellow Concrete Powder"), S("Yellow Concrete"), "yellow"}, + {"green", S("Green Terracotta"), S("Green Glazed Terracotta"), S("Green Concrete Powder"), S("Green Concrete"), "dark_green"}, + {"cyan", S("Cyan Terracotta"), S("Cyan Glazed Terracotta"), S("Cyan Concrete Powder"), S("Cyan Concrete"), "cyan"}, + {"blue", S("Blue Terracotta"), S("Blue Glazed Terracotta"), S("Blue Concrete Powder"), S("Blue Concrete"), "blue"}, + {"magenta", S("Magenta Terracotta"), S("Magenta Glazed Terracotta"), S("Magenta Concrete Powder"), S("Magenta Concrete"), "magenta"}, + {"orange", S("Orange Terracotta"), S("Orange Glazed Terracotta"), S("Orange Concrete Powder"), S("Orange Concrete"), "orange"}, + {"purple", S("Purple Terracotta"), S("Purple Glazed Terracotta"), S("Purple Concrete Powder"), S("Purple Concrete"), "violet"}, + {"brown", S("Brown Terracotta"), S("Brown Glazed Terracotta"), S("Brown Concrete Powder"), S("Brown Concrete"), "brown"}, + {"pink", S("Pink Terracotta"), S("Pink Glazed Terracotta"), S("Pink Concrete Powder"), S("Pink Concrete"), "pink"}, + {"lime", S("Lime Terracotta"), S("Lime Glazed Terracotta"), S("Lime Concrete Powder"), S("Lime Concrete"), "green"}, + {"light_blue", S("Light Blue Terracotta"), S("Light Blue Glazed Terracotta"), S("Light Blue Concrete Powder"), S("Light Blue Concrete"), "lightblue"}, } +local canonical_color = "yellow" -local hc_desc = "Terracotta is a basic building material. It comes in many different colors." -local gt_desc = "Glazed terracotta is a decorational block with a complex pattern. It can be rotated by placing it in different directions." -local cp_desc = "Concrete powder is used for creating concrete, but it can also be used as decoration itself. It comes in different colors. Concrete powder turns into concrete of the same color when it comes in contact with water." -local conc_desc = "Concrete is a decorational block which comes in many different colors. It is notable for having a very strong and clean color.", +local hc_desc = S("Terracotta is a basic building material. It comes in many different colors.") +local gt_desc = S("Glazed terracotta is a decorative block with a complex pattern. It can be rotated by placing it in different directions.") +local cp_desc = S("Concrete powder is used for creating concrete, but it can also be used as decoration itself. It comes in different colors. Concrete powder turns into concrete of the same color when it comes in contact with water.") +local c_desc = S("Concrete is a decorative block which comes in many different colors. It is notable for having a very strong and clean color.") minetest.register_node("mcl_colorblocks:hardened_clay", { - description = "Terracotta", - _doc_items_longdesc = "Terracotta is a basic building material.", + description = S("Terracotta"), + _doc_items_longdesc = S("Terracotta is a basic building material which comes in many different colors. This particular block is uncolored."), tiles = {"hardened_clay.png"}, stack_max = 64, groups = {pickaxey=1, hardened_clay=1,building_block=1, material_stone=1}, @@ -51,12 +54,33 @@ end for _, row in ipairs(block.dyes) do local name = row[1] - local desc = row[2] - local craft_color_group = row[3] + local is_canonical = name == canonical_color + local sdesc_hc = row[2] + local sdesc_gt = row[3] + local sdesc_cp = row[4] + local sdesc_c = row[5] + local ldesc_hc, ldesc_gt, ldesc_cp, ldesc_c + local create_entry + local ename_hc, ename_gt, ename_cp, ename_c + if is_canonical then + ldesc_hc = hc_desc + ldesc_gt = gt_desc + ldesc_cp = cp_desc + ldesc_c = c_desc + ename_hc = S("Colored Terracotta") + ename_gt = S("Glazed Terracotta") + ename_cp = S("Concrete Powder") + ename_c = S("Concrete") + else + create_entry = false + end + local craft_color_group = row[6] -- Node Definition minetest.register_node("mcl_colorblocks:hardened_clay_"..name, { - description = desc.." Terracotta", - _doc_items_longdesc = hc_desc, + description = sdesc_hc, + _doc_items_longdesc = ldesc_hc, + _doc_items_create_entry = create_entry, + _doc_items_entry_name = ename_hc, tiles = {"hardened_clay_stained_"..name..".png"}, groups = {pickaxey=1, hardened_clay=1,building_block=1, material_stone=1}, stack_max = 64, @@ -66,8 +90,10 @@ for _, row in ipairs(block.dyes) do }) minetest.register_node("mcl_colorblocks:concrete_powder_"..name, { - description = desc.." Concrete Powder", - _doc_items_longdesc = cp_desc, + description = sdesc_cp, + _doc_items_longdesc = ldesc_cp, + _doc_items_create_entry = create_entry, + _doc_items_entry_name = ename_cp, tiles = {"mcl_colorblocks_concrete_powder_"..name..".png"}, groups = {handy=1,shovely=1, concrete_powder=1,building_block=1,falling_node=1, material_sand=1}, stack_max = 64, @@ -104,8 +130,10 @@ for _, row in ipairs(block.dyes) do }) minetest.register_node("mcl_colorblocks:concrete_"..name, { - description = desc.." Concrete", - _doc_items_longdesc = conc_desc, + description = sdesc_c, + _doc_items_longdesc = ldesc_c, + _doc_items_create_entry = create_entry, + _doc_items_entry_name = ename_c, tiles = {"mcl_colorblocks_concrete_"..name..".png"}, groups = {handy=1,pickaxey=1, concrete=1,building_block=1, material_stone=1}, stack_max = 64, @@ -118,8 +146,10 @@ for _, row in ipairs(block.dyes) do local tex = "mcl_colorblocks_glazed_terracotta_"..name..".png" local texes = { tex, tex, tex.."^[transformR180", tex, tex.."^[transformR270", tex.."^[transformR90" } minetest.register_node("mcl_colorblocks:glazed_terracotta_"..name, { - description = desc.." Glazed Terracotta", - _doc_items_longdesc = gt_desc, + description = sdesc_gt, + _doc_items_longdesc = ldesc_gt, + _doc_items_create_entry = create_entry, + _doc_items_entry_name = ename_gt, tiles = texes, groups = {handy=1,pickaxey=1, glazed_terracotta=1,building_block=1, material_stone=1}, paramtype2 = "facedir", @@ -131,6 +161,13 @@ for _, row in ipairs(block.dyes) do on_rotate = on_rotate, }) + if not is_canonical and doc_mod then + doc.add_entry_alias("nodes", "mcl_colorblocks:hardened_clay_"..canonical_color, "nodes", "mcl_colorblocks:hardened_clay_"..name) + doc.add_entry_alias("nodes", "mcl_colorblocks:glazed_terracotta_"..canonical_color, "nodes", "mcl_colorblocks:glazed_terracotta_"..name) + doc.add_entry_alias("nodes", "mcl_colorblocks:concrete_"..canonical_color, "nodes", "mcl_colorblocks:concrete_"..name) + doc.add_entry_alias("nodes", "mcl_colorblocks:concrete_powder_"..canonical_color, "nodes", "mcl_colorblocks:concrete_powder_"..name) + end + -- Crafting recipes if craft_color_group then minetest.register_craft({ @@ -169,10 +206,14 @@ minetest.register_abm({ neighbors = {"group:water"}, action = function(pos, node) local harden_to = minetest.registered_nodes[node.name]._mcl_colorblocks_harden_to - minetest.swap_node(pos, { name = harden_to, param = node.param, param2 = node.param2 }) + -- It should be impossible for harden_to to be nil, but a Minetest bug might call + -- the ABM on the new concrete node, which isn't part of this ABM! + if harden_to then + node.name = harden_to + minetest.set_node(pos, node) + end end, }) local time_to_load= os.clock() - init print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load)) - diff --git a/mods/ITEMS/mcl_colorblocks/locale/mcl_colorblocks.de.tr b/mods/ITEMS/mcl_colorblocks/locale/mcl_colorblocks.de.tr new file mode 100644 index 000000000..f0d771970 --- /dev/null +++ b/mods/ITEMS/mcl_colorblocks/locale/mcl_colorblocks.de.tr @@ -0,0 +1,75 @@ +# textdomain: mcl_colorblocks +White Terracotta=Weiße Terrakotta +White Glazed Terracotta=Weiße glasierte Terrakotta +White Concrete Powder=Weißes Betonpulver +White Concrete=Weißer Beton +Grey Terracotta=Graue Terrakotta +Grey Glazed Terracotta=Graue glasierte Terrakotta +Grey Concrete Powder=Graues Betonpulver +Grey Concrete=Grauer Beton +Light Grey Terracotta=Hellgraue Terrakotta +Light Grey Glazed Terracotta=Hellgraue glasierte Terrakotta +Light Grey Concrete Powder=Hellgraues Betonpulver +Light Grey Concrete=Hellgrauer Beton +Black Terracotta=Schwarze Terrakotta +Black Glazed Terracotta=Schwarze glasierte Terrakotta +Black Concrete Powder=Schwarzes Betonpulver +Black Concrete=Schwarzer Beton +Red Terracotta=Rote Terrakotta +Red Glazed Terracotta=Rote glasierte Terrakotta +Red Concrete Powder=Rotes Betonpulver +Red Concrete=Roter Beton +Yellow Terracotta=Gelbe Terrakotta +Yellow Glazed Terracotta=Gelbe glasierte Terrakotta +Yellow Concrete Powder=Gelbes Betonpulver +Yellow Concrete=Gelber Beton +Green Terracotta=Grüne Terrakotta +Green Glazed Terracotta=Grüne glasierte Terrakotta +Green Concrete Powder=Grünes Betonpulver +Green Concrete=Grüner Beton +Cyan Terracotta=Türkise Terrakotta +Cyan Glazed Terracotta=Türkise glasierte Terrakotta +Cyan Concrete Powder=Türkises Betonpulver +Cyan Concrete=Türkiser Beton +Blue Terracotta=Blaue Terrakotta +Blue Glazed Terracotta=Blaue glasierte Terrakotta +Blue Concrete Powder=Blaues Betonpulver +Blue Concrete=Blauer Beton +Magenta Terracotta=Magenta Terrakotta +Magenta Glazed Terracotta=Magenta glasierte Terrakotta +Magenta Concrete Powder=Magenta Betonpulver +Magenta Concrete=Magenta Beton +Orange Terracotta=Orange Terrakotta +Orange Glazed Terracotta=Orange glasierte Terrakotta +Orange Concrete Powder=Orange Betonpulver +Orange Concrete=Orange Beton +Purple Terracotta=Violette Terrakotta +Purple Glazed Terracotta=Violette glasierte Terrakotta +Purple Concrete Powder=Violettes Betonpulver +Purple Concrete=Violetter Beton +Brown Terracotta=Braune Terrakotta +Brown Glazed Terracotta=Braune glasierte Terrakotta +Brown Concrete Powder=Braunes Betonpulver +Brown Concrete=Brauner Beton +Pink Terracotta=Rosa Terrakotta +Pink Glazed Terracotta=Rosa glasierte Terrakotta +Pink Concrete Powder=Rosa Betonpulver +Pink Concrete=Rosa Beton +Lime Terracotta=Lindgrüne Terrakotta +Lime Glazed Terracotta=Lindgrüne glasierte Terrakotta +Lime Concrete Powder=Lindgrünes Betonpulver +Lime Concrete=Lindgrüner Beton +Light Blue Terracotta=Hellbaue Terrakotta +Light Blue Glazed Terracotta=Hellblaue glasierte Terrakotta +Light Blue Concrete Powder=Hellblaues Betonpulver +Light Blue Concrete=Hellblauer Beton +Terracotta is a basic building material. It comes in many different colors.=Terrakotta ist ein Baumaterial. Es gibt es in vielen verschiedenen Farben. +Glazed terracotta is a decorative block with a complex pattern. It can be rotated by placing it in different directions.=Glasierte Terrakotta ist ein dekorativer Block mit einem komplexen Muster. Sie kann rotiert werden, indem man sie in verschiedene Richtungen platziert. +Concrete powder is used for creating concrete, but it can also be used as decoration itself. It comes in different colors. Concrete powder turns into concrete of the same color when it comes in contact with water.=Betonpulver wird benutzt, um Beton herzustellen, aber es kann auch selbst als Dekoration benutzt werden. Es kommt in verschiedenen Farben daher. Betonpulver verwandelt sich in Beton der selben Farbe, wenn es mit Wasser in Berührung kommt. +Concrete is a decorative block which comes in many different colors. It is notable for having a very strong and clean color.=Beton ist ein dekorativer Block, der in verschiedenen Farben daherkommt. Er hat eine besonders kräftige und klare Farbe. +Terracotta=Terrakotta +Terracotta is a basic building material which comes in many different colors. This particular block is uncolored.=Terrakotta ist ein Baumaterial, welches in vielen verschiedenen Farben vorkommt. Diese Variante ist ungefärbt. +Colored Terracotta=Gefärbte Terrakotta +Glazed Terracotta=Glasierte Terrakotta +Concrete Powder=Betonpulver +Concrete=Beton diff --git a/mods/ITEMS/mcl_colorblocks/locale/template.txt b/mods/ITEMS/mcl_colorblocks/locale/template.txt new file mode 100644 index 000000000..f20c7965c --- /dev/null +++ b/mods/ITEMS/mcl_colorblocks/locale/template.txt @@ -0,0 +1,75 @@ +# textdomain: mcl_colorblocks +White Terracotta= +White Glazed Terracotta= +White Concrete Powder= +White Concrete= +Grey Terracotta= +Grey Glazed Terracotta= +Grey Concrete Powder= +Grey Concrete= +Light Grey Terracotta= +Light Grey Glazed Terracotta= +Light Grey Concrete Powder= +Light Grey Concrete= +Black Terracotta= +Black Glazed Terracotta= +Black Concrete Powder= +Black Concrete= +Red Terracotta= +Red Glazed Terracotta= +Red Concrete Powder= +Red Concrete= +Yellow Terracotta= +Yellow Glazed Terracotta= +Yellow Concrete Powder= +Yellow Concrete= +Green Terracotta= +Green Glazed Terracotta= +Green Concrete Powder= +Green Concrete= +Cyan Terracotta= +Cyan Glazed Terracotta= +Cyan Concrete Powder= +Cyan Concrete= +Blue Terracotta= +Blue Glazed Terracotta= +Blue Concrete Powder= +Blue Concrete= +Magenta Terracotta= +Magenta Glazed Terracotta= +Magenta Concrete Powder= +Magenta Concrete= +Orange Terracotta= +Orange Glazed Terracotta= +Orange Concrete Powder= +Orange Concrete= +Purple Terracotta= +Purple Glazed Terracotta= +Purple Concrete Powder= +Purple Concrete= +Brown Terracotta= +Brown Glazed Terracotta= +Brown Concrete Powder= +Brown Concrete= +Pink Terracotta= +Pink Glazed Terracotta= +Pink Concrete Powder= +Pink Concrete= +Lime Terracotta= +Lime Glazed Terracotta= +Lime Concrete Powder= +Lime Concrete= +Light Blue Terracotta= +Light Blue Glazed Terracotta= +Light Blue Concrete Powder= +Light Blue Concrete= +Terracotta is a basic building material. It comes in many different colors.= +Glazed terracotta is a decorative block with a complex pattern. It can be rotated by placing it in different directions.= +Concrete powder is used for creating concrete, but it can also be used as decoration itself. It comes in different colors. Concrete powder turns into concrete of the same color when it comes in contact with water.= +Concrete is a decorative block which comes in many different colors. It is notable for having a very strong and clean color.= +Terracotta= +Terracotta is a basic building material which comes in many different colors. This particular block is uncolored.= +Colored Terracotta= +Glazed Terracotta= +Concrete Powder= +Concrete= diff --git a/mods/ITEMS/mcl_compass/init.lua b/mods/ITEMS/mcl_compass/init.lua index a8d557e8e..ee7df7de7 100644 --- a/mods/ITEMS/mcl_compass/init.lua +++ b/mods/ITEMS/mcl_compass/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_compass") + mcl_compass = {} local compass_frames = 32 @@ -79,11 +81,11 @@ for i,img in ipairs(images) do local use_doc, longdesc, usagehelp use_doc = i == stereotype_frame if use_doc then - longdesc = "Compasses are tools which point to the world origin (X=0, Z=0) or the spawn point in the Overworld." + longdesc = S("Compasses are tools which point to the world origin (X=0, Z=0) or the spawn point in the Overworld.") end local itemstring = "mcl_compass:"..(i-1) minetest.register_craftitem(itemstring, { - description = "Compass", + description = S("Compass"), _doc_items_create_entry = use_doc, _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, diff --git a/mods/ITEMS/mcl_compass/locale/mcl_compass.de.tr b/mods/ITEMS/mcl_compass/locale/mcl_compass.de.tr new file mode 100644 index 000000000..e20b0e524 --- /dev/null +++ b/mods/ITEMS/mcl_compass/locale/mcl_compass.de.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_compass +Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Kompasse sind Werkzeuge, die zum Ursprungspunkt der Welt (X@=0, Z@=0) oder den Einstiegspunkt der Welt zeigen. +Compass=Kompass diff --git a/mods/ITEMS/mcl_compass/locale/template.txt b/mods/ITEMS/mcl_compass/locale/template.txt new file mode 100644 index 000000000..2db3584f2 --- /dev/null +++ b/mods/ITEMS/mcl_compass/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: mcl_compass +Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.= +Compass= diff --git a/mods/ITEMS/mcl_core/craftitems.lua b/mods/ITEMS/mcl_core/craftitems.lua index bbdd66ea6..42b6210ed 100644 --- a/mods/ITEMS/mcl_core/craftitems.lua +++ b/mods/ITEMS/mcl_core/craftitems.lua @@ -1,12 +1,14 @@ -- mods/default/craftitems.lua +local S = minetest.get_translator("mcl_core") + -- -- Crafting items -- minetest.register_craftitem("mcl_core:stick", { - description = "Stick", - _doc_items_longdesc = "Sticks are a very versatile crafting material; used in countless crafting recipes.", + description = S("Stick"), + _doc_items_longdesc = S("Sticks are a very versatile crafting material; used in countless crafting recipes."), _doc_items_hidden = false, inventory_image = "default_stick.png", stack_max = 64, @@ -14,16 +16,16 @@ minetest.register_craftitem("mcl_core:stick", { }) minetest.register_craftitem("mcl_core:paper", { - description = "Paper", - _doc_items_longdesc = "Paper is used to craft books and maps.", + description = S("Paper"), + _doc_items_longdesc = S("Paper is used to craft books and maps."), inventory_image = "default_paper.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:coal_lump", { - description = "Coal", - _doc_items_longdesc = "“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things.", + description = S("Coal"), + _doc_items_longdesc = S("“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things."), _doc_items_hidden = false, groups = { coal=1 }, inventory_image = "default_coal_lump.png", @@ -32,8 +34,8 @@ minetest.register_craftitem("mcl_core:coal_lump", { }) minetest.register_craftitem("mcl_core:charcoal_lump", { - description = "Charcoal", - _doc_items_longdesc = "Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks.", + description = S("Charcoal"), + _doc_items_longdesc = S("Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks."), _doc_items_hidden = false, groups = { coal=1 }, inventory_image = "mcl_core_charcoal.png", @@ -42,32 +44,32 @@ minetest.register_craftitem("mcl_core:charcoal_lump", { }) minetest.register_craftitem("mcl_core:iron_nugget", { - description = "Iron Nugget", - _doc_items_longdesc = "Iron nuggets are very small pieces of molten iron; the main purpose is to create iron ingots.", + description = S("Iron Nugget"), + _doc_items_longdesc = S("Iron nuggets are very small pieces of molten iron; the main purpose is to create iron ingots."), inventory_image = "mcl_core_iron_nugget.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:gold_nugget", { - description = "Gold Nugget", - _doc_items_longdesc = "Gold nuggets are very small pieces of molten gold; the main purpose is to create gold ingots.", + description = S("Gold Nugget"), + _doc_items_longdesc = S("Gold nuggets are very small pieces of molten gold; the main purpose is to create gold ingots."), inventory_image = "mcl_core_gold_nugget.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:diamond", { - description = "Diamond", - _doc_items_longdesc = "Diamonds are precious minerals and useful to create the highest tier of armor and tools.", + description = S("Diamond"), + _doc_items_longdesc = S("Diamonds are precious minerals and useful to create the highest tier of armor and tools."), inventory_image = "default_diamond.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:clay_lump", { - description = "Clay Ball", - _doc_items_longdesc = "Clay balls are a raw material, mainly used to create bricks in the furnace.", + description = S("Clay Ball"), + _doc_items_longdesc = S("Clay balls are a raw material, mainly used to create bricks in the furnace."), _doc_items_hidden = false, inventory_image = "default_clay_lump.png", stack_max = 64, @@ -75,64 +77,64 @@ minetest.register_craftitem("mcl_core:clay_lump", { }) minetest.register_craftitem("mcl_core:iron_ingot", { - description = "Iron Ingot", - _doc_items_longdesc = "Molten iron. It is used to craft armor, tools, and whatnot.", + description = S("Iron Ingot"), + _doc_items_longdesc = S("Molten iron. It is used to craft armor, tools, and whatnot."), inventory_image = "default_steel_ingot.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:gold_ingot", { - description = "Gold Ingot", - _doc_items_longdesc = "Molten gold. It is used to craft armor, tools, and whatnot.", + description = S("Gold Ingot"), + _doc_items_longdesc = S("Molten gold. It is used to craft armor, tools, and whatnot."), inventory_image = "default_gold_ingot.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:emerald", { - description = "Emerald", - _doc_items_longdesc = "Emeralds are not very useful on their own, but they can exchanged for gold ingots by crafting.", + description = S("Emerald"), + _doc_items_longdesc = S("Emeralds are not very useful on their own, but they can exchanged for gold ingots by crafting."), inventory_image = "mcl_core_emerald.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:brick", { - description = "Brick", - _doc_items_longdesc = "Bricks are used to craft brick blocks.", + description = S("Brick"), + _doc_items_longdesc = S("Bricks are used to craft brick blocks."), inventory_image = "default_clay_brick.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:flint", { - description = "Flint", - _doc_items_longdesc = "Flint is a raw material.", + description = S("Flint"), + _doc_items_longdesc = S("Flint is a raw material."), inventory_image = "default_flint.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_core:sugar", { - description = "Sugar", - _doc_items_longdesc = "Sugar comes from sugar canes and is used to make sweet foods.", + description = S("Sugar"), + _doc_items_longdesc = S("Sugar comes from sugar canes and is used to make sweet foods."), inventory_image = "mcl_core_sugar.png", stack_max = 64, groups = { craftitem = 1 }, }) minetest.register_craftitem("mcl_core:bowl",{ - description = "Bowl", - _doc_items_longdesc = "Bowls are mainly used to hold tasty soups.", + description = S("Bowl"), + _doc_items_longdesc = S("Bowls are mainly used to hold tasty soups."), inventory_image = "mcl_core_bowl.png", stack_max = 64, groups = { craftitem = 1 }, }) minetest.register_craftitem("mcl_core:apple", { - description = "Apple", - _doc_items_longdesc = "Apples are food items which can be eaten.", + description = S("Apple"), + _doc_items_longdesc = S("Apples are food items which can be eaten."), wield_image = "default_apple.png", inventory_image = "default_apple.png", stack_max = 64, @@ -144,8 +146,8 @@ minetest.register_craftitem("mcl_core:apple", { -- TODO: Status effects minetest.register_craftitem("mcl_core:apple_gold", { - description = core.colorize("#55FFFF", "Golden Apple"), - _doc_items_longdesc = "Golden apples are precious food items which can be eaten.", + description = core.colorize("#55FFFF", S("Golden Apple")), + _doc_items_longdesc = S("Golden apples are precious food items which can be eaten."), wield_image = "mcl_core_apple_golden.png", inventory_image = "mcl_core_apple_golden.png", stack_max = 64, diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index c040ce7e8..9eec03d07 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -639,6 +639,26 @@ end local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed")) +-- Return appropriate grass block node for pos. Dry grass for dry/hot biomes, normal grass otherwise. +function mcl_core.get_grass_block_type(pos) + local biome_data = minetest.get_biome_data(pos) + local dry = false + if biome_data then + local biome = biome_data.biome + local biome_name = minetest.get_biome_name(biome) + local reg_biome = minetest.registered_biomes[biome_name] + if reg_biome then + local biome_type = reg_biome._mcl_biome_type + dry = biome_type == "hot" + end + end + if dry then + return {name="mcl_core:dirt_with_dry_grass"} + else + return {name="mcl_core:dirt_with_grass"} + end +end + ------------------------------ -- Spread grass blocks and mycelium on neighbor dirt ------------------------------ @@ -681,6 +701,9 @@ minetest.register_abm({ if light_self >= 4 and light_source >= 9 then -- All checks passed! Let's spread the grass/mycelium! local n2 = minetest.get_node(p2) + if minetest.get_item_group(n2.name, "grass_block") ~= 0 then + n2 = mcl_core.get_grass_block_type(pos) + end minetest.set_node(pos, {name=n2.name}) -- If this was mycelium, uproot plant above @@ -1152,7 +1175,11 @@ minetest.register_abm({ chance = 8, action = function(pos, node) if minetest.get_node_light(pos, 0) >= 12 then - minetest.remove_node(pos) + if node.name == "mcl_core:ice" then + mcl_core.melt_ice(pos) + else + minetest.remove_node(pos) + end end end }) @@ -1183,6 +1210,19 @@ function mcl_core.check_vines_supported(pos, node) return supported end +-- Melt ice at pos. mcl_core:ice MUST be a post if you call this! +function mcl_core.melt_ice(pos) + -- Create a water source if ice is destroyed and there was something below it + local below = {x=pos.x, y=pos.y-1, z=pos.z} + local belownode = minetest.get_node(below) + local dim = mcl_worlds.pos_to_dimension(below) + if dim ~= "nether" and belownode.name ~= "air" and belownode.name ~= "ignore" and belownode.name ~= "mcl_core:void" then + minetest.set_node(pos, {name="mcl_core:water_source"}) + else + minetest.remove_node(pos) + end +end + ---- FUNCTIONS FOR SNOWED NODES ---- -- These are nodes which change their appearence when they are below a snow cover -- and turn back into “normal” when the snow cover is removed. diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.de.tr b/mods/ITEMS/mcl_core/locale/mcl_core.de.tr new file mode 100644 index 000000000..3460001d6 --- /dev/null +++ b/mods/ITEMS/mcl_core/locale/mcl_core.de.tr @@ -0,0 +1,250 @@ +# textdomain: mcl_core +@1 could not survive in lava.=@1 konnte nicht in Lava überleben. +@1 died in lava.=@1 starb in Lava. +@1 melted in lava.=@1 schmolz in der Lava. +@1 took a bath in a hot lava tub.=@1 nahm ein Bad in einer heißen Lavawanne. +A block of diamond is mostly a shiny decorative block but also useful as a compact storage of diamonds.=Ein Diamantblock ist hauptsächlich ein schicker Dekorationsblock, aber er ist auch nützlich zur kompakten Aufbewahrung von Diamanten. +A block of emerald is mostly a shiny decorative block but also useful as a compact storage of emeralds.=Ein Smaragdblock ist hauptsächlich ein schicker Dekorationsblock, aber er ist auch nützlich zur kompakten Aufbewahrung von Smaragden. +A block of gold is mostly a shiny decorative block but also useful as a compact storage of gold ingots.=Ein Goldblock ist hauptsächlich ein glänzender Dekorationsblock, aber er ist auch nützlich zur kompakten Aufbewahrung von Goldbarren. +A block of iron is mostly a decorative block but also useful as a compact storage of iron ingots.=Ein Eisenblock ist hauptsächlich ein Dekorationsblock, aber er ist auch nützlich zur kompakten Aufbewahrung von Eisenbarren. +A cactus can only be placed on top of another cactus or any sand.=Ein Kaktus kann nur auf einem anderen Kaktus oder auf beliebigem Sand platziert werden. +A decorative and mostly transparent block.=Ein Dekoblock, der größtenteils transparent ist. +A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.=Ein Grasblock ist Erde mit einer Grasschicht. Grasblöcke sind vielseitige Blöcke, die das Wachstum aller möglichen Pflanzen fördern. Mit einer Hacke kann man das Land bestellen und einen Ackerboden machen. Mit einer Schaufel verwandelt man ihn in einen Graspfad. Im Licht wird das Gras sich langsam auf benachbarte Erde ausbreiten. Unter einem lichtundurchlässigen Block kann sich dieser Block wieder zurück zu Erde verwandeln. +A lapis lazuli block is mostly a decorative block but also useful as a compact storage of lapis lazuli.=Ein Lapislazuliblock ist hauptsächlich ein Deko-Block aber er ist auch nützlich zur kompakten Aufbewahrung von Lapislazuli. +A lava source sets fire to a couple of air blocks above when they're next to a flammable block.=Eine Lavaquelle zündet einige Luftblöcke über ihr an, wenn sie sich neben einem entzündlichen Block befinden. +A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns.=Ein Leiterstück, mit dem Sie vertikal klettern können. Leitern können nur an der Seite fester Blöcke und nicht an Glas, Blättern, Eis, Platten, Leuchtsteinen oder Ozeanlaternen platziert werden. +Acacia Bark=Akazienrinde +Acacia Leaves=Akazienblätter +Acacia Sapling=Akaziensetzling +Acacia Wood=Akazienholz +Acacia Wood Planks=Akazienholzplanken +Acacia leaves are grown from acacia trees.=Akazienblätter wachsen an Akazienbäumen. +Andesite=Andesit +Andesite is an igneous rock.=Andesit ist ein magmatisches Gestein. +Apple=Apfel +Apples are food items which can be eaten.=Äpfel sind essbare Gegenstände. +Barrier=Barriere +Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Barrieren sind unsichtbare feste Blöcke. Sie sind nützlich, um Grenzen für Abenteuerkarten und ähnliches zu bauen. Monster und Tiere werden auf Barrieren nicht auftauchen, und Zäune verbinden sich nicht mit Barrieren. Andere Blöcke können an Barrieren gebaut werden, wie bei allen anderen Blöcken. +Bedrock=Grundgestein +Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=Grundgestein ist ein sehr harter Gesteinstyp. Er kann unter normalen Umständen nicht abgebaut, zerstört, aufgesammelt oder verschoben werden, außer im Kreativmodus. +Birch Bark=Birkenrinde +Birch Leaves=Birkenblätter +Birch Sapling=Birkensetzling +Birch Wood=Birkenholz +Birch Wood Planks=Birkenholzplanken +Birch leaves are grown from birch trees.=Birkenblätter wachsen an Birken. +Black Stained Glass=Schwarzes Buntglas +Block of Coal=Kohleblock +Block of Diamond=Diamantblock +Block of Emerald=Smaragdblock +Block of Gold=Goldblock +Block of Iron=Eisenblock +Blocks of coal are useful as a compact storage of coal and very useful as a furnace fuel. A block of coal is as efficient as 10 coal.=Kohleblöcke sind für eine kompakte Aufbewahrung von Kohle nützlich und sehr nützlich als Ofenbrennstoff. Ein Kohleblock ist so effizient wie 10 mal Kohle. +Blue Stained Glass=Blaues Buntglas +Bone Block=Knockenblock +Bone blocks are decorative blocks and a compact storage of bone meal.=Knochenblöcke sind Deko-Blöcke und geeignet zur kompakten Aufbewahrung von Knochenmehl. +Bowl=Schale +Bowls are mainly used to hold tasty soups.=Schalen werden hauptsächlich für leckere Suppen gebraucht. +Brick=Ziegel +Brick Block=Ziegelblock +Brick blocks are a good building material for building solid houses and can take quite a punch.=Ziegelblöcke sind ein gutes Baumaterial für den Bau stabiler Gebäude und halten einiges aus. +Bricks are used to craft brick blocks.=Ziegel werden zur Herstellung von Ziegelblöcken benötigt. +Brown Stained Glass=Braunes Buntglas +Cactus=Kaktus +Charcoal=Holzkohle +Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks.=Holzkohle ist ein alternativer Brennstoff. Er entsteht, wenn Holz im Ofen verkohlt wird. Er brennt genau so lange wie Kohle und hat fast identische Herstellungsrezepte, aber es können keine Kohleblöcke damit gemacht werden. +Chiseled Stone Bricks=Gemeißelte Steinziegel +Chiseled Red Sandstone=Gemeißelter roter Sandstein +Chiseled Sandstone=Gemeißelter Sandstein +Chiseled red sandstone is a decorative building block.=Gemeißelter roter Sandstein ist ein dekorativer Block zum Bauen. +Chiseled sandstone is a decorative building block.=Gemeißelter Sandstein ist ein dekorativer Block zum Bauen. +Clay=Ton +Clay Ball=Tonklumpen +Clay balls are a raw material, mainly used to create bricks in the furnace.=Tonklumpen sind ein Rohstoff, sie werden hauptsächlich zur Ziegelherstellung im Ofen benutzt. +Clay is a versatile kind of earth commonly found at beaches underwater.=Ton ist eine vielseitige Art Erde, die oft an Stränden unter dem Wasser gefunden werden kann. +Coal=Kohle +Coal Ore=Kohleerz +Coarse Dirt=Grobe Erde +Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover.=Grobe Erde ist für einige Pflanzen ein Erdboden und ähnlich wie Erde, aber auf ihr wird nie eine Grasschicht oder ähnliches wachsen. +Cobblestone=Kopfsteinpflaster +Cobweb=Spinnennetz +Cobwebs can be walked through, but significantly slow you down.=Spinnennetze können passiert werden, aber sie verlangsamen Sie beträchtlich. +Cracked Stone Bricks=Rissige Steinziegel +Cut Red Sandstone=Geschliffener roter Sandstein +Cut Sandstone=Geschliffener Sandstein +Cut red sandstone is a decorative building block.=Geschliffener roter Sandstein ist ein dekorativer Block zum Bauen. +Cut sandstone is a decorative building block.=Geschliffener Sandstein ist ein dekorativer Block zum Bauen. +Cyan Stained Glass=Türkises Buntglas +Dark Oak Bark=Schwarzeichenrinde +Dark Oak Leaves=Schwarzeichenblätter +Dark Oak Sapling=Schwarzeichensetzling +Dark Oak Wood=Schwarzeichenholz +Dark Oak Wood Planks=Schwarzeichenholzplanken +Dark oak leaves are grown from dark oak trees.=Schwarzeichenblätter wachsen an Schwarzeichen. +Dark oak saplings can grow into dark oaks, but only in groups. A lonely dark oak sapling won't grow. A group of four dark oak saplings grows into a dark oak after some time when they are placed on soil (such as dirt) in a 2×2 square and exposed to light.=Schwarzeichensetzlinge können zu Schwarzeichen heranwachsen, aber nur in Gruppen. Ein einsamer Schwarzeichensetzling wird nicht wachsen. Eine Gruppe aus vier Schwarzeichensetzlingen werden nach etwas Zeit zu einer Schwarzeiche heranwachen, wenn sie auf einem Erdboden (wie Erde) in einem 2×2-Quadrat platziert wurden und genügend Licht ausgesetzt sind. +Dead Bush=Toter Busch +Dead bushes are unremarkable plants often found in dry areas. They can be harvested for sticks.=Tote Büsche sind uninteressante Pflanzen, die oft in trockenen Gebieten vorkommen. +Diamond=Diamant +Diamond Ore=Diamanterz +Diamond ore is rare and can be found in clusters near the bottom of the world.=Diamanterz ist selten und kann in kleinen Ansammlungen in der Nähe des Weltbodens gefunden werden. +Diamonds are precious minerals and useful to create the highest tier of armor and tools.=Diamanten sind kostbare Mineralien, die für die hochwertigsten Rüstungen und Werkzeuge gebraucht werden. +Diorite=Diorit +Diorite is an igneous rock.=Diorit ist ein vulkanisches Gestein. +Dirt=Erde +Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby.=Erde dient als Nährboden für einige Pflanzen. Im Licht könnte auf diesem Block eine Gras- oder Myzelschicht wachsen, wenn solche Blöcke in der Nähe sind. +Emerald=Smaragd +Emerald Ore=Smaragderz +Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters.=Smaragderz ist das Erz von Smaragden. Es ist sehr selten und kann nur einzeln gefunden werden, nicht in Ansammlungen. +Emeralds are not very useful on their own, but they can exchanged for gold ingots by crafting.=Smaragde sind nicht besonders nützlich, aber man kann sie in der Fertigung durch Goldbarren eintauschen. +Flint=Feuerstein +Flint is a raw material.=Feuerstein ist ein Rohstoff. +Flowing Lava=Fließende Lava +Flowing Water=Fließendes Wasser +Frosted Ice=Brüchiges Eis +Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds.=Brüchiges Eis ist ein kurzlebiger durchscheinender Block. Er wird sich in einigen Sekunden zu einer Wasserquelle verwandeln. +Glass=Glas +Gold Ingot=Goldbarren +Gold Nugget=Goldklumpen +Gold Ore=Golderz +Gold nuggets are very small pieces of molten gold; the main purpose is to create gold ingots.=Goldklumpen sind sehr kleine Stücke geschmolzenes Gold; ihr Hauptzweck besteht darin, Goldbarren herzustellen. +Golden Apple=Goldener Apfel +Golden apples are precious food items which can be eaten.=Goldene Äpfel sind kostbare Lebensmittel. +Granite=Granit +Grass Block=Grasblock +Grass Path=Graspfad +Grass paths are a decorative variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created with a shovel. A grass path turns into dirt when it is below a solid block.=Graspfade sind eine dekorative Variante von Grasblöcken. Ihre Oberseite hat eine andere Farbe und sie sind etwas niedriger als Grasblöcke, wodurch sie nützlich sind, um Fußwege zu errichten. Graspfade werden mit einer Schaufel errichtet. Ein Graspfad verwandelt sich in Erde, wenn er sich unter einem festen Block befindet. +Gravel=Kies +Green Stained Glass=Grünes Buntglas +Grey Stained Glass=Graues Buntglas +Ice=Eis +Ice is a translucent solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.=Eis ist ein durchscheinender fester Block, der oft in kalten Gebieten gefunden werden kann. Er schmilzt in der Nähe von Block-Lichtquellen bei einer Helligkeit von 12 oder höher. Wenn es schmilzt oder abgebaut wird, und darunter ein anderer Block war, wird er sich in eine Wasserquelle verwandeln. +In the End dimension, starting a fire on this block will create an eternal fire.=In der Ende-Dimension wird Feuer auf diesem Block ewig brennen. +Iron Ingot=Eisenbarren +Iron Nugget=Eisenklumpen +Iron Ore=Eisenerz +Iron nuggets are very small pieces of molten iron; the main purpose is to create iron ingots.=Eisenklumpen sind sehr kleine Brocken aus geschmolzenem Eisen; ihr Hauptzweck besteht darin, Eisenbarren herzustellen. +Jungle Bark=Dschungelrinde +Jungle Leaves=Dschungelblätter +Jungle Sapling=Dschungelsetzling +Jungle Wood=Dschungelholz +Jungle Wood Planks=Dschungelholzplanken +Jungle leaves are grown from jungle trees.=Dschungelblätter wachsen an Dschungelbäumen. +Ladder=Leiter +Lapis Lazuli Block=Lapislazuliblock +Lapis Lazuli Ore=Lapislazulierz +Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Lapislazulierz ist das Erz von Lapislazuli. Es kann relativ selten in Ansammlungen in der Nähe des Weltbodens gefunden werden. +Lava Source=Lavaquelle +Lava is hot and rather dangerous. Don't touch it, it will hurt you a lot and it is hard to get out.=Lava ist heiß und ziemlich gefährlich. Berühren Sie sie nicht, es wird Sie verletzen und es ist schwierig, ihr zu entkommen. +Light Blue Stained Glass=Hellblaues Buntglas +Light Grey Stained Glass=Hellgraues Buntglas +Lime Stained Glass=Lindgrünes Buntglas +Lit Redstone Ore=Leuchtendes Redstoneerz +Magenta Stained Glass=Magenta Buntglas +Molten gold. It is used to craft armor, tools, and whatnot.=Geschmolzenes Gold. Es wird benutzt, um Rüstungen, Werkzeuge, und anderes herzustellen. +Molten iron. It is used to craft armor, tools, and whatnot.=Geschmolzenes Eisen. Es wird benutzt, um Rüstungen, Werkzeuge, und vieles mehr herzustellen. + +Moss Stone=Moosstein +Mossy Stone Bricks=Moosige Steinziegel +Mycelium=Myzel +Mycelium is a type of dirt and the ideal soil for mushrooms. Unlike other dirt-type blocks, it can not be turned into farmland with a hoe. In light, mycelium slowly spreads over nearby dirt. Under an opaque block or a liquid, it eventually turns back into dirt.=Myzel ist eine Art Erde und der perfekte Nährboden für Pilze. Anders als bei anderen erdähnlichen Blöcken kann es mit einer Hacke nicht zu Ackerboden verwandelt werden. Im Licht wird sich Myzel langsam auf benachbarte Erde ausbreiten. Unter einem lichtundurchlässigen Block oder einer Flüssigkeit wird es sich früher oder später zurück zu Erde verwandeln. +Oak Bark=Eichenrinde +Oak Leaves=Eichenblätter +Oak Sapling=Eichensetzling +Oak Wood=Eichenholz +Oak Wood Planks=Eichenholzplanken +Oak leaves are grown from oak trees.=Eichenblätter wachsen von Eichen. +Obsidian=Obsidian +Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava.=Obsidian ist ein extrem hartes Mineral mit einem enormen Sprengwiderstand. +One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.=Eines der häufigsten Blöcke der Welt, fast der ganze Untergrund besteht aus Stein. Er enthält manchmal Erze. Stein kann entstehen, wenn Wasser auf Lava trifft. +Orange Stained Glass=Orange Buntglas +Packed Ice=Packeis +Packed ice is a compressed form of ice. It is opaque and solid.=Packeis ist eine kompakte Eisform. Es ist undurchsichtig und fest. +Paper=Papier +Paper is used to craft books and maps.=Papier wird benutzt, um Bücher und Karten herzustellen. +Pink Stained Glass=Rosa Buntglas +Podzol=Podsol +Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it.=Podsol ist eine Art Erde, die man in Taigawäldern finden kann. Nur wenige Pflanzen können hierauf wachsen. +Polished Andesite=Polierter Andesit +Polished Diorite=Polierter Diorit +Polished Granite=Polierter Granit +Polished Stone=Polierter Stein +Polished andesite is a decorative building block made from andesite.=Polierter Andesit ist ein dekorativer Block zum Bauen, der aus Andesit gemacht wurde. +Polished diorite is a decorative building block made from diorite.=Polierter Diorit ist ein dekorativer Block zum Bauen, der aus Diorit gemacht wurde. +Polished granite is a decorative building block made from granite.=Polierter Granit ist ein dekorativer Block zum Bauen, der aus Granit gemacht wurde. +Purple Stained Glass=Violettes Buntglas +Realm Barrier=Reichsbarriere +Red Sand=Roter Sand +Red Sandstone=Roter Sandstein +Red Stained Glass=Rotes Buntglas +Red sand is found in large quantities in mesa biomes.=Roter Sand kommt in großen Mengen bei Tafelbergbiomen vor. +Red sandstone is compressed red sand and is a rather soft kind of stone.=Roter Sandstein ist komprimierter roter Sand und ein relativ weiches Gestein. +Redstone Ore=Redstone-Erz +Redstone ore is commonly found near the bottom of the world. It glows when it is punched or walked upon.=Redstone-Erz kommt oft in der Nähe des Weltbodens vor. Er leuchtet, wenn er berührt wird. +Sand=Sand +Sand is found in large quantities at beaches and deserts.=Sand kommt in großen Mengen an Stränden und in Wüsten vor. +Sandstone=Sandstein +Sandstone is compressed sand and is a rather soft kind of stone.=Sandstein ist komprimierter Sand und ein relativ weiches Gestein. +Slime Block=Schleimblock +Slime blocks are very bouncy and prevent fall damage.=Schleimblöcke sind sehr sprunghaft und verhindern Fallschaden. +Smooth Red Sandstone=Glatter roter Sandstein +Smooth Sandstone=Glatter Sandstein +Smooth red sandstone is a decorative building block.=Glatter roter Sandstein ist ein decorativer Block zum Bauen. +Smooth sandstone is compressed sand and is a rather soft kind of stone.=Glatter Sandstein ist komprimierter Sand und ein relativ weiches Gestein. +Snow=Schnee +Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height.=Etwas Kohle im Stein, es kommt sehr häufig vor und kann in mittelgroßen bis großen Ansammlungen im Stein bei fast jeder Höhe gefunden werden. +Some iron contained in stone, it is prety common and can be found below sea level.=Etwas Eisen umschlossen von Stein, es ist recht verbreitet und kann unter dem Meeresspiegel gefunden werden. +Spruce Bark=Fichtenrinde +Spruce Leaves=Fichtenblätter +Spruce Sapling=Fichtensetzling +Spruce Wood=Fichtenholz +Spruce Wood Planks=Fichtenholzplanken +Spruce leaves are grown from spruce trees.=Fichtenblätter wachsen an Fichten. +Stained glass is a decorative and mostly transparent block which comes in various different colors.=Buntglas ist ein dekorativer und größtenteils durchsichtiger Block, der in verschiedenen Farben daherkommt. +Stick=Stock +Sticks are a very versatile crafting material; used in countless crafting recipes.=Stöcke sind ein vielseitiges Material, sie werden in zahllosen Fertigungsrezepten gebraucht. +Stone=Stein +Stone Bricks=Steinziegel +Sugar=Zucker +Sugar Canes=Zuckerrohr +Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=Zuckerrohr ist eine Pflanze, die in der Herstellung gebraucht wird. Zuckerrohr wird in der Nähe von Wasser bis zu 3 zusätzliche Blöcke wachsen lassen, wenn sie sich neben Wasser befinden und auf einem Grasblock, auf Erde, Sand, roten Sand, Podsol oder grobe Erde platziert wurden. Wird ein Zuckerrohr abgebrochen, werden alle verbundenen Zuckerrohrblöcke ebenfalls abbrechen. +Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=Zuckerrohr kann nur auf Zuckerrohr platziert werden und auf Blöcken, auf denen Zuckerrohr wachsen würde. +Sugar comes from sugar canes and is used to make sweet foods.=Zucker kommt von Zuckerrohr und wird benutzt, um süße Lebensmittel zu machen. +The trunk of a birch tree.=Der Baumstamm einer Birke. +The trunk of a dark oak tree.=Der Baumstamm einer Schwarzeiche. +The trunk of a jungle tree.=Der Baumstamm eines Dschungelbaums. +The trunk of a spruce tree.=Der Baumstamm einer Fichte. +The trunk of an acacia.=Der Baumstamm einer Akazie. +The trunk of an oak tree.=Der Baumstamm einer Eiche. +This block consists of a couple of loose stones and can't support itself.=Diser Block besteht aus ein paar losen Steinchen und kann sich nicht selbst tragen. +This is a decorative block surrounded by the bark of a tree trunk.=Dies ist ein dekorativer Block, der von der Rinde eines Baumstamms umgeben ist. +This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=Ein ganzer Block aus Schnee. Schnee von dieser Dicke wird üblicherweise in Gebieten extremer Kälte gefunden. +This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.=Dies ist ein Teil eines Kaktus, der für gewöhnlich in trockenen Gebieten wächst, vorallem Wüsten. Im Laufe der Zeit werden Kakteen auf bis zu 3 Blöcke hoch auf Sand oder rotem Sand wachsen. Ein Kaktus verletzt Lebewesen, die ihn berühren, er richtet jede halbe Sekunden 1 Schaden an. Wenn ein Kaktusblock bricht, werden alle Kaktusblöcke darüber auch abbrechen. +This stone contains pure gold, a rare metal.=Dieser Stein enthält pures Gold, ein seltenes Metall. +Top Snow=Schneeschicht +Top snow is a layer of snow. It melts near light sources other than the sun with a light level of 12 or higher.=Eine Schneeschicht. Sie schmilzt in der Näche von Lichtquellen außer der Sonne bei einer Helligkeit von 12 oder höher. +Vines=Lianen +Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread.=Lianen sind erkletterbare Blöcke, die an den Seiten von festen ganzen Blöcken platziert werden können. Lianen wachsen langsam und breiten sich aus. +Void=Leere +Water=Wasser +Water Source=Wasserquelle +Water is abundant in oceans and also appears in a few springs in the ground. You can swim easily in water, but you need to catch your breath from time to time.=Wasser gibt es reichlich in Ozeanen und es kommt im Untergrund auch in einigen Quellen vor. Sie können im Wasser mit Leichtigkeit schwimmen, aber Sie müssen gelegentlich Luft holen. +When placed on soil (such as dirt) and exposed to light, a birch sapling will grow into a birch after some time.=Wird er auf einem Nährboden (wie Erde) platziert und ist er dem Licht ausgesetzt, wird ein Birkensetzling langsam zu einer Birke nach etwas Zeit heranwachsen. +When placed on soil (such as dirt) and exposed to light, a jungle sapling will grow into a jungle tree after some time. When there are 4 jungle saplings in a 2×2 square, they will grow to a huge jungle tree.=Wird er auf einem Nährboden (wie Erde) platziert und ist er dem Licht ausgesetzt, wird ein Dschungelsetzling langsam zu einem Dschungelbaum nach etwas Zeit heranwachsen. Gibt es 4 Dschungelsetzlinge in einem 2×2-Quadrat, werden sie zu einem riesigen Dschungelbaum heranwachsen. +When placed on soil (such as dirt) and exposed to light, a spruce sapling will grow into a spruce after some time. When there are 4 spruce saplings in a 2×2 square, they will grow to a huge spruce.=Wird er auf einem Nährboden (wie Erde) platziert und ist er dem Licht ausgesetzt, wird ein Fichtensetzling langsam zu einer Fichte nach etwas Zeit heranwachsen. Gibt es 4 Fichtensetzlinge in einem 2×2-Quadrat, werden sie zu einer Riesenfichte heranwachsen. +When placed on soil (such as dirt) and exposed to light, an acacia sapling will grow into an acacia after some time.=Wird er auf einem Nährboden (wie Erde) platziert und ist er dem Licht ausgesetzt, wird ein Akaziensetzling langsam zu einer Akazie nach etwas Zeit heranwachsen. +When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak after some time.=Wird er auf einem Nährboden (wie Erde) platziert und ist er dem Licht ausgesetzt, wird ein Eichensetzling langsam zu einer Eiche nach etwas Zeit heranwachsen. +When you hold a barrier in hand, you reveal all placed barriers in a short distance around you.=Wenn Sie eine Barriere in der Hand halten, legen Sie alle Barrieren in Ihrer Nähe offen. +White Stained Glass=Weißes Buntglas +Yellow Stained Glass=Gelbes Buntglas +“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things.=„Kohle“ meint Kohleklumpen, die herausfallen, wenn Kohleerz gegraben wird, was im Untergrund gefunden werden kann. Kohle ist der klassische Brennstoff für den Ofen, aber er kann auch benutzt werden, um Fackeln, Kohleblöcke und einige andere Dinge herzustellen. +Water interacts with lava in various ways:=Wasser reagiert mit Lava auf unterschiedliche Arten: +• When water is directly above or horizontally next to a lava source, the lava turns into obsidian.=• Wenn sich Wasser direkt über oder horizontal neben einer Wasserquelle befindet, verwandelt sich die Lava zu Obsidian. +• When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone.=• Wenn fließendes Wasser fließende Lava von oben oder horizontal berührt, verwandelt sich die Lava zu Kopfsteinpflaster. +• When water is directly below lava, the water turns into stone.=• Wenn sich Wasser direkt unter Lava befindet, verwandelt sich das Wasser zu Stein. +Lava interacts with water various ways:=Lava reagiert mit Wasser auf verschiedene Arten: +• When a lava source is directly below or horizontally next to water, the lava turns into obsidian.=• Wenn sich eine Lavaquelle direkt unter oder horizontal neben Wasser befindet, verwandelt sich die Lava zu Obsidian. +• When lava is directly above water, the water turns into stone.=• Wenn sich Lava direkt über Wasser befindet, verwandelt sich das Wasser zu Stein. +Stained Glass=Buntglas +Granite is an igneous rock.=Granit ist ein magmatisches Gestein. +Top snow can be stacked and has one of 8 different height levels. At levels 2-8, top snow is collidable. Top snow drops 2-9 snowballs, depending on its height.=Eine Schneeschicht kann gestapelt werden und hat eine von 8 verschiedenen Höhestufen. Bei den Höhestufen 2-8 ist die Schneeschnicht kollidierbar. Schneeschichten werfen 2-9 Schneebälle ab, abhängig von ihrer Höhe. +This block can only be placed on full solid blocks and on another top snow (which increases its height).=Dieser Block kann nur auf ganzen festen Blöcken und auf anderen Schneeschichten (was die Höhe erhöht) platziert werden. diff --git a/mods/ITEMS/mcl_core/locale/template.txt b/mods/ITEMS/mcl_core/locale/template.txt new file mode 100644 index 000000000..8460b90f0 --- /dev/null +++ b/mods/ITEMS/mcl_core/locale/template.txt @@ -0,0 +1,249 @@ +# textdomain: mcl_core +@1 could not survive in lava.= +@1 died in lava.= +@1 melted in lava.= +@1 took a bath in a hot lava tub.= +A block of diamond is mostly a shiny decorative block but also useful as a compact storage of diamonds.= +A block of emerald is mostly a shiny decorative block but also useful as a compact storage of emeralds.= +A block of gold is mostly a shiny decorative block but also useful as a compact storage of gold ingots.= +A block of iron is mostly a decorative block but also useful as a compact storage of iron ingots.= +A cactus can only be placed on top of another cactus or any sand.= +A decorative and mostly transparent block.= +A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.= +A lapis lazuli block is mostly a decorative block but also useful as a compact storage of lapis lazuli.= +A lava source sets fire to a couple of air blocks above when they're next to a flammable block.= +A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns.= +Acacia Bark= +Acacia Leaves= +Acacia Sapling= +Acacia Wood= +Acacia Wood Planks= +Acacia leaves are grown from acacia trees.= +Andesite= +Andesite is an igneous rock.= +Apple= +Apples are food items which can be eaten.= +Barrier= +Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.= +Bedrock= +Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.= +Birch Bark= +Birch Leaves= +Birch Sapling= +Birch Wood= +Birch Wood Planks= +Birch leaves are grown from birch trees.= +Black Stained Glass= +Block of Coal= +Block of Diamond= +Block of Emerald= +Block of Gold= +Block of Iron= +Blocks of coal are useful as a compact storage of coal and very useful as a furnace fuel. A block of coal is as efficient as 10 coal.= +Blue Stained Glass= +Bone Block= +Bone blocks are decorative blocks and a compact storage of bone meal.= +Bowl= +Bowls are mainly used to hold tasty soups.= +Brick= +Brick Block= +Brick blocks are a good building material for building solid houses and can take quite a punch.= +Bricks are used to craft brick blocks.= +Brown Stained Glass= +Cactus= +Charcoal= +Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks.= +Chiseled Stone Bricks= +Chiseled Red Sandstone= +Chiseled Sandstone= +Chiseled red sandstone is a decorative building block.= +Chiseled sandstone is a decorative building block.= +Clay= +Clay Ball= +Clay balls are a raw material, mainly used to create bricks in the furnace.= +Clay is a versatile kind of earth commonly found at beaches underwater.= +Coal= +Coal Ore= +Coarse Dirt= +Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover.= +Cobblestone= +Cobweb= +Cobwebs can be walked through, but significantly slow you down.= +Cracked Stone Bricks= +Cut Red Sandstone= +Cut Sandstone= +Cut red sandstone is a decorative building block.= +Cut sandstone is a decorative building block.= +Cyan Stained Glass= +Dark Oak Bark= +Dark Oak Leaves= +Dark Oak Sapling= +Dark Oak Wood= +Dark Oak Wood Planks= +Dark oak leaves are grown from dark oak trees.= +Dark oak saplings can grow into dark oaks, but only in groups. A lonely dark oak sapling won't grow. A group of four dark oak saplings grows into a dark oak after some time when they are placed on soil (such as dirt) in a 2×2 square and exposed to light.= +Dead Bush= +Dead bushes are unremarkable plants often found in dry areas. They can be harvested for sticks.= +Diamond= +Diamond Ore= +Diamond ore is rare and can be found in clusters near the bottom of the world.= +Diamonds are precious minerals and useful to create the highest tier of armor and tools.= +Diorite= +Diorite is an igneous rock.= +Dirt= +Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby.= +Emerald= +Emerald Ore= +Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters.= +Emeralds are not very useful on their own, but they can exchanged for gold ingots by crafting.= +Flint= +Flint is a raw material.= +Flowing Lava= +Flowing Water= +Frosted Ice= +Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds.= +Glass= +Gold Ingot= +Gold Nugget= +Gold Ore= +Gold nuggets are very small pieces of molten gold; the main purpose is to create gold ingots.= +Golden Apple= +Golden apples are precious food items which can be eaten.= +Granite= +Grass Block= +Grass Path= +Grass paths are a decorative variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created with a shovel. A grass path turns into dirt when it is below a solid block.= +Gravel= +Green Stained Glass= +Grey Stained Glass= +Ice= +Ice is a translucent solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.= +In the End dimension, starting a fire on this block will create an eternal fire.= +Iron Ingot= +Iron Nugget= +Iron Ore= +Iron nuggets are very small pieces of molten iron; the main purpose is to create iron ingots.= +Jungle Bark= +Jungle Leaves= +Jungle Sapling= +Jungle Wood= +Jungle Wood Planks= +Jungle leaves are grown from jungle trees.= +Ladder= +Lapis Lazuli Block= +Lapis Lazuli Ore= +Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.= +Lava Source= +Lava is hot and rather dangerous. Don't touch it, it will hurt you a lot and it is hard to get out.= +Light Blue Stained Glass= +Light Grey Stained Glass= +Lime Stained Glass= +Lit Redstone Ore= +Magenta Stained Glass= +Molten gold. It is used to craft armor, tools, and whatnot.= +Molten iron. It is used to craft armor, tools, and whatnot.= +Moss Stone= +Mossy Stone Bricks= +Mycelium= +Mycelium is a type of dirt and the ideal soil for mushrooms. Unlike other dirt-type blocks, it can not be turned into farmland with a hoe. In light, mycelium slowly spreads over nearby dirt. Under an opaque block or a liquid, it eventually turns back into dirt.= +Oak Bark= +Oak Leaves= +Oak Sapling= +Oak Wood= +Oak Wood Planks= +Oak leaves are grown from oak trees.= +Obsidian= +Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava.= +One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.= +Orange Stained Glass= +Packed Ice= +Packed ice is a compressed form of ice. It is opaque and solid.= +Paper= +Paper is used to craft books and maps.= +Pink Stained Glass= +Podzol= +Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it.= +Polished Andesite= +Polished Diorite= +Polished Granite= +Polished Stone= +Polished andesite is a decorative building block made from andesite.= +Polished diorite is a decorative building block made from diorite.= +Polished granite is a decorative building block made from granite.= +Purple Stained Glass= +Realm Barrier= +Red Sand= +Red Sandstone= +Red Stained Glass= +Red sand is found in large quantities in mesa biomes.= +Red sandstone is compressed red sand and is a rather soft kind of stone.= +Redstone Ore= +Redstone ore is commonly found near the bottom of the world. It glows when it is punched or walked upon.= +Sand= +Sand is found in large quantities at beaches and deserts.= +Sandstone= +Sandstone is compressed sand and is a rather soft kind of stone.= +Slime Block= +Slime blocks are very bouncy and prevent fall damage.= +Smooth Red Sandstone= +Smooth Sandstone= +Smooth red sandstone is a decorative building block.= +Smooth sandstone is compressed sand and is a rather soft kind of stone.= +Snow= +Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height.= +Some iron contained in stone, it is prety common and can be found below sea level.= +Spruce Bark= +Spruce Leaves= +Spruce Sapling= +Spruce Wood= +Spruce Wood Planks= +Spruce leaves are grown from spruce trees.= +Stained glass is a decorative and mostly transparent block which comes in various different colors.= +Stick= +Sticks are a very versatile crafting material; used in countless crafting recipes.= +Stone= +Stone Bricks= +Sugar= +Sugar Canes= +Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.= +Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.= +Sugar comes from sugar canes and is used to make sweet foods.= +The trunk of a birch tree.= +The trunk of a dark oak tree.= +The trunk of a jungle tree.= +The trunk of a spruce tree.= +The trunk of an acacia.= +The trunk of an oak tree.= +This block consists of a couple of loose stones and can't support itself.= +This is a decorative block surrounded by the bark of a tree trunk.= +This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.= +This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.= +This stone contains pure gold, a rare metal.= +Top Snow= +Top snow is a layer of snow. It melts near light sources other than the sun with a light level of 12 or higher.= +Vines= +Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread.= +Void= +Water= +Water Source= +Water is abundant in oceans and also appears in a few springs in the ground. You can swim easily in water, but you need to catch your breath from time to time.= +When placed on soil (such as dirt) and exposed to light, a birch sapling will grow into a birch after some time.= +When placed on soil (such as dirt) and exposed to light, a jungle sapling will grow into a jungle tree after some time. When there are 4 jungle saplings in a 2×2 square, they will grow to a huge jungle tree.= +When placed on soil (such as dirt) and exposed to light, a spruce sapling will grow into a spruce after some time. When there are 4 spruce saplings in a 2×2 square, they will grow to a huge spruce.= +When placed on soil (such as dirt) and exposed to light, an acacia sapling will grow into an acacia after some time.= +When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak after some time.= +When you hold a barrier in hand, you reveal all placed barriers in a short distance around you.= +White Stained Glass= +Yellow Stained Glass= +“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things.= +Water interacts with lava in various ways:= +• When water is directly above or horizontally next to a lava source, the lava turns into obsidian.= +• When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone.= +• When water is directly below lava, the water turns into stone.= +Lava interacts with water various ways:= +• When a lava source is directly below or horizontally next to water, the lava turns into obsidian.= +• When lava is directly above water, the water turns into stone.= +Stained Glass= +Granite is an igneous rock.= +Top snow can be stacked and has one of 8 different height levels. At levels 2-8, top snow is collidable. Top snow drops 2-9 snowballs, depending on its height.= +This block can only be placed on full solid blocks and on another top snow (which increases its height).= diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 237eff39f..50c1d1cc7 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_core") + -- Simple solid cubic nodes, most of them are the ground materials and simple building blocks minetest.register_node("mcl_core:stone", { - description = "Stone", - _doc_items_longdesc = "One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.", + description = S("Stone"), + _doc_items_longdesc = S("One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava."), _doc_items_hidden = false, tiles = {"default_stone.png"}, is_ground_content = true, @@ -15,8 +17,8 @@ minetest.register_node("mcl_core:stone", { }) minetest.register_node("mcl_core:stone_with_coal", { - description = "Coal Ore", - _doc_items_longdesc = "Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height.", + description = S("Coal Ore"), + _doc_items_longdesc = S("Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height."), _doc_items_hidden = false, tiles = {"mcl_core_coal_ore.png"}, is_ground_content = true, @@ -29,8 +31,8 @@ minetest.register_node("mcl_core:stone_with_coal", { }) minetest.register_node("mcl_core:stone_with_iron", { - description = "Iron Ore", - _doc_items_longdesc = "Some iron contained in stone, it is prety common and can be found below sea level.", + description = S("Iron Ore"), + _doc_items_longdesc = S("Some iron contained in stone, it is prety common and can be found below sea level."), tiles = {"mcl_core_iron_ore.png"}, is_ground_content = true, stack_max = 64, @@ -43,8 +45,8 @@ minetest.register_node("mcl_core:stone_with_iron", { minetest.register_node("mcl_core:stone_with_gold", { - description = "Gold Ore", - _doc_items_longdesc = "This stone contains pure gold, a rare metal.", + description = S("Gold Ore"), + _doc_items_longdesc = S("This stone contains pure gold, a rare metal."), tiles = {"mcl_core_gold_ore.png"}, is_ground_content = true, stack_max = 64, @@ -62,8 +64,8 @@ local redstone_ore_activate = function(pos) t:start(redstone_timer) end minetest.register_node("mcl_core:stone_with_redstone", { - description = "Redstone Ore", - _doc_items_longdesc = "Redstone ore is commonly found near the bottom of the world. It glows when it is punched or walked upon.", + description = S("Redstone Ore"), + _doc_items_longdesc = S("Redstone ore is commonly found near the bottom of the world. It glows when it is punched or walked upon."), tiles = {"mcl_core_redstone_ore.png"}, is_ground_content = true, stack_max = 64, @@ -93,7 +95,7 @@ local redstone_ore_reactivate = function(pos) end -- Light the redstone ore up when it has been touched minetest.register_node("mcl_core:stone_with_redstone_lit", { - description = "Lit Redstone Ore", + description = S("Lit Redstone Ore"), _doc_items_create_entry = false, tiles = {"mcl_core_redstone_ore.png"}, paramtype = "light", @@ -126,8 +128,8 @@ minetest.register_node("mcl_core:stone_with_redstone_lit", { }) minetest.register_node("mcl_core:stone_with_lapis", { - description = "Lapis Lazuli Ore", - _doc_items_longdesc = "Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.", + description = S("Lapis Lazuli Ore"), + _doc_items_longdesc = S("Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world."), tiles = {"mcl_core_lapis_ore.png"}, is_ground_content = true, stack_max = 64, @@ -148,8 +150,8 @@ minetest.register_node("mcl_core:stone_with_lapis", { }) minetest.register_node("mcl_core:stone_with_emerald", { - description = "Emerald Ore", - _doc_items_longdesc = "Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters.", + description = S("Emerald Ore"), + _doc_items_longdesc = S("Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters."), tiles = {"mcl_core_emerald_ore.png"}, is_ground_content = true, stack_max = 64, @@ -161,8 +163,8 @@ minetest.register_node("mcl_core:stone_with_emerald", { }) minetest.register_node("mcl_core:stone_with_diamond", { - description = "Diamond Ore", - _doc_items_longdesc = "Diamond ore is rare and can be found in clusters near the bottom of the world.", + description = S("Diamond Ore"), + _doc_items_longdesc = S("Diamond ore is rare and can be found in clusters near the bottom of the world."), tiles = {"mcl_core_diamond_ore.png"}, is_ground_content = true, stack_max = 64, @@ -174,7 +176,7 @@ minetest.register_node("mcl_core:stone_with_diamond", { }) minetest.register_node("mcl_core:stonebrick", { - description = "Stone Bricks", + description = S("Stone Bricks"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"default_stone_brick.png"}, stack_max = 64, @@ -186,7 +188,7 @@ minetest.register_node("mcl_core:stonebrick", { }) minetest.register_node("mcl_core:stonebrickcarved", { - description = "Chiseled Stone Bricks", + description = S("Chiseled Stone Bricks"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_core_stonebrick_carved.png"}, stack_max = 64, @@ -198,7 +200,7 @@ minetest.register_node("mcl_core:stonebrickcarved", { }) minetest.register_node("mcl_core:stonebrickcracked", { - description = "Cracked Stone Bricks", + description = S("Cracked Stone Bricks"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_core_stonebrick_cracked.png"}, stack_max = 64, @@ -210,7 +212,7 @@ minetest.register_node("mcl_core:stonebrickcracked", { }) minetest.register_node("mcl_core:stonebrickmossy", { - description = "Mossy Stone Bricks", + description = S("Mossy Stone Bricks"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_core_stonebrick_mossy.png"}, stack_max = 64, @@ -222,7 +224,7 @@ minetest.register_node("mcl_core:stonebrickmossy", { }) minetest.register_node("mcl_core:stone_smooth", { - description = "Polished Stone", + description = S("Polished Stone"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_stairs_stone_slab_top.png"}, stack_max = 64, @@ -234,8 +236,8 @@ minetest.register_node("mcl_core:stone_smooth", { }) minetest.register_node("mcl_core:granite", { - description = "Granite", - _doc_items_longdesc = "Granite is an igneous rock.", + description = S("Granite"), + _doc_items_longdesc = S("Granite is an igneous rock."), tiles = {"mcl_core_granite.png"}, is_ground_content = true, stack_max = 64, @@ -246,8 +248,8 @@ minetest.register_node("mcl_core:granite", { }) minetest.register_node("mcl_core:granite_smooth", { - description = "Polished Granite", - _doc_items_longdesc = "Polished granite is a decorational building block made from granite.", + description = S("Polished Granite"), + _doc_items_longdesc = S("Polished granite is a decorative building block made from granite."), tiles = {"mcl_core_granite_smooth.png"}, stack_max = 64, is_ground_content = false, @@ -258,8 +260,8 @@ minetest.register_node("mcl_core:granite_smooth", { }) minetest.register_node("mcl_core:andesite", { - description = "Andesite", - _doc_items_longdesc = "Andesite is an igneous rock.", + description = S("Andesite"), + _doc_items_longdesc = S("Andesite is an igneous rock."), tiles = {"mcl_core_andesite.png"}, is_ground_content = true, stack_max = 64, @@ -270,8 +272,8 @@ minetest.register_node("mcl_core:andesite", { }) minetest.register_node("mcl_core:andesite_smooth", { - description = "Polished Andesite", - _doc_items_longdesc = "Polished andesite is a decorational building block made from andesite.", + description = S("Polished Andesite"), + _doc_items_longdesc = S("Polished andesite is a decorative building block made from andesite."), tiles = {"mcl_core_andesite_smooth.png"}, is_ground_content = false, stack_max = 64, @@ -282,8 +284,8 @@ minetest.register_node("mcl_core:andesite_smooth", { }) minetest.register_node("mcl_core:diorite", { - description = "Diorite", - _doc_items_longdesc = "Diorite is an igneous rock.", + description = S("Diorite"), + _doc_items_longdesc = S("Diorite is an igneous rock."), tiles = {"mcl_core_diorite.png"}, is_ground_content = true, stack_max = 64, @@ -294,8 +296,8 @@ minetest.register_node("mcl_core:diorite", { }) minetest.register_node("mcl_core:diorite_smooth", { - description = "Polished Diorite", - _doc_items_longdesc = "Polished diorite is a decorational building block made from diorite.", + description = S("Polished Diorite"), + _doc_items_longdesc = S("Polished diorite is a decorative building block made from diorite."), tiles = {"mcl_core_diorite_smooth.png"}, is_ground_content = false, stack_max = 64, @@ -307,30 +309,21 @@ minetest.register_node("mcl_core:diorite_smooth", { -- Grass Block minetest.register_node("mcl_core:dirt_with_grass", { - description = "Grass Block", - _doc_items_longdesc = "A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.", + description = S("Grass Block"), + _doc_items_longdesc = S("A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt."), _doc_items_hidden = false, tiles = {"default_grass.png", "default_dirt.png", {name="default_dirt.png^default_grass_side.png", tileable_vertical=false}}, is_ground_content = true, stack_max = 64, - groups = {handy=1,shovely=1, grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1}, + groups = {handy=1,shovely=1,dirt=2,grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1}, drop = 'mcl_core:dirt', sounds = mcl_sounds.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain=0.4}, }), on_construct = function(pos) - local dim = mcl_worlds.pos_to_dimension(pos) - local dry - if dim == "nether" then - dry = true - else - local found_node = minetest.find_node_near(pos, 1, {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt_with_dry_grass_snow"}) - if found_node then - dry = true - end - end - if dry then - minetest.set_node(pos, {name="mcl_core:dirt_with_dry_grass"}) + local new_node = mcl_core.get_grass_block_type(pos) + if new_node.name ~= "mcl_core:dirt_with_grass" then + minetest.set_node(pos, new_node) end return mcl_core.on_snowable_construct(pos) end, @@ -347,7 +340,7 @@ minetest.register_node("mcl_core:dirt_with_dry_grass", { tiles = {"default_dry_grass.png", "default_dirt.png", {name="default_dirt.png^default_dry_grass_side.png", tileable_vertical=false}}, is_ground_content = true, stack_max = 64, - groups = {handy=1,shovely=1, grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, not_in_creative_inventory=1}, + groups = {handy=1,shovely=1, dirt=2,grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, not_in_creative_inventory=1}, drop = 'mcl_core:dirt', sounds = mcl_sounds.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain=0.4}, @@ -367,8 +360,8 @@ end minetest.register_node("mcl_core:grass_path", { tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"}, - description = "Grass Path", - _doc_items_longdesc = "Grass paths are a decorational variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created with a shovel. A grass path turns into dirt when it is below a solid block.", + description = S("Grass Path"), + _doc_items_longdesc = S("Grass paths are a decorative variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created with a shovel. A grass path turns into dirt when it is below a solid block."), drop = "mcl_core:dirt", is_ground_content = true, drawtype = "nodebox", @@ -390,12 +383,12 @@ minetest.register_node("mcl_core:grass_path", { -- TODO: Add particles minetest.register_node("mcl_core:mycelium", { - description = "Mycelium", - _doc_items_longdesc = "Mycelium is a type of dirt and the ideal soil for mushrooms. Unlike other dirt-type blocks, it can not be turned into farmland with a hoe. In light, mycelium slowly spreads over nearby dirt. Under an opaque block or a liquid, it eventually turns back into dirt.", + description = S("Mycelium"), + _doc_items_longdesc = S("Mycelium is a type of dirt and the ideal soil for mushrooms. Unlike other dirt-type blocks, it can not be turned into farmland with a hoe. In light, mycelium slowly spreads over nearby dirt. Under an opaque block or a liquid, it eventually turns back into dirt."), tiles = {"mcl_core_mycelium_top.png", "default_dirt.png", {name="mcl_core_mycelium_side.png", tileable_vertical=false}}, is_ground_content = true, stack_max = 64, - groups = {handy=1,shovely=1, spreading_dirt_type=1, building_block=1}, + groups = {handy=1,shovely=1, dirt=2,spreading_dirt_type=1, building_block=1}, drop = 'mcl_core:dirt', sounds = mcl_sounds.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain=0.4}, @@ -409,12 +402,12 @@ minetest.register_node("mcl_core:mycelium", { mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium") minetest.register_node("mcl_core:podzol", { - description = "Podzol", - _doc_items_longdesc = "Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it.", + description = S("Podzol"), + _doc_items_longdesc = S("Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it."), tiles = {"mcl_core_dirt_podzol_top.png", "default_dirt.png", {name="mcl_core_dirt_podzol_side.png", tileable_vertical=false}}, is_ground_content = true, stack_max = 64, - groups = {handy=1,shovely=3, soil=1, soil_sapling=2, soil_sugarcane=1, enderman_takable=1, building_block=1}, + groups = {handy=1,shovely=3, dirt=2,soil=1, soil_sapling=2, soil_sugarcane=1, enderman_takable=1, building_block=1}, drop = 'mcl_core:dirt', sounds = mcl_sounds.node_sound_dirt_defaults(), on_construct = mcl_core.on_snowable_construct, @@ -425,33 +418,33 @@ minetest.register_node("mcl_core:podzol", { mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol") minetest.register_node("mcl_core:dirt", { - description = "Dirt", - _doc_items_longdesc = "Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby.", + description = S("Dirt"), + _doc_items_longdesc = S("Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby."), _doc_items_hidden = false, tiles = {"default_dirt.png"}, is_ground_content = true, stack_max = 64, - groups = {handy=1,shovely=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, enderman_takable=1, building_block=1}, + groups = {handy=1,shovely=1, dirt=1,soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, enderman_takable=1, building_block=1}, sounds = mcl_sounds.node_sound_dirt_defaults(), _mcl_blast_resistance = 3, _mcl_hardness = 0.5, }) minetest.register_node("mcl_core:coarse_dirt", { - description = "Coarse Dirt", - _doc_items_longdesc = "Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover.", + description = S("Coarse Dirt"), + _doc_items_longdesc = S("Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover."), tiles = {"mcl_core_coarse_dirt.png"}, is_ground_content = true, stack_max = 64, - groups = {handy=1,shovely=1, soil=1, soil_sugarcane=1, cultivatable=1, enderman_takable=1, building_block=1}, + groups = {handy=1,shovely=1, dirt=3,soil=1, soil_sugarcane=1, cultivatable=1, enderman_takable=1, building_block=1}, sounds = mcl_sounds.node_sound_dirt_defaults(), _mcl_blast_resistance = 3, _mcl_hardness = 0.5, }) minetest.register_node("mcl_core:gravel", { - description = "Gravel", - _doc_items_longdesc = "This block consists of a couple of loose stones and can't support itself.", + description = S("Gravel"), + _doc_items_longdesc = S("This block consists of a couple of loose stones and can't support itself."), tiles = {"default_gravel.png"}, is_ground_content = true, stack_max = 64, @@ -472,8 +465,8 @@ minetest.register_node("mcl_core:gravel", { -- sandstone -- minetest.register_node("mcl_core:sand", { - description = "Sand", - _doc_items_longdesc = "Sand is found in large quantities at beaches and deserts.", + description = S("Sand"), + _doc_items_longdesc = S("Sand is found in large quantities at beaches and deserts."), _doc_items_hidden = false, tiles = {"default_sand.png"}, is_ground_content = true, @@ -485,50 +478,50 @@ minetest.register_node("mcl_core:sand", { }) minetest.register_node("mcl_core:sandstone", { - description = "Sandstone", + description = S("Sandstone"), _doc_items_hidden = false, - _doc_items_longdesc = "Sandstone is compressed sand and is a rather soft kind of stone.", + _doc_items_longdesc = S("Sandstone is compressed sand and is a rather soft kind of stone."), tiles = {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"}, is_ground_content = true, stack_max = 64, - groups = {pickaxey=1, sandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, }) minetest.register_node("mcl_core:sandstonesmooth", { - description = "Cut Sandstone", - _doc_items_longdesc = "Cut sandstone is a decorational building block.", + description = S("Cut Sandstone"), + _doc_items_longdesc = S("Cut sandstone is a decorative building block."), tiles = {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_smooth.png"}, is_ground_content = false, stack_max = 64, - groups = {pickaxey=1, sandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, }) minetest.register_node("mcl_core:sandstonecarved", { - description = "Chiseled Sandstone", - _doc_items_longdesc = "Chiseled sandstone is a decorational building block.", + description = S("Chiseled Sandstone"), + _doc_items_longdesc = S("Chiseled sandstone is a decorative building block."), tiles = {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_carved.png"}, is_ground_content = false, stack_max = 64, - groups = {pickaxey=1, sandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, }) minetest.register_node("mcl_core:sandstonesmooth2", { - description = "Smooth Sandstone", + description = S("Smooth Sandstone"), _doc_items_hidden = false, - _doc_items_longdesc = "Smooth sandstone is compressed sand and is a rather soft kind of stone.", + _doc_items_longdesc = S("Smooth sandstone is compressed sand and is a rather soft kind of stone."), tiles = {"mcl_core_sandstone_top.png"}, is_ground_content = false, stack_max = 64, - groups = {pickaxey=1, sandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, @@ -537,8 +530,8 @@ minetest.register_node("mcl_core:sandstonesmooth2", { -- red sandstone -- minetest.register_node("mcl_core:redsand", { - description = "Red Sand", - _doc_items_longdesc = "Red sand is found in large quantities in mesa biomes.", + description = S("Red Sand"), + _doc_items_longdesc = S("Red sand is found in large quantities in mesa biomes."), tiles = {"mcl_core_red_sand.png"}, is_ground_content = true, stack_max = 64, @@ -549,48 +542,48 @@ minetest.register_node("mcl_core:redsand", { }) minetest.register_node("mcl_core:redsandstone", { - description = "Red Sandstone", - _doc_items_longdesc = "Red sandstone is compressed red sand and is a rather soft kind of stone.", + description = S("Red Sandstone"), + _doc_items_longdesc = S("Red sandstone is compressed red sand and is a rather soft kind of stone."), tiles = {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"}, is_ground_content = true, stack_max = 64, - groups = {pickaxey=1, redsandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, }) minetest.register_node("mcl_core:redsandstonesmooth", { - description = "Cut Red Sandstone", - _doc_items_longdesc = "Cut red sandstone is a decorational building block.", + description = S("Cut Red Sandstone"), + _doc_items_longdesc = S("Cut red sandstone is a decorative building block."), tiles = {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_smooth.png"}, is_ground_content = false, stack_max = 64, - groups = {pickaxey=1, redsandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, }) minetest.register_node("mcl_core:redsandstonecarved", { - description = "Chiseled Red Sandstone", - _doc_items_longdesc = "Chiseled red sandstone is a decorational building block.", + description = S("Chiseled Red Sandstone"), + _doc_items_longdesc = S("Chiseled red sandstone is a decorative building block."), tiles = {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_carved.png"}, is_ground_content = false, stack_max = 64, - groups = {pickaxey=1, redsandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, }) minetest.register_node("mcl_core:redsandstonesmooth2", { - description = "Smooth Red Sandstone", - _doc_items_longdesc = "Smooth red sandstone is a decorational building block.", + description = S("Smooth Red Sandstone"), + _doc_items_longdesc = S("Smooth red sandstone is a decorative building block."), tiles = {"mcl_core_red_sandstone_top.png"}, is_ground_content = false, stack_max = 64, - groups = {pickaxey=1, redsandstone=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, _mcl_hardness = 0.8, @@ -599,8 +592,8 @@ minetest.register_node("mcl_core:redsandstonesmooth2", { --- minetest.register_node("mcl_core:clay", { - description = "Clay", - _doc_items_longdesc = "Clay is a versatile kind of earth commonly found at beaches underwater.", + description = S("Clay"), + _doc_items_longdesc = S("Clay is a versatile kind of earth commonly found at beaches underwater."), _doc_items_hidden = false, tiles = {"default_clay.png"}, is_ground_content = true, @@ -614,8 +607,8 @@ minetest.register_node("mcl_core:clay", { minetest.register_node("mcl_core:brick_block", { -- Original name: “Bricks” - description = "Brick Block", - _doc_items_longdesc = "Brick blocks are a good building material for building solid houses and can take quite a punch.", + description = S("Brick Block"), + _doc_items_longdesc = S("Brick blocks are a good building material for building solid houses and can take quite a punch."), tiles = {"default_brick.png"}, is_ground_content = false, stack_max = 64, @@ -627,9 +620,9 @@ minetest.register_node("mcl_core:brick_block", { minetest.register_node("mcl_core:bedrock", { - description = "Bedrock", - _doc_items_longdesc = "Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.".."\n".. - "In the End dimension, starting a fire on this block will create an eternal fire.", + description = S("Bedrock"), + _doc_items_longdesc = S("Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.").."\n".. + S("In the End dimension, starting a fire on this block will create an eternal fire."), tiles = {"mcl_core_bedrock.png"}, stack_max = 64, groups = {creative_breakable=1, building_block=1, material_stone=1}, @@ -666,7 +659,7 @@ minetest.register_node("mcl_core:bedrock", { }) minetest.register_node("mcl_core:cobble", { - description = "Cobblestone", + description = S("Cobblestone"), _doc_items_longdesc = doc.sub.items.temp.build, _doc_items_hidden = false, tiles = {"default_cobble.png"}, @@ -679,7 +672,7 @@ minetest.register_node("mcl_core:cobble", { }) minetest.register_node("mcl_core:mossycobble", { - description = "Moss Stone", + description = S("Moss Stone"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"default_mossycobble.png"}, is_ground_content = false, @@ -691,8 +684,8 @@ minetest.register_node("mcl_core:mossycobble", { }) minetest.register_node("mcl_core:coalblock", { - description = "Block of Coal", - _doc_items_longdesc = "Blocks of coal are useful as a compact storage of coal and very useful as a furnace fuel. A block of coal is as efficient as 10 coal.", + description = S("Block of Coal"), + _doc_items_longdesc = S("Blocks of coal are useful as a compact storage of coal and very useful as a furnace fuel. A block of coal is as efficient as 10 coal."), tiles = {"default_coal_block.png"}, is_ground_content = false, stack_max = 64, @@ -703,8 +696,8 @@ minetest.register_node("mcl_core:coalblock", { }) minetest.register_node("mcl_core:ironblock", { - description = "Block of Iron", - _doc_items_longdesc = "A block of iron is mostly a decorational block but also useful as a compact storage of iron ingots.", + description = S("Block of Iron"), + _doc_items_longdesc = S("A block of iron is mostly a decorative block but also useful as a compact storage of iron ingots."), tiles = {"default_steel_block.png"}, is_ground_content = false, stack_max = 64, @@ -715,8 +708,8 @@ minetest.register_node("mcl_core:ironblock", { }) minetest.register_node("mcl_core:goldblock", { - description = "Block of Gold", - _doc_items_longdesc = "A block of gold is mostly a shiny decorational block but also useful as a compact storage of gold ingots.", + description = S("Block of Gold"), + _doc_items_longdesc = S("A block of gold is mostly a shiny decorative block but also useful as a compact storage of gold ingots."), tiles = {"default_gold_block.png"}, is_ground_content = false, stack_max = 64, @@ -727,8 +720,8 @@ minetest.register_node("mcl_core:goldblock", { }) minetest.register_node("mcl_core:diamondblock", { - description = "Block of Diamond", - _doc_items_longdesc = "A block of diamond mostly a shiny decorational block but also useful as a compact storage of diamonds.", + description = S("Block of Diamond"), + _doc_items_longdesc = S("A block of diamond is mostly a shiny decorative block but also useful as a compact storage of diamonds."), tiles = {"default_diamond_block.png"}, is_ground_content = false, stack_max = 64, @@ -739,8 +732,8 @@ minetest.register_node("mcl_core:diamondblock", { }) minetest.register_node("mcl_core:lapisblock", { - description = "Lapis Lazuli Block", - _doc_items_longdesc = "A lapis lazuli block is mostly a decorational block but also useful as a compact storage of lapis lazuli.", + description = S("Lapis Lazuli Block"), + _doc_items_longdesc = S("A lapis lazuli block is mostly a decorative block but also useful as a compact storage of lapis lazuli."), tiles = {"mcl_core_lapis_block.png"}, is_ground_content = false, stack_max = 64, @@ -751,8 +744,8 @@ minetest.register_node("mcl_core:lapisblock", { }) minetest.register_node("mcl_core:emeraldblock", { - description = "Block of Emerald", - _doc_items_longdesc = "A block of emerald is mostly a shiny decorational block but also useful as a compact storage of emeralds.", + description = S("Block of Emerald"), + _doc_items_longdesc = S("A block of emerald is mostly a shiny decorative block but also useful as a compact storage of emeralds."), tiles = {"mcl_core_emerald_block.png"}, is_ground_content = false, stack_max = 64, @@ -763,8 +756,8 @@ minetest.register_node("mcl_core:emeraldblock", { }) minetest.register_node("mcl_core:obsidian", { - description = "Obsidian", - _doc_items_longdesc = "Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava.", + description = S("Obsidian"), + _doc_items_longdesc = S("Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava."), tiles = {"default_obsidian.png"}, is_ground_content = true, sounds = mcl_sounds.node_sound_stone_defaults(), @@ -775,8 +768,8 @@ minetest.register_node("mcl_core:obsidian", { }) minetest.register_node("mcl_core:ice", { - description = "Ice", - _doc_items_longdesc = "Ice is a translucent solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.", + description = S("Ice"), + _doc_items_longdesc = S("Ice is a translucent solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source."), drawtype = "glasslike", tiles = {"default_ice.png"}, is_ground_content = true, @@ -786,22 +779,17 @@ minetest.register_node("mcl_core:ice", { groups = {handy=1,pickaxey=1, slippery=3, building_block=1}, drop = "", sounds = mcl_sounds.node_sound_glass_defaults(), - after_destruct = function(pos, oldnode) - -- Create a water source if ice is destroyed and there was something below it - local below = {x=pos.x, y=pos.y-1, z=pos.z} - local belownode = minetest.get_node(below) - local dim = mcl_worlds.pos_to_dimension(below) - if dim ~= "nether" and belownode.name ~= "air" and belownode.name ~= "ignore" and belownode.name ~= "mcl_core:void" then - minetest.set_node(pos, {name="mcl_core:water_source"}) - end + node_dig_prediction = "mcl_core:water_source", + after_dig_node = function(pos, oldnode) + mcl_core.melt_ice(pos) end, _mcl_blast_resistance = 2.5, _mcl_hardness = 0.5, }) minetest.register_node("mcl_core:packed_ice", { - description = "Packed Ice", - _doc_items_longdesc = "Packed ice is a compressed form of ice. It is opaque and solid.", + description = S("Packed Ice"), + _doc_items_longdesc = S("Packed ice is a compressed form of ice. It is opaque and solid."), tiles = {"mcl_core_ice_packed.png"}, is_ground_content = true, stack_max = 64, @@ -840,10 +828,10 @@ for i=0,3 do local use_doc = i == 0 local longdesc if use_doc then - longdesc = "Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds." + longdesc = S("Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds.") end minetest.register_node("mcl_core:frosted_ice_"..i, { - description = "Frosted Ice", + description = S("Frosted Ice"), _doc_items_create_entry = use_doc, _doc_items_longdesc = longdesc, drawtype = "glasslike", @@ -886,9 +874,9 @@ for i=1,8 do local id, desc, longdesc, usagehelp, help, walkable, drawtype, node_box if i == 1 then id = "mcl_core:snow" - desc = "Top Snow" - longdesc = "Top snow is a layer of snow. It melts near light sources other than the sun with a light level of 12 or higher.".."\n".."Top snow can be stacked and has one of 8 different height levels. At levels 2-8, top snow is collidable. Top snow drops 2-9 snowballs, depending on its height." - usagehelp = "This block can only be placed on full solid blocks and on another top snow (which increases its height)." + desc = S("Top Snow") + longdesc = S("Top snow is a layer of snow. It melts near light sources other than the sun with a light level of 12 or higher.").."\n"..S("Top snow can be stacked and has one of 8 different height levels. At levels 2-8, top snow is collidable. Top snow drops 2-9 snowballs, depending on its height.") + usagehelp = S("This block can only be placed on full solid blocks and on another top snow (which increases its height).") walkable = false else id = "mcl_core:snow_"..i @@ -995,8 +983,8 @@ for i=1,8 do end minetest.register_node("mcl_core:snowblock", { - description = "Snow", - _doc_items_longdesc = "This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.", + description = S("Snow"), + _doc_items_longdesc = S("This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold."), _doc_items_hidden = false, tiles = {"default_snow.png"}, is_ground_content = true, diff --git a/mods/ITEMS/mcl_core/nodes_cactuscane.lua b/mods/ITEMS/mcl_core/nodes_cactuscane.lua index d0c00654b..59efa7592 100644 --- a/mods/ITEMS/mcl_core/nodes_cactuscane.lua +++ b/mods/ITEMS/mcl_core/nodes_cactuscane.lua @@ -1,9 +1,11 @@ -- Cactus and Sugar Cane +local S = minetest.get_translator("mcl_core") + minetest.register_node("mcl_core:cactus", { - description = "Cactus", - _doc_items_longdesc = "This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.", - _doc_items_usagehelp = "A cactus can only be placed on top of another cactus or any sand.", + description = S("Cactus"), + _doc_items_longdesc = S("This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well."), + _doc_items_usagehelp = S("A cactus can only be placed on top of another cactus or any sand."), drawtype = "nodebox", tiles = {"mcl_core_cactus_top.png", "mcl_core_cactus_bottom.png", "mcl_core_cactus_side.png"}, is_ground_content = true, @@ -44,9 +46,9 @@ minetest.register_node("mcl_core:cactus", { }) minetest.register_node("mcl_core:reeds", { - description = "Sugar Canes", - _doc_items_longdesc = "Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.", - _doc_items_usagehelp = "Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.", + description = S("Sugar Canes"), + _doc_items_longdesc = S("Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well."), + _doc_items_usagehelp = S("Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow."), drawtype = "plantlike", tiles = {"default_papyrus.png"}, inventory_image = "mcl_core_reeds.png", diff --git a/mods/ITEMS/mcl_core/nodes_climb.lua b/mods/ITEMS/mcl_core/nodes_climb.lua index 528186951..2c71f677b 100644 --- a/mods/ITEMS/mcl_core/nodes_climb.lua +++ b/mods/ITEMS/mcl_core/nodes_climb.lua @@ -1,8 +1,9 @@ -- Climbable nodes +local S = minetest.get_translator("mcl_core") minetest.register_node("mcl_core:ladder", { - description = "Ladder", - _doc_items_longdesc = "A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns.", + description = S("Ladder"), + _doc_items_longdesc = S("A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns."), drawtype = "signlike", is_ground_content = false, tiles = {"default_ladder.png"}, @@ -77,8 +78,8 @@ minetest.register_node("mcl_core:ladder", { minetest.register_node("mcl_core:vine", { - description = "Vines", - _doc_items_longdesc = "Vines are climbable blocks which can be placed on the sides solid full-cube blocks. Vines slowly grow and spread.", + description = S("Vines"), + _doc_items_longdesc = S("Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread."), drawtype = "signlike", tiles = {"mcl_core_vine.png"}, inventory_image = "mcl_core_vine.png", @@ -141,13 +142,14 @@ minetest.register_node("mcl_core:vine", { return itemstack end, - -- If destroyed, also a “dependant” vine below it. + -- If dug, also dig a “dependant” vine below it. -- A vine is dependant if it hangs from this node and has no supporting block. - after_destruct = function(pos, oldnode) + on_dig = function(pos, node, digger) local below = {x=pos.x, y=pos.y-1, z=pos.z} local belownode = minetest.get_node(below) - if belownode.name == oldnode.name and (not mcl_core.check_vines_supported(below, belownode)) then - minetest.remove_node(below) + minetest.node_dig(pos, node, digger) + if belownode.name == node.name and (not mcl_core.check_vines_supported(below, belownode)) then + minetest.registered_nodes[node.name].on_dig(below, node, digger) end end, diff --git a/mods/ITEMS/mcl_core/nodes_glass.lua b/mods/ITEMS/mcl_core/nodes_glass.lua index 6bd8a9248..3ac2cb394 100644 --- a/mods/ITEMS/mcl_core/nodes_glass.lua +++ b/mods/ITEMS/mcl_core/nodes_glass.lua @@ -1,8 +1,10 @@ -- Glass nodes +local S = minetest.get_translator("mcl_core") +local mod_doc = minetest.get_modpath("doc") minetest.register_node("mcl_core:glass", { - description = "Glass", - _doc_items_longdesc = "A decorational and mostly transparent block.", + description = S("Glass"), + _doc_items_longdesc = S("A decorative and mostly transparent block."), drawtype = "glasslike", is_ground_content = false, tiles = {"default_glass.png"}, @@ -19,11 +21,23 @@ minetest.register_node("mcl_core:glass", { ------------------------ -- Create Color Glass -- ------------------------ -function mcl_core.add_glass(desc, recipeitem, colorgroup, color) +local canonical_color = "yellow" +function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color) + local longdesc, create_entry, entry_name + if mod_doc then + if color == canonical_color then + longdesc = S("Stained glass is a decorative and mostly transparent block which comes in various different colors.") + entry_name = S("Stained Glass") + else + create_entry = false + end + end minetest.register_node("mcl_core:glass_"..color, { description = desc, - _doc_items_longdesc = "Stained glass is a decorational and mostly transparent block which comes in various different colors.", + _doc_items_create_entry = create_entry, + _doc_items_entry_name = entry_name, + _doc_items_longdesc = longdesc, drawtype = "glasslike", is_ground_content = false, tiles = {"mcl_core_glass_"..color..".png"}, @@ -47,23 +61,27 @@ function mcl_core.add_glass(desc, recipeitem, colorgroup, color) {'mcl_core:glass','mcl_core:glass','mcl_core:glass'}, } }) + + if mod_doc and color ~= canonical_color then + doc.add_entry_alias("nodes", "mcl_core:glass_"..canonical_color, "nodes", "mcl_core:glass_"..color) + end + end ---- colored glass -mcl_core.add_glass( "Red Stained Glass", "mcl_dye:red", "basecolor_red", "red") -mcl_core.add_glass( "Green Stained Glass", "mcl_dye:dark_green", "unicolor_dark_green", "green") -mcl_core.add_glass( "Blue Stained Glass", "mcl_dye:blue", "basecolor_blue", "blue") -mcl_core.add_glass( "Light Blue Stained Glass", "mcl_dye:lightblue", "unicolor_light_blue", "light_blue") -mcl_core.add_glass( "Black Stained Glass", "mcl_dye:black", "basecolor_black", "black") -mcl_core.add_glass( "White Stained Glass", "mcl_dye:white", "basecolor_white", "white") -mcl_core.add_glass( "Yellow Stained Glass", "mcl_dye:yellow", "basecolor_yellow", "yellow") -mcl_core.add_glass( "Brown Stained Glass", "mcl_dye:brown", "unicolor_dark_orange", "brown") -mcl_core.add_glass( "Orange Stained Glass", "mcl_dye:orange", "excolor_orange", "orange") -mcl_core.add_glass( "Pink Stained Glass", "mcl_dye:pink", "unicolor_light_red", "pink") -mcl_core.add_glass( "Grey Stained Glass", "mcl_dye:dark_grey", "unicolor_darkgrey", "gray") -mcl_core.add_glass( "Lime Stained Glass", "mcl_dye:green", "basecolor_green", "lime") -mcl_core.add_glass( "Light Grey Stained Glass", "mcl_dye:grey", "basecolor_grey", "silver") -mcl_core.add_glass( "Magenta Stained Glass", "mcl_dye:magenta", "basecolor_magenta", "magenta") -mcl_core.add_glass( "Purple Stained Glass", "mcl_dye:violet", "excolor_violet", "purple") -mcl_core.add_glass( "Cyan Stained Glass", "mcl_dye:cyan", "basecolor_cyan", "cyan") - +mcl_core.add_stained_glass( S("Red Stained Glass"), "mcl_dye:red", "basecolor_red", "red") +mcl_core.add_stained_glass( S("Green Stained Glass"), "mcl_dye:dark_green", "unicolor_dark_green", "green") +mcl_core.add_stained_glass( S("Blue Stained Glass"), "mcl_dye:blue", "basecolor_blue", "blue") +mcl_core.add_stained_glass( S("Light Blue Stained Glass"), "mcl_dye:lightblue", "unicolor_light_blue", "light_blue") +mcl_core.add_stained_glass( S("Black Stained Glass"), "mcl_dye:black", "basecolor_black", "black") +mcl_core.add_stained_glass( S("White Stained Glass"), "mcl_dye:white", "basecolor_white", "white") +mcl_core.add_stained_glass( S("Yellow Stained Glass"), "mcl_dye:yellow", "basecolor_yellow", "yellow") +mcl_core.add_stained_glass( S("Brown Stained Glass"), "mcl_dye:brown", "unicolor_dark_orange", "brown") +mcl_core.add_stained_glass( S("Orange Stained Glass"), "mcl_dye:orange", "excolor_orange", "orange") +mcl_core.add_stained_glass( S("Pink Stained Glass"), "mcl_dye:pink", "unicolor_light_red", "pink") +mcl_core.add_stained_glass( S("Grey Stained Glass"), "mcl_dye:dark_grey", "unicolor_darkgrey", "gray") +mcl_core.add_stained_glass( S("Lime Stained Glass"), "mcl_dye:green", "basecolor_green", "lime") +mcl_core.add_stained_glass( S("Light Grey Stained Glass"), "mcl_dye:grey", "basecolor_grey", "silver") +mcl_core.add_stained_glass( S("Magenta Stained Glass"), "mcl_dye:magenta", "basecolor_magenta", "magenta") +mcl_core.add_stained_glass( S("Purple Stained Glass"), "mcl_dye:violet", "excolor_violet", "purple") +mcl_core.add_stained_glass( S("Cyan Stained Glass"), "mcl_dye:cyan", "basecolor_cyan", "cyan") diff --git a/mods/ITEMS/mcl_core/nodes_liquid.lua b/mods/ITEMS/mcl_core/nodes_liquid.lua index 7d7386907..815fd6fe1 100644 --- a/mods/ITEMS/mcl_core/nodes_liquid.lua +++ b/mods/ITEMS/mcl_core/nodes_liquid.lua @@ -1,11 +1,21 @@ -- Liquids: Water and lava +local S = minetest.get_translator("mcl_core") +local N = function(s) return s end + local WATER_ALPHA = 179 local WATER_VISC = 1 local LAVA_VISC = 7 +local lava_death_messages = { + N("@1 melted in lava."), + N("@1 took a bath in a hot lava tub."), + N("@1 died in lava."), + N("@1 could not survive in lava."), +} + minetest.register_node("mcl_core:water_flowing", { - description = "Flowing Water", + description = S("Flowing Water"), _doc_items_create_entry = false, wield_image = "default_water_flowing_animated.png^[verticalframe:64:0", drawtype = "flowingliquid", @@ -45,14 +55,14 @@ minetest.register_node("mcl_core:water_flowing", { }) minetest.register_node("mcl_core:water_source", { - description = "Water Source", - _doc_items_entry_name = "Water", + description = S("Water Source"), + _doc_items_entry_name = S("Water"), _doc_items_longdesc = -[[Water is abundant in oceans and also appears in a few springs in the ground. You can swim easily in water, but you need to catch your breath from time to time. -Water interacts with lava in various ways: -• When water is directly above or horizontally next to a lava source, the lava turns into obsidian. -• When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone. -• When water is directly below lava, the water turns into stone.]], +S("Water is abundant in oceans and also appears in a few springs in the ground. You can swim easily in water, but you need to catch your breath from time to time.").."\n\n".. +S("Water interacts with lava in various ways:").."\n".. +S("• When water is directly above or horizontally next to a lava source, the lava turns into obsidian.").."\n".. +S("• When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone.").."\n".. +S("• When water is directly below lava, the water turns into stone."), _doc_items_hidden = false, drawtype = "liquid", tiles = { @@ -89,7 +99,7 @@ Water interacts with lava in various ways: }) minetest.register_node("mcl_core:lava_flowing", { - description = "Flowing Lava", + description = S("Flowing Lava"), _doc_items_create_entry = false, wield_image = "default_lava_flowing_animated.png^[verticalframe:64:0", drawtype = "flowingliquid", @@ -127,6 +137,7 @@ minetest.register_node("mcl_core:lava_flowing", { liquid_renewable = false, liquid_range = 3, damage_per_second = 4*2, + _mcl_node_death_message = lava_death_messages, post_effect_color = {a=255, r=208, g=73, b=10}, groups = { lava=3, liquid=2, destroys_items=1, not_in_creative_inventory=1, dig_by_piston=1}, _mcl_blast_resistance = 500, @@ -134,16 +145,24 @@ minetest.register_node("mcl_core:lava_flowing", { _mcl_hardness = -1, }) +local fire_text +local fire_enabled = minetest.settings:get_bool("enable_fire", true) +if fire_enabled then + fire_text = S("A lava source sets fire to a couple of air blocks above when they're next to a flammable block.") +else + fire_text = "" +end + minetest.register_node("mcl_core:lava_source", { - description = "Lava Source", + description = S("Lava Source"), _doc_items_entry_name = "Lava", _doc_items_longdesc = -[[Lava is hot and rather dangerous. Don't touch it, it will hurt you a lot and it is hard to get out. -A lava source sets fire to a couple of air blocks above when they're next to a flammable block. -Lava interacts with water various ways: -• When a lava source is directly below or horizontally next to water, the lava turns into obsidian. -• When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone. -• When lava is directly above water, the water turns into stone.]], +S("Lava is hot and rather dangerous. Don't touch it, it will hurt you a lot and it is hard to get out.").."\n".. +fire_text.."\n\n".. +S("Lava interacts with water various ways:").."\n".. +S("• When a lava source is directly below or horizontally next to water, the lava turns into obsidian.").."\n".. +S("• When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone.").."\n".. +S("• When lava is directly above water, the water turns into stone."), drawtype = "liquid", tiles = { {name="default_lava_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}} @@ -173,6 +192,7 @@ Lava interacts with water various ways: liquid_renewable = false, liquid_range = 3, damage_per_second = 4*2, + _mcl_node_death_message = lava_death_messages, post_effect_color = {a=255, r=208, g=73, b=10}, stack_max = 64, groups = { lava=3, liquid=2, destroys_items=1, not_in_creative_inventory=1, dig_by_piston=1}, diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 26b25618b..8d204fa95 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -1,8 +1,9 @@ -- Other nodes +local S = minetest.get_translator("mcl_core") minetest.register_node("mcl_core:bone_block", { - description = "Bone Block", - _doc_items_longdesc = "Bone blocks are decorational blocks and a compact storage of bone meal.", + description = S("Bone Block"), + _doc_items_longdesc = S("Bone blocks are decorative blocks and a compact storage of bone meal."), tiles = {"mcl_core_bone_block_top.png", "mcl_core_bone_block_top.png", "mcl_core_bone_block_side.png"}, is_ground_content = false, paramtype2 = "facedir", @@ -14,8 +15,8 @@ minetest.register_node("mcl_core:bone_block", { }) minetest.register_node("mcl_core:slimeblock", { - description = "Slime Block", - _doc_items_longdesc = "Slime blocks are very bouncy and prevent fall damage.", + description = S("Slime Block"), + _doc_items_longdesc = S("Slime blocks are very bouncy and prevent fall damage."), drawtype = "nodebox", paramtype = "light", is_ground_content = false, @@ -47,8 +48,8 @@ minetest.register_node("mcl_core:slimeblock", { }) minetest.register_node("mcl_core:cobweb", { - description = "Cobweb", - _doc_items_longdesc = "Cobwebs can be walked through, but significantly slow you down.", + description = S("Cobweb"), + _doc_items_longdesc = S("Cobwebs can be walked through, but significantly slow you down."), drawtype = "plantlike", paramtype2 = "degrotate", visual_scale = 1.1, @@ -73,8 +74,8 @@ minetest.register_node("mcl_core:cobweb", { minetest.register_node("mcl_core:deadbush", { - description = "Dead Bush", - _doc_items_longdesc = "Dead bushes are unremarkable plants often found in dry areas. They can be harvested for sticks.", + description = S("Dead Bush"), + _doc_items_longdesc = S("Dead bushes are unremarkable plants often found in dry areas. They can be harvested for sticks."), _doc_items_hidden = false, drawtype = "plantlike", waving = 1, @@ -112,9 +113,9 @@ minetest.register_node("mcl_core:deadbush", { }) minetest.register_node("mcl_core:barrier", { - description = "Barrier", - _doc_items_longdesc = "Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.", - _doc_items_usagehelp = "When you hold a barrier in hand, you reveal all placed barriers in a short distance around you.", + description = S("Barrier"), + _doc_items_longdesc = S("Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block."), + _doc_items_usagehelp = S("When you hold a barrier in hand, you reveal all placed barriers in a short distance around you."), drawtype = "airlike", paramtype = "light", inventory_image = "mcl_core_barrier.png", @@ -137,6 +138,7 @@ minetest.register_node("mcl_core:barrier", { expirationtime = 1, size = 8, texture = "mcl_core_barrier.png", + glow = 14, playername = placer:get_player_name() }) end, @@ -169,7 +171,7 @@ minetest.register_node("mcl_core:barrier", { -- This node only exists because Minetest does not have support for “dimensions” yet and needs to -- be removed when support for this is implemented. minetest.register_node("mcl_core:realm_barrier", { - description = "Realm Barrier", + description = S("Realm Barrier"), _doc_items_create_entry = false, drawtype = "airlike", paramtype = "light", @@ -202,7 +204,7 @@ minetest.register_node("mcl_core:realm_barrier", { -- The void does not exist as a block in Minecraft but we register it as a -- block here to make things easier for us. minetest.register_node("mcl_core:void", { - description = "Void", + description = S("Void"), _doc_items_create_entry = false, drawtype = "airlike", paramtype = "light", diff --git a/mods/ITEMS/mcl_core/nodes_trees.lua b/mods/ITEMS/mcl_core/nodes_trees.lua index afe03e3ff..433ae03ad 100644 --- a/mods/ITEMS/mcl_core/nodes_trees.lua +++ b/mods/ITEMS/mcl_core/nodes_trees.lua @@ -1,4 +1,5 @@ -- Tree nodes: Wood, Wooden Planks, Sapling, Leaves +local S = minetest.get_translator("mcl_core") -- Register tree trunk (wood) and bark local register_tree_trunk = function(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark) @@ -18,7 +19,7 @@ local register_tree_trunk = function(subname, description_trunk, description_bar minetest.register_node("mcl_core:"..subname.."_bark", { description = description_bark, - _doc_items_longdesc = "This is a decorative block surrounded by the bark of a tree trunk.", + _doc_items_longdesc = S("This is a decorative block surrounded by the bark of a tree trunk."), tiles = {tile_bark}, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, @@ -145,35 +146,35 @@ end --------------------- -register_tree_trunk("tree", "Oak Wood", "Oak Bark", "The trunk of an oak tree.", "default_tree_top.png", "default_tree.png") -register_tree_trunk("darktree", "Dark Oak Wood", "Dark Oak Bark", "The trunk of a dark oak tree.", "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png") -register_tree_trunk("acaciatree", "Acacia Wood", "Acacia Bark", "The trunk of an acacia.", "default_acacia_tree_top.png", "default_acacia_tree.png") -register_tree_trunk("sprucetree", "Spruce Wood", "Spruce Bark", "The trunk of a spruce tree.", "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png") -register_tree_trunk("birchtree", "Birch Wood", "Birch Bark", "The trunk of a birch tree.", "mcl_core_log_birch_top.png", "mcl_core_log_birch.png") -register_tree_trunk("jungletree", "Jungle Wood", "Jungle Bark", "The trunk of a jungle tree.", "default_jungletree_top.png", "default_jungletree.png") +register_tree_trunk("tree", S("Oak Wood"), S("Oak Bark"), S("The trunk of an oak tree."), "default_tree_top.png", "default_tree.png") +register_tree_trunk("darktree", S("Dark Oak Wood"), S("Dark Oak Bark"), S("The trunk of a dark oak tree."), "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png") +register_tree_trunk("acaciatree", S("Acacia Wood"), S("Acacia Bark"), S("The trunk of an acacia."), "default_acacia_tree_top.png", "default_acacia_tree.png") +register_tree_trunk("sprucetree", S("Spruce Wood"), S("Spruce Bark"), S("The trunk of a spruce tree."), "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png") +register_tree_trunk("birchtree", S("Birch Wood"), S("Birch Bark"), S("The trunk of a birch tree."), "mcl_core_log_birch_top.png", "mcl_core_log_birch.png") +register_tree_trunk("jungletree", S("Jungle Wood"), S("Jungle Bark"), S("The trunk of a jungle tree."), "default_jungletree_top.png", "default_jungletree.png") -register_wooden_planks("wood", "Oak Wood Planks", {"default_wood.png"}) -register_wooden_planks("darkwood", "Dark Oak Wood Planks", {"mcl_core_planks_big_oak.png"}) -register_wooden_planks("junglewood", "Jungle Wood Planks", {"default_junglewood.png"}) -register_wooden_planks("sprucewood", "Spruce Wood Planks", {"mcl_core_planks_spruce.png"}) -register_wooden_planks("acaciawood", "Acacia Wood Planks", {"default_acacia_wood.png"}) -register_wooden_planks("birchwood", "Birch Wood Planks", {"mcl_core_planks_birch.png"}) +register_wooden_planks("wood", S("Oak Wood Planks"), {"default_wood.png"}) +register_wooden_planks("darkwood", S("Dark Oak Wood Planks"), {"mcl_core_planks_big_oak.png"}) +register_wooden_planks("junglewood", S("Jungle Wood Planks"), {"default_junglewood.png"}) +register_wooden_planks("sprucewood", S("Spruce Wood Planks"), {"mcl_core_planks_spruce.png"}) +register_wooden_planks("acaciawood", S("Acacia Wood Planks"), {"default_acacia_wood.png"}) +register_wooden_planks("birchwood", S("Birch Wood Planks"), {"mcl_core_planks_birch.png"}) -register_sapling("sapling", "Oak Sapling", "When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak after some time.", "default_sapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16}) -register_sapling("darksapling", "Dark Oak Sapling", "Dark oak saplings can grow into dark oaks, but only in groups. A lonely dark oak sapling won't grow. A group of four dark oak saplings grows into a dark oak after some time when they are placed on soil (such as dirt) in a 2×2 square and exposed to light.", "mcl_core_sapling_big_oak.png", {-5/16, -0.5, -5/16, 5/16, 7/16, 5/16}) -register_sapling("junglesapling", "Jungle Sapling", "When placed on soil (such as dirt) and exposed to light, a jungle sapling will grow into a jungle tree after some time. When there are 4 jungle saplings in a 2×2 square, they will grow to a huge jungle tree.", "default_junglesapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16}) -register_sapling("acaciasapling", "Acacia Sapling", "When placed on soil (such as dirt) and exposed to light, an acacia sapling will grow into an acacia after some time.", "default_acacia_sapling.png", {-5/16, -0.5, -5/16, 5/16, 4/16, 5/16}) -register_sapling("sprucesapling", "Spruce Sapling", "When placed on soil (such as dirt) and exposed to light, a spruce sapling will grow into a spruce after some time. When there are 4 spruce saplings in a 2×2 square, they will grow to a huge spruce.", "mcl_core_sapling_spruce.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16}) -register_sapling("birchsapling", "Birch Sapling", "When placed on soil (such as dirt) and exposed to light, a birch sapling will grow into a birch after some time.", "mcl_core_sapling_birch.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16}) +register_sapling("sapling", S("Oak Sapling"), S("When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak after some time."), "default_sapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16}) +register_sapling("darksapling", S("Dark Oak Sapling"), S("Dark oak saplings can grow into dark oaks, but only in groups. A lonely dark oak sapling won't grow. A group of four dark oak saplings grows into a dark oak after some time when they are placed on soil (such as dirt) in a 2×2 square and exposed to light."), "mcl_core_sapling_big_oak.png", {-5/16, -0.5, -5/16, 5/16, 7/16, 5/16}) +register_sapling("junglesapling", S("Jungle Sapling"), S("When placed on soil (such as dirt) and exposed to light, a jungle sapling will grow into a jungle tree after some time. When there are 4 jungle saplings in a 2×2 square, they will grow to a huge jungle tree."), "default_junglesapling.png", {-5/16, -0.5, -5/16, 5/16, 0.5, 5/16}) +register_sapling("acaciasapling", S("Acacia Sapling"), S("When placed on soil (such as dirt) and exposed to light, an acacia sapling will grow into an acacia after some time."), "default_acacia_sapling.png", {-5/16, -0.5, -5/16, 5/16, 4/16, 5/16}) +register_sapling("sprucesapling", S("Spruce Sapling"), S("When placed on soil (such as dirt) and exposed to light, a spruce sapling will grow into a spruce after some time. When there are 4 spruce saplings in a 2×2 square, they will grow to a huge spruce."), "mcl_core_sapling_spruce.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16}) +register_sapling("birchsapling", S("Birch Sapling"), S("When placed on soil (such as dirt) and exposed to light, a birch sapling will grow into a birch after some time."), "mcl_core_sapling_birch.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16}) -register_leaves("leaves", "Oak Leaves", "Oak leaves are grown from oak trees.", {"default_leaves.png"}, "mcl_core:sapling", 20, "mcl_core:apple", 200) -register_leaves("darkleaves", "Dark Oak Leaves", "Dark oak leaves are grown from dark oak trees.", {"mcl_core_leaves_big_oak.png"}, "mcl_core:darksapling", 20, "mcl_core:apple", 200) -register_leaves("jungleleaves", "Jungle Leaves", "Jungle leaves are grown from jungle trees.", {"default_jungleleaves.png"}, "mcl_core:junglesapling", 40) -register_leaves("acacialeaves", "Acacia Leaves", "Acacia leaves are grown from acacia trees.", {"default_acacia_leaves.png"}, "mcl_core:acaciasapling", 20) -register_leaves("spruceleaves", "Spruce Leaves", "Spruce leaves are grown from spruce trees.", {"mcl_core_leaves_spruce.png"}, "mcl_core:sprucesapling", 20) -register_leaves("birchleaves", "Birch Leaves", "Birch leaves are grown from birch trees.", {"mcl_core_leaves_birch.png"}, "mcl_core:birchsapling", 20) +register_leaves("leaves", S("Oak Leaves"), S("Oak leaves are grown from oak trees."), {"default_leaves.png"}, "mcl_core:sapling", 20, "mcl_core:apple", 200) +register_leaves("darkleaves", S("Dark Oak Leaves"), S("Dark oak leaves are grown from dark oak trees."), {"mcl_core_leaves_big_oak.png"}, "mcl_core:darksapling", 20, "mcl_core:apple", 200) +register_leaves("jungleleaves", S("Jungle Leaves"), S("Jungle leaves are grown from jungle trees."), {"default_jungleleaves.png"}, "mcl_core:junglesapling", 40) +register_leaves("acacialeaves", S("Acacia Leaves"), S("Acacia leaves are grown from acacia trees."), {"default_acacia_leaves.png"}, "mcl_core:acaciasapling", 20) +register_leaves("spruceleaves", S("Spruce Leaves"), S("Spruce leaves are grown from spruce trees."), {"mcl_core_leaves_spruce.png"}, "mcl_core:sprucesapling", 20) +register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from birch trees."), {"mcl_core_leaves_birch.png"}, "mcl_core:birchsapling", 20) -- Node aliases diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_jungle_bush_jungle_leaves.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_jungle_bush_jungle_leaves.mts deleted file mode 100644 index d2df30e88..000000000 Binary files a/mods/ITEMS/mcl_core/schematics/mcl_core_jungle_bush_jungle_leaves.mts and /dev/null differ diff --git a/mods/ITEMS/mcl_crafting_table/init.lua b/mods/ITEMS/mcl_crafting_table/init.lua index 37dc74a29..2a02551e2 100644 --- a/mods/ITEMS/mcl_crafting_table/init.lua +++ b/mods/ITEMS/mcl_crafting_table/init.lua @@ -1,7 +1,9 @@ +local S = minetest.get_translator("mcl_crafting_table") + minetest.register_node("mcl_crafting_table:crafting_table", { - description = "Crafting Table", - _doc_items_longdesc = "A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.", - _doc_items_usagehelp = "Rightclick the crafting table to access the 3×3 crafting grid.", + description = S("Crafting Table"), + _doc_items_longdesc = S("A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts."), + _doc_items_usagehelp = S("Rightclick the crafting table to access the 3×3 crafting grid."), _doc_items_hidden = false, is_ground_content = false, tiles = {"crafting_workbench_top.png", "default_wood.png", "crafting_workbench_side.png", @@ -15,12 +17,14 @@ minetest.register_node("mcl_crafting_table:crafting_table", { local form = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_workbench.png]".. mcl_vars.inventory_header.. + "label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. + "label[1.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Crafting"))).."]".. "list[current_player;craft;1.75,0.5;3,3;]".. "list[current_player;craftpreview;6.1,1.5;1,1;]".. "image_button[0.75,1.5;1,1;craftguide_book.png;__mcl_craftguide;]".. - "tooltip[__mcl_craftguide;Recipe book]".. + "tooltip[__mcl_craftguide;"..minetest.formspec_escape(S("Recipe book")).."]".. "listring[current_player;main]".. "listring[current_player;craft]" diff --git a/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.de.tr b/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.de.tr new file mode 100644 index 000000000..08b1a29ea --- /dev/null +++ b/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.de.tr @@ -0,0 +1,7 @@ +# textdomain: mcl_crafting_table +Crafting Table=Werkbank +A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.=Die Werkbank ist ein Block, mit dem Sie Zugriff auf ein 3×3-Fertigungsgitter erhalten, wodurch sie fortgeschrittene Dinge herstellen können. +Rightclick the crafting table to access the 3×3 crafting grid.=Rechtsklicken Sie auf die Werkbank, um auf das 3×3-Fertigungsgitter zuzugreifen. +Recipe book=Fertigungsbuch +Inventory=Inventar +Crafting=Fertigen diff --git a/mods/ITEMS/mcl_crafting_table/locale/template.txt b/mods/ITEMS/mcl_crafting_table/locale/template.txt new file mode 100644 index 000000000..76070997f --- /dev/null +++ b/mods/ITEMS/mcl_crafting_table/locale/template.txt @@ -0,0 +1,7 @@ +# textdomain: mcl_crafting_table +Crafting Table= +A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.= +Rightclick the crafting table to access the 3×3 crafting grid.= +Recipe book= +Crafting= +Inventory= diff --git a/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png b/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png index 0ee301844..957fa56ba 100644 Binary files a/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png and b/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png differ diff --git a/mods/ITEMS/mcl_doors/api_doors.lua b/mods/ITEMS/mcl_doors/api_doors.lua index e3e882794..1b32d2389 100644 --- a/mods/ITEMS/mcl_doors/api_doors.lua +++ b/mods/ITEMS/mcl_doors/api_doors.lua @@ -123,21 +123,25 @@ function mcl_doors:register_door(name, def) return itemstack end + -- get left coordinate for checking if another door is there + local pt_left = {x=pt.x, y=pt.y, z=pt.z} local p2 = minetest.dir_to_facedir(placer:get_look_dir()) - local pt3 = {x=pt.x, y=pt.y, z=pt.z} + if p2 == 0 then - pt3.x = pt3.x-1 + pt_left.x = pt_left.x-1 elseif p2 == 1 then - pt3.z = pt3.z+1 + pt_left.z = pt_left.z+1 elseif p2 == 2 then - pt3.x = pt3.x+1 + pt_left.x = pt_left.x+1 elseif p2 == 3 then - pt3.z = pt3.z-1 + pt_left.z = pt_left.z-1 end + + local left_node = minetest.get_node(pt_left) + -- Set door nodes minetest.set_node(pt, {name=name.."_b_1", param2=p2}) minetest.set_node(pt2, {name=name.."_t_1", param2=p2}) - -- TODO: Mirror door when 2 doors are placed next to each other, to create double doors if def.sounds and def.sounds.place then minetest.sound_play(def.sounds.place, {pos=pt}) @@ -150,12 +154,19 @@ function mcl_doors:register_door(name, def) meta:set_string("doors_owner", "") end - -- Save open state. 1 = open. 0 = closed - local meta = minetest.get_meta(pt) - meta:set_int("is_open", 0) - meta = minetest.get_meta(pt2) - meta:set_int("is_open", 0) + local meta1 = minetest.get_meta(pt) + local meta2 = minetest.get_meta(pt2) + -- save mirror state for the correct door + if left_node.name:sub(1, #name) == name then + meta1:set_int("is_mirrored", 1) + meta2:set_int("is_mirrored", 1) + end + -- Save open state. 1 = open. 0 = closed + meta1:set_int("is_open", 0) + meta2:set_int("is_open", 0) + + if not minetest.settings:get_bool("creative_mode") then itemstack:take_item() end @@ -170,24 +181,28 @@ function mcl_doors:register_door(name, def) local tt = def.tiles_top local tb = def.tiles_bottom - local function on_open_close(pos, dir, check_name, replace, replace_dir, params) + local function on_open_close(pos, dir, check_name, replace, replace_dir) local meta1 = minetest.get_meta(pos) pos.y = pos.y+dir local meta2 = minetest.get_meta(pos) - if not minetest.get_node(pos).name == check_name then + + -- if name of other door is not the same as check_name -> return + if not minetest.get_node(pos).name == check_name then return end + + -- swap directions if mirrored + local params = {3,0,1,2} + if meta1:get_int("is_open") == 0 and meta2:get_int("is_mirrored") == 0 or meta1:get_int("is_open") == 1 and meta2:get_int("is_mirrored") == 1 then + params = {1,2,3,0} + end + local p2 = minetest.get_node(pos).param2 local np2 = params[p2+1] - local metatable = minetest.get_meta(pos):to_table() - minetest.set_node(pos, {name=replace_dir, param2=np2}) - minetest.get_meta(pos):from_table(metatable) - + minetest.swap_node(pos, {name=replace_dir, param2=np2}) pos.y = pos.y-dir - metatable = minetest.get_meta(pos):to_table() - minetest.set_node(pos, {name=replace, param2=np2}) - minetest.get_meta(pos):from_table(metatable) + minetest.swap_node(pos, {name=replace, param2=np2}) local door_switching_sound if meta1:get_int("is_open") == 1 then @@ -203,11 +218,11 @@ function mcl_doors:register_door(name, def) end local function on_mesecons_signal_open(pos, node) - on_open_close(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0}) + on_open_close(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2") end local function on_mesecons_signal_close(pos, node) if not mesecon.is_powered({x=pos.x,y=pos.y+1,z=pos.z}) then - on_open_close(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2}) + on_open_close(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1") end end local function on_mesecons_signal_open_top(pos, node) @@ -233,7 +248,7 @@ function mcl_doors:register_door(name, def) if not def.only_redstone_can_open then on_rightclick = function(pos, node, clicker) if check_player_priv(pos, clicker) then - on_open_close(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0}) + on_open_close(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2") end end end @@ -282,7 +297,7 @@ function mcl_doors:register_door(name, def) else on_rightclick = function(pos, node, clicker) if check_player_priv(pos, clicker) then - on_open_close(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2", {1,2,3,0}) + on_open_close(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2") end end end @@ -331,7 +346,7 @@ function mcl_doors:register_door(name, def) else on_rightclick = function(pos, node, clicker) if check_player_priv(pos, clicker) then - on_open_close(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2}) + on_open_close(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1") end end end @@ -380,7 +395,7 @@ function mcl_doors:register_door(name, def) else on_rightclick = function(pos, node, clicker) if check_player_priv(pos, clicker) then - on_open_close(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1", {3,0,1,2}) + on_open_close(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1") end end end diff --git a/mods/ITEMS/mcl_doors/locale/mcl_doors.de.tr b/mods/ITEMS/mcl_doors/locale/mcl_doors.de.tr new file mode 100644 index 000000000..7cb502c69 --- /dev/null +++ b/mods/ITEMS/mcl_doors/locale/mcl_doors.de.tr @@ -0,0 +1,23 @@ +# textdomain: mcl_doors +Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal.=Holztüren sind 2 Blöcke hohe Barrieren, die von Hand oder mit einem Redstone-Signal geöffnet oder geschlossen werden können. +To open or close a wooden door, rightclick it or supply its lower half with a redstone signal.=Um die Holztür zu öffnen oder zu schließen, rechtsklicken Sie sie oder versorgen Sie sie mit einem Redstone-Signal. +Oak Door=Eichentür +Acacia Door=Akazientür +Birch Door=Birkentür +Dark Oak Door=Schwarzeichentür +Jungle Door=Dschungeltür +Spruce Door=Fichtentür +Iron Door=Eisentür +Iron doors are 2-block high barriers which can only be opened or closed by a redstone signal, but not by hand.=Eisentüren sind 2 Blöcke hohe Barrieren, die nur von einem Redstone-Signal geöffnet oder geschlossen werden können. +To open or close an iron door, supply its lower half with a redstone signal.=Um eine Eisentür zu öffnen oder zu schließen, versorgen Sie die untere Hälfte mit einem Redstone-Signal. +Oak Trapdoor=Eichenfalltür +Acacia Trapdoor=Akazienfalltür +Birch Trapdoor=Birkenfalltür +Spruce Trapdoor=Fichtenfalltür +Dark Oak Trapdoor=Schwarzeichenfalltür +Jungle Trapdoor=Dschungelfalltür +Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.=Holzfalltüren sind horizontale Barrieren, die von Hand oder mit einem Redstone-Signal geöffnet oder geschlossen werden können. Sie belegen den oberen oder unteren Teil eines Blocks, je nach dem, wie sie platziert wurden. Wenn geöffnet, können sie wie eine Leiter erklommen werden. +To open or close the trapdoor, rightclick it or send a redstone signal to it.=Um die Falltür zu öffnen oder zu schließen, rechtsklicken Sie sie oder schicken Sie ein Redstone-Signal zu ihr. +Iron Trapdoor=Eisenfalltür +Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.=Eisenfalltüren sind horizontale Barrieren, die nur mit einem Redstone-Signal geöffnet oder geschlossen werden können, nicht von Hand. Sie belegen den oberen oder unteren Teil eines Blocks, je nach dem, wie sie platziert wurden. Wenn geöffnet, können sie wie eine Leiter erklommen werden. + diff --git a/mods/ITEMS/mcl_doors/locale/template.txt b/mods/ITEMS/mcl_doors/locale/template.txt new file mode 100644 index 000000000..5b9f788a0 --- /dev/null +++ b/mods/ITEMS/mcl_doors/locale/template.txt @@ -0,0 +1,22 @@ +# textdomain: mcl_doors +Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal.= +To open or close a wooden door, rightclick it or supply its lower half with a redstone signal.= +Oak Door= +Acacia Door= +Birch Door= +Dark Oak Door= +Jungle Door= +Spruce Door= +Iron Door= +Iron doors are 2-block high barriers which can only be opened or closed by a redstone signal, but not by hand.= +To open or close an iron door, supply its lower half with a redstone signal.= +Oak Trapdoor= +Acacia Trapdoor= +Birch Trapdoor= +Spruce Trapdoor= +Dark Oak Trapdoor= +Jungle Trapdoor= +Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.= +To open or close the trapdoor, rightclick it or send a redstone signal to it.= +Iron Trapdoor= +Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.= diff --git a/mods/ITEMS/mcl_doors/register.lua b/mods/ITEMS/mcl_doors/register.lua index 919de7436..e8f990f9b 100644 --- a/mods/ITEMS/mcl_doors/register.lua +++ b/mods/ITEMS/mcl_doors/register.lua @@ -1,11 +1,13 @@ +local S = minetest.get_translator("mcl_doors") + --[[ Doors ]] -local wood_longdesc = "Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal." -local wood_usagehelp = "To open or close a wooden door, rightclick it or supply its lower half with a redstone signal." +local wood_longdesc = S("Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal.") +local wood_usagehelp = S("To open or close a wooden door, rightclick it or supply its lower half with a redstone signal.") --- Oak Door --- mcl_doors:register_door("mcl_doors:wooden_door", { - description = "Oak Door", + description = S("Oak Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "doors_item_wood.png", @@ -28,7 +30,7 @@ minetest.register_craft({ --- Acacia Door -- mcl_doors:register_door("mcl_doors:acacia_door", { - description = "Acacia Door", + description = S("Acacia Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_acacia.png", @@ -51,7 +53,7 @@ minetest.register_craft({ --- Birch Door -- mcl_doors:register_door("mcl_doors:birch_door", { - description = "Birch Door", + description = S("Birch Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_birch.png", @@ -74,7 +76,7 @@ minetest.register_craft({ --- Dark Oak Door -- mcl_doors:register_door("mcl_doors:dark_oak_door", { - description = "Dark Oak Door", + description = S("Dark Oak Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_dark_oak.png", @@ -97,7 +99,7 @@ minetest.register_craft({ --- Jungle Door -- mcl_doors:register_door("mcl_doors:jungle_door", { - description = "Jungle Door", + description = S("Jungle Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_jungle.png", @@ -120,7 +122,7 @@ minetest.register_craft({ --- Spruce Door -- mcl_doors:register_door("mcl_doors:spruce_door", { - description = "Spruce Door", + description = S("Spruce Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_spruce.png", @@ -174,9 +176,9 @@ minetest.register_craft({ --- Iron Door --- mcl_doors:register_door("mcl_doors:iron_door", { - description = "Iron Door", - _doc_items_longdesc = "Iron doors are 2-block high barriers which can only be opened or closed by a redstone signal, but not by hand.", - _doc_items_usagehelp = "To open or close an iron door, supply its lower half with a redstone signal.", + description = S("Iron Door"), + _doc_items_longdesc = S("Iron doors are 2-block high barriers which can only be opened or closed by a redstone signal, but not by hand."), + _doc_items_usagehelp = S("To open or close an iron door, supply its lower half with a redstone signal."), inventory_image = "doors_item_steel.png", groups = {pickaxey=1, mesecon_effector_on=1}, _mcl_hardness = 5, @@ -204,19 +206,19 @@ minetest.register_craft({ --[[ Trapdoors ]] local woods = { -- id, desc, texture, craftitem - { "trapdoor", "Oak Trapdoor", "doors_trapdoor.png", "doors_trapdoor_side.png", "mcl_core:wood" }, - { "acacia_trapdoor", "Acacia Trapdoor", "mcl_doors_trapdoor_acacia.png", "mcl_doors_trapdoor_acacia_side.png", "mcl_core:acaciawood" }, - { "birch_trapdoor", "Birch Trapdoor", "mcl_doors_trapdoor_birch.png", "mcl_doors_trapdoor_birch_side.png", "mcl_core:birchwood" }, - { "spruce_trapdoor", "Spruce Trapdoor", "mcl_doors_trapdoor_spruce.png", "mcl_doors_trapdoor_spruce_side.png", "mcl_core:sprucewood" }, - { "dark_oak_trapdoor", "Dark Oak Trapdoor", "mcl_doors_trapdoor_dark_oak.png", "mcl_doors_trapdoor_dark_oak_side.png", "mcl_core:darkwood" }, - { "jungle_trapdoor", "Jungle Trapdoor", "mcl_doors_trapdoor_jungle.png", "mcl_doors_trapdoor_jungle_side.png", "mcl_core:junglewood" }, + { "trapdoor", S("Oak Trapdoor"), "doors_trapdoor.png", "doors_trapdoor_side.png", "mcl_core:wood" }, + { "acacia_trapdoor", S("Acacia Trapdoor"), "mcl_doors_trapdoor_acacia.png", "mcl_doors_trapdoor_acacia_side.png", "mcl_core:acaciawood" }, + { "birch_trapdoor", S("Birch Trapdoor"), "mcl_doors_trapdoor_birch.png", "mcl_doors_trapdoor_birch_side.png", "mcl_core:birchwood" }, + { "spruce_trapdoor", S("Spruce Trapdoor"), "mcl_doors_trapdoor_spruce.png", "mcl_doors_trapdoor_spruce_side.png", "mcl_core:sprucewood" }, + { "dark_oak_trapdoor", S("Dark Oak Trapdoor"), "mcl_doors_trapdoor_dark_oak.png", "mcl_doors_trapdoor_dark_oak_side.png", "mcl_core:darkwood" }, + { "jungle_trapdoor", S("Jungle Trapdoor"), "mcl_doors_trapdoor_jungle.png", "mcl_doors_trapdoor_jungle_side.png", "mcl_core:junglewood" }, } for w=1, #woods do mcl_doors:register_trapdoor("mcl_doors:"..woods[w][1], { description = woods[w][2], - _doc_items_longdesc = "Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.", - _doc_items_usagehelp = "To open or close the trapdoor, rightclick it or send a redstone signal to it.", + _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), + _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), tile_front = woods[w][3], tile_side = woods[w][4], wield_image = woods[w][3], @@ -242,8 +244,8 @@ for w=1, #woods do end mcl_doors:register_trapdoor("mcl_doors:iron_trapdoor", { - description = "Iron Trapdoor", - _doc_items_longdesc = "Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.", + description = S("Iron Trapdoor"), + _doc_items_longdesc = S("Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), tile_front = "doors_trapdoor_steel.png", tile_side = "doors_trapdoor_steel_side.png", wield_image = "doors_trapdoor_steel.png", diff --git a/mods/ITEMS/mcl_dye/init.lua b/mods/ITEMS/mcl_dye/init.lua index c347a9000..11a6f6570 100644 --- a/mods/ITEMS/mcl_dye/init.lua +++ b/mods/ITEMS/mcl_dye/init.lua @@ -1,5 +1,3 @@ --- minetest/dye/init.lua - -- To make recipes that will work with any dye ever made by anybody, define -- them based on groups. -- You can select any group of groups, based on your need for amount of colors. @@ -15,6 +13,8 @@ mcl_dye = {} +local S = minetest.get_translator("mcl_dye") + -- Other mods can use these for looping through available colors mcl_dye.basecolors = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta"} mcl_dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "orange", "yellow", "lime", "green", "aqua", "cyan", "sky_blue", "blue", "violet", "magenta", "red_violet"} @@ -64,24 +64,26 @@ local dyelocal = {} -- This collection of colors is partly a historic thing, partly something else. dyelocal.dyes = { - {"white", "mcl_dye_white", "Bone Meal", {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, - {"grey", "dye_grey", "Light Grey Dye", {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, - {"dark_grey", "dye_dark_grey", "Grey Dye", {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, - {"black", "mcl_dye_black", "Ink Sac", {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, - {"violet", "dye_violet", "Purple Dye", {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, - {"blue", "mcl_dye_blue", "Lapis Lazuli", {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, - {"lightblue", "mcl_dye_light_blue", "Light Blue Dye", {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}}, - {"cyan", "dye_cyan", "Cyan Dye", {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, - {"dark_green", "dye_dark_green", "Cactus Green",{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, - {"green", "mcl_dye_lime", "Lime Dye", {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, - {"yellow", "dye_yellow", "Dandelion Yellow", {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, - {"brown", "mcl_dye_brown", "Cocoa Beans", {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}}, - {"orange", "dye_orange", "Orange Dye", {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, - {"red", "dye_red", "Rose Red", {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, - {"magenta", "dye_magenta", "Magenta Dye", {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, - {"pink", "dye_pink", "Pink Dye", {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, + {"white", "mcl_dye_white", S("Bone Meal"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, + {"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, + {"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, + {"black", "mcl_dye_black", S("Ink Sac"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, + {"violet", "dye_violet", S("Purple Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, + {"blue", "mcl_dye_blue", S("Lapis Lazuli"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, + {"lightblue", "mcl_dye_light_blue", S("Light Blue Dye"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}}, + {"cyan", "dye_cyan", S("Cyan Dye"), {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, + {"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, + {"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, + {"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, + {"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}}, + {"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, + {"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, + {"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, + {"pink", "dye_pink", S("Pink Dye"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, } +local mg_name = minetest.get_mapgen_setting("mg_name") + dyelocal.unicolor_to_dye_id = {} for d=1, #dyelocal.dyes do for k, _ in pairs(dyelocal.dyes[d][4]) do @@ -93,7 +95,12 @@ end -- Takes an unicolor group name (e.g. “unicolor_white”) and returns a corresponding dye name (if it exists), nil otherwise. mcl_dye.unicolor_to_dye = function(unicolor_group) - return "mcl_dye:" .. dyelocal.unicolor_to_dye_id[unicolor_group] + local color = dyelocal.unicolor_to_dye_id[unicolor_group] + if color then + return "mcl_dye:" .. color + else + return nil + end end -- Define items @@ -109,8 +116,8 @@ for _, row in ipairs(dyelocal.dyes) do minetest.register_craftitem(item_name, { inventory_image = item_image, description = description, - _doc_items_longdesc = "This item is a dye which is used for dyeing and crafting.", - _doc_items_usagehelp = "Rightclick on a sheep to dye its wool. Other things are dyed by crafting.", + _doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."), + _doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."), groups = groups, stack_max = 64, }) @@ -120,10 +127,8 @@ end -- Bone Meal mcl_dye.apply_bone_meal = function(pointed_thing) - -- TODO: Only spawn flowers specific to the biome - -- Bone meal currently spawns all flowers found in the plains. - local flowers_table = { + local flowers_table_plains = { "mcl_flowers:dandelion", "mcl_flowers:dandelion", "mcl_flowers:poppy", @@ -134,15 +139,25 @@ mcl_dye.apply_bone_meal = function(pointed_thing) "mcl_flowers:tulip_white", "mcl_flowers:tulip_pink", "mcl_flowers:azure_bluet", - - -- Allium and blue orchid intentionally left out, - -- those must be found by the player. } - -- Special case for dry lands - local flowers_table_dry = { + local flowers_table_simple = { "mcl_flowers:dandelion", "mcl_flowers:poppy", } + local flowers_table_swampland = { + "mcl_flowers:blue_orchid", + } + local flowers_table_flower_forest = { + "mcl_flowers:dandelion", + "mcl_flowers:poppy", + "mcl_flowers:oxeye_daisy", + "mcl_flowers:tulip_orange", + "mcl_flowers:tulip_red", + "mcl_flowers:tulip_white", + "mcl_flowers:tulip_pink", + "mcl_flowers:azure_bluet", + "mcl_flowers:allium", + } local pos = pointed_thing.under local n = minetest.get_node(pos) @@ -243,11 +258,22 @@ mcl_dye.apply_bone_meal = function(pointed_thing) local col = minetest.registered_nodes[n2.name]._mcl_grass_palette_index minetest.add_node(pos, {name="mcl_flowers:tallgrass", param2=col}) else - if n2.name == "mcl_core:dirt_with_dry_grass" then - minetest.add_node(pos, {name=flowers_table_dry[math.random(1, #flowers_table_dry)]}) + local flowers_table + if mg_name == "v6" then + flowers_table = flowers_table_plains else - minetest.add_node(pos, {name=flowers_table[math.random(1, #flowers_table)]}) + local biome = minetest.get_biome_name(minetest.get_biome_data(pos).biome) + if biome == "Swampland" or biome == "Swampland_shore" or biome == "Swampland_ocean" or biome == "Swampland_deep_ocean" or biome == "Swampland_underground" then + flowers_table = flowers_table_swampland + elseif biome == "FlowerForest" or biome == "FlowerForest_beach" or biome == "FlowerForest_ocean" or biome == "FlowerForest_deep_ocean" or biome == "FlowerForest_underground" then + flowers_table = flowers_table_flower_forest + elseif biome == "Plains" or biome == "Plains_beach" or biome == "Plains_ocean" or biome == "Plains_deep_ocean" or biome == "Plains_underground" or biome == "SunflowerPlains" or biome == "SunflowerPlains_ocean" or biome == "SunflowerPlains_deep_ocean" or biome == "SunflowerPlains_underground" then + flowers_table = flowers_table_plains + else + flowers_table = flowers_table_simple + end end + minetest.add_node(pos, {name=flowers_table[math.random(1, #flowers_table)]}) end end end @@ -295,9 +321,9 @@ end minetest.register_craftitem("mcl_dye:white", { inventory_image = "mcl_dye_white.png", - description = "Bone Meal", - _doc_items_longdesc = "Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.", - _doc_items_usagehelp = "Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.", + description = S("Bone Meal"), + _doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."), + _doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."), stack_max = 64, groups = dyelocal.dyes[1][4], on_place = function(itemstack, user, pointed_thing) @@ -333,9 +359,9 @@ minetest.register_craftitem("mcl_dye:white", { minetest.register_craftitem("mcl_dye:brown", { inventory_image = "mcl_dye_brown.png", - _doc_items_longdesc = "Cocoa beans are a brown dye and can be used to plant cocoas.", - _doc_items_usagehelp = "Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.", - description = "Cocoa Beans", + _doc_items_longdesc = S("Cocoa beans are a brown dye and can be used to plant cocoas."), + _doc_items_usagehelp = S("Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."), + description = S("Cocoa Beans"), stack_max = 64, groups = dyelocal.dyes[12][4], on_place = function(itemstack, placer, pointed_thing) diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.de.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.de.tr new file mode 100644 index 000000000..c12da5790 --- /dev/null +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.de.tr @@ -0,0 +1,25 @@ +# textdomain: mcl_dye +Bone Meal=Knochenmehl +Light Grey Dye=Hellgrauer Farbstoff +Grey Dye=Grauer Farbstoff +Ink Sac=Tintenbeutel +Purple Dye=Violetter Farbstoff +Lapis Lazuli=Lapislazuli +Light Blue Dye=Hellblauer Farbstoff +Cyan Dye=Türkiser Farbstoff +Cactus Green=Kaktusgrün +Lime Dye=Lindgrüner Farbstoff +Dandelion Yellow=Löwenzahngelb +Cocoa Beans=Kakaobohnen +Orange Dye=Orange Farbstoff +Rose Red=Rosenrot +Magenta Dye=Magenta Farbstoff +Pink Dye=Rosa Farbstoff +This item is a dye which is used for dyeing and crafting.=Dieser Gegenstand ist ein Farbstoff, der zum Einfärben und in der Herstellung benutzt werden kann. +Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=Rechtsklicken Sie auf ein Schaf, um seine Wolle zu färben. Andere Dinge werden mit der Fertigung eingefärbt. +Bone Meal=Knochenmehl +Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=Knochenmehl ist ein weißer Farbstoff und auch nützlich als Dünger, um das Wachstum vieler Pflanzen zu beschleunigen. +Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Rechtsklicken Sie auf ein Schaf, um die Wolle weiß einzufärben. Rechtsklicken Sie auf eine Pflanze, um ihr Wachstum zu beschleunigen. Beachten Sie, dass nicht alle Pflanzen darauf ansprechen. Benutzen Sie es auf einem Grasblock, wächst viel hohes Gras und vielleicht auch ein paar Blumen. +Cocoa beans are a brown dye and can be used to plant cocoas.=Kakaobohnen sind ein brauner Farbstoff und werden benutzt, um Kakao anzupflanzen. +Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Rechtsklicken Sie auf ein Schaf, um die Wolle braun einzufärben. Rechtsklicken Sie an die Seite eines Dschungelbaumstamms (Dschungelholz), um eine junge Kakaoschote zu pflanzen. +Cocoa Beans=Kakaobohnen diff --git a/mods/ITEMS/mcl_dye/locale/template.txt b/mods/ITEMS/mcl_dye/locale/template.txt new file mode 100644 index 000000000..f99638e4c --- /dev/null +++ b/mods/ITEMS/mcl_dye/locale/template.txt @@ -0,0 +1,25 @@ +# textdomain: mcl_dye +Bone Meal= +Light Grey Dye= +Grey Dye= +Ink Sac= +Purple Dye= +Lapis Lazuli= +Light Blue Dye= +Cyan Dye= +Cactus Green= +Lime Dye= +Dandelion Yellow= +Cocoa Beans= +Orange Dye= +Rose Red= +Magenta Dye= +Pink Dye= +This item is a dye which is used for dyeing and crafting.= +Rightclick on a sheep to dye its wool. Other things are dyed by crafting.= +Bone Meal= +Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.= +Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.= +Cocoa beans are a brown dye and can be used to plant cocoas.= +Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.= +Cocoa Beans= diff --git a/mods/ITEMS/mcl_end/building.lua b/mods/ITEMS/mcl_end/building.lua index f4eff3e16..4dbfb5639 100644 --- a/mods/ITEMS/mcl_end/building.lua +++ b/mods/ITEMS/mcl_end/building.lua @@ -1,18 +1,20 @@ -- Building blocks and decorative nodes +local S = minetest.get_translator("mcl_end") minetest.register_node("mcl_end:end_stone", { - description = "End Stone", + description = S("End Stone"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_end_end_stone.png"}, stack_max = 64, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), + after_dig_node = mcl_end.check_detach_chorus_plant, _mcl_blast_resistance = 45, _mcl_hardness = 3, }) minetest.register_node("mcl_end:end_bricks", { - description = "End Stone Bricks", + description = S("End Stone Bricks"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_end_end_bricks.png"}, is_ground_content = false, @@ -24,7 +26,7 @@ minetest.register_node("mcl_end:end_bricks", { }) minetest.register_node("mcl_end:purpur_block", { - description = "Purpur Block", + description = S("Purpur Block"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_end_purpur_block.png"}, is_ground_content = false, @@ -36,7 +38,7 @@ minetest.register_node("mcl_end:purpur_block", { }) minetest.register_node("mcl_end:purpur_pillar", { - description = "Purpur Pillar", + description = S("Purpur Pillar"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, paramtype2 = "facedir", @@ -50,8 +52,8 @@ minetest.register_node("mcl_end:purpur_pillar", { }) minetest.register_node("mcl_end:end_rod", { - description = "End Rod", - _doc_items_longdesc = "End rods are decorational light sources.", + description = S("End Rod"), + _doc_items_longdesc = S("End rods are decorative light sources."), tiles = { "mcl_end_end_rod_top.png", "mcl_end_end_rod_bottom.png", @@ -125,8 +127,8 @@ minetest.register_node("mcl_end:end_rod", { }) minetest.register_node("mcl_end:dragon_egg", { - description = "Dragon Egg", - _doc_items_longdesc = "A dragon egg is a decorational item which can be placed.", + description = S("Dragon Egg"), + _doc_items_longdesc = S("A dragon egg is a decorative item which can be placed."), tiles = { "mcl_end_dragon_egg.png", "mcl_end_dragon_egg.png", diff --git a/mods/ITEMS/mcl_end/chorus_plant.lua b/mods/ITEMS/mcl_end/chorus_plant.lua index 5c48654dc..4e1575c80 100644 --- a/mods/ITEMS/mcl_end/chorus_plant.lua +++ b/mods/ITEMS/mcl_end/chorus_plant.lua @@ -1,6 +1,7 @@ -- Chorus plants -- This includes chorus flowers, chorus plant stem nodes and chorus fruit +local S = minetest.get_translator("mcl_end") --- Plant parts --- @@ -23,10 +24,71 @@ local function round(num, idp) return math.floor(num * mult + 0.5) / mult end +-- This detaches all chorus plants that are/were attached +-- at start_pos. +mcl_end.detach_chorus_plant = function(start_pos, digger) + local neighbors = { + { x=0, y=1, z=0 }, + { x=0, y=0, z=1 }, + { x=-1, y=0, z=0 }, + { x=0, y=0, z=-1 }, + { x=1, y=0, z=0 }, + { x=0, y=-1, z=0 }, + } + table.insert(neighbors, { x=0, y=-1, z=0 }) + local tree_start_posses = {} + for i=1, #neighbors do + table.insert(tree_start_posses, vector.add(start_pos, neighbors[i])) + end + + -- From the start_pos, we look at the 6 possible directions. Each of these can + -- have a full independent chorus plant ("tree") that might be detached. + for t=1, #tree_start_posses do + -- For each "tree", we do a depth-first search to traverse all + -- chorus plant nodes. + local touched_nodes_hashes = { minetest.hash_node_position(start_pos) } + local check_posses = { tree_start_posses[t] } + local chorus_nodes = {} + local break_tree = true + while #check_posses > 0 do + local pos = check_posses[1] + local node = minetest.get_node(pos) + touched_nodes_hashes[minetest.hash_node_position(pos)] = true + if node.name == "mcl_end:end_stone" then + -- End stone found, the algorithm ends here (haha!) + -- without destroying any nodes, because chorus plants + -- attach to end stone. + break_tree = false + break + elseif minetest.get_item_group(node.name, "chorus_plant") == 1 then + table.insert(chorus_nodes, pos) + for i=1, #neighbors do + local newpos = vector.add(pos, neighbors[i]) + if not touched_nodes_hashes[minetest.hash_node_position(newpos)] then + table.insert(check_posses, vector.add(pos, neighbors[i])) + end + end + end + table.remove(check_posses, 1) + end + if break_tree then + -- If we traversed the entire chorus plant and it was not attached to end stone: + -- Drop ALL the chorus nodes we found. + for c=1, #chorus_nodes do + minetest.node_dig(chorus_nodes[c], { name = "mcl_end:chorus_plant" }, digger) + end + end + end +end + +mcl_end.check_detach_chorus_plant = function(pos, oldnode, oldmetadata, digger) + mcl_end.detach_chorus_plant(pos, digger) +end + minetest.register_node("mcl_end:chorus_flower", { - description = "Chorus Flower", - _doc_items_longdesc = "A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow.", - _doc_items_usagehelp = "Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly a chorus plant stem.", + description = S("Chorus Flower"), + _doc_items_longdesc = S("A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow."), + _doc_items_usagehelp = S("Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly one chorus plant stem."), tiles = { "mcl_end_chorus_flower.png", "mcl_end_chorus_flower.png", @@ -41,7 +103,7 @@ minetest.register_node("mcl_end:chorus_flower", { node_box = chorus_flower_box, selection_box = { type = "regular" }, sounds = mcl_sounds.node_sound_wood_defaults(), - groups = {handy=1,axey=1, deco_block = 1, dig_by_piston = 1, destroy_by_lava_flow = 1,}, + groups = {handy=1,axey=1, deco_block = 1, not_in_creative_inventory = 1, dig_by_piston = 1, destroy_by_lava_flow = 1,chorus_plant = 1}, node_placement_prediction = "", on_place = function(itemstack, placer, pointed_thing) @@ -54,7 +116,7 @@ minetest.register_node("mcl_end:chorus_flower", { end end - --[[ Part 1: Check placement rules. Placement is legal is one of the following + --[[ Part 1: Check placement rules. Placement is legal if one of the following conditions is met: 1) On top of end stone or chorus plant 2) On top of air and horizontally adjacent to exactly 1 chorus plant ]] @@ -97,19 +159,23 @@ minetest.register_node("mcl_end:chorus_flower", { end if plant_ok then -- Placement OK! Proceed normally - minetest.sound_play(mcl_sounds.node_sound_wood_defaults().place, {pos = pos}) - return minetest.item_place_node(itemstack, placer, pointed_thing) + local it, suc = minetest.item_place_node(itemstack, placer, pointed_thing) + if suc then + minetest.sound_play(mcl_sounds.node_sound_wood_defaults().place, {pos = pos}) + end + return it else return itemstack end end, + after_dig_node = mcl_end.check_detach_chorus_plant, _mcl_blast_resistance = 2, _mcl_hardness = 0.4, }) minetest.register_node("mcl_end:chorus_flower_dead", { - description = "Dead Chorus Flower", - _doc_items_longdesc = "This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again.", + description = S("Dead Chorus Flower"), + _doc_items_longdesc = S("This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again."), tiles = { "mcl_end_chorus_flower_dead.png", "mcl_end_chorus_flower_dead.png", @@ -125,14 +191,16 @@ minetest.register_node("mcl_end:chorus_flower_dead", { selection_box = { type = "regular" }, sounds = mcl_sounds.node_sound_wood_defaults(), drop = "mcl_end:chorus_flower", - groups = {handy=1,axey=1, deco_block = 1, dig_by_piston = 1, destroy_by_lava_flow = 1,}, + groups = {handy=1,axey=1, deco_block = 1, dig_by_piston = 1, destroy_by_lava_flow = 1,chorus_plant = 1}, + after_dig_node = mcl_end.check_detach_chorus_plant, _mcl_blast_resistance = 2, _mcl_hardness = 0.4, }) minetest.register_node("mcl_end:chorus_plant", { - description = "Chorus Plant Stem", - _doc_items_longdesc = "A chorus plant stem is the part of a chorus plant which holds the whole plant together. It needs end stone as its soil. Stems are grown from chorus flowers.", + description = S("Chorus Plant Stem"), + _doc_items_longdesc = S("A chorus plant stem is the part of a chorus plant which holds the whole plant together. It needs end stone as its soil. Stems are grown from chorus flowers."), + _doc_items_usagehelp = S("The stem attaches itself to end stone and other chorus blocks."), tiles = { "mcl_end_chorus_plant.png", "mcl_end_chorus_plant.png", @@ -155,18 +223,198 @@ minetest.register_node("mcl_end:chorus_plant", { connect_back = { -0.1875, -0.1875, 0.25, 0.1875, 0.1875, 0.5 }, }, connect_sides = { "top", "bottom", "front", "back", "left", "right" }, - connects_to = {"mcl_end:chorus_plant", "mcl_end:chorus_flower", "mcl_end:chorus_flower_dead", "mcl_end:end_stone"}, + connects_to = {"group:chorus_plant", "mcl_end:end_stone"}, sounds = mcl_sounds.node_sound_wood_defaults(), drop = { items = { { items = { "mcl_end:chorus_fruit"}, rarity = 2 }, } }, - groups = {handy=1,axey=1, not_in_creative_inventory = 1, dig_by_piston = 1, destroy_by_lava_flow = 1 }, + groups = {handy=1,axey=1, deco_block = 1, dig_by_piston = 1, destroy_by_lava_flow = 1, chorus_plant = 1 }, + + node_placement_prediction = "", + on_place = function(itemstack, placer, pointed_thing) + local node_under = minetest.get_node(pointed_thing.under) + local node_above = minetest.get_node(pointed_thing.above) + if placer and not placer:get_player_control().sneak then + -- Use pointed node's on_rightclick function first, if present + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(pointed_thing.under, node_under, placer, itemstack) or itemstack + end + end + + --[[ Part 1: Check placement rules. Placement is legal if this + condition is met: + - placed on end stone or any chorus node ]] + local pos_place, node_check + if minetest.registered_nodes[node_under.name].buildable_to then + pos_place = pointed_thing.under + node_check = node_above + else + pos_place = pointed_thing.above + node_check = node_under + end + local plant_ok = false + if node_check.name == "mcl_end:end_stone" or minetest.get_item_group(node_check.name, "chorus_plant") > 0 then + plant_ok = true + end + if plant_ok then + -- Placement OK! Proceed normally + local it, suc = minetest.item_place_node(itemstack, placer, pointed_thing) + if suc then + minetest.sound_play(mcl_sounds.node_sound_wood_defaults().place, {pos = pos_place}) + end + return it + else + return itemstack + end + end, + after_dig_node = mcl_end.check_detach_chorus_plant, _mcl_blast_resistance = 2, _mcl_hardness = 0.4, }) +-- Grow a complete chorus plant at pos +mcl_end.grow_chorus_plant = function(pos, node) + local flowers = { pos } + -- Plant initial flower (if it isn't there already) + if not node then + node = minetest.get_node(pos) + end + if node.name ~= "mcl_end:chorus_flower" then + minetest.set_node(pos, { name = "mcl_end:chorus_flower" }) + end + while true do + local new_flowers_list = {} + for f=1, #flowers do + local new_flowers = mcl_end.grow_chorus_plant_step(flowers[f], minetest.get_node(flowers[f])) + if #new_flowers > 0 then + table.insert(new_flowers_list, new_flowers) + end + end + if #new_flowers_list == 0 then + return + end + flowers = {} + for l=1, #new_flowers_list do + for f=1, #new_flowers_list[l] do + table.insert(flowers, new_flowers_list[l][f]) + end + end + end +end + +-- Grow a single step of a chorus plant at pos. +-- Pos must be a chorus flower. +mcl_end.grow_chorus_plant_step = function(pos, node) + local new_flower_buds = {} + local above = { x = pos.x, y = pos.y + 1, z = pos.z } + local node_above = minetest.get_node(above) + local around = { + { x=-1, y=0, z= 0 }, + { x= 1, y=0, z= 0 }, + { x= 0, y=0, z=-1 }, + { x= 0, y=0, z= 1 }, + } + local air_around = true + for a=1, #around do + if minetest.get_node(vector.add(above, around[a])).name ~= "air" then + air_around = false + break + end + end + local grown = false + if node_above.name == "air" and air_around then + local branching = false + local h = 0 + for y=1, 4 do + local checkpos = {x=pos.x, y=pos.y-y, z=pos.z} + local node = minetest.get_node(checkpos) + if node.name == "mcl_end:chorus_plant" then + h = y + if not branching then + for a=1, #around do + local node_side = minetest.get_node(vector.add(checkpos, around[a])) + if node_side.name == "mcl_end:chorus_plant" then + branching = true + end + end + end + else + break + end + end + + local grow_chance + if h <= 1 then + grow_chance = 100 + elseif h == 2 and branching == false then + grow_chance = 60 + elseif h == 2 and branching == true then + grow_chance = 50 + elseif h == 3 and branching == false then + grow_chance = 40 + elseif h == 3 and branching == true then + grow_chance = 25 + elseif h == 4 and branching == false then + grow_chance = 20 + end + + if grow_chance then + local new_flowers = {} + local r = math.random(1, 100) + local age = node.param2 + if r <= grow_chance then + table.insert(new_flowers, above) + else + age = age + 1 + local branches + if branching == false then + branches = math.random(1, 4) + elseif branching == true then + branches = math.random(0, 3) + end + local branch_grown = false + for b=1, branches do + local next_branch = math.random(1, #around) + local branch = vector.add(pos, around[next_branch]) + local below_branch = vector.add(branch, {x=0,y=-1,z=0}) + if minetest.get_node(below_branch).name == "air" then + table.insert(new_flowers, branch) + end + end + end + + for _, f in ipairs(new_flowers) do + if age >= MAX_FLOWER_AGE then + local nn = minetest.get_node(f).name + if nn ~= "mcl_end:chorus_flower" and nn ~= "mcl_end:chorus_flower_dead" then + minetest.set_node(f, {name="mcl_end:chorus_flower_dead"}) + grown = true + end + else + local nn = minetest.get_node(f).name + if nn ~= "mcl_end:chorus_flower" and nn ~= "mcl_end:chorus_flower_dead" then + minetest.set_node(f, {name="mcl_end:chorus_flower", param2 = age}) + table.insert(new_flower_buds, f) + grown = true + end + end + end + if #new_flowers >= 1 then + minetest.set_node(pos, {name="mcl_end:chorus_plant"}) + grown = true + end + end + end + if not grown then + -- FIXME: In the End, chorus plant fails to generate thru mapchunk borders. + -- So the chorus plants are capped at a fixed height. + -- The mapgen needs to be taught somehow how to deal with this. + minetest.set_node(pos, {name = "mcl_end:chorus_flower_dead"}) + end + return new_flower_buds +end --- ABM --- minetest.register_abm({ @@ -175,101 +423,7 @@ minetest.register_abm({ interval = 35.0, chance = 4.0, action = function(pos, node, active_object_count, active_object_count_wider) - local above = { x = pos.x, y = pos.y + 1, z = pos.z } - local node_above = minetest.get_node(above) - local around = { - { x=-1, y=0, z= 0 }, - { x= 1, y=0, z= 0 }, - { x= 0, y=0, z=-1 }, - { x= 0, y=0, z= 1 }, - } - local air_around = true - for a=1, #around do - if minetest.get_node(vector.add(above, around[a])).name ~= "air" then - air_around = false - break - end - end - local grown = false - if node_above.name == "air" and air_around then - local branching = false - local h = 0 - for y=1, 4 do - local checkpos = {x=pos.x, y=pos.y-y, z=pos.z} - local node = minetest.get_node(checkpos) - if node.name == "mcl_end:chorus_plant" then - h = y - if not branching then - for a=1, #around do - local node_side = minetest.get_node(vector.add(checkpos, around[a])) - if node_side.name == "mcl_end:chorus_plant" then - branching = true - end - end - end - else - break - end - end - - local grow_chance - if h <= 1 then - grow_chance = 100 - elseif h == 2 and branching == false then - grow_chance = 60 - elseif h == 2 and branching == true then - grow_chance = 50 - elseif h == 3 and branching == false then - grow_chance = 40 - elseif h == 3 and branching == true then - grow_chance = 25 - elseif h == 4 and branching == false then - grow_chance = 20 - end - - if grow_chance then - local new_flowers = {} - local r = math.random(1, 100) - local age = node.param2 - if r <= grow_chance then - table.insert(new_flowers, above) - else - age = age + 1 - local branches - if branching == false then - branches = math.random(1, 4) - elseif branching == true then - branches = math.random(0, 3) - end - local branch_grown = false - for b=1, branches do - local next_branch = math.random(1, #around) - local branch = vector.add(pos, around[next_branch]) - local below_branch = vector.add(branch, {x=0,y=-1,z=0}) - if minetest.get_node(below_branch).name == "air" then - table.insert(new_flowers, branch) - end - end - end - - for _, f in ipairs(new_flowers) do - if age >= MAX_FLOWER_AGE then - minetest.set_node(f, {name="mcl_end:chorus_flower_dead"}) - grown = true - else - minetest.set_node(f, {name="mcl_end:chorus_flower", param2 = age}) - grown = true - end - end - if #new_flowers >= 1 then - minetest.set_node(pos, {name="mcl_end:chorus_plant"}) - grown = true - end - end - end - if not grown then - minetest.set_node(pos, {name = "mcl_end:chorus_flower_dead"}) - end + mcl_end.grow_chorus_plant_step(pos, node) end, }) @@ -347,7 +501,7 @@ local eat_chorus_fruit = function(itemstack, player, pointed_thing) end end local count = itemstack:get_count() - local new_itemstack = minetest.do_item_eat(0, nil, itemstack, player, pointed_thing) + local new_itemstack = minetest.do_item_eat(4, nil, itemstack, player, pointed_thing) local new_count = new_itemstack:get_count() if count ~= new_count or new_itemstack:get_name() ~= "mcl_end:chorus_fruit" or (minetest.settings:get_bool("creative_mode") == true) then random_teleport(player) @@ -356,8 +510,8 @@ local eat_chorus_fruit = function(itemstack, player, pointed_thing) end minetest.register_craftitem("mcl_end:chorus_fruit", { - description = "Chorus Fruit", - _doc_items_longdesc = "A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to.", + description = S("Chorus Fruit"), + _doc_items_longdesc = S("A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to."), wield_image = "mcl_end_chorus_fruit.png", inventory_image = "mcl_end_chorus_fruit.png", on_place = eat_chorus_fruit, @@ -368,7 +522,7 @@ minetest.register_craftitem("mcl_end:chorus_fruit", { }) minetest.register_craftitem("mcl_end:chorus_fruit_popped", { - description = "Popped Chorus Fruit", + description = S("Popped Chorus Fruit"), _doc_items_longdesc = doc.sub.items.temp.craftitem, wield_image = "mcl_end_chorus_fruit_popped.png", inventory_image = "mcl_end_chorus_fruit_popped.png", diff --git a/mods/ITEMS/mcl_end/eye_of_ender.lua b/mods/ITEMS/mcl_end/eye_of_ender.lua index 131db7bbc..d074e3923 100644 --- a/mods/ITEMS/mcl_end/eye_of_ender.lua +++ b/mods/ITEMS/mcl_end/eye_of_ender.lua @@ -1,10 +1,12 @@ -- Eye of Ender +local S = minetest.get_translator("mcl_end") minetest.register_entity("mcl_end:ender_eye", { physical = false, textures = {"mcl_end_ender_eye.png"}, visual_size = {x=1.5, y=1.5}, collisionbox = {0,0,0,0,0,0}, + pointable = false, -- Save and restore age get_staticdata = function(self) @@ -35,10 +37,10 @@ minetest.register_entity("mcl_end:ender_eye", { else -- 80% to drop as an item local pos = self.object:get_pos() - local v = self.object:getvelocity() + local v = self.object:get_velocity() self.object:remove() local item = minetest.add_item(pos, "mcl_end:ender_eye") - item:setvelocity(v) + item:set_velocity(v) return end elseif self._age >= 2 then @@ -46,8 +48,8 @@ minetest.register_entity("mcl_end:ender_eye", { self._phase = 1 -- Stop the eye and wait for another second. -- The vertical speed changes are just eye candy. - self.object:setacceleration({x=0, y=-3, z=0}) - self.object:setvelocity({x=0, y=self.object:getvelocity().y*0.2, z=0}) + self.object:set_acceleration({x=0, y=-3, z=0}) + self.object:set_velocity({x=0, y=self.object:get_velocity().y*0.2, z=0}) end else -- Fly normally and generate particles @@ -71,9 +73,9 @@ minetest.register_entity("mcl_end:ender_eye", { }) minetest.register_craftitem("mcl_end:ender_eye", { - description = "Eye of Ender", - _doc_items_longdesc = "This item is used to locate End portal shrines in the Overworld and to activate End portals." .. "\n" .. "NOTE: The End dimension is currently incomplete and boring.", - _doc_items_usagehelp = "Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters." .. "\n" .. "To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame.", + description = S("Eye of Ender"), + _doc_items_longdesc = S("This item is used to locate End portal shrines in the Overworld and to activate End portals.") .. "\n" .. S("NOTE: The End dimension is currently incomplete and might change in future versions."), + _doc_items_usagehelp = S("Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters.") .. "\n" .. S("To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame."), wield_image = "mcl_end_ender_eye.png", inventory_image = "mcl_end_ender_eye.png", stack_max = 64, @@ -126,7 +128,7 @@ minetest.register_craftitem("mcl_end:ender_eye", { local velocity = 4 -- Stronghold is close: Fly directly to stronghold and take Y into account. dir = vector.normalize(vector.direction(origin, closest_stronghold.pos)) - obj:setvelocity({x=dir.x*velocity, y=dir.y*velocity, z=dir.z*velocity}) + obj:set_velocity({x=dir.x*velocity, y=dir.y*velocity, z=dir.z*velocity}) else local velocity = 12 -- Don't care about Y if stronghold is still far away. @@ -134,8 +136,8 @@ minetest.register_craftitem("mcl_end:ender_eye", { local o = {x=origin.x, y=0, z=origin.z} local s = {x=closest_stronghold.pos.x, y=0, z=closest_stronghold.pos.z} dir = vector.normalize(vector.direction(o, s)) - obj:setacceleration({x=dir.x*-3, y=4, z=dir.z*-3}) - obj:setvelocity({x=dir.x*velocity, y=3, z=dir.z*velocity}) + obj:set_acceleration({x=dir.x*-3, y=4, z=dir.z*-3}) + obj:set_velocity({x=dir.x*velocity, y=3, z=dir.z*velocity}) end @@ -150,4 +152,4 @@ minetest.register_craft({ type = "shapeless", output = "mcl_end:ender_eye", recipe = {"mcl_mobitems:blaze_powder", "mcl_throwing:ender_pearl"}, -}) \ No newline at end of file +}) diff --git a/mods/ITEMS/mcl_end/init.lua b/mods/ITEMS/mcl_end/init.lua index 6b76dfcde..e3ca8a86b 100644 --- a/mods/ITEMS/mcl_end/init.lua +++ b/mods/ITEMS/mcl_end/init.lua @@ -1,4 +1,6 @@ +mcl_end = {} + local basepath = minetest.get_modpath(minetest.get_current_modname()) -dofile(basepath.."/building.lua") dofile(basepath.."/chorus_plant.lua") +dofile(basepath.."/building.lua") dofile(basepath.."/eye_of_ender.lua") diff --git a/mods/ITEMS/mcl_end/locale/mcl_end.de.tr b/mods/ITEMS/mcl_end/locale/mcl_end.de.tr new file mode 100644 index 000000000..0290bbfd5 --- /dev/null +++ b/mods/ITEMS/mcl_end/locale/mcl_end.de.tr @@ -0,0 +1,25 @@ +# textdomain: mcl_end +End Stone=Endstein +End Stone Bricks=Endsteinziegel +Purpur Block=Purpurblock +Purpur Pillar=Purpursäule +End Rod=Endstab +End rods are decorative light sources.=Endstäbe sind dekorative Lichtquellen. +Dragon Egg=Drachenei +A dragon egg is a decorative item which can be placed.=Ein Drahenei ist ein dekorativer, platzierbarer Gegenstand. +Chorus Flower=Chorusblume +A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow.=Eine Chorusblume ist der lebendige Teil einer Choruspflanze. Sie kann zu einer großen Choruspflanze heranwachsen, Schritt für Schritt. Wenn sie wächst, wird sie irgendwann am Alter absterben. Sie stirbt auch ab, wenn sie nicht weiterwachsen kann. +Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly one chorus plant stem.=Platzieren Sie sie und warten Sie darauf, dass sie wächst. Sie kann nur auf Endstein, auf einen anderen Choruspflanzenstängel oder an der Seite von genau einem Choruspflanzenstängel platziert werden. +Dead Chorus Flower=Tote Chorusblume +This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again.=Dies ist ein Teil einer Choruspflanze. Er wächst nicht. Chorusblumen werden mit der Zeit alt und sterben ab, sie sterben auch ab, wenn sie nicht weiterwachsen können. Eine tote Chorusblume kann geerntet werden, um eine frische neue Choruspflanze zu erhalten, die wieder wachsen kann. +Chorus Plant Stem=Choruspflanzenstängel +A chorus plant stem is the part of a chorus plant which holds the whole plant together. It needs end stone as its soil. Stems are grown from chorus flowers.=Ein Choruspflanzenstängel ist der Teil einer Choruspflanze, der die gesamte Pflanze zusammenhält. Sie braucht Endstein als Untergrund. Stängel wachsen aus Chorusblumen. +Chorus Fruit=Chorusfrucht +A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to.=Eine Chorusfrucht ist eine essbare Frucht von der Choruspflanze, die im Ende beheimatet ist. Wenn man sie isst, wird man auf einen zufälligen festen Block in der Nähe teleportiert, solange man nicht in eine Flüssigkeit, einen festen oder gefährlichen Block landen würde. Die Teleportation könnte fehlschlagen, wenn es sehr wenige oder keine Orte gibt, zu denen sie einen hinteleportieren könnte. +Popped Chorus Fruit=Aufgeploppte Chorusfrucht +Eye of Ender=Enderauge +This item is used to locate End portal shrines in the Overworld and to activate End portals.=Dieser Gegenstand wird benutzt, um Endportalschreine in der Oberwelt zu finden und Endportale zu aktivieren. +Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters.=Benutzen Sie die Angriffstaste, um das Enderauge loszulassen. Es wird aufsteigen und in einer horizontalen Richtung zum nächsten Endportalschrein fliegen. Wenn Sie sehr nah dran sind, wird das Enderauge stattdessen den direkten Weg zum Endportalschrein nehmen. Nach ein paar Sekunden hält es an. Es könnte als Gegenstand wieder herunterfallen, aber es wird mit einer 20%-Chance zerbrechen. +To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame.=Um ein Endportal zu aktivieren, müssen Enderaugen in jeden Block eines intakten Endportalrahmens platziert werden. +NOTE: The End dimension is currently incomplete and might change in future versions.=ANMERKUNG: Die Ende-Dimension ist momentan unfertig und könnte sich in künftigen Versionen ändern. +The stem attaches itself to end stone and other chorus blocks.=Der Stängel muss sich neben anderen Chorusblöcken oder Endstein befinden. diff --git a/mods/ITEMS/mcl_end/locale/template.txt b/mods/ITEMS/mcl_end/locale/template.txt new file mode 100644 index 000000000..14cc9ff4b --- /dev/null +++ b/mods/ITEMS/mcl_end/locale/template.txt @@ -0,0 +1,25 @@ +# textdomain: mcl_end +End Stone= +End Stone Bricks= +Purpur Block= +Purpur Pillar= +End Rod= +End rods are decorative light sources.= +Dragon Egg= +A dragon egg is a decorative item which can be placed.= +Chorus Flower= +A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow.= +Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly one chorus plant stem.= +Dead Chorus Flower= +This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again.= +Chorus Plant Stem= +A chorus plant stem is the part of a chorus plant which holds the whole plant together. It needs end stone as its soil. Stems are grown from chorus flowers.= +Chorus Fruit= +A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to.= +Popped Chorus Fruit= +Eye of Ender= +This item is used to locate End portal shrines in the Overworld and to activate End portals.= +Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters.= +To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame.= +NOTE: The End dimension is currently incomplete and might change in future versions.= +The stem attaches itself to end stone and other chorus blocks.= diff --git a/mods/ITEMS/mcl_farming/beetroot.lua b/mods/ITEMS/mcl_farming/beetroot.lua index 8fe693580..a6f8fc9ac 100644 --- a/mods/ITEMS/mcl_farming/beetroot.lua +++ b/mods/ITEMS/mcl_farming/beetroot.lua @@ -1,7 +1,9 @@ +local S = minetest.get_translator("mcl_farming") + minetest.register_craftitem("mcl_farming:beetroot_seeds", { - description = "Beetroot Seeds", - _doc_items_longdesc = "Grows into a beetroot plant. Chickens like beetroot seeds.", - _doc_items_usagehelp = "Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds.", + description = S("Beetroot Seeds"), + _doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."), + _doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."), groups = { craftitem=1 }, inventory_image = "mcl_farming_beetroot_seeds.png", wield_image = "mcl_farming_beetroot_seeds.png", @@ -11,9 +13,9 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", { }) minetest.register_node("mcl_farming:beetroot_0", { - description = "Premature Beetroot Plant (Stage 1)", - _doc_items_longdesc = "Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.", - _doc_items_entry_name = "Premature Beetroot Plant", + description = S("Premature Beetroot Plant (Stage 1)"), + _doc_items_longdesc = S("Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature."), + _doc_items_entry_name = S("Premature Beetroot Plant"), paramtype = "light", paramtype2 = "meshoptions", sunlight_propagates = true, @@ -36,7 +38,7 @@ minetest.register_node("mcl_farming:beetroot_0", { }) minetest.register_node("mcl_farming:beetroot_1", { - description = "Premature Beetroot Plant (Stage 2)", + description = S("Premature Beetroot Plant (Stage 2)"), _doc_items_create_entry = false, paramtype = "light", paramtype2 = "meshoptions", @@ -60,7 +62,7 @@ minetest.register_node("mcl_farming:beetroot_1", { }) minetest.register_node("mcl_farming:beetroot_2", { - description = "Premature Beetroot Plant (Stage 3)", + description = S("Premature Beetroot Plant (Stage 3)"), _doc_items_create_entry = false, paramtype = "light", paramtype2 = "meshoptions", @@ -84,8 +86,8 @@ minetest.register_node("mcl_farming:beetroot_2", { }) minetest.register_node("mcl_farming:beetroot", { - description = "Mature Beetroot Plant", - _doc_items_longdesc = "A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further.", + description = S("Mature Beetroot Plant"), + _doc_items_longdesc = S("A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further."), _doc_items_create_entry = true, paramtype = "light", paramtype2 = "meshoptions", @@ -123,9 +125,9 @@ minetest.register_node("mcl_farming:beetroot", { }) minetest.register_craftitem("mcl_farming:beetroot_item", { - description = "Beetroot", - _doc_items_longdesc = "Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too.", - _doc_items_usagehelp = "Hold it in your hand and right-click to eat it. Rightclick an animal to feed it.", + description = S("Beetroot"), + _doc_items_longdesc = S("Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too."), + _doc_items_usagehelp = S("Hold it in your hand and right-click to eat it. Rightclick an animal to feed it."), inventory_image = "mcl_farming_beetroot.png", wield_image = "mcl_farming_beetroot.png", on_place = minetest.item_eat(1), @@ -135,8 +137,8 @@ minetest.register_craftitem("mcl_farming:beetroot_item", { }) minetest.register_craftitem("mcl_farming:beetroot_soup", { - description = "Beetroot Soup", - _doc_items_longdesc = "Beetroot soup is a food item.", + description = S("Beetroot Soup"), + _doc_items_longdesc = S("Beetroot soup is a food item."), stack_max = 1, inventory_image = "mcl_farming_beetroot_soup.png", wield_image = "mcl_farming_beetroot_soup.png", diff --git a/mods/ITEMS/mcl_farming/carrots.lua b/mods/ITEMS/mcl_farming/carrots.lua index 294906773..341bbeb07 100644 --- a/mods/ITEMS/mcl_farming/carrots.lua +++ b/mods/ITEMS/mcl_farming/carrots.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_farming") + for i=1, 7 do local texture, sel_height if i < 3 then @@ -14,13 +16,13 @@ for i=1, 7 do local create, name, longdesc if i == 1 then create = true - name = "Premature Carrot Plant" - longdesc = "Carrot plants are plants which grow on farmland under sunlight in 8 stages, of which only 4 are actually visible. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature." + name = S("Premature Carrot Plant") + longdesc = S("Carrot plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.") else create = false end minetest.register_node("mcl_farming:carrot_"..i, { - description = string.format("Premature Carrot Plant (Stage %d)", i), + description = S("Premature Carrot Plant (Stage @1)", i), _doc_items_create_entry = create, _doc_items_entry_name = name, _doc_items_longdesc = longdesc, @@ -47,8 +49,8 @@ for i=1, 7 do end minetest.register_node("mcl_farming:carrot", { - description = "Mature Carrot Plant", - _doc_items_longdesc = "Mature carrot plants are ready to be harvested for carrots. They won't grow any further.", + description = S("Mature Carrot Plant"), + _doc_items_longdesc = S("Mature carrot plants are ready to be harvested for carrots. They won't grow any further."), paramtype = "light", sunlight_propagates = true, paramtype2 = "meshoptions", @@ -79,9 +81,9 @@ minetest.register_node("mcl_farming:carrot", { }) minetest.register_craftitem("mcl_farming:carrot_item", { - description = "Carrot", - _doc_items_longdesc = "Carrots can be eaten and planted. Pigs and rabbits like carrots.", - _doc_items_usagehelp = "Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.", + description = S("Carrot"), + _doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."), + _doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."), inventory_image = "farming_carrot.png", groups = { food = 2, eatable = 3 }, _mcl_saturation = 3.6, @@ -97,8 +99,8 @@ minetest.register_craftitem("mcl_farming:carrot_item", { }) minetest.register_craftitem("mcl_farming:carrot_item_gold", { - description = "Golden Carrot", - _doc_items_longdesc = "A golden carrot is a precious food item which can be eaten. It is really, really filling!", + description = S("Golden Carrot"), + _doc_items_longdesc = S("A golden carrot is a precious food item which can be eaten. It is really, really filling!"), inventory_image = "farming_carrot_gold.png", on_place = minetest.item_eat(6), on_secondary_use = minetest.item_eat(6), diff --git a/mods/ITEMS/mcl_farming/hoes.lua b/mods/ITEMS/mcl_farming/hoes.lua index bc048f57d..04105b0ad 100644 --- a/mods/ITEMS/mcl_farming/hoes.lua +++ b/mods/ITEMS/mcl_farming/hoes.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_farming") + local function create_soil(pos, inv) if pos == nil then return false @@ -23,16 +25,8 @@ local function create_soil(pos, inv) return false end -local hoe_longdesc = "Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch." -local hoe_usagehelp = "Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt." - -minetest.register_tool("mcl_farming:hoe_wood", { - description = "Wood Hoe", - _doc_items_longdesc = hoe_longdesc, - _doc_items_usagehelp = hoe_usagehelp, - _doc_items_hidden = false, - inventory_image = "farming_tool_woodhoe.png", - on_place = function(itemstack, user, pointed_thing) +local hoe_on_place_function = function(wear_divisor) + return function(itemstack, user, pointed_thing) -- Call on_rightclick if the pointed node defines it local node = minetest.get_node(pointed_thing.under) if user and not user:get_player_control().sneak then @@ -41,14 +35,31 @@ minetest.register_tool("mcl_farming:hoe_wood", { end end + if minetest.is_protected(pointed_thing.under, user:get_player_name()) then + minetest.record_protection_violation(pointed_thing.under, user:get_player_name()) + return itemstack + end + if create_soil(pointed_thing.under, user:get_inventory()) then if not minetest.settings:get_bool("creative_mode") then - itemstack:add_wear(65535/60) + itemstack:add_wear(65535/wear_divisor) end return itemstack end - end, - groups = { tool=1 }, + end +end + +local hoe_longdesc = S("Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch.") +local hoe_usagehelp = S("Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt.") + +minetest.register_tool("mcl_farming:hoe_wood", { + description = S("Wood Hoe"), + _doc_items_longdesc = hoe_longdesc, + _doc_items_usagehelp = hoe_usagehelp, + _doc_items_hidden = false, + inventory_image = "farming_tool_woodhoe.png", + on_place = hoe_on_place_function(60), + groups = { tool=1, hoe=1 }, tool_capabilities = { full_punch_interval = 1, damage_groups = { fleshy = 1, } @@ -79,27 +90,12 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_stone", { - description = "Stone Hoe", + description = S("Stone Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_stonehoe.png", - on_place = function(itemstack, user, pointed_thing) - -- Call on_rightclick if the pointed node defines it - local node = minetest.get_node(pointed_thing.under) - if user and not user:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack - end - end - - if create_soil(pointed_thing.under, user:get_inventory()) then - if not minetest.settings:get_bool("creative_mode") then - itemstack:add_wear(65535/132) - end - return itemstack - end - end, - groups = { tool=1 }, + on_place = hoe_on_place_function(132), + groups = { tool=1, hoe=1 }, tool_capabilities = { full_punch_interval = 0.5, damage_groups = { fleshy = 1, } @@ -125,27 +121,12 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_iron", { - description = "Iron Hoe", + description = S("Iron Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_steelhoe.png", - on_place = function(itemstack, user, pointed_thing) - -- Call on_rightclick if the pointed node defines it - local node = minetest.get_node(pointed_thing.under) - if user and not user:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack - end - end - - if create_soil(pointed_thing.under, user:get_inventory()) then - if not minetest.settings:get_bool("creative_mode") then - itemstack:add_wear(65535/251) - end - return itemstack - end - end, - groups = { tool=1 }, + on_place = hoe_on_place_function(251), + groups = { tool=1, hoe=1 }, tool_capabilities = { -- 1/3 full_punch_interval = 0.33333333, @@ -179,27 +160,12 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_gold", { - description = "Golden Hoe", + description = S("Golden Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_goldhoe.png", - on_place = function(itemstack, user, pointed_thing) - -- Call on_rightclick if the pointed node defines it - local node = minetest.get_node(pointed_thing.under) - if user and not user:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack - end - end - - if create_soil(pointed_thing.under, user:get_inventory()) then - if not minetest.settings:get_bool("creative_mode") then - itemstack:add_wear(65535/33) - end - return itemstack - end - end, - groups = { tool=1 }, + on_place = hoe_on_place_function(33), + groups = { tool=1, hoe=1 }, tool_capabilities = { full_punch_interval = 1, damage_groups = { fleshy = 1, } @@ -234,27 +200,12 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_diamond", { - description = "Diamond Hoe", + description = S("Diamond Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_diamondhoe.png", - on_place = function(itemstack, user, pointed_thing) - -- Call on_rightclick if the pointed node defines it - local node = minetest.get_node(pointed_thing.under) - if user and not user:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack - end - end - - if create_soil(pointed_thing.under, user:get_inventory()) then - if not minetest.settings:get_bool("creative_mode") then - itemstack:add_wear(65535/1562) - end - return itemstack - end - end, - groups = { tool=1 }, + on_place = hoe_on_place_function(1562), + groups = { tool=1, hoe=1 }, tool_capabilities = { full_punch_interval = 0.25, damage_groups = { fleshy = 1, } diff --git a/mods/ITEMS/mcl_farming/locale/mcl_farming.de.tr b/mods/ITEMS/mcl_farming/locale/mcl_farming.de.tr new file mode 100644 index 000000000..7f14774cc --- /dev/null +++ b/mods/ITEMS/mcl_farming/locale/mcl_farming.de.tr @@ -0,0 +1,93 @@ +# textdomain: mcl_farming +Beetroot Seeds=Rote-Beete-Samen +Grows into a beetroot plant. Chickens like beetroot seeds.=Wachsen zu Rote Beete heran. Hühner mögen Rote-Beete-Samen. +Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds.=Platzieren Sie die Rote-Beete-Samen auf Ackerboden (der mit einer Hacke gemacht werden kann), um Rote Beete zu pflanzen. Sie wächst im Sonnenlicht und wächst auf bewässertem Ackerboden schneller. Rechtsklicken Sie auf ein Tier, um es mit Rote-Beete-Samen zu füttern. +Premature Beetroot Plant (Stage 1)=Junge Rote Beete (1. Stufe) +Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.=Rote Beete ist eine Pflanze, die auf Ackerboden im Sonnenlicht in 4 Stufen wächst. Auf bewässertem Ackerboden wächst sie etwas schneller. Sie kann jederzeit abgeerntet werden, aber wird nur einen Ertrag abwerfen, wenn sie ausgewachsen ist. +Premature Beetroot Plant=Junge Rote Beete +Premature Beetroot Plant (Stage 2)=Junge Rote Beete (2. Stufe) +Premature Beetroot Plant (Stage 3)=Junge Rote Beete (3. Stufe) +Mature Beetroot Plant=Ausgewachsene Rote Beete +A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further.=Eine ausgewachsene Rote Beete ist eine erntereife Pflanze, die für eine Rote-Beete-Rübe und ein paar Rote-Beete-Samen abgeerntet werden kann. Sie wächst nicht weiter. +Beetroot=Rote-Beete-Rübe +Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too.=Rote-Beete-Rüben sind eine Speise und nützlich zur Herstellung von Farbstoffen. Schweine mögen sie auch. +Hold it in your hand and right-click to eat it. Rightclick an animal to feed it.=Halten Sie es in der Hand und rechtsklicken Sie, um es zu essen. Rechtsklicken Sie auf ein Tier, um es zu füttern. +Beetroot Soup=Rote-Beete-Suppe +Beetroot soup is a food item.=Rote-Beete-Suppe ist ein Lebensmittel. +Premature Carrot Plant=Junge Karottenpflanze +Carrot plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.=Karottenpflanzen sind Pflanzen, die auf Ackerboden im Sonnenlicht in 8 Stufen wachsen, aber es gibt nur 4 sichtbar unterscheidbare Stufen. Auf bewässertem Ackerboden wachsen sie etwas schneller. Sie können jederzeit abgeerntet werden, aber werden nur einen Ertrag abwerfen, wenn sie ausgewachsen sind. +Premature Carrot Plant (Stage @1)=Junge Karottenpflanze (@1. Stufe) +Mature Carrot Plant=Ausgewachsene Karottenpflanze +Mature carrot plants are ready to be harvested for carrots. They won't grow any further.=Ausgewachsene Karottenpflanzen können für Karotten abgeerntet werden. Sie werden nicht weiter wachsen. +Carrot=Karotte +Carrots can be eaten and planted. Pigs and rabbits like carrots.=Karotten können gegessen und gepflanzt werden. Schweine und Kaninchen mögen Karotten. +Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.=Halten Sie es in ihrer Hand und rechtsklicken Sie, um es zu essen. Platzieren Sie sie auf Ackerboden, um sie einzupflanzen. Sie wächst im Sonnenlicht und wächst auf bewässertem Ackerboden schneller. Rechtsklicken Sie auf ein Tier, um es zu füttern. +Golden Carrot=Goldene Karotte +A golden carrot is a precious food item which can be eaten. It is really, really filling!=Eine goldene Karotte ist ein kostbares Lebensmittel. Es ist sehr, sehr sättigend! +Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch.=Hacken sind unerlässliche Werkzeuge für die Zucht von Feldpflanzen. Sie können benutzt werden, um einen Ackerboden zu machen, auf dem Samen gepflanzt werden können. Hacken können zur Not auch als sehr schwache Waffen benutzt werden. +Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt.=Benutzen Sie die Hacke auf einen beackerbaren Block (indem Sie ihn rechtsklicken), um ihn zu Ackerboden in verwandeln. Erde, Grasblöcke und Graspfade können beackert werden. Grobe Erde wird zu Erde. +Wood Hoe=Holzhacke +Stone Hoe=Steinhacke +Iron Hoe=Eisenhacke +Golden Hoe=Goldhacke +Diamond Hoe=Diamanthacke +Melon Seeds=Melonensamen +Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds.=Platzieren Sie die Melonensamen auf Ackerboden (der mit einer Hacke gemacht werden kann), um einen Melonenstängel zu pflanzen. Melonenstängel wachsen im Sonnenlicht und wachen auf bewässertem Ackerboden schneller. Ausgewachsen wird der Melonenstängel versuchen, an der Seite eine Melone wachsen zu lassen. Rechtsklicken Sie auf ein Tier, um es mit Melonensamen zu füttern. +Melon=Melone +Grows into a melon stem which in turn grows melons. Chickens like melon seeds.=Wächst zu einem Melonenstängel heran, aus dem wiederum Melonen wachsen. Hühner mögen Melonensamen. +A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices.=Eine Melone ist ein Block, der von Melonenstängeln wächst, der wiederum aus Melonensamen wächst. Er kann für Melonenstücke abgeerntet werden. +Premature Melon Stem=Junger Melonenstängel +Melon stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature melon stems are able to grow melons.=Melonenstängel wachsen auf Ackerboden in 8 Stufen. Auf bewässertem Ackerboden ist das Wachstum etwas schneller. Aus ausgewachsenen Melonenstängeln können Melonen wachsen. +Premature Melon Stem (Stage @1)=Junger Melonenstängel (@1. Stufe) +Mature Melon Stem=Ausgewachsener Melonenstängel +A mature melon stem attempts to grow a melon at one of its four adjacent blocks. A melon can only grow on top of farmland, dirt, or a grass block. When a melon is next to a melon stem, the melon stem immediately bends and connects to the melon. While connected, a melon stem can't grow another melon. As soon all melons around the stem have been removed, it loses the connection and is ready to grow another melon.=Ein ausgewachsener Melonenstängel versucht, auf einem seiner vier benachbarten Blöcke eine Melone wachsen zu lassen. Eine Melone kann nur auf Ackerboden, Erde oder einem Grasblock wachsen. Wenn sich eine Melone neben einem Melonenstängel befindet, verbiegt sich der Melonenstängel und verbindet sich mit der Melone. Solange der Stängel verbunden ist, kann aus ihm keine neue Melone wachsen. Wenn alle Melonen um den Melonenstängel entfernt wurden, verliert er die Verbindung und aus ihm kann eine weitere Melone wachsen. +Melon Slice=Melonenstück +This is a food item which can be eaten.=Ein essbares Lebensmittel. +Premature Potato Plant=Junge Kartoffelpflanze +Potato plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.=Kartoffelpflanzen sind Pflanzen, die auf Ackerboden im Sonnenlicht in 8 Stufen wachsen, aber es gibt nur 4 sichtbar unterscheidbare Stufen. Auf bewässertem Ackerboden wachsen sie etwas schneller. Sie können jederzeit abgeerntet werden, aber werden nur einen Ertrag abwerfen, wenn sie ausgewachsen sind. +Premature Potato Plant (Stage @1)=Junge Kartoffelpflanze (@1. Stufe) +Mature Potato Plant=Ausgewachsene Kartoffelpflanze +Mature potato plants are ready to be harvested for potatoes. They won't grow any further.=Ausgewachsene Kartoffelpflanzen können für Kartoffeln abgeerntet werden. Sie wachsen nicht weiter. +Potato=Kartoffel +Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes.=Kartoffeln sind essbare Lebensmittel, können im Ofen gebacken und eingepflanzt werden. Schweine mögen Kartoffeln. +Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.=Halten Sie sie in der Hand und rechtsklicken Sie zum Essen. Platzieren Sie sie auf Ackerboden, um sie zu pflanzen. Sie wächst im Sonnenlicht und wächst auf bewässertem Ackerboden schneller. Rechtsklicken Sie auf ein Tier, um es zu füttern. +Baked Potato=Ofenkartoffel +Baked potatoes are food items which are more filling than the unbaked ones.=Ofenkartoffeln sind Lebensmittel, die etwas nahrhafter als rohe Kartoffeln sind. +Poisonous Potato=Giftige Kartoffel +This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly.=Diese Kartoffel sieht nicht gerade gesund aus. Sie kann gegessen werden, um Hungerpunkte zu erhalten, aber es gibt eine Chance von 60%, dass das Sie kurz vergiften wird. +Pumpkin Seeds=Kürbissamen +Grows into a pumpkin stem which in turn grows pumpkins. Chickens like pumpkin seeds.=Wächst zu einem Kürbisstängel heran, aus dem wiederum Kürbisse wachsen. Hühner mögen Kürbissamen. +Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds.=Platzieren Sie die Kürbissamen auf Ackerboden (der mit einer Hacke gemacht werden kann), um einen Kürbisstängel zu pflanzen. Kürbisstängel wachsen im Sonnenlicht und wachsen auf bewässertem Ackerboden schneller. Ausgewachsen wird der Kürbisstängel versuchen, einen Kürbis an einem benachbartem Feld wachsen zu lassen. Rechtsklicken Sie auf ein Tier, um es mit Kürbissamen zu füttern. +Premature Pumpkin Stem=Junger Kürbisstängel +Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature pumpkin stems are able to grow pumpkins.=Kürbisstängel wachsen auf Ackerboden in 8 Stufen. Auf bewässertem Ackerboden ist das Wachstum etwas schneller. Aus ausgewachsenen Kürbisstängeln können Kürbisse wachsen. +Premature Pumpkin Stem (Stage @1)=Junger Kürbisstängel (@1. Stufe) +Mature Pumpkin Stem=Ausgewachsener Kürbisstängel +A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=Ein ausgewachsener Kürbisstängel versucht, auf einem seiner vier benachbarten Blöcke einen Kürbis wachsen zu lassen. Ein Kürbis kann nur auf Ackerboden, Erde oder einem Grasblock wachsen. Wenn sich ein Kürbis neben einem Kürbisstängel befindet, verbiegt sich der Kürbisstängel und verbindet sich mit dem Kürbis. Solange der Stängel verbunden ist, kann aus ihm kein neuer Kürbis wachsen. Wenn alle Kürbisse um den Kürbisstängel entfernt wurden, verliert er die Verbindung und aus ihm kann ein weiterer Kürbis wachsen. +Faceless Pumpkin=Gesichtsloser Kürbis +A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=Ein gesichtsloser Kürbis ist ein dekorativer Block. Mit einer Schere kann man in ihm ein Muster schnitzen, um Kürbissamen zu erhalten. +Pumpkin=Kürbis +A pumpkin can be worn as a helmet for fun, but it doesn't offer any protection. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=Einen Kürbis kann zum Spaß als Helm getragen werden, aber er bietet keinen Schutz. Kürbisse wachsen aus Kürbisstängeln, welche wiederum aus Kürbissamen wachsen. +Jack o'Lantern=Kürbislaterne +A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=Eine Kürbislaterne ist eine traditionelle Dekoration für Halloween. Sie leuchtet hell. +Pumpkin Pie=Kürbiskuchen +A pumpkin pie is a tasty food item which can be eaten.=Ein Kürbiskuchen ist ein leckeres essbares Lebensmittel. +Farmland=Ackerboden +Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.=Ackerboden wird für den Ackerbau genutzt, ein unerlässlicher Boden zum Anbau von Nutzpflanzen. Er wird erstellt, wenn eine Hacke auf Erde oder einem ähnlichen Block benutzt wird. Pflanzen können auf Ackerboden wachsen, aber nur langsam. Ackerboden wird zu bewässertem Ackerboden (auf dem Pflanzen schneller wachsen), wenn es regnet oder sich eine Wasserquelle in der Nähe befindet. Dieser Block wird sich zurück zu Erde verwandeln, wenn über ihn ein fester Block auftaucht oder sich über ihn ein Kolbenarm ausbreitet. +Hydrated Farmland=Bewässerter Ackerboden +Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmland is under rain or near water. Without water, this block will dry out eventually. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.=Bewässerter Ackerboden wird für den Ackerbau benutzt, auf ihm kann man Nutzpflanzen züchten. Er entsteht, wenn sich Ackerboden unter Regen oder in der Nähe von Wasser befindet. Ohne Wasser wird dieser Block irgendwann austrocknen. Dieser Block verwandelt sich zurück zu Erde, wenn über ihm ein fester Block auftaucht, oder ein Kolbenarm sich über ihn bewegt. +Wheat Seeds=Weizensamen +Grows into a wheat plant. Chickens like wheat seeds.=Wachsen zu einer Weizenpflanze heran. Hühner mögen Weizensamen. +Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.=Platzieren Sie die Weizensamen auf Ackerboden (welcher mit einer Hacke gemacht werden kann), um eine Weizenpflanze zu pflanzen. Sie wächst im Sonnenlicht und wächst schneller auf bewässertem Ackerboden. Rechtsklicken Sie auf ein Tier, um es mit Weizensamen zu füttern. +Premature Wheat Plant=Junge Weizenpflanze +Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.=Junge Weizenpflanzen wachsen auf Ackerboden im Sonnenlicht in 8 Stufen. Auf bewässertem Ackerboden wachsen sie schneller. Sie können jederzeit abgeerntet werden, aber werden nur ertragreich sein, wenn sie ausgewachsen sind. +Premature Wheat Plant (Stage @1)=Junge Weizenpflanze (@1. Stufe) +Mature Wheat Plant=Ausgewachsene Weizenpflanze +Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further.=Ausgewachsene Weizenpflanzen können für Weizen und Weizensamen abgeerntet werden. Sie wachsen nicht weiter. +Wheat=Weizen +Wheat is used in crafting. Some animals like wheat.=Weizen wird in der Herstellung gebraucht. Einige Tiere mögen Weizen. +Cookie=Keks +Bread=Brot +Hay Bale=Heuballen +Hay bales are decorative blocks made from wheat.=Heuballen sind dekorative Blöcke, die aus Weizen gemacht sind. +To carve a face into the pumpkin, use the shears on the side you want to carve.=Um ein Gesicht in den Kürbis zu schnitzen, benutzen Sie die Schere an der Seite, die Sie schnitzen wollen. +Use the “Place” key on an animal to try to feed it wheat.=Benutzen Sie die „Platzieren“-Taste auf einem Tier, um zu versuchen, es zu füttern. diff --git a/mods/ITEMS/mcl_farming/locale/template.txt b/mods/ITEMS/mcl_farming/locale/template.txt new file mode 100644 index 000000000..fb124df67 --- /dev/null +++ b/mods/ITEMS/mcl_farming/locale/template.txt @@ -0,0 +1,93 @@ +# textdomain: mcl_farming +Beetroot Seeds= +Grows into a beetroot plant. Chickens like beetroot seeds.= +Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds.= +Premature Beetroot Plant (Stage 1)= +Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.= +Premature Beetroot Plant= +Premature Beetroot Plant (Stage 2)= +Premature Beetroot Plant (Stage 3)= +Mature Beetroot Plant= +A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further.= +Beetroot= +Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too.= +Hold it in your hand and right-click to eat it. Rightclick an animal to feed it.= +Beetroot Soup= +Beetroot soup is a food item.= +Premature Carrot Plant= +Carrot plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.= +Premature Carrot Plant (Stage @1)= +Mature Carrot Plant= +Mature carrot plants are ready to be harvested for carrots. They won't grow any further.= +Carrot= +Carrots can be eaten and planted. Pigs and rabbits like carrots.= +Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.= +Golden Carrot= +A golden carrot is a precious food item which can be eaten. It is really, really filling!= +Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch.= +Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt.= +Wood Hoe= +Stone Hoe= +Iron Hoe= +Golden Hoe= +Diamond Hoe= +Melon Seeds= +Grows into a melon stem which in turn grows melons. Chickens like melon seeds.= +Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds.= +Melon= +A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices.= +Premature Melon Stem= +Melon stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature melon stems are able to grow melons.= +Premature Melon Stem (Stage @1)= +Mature Melon Stem= +A mature melon stem attempts to grow a melon at one of its four adjacent blocks. A melon can only grow on top of farmland, dirt, or a grass block. When a melon is next to a melon stem, the melon stem immediately bends and connects to the melon. While connected, a melon stem can't grow another melon. As soon all melons around the stem have been removed, it loses the connection and is ready to grow another melon.= +Melon Slice= +This is a food item which can be eaten.= +Premature Potato Plant= +Potato plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.= +Premature Potato Plant (Stage @1)= +Mature Potato Plant= +Mature potato plants are ready to be harvested for potatoes. They won't grow any further.= +Potato= +Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes.= +Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.= +Baked Potato= +Baked potatoes are food items which are more filling than the unbaked ones.= +Poisonous Potato= +This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly.= +Pumpkin Seeds= +Grows into a pumpkin stem which in turn grows pumpkins. Chickens like pumpkin seeds.= +Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds.= +Premature Pumpkin Stem= +Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature pumpkin stems are able to grow pumpkins.= +Premature Pumpkin Stem (Stage @1)= +Mature Pumpkin Stem= +A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.= +Faceless Pumpkin= +A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.= +Pumpkin= +A pumpkin can be worn as a helmet for fun, but it doesn't offer any protection. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.= +Jack o'Lantern= +A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.= +Pumpkin Pie= +A pumpkin pie is a tasty food item which can be eaten.= +Farmland= +Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.= +Hydrated Farmland= +Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmland is under rain or near water. Without water, this block will dry out eventually. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.= +Wheat Seeds= +Grows into a wheat plant. Chickens like wheat seeds.= +Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.= +Premature Wheat Plant= +Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.= +Premature Wheat Plant (Stage @1)= +Mature Wheat Plant= +Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further.= +Wheat= +Wheat is used in crafting. Some animals like wheat.= +Cookie= +Bread= +Hay Bale= +Hay bales are decorative blocks made from wheat.= +To carve a face into the pumpkin, use the shears on the side you want to carve.= +Use the “Place” key on an animal to try to feed it wheat.= diff --git a/mods/ITEMS/mcl_farming/melon.lua b/mods/ITEMS/mcl_farming/melon.lua index 7e3cfa1da..18eb7faab 100644 --- a/mods/ITEMS/mcl_farming/melon.lua +++ b/mods/ITEMS/mcl_farming/melon.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_farming") + -- Seeds minetest.register_craftitem("mcl_farming:melon_seeds", { - description = "Melon Seeds", - _doc_items_longdesc = "Grows into a melon. Chickens like melon seeds.", - _doc_items_usagehelp = "Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melons grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it melon seeds.", + description = S("Melon Seeds"), + _doc_items_longdesc = S("Grows into a melon stem which in turn grows melons. Chickens like melon seeds."), + _doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds."), stack_max = 64, groups = { craftitem=1 }, inventory_image = "mcl_farming_melon_seeds.png", @@ -14,8 +16,8 @@ minetest.register_craftitem("mcl_farming:melon_seeds", { -- Melon template (will be fed into mcl_farming.register_gourd local melon_base_def = { - description = "Melon", - _doc_items_longdesc = "A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices.", + description = S("Melon"), + _doc_items_longdesc = S("A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices."), stack_max = 64, tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"}, groups = {handy=1,axey=1, plant=1,building_block=1,enderman_takable=1,dig_by_piston=1}, @@ -37,7 +39,7 @@ local melon_base_def = { -- Drop proabilities for melon stem local stem_drop = { max_items = 1, - -- FIXME: The probabilities are slightly off from the original. + -- The probabilities are slightly off from the original. -- Update this drop list when the Minetest drop probability system -- is more powerful. items = { @@ -68,13 +70,13 @@ for s=1,7 do local doc = s == 1 local longdesc, entry_name if doc then - entry_name = "Premature Melon Stem" - longdesc = "Melon stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature melon stems are able to grow melons." + entry_name = S("Premature Melon Stem") + longdesc = S("Melon stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature melon stems are able to grow melons.") end local colorstring = mcl_farming:stem_color(startcolor, endcolor, s, 8) local texture = "([combine:16x16:0,"..((8-s)*2).."=mcl_farming_melon_stem_disconnected.png)^[colorize:"..colorstring..":127" minetest.register_node("mcl_farming:melontige_"..s, { - description = string.format("Premature Melon Stem (Stage %d)", s), + description = S("Premature Melon Stem (Stage @1)", s), _doc_items_create_entry = doc, _doc_items_entry_name = entry_name, _doc_items_longdesc = longdesc, @@ -100,9 +102,9 @@ end -- Full melon stem, able to spawn melons local stem_def = { - description = "Mature Melon Stem", + description = S("Mature Melon Stem"), _doc_items_create_entry = true, - _doc_items_longdesc = "A mature melon stem attempts to grow a melon at one of its four adjacent blocks. A melon can only grow on top of farmland, dirt, or a grass block. When a melon is next to a melon stem, the melon stem immediately bends and connects to the melon. While connected, a melon stem can't grow another melon. As soon all melons around the stem have been removed, it loses the connection and is ready to grow another melon.", + _doc_items_longdesc = S("A mature melon stem attempts to grow a melon at one of its four adjacent blocks. A melon can only grow on top of farmland, dirt, or a grass block. When a melon is next to a melon stem, the melon stem immediately bends and connects to the melon. While connected, a melon stem can't grow another melon. As soon all melons around the stem have been removed, it loses the connection and is ready to grow another melon."), tiles = {"mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", @@ -117,8 +119,8 @@ mcl_farming:add_gourd("mcl_farming:melontige_unconnect", "mcl_farming:melontige_ -- Items and crafting minetest.register_craftitem("mcl_farming:melon_item", { -- Original name: “Melon” - description = "Melon Slice", - _doc_items_longdesc = "This is a food item which can be eaten.", + description = S("Melon Slice"), + _doc_items_longdesc = S("This is a food item which can be eaten."), stack_max = 64, inventory_image = "farming_melon.png", on_place = minetest.item_eat(2), diff --git a/mods/ITEMS/mcl_farming/potatoes.lua b/mods/ITEMS/mcl_farming/potatoes.lua index 7294275a4..0ffbd1fad 100644 --- a/mods/ITEMS/mcl_farming/potatoes.lua +++ b/mods/ITEMS/mcl_farming/potatoes.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_farming") + -- Premature potato plants for i=1, 7 do @@ -16,8 +18,8 @@ for i=1, 7 do local create, name, longdesc if i==1 then create = true - name = "Premature Potato Plant" - longdesc = "Potato plants are plants which grow on farmland under sunlight in 8 stages, of which only 4 are actually visible. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature." + name = S("Premature Potato Plant") + longdesc = S("Potato plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.") else create = false if minetest.get_modpath("doc") then @@ -26,7 +28,7 @@ for i=1, 7 do end minetest.register_node("mcl_farming:potato_"..i, { - description = string.format("Premature Potato Plant (Stage %d)", i), + description = S("Premature Potato Plant (Stage @1)", i), _doc_items_create_entry = create, _doc_items_entry_name = name, _doc_items_longdesc = longdesc, @@ -52,8 +54,8 @@ end -- Mature plant minetest.register_node("mcl_farming:potato", { - description = "Mature Potato Plant", - _doc_items_longdesc = "Mature potato plants are ready to be harvested for potatoes. They won't grow any further.", + description = S("Mature Potato Plant"), + _doc_items_longdesc = S("Mature potato plants are ready to be harvested for potatoes. They won't grow any further."), paramtype = "light", paramtype2 = "meshoptions", sunlight_propagates = true, @@ -84,9 +86,9 @@ minetest.register_node("mcl_farming:potato", { }) minetest.register_craftitem("mcl_farming:potato_item", { - description = "Potato", - _doc_items_longdesc = "Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes.", - _doc_items_usagehelp = "Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.", + description = S("Potato"), + _doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."), + _doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."), inventory_image = "farming_potato.png", groups = { food = 2, eatable = 1 }, _mcl_saturation = 0.6, @@ -103,8 +105,8 @@ minetest.register_craftitem("mcl_farming:potato_item", { }) minetest.register_craftitem("mcl_farming:potato_item_baked", { - description = "Baked Potato", - _doc_items_longdesc = "Baked potatoes are food items which are more filling than the unbaked ones.", + description = S("Baked Potato"), + _doc_items_longdesc = S("Baked potatoes are food items which are more filling than the unbaked ones."), stack_max = 64, inventory_image = "farming_potato_baked.png", on_place = minetest.item_eat(5), @@ -114,8 +116,8 @@ minetest.register_craftitem("mcl_farming:potato_item_baked", { }) minetest.register_craftitem("mcl_farming:potato_item_poison", { - description = "Poisonous Potato", - _doc_items_longdesc = "This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly.", + description = S("Poisonous Potato"), + _doc_items_longdesc = S("This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly."), stack_max = 64, inventory_image = "farming_potato_poison.png", -- TODO: Cause status effects diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index 6b0d31816..d10437479 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_farming") + -- Seeds minetest.register_craftitem("mcl_farming:pumpkin_seeds", { - description = "Pumpkin Seeds", - _doc_items_longdesc = "Grows into a pumpkin. Chickens like pumpkin seeds.", - _doc_items_usagehelp = "Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkins grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it pumpkin seeds.", + description = S("Pumpkin Seeds"), + _doc_items_longdesc = S("Grows into a pumpkin stem which in turn grows pumpkins. Chickens like pumpkin seeds."), + _doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds."), stack_max = 64, inventory_image = "mcl_farming_pumpkin_seeds.png", groups = { craftitem=1 }, @@ -13,7 +15,7 @@ minetest.register_craftitem("mcl_farming:pumpkin_seeds", { local stem_drop = { max_items = 1, - -- FIXME: The probabilities are slightly off from the original. + -- The probabilities are slightly off from the original. -- Update this drop list when the Minetest drop probability system -- is more powerful. items = { @@ -42,13 +44,13 @@ for s=1,7 do local doc = s == 1 local longdesc, entry_name if doc then - entry_name = "Premature Pumpkin Stem" - longdesc = "Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature pumpkin stems are able to grow pumpkins." + entry_name = S("Premature Pumpkin Stem") + longdesc = S("Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature pumpkin stems are able to grow pumpkins.") end local colorstring = mcl_farming:stem_color(startcolor, endcolor, s, 8) local texture = "([combine:16x16:0,"..((8-s)*2).."=mcl_farming_pumpkin_stem_disconnected.png)^[colorize:"..colorstring..":127" minetest.register_node("mcl_farming:pumpkin_"..s, { - description = string.format("Premature Pumpkin Stem (Stage %d)", s), + description = S("Premature Pumpkin Stem (Stage @1)", s), _doc_items_entry_name = entry_name, _doc_items_create_entry = doc, _doc_items_longdesc = longdesc, @@ -74,8 +76,8 @@ end -- Full stem (not connected) local stem_def = { - description = "Mature Pumpkin Stem", - _doc_items_longdesc = "A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.", + description = S("Mature Pumpkin Stem"), + _doc_items_longdesc = S("A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin."), tiles = {"mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", @@ -83,9 +85,9 @@ local stem_def = { -- Template for pumpkin local pumpkin_base_def = { - description = "Faceless Pumpkin", - _doc_items_longdesc = "A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.", - _doc_items_usagehelp = "To carve a face into the pumpkin, use the shears on the side you want to carve.", + description = S("Faceless Pumpkin"), + _doc_items_longdesc = S("A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds."), + _doc_items_usagehelp = S("To carve a face into the pumpkin, use the shears on the side you want to carve."), stack_max = 64, paramtype2 = "facedir", tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"}, @@ -97,8 +99,9 @@ local pumpkin_base_def = { minetest.register_node("mcl_farming:pumpkin", pumpkin_base_def) local pumpkin_face_base_def = table.copy(pumpkin_base_def) -pumpkin_face_base_def.description = "Pumpkin" -pumpkin_face_base_def._doc_items_longdesc = "A pumpkin can be worn as a helmet for fun, but it doesn't offer any protection. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds." +pumpkin_face_base_def.description = S("Pumpkin") +pumpkin_face_base_def._doc_items_longdesc = S("A pumpkin can be worn as a helmet for fun, but it doesn't offer any protection. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.") +pumpkin_face_base_def._doc_items_usagehelp = nil pumpkin_face_base_def.tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"} pumpkin_face_base_def.groups.armor_head=1 pumpkin_face_base_def.groups.non_combat_armor=1 @@ -116,8 +119,8 @@ end) -- Jack o'Lantern minetest.register_node("mcl_farming:pumpkin_face_light", { - description = "Jack o'Lantern", - _doc_items_longdesc = "A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.", + description = S("Jack o'Lantern"), + _doc_items_longdesc = S("A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly."), is_ground_content = false, stack_max = 64, paramtype = "light", @@ -155,8 +158,8 @@ minetest.register_craft({ }) minetest.register_craftitem("mcl_farming:pumpkin_pie", { - description = "Pumpkin Pie", - _doc_items_longdesc = "A pumpkin pie is a tasty food item which can be eaten.", + description = S("Pumpkin Pie"), + _doc_items_longdesc = S("A pumpkin pie is a tasty food item which can be eaten."), stack_max = 64, inventory_image = "mcl_farming_pumpkin_pie.png", wield_image = "mcl_farming_pumpkin_pie.png", diff --git a/mods/ITEMS/mcl_farming/soil.lua b/mods/ITEMS/mcl_farming/soil.lua index 0b38a5ed9..012a9659b 100644 --- a/mods/ITEMS/mcl_farming/soil.lua +++ b/mods/ITEMS/mcl_farming/soil.lua @@ -1,7 +1,9 @@ +local S = minetest.get_translator("mcl_farming") + minetest.register_node("mcl_farming:soil", { tiles = {"mcl_farming_farmland_dry.png", "default_dirt.png"}, - description = "Farmland", - _doc_items_longdesc = "Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.", + description = S("Farmland"), + _doc_items_longdesc = S("Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it."), drop = "mcl_core:dirt", drawtype = "nodebox", paramtype = "light", @@ -24,8 +26,8 @@ minetest.register_node("mcl_farming:soil", { minetest.register_node("mcl_farming:soil_wet", { tiles = {"mcl_farming_farmland_wet.png", "default_dirt.png"}, - description = "Hydrated Farmland", - _doc_items_longdesc = "Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmlands is under rain or near water. Without water, this block will dry out eventually. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.", + description = S("Hydrated Farmland"), + _doc_items_longdesc = S("Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmland is under rain or near water. Without water, this block will dry out eventually. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it."), drop = "mcl_core:dirt", drawtype = "nodebox", paramtype = "light", diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index f7521d268..1a65d1d16 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_farming") + minetest.register_craftitem("mcl_farming:wheat_seeds", { -- Original Minecraft name: “Seeds” - description = "Wheat Seeds", - _doc_items_longdesc = "Grows into a wheat plant. Chickens like wheat seeds.", - _doc_items_usagehelp = "Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.", + description = S("Wheat Seeds"), + _doc_items_longdesc = S("Grows into a wheat plant. Chickens like wheat seeds."), + _doc_items_usagehelp = S("Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds."), groups = { craftitem=1 }, inventory_image = "mcl_farming_wheat_seeds.png", on_place = function(itemstack, placer, pointed_thing) @@ -24,14 +26,14 @@ for i=1,7 do local create, name, longdesc if i == 1 then create = true - name = "Premature Wheat Plant" - longdesc = "Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature." + name = S("Premature Wheat Plant") + longdesc = S("Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.") else create = false end minetest.register_node("mcl_farming:wheat_"..i, { - description = string.format("Premature Wheat Plant (Stage %d)", i), + description = S("Premature Wheat Plant (Stage @1)", i), _doc_items_create_entry = create, _doc_items_entry_name = name, _doc_items_longdesc = longdesc, @@ -58,8 +60,8 @@ for i=1,7 do end minetest.register_node("mcl_farming:wheat", { - description = "Mature Wheat Plant", - _doc_items_longdesc = "Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further.", + description = S("Mature Wheat Plant"), + _doc_items_longdesc = S("Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further."), sunlight_propagates = true, paramtype = "light", paramtype2 = "meshoptions", @@ -86,9 +88,9 @@ minetest.register_node("mcl_farming:wheat", { mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 25, 20) minetest.register_craftitem("mcl_farming:wheat_item", { - description = "Wheat", - _doc_items_longdesc = "Wheat is used in crafting. Some animals like wheat.", - _doc_items_usagehelp = "Rightclick an animal to try to feed it wheat.", + description = S("Wheat"), + _doc_items_longdesc = S("Wheat is used in crafting. Some animals like wheat."), + _doc_items_usagehelp = S("Use the “Place” key on an animal to try to feed it wheat."), inventory_image = "farming_wheat_harvested.png", groups = { craftitem = 1 }, }) @@ -108,8 +110,8 @@ minetest.register_craft({ }) minetest.register_craftitem("mcl_farming:cookie", { - description = "Cookie", - _doc_items_longdesc = "This is a food item which can be eaten.", + description = S("Cookie"), + _doc_items_longdesc = S("This is a food item which can be eaten."), inventory_image = "farming_cookie.png", groups = {food=2, eatable=2}, _mcl_saturation = 0.4, @@ -119,8 +121,8 @@ minetest.register_craftitem("mcl_farming:cookie", { minetest.register_craftitem("mcl_farming:bread", { - description = "Bread", - _doc_items_longdesc = "This is a food item which can be eaten.", + description = S("Bread"), + _doc_items_longdesc = S("This is a food item which can be eaten."), inventory_image = "farming_bread.png", groups = {food=2, eatable=5}, _mcl_saturation = 6.0, @@ -129,8 +131,8 @@ minetest.register_craftitem("mcl_farming:bread", { }) minetest.register_node("mcl_farming:hay_block", { - description = "Hay Bale", - _doc_items_longdesc = "Hay bales are decorative blocks made from wheat.", + description = S("Hay Bale"), + _doc_items_longdesc = S("Hay bales are decorative blocks made from wheat."), tiles = {"mcl_farming_hayblock_top.png", "mcl_farming_hayblock_top.png", "mcl_farming_hayblock_side.png"}, is_ground_content = false, stack_max = 64, diff --git a/mods/ITEMS/mcl_fences/init.lua b/mods/ITEMS/mcl_fences/init.lua index 2f4c9952d..bb2ca0fc6 100644 --- a/mods/ITEMS/mcl_fences/init.lua +++ b/mods/ITEMS/mcl_fences/init.lua @@ -1,5 +1,7 @@ local init = os.clock() +local S = minetest.get_translator("mcl_fences") + -- Node box local p = {-2/16, -0.5, -2/16, 2/16, 0.5, 2/16} local x1 = {-0.5, 4/16, -1/16, -2/16, 7/16, 1/16} --oben(quer) -x @@ -13,10 +15,10 @@ local z22 = {-1/16, -2/16, 2/16, 1/16, 1/16, 0.5} --unten(quer) z -- Collision box local cp = {-2/16, -0.5, -2/16, 2/16, 1.01, 2/16} -local cx1 = {-0.5, -2/16, -2/16, -2/16, 1.01, 2/16} --unten(quer) -x -local cx2 = {2/16, -2/16, -2/16, 0.5, 1.01, 2/16} --unten(quer) x -local cz1 = {-2/16, -2/16, -0.5, 2/16, 1.01, -2/16} --unten(quer) -z -local cz2 = {-2/16, -2/16, 2/16, 2/16, 1.01, 0.5} --unten(quer) z +local cx1 = {-0.5, -0.5, -2/16, -2/16, 1.01, 2/16} --unten(quer) -x +local cx2 = {2/16, -0.5, -2/16, 0.5, 1.01, 2/16} --unten(quer) x +local cz1 = {-2/16, -0.5, -0.5, 2/16, 1.01, -2/16} --unten(quer) -z +local cz2 = {-2/16, -0.5, 2/16, 2/16, 1.01, 0.5} --unten(quer) z mcl_fences = {} @@ -36,7 +38,7 @@ mcl_fences.register_fence = function(id, fence_name, texture, groups, hardness, table.insert(connects_to, fence_id) minetest.register_node(fence_id, { description = fence_name, - _doc_items_longdesc = "Fences are structures which block the way. Fences will connect to each other and solid blocks. They cannot be jumped over with a simple jump.", + _doc_items_longdesc = S("Fences are structures which block the way. Fences will connect to each other and solid blocks. They cannot be jumped over with a simple jump."), tiles = {texture}, inventory_image = "mcl_fences_fence_mask.png^" .. texture .. "^mcl_fences_fence_mask.png^[makealpha:255,126,126", wield_image = "mcl_fences_fence_mask.png^" .. texture .. "^mcl_fences_fence_mask.png^[makealpha:255,126,126", @@ -172,8 +174,8 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, cgroups_closed.mesecon_effector_off = nil minetest.register_node(gate_id, { description = fence_gate_name, - _doc_items_longdesc = "Fence gates can be opened or closed and can't be jumped over. Fences will connect nicely to fence gates.", - _doc_items_usagehelp = "Right-click the fence gate to open or close it.", + _doc_items_longdesc = S("Fence gates can be opened or closed and can't be jumped over. Fences will connect nicely to fence gates."), + _doc_items_usagehelp = S("Right-click the fence gate to open or close it."), tiles = {texture}, inventory_image = "mcl_fences_fence_gate_mask.png^" .. texture .. "^mcl_fences_fence_gate_mask.png^[makealpha:255,126,126", wield_image = "mcl_fences_fence_gate_mask.png^" .. texture .. "^mcl_fences_fence_gate_mask.png^[makealpha:255,126,126", @@ -250,12 +252,12 @@ local wood_connect = {"group:fence_wood"} local wood_sounds = mcl_sounds.node_sound_wood_defaults() local woods = { - {"", "Oak Fence", "Oak Fence Gate", "mcl_fences_fence_oak.png", "mcl_fences_fence_gate_oak.png", "mcl_core:wood"}, - {"spruce", "Spruce Fence", "Spruce Fence Gate", "mcl_fences_fence_spruce.png", "mcl_fences_fence_gate_spruce.png", "mcl_core:sprucewood"}, - {"birch", "Birch Fence", "Birch Fence Gate", "mcl_fences_fence_birch.png", "mcl_fences_fence_gate_birch.png", "mcl_core:birchwood"}, - {"jungle", "Jungle Fence", "Jungle Fence Gate", "mcl_fences_fence_jungle.png", "mcl_fences_fence_gate_jungle.png", "mcl_core:junglewood"}, - {"dark_oak", "Dark Oak Fence", "Dark Oak Fence Gate", "mcl_fences_fence_big_oak.png", "mcl_fences_fence_gate_big_oak.png", "mcl_core:darkwood"}, - {"acacia", "Acacia Fence", "Acacia Fence Gate", "mcl_fences_fence_acacia.png", "mcl_fences_fence_gate_acacia.png", "mcl_core:acaciawood"}, + {"", S("Oak Fence"), S("Oak Fence Gate"), "mcl_fences_fence_oak.png", "mcl_fences_fence_gate_oak.png", "mcl_core:wood"}, + {"spruce", S("Spruce Fence"), S("Spruce Fence Gate"), "mcl_fences_fence_spruce.png", "mcl_fences_fence_gate_spruce.png", "mcl_core:sprucewood"}, + {"birch", S("Birch Fence"), S("Birch Fence Gate"), "mcl_fences_fence_birch.png", "mcl_fences_fence_gate_birch.png", "mcl_core:birchwood"}, + {"jungle", S("Jungle Fence"), S("Jungle Fence Gate"), "mcl_fences_fence_jungle.png", "mcl_fences_fence_gate_jungle.png", "mcl_core:junglewood"}, + {"dark_oak", S("Dark Oak Fence"), S("Dark Oak Fence Gate"), "mcl_fences_fence_big_oak.png", "mcl_fences_fence_gate_big_oak.png", "mcl_core:darkwood"}, + {"acacia", S("Acacia Fence"), S("Acacia Fence Gate"), "mcl_fences_fence_acacia.png", "mcl_fences_fence_gate_acacia.png", "mcl_core:acaciawood"}, } for w=1, #woods do @@ -288,7 +290,7 @@ end -- Nether Brick Fence (without fence gate!) -mcl_fences.register_fence("nether_brick_fence", "Nether Brick Fence", "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults()) +mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults()) minetest.register_craft({ output = 'mcl_fences:nether_brick_fence 6', diff --git a/mods/ITEMS/mcl_fences/locale/mcl_fences.de.tr b/mods/ITEMS/mcl_fences/locale/mcl_fences.de.tr new file mode 100644 index 000000000..a55eaebfd --- /dev/null +++ b/mods/ITEMS/mcl_fences/locale/mcl_fences.de.tr @@ -0,0 +1,17 @@ +# textdomain: mcl_fences +Fences are structures which block the way. Fences will connect to each other and solid blocks. They cannot be jumped over with a simple jump.=Zäune sind Gebäude, die den Weg blockieren. Sie verbinden sich gegenseitig und anderen festen Blöcken. Man kann sie nicht mit normalen Sprüngen überspringen. +Fence gates can be opened or closed and can't be jumped over. Fences will connect nicely to fence gates.=Zauntore können geöffnet und geschlossen werden und können nicht übersprungen werden. Zäune werden sich gut mit Zauntoren verbinden. +Right-click the fence gate to open or close it.=Rechtsklicken Sie auf ein Zauntor, um es zu öffnen oder zu schließen. +Oak Fence=Eichenzaun +Oak Fence Gate=Eichenzauntor +Spruce Fence=Fichtenzaun +Spruce Fence Gate=Fichtenzauntor +Birch Fence=Birkenzaun +Birch Fence Gate=Birkenzauntor +Jungle Fence=Dschungelzaun +Jungle Fence Gate=Dschungelzauntor +Dark Oak Fence=Schwarzeichenzaun +Dark Oak Fence Gate=Schwarzeichenzauntor +Acacia Fence=Akazienzaun +Acacia Fence Gate=Akazienzauntor +Nether Brick Fence=Netherziegelzaun diff --git a/mods/ITEMS/mcl_fences/locale/template.txt b/mods/ITEMS/mcl_fences/locale/template.txt new file mode 100644 index 000000000..3a5c14ae3 --- /dev/null +++ b/mods/ITEMS/mcl_fences/locale/template.txt @@ -0,0 +1,17 @@ +# textdomain: mcl_fences +Fences are structures which block the way. Fences will connect to each other and solid blocks. They cannot be jumped over with a simple jump.= +Fence gates can be opened or closed and can't be jumped over. Fences will connect nicely to fence gates.= +Right-click the fence gate to open or close it.= +Oak Fence= +Oak Fence Gate= +Spruce Fence= +Spruce Fence Gate= +Birch Fence= +Birch Fence Gate= +Jungle Fence= +Jungle Fence Gate= +Dark Oak Fence= +Dark Oak Fence Gate= +Acacia Fence= +Acacia Fence Gate= +Nether Brick Fence= diff --git a/mods/ITEMS/mcl_fire/fire_charge.lua b/mods/ITEMS/mcl_fire/fire_charge.lua index d35ffae97..58e86778f 100644 --- a/mods/ITEMS/mcl_fire/fire_charge.lua +++ b/mods/ITEMS/mcl_fire/fire_charge.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_fire") + -- Fire Charge minetest.register_craftitem("mcl_fire:fire_charge", { - description = "Fire Charge", - _doc_items_longdesc = "Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly.", - _doc_items_usagehelp = "Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up.", + description = S("Fire Charge"), + _doc_items_longdesc = S("Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly."), + _doc_items_usagehelp = S("Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up."), inventory_image = "mcl_fire_fire_charge.png", liquids_pointable = false, stack_max = 64, @@ -46,7 +48,7 @@ minetest.register_craftitem("mcl_fire:fire_charge", { local ent = fireball:get_luaentity() ent._shot_from_dispenser = true local v = ent.velocity or 1 - fireball:setvelocity(vector.multiply(dropdir, v)) + fireball:set_velocity(vector.multiply(dropdir, v)) ent.switch = 1 stack:take_item() end, diff --git a/mods/ITEMS/mcl_fire/flint_and_steel.lua b/mods/ITEMS/mcl_fire/flint_and_steel.lua index 7cb114ad1..6ca2132d0 100644 --- a/mods/ITEMS/mcl_fire/flint_and_steel.lua +++ b/mods/ITEMS/mcl_fire/flint_and_steel.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_fire") + -- Flint and Steel minetest.register_tool("mcl_fire:flint_and_steel", { - description = "Flint and Steel", - _doc_items_longdesc = "Flint and steel is a tool to start fires and ignite blocks.", - _doc_items_usagehelp = "Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited.", + description = S("Flint and Steel"), + _doc_items_longdesc = S("Flint and steel is a tool to start fires and ignite blocks."), + _doc_items_usagehelp = S("Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited."), inventory_image = "mcl_fire_flint_and_steel.png", liquids_pointable = false, stack_max = 1, diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index 7743d30dd..ea36d1ce1 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -2,6 +2,8 @@ mcl_fire = {} +local S = minetest.get_translator("mcl_fire") +local N = function(s) return s end -- -- Items @@ -9,11 +11,37 @@ mcl_fire = {} -- Flame nodes -local fire_help = "Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire." -local eternal_fire_help = "Eternal fire is a damaging and destructive block. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside." +-- Fire settings + +-- When enabled, fire destroys other blocks. +local fire_enabled = minetest.settings:get_bool("enable_fire", true) + +-- Enable sound +local flame_sound = minetest.settings:get_bool("flame_sound", true) + +-- Help texts +local fire_help, eternal_fire_help +if fire_enabled then + fire_help = S("Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.") +else + fire_help = S("Fire is a damaging but non-destructive short-lived kind of block. It will disappear when there is no flammable block around. Fire does not destroy blocks, at least not in this world. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.") +end + +if fire_enabled then + eternal_fire_help = S("Eternal fire is a damaging block that might create more fire. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.") +else + eternal_fire_help = S("Eternal fire is a damaging block. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.") +end + +local fire_death_messages = { + N("@1 has been cooked crisp."), + N("@1 felt the burn."), + N("@1 died in the flames."), + N("@1 died in a fire."), +} minetest.register_node("mcl_fire:fire", { - description = "Fire", + description = S("Fire"), _doc_items_longdesc = fire_help, drawtype = "firelike", tiles = { @@ -35,6 +63,7 @@ minetest.register_node("mcl_fire:fire", { buildable_to = true, sunlight_propagates = true, damage_per_second = 1, + _mcl_node_death_message = fire_death_messages, groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston=1, destroys_items=1 }, floodable = true, on_flood = function(pos, oldnode, newnode) @@ -44,10 +73,15 @@ minetest.register_node("mcl_fire:fire", { end, on_timer = function(pos) local airs = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"air"}) - if #airs == 0 then + if (#airs == 0) or ((not fire_enabled) and math.random(1,3) == 1) then minetest.remove_node(pos) return end + if (not fire_enabled) then + -- Restart timer + minetest.get_node_timer(pos):start(math.random(3, 7)) + return + end local burned = false if math.random(1,2) == 1 then while #airs > 0 do @@ -92,7 +126,7 @@ minetest.register_node("mcl_fire:fire", { }) minetest.register_node("mcl_fire:eternal_fire", { - description = "Eternal Fire", + description = S("Eternal Fire"), _doc_items_longdesc = eternal_fire_help, drawtype = "firelike", tiles = { @@ -114,6 +148,7 @@ minetest.register_node("mcl_fire:eternal_fire", { buildable_to = true, sunlight_propagates = true, damage_per_second = 1, + _mcl_node_death_message = fire_death_messages, groups = {fire = 1, dig_immediate = 3, not_in_creative_inventory = 1, dig_by_piston = 1, destroys_items = 1}, floodable = true, on_flood = function(pos, oldnode, newnode) @@ -122,14 +157,16 @@ minetest.register_node("mcl_fire:eternal_fire", { end end, on_timer = function(pos) - local airs = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"air"}) - while #airs > 0 do - local r = math.random(1, #airs) - if minetest.find_node_near(airs[r], 1, {"group:flammable"}) then - minetest.set_node(airs[r], {name="mcl_fire:fire"}) - break - else - table.remove(airs, r) + if fire_enabled then + local airs = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"air"}) + while #airs > 0 do + local r = math.random(1, #airs) + if minetest.find_node_near(airs[r], 1, {"group:flammable"}) then + minetest.set_node(airs[r], {name="mcl_fire:fire"}) + break + else + table.remove(airs, r) + end end end -- Restart timer @@ -148,46 +185,10 @@ minetest.register_node("mcl_fire:eternal_fire", { _mcl_blast_resistance = 0, }) --- Also make lava set fire to air blocks above -minetest.override_item("mcl_core:lava_source", { - on_timer = function(pos) - local function try_ignite(airs) - while #airs > 0 do - local r = math.random(1, #airs) - if minetest.find_node_near(airs[r], 1, {"group:flammable", "group:flammable_lava"}) then - minetest.set_node(airs[r], {name="mcl_fire:fire"}) - return true - else - table.remove(airs, r) - end - end - return false - end - local airs1 = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y+1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, {"air"}) - local ok = try_ignite(airs1) - if not ok then - local airs2 = minetest.find_nodes_in_area({x=pos.x-2, y=pos.y+2, z=pos.z-2}, {x=pos.x+2, y=pos.y+2, z=pos.z+2}, {"air"}) - try_ignite(airs2) - end - - -- Restart timer - minetest.get_node_timer(pos):start(math.random(5, 10)) - end, - on_construct = function(pos) - minetest.get_node_timer(pos):start(math.random(5, 10)) - 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 = {} @@ -216,7 +217,7 @@ if flame_sound then (num["mcl_fire:eternal_fire"] or 0) -- Stop previous sound if handles[player_name] then - minetest.sound_stop(handles[player_name]) + minetest.sound_fade(handles[player_name], -0.4, 0.0) handles[player_name] = nil end -- If flames @@ -318,37 +319,39 @@ minetest.register_abm({ -- Enable the following ABMs according to 'enable fire' setting -local fire_enabled = minetest.settings:get_bool("enable_fire") -if fire_enabled == nil then - -- New setting not specified, check for old setting. - -- If old setting is also not specified, 'not nil' is true. - fire_enabled = not minetest.settings:get_bool("disable_fire") -end - if not fire_enabled then - -- Remove fire only if fire disabled + -- Occasionally remove fire if fire disabled + -- NOTE: Fire is normally extinguished in timer function minetest.register_abm({ label = "Remove disabled fire", nodenames = {"mcl_fire:fire"}, - interval = 7, - chance = 1, + interval = 10, + chance = 10, catch_up = false, action = minetest.remove_node, }) +else -- Fire enabled + -- Set fire to air nodes (inverse pyramid pattern) above lava source minetest.register_abm({ label = "Ignite fire by lava", - nodenames = {"mcl_core:lava_source"}, + nodenames = {"group:lava"}, interval = 7, chance = 2, catch_up = false, action = function(pos) + local node = minetest.get_node(pos) + local def = minetest.registered_nodes[node.name] + -- Check if liquid source node + if def and def.liquidtype ~= "source" then + return + end local function try_ignite(airs) while #airs > 0 do local r = math.random(1, #airs) - if minetest.find_node_near(airs[r], 1, {"group:flammable", "group:flammable_lava"}) then + if minetest.find_node_near(airs[r], 1, {"group:flammable"}) then minetest.set_node(airs[r], {name="mcl_fire:fire"}) return true else @@ -366,8 +369,6 @@ if not fire_enabled then end, }) -else -- Fire enabled - -- Turn flammable nodes around fire into fire minetest.register_abm({ label = "Remove flammable nodes", diff --git a/mods/ITEMS/mcl_fire/locale/mcl_fire.de.tr b/mods/ITEMS/mcl_fire/locale/mcl_fire.de.tr new file mode 100644 index 000000000..22d91a5be --- /dev/null +++ b/mods/ITEMS/mcl_fire/locale/mcl_fire.de.tr @@ -0,0 +1,17 @@ +# textdomain: mcl_fire +Fire Charge=Feuerkugel +Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly.=Feuerkugeln sind hauptsächlich Projektile, die von Werfern geworfen werden können, sie werden in einer geraden Linie fliegen und gehen beim Einschlag in Flammen auf. Alternativ können sie benutzt werden, um direkt ein Feuer zu entfachen. +Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up.=Legen Sie die Feuerkugel in den Werfer und versorgen Sie ihn mit Redstone-Energie, um sie abzufeuern. Um ein Feuer zu entfachen, platzieren Sie die Feuerkugel auf den Boden, was die Kugel verbraucht. +Flint and Steel=Feuerzeug +Flint and steel is a tool to start fires and ignite blocks.=Ein Feuerzeug ist ein Werkzeug, um Feuer zu entfachen und Blöcke anzuzünden. +Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited.=Rechtsklicken Sie auf die Oberfläche eines Blocks, um zu versuchen, ein Feuer auf ihm zu entfachen, oder den Block selbst anzuzünden. Ein paar Blocke reagieren besonders, wenn sie angezündet werden. +Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.=Feuer ist ein schädlicher und destruktiver aber kurzlebiger Block. Es wird sich zu entzündlichen Blöcken ausbreiten und sie zerstören, aber Feuer wird verschwinden, wenn es nichts brennbares mehr gibt. Es wird von Wasser und Regen gelöscht. Feuer kann sicher mit einem Schlag zerstört werden, aber es tut weh, wenn man direkt in ihm steht. Wird ein Feuer über Netherrack oder einem Magmablock entfacht, wird er sich sofort zu einem ewigen Feuer verwandeln. +Fire is a damaging but non-destructive short-lived kind of block. It will disappear when there is no flammable block around. Fire does not destroy blocks, at least not in this world. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.=Feuer ist ein schädlicher aber nicht-destruktiver kurzlebiger Block. Es wird verschwinden, wenn sich keine entzündlichen Blöcke in der Nähe befinden. Feuer breitet sich nicht aus und zerstört keine Blöcke, zumindest nicht in dieser Welt. Es wird von Wasser und Regen gelöscht. Feuer kann sicher mit einem Schlag zerstört werden, aber es tut weh, wenn man direkt in ihm steht. Wird ein Feuer über Netherrack oder einem Magmablock entfacht, wird er sich sofort zu einem ewigen Feuer verwandeln. +Eternal fire is a damaging block that might create more fire. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.=Ewiges Feuer ist ein schädlicher Block, der mehr Feuer machen kann. Er wird um sich Feuer machen, wenn entflammbare Blöcke in der Nähe sind. Ewiges Feuer kann von Schlägen und Wasserblöcken in der Nähe gelöscht werden. Anders als (normales) Feuer geht ein ewiges Feuer nicht von alleine aus, auch nicht unter Regen. Es ist sicher, ein ewiges Feuer zu schlagen, aber es tut weh, wenn man direkt in einem steht. +Eternal fire is a damaging block. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.=Ewiges Feuer ist ein schädlicher Block. Ewiges Feuer kann von Schlägen und Wasserblöcken in der Nähe gelöscht werden. Anders als (normales) Feuer geht ein ewiges Feuer nicht von alleine aus, auch nicht unter Regen. Es ist sicher, ein ewiges Feuer zu schlagen, aber es tut weh, wenn man direkt in einem steht. +@1 has been cooked crisp.=@1 wurde knusprig gebraten. +@1 felt the burn.=@1 ist völlig verbrannt. +@1 died in the flames.=@1 starb in den Flammen. +@1 died in a fire.=@1 starb in einem Feuer. +Fire=Feuer +Eternal Fire=Ewiges Feuer diff --git a/mods/ITEMS/mcl_fire/locale/template.txt b/mods/ITEMS/mcl_fire/locale/template.txt new file mode 100644 index 000000000..065135ef9 --- /dev/null +++ b/mods/ITEMS/mcl_fire/locale/template.txt @@ -0,0 +1,17 @@ +# textdomain: mcl_fire +Fire Charge= +Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly.= +Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up.= +Flint and Steel= +Flint and steel is a tool to start fires and ignite blocks.= +Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited.= +Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.= +Fire is a damaging but non-destructive short-lived kind of block. It will disappear when there is no flammable block around. Fire does not destroy blocks, at least not in this world. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.= +Eternal fire is a damaging block that might create more fire. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.= +Eternal fire is a damaging block. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.= +@1 has been cooked crisp.= +@1 felt the burn.= +@1 died in the flames.= +@1 died in a fire.= +Fire= +Eternal Fire= diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index ab2519b9f..fd4697813 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -1,106 +1,323 @@ -local go_fishing = function(itemstack, user, pointed_thing) - if pointed_thing and pointed_thing.under then - -- Use pointed node's on_rightclick function first, if present - local node = minetest.get_node(pointed_thing.under) - if user and not user:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack - end - end +--Fishing Rod, Bobber, and Flying Bobber mechanics and Bobber artwork by Rootyjr. - if string.find(node.name, "mcl_core:water") then - local itemname - local itemcount = 1 - local itemwear = 0 - -- FIXME: Maybe use a better seeding - local pr = PseudoRandom(os.time() * math.random(1, 100)) - local r = pr:next(1, 100) - if r <= 85 then - -- Fish - items = mcl_loot.get_loot({ - items = { - { itemstring = "mcl_fishing:fish_raw", weight = 60 }, - { itemstring = "mcl_fishing:salmon_raw", weight = 25 }, - { itemstring = "mcl_fishing:clownfish_raw", weight = 2 }, - { itemstring = "mcl_fishing:pufferfish_raw", weight = 13 }, - } - }, pr) - elseif r <= 95 then - -- Junk - items = mcl_loot.get_loot({ - items = { - { itemstring = "mcl_core:bowl", weight = 10 }, - { itemstring = "mcl_fishing:fishing_rod", weight = 2, wear_min = 6554, wear_max = 65535 }, -- 10%-100% damage - { itemstring = "mcl_mobitems:leather", weight = 10 }, - { itemstring = "3d_armor:boots_leather", weight = 10, wear_min = 6554, wear_max = 65535 }, -- 10%-100% damage - { itemstring = "mcl_mobitems:rotten_flesh", weight = 10 }, - { itemstring = "mcl_core:stick", weight = 5 }, - { itemstring = "mcl_mobitems:string", weight = 5 }, - { itemstring = "mcl_potions:potion_water", weight = 10 }, - { itemstring = "mcl_mobitems:bone", weight = 10 }, - { itemstring = "mcl_dye:black", weight = 1, amount_min = 10, amount_max = 10 }, - { itemstring = "mcl_mobitems:string", weight = 10 }, -- TODO: Tripwire Hook - } - }, pr) - else - -- Treasure - items = mcl_loot.get_loot({ - items = { - -- TODO: Enchanted Bow - { itemstring = "mcl_bows:bow", wear_min = 49144, wear_max = 65535 }, -- 75%-100% damage - -- TODO: Enchanted Book - { itemstring = "mcl_books:book" }, - -- TODO: Enchanted Fishing Rod - { itemstring = "mcl_fishing:fishing_rod", wear_min = 49144, wear_max = 65535 }, -- 75%-100% damage - { itemstring = "mcl_mobs:nametag", }, - { itemstring = "mcl_mobitems:saddle", }, - { itemstring = "mcl_flowers:waterlily", }, - } - }, pr) - end - local item - if #items >= 1 then - item = ItemStack(items[1]) - else - item = ItemStack() - end - local inv = user:get_inventory() - if inv:room_for_item("main", item) then - inv:add_item("main", item) - end - if not minetest.settings:get_bool("creative_mode") then - local idef = itemstack:get_definition() - itemstack:add_wear(65535/65) -- 65 uses - if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then - minetest.sound_play(idef.sound.breaks, {pos=pointed_thing.above, gain=0.5}) +local S = minetest.get_translator("mcl_fishing") +local mod_throwing = minetest.get_modpath("mcl_throwing") + +local entity_mapping = { + ["mcl_fishing:bobber"] = "mcl_fishing:bobber_entity", +} + +local bobber_ENTITY={ + physical = false, + timer=0, + textures = {"mcl_fishing_bobber.png"}, + visual_size = {x=0.5, y=0.5}, + collisionbox = {0.45,0.45,0.45,0.45,0.45,0.45}, + pointable = false, + static_save = false, + + _lastpos={}, + _dive = false, + _waittick = nil, + _tick = 0, + player=nil, + _oldy = nil, + objtype="fishing", +} + +local fish = function(itemstack, player) + local pos = player:get_pos() + + local objs = minetest.get_objects_inside_radius(pos, 125) + local num = 0 + local ent = nil + local noent = true + + --Check for bobber if so handle. + for n = 1, #objs do + ent = objs[n]:get_luaentity() + if ent then + if ent.player and ent.objtype=="fishing" then + if (player:get_player_name() == ent.player) then + noent = false + if ent._dive == true then + local itemname + local items + local itemcount = 1 + local itemwear = 0 + -- FIXME: Maybe use a better seeding + local pr = PseudoRandom(os.time() * math.random(1, 100)) + local r = pr:next(1, 100) + if r <= 85 then + -- Fish + items = mcl_loot.get_loot({ + items = { + { itemstring = "mcl_fishing:fish_raw", weight = 60 }, + { itemstring = "mcl_fishing:salmon_raw", weight = 25 }, + { itemstring = "mcl_fishing:clownfish_raw", weight = 2 }, + { itemstring = "mcl_fishing:pufferfish_raw", weight = 13 }, + } + }, pr) + elseif r <= 95 then + -- Junk + items = mcl_loot.get_loot({ + items = { + { itemstring = "mcl_core:bowl", weight = 10 }, + { itemstring = "mcl_fishing:fishing_rod", weight = 2, wear_min = 6554, wear_max = 65535 }, -- 10%-100% damage + { itemstring = "mcl_mobitems:leather", weight = 10 }, + { itemstring = "3d_armor:boots_leather", weight = 10, wear_min = 6554, wear_max = 65535 }, -- 10%-100% damage + { itemstring = "mcl_mobitems:rotten_flesh", weight = 10 }, + { itemstring = "mcl_core:stick", weight = 5 }, + { itemstring = "mcl_mobitems:string", weight = 5 }, + { itemstring = "mcl_potions:potion_water", weight = 10 }, + { itemstring = "mcl_mobitems:bone", weight = 10 }, + { itemstring = "mcl_dye:black", weight = 1, amount_min = 10, amount_max = 10 }, + { itemstring = "mcl_mobitems:string", weight = 10 }, -- TODO: Tripwire Hook + } + }, pr) + else + -- Treasure + items = mcl_loot.get_loot({ + items = { + -- TODO: Enchanted Bow + { itemstring = "mcl_bows:bow", wear_min = 49144, wear_max = 65535 }, -- 75%-100% damage + -- TODO: Enchanted Book + { itemstring = "mcl_books:book" }, + -- TODO: Enchanted Fishing Rod + { itemstring = "mcl_fishing:fishing_rod", wear_min = 49144, wear_max = 65535 }, -- 75%-100% damage + { itemstring = "mcl_mobs:nametag", }, + { itemstring = "mcl_mobitems:saddle", }, + { itemstring = "mcl_flowers:waterlily", }, + } + }, pr) + end + local item + if #items >= 1 then + item = ItemStack(items[1]) + else + item = ItemStack() + end + local inv = player:get_inventory() + if inv:room_for_item("main", item) then + inv:add_item("main", item) + end + if not minetest.settings:get_bool("creative_mode") then + local idef = itemstack:get_definition() + itemstack:add_wear(65535/65) -- 65 uses + if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then + minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5}) + end + end + end + --Check if object is on land. + local epos = ent.object:get_pos() + epos.y = math.floor(epos.y) + local node = minetest.get_node(epos) + local def = minetest.registered_nodes[node.name] + if def.walkable then + if not minetest.settings:get_bool("creative_mode") then + local idef = itemstack:get_definition() + itemstack:add_wear((65535/65)*2) -- if so and not creative then wear double like in MC. + if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then + minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5}) + end + end + end + --Destroy bobber. + ent.object:remove() + return itemstack + end end end - return itemstack + end + --Check for flying bobber. + for n = 1, #objs do + ent = objs[n]:get_luaentity() + if ent then + if ent._thrower and ent.objtype=="fishing" then + if player:get_player_name() == ent._thrower then + noent = false + break + end + end + end + end + --If no bobber or flying_bobber exists then throw bobber. + if noent == true then + local playerpos = player:get_pos() + local dir = player:get_look_dir() + local obj = mcl_throwing.throw("mcl_throwing:flying_bobber", {x=playerpos.x, y=playerpos.y+1.5, z=playerpos.z}, dir, 15, player:get_player_name()) + end +end + +-- Movement function of bobber +local bobber_on_step = function(self, dtime) + self.timer=self.timer+dtime + local epos = self.object:get_pos() + epos.y = math.floor(epos.y) + local node = minetest.get_node(epos) + local def = minetest.registered_nodes[node.name] + + --If we have no player, remove self. + if self.player == nil or self.player == "" then + self.object:remove() + return + end + local player = minetest.get_player_by_name(self.player) + if not player then + self.object:remove() + return + end + + --Check if player is nearby + if self._tick % 5 == 0 and self.player ~= nil and player ~= nil then + --Destroy bobber if item not wielded. + local wield = player:get_wielded_item() + if ((not wield) or (wield:get_name() ~= "mcl_fishing:fishing_rod")) then + self.object:remove() + return + end + + --Destroy bobber if player is too far away. + local objpos = self.object:get_pos() + local playerpos = player:get_pos() + if (((playerpos.y - objpos.y) >= 33) or ((playerpos.y - objpos.y) <= -33)) then + self.object:remove() + return + elseif (((playerpos.x - objpos.x) >= 33) or ((playerpos.x - objpos.x) <= -33)) then + self.object:remove() + return + elseif (((playerpos.z - objpos.z) >= 33) or ((playerpos.z - objpos.z) <= -33)) then + self.object:remove() + return + elseif ((((playerpos.z + playerpos.x) - (objpos.z + objpos.x)) >= 33) or ((playerpos.z + playerpos.x) - (objpos.z + objpos.x)) <= -33) then + self.object:remove() + return + elseif ((((playerpos.y + playerpos.x) - (objpos.y + objpos.x)) >= 33) or ((playerpos.y + playerpos.x) - (objpos.y + objpos.x)) <= -33) then + self.object:remove() + return + elseif ((((playerpos.z + playerpos.y) - (objpos.z + objpos.y)) >= 33) or ((playerpos.z + playerpos.y) - (objpos.z + objpos.y)) <= -33) then + self.object:remove() + return + end + + end + -- If in water, then bob. + if def.liquidtype == "source" and minetest.get_item_group(def.name, "water") ~= 0 then + if self._oldy == nil then + self.object:set_pos({x=self.object:get_pos().x,y=math.floor(self.object:get_pos().y)+.5,z=self.object:get_pos().z}) + self._oldy = self.object:get_pos().y + end + -- reset to original position after dive. + if self.object:get_pos().y > self._oldy then + self.object:set_pos({x=self.object:get_pos().x,y=self._oldy,z=self.object:get_pos().z}) + self.object:set_velocity({x=0,y=0,z=0}) + self.object:set_acceleration({x=0,y=0,z=0}) + end + if self._dive then + for i=1,2 do + -- Spray bubbles when there's a fish. + minetest.add_particle({ + pos = {x=epos["x"]+math.random(-1,1)*math.random()/2,y=epos["y"]+0.1,z=epos["z"]+math.random(-1,1)*math.random()/2}, + velocity = {x=0, y=4, z=0}, + acceleration = {x=0, y=-5, z=0}, + expirationtime = math.random(), + size = math.random()+0.5, + collisiondetection = true, + vertical = false, + texture = "mcl_particles_bubble.png", + }) + end + if self._tick ~= self._waittick then + self._tick = self._tick + 1 + else + self._waittick = nil + self._tick = 0 + self._dive = false + end + else if self._waittick == nil then + -- wait for random number of ticks. + self._waittick = math.random(50,800) + else + if self._tick ~= self._waittick then + self._tick = self._tick + 1 + else + --wait time is over time to dive. + self._dive = true + self.object:set_velocity({x=0,y=-2,z=0}) + self.object:set_acceleration({x=0,y=5,z=0}) + self._waittick = 30 + self._tick = 0 + end end end - return nil +end + + -- TODO: Destroy when hitting a solid node + --if self._lastpos.x~=nil then + -- if (def and def.walkable) or not def then + --self.object:remove() + -- return + -- end + --end + --self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node end +bobber_ENTITY.on_step = bobber_on_step + +minetest.register_entity("mcl_fishing:bobber_entity", bobber_ENTITY) + +-- If player leaves area, remove bobber. +minetest.register_on_leaveplayer(function(player) + local objs = minetest.get_objects_inside_radius(player:get_pos(), 250) + local num = 0 + local ent = nil + local noent = true + + for n = 1, #objs do + ent = objs[n]:get_luaentity() + if ent then + if ent.player and ent.objtype=="fishing" then + ent.object:remove() + elseif ent._thrower and ent.objtype=="fishing" then + ent.object:remove() + end + end + end +end) + +-- If player dies, remove bobber. +minetest.register_on_dieplayer(function(player) + local objs = minetest.get_objects_inside_radius(player:get_pos(), 250) + local num = 0 + local ent = nil + local noent = true + + for n = 1, #objs do + ent = objs[n]:get_luaentity() + if ent then + if ent.player and ent.objtype=="fishing" then + ent.object:remove() + elseif ent._thrower and ent.objtype=="fishing" then + ent.object:remove() + end + end + end +end) + -- Fishing Rod minetest.register_tool("mcl_fishing:fishing_rod", { - description = "Fishing Rod", - _doc_items_longdesc = "Fishing rods can be used to catch fish.", - _doc_items_usagehelp = "Rightclick a water source to try to go fishing. Who knows what you're going to catch?", - -- This item is incomplete, hide it from creative inventory - groups = { tool=1, not_in_creative_inventory=1 }, + description = S("Fishing Rod"), + _doc_items_longdesc = S("Fishing rods can be used to catch fish."), + _doc_items_usagehelp = S("Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?"), + groups = { tool=1 }, inventory_image = "mcl_fishing_fishing_rod.png", stack_max = 1, - liquids_pointable = true, - on_place = go_fishing, + on_place = fish, + on_secondary_use = fish, sound = { breaks = "default_tool_breaks" }, }) ---[[ - -Temporarily removed from crafting as the fishing rod is massively overpowered atm. - -TODO: Re-enable crafting when fishing rod has been improved. - minetest.register_craft({ output = "mcl_fishing:fishing_rod", recipe = { @@ -117,8 +334,6 @@ minetest.register_craft({ {'mcl_mobitems:string','','mcl_core:stick'}, } }) -]] - minetest.register_craft({ type = "fuel", recipe = "mcl_fishing:fishing_rod", @@ -128,8 +343,8 @@ minetest.register_craft({ -- Fish minetest.register_craftitem("mcl_fishing:fish_raw", { - description = "Raw Fish", - _doc_items_longdesc = "Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.", + description = S("Raw Fish"), + _doc_items_longdesc = S("Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value."), inventory_image = "mcl_fishing_fish_raw.png", on_place = minetest.item_eat(2), on_secondary_use = minetest.item_eat(2), @@ -139,8 +354,8 @@ minetest.register_craftitem("mcl_fishing:fish_raw", { }) minetest.register_craftitem("mcl_fishing:fish_cooked", { - description = "Cooked Fish", - _doc_items_longdesc = "Mmh, fish! This is a healthy food item.", + description = S("Cooked Fish"), + _doc_items_longdesc = S("Mmh, fish! This is a healthy food item."), inventory_image = "mcl_fishing_fish_cooked.png", on_place = minetest.item_eat(5), on_secondary_use = minetest.item_eat(5), @@ -158,8 +373,8 @@ minetest.register_craft({ -- Salmon minetest.register_craftitem("mcl_fishing:salmon_raw", { - description = "Raw Salmon", - _doc_items_longdesc = "Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.", + description = S("Raw Salmon"), + _doc_items_longdesc = S("Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value."), inventory_image = "mcl_fishing_salmon_raw.png", on_place = minetest.item_eat(2), on_secondary_use = minetest.item_eat(2), @@ -169,8 +384,8 @@ minetest.register_craftitem("mcl_fishing:salmon_raw", { }) minetest.register_craftitem("mcl_fishing:salmon_cooked", { - description = "Cooked Salmon", - _doc_items_longdesc = "This is a healthy food item which can be eaten.", + description = S("Cooked Salmon"), + _doc_items_longdesc = S("This is a healthy food item which can be eaten."), inventory_image = "mcl_fishing_salmon_cooked.png", on_place = minetest.item_eat(6), on_secondary_use = minetest.item_eat(6), @@ -188,8 +403,8 @@ minetest.register_craft({ -- Clownfish minetest.register_craftitem("mcl_fishing:clownfish_raw", { - description = "Clownfish", - _doc_items_longdesc = "Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.", + description = S("Clownfish"), + _doc_items_longdesc = S("Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely."), inventory_image = "mcl_fishing_clownfish_raw.png", on_place = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1), @@ -201,8 +416,8 @@ minetest.register_craftitem("mcl_fishing:clownfish_raw", { -- Pufferfish -- TODO: Add real status effect minetest.register_craftitem("mcl_fishing:pufferfish_raw", { - description = "Pufferfish", - _doc_items_longdesc = "Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).", + description = S("Pufferfish"), + _doc_items_longdesc = S("Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger)."), inventory_image = "mcl_fishing_pufferfish_raw.png", on_place = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1), diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.de.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.de.tr new file mode 100644 index 000000000..75120cd3c --- /dev/null +++ b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.de.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_fishing +Fishing Rod=Angel +Fishing rods can be used to catch fish.=Mit Angeln fängt man Fische. +Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=Rechtsklicken, um den Schwimmer auszuwerfen. Wenn er sinkt, erneut rechtsklicken, um etwas zu fangen. Wer weiß, was Sie fangen werden? +Raw Fish=Roher Fisch +Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Rohen Fisch kann man mit Angeln fangen. Er ist ein Lebensmittel, den man sicher verzehren kann. Er kann gekocht werden, um seinen Nährwert zu erhöhen. +Cooked Fish=Gekochter Fisch +Mmh, fish! This is a healthy food item.=Mhh, Fisch! Ein gesundes Lebensmittel. +Raw Salmon=Roher Lachs +Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Lohen Lachs erhält man beim Angeln. Er ist ein Lebensmittel, der sicher verzehrt werden kann. +Cooked Salmon=Gekochter Lachs +This is a healthy food item which can be eaten.=Ein gesundes essbares Lebensmittel. +Clownfish=Clownfisch +Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=Einen Clownfisch kann man beim Angeln mit etwas Glück fangen. Er ist ein Lebensmittel, der sicher verzehrt werden kann. +Pufferfish=Kugelfisch +Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=Kugelfische sind eine verbreitete Fischart, die geangelt werden können. Sie können theoretisch gegessen werden, aber sie sind sehr schlecht für Menschen. Es gibt nur 1 Hungerpunkt und es wird Sie schwer vergiften (was Ihre Gesundheit verringert, aber nicht bis zum Tod) und Ihr Hungerpegel wird aufgrund der schweren Lebensmittelvergiftung stark ansteigen. diff --git a/mods/ITEMS/mcl_fishing/locale/template.txt b/mods/ITEMS/mcl_fishing/locale/template.txt new file mode 100644 index 000000000..d2bac9807 --- /dev/null +++ b/mods/ITEMS/mcl_fishing/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: mcl_fishing +Fishing Rod= +Fishing rods can be used to catch fish.= +Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?= +Raw Fish= +Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.= +Cooked Fish= +Mmh, fish! This is a healthy food item.= +Raw Salmon= +Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.= +Cooked Salmon= +This is a healthy food item which can be eaten.= +Clownfish= +Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.= +Pufferfish= +Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).= diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_bobber.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_bobber.png new file mode 100644 index 000000000..0c93fd4f9 Binary files /dev/null and b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_bobber.png differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fishing_rod.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fishing_rod.png index f8b4f8714..2fbcc7344 100644 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fishing_rod.png and b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fishing_rod.png differ diff --git a/mods/ITEMS/mcl_flowerpots/init.lua b/mods/ITEMS/mcl_flowerpots/init.lua index e4df4459c..3131abd16 100644 --- a/mods/ITEMS/mcl_flowerpots/init.lua +++ b/mods/ITEMS/mcl_flowerpots/init.lua @@ -1,35 +1,36 @@ +local S = minetest.get_translator("mcl_flowerpots") local flowers = { - {"dandelion", "mcl_flowers:dandelion", "Dandelion Flower Pot"}, - {"poppy", "mcl_flowers:poppy", "Poppy Floer Pot"}, - {"blue_orchid", "mcl_flowers:blue_orchid", "Blue Orchid Flower Pot"}, - {"allium", "mcl_flowers:allium", "Allium Flower Pot"}, - {"azure_bluet", "mcl_flowers:azure_bluet", "Azure Bluet Flower Pot"}, - {"tulip_red", "mcl_flowers:tulip_red", "Red Tulip Flower Pot"}, - {"tulip_pink", "mcl_flowers:tulip_pink", "Pink Tulip Flower Pot"}, - {"tulip_white", "mcl_flowers:tulip_white", "White Tulip Flower Pot"}, - {"tulip_orange", "mcl_flowers:tulip_orange", "Orange Tulip Flower Pot"}, - {"oxeye_daisy", "mcl_flowers:oxeye_daisy", "Oxeye Daisy Flower Pot"}, - {"mushroom_brown", "mcl_mushrooms:mushroom_brown", "Brown Mushroom Flower Pot"}, - {"mushroom_red", "mcl_mushrooms:mushroom_red", "Red Mushroom Flower Pot"}, - {"sapling", "mcl_core:sapling", "Oak Sapling Flower Pot"}, - {"acaciasapling", "mcl_core:acaciasapling", "Acacia Sapling Flower Pot"}, - {"junglesapling", "mcl_core:junglesapling", "Jungle Sapling Flower Pot"}, - {"darksapling", "mcl_core:darksapling", "Dark Oak Sapling Flower Pot"}, - {"sprucesapling", "mcl_core:sprucesapling", "Spruce Sapling Flower Pot"}, - {"birchsapling", "mcl_core:birchsapling", "Birch Sapling Flower Pot"}, - {"deadbush", "mcl_core:deadbush", "Dead Bush Flower Pot"}, - {"fern", "mcl_flowers:fern", "Fern Flower Pot", {"mcl_flowers_fern_inv.png"}}, + {"dandelion", "mcl_flowers:dandelion", S("Dandelion Flower Pot")}, + {"poppy", "mcl_flowers:poppy", S("Poppy Flower Pot")}, + {"blue_orchid", "mcl_flowers:blue_orchid", S("Blue Orchid Flower Pot")}, + {"allium", "mcl_flowers:allium", S("Allium Flower Pot")}, + {"azure_bluet", "mcl_flowers:azure_bluet", S("Azure Bluet Flower Pot")}, + {"tulip_red", "mcl_flowers:tulip_red", S("Red Tulip Flower Pot")}, + {"tulip_pink", "mcl_flowers:tulip_pink", S("Pink Tulip Flower Pot")}, + {"tulip_white", "mcl_flowers:tulip_white", S("White Tulip Flower Pot")}, + {"tulip_orange", "mcl_flowers:tulip_orange", S("Orange Tulip Flower Pot")}, + {"oxeye_daisy", "mcl_flowers:oxeye_daisy", S("Oxeye Daisy Flower Pot")}, + {"mushroom_brown", "mcl_mushrooms:mushroom_brown", S("Brown Mushroom Flower Pot")}, + {"mushroom_red", "mcl_mushrooms:mushroom_red", S("Red Mushroom Flower Pot")}, + {"sapling", "mcl_core:sapling", S("Oak Sapling Flower Pot")}, + {"acaciasapling", "mcl_core:acaciasapling", S("Acacia Sapling Flower Pot")}, + {"junglesapling", "mcl_core:junglesapling", S("Jungle Sapling Flower Pot")}, + {"darksapling", "mcl_core:darksapling", S("Dark Oak Sapling Flower Pot")}, + {"sprucesapling", "mcl_core:sprucesapling", S("Spruce Sapling Flower Pot")}, + {"birchsapling", "mcl_core:birchsapling", S("Birch Sapling Flower Pot")}, + {"deadbush", "mcl_core:deadbush", S("Dead Bush Flower Pot")}, + {"fern", "mcl_flowers:fern", S("Fern Flower Pot"), {"mcl_flowers_fern_inv.png"}}, } local cubes = { - {"cactus", "mcl_core:cactus", "Cactus Flower Pot"}, + {"cactus", "mcl_core:cactus", S("Cactus Flower Pot")}, } minetest.register_node("mcl_flowerpots:flower_pot", { - description = "Flower Pot", - _doc_items_longdesc = "Flower pots are decorational blocks in which flowers and other small plants can be placed.", - _doc_items_usagehelp = "Rightclick an empty flower pot while you wield a plant to place the plant. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant.", + description = S("Flower Pot"), + _doc_items_longdesc = S("Flower pots are decorative blocks in which flowers and other small plants can be placed."), + _doc_items_usagehelp = S("Just place a plant on the flower pot. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant."), drawtype = "mesh", mesh = "flowerpot.obj", tiles = { diff --git a/mods/ITEMS/mcl_flowerpots/locale/mcl_flowerpots.de.tr b/mods/ITEMS/mcl_flowerpots/locale/mcl_flowerpots.de.tr new file mode 100644 index 000000000..321725abd --- /dev/null +++ b/mods/ITEMS/mcl_flowerpots/locale/mcl_flowerpots.de.tr @@ -0,0 +1,25 @@ +# textdomain: mcl_flowerpots +Dandelion Flower Pot=Blumentopf mit Löwenzahn +Poppy Floer Pot=Blumentopf mit Mohn +Blue Orchid Flower Pot=Blumentopf mit blauer Orchidee +Allium Flower Pot=Blumentopf mit Sternlauch +Azure Bluet Flower Pot=Blumentopf mit Porzellansternchen +Red Tulip Flower Pot=Blumentopf mit roter Tulpe +Pink Tulip Flower Pot=Blumentopf mit rosa Tulpe +White Tulip Flower Pot=Blumentopf mit weißer Tulpe +Orange Tulip Flower Pot=Blumentopf mit orange Tulpe +Oxeye Daisy Flower Pot=Bluemtopf mit Margerite +Brown Mushroom Flower Pot=Blumentopf mit braunem Pilz +Red Mushroom Flower Pot=Blumentopf mit rotem Pilz +Oak Sapling Flower Pot=Blumentopf mit Eichensetzling +Acacia Sapling Flower Pot=Blumentopf mit Akaziensetzling +Jungle Sapling Flower Pot=Blumentopf mit Dschungelsetzling +Dark Oak Sapling Flower Pot=Blumentopf mit Schwarzeichensetzling +Spruce Sapling Flower Pot=Blumentopf mit Fichtensetzling +Birch Sapling Flower Pot=Blumentopf mit Birkensetzling +Dead Bush Flower Pot=Blumentopf mit totem Busch +Fern Flower Pot=Blumentopf mit Farn +Cactus Flower Pot=Blumentopf mit Kaktus +Flower Pot=Blumentopf +Flower pots are decorative blocks in which flowers and other small plants can be placed.=Blumentöpfe sind dekorative Blöcke, in die Blumen und andere kleine Pflanzen platziert werden können. +Just place a plant on the flower pot. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant.=Platzieren Sie einfach eine Pflanze auf den Blumentopf. Blumentöpfe können kleine Blumen (nicht höher als 1 Block), Setzlinge, Farne, tote Büsche, Pilze und Kakteen halten. Rechtsklicken Sie auf eine Topfpflanze, um sie zurück zu erhalten. diff --git a/mods/ITEMS/mcl_flowerpots/locale/template.txt b/mods/ITEMS/mcl_flowerpots/locale/template.txt new file mode 100644 index 000000000..c68a07e7d --- /dev/null +++ b/mods/ITEMS/mcl_flowerpots/locale/template.txt @@ -0,0 +1,25 @@ +# textdomain: mcl_flowerpots +Dandelion Flower Pot= +Poppy Flower Pot= +Blue Orchid Flower Pot= +Allium Flower Pot= +Azure Bluet Flower Pot= +Red Tulip Flower Pot= +Pink Tulip Flower Pot= +White Tulip Flower Pot= +Orange Tulip Flower Pot= +Oxeye Daisy Flower Pot= +Brown Mushroom Flower Pot= +Red Mushroom Flower Pot= +Oak Sapling Flower Pot= +Acacia Sapling Flower Pot= +Jungle Sapling Flower Pot= +Dark Oak Sapling Flower Pot= +Spruce Sapling Flower Pot= +Birch Sapling Flower Pot= +Dead Bush Flower Pot= +Fern Flower Pot= +Cactus Flower Pot= +Flower Pot= +Flower pots are decorative blocks in which flowers and other small plants can be placed.= +Just place a plant on the flower pot. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant.= diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index ac575e123..c2708500f 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -1,10 +1,12 @@ +local S = minetest.get_translator("mcl_flowers") + -- Minetest 0.4 mod: default -- See README.txt for licensing and other information. local init = os.clock() -- Simple flower template -local smallflowerlongdesc = "This is a small flower. Small flowers are mainly used for dye production and can also be potted." -local plant_usage_help = "It can only be placed on a block on which it would also survive." +local smallflowerlongdesc = S("This is a small flower. Small flowers are mainly used for dye production and can also be potted.") +local plant_usage_help = S("It can only be placed on a block on which it would also survive.") -- on_place function for flowers local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos, node, itemstack) @@ -62,16 +64,16 @@ local function add_simple_flower(name, desc, image, simple_selection_box) }) end -add_simple_flower("poppy", "Poppy", "mcl_flowers_poppy", { -5/16, -0.5, -5/16, 5/16, 5/16, 5/16 }) -add_simple_flower("dandelion", "Dandelion", "flowers_dandelion_yellow", { -4/16, -0.5, -4/16, 4/16, 3/16, 4/16 }) -add_simple_flower("oxeye_daisy", "Oxeye Daisy", "mcl_flowers_oxeye_daisy", { -4/16, -0.5, -4/16, 4/16, 4/16, 4/16 }) -add_simple_flower("tulip_orange", "Orange Tulip", "flowers_tulip", { -3/16, -0.5, -3/16, 3/16, 5/16, 3/16 }) -add_simple_flower("tulip_pink", "Pink Tulip", "mcl_flowers_tulip_pink", { -3/16, -0.5, -3/16, 3/16, 5/16, 3/16 }) -add_simple_flower("tulip_red", "Red Tulip", "mcl_flowers_tulip_red", { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 }) -add_simple_flower("tulip_white", "White Tulip", "mcl_flowers_tulip_white", { -3/16, -0.5, -3/16, 3/16, 4/16, 3/16 }) -add_simple_flower("allium", "Allium", "mcl_flowers_allium", { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 }) -add_simple_flower("azure_bluet", "Azure Bluet", "mcl_flowers_azure_bluet", { -5/16, -0.5, -5/16, 5/16, 3/16, 5/16 }) -add_simple_flower("blue_orchid", "Blue Orchid", "mcl_flowers_blue_orchid", { -5/16, -0.5, -5/16, 5/16, 7/16, 5/16 }) +add_simple_flower("poppy", S("Poppy"), "mcl_flowers_poppy", { -5/16, -0.5, -5/16, 5/16, 5/16, 5/16 }) +add_simple_flower("dandelion", S("Dandelion"), "flowers_dandelion_yellow", { -4/16, -0.5, -4/16, 4/16, 3/16, 4/16 }) +add_simple_flower("oxeye_daisy", S("Oxeye Daisy"), "mcl_flowers_oxeye_daisy", { -4/16, -0.5, -4/16, 4/16, 4/16, 4/16 }) +add_simple_flower("tulip_orange", S("Orange Tulip"), "flowers_tulip", { -3/16, -0.5, -3/16, 3/16, 5/16, 3/16 }) +add_simple_flower("tulip_pink", S("Pink Tulip"), "mcl_flowers_tulip_pink", { -3/16, -0.5, -3/16, 3/16, 5/16, 3/16 }) +add_simple_flower("tulip_red", S("Red Tulip"), "mcl_flowers_tulip_red", { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 }) +add_simple_flower("tulip_white", S("White Tulip"), "mcl_flowers_tulip_white", { -3/16, -0.5, -3/16, 3/16, 4/16, 3/16 }) +add_simple_flower("allium", S("Allium"), "mcl_flowers_allium", { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 }) +add_simple_flower("azure_bluet", S("Azure Bluet"), "mcl_flowers_azure_bluet", { -5/16, -0.5, -5/16, 5/16, 3/16, 5/16 }) +add_simple_flower("blue_orchid", S("Blue Orchid"), "mcl_flowers_blue_orchid", { -5/16, -0.5, -5/16, 5/16, 7/16, 5/16 }) local wheat_seed_drop = { @@ -88,9 +90,9 @@ local wheat_seed_drop = { --- Tall Grass --- local def_tallgrass = { - description = "Tall Grass", + description = S("Tall Grass"), drawtype = "plantlike", - _doc_items_longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.", + _doc_items_longdesc = S("Tall grass is a small plant which often occurs on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high."), _doc_items_usagehelp = plant_usage_help, _doc_items_hidden = false, waving = 1, @@ -122,8 +124,8 @@ minetest.register_node("mcl_flowers:tallgrass", def_tallgrass) --- Fern --- -- The fern is very similar to tall grass, so we can copy a lot from it. local def_fern = table.copy(def_tallgrass) -def_fern.description = "Fern" -def_fern._doc_items_longdesc = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high." +def_fern.description = S("Fern") +def_fern._doc_items_longdesc = S("Ferns are small plants which occur naturally in jungles and taigas. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high.") def_fern.tiles = { "mcl_flowers_fern.png" } def_fern.inventory_image = "mcl_flowers_fern_inv.png" def_fern.wield_image = "mcl_flowers_fern_inv.png" @@ -275,7 +277,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im -- Top minetest.register_node("mcl_flowers:"..name.."_top", { - description = desc.." (Top Part)", + description = desc.." " .. S("(Top Part)"), _doc_items_create_entry = false, drawtype = "plantlike", tiles = { top_img }, @@ -310,18 +312,18 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im end -add_large_plant("peony", "Peony", "A peony is a large plant which occupies two blocks. It is mainly used in dye protection.", "mcl_flowers_double_plant_paeonia_bottom.png", "mcl_flowers_double_plant_paeonia_top.png", nil, 5/16, 6/16) -add_large_plant("rose_bush", "Rose Bush", "A rose bush is a large plant which occupies two blocks. It is safe to touch it. Rose bushes are mainly used in dye protection.", "mcl_flowers_double_plant_rose_bottom.png", "mcl_flowers_double_plant_rose_top.png", nil, 5/16, 1/16) -add_large_plant("lilac", "Lilac", "A lilac is a large plant which occupies two blocks. It is mainly used in dye production.", "mcl_flowers_double_plant_syringa_bottom.png", "mcl_flowers_double_plant_syringa_top.png", nil, 5/16, 6/16) +add_large_plant("peony", S("Peony"), S("A peony is a large plant which occupies two blocks. It is mainly used in dye protection."), "mcl_flowers_double_plant_paeonia_bottom.png", "mcl_flowers_double_plant_paeonia_top.png", nil, 5/16, 6/16) +add_large_plant("rose_bush", S("Rose Bush"), S("A rose bush is a large plant which occupies two blocks. It is safe to touch it. Rose bushes are mainly used in dye protection."), "mcl_flowers_double_plant_rose_bottom.png", "mcl_flowers_double_plant_rose_top.png", nil, 5/16, 1/16) +add_large_plant("lilac", S("Lilac"), S("A lilac is a large plant which occupies two blocks. It is mainly used in dye production."), "mcl_flowers_double_plant_syringa_bottom.png", "mcl_flowers_double_plant_syringa_top.png", nil, 5/16, 6/16) -- TODO: Make the sunflower face East. Requires a mesh for the top node. -add_large_plant("sunflower", "Sunflower", "A sunflower is a large plant which occupies two blocks. It is mainly used in dye production.", "mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_top.png^mcl_flowers_double_plant_sunflower_front.png", "mcl_flowers_double_plant_sunflower_front.png", 6/16, 6/16) +add_large_plant("sunflower", S("Sunflower"), S("A sunflower is a large plant which occupies two blocks. It is mainly used in dye production."), "mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_top.png^mcl_flowers_double_plant_sunflower_front.png", "mcl_flowers_double_plant_sunflower_front.png", 6/16, 6/16) -local longdesc_grass = "Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds." -local longdesc_fern = "Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds." +local longdesc_grass = S("Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.") +local longdesc_fern = S("Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.") -add_large_plant("double_grass", "Double Tallgrass", longdesc_grass, "mcl_flowers_double_plant_grass_bottom.png", "mcl_flowers_double_plant_grass_top.png", "mcl_flowers_double_plant_grass_inv.png", 6/16, 4/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false, true) -add_large_plant("double_fern", "Large Fern", longdesc_fern, "mcl_flowers_double_plant_fern_bottom.png", "mcl_flowers_double_plant_fern_top.png", "mcl_flowers_double_plant_fern_inv.png", 5/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false, true) +add_large_plant("double_grass", S("Double Tallgrass"), longdesc_grass, "mcl_flowers_double_plant_grass_bottom.png", "mcl_flowers_double_plant_grass_top.png", "mcl_flowers_double_plant_grass_inv.png", 6/16, 4/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false, true) +add_large_plant("double_fern", S("Large Fern"), longdesc_fern, "mcl_flowers_double_plant_fern_bottom.png", "mcl_flowers_double_plant_fern_top.png", "mcl_flowers_double_plant_fern_inv.png", 5/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false, true) minetest.register_abm({ label = "Pop out flowers", @@ -348,8 +350,8 @@ minetest.register_abm({ -- Lily Pad minetest.register_node("mcl_flowers:waterlily", { - description = "Lily Pad", - _doc_items_longdesc = "A lily pad is a flat plant block which can be walked on. They can be placed on water sources, ice and frosted ice.", + description = S("Lily Pad"), + _doc_items_longdesc = S("A lily pad is a flat plant block which can be walked on. They can be placed on water sources, ice and frosted ice."), drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", diff --git a/mods/ITEMS/mcl_flowers/locale/mcl_flowers.de.tr b/mods/ITEMS/mcl_flowers/locale/mcl_flowers.de.tr new file mode 100644 index 000000000..cf12fd51a --- /dev/null +++ b/mods/ITEMS/mcl_flowers/locale/mcl_flowers.de.tr @@ -0,0 +1,32 @@ +# textdomain: mcl_flowers +This is a small flower. Small flowers are mainly used for dye production and can also be potted.=Dies ist eine kleine Blume. Kleine Blumen werden hauptsächlich in der Farbenproduktion benutzt, können aber auch in Blumentöpfen platziert werden. +It can only be placed on a block on which it would also survive.=Diese Pflanze kann nur auf einem Block platziert werden, auf dem sie auch überleben würde. +Poppy=Mohn +Dandelion=Löwenzahn +Oxeye Daisy=Margerite +Orange Tulip=Orange Tulpe +Pink Tulip=Rosa Tulpe +Red Tulip=Rote Tulpe +White Tulip=Weiße Tulpe +Allium=Sternlauch +Azure Bluet=Porzellansternchen +Blue Orchid=Blaue Orchidee +Tall Grass=Hohes Gras +Tall grass is a small plant which often occurs on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.=Hohes Gras ist eine kleine Pflanze, die oft auf Wiesenflächen wächst. Es kann für Weizensamen abgeerntet werden. Mit Knochenmehl wird sich hohes Gras zu doppelhohem Gras verwandeln. +Fern=Farn +Ferns are small plants which occur naturally in jungles and taigas. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high.=Farne sind kleine Pflanzen, die oft in Dschungeln und Taigas vorkommen. Sie können für Weizensamen abgeerntet werden. Mit Knochenmehl wird sich ein Farn zu einem großen Farn, der zwei Blöcke hoch ist, verwandeln. +(Top Part)=(Oberseite) +Peony=Pfingstrose +A peony is a large plant which occupies two blocks. It is mainly used in dye protection.=Eine Pfingstrose ist eine große Pflanze, die zwei Blöcke hoch ist. Sie wird hauptsächlich für die Farbenproduktion gebraucht. +Rose Bush=Rosenbusch +A rose bush is a large plant which occupies two blocks. It is safe to touch it. Rose bushes are mainly used in dye protection.=Ein Rosenbusch ist eine große Pflanze, die zwei Blöcke hoch ist. Es ist sicher, durch ihn hindurch zu gehen. Er wird hauptsächlich für die Farbenproduktion gebraucht. +Lilac=Flieder +A lilac is a large plant which occupies two blocks. It is mainly used in dye production.=Ein Flieder ist eine große Pflanze, die zwei Blöcke hoch ist. Er wird hauptsächlich für die Farbenproduktion gebraucht. +Sunflower=Sonnenblume +A sunflower is a large plant which occupies two blocks. It is mainly used in dye production.=Eine Sonnenblume ist eine große Pflanze, die zwei Blöcke hoch ist. Sie wird hauptsächlich für die Farbenproduktion gebraucht. +Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.=Doppelhohes Gras ist eine Variante von hohem Gras und nimmt zwei Blöcke an Platz ein. Er kann für Weizensamen abgeerntet werden. +Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.=Ein großer Farn ist eine Variante von Farn und nimmt zwei Blöcke an Platz ein. Er kann für Weizensamen abgeerntet werden. +Double Tallgrass=Doppelhohes Gras +Large Fern=Großer Farn +Lily Pad=Seerosenblatt +A lily pad is a flat plant block which can be walked on. They can be placed on water sources, ice and frosted ice.=Ein Seerosenblatt ist eine flache Pflanze, die eine stabile begehbare Oberfläche ist. Sie kann auf Wasserquellen, auf Eis und brüchigem Eis platziert werden. diff --git a/mods/ITEMS/mcl_flowers/locale/template.txt b/mods/ITEMS/mcl_flowers/locale/template.txt new file mode 100644 index 000000000..dcf762796 --- /dev/null +++ b/mods/ITEMS/mcl_flowers/locale/template.txt @@ -0,0 +1,32 @@ +# textdomain: mcl_flowers +This is a small flower. Small flowers are mainly used for dye production and can also be potted.= +It can only be placed on a block on which it would also survive.= +Poppy= +Dandelion= +Oxeye Daisy= +Orange Tulip= +Pink Tulip= +Red Tulip= +White Tulip= +Allium= +Azure Bluet= +Blue Orchid= +Tall Grass= +Tall grass is a small plant which often occurs on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.= +Fern= +Ferns are small plants which occur naturally in jungles and taigas. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high.= +(Top Part)= +Peony= +A peony is a large plant which occupies two blocks. It is mainly used in dye protection.= +Rose Bush= +A rose bush is a large plant which occupies two blocks. It is safe to touch it. Rose bushes are mainly used in dye protection.= +Lilac= +A lilac is a large plant which occupies two blocks. It is mainly used in dye production.= +Sunflower= +A sunflower is a large plant which occupies two blocks. It is mainly used in dye production.= +Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.= +Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.= +Double Tallgrass= +Large Fern= +Lily Pad= +A lily pad is a flat plant block which can be walked on. They can be placed on water sources, ice and frosted ice.= diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index 9a8804fde..8b817312a 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -1,4 +1,6 @@ +local S = minetest.get_translator("mcl_furnaces") + -- -- Formspecs -- @@ -7,8 +9,10 @@ local function active_formspec(fuel_percent, item_percent) return "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_inventory_furnace.png]".. mcl_vars.inventory_header.. + "label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. + "label[2.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Furnace"))).."]".. "list[current_name;src;2.75,0.5;1,1;]".. "list[current_name;fuel;2.75,2.5;1,1;]".. "list[current_name;dst;5.75,1.5;1,1;]".. @@ -17,8 +21,7 @@ local function active_formspec(fuel_percent, item_percent) "image[4.1,1.5;1.5,1;gui_furnace_arrow_bg.png^[lowpart:".. (item_percent)..":gui_furnace_arrow_fg.png^[transformR270]".. "image_button[8,0;1,1;craftguide_book.png;craftguide;]".. - "tooltip[craftguide;Recipe book]".. - "tooltip[doc;Help]".. + "tooltip[craftguide;"..minetest.formspec_escape(S("Recipe book")).."]".. "listring[current_name;dst]".. "listring[current_player;main]".. "listring[current_name;src]".. @@ -30,16 +33,17 @@ end local inactive_formspec = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_inventory_furnace.png]".. mcl_vars.inventory_header.. + "label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. + "label[2.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Furnace"))).."]".. "list[current_name;src;2.75,0.5;1,1;]".. "list[current_name;fuel;2.75,2.5;1,1;]".. "list[current_name;dst;5.75,1.5;1,1;]".. "image[2.75,1.5;1,1;default_furnace_fire_bg.png]".. "image[4.1,1.5;1.5,1;gui_furnace_arrow_bg.png^[transformR270]".. "image_button[8,0;1,1;craftguide_book.png;craftguide;]".. - "tooltip[craftguide;Recipe book]".. - "tooltip[doc;Help]".. + "tooltip[craftguide;"..minetest.formspec_escape(S("Recipe book")).."]".. "listring[current_name;dst]".. "listring[current_player;main]".. "listring[current_name;src]".. @@ -49,9 +53,7 @@ local inactive_formspec = "size[9,8.75]".. local receive_fields = function(pos, formname, fields, sender) if fields.craftguide then - mcl_craftguide.show_craftguide(sender) - elseif fields.doc and minetest.get_modpath("doc") then - doc.show_entry(sender:get_player_name(), "nodes", "mcl_furnaces:furnace", true) + mcl_craftguide.show(sender:get_player_name()) end end @@ -292,9 +294,11 @@ if minetest.get_modpath("screwdriver") then end minetest.register_node("mcl_furnaces:furnace", { - description = "Furnace", - _doc_items_longdesc = "Furnaces cook or smelt several items, using a furnace fuel, into something else.", - _doc_items_usagehelp = "Right-click the furnace to view it. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.", + description = S("Furnace"), + _doc_items_longdesc = S("Furnaces cook or smelt several items, using a furnace fuel, into something else."), + _doc_items_usagehelp = + S("Use the furnace to open the furnace menu. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.").."\n".. + S("Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn."), _doc_items_hidden = false, tiles = { "default_furnace_top.png", "default_furnace_bottom.png", @@ -350,7 +354,7 @@ minetest.register_node("mcl_furnaces:furnace", { }) minetest.register_node("mcl_furnaces:furnace_active", { - description = "Burning Furnace", + description = S("Burning Furnace"), _doc_items_create_entry = false, tiles = { "default_furnace_top.png", "default_furnace_bottom.png", diff --git a/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.de.tr b/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.de.tr new file mode 100644 index 000000000..90cc50176 --- /dev/null +++ b/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_furnaces +Furnace=Ofen +Furnaces cook or smelt several items, using a furnace fuel, into something else.=Ofen kochen oder schmelzen diverse Gegenstände, unter Zuhilfenahme eines Brennstoffs, zu etwas anderem. +Use the furnace to open the furnace menu. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.=Benutzen Sie den Ofen, um das Ofenmenü zu öffnen. Platzieren Sie einen Brennstoff in den unteren Platz und das Quellmaterial in den oberen Platz. Der Ofen wird langsam seinen Brennstoff benutzen, um den Gegenstand zu schmelzen. Das Ergebnis landet im Ausgabeplatz rechts. +Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=Benutzen Sie das Rezeptbuch, um zu sehen, was Sie schmelzen können und was Sie als Brennstoff benutzen können und wie lange dieser brennt. +Burning Furnace=Aktiver Ofen +Recipe book=Fertigungsbuch +Inventory=Inventar diff --git a/mods/ITEMS/mcl_furnaces/locale/template.txt b/mods/ITEMS/mcl_furnaces/locale/template.txt new file mode 100644 index 000000000..a3922621b --- /dev/null +++ b/mods/ITEMS/mcl_furnaces/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mcl_furnaces +Furnace= +Furnaces cook or smelt several items, using a furnace fuel, into something else.= +Use the furnace to open the furnace menu. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.= +Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.= +Burning Furnace= +Recipe book= +Inventory= diff --git a/mods/ITEMS/mcl_furnaces/textures/crafting_inventory_furnace.png b/mods/ITEMS/mcl_furnaces/textures/crafting_inventory_furnace.png index f8191ffd2..688ae6ed6 100644 Binary files a/mods/ITEMS/mcl_furnaces/textures/crafting_inventory_furnace.png and b/mods/ITEMS/mcl_furnaces/textures/crafting_inventory_furnace.png differ diff --git a/mods/ITEMS/mcl_heads/description.txt b/mods/ITEMS/mcl_heads/description.txt index c3a38bb77..b169ba796 100644 --- a/mods/ITEMS/mcl_heads/description.txt +++ b/mods/ITEMS/mcl_heads/description.txt @@ -1 +1 @@ -Small decorational head blocks. +Small decorative head blocks. diff --git a/mods/ITEMS/mcl_heads/init.lua b/mods/ITEMS/mcl_heads/init.lua index 180affe27..ba3654403 100644 --- a/mods/ITEMS/mcl_heads/init.lua +++ b/mods/ITEMS/mcl_heads/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_heads") + -- Heads system local function addhead(name, texture, desc, longdesc) @@ -48,9 +50,9 @@ local function addhead(name, texture, desc, longdesc) end -- Add heads -addhead("zombie", "mcl_heads_zombie_node.png", "Zombie Head", "A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet for fun, but does not offer any protection.") -addhead("creeper", "mcl_heads_creeper_node.png", "Creeper Head", "A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet for fun, but does not offer any protection.") +addhead("zombie", "mcl_heads_zombie_node.png", S("Zombie Head"), S("A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet for fun, but does not offer any protection.")) +addhead("creeper", "mcl_heads_creeper_node.png", S("Creeper Head"), S("A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet for fun, but does not offer any protection.")) -- Original Minecraft name: “Head” -addhead("steve", "mcl_heads_steve_node.png", "Human Head", "A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.") -addhead("skeleton", "mcl_heads_skeleton_node.png", "Skeleton Skull", "A skeleton skull is a small decorative block which resembles the head of a skeleton. It can also be worn as a helmet for fun, but does not offer any protection.") -addhead("wither_skeleton", "mcl_heads_wither_skeleton_node.png", "Wither Skeleton Skull", "A wither skeleton skull is a small decorative block which resembles the head of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.") +addhead("steve", "mcl_heads_steve_node.png", S("Human Head"), S("A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.")) +addhead("skeleton", "mcl_heads_skeleton_node.png", S("Skeleton Skull"), S("A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet for fun, but does not offer any protection.")) +addhead("wither_skeleton", "mcl_heads_wither_skeleton_node.png", S("Wither Skeleton Skull"), S("A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.")) diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.de.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.de.tr new file mode 100644 index 000000000..0adb187da --- /dev/null +++ b/mods/ITEMS/mcl_heads/locale/mcl_heads.de.tr @@ -0,0 +1,11 @@ +# textdomain: mcl_heads +Zombie Head=Zombiekopf +A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet for fun, but does not offer any protection.=Ein Zombiekopf ist ein kleiner dekorativer Block, der so wie ein Kopf eines Zombies aussieht. Er kann auch als Helm zum Spaß getragen werden, aber er bietet keinerlei Schutz. +Creeper Head=Creeper-Kopf +A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet for fun, but does not offer any protection.=Ein Creeper-Kopf ist ein kleiner dekorativer Block, der so wie ein Kopf eines Creepers aussieht. Er kann auch als Helm zum Spaß getragen werden, aber er bietet keinerlei Schutz. +Human Head=Menschenkopf +A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=Ein Menschenkopf ist ein kleiner dekorativer Block, der so wie der Kopf eines Menschen (das heißt, einer Spielerfigur) aussieht. Er kann auch als Helm zum Spaß getragen werden, aber er bietet keinerlei Schutz. +Skeleton Skull=Skelettschädel +A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Ein Skelettschädel ist ein kleiner dekorativer Block, der so wie ein Schädel eines Skeletts aussieht. Er kann auch als Helm zum Spaß getragen werden, aber er bietet keinerlei Schutz. +Wither Skeleton Skull=Witherskelettschädel +A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Ein Witherskelettschädel ist ein kleiner dekorativer Block, der so wie ein Schädel eines Witherskeletts aussieht. Er kann auch als Helm zum Spaß getragen werden, aber er bietet keinerlei Schutz. diff --git a/mods/ITEMS/mcl_heads/locale/template.txt b/mods/ITEMS/mcl_heads/locale/template.txt new file mode 100644 index 000000000..7ff69df44 --- /dev/null +++ b/mods/ITEMS/mcl_heads/locale/template.txt @@ -0,0 +1,11 @@ +# textdomain: mcl_heads +Zombie Head= +A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet for fun, but does not offer any protection.= +Creeper Head= +A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet for fun, but does not offer any protection.= +Human Head= +A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.= +Skeleton Skull= +A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet for fun, but does not offer any protection.= +Wither Skeleton Skull= +A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.= diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index c7f7b0b9a..39f5f3e57 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -1,5 +1,6 @@ -local chest = minetest.get_content_id("mcl_chests:chest") +local S = minetest.get_translator("mcl_hoppers") +local chest = minetest.get_content_id("mcl_chests:chest") --[[ BEGIN OF NODE DEFINITIONS ]] @@ -7,7 +8,9 @@ local mcl_hoppers_formspec = "size[9,7]".. "background[-0.19,-0.25;9.41,10.48;mcl_hoppers_inventory.png]".. mcl_vars.inventory_header.. + "label[2,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))).."]".. "list[current_name;main;2,0.5;5,1;]".. + "label[0,2;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,2.5;9,3;9]".. "list[current_player;main;0,5.74;9,1;]".. "listring[current_name;main]".. @@ -121,16 +124,16 @@ local def_hopper = { -- Enabled downwards hopper local def_hopper_enabled = table.copy(def_hopper) -def_hopper_enabled.description = "Hopper" -def_hopper_enabled._doc_items_longdesc = [[Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempts to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers. +def_hopper_enabled.description = S("Hopper") +def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.").."\n\n".. -Hoppers interact with containers the following way: -• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers put items into the fuel slot -• Ender chests: Hoppers don't interact with ender chests -• Other containers: Hoppers interact with them normally +S("Hoppers interact with containers the following way:").."\n".. +S("• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot").."\n".. +S("• Ender chests: No interaction.").."\n".. +S("• Other containers: Normal interaction.").."\n\n".. -Hoppers can be disabled by supplying them with redstone power. Disabled hoppers don't move items.]] -def_hopper_enabled._doc_items_usagehelp = "To place a hopper vertically, place it on the floor or a ceiling. To place it sideways, place it at the side of a block. Remember you can place at usable blocks (such as chests) with sneak + right-click. The hopper will keep its orientation when the blocks around it are changed. To access the hopper's inventory, rightclick it." +S("Hoppers can be disabled when supplied with redstone power. Disabled hoppers don't move items.") +def_hopper_enabled._doc_items_usagehelp = S("To place a hopper vertically, place it on the floor or a ceiling. To place it sideways, place it at the side of a block. Use the hopper to access its inventory.") def_hopper_enabled.on_place = function(itemstack, placer, pointed_thing) local upos = pointed_thing.under local apos = pointed_thing.above @@ -179,7 +182,7 @@ minetest.register_node("mcl_hoppers:hopper", def_hopper_enabled) -- Disabled downwards hopper local def_hopper_disabled = table.copy(def_hopper) -def_hopper_disabled.description = "Disabled Hopper" +def_hopper_disabled.description = S("Disabled Hopper") def_hopper_disabled._doc_items_create_entry = false def_hopper_disabled.groups.not_in_creative_inventory = 1 def_hopper_disabled.drop = "mcl_hoppers:hopper" @@ -304,7 +307,7 @@ local def_hopper_side = { } local def_hopper_side_enabled = table.copy(def_hopper_side) -def_hopper_side_enabled.description = "Side Hopper" +def_hopper_side_enabled.description = S("Side Hopper") def_hopper_side_enabled.mesecons = { effector = { action_on = function(pos, node) @@ -315,7 +318,7 @@ def_hopper_side_enabled.mesecons = { minetest.register_node("mcl_hoppers:hopper_side", def_hopper_side_enabled) local def_hopper_side_disabled = table.copy(def_hopper_side) -def_hopper_side_disabled.description = "Disabled Side Hopper" +def_hopper_side_disabled.description = S("Disabled Side Hopper") def_hopper_side_disabled.mesecons = { effector = { action_off = function(pos, node) @@ -442,6 +445,14 @@ minetest.register_abm({ local g = minetest.registered_nodes[abovenode.name].groups.container mcl_util.move_item_container(above, pos) + -- Also suck in non-fuel items from furnace fuel slot + if not sucked and g == 4 then + local finv = minetest.get_inventory({type="node", pos=above}) + if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then + mcl_util.move_item_container(above, pos, "fuel") + end + end + -- Move an item from the hopper into the container to which the hopper points to local g = minetest.registered_nodes[frontnode.name].groups.container if g == 2 or g == 3 or g == 5 or g == 6 then diff --git a/mods/ITEMS/mcl_hoppers/locale/mcl_hoppers.de.tr b/mods/ITEMS/mcl_hoppers/locale/mcl_hoppers.de.tr new file mode 100644 index 000000000..cd7521184 --- /dev/null +++ b/mods/ITEMS/mcl_hoppers/locale/mcl_hoppers.de.tr @@ -0,0 +1,13 @@ +# textdomain: mcl_hoppers +Hopper=Trichter +Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.=Trichter sind Behälter mit 5 Inventarplätzen. Sie sammeln fallengelassene Gegenstände oberhalb auf, nehmen sich Gegenstände von einem Behälter oberhalb auf und versuchen, ihren Inhalt in einen benachbarten Behälter zu befördern. Trichter können entweder nach unten oder zur Seite zeigen. Trichter interagieren mit Truhen, Spendern, Werfern, Schulkerkisten, Öfen und Trichtern. +Hoppers interact with containers the following way:=Trichter interagieren mit Behältern auf diese Weise: +• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot=• Öfen: Trichter von oberhalb werden Gegenstände in den Quellplatz befördern. Trichter von unterhalb werden Gegenstände aus dem Ausgabeplatz nehmen. Sie werden Gegenstände auch aus dem Brennstoffplatz nehmen, wenn sie als Brennstoff ungeeignet sind. Seitwärtstrichter, die zum Ofen zeigen, befördern Gegenstände in den Brennstoffplatz. +• Ender chests: No interaction.=• Endertruhen: Keine Interaktion. +• Other containers: Normal interaction.=• Andere Behälter: Normale Interaktion. +Hoppers can be disabled when supplied with redstone power. Disabled hoppers don't move items.=Trichter können deaktiviert werden, wenn sie mit Redstone-Energie versorgt werden. Deaktivierte Trichter bewegen keine Gegenstände. +To place a hopper vertically, place it on the floor or a ceiling. To place it sideways, place it at the side of a block. Use the hopper to access its inventory.=Um einen Trichter vertikal zu platzieren, platzieren Sie ihn auf den Boden oder an die Decke. Um ihn seitwärts zu platzieren, platzieren Sie in an die Seite eines Blocks. Der Trichter wird seine Ausrichtung behalten. Benutzen Sie den Trichter, um auf sein Inventar zuzugreifen. +Disabled Hopper=Deaktivierter Trichter +Side Hopper=Seitwärtstrichter +Disabled Side Hopper=Deaktivierter Seitwärtstrichter +Inventory=Inventar diff --git a/mods/ITEMS/mcl_hoppers/locale/template.txt b/mods/ITEMS/mcl_hoppers/locale/template.txt new file mode 100644 index 000000000..df66e4ce6 --- /dev/null +++ b/mods/ITEMS/mcl_hoppers/locale/template.txt @@ -0,0 +1,13 @@ +# textdomain: mcl_hoppers +Hopper= +Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.= +Hoppers interact with containers the following way:= +• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot= +• Ender chests: No interaction.= +• Other containers: Normal interaction.= +Hoppers can be disabled when supplied with redstone power. Disabled hoppers don't move items.= +To place a hopper vertically, place it on the floor or a ceiling. To place it sideways, place it at the side of a block. Use the hopper to access its inventory.= +Disabled Hopper= +Side Hopper= +Disabled Side Hopper= +Inventory= diff --git a/mods/ITEMS/mcl_hoppers/textures/mcl_hoppers_inventory.png b/mods/ITEMS/mcl_hoppers/textures/mcl_hoppers_inventory.png index f44510466..409cdb272 100644 Binary files a/mods/ITEMS/mcl_hoppers/textures/mcl_hoppers_inventory.png and b/mods/ITEMS/mcl_hoppers/textures/mcl_hoppers_inventory.png differ diff --git a/mods/ITEMS/mcl_itemframes/init.lua b/mods/ITEMS/mcl_itemframes/init.lua index 2d2fffb34..e844e95de 100644 --- a/mods/ITEMS/mcl_itemframes/init.lua +++ b/mods/ITEMS/mcl_itemframes/init.lua @@ -1,9 +1,11 @@ +local S = minetest.get_translator("mcl_itemframes") + minetest.register_entity("mcl_itemframes:item",{ hp_max = 1, visual = "wielditem", visual_size = {x=0.3,y=0.3}, - collisionbox = {0,0,0,0,0,0}, physical = false, + pointable = false, textures = { "empty.png" }, _texture = "empty.png", @@ -77,7 +79,7 @@ local update_item_entity = function(pos, node) lua:_update_texture() if node.name == "mcl_itemframes:item_frame" then local yaw = math.pi*2 - node.param2 * math.pi/2 - e:setyaw(yaw) + e:set_yaw(yaw) end end end @@ -100,9 +102,9 @@ if minetest.get_modpath("screwdriver") then end minetest.register_node("mcl_itemframes:item_frame",{ - description = "Item Frame", - _doc_items_longdesc = "Item frames are decorative blocks in which items can be placed.", - _doc_items_usagehelp = "Hold any item in your hand and right-click the item frame to place the item into the frame. Rightclick the item frame again to retrieve the item.", + description = S("Item Frame"), + _doc_items_longdesc = S("Item frames are decorative blocks in which items can be placed."), + _doc_items_usagehelp = S("Just place any item on the item frame. Use the item frame again to retrieve the item."), drawtype = "mesh", is_ground_content = false, mesh = "mcl_itemframes_itemframe1facedir.obj", diff --git a/mods/ITEMS/mcl_itemframes/locale/mcl_itemframes.de.tr b/mods/ITEMS/mcl_itemframes/locale/mcl_itemframes.de.tr new file mode 100644 index 000000000..81a3f75bd --- /dev/null +++ b/mods/ITEMS/mcl_itemframes/locale/mcl_itemframes.de.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_itemframes +Item Frame=Rahmen +Item frames are decorative blocks in which items can be placed.=Rahmen sind dekorative Blöcke, in denen man Gegenstände platzieren kann. +Just place any item on the item frame. Use the item frame again to retrieve the item.=Platzieren Sie einfach einen beliebigen Gegenstand in den Rahmen. Benutzen Sie den Rahmen erneut, um den Gegenstand zurück zu erhalten. + diff --git a/mods/ITEMS/mcl_itemframes/locale/template.txt b/mods/ITEMS/mcl_itemframes/locale/template.txt new file mode 100644 index 000000000..55ff580fe --- /dev/null +++ b/mods/ITEMS/mcl_itemframes/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mcl_itemframes +Item Frame= +Item frames are decorative blocks in which items can be placed.= +Just place any item on the item frame. Use the item frame again to retrieve the item.= diff --git a/mods/ITEMS/mcl_jukebox/init.lua b/mods/ITEMS/mcl_jukebox/init.lua index efa29399b..fb495e78a 100644 --- a/mods/ITEMS/mcl_jukebox/init.lua +++ b/mods/ITEMS/mcl_jukebox/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_jukebox") + -- Player name-indexed table containing the currently heard track local active_tracks = {} @@ -27,14 +29,14 @@ for r=1, records do local entryname, longdesc, usagehelp if r == 1 then doc = true - entryname = "Music Disc" - longdesc = "A music disc holds a single music track which can be used in a jukebox to play music." - usagehelp = "Rightclick an empty jukebox with the music disc in your hand to play the music. Rightclick the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players." + entryname = S("Music Disc") + longdesc = S("A music disc holds a single music track which can be used in a jukebox to play music.") + usagehelp = S("Place a music dict into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.") end minetest.register_craftitem("mcl_jukebox:record_"..r, { description = - core.colorize("#55FFFF", "Music Disc") .. "\n" .. - core.colorize("#989898", recorddata[r][2] .. "—" .. recorddata[r][1]), + core.colorize("#55FFFF", S("Music Disc")) .. "\n" .. + core.colorize("#989898", S("@1—@2", recorddata[r][2], recorddata[r][1])), _doc_items_create_entry = doc, _doc_items_entry_name = entryname, _doc_items_longdesc = longdesc, @@ -48,7 +50,7 @@ end local function now_playing(player, track_id) local playername = player:get_player_name() local hud = active_huds[playername] - local text = "Now playing: " .. recorddata[track_id][2] .. "—" .. recorddata[track_id][1] + local text = S("Now playing: @1—@2", recorddata[track_id][2], recorddata[track_id][1]) if not hud_sequence_numbers[playername] then hud_sequence_numbers[playername] = 1 @@ -123,9 +125,9 @@ end -- Jukebox minetest.register_node("mcl_jukebox:jukebox", { - description = "Jukebox", - _doc_items_longdesc = "Jukeboxes play music when they're supplied with a music disc.", - _doc_items_usagehelp = "Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players.", + description = S("Jukebox"), + _doc_items_longdesc = S("Jukeboxes play music when they're supplied with a music disc."), + _doc_items_usagehelp = S("Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players."), tiles = {"mcl_jukebox_top.png", "mcl_jukebox_side.png", "mcl_jukebox_side.png"}, sounds = mcl_sounds.node_sound_wood_defaults(), groups = {handy=1,axey=1, container=7, deco_block=1, material_wood=1}, diff --git a/mods/ITEMS/mcl_jukebox/locale/mcl_jukebox.de.tr b/mods/ITEMS/mcl_jukebox/locale/mcl_jukebox.de.tr new file mode 100644 index 000000000..60dea78d0 --- /dev/null +++ b/mods/ITEMS/mcl_jukebox/locale/mcl_jukebox.de.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_jukebox +Music Disc=Musikplatte +A music disc holds a single music track which can be used in a jukebox to play music.=Eine Musikplatte enthält eine einzelnes Musikstück, die in einer Musikbox benutzt werden kann, um Musik zu spielen. +Place a music dict into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.=Platzieren Sie eine Musikplatte in eine leere Musikbox, um die Musik abzuspielen. Benutzen Sie die Musikbox erneut, um die Musikplatte zu erhalten. Die Musik kann nur von Ihnen gehört werden, nicht von anderen Spielern. +Music Disc=Musikplatte +@1—@2=@1 – @2 +Jukebox=Musikbox +Jukeboxes play music when they're supplied with a music disc.=Musikboxen spielen Musik, wenn man ihnen eine Musikplatte gibt. +Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players.=Platzieren Sie eine Musikplatte in eine leere Musikbox, um die Musikplatte einzulegen und Musik zu spielen. Wenn die Musikbox schon eine Musikplatte hat, werden Sie zuerst diese Musikplatte erhalten. Die Musik kann nur von Ihnen gehört werden, aber nicht von anderen Spielern. +Now playing: @1—@2=Sie hören: @1 – @2 diff --git a/mods/ITEMS/mcl_jukebox/locale/template.txt b/mods/ITEMS/mcl_jukebox/locale/template.txt new file mode 100644 index 000000000..5b46ce08a --- /dev/null +++ b/mods/ITEMS/mcl_jukebox/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: mcl_jukebox +Music Disc= +A music disc holds a single music track which can be used in a jukebox to play music.= +Place a music dict into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.= +Music Disc= +@1—@2= +Jukebox= +Jukeboxes play music when they're supplied with a music disc.= +Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players.= +Now playing: @1—@2= diff --git a/mods/ITEMS/mcl_maps/init.lua b/mods/ITEMS/mcl_maps/init.lua index 2c7037bf2..ceca739b0 100644 --- a/mods/ITEMS/mcl_maps/init.lua +++ b/mods/ITEMS/mcl_maps/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_maps") + -- Turn empty map into filled map by rightclick local make_filled_map = function(itemstack, placer, pointed_thing) local new_map = ItemStack("mcl_maps:filled_map") @@ -16,9 +18,9 @@ local make_filled_map = function(itemstack, placer, pointed_thing) end minetest.register_craftitem("mcl_maps:empty_map", { - description = "Empty Map", - _doc_items_longdesc = "Empty maps are not useful as maps, but they can be stacked and turned to maps which can be used.", - _doc_items_usagehelp = "Rightclick to start using the map (which can't be stacked anymore).", + description = S("Empty Map"), + _doc_items_longdesc = S("Empty maps are not useful as maps, but they can be stacked and turned to maps which can be used."), + _doc_items_usagehelp = S("Rightclick to start using the map (which can't be stacked anymore)."), inventory_image = "mcl_maps_map_empty.png", groups = { not_in_creative_inventory = 1 }, on_place = make_filled_map, @@ -31,9 +33,10 @@ minetest.register_craftitem("mcl_maps:empty_map", { -- Note: This is not at all like Minecraft right now. Minetest's minimap is pretty overpowered, it -- has a very greatly zoomed-out version and even a radar mode minetest.register_craftitem("mcl_maps:filled_map", { - description = "Map", - _doc_items_longdesc = "Maps show your surroundings as you explore the world. They can even show you the world like a radar. MAGIC!\nNote: Maps are subject to change in future versions of MineClone 2.", - _doc_items_usagehelp = "Hold the map in any of the hotbar slots. This allows you to access the minimap by pressing the minimap key ([F9] by default).\nIn Creative Mode, you don't need this item; the minimap is always available.", + description = S("Map"), + _doc_items_longdesc = S("Maps show your surroundings as you explore the world."), + _doc_items_usagehelp = S("Hold the map in any of the hotbar slots. This allows you to access the minimap by pressing the minimap key (see controls settings).").."\n".. + S("In Creative Mode, you don't need this item; the minimap is always available."), groups = { tool = 1 }, inventory_image = "mcl_maps_map_filled.png^(mcl_maps_map_filled_markings.png^[colorize:#000000)", stack_max = 1, @@ -62,10 +65,15 @@ end -- Checks if player is still allowed to display the minimap local function update_minimap(player) - if minetest.settings:get_bool("creative_mode") or has_item_in_hotbar(player, "mcl_maps:filled_map") then - player:hud_set_flags({minimap = true}) + local creative = minetest.settings:get_bool("creative_mode") + if creative then + player:hud_set_flags({minimap=true, minimap_radar = true}) else - player:hud_set_flags({minimap = false}) + if has_item_in_hotbar(player, "mcl_maps:filled_map") then + player:hud_set_flags({minimap = true, minimap_radar = false}) + else + player:hud_set_flags({minimap = false, minimap_radar = false}) + end end end diff --git a/mods/ITEMS/mcl_maps/locale/mcl_maps.de.tr b/mods/ITEMS/mcl_maps/locale/mcl_maps.de.tr new file mode 100644 index 000000000..3e7071e69 --- /dev/null +++ b/mods/ITEMS/mcl_maps/locale/mcl_maps.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_maps +Empty Map=Leere Karte +Empty maps are not useful as maps, but they can be stacked and turned to maps which can be used.=Leere Karten sind als Karten nicht nützlich, aber sie können gestapelt werden und zu benutzbaren Karten umgewandelt werden. +Rightclick to start using the map (which can't be stacked anymore).=Rechtsklick, um zu beginnen, die Karte zu benutzen. Sie kann dann nicht mehr gestapelt werden. +Map=Karte +Maps show your surroundings as you explore the world.=Karten zeigen Ihre Umgebung, während Sie die Welt erkunden. +Hold the map in any of the hotbar slots. This allows you to access the minimap by pressing the minimap key (see controls settings).=Halten Sie die Karte in einen beliebigen Platz in der Schnellleiste. Damit können Sie jetzt die Übersichtskarte aktivieren, indem Sie die Taste zum Umschalten der Karte drücken (siehe Tastenbelegung). +In Creative Mode, you don't need this item; the minimap is always available.=Im Kreativmodus brauchen Sie diesen Gegenstand nicht; die Übersichtskarte ist immer verfügbar. diff --git a/mods/ITEMS/mcl_maps/locale/template.txt b/mods/ITEMS/mcl_maps/locale/template.txt new file mode 100644 index 000000000..1db127f43 --- /dev/null +++ b/mods/ITEMS/mcl_maps/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mcl_maps +Empty Map= +Empty maps are not useful as maps, but they can be stacked and turned to maps which can be used.= +Rightclick to start using the map (which can't be stacked anymore).= +Map= +Maps show your surroundings as you explore the world.= +Hold the map in any of the hotbar slots. This allows you to access the minimap by pressing the minimap key (see controls settings).= +In Creative Mode, you don't need this item; the minimap is always available.= diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua index c070c8a88..8a670766a 100644 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ b/mods/ITEMS/mcl_mobitems/init.lua @@ -1,8 +1,10 @@ -- TODO: Add special status effects for raw flesh +local S = minetest.get_translator("mcl_mobitems") + minetest.register_craftitem("mcl_mobitems:rotten_flesh", { - description = "Rotten Flesh", - _doc_items_longdesc = "Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.", + description = S("Rotten Flesh"), + _doc_items_longdesc = S("Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while."), inventory_image = "mcl_mobitems_rotten_flesh.png", wield_image = "mcl_mobitems_rotten_flesh.png", on_place = minetest.item_eat(4), @@ -13,8 +15,8 @@ minetest.register_craftitem("mcl_mobitems:rotten_flesh", { }) minetest.register_craftitem("mcl_mobitems:mutton", { - description = "Raw Mutton", - _doc_items_longdesc = "Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.", + description = S("Raw Mutton"), + _doc_items_longdesc = S("Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value."), inventory_image = "mcl_mobitems_mutton_raw.png", wield_image = "mcl_mobitems_mutton_raw.png", on_place = minetest.item_eat(2), @@ -25,8 +27,8 @@ minetest.register_craftitem("mcl_mobitems:mutton", { }) minetest.register_craftitem("mcl_mobitems:cooked_mutton", { - description = "Cooked Mutton", - _doc_items_longdesc = "Cooked mutton is the cooked flesh from a sheep and is used as food.", + description = S("Cooked Mutton"), + _doc_items_longdesc = S("Cooked mutton is the cooked flesh from a sheep and is used as food."), inventory_image = "mcl_mobitems_mutton_cooked.png", wield_image = "mcl_mobitems_mutton_cooked.png", on_place = minetest.item_eat(6), @@ -37,8 +39,8 @@ minetest.register_craftitem("mcl_mobitems:cooked_mutton", { }) minetest.register_craftitem("mcl_mobitems:beef", { - description = "Raw Beef", - _doc_items_longdesc = "Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.", + description = S("Raw Beef"), + _doc_items_longdesc = S("Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value."), inventory_image = "mcl_mobitems_beef_raw.png", wield_image = "mcl_mobitems_beef_raw.png", on_place = minetest.item_eat(3), @@ -49,8 +51,8 @@ minetest.register_craftitem("mcl_mobitems:beef", { }) minetest.register_craftitem("mcl_mobitems:cooked_beef", { - description = "Steak", - _doc_items_longdesc = "Steak is cooked beef from cows and can be eaten.", + description = S("Steak"), + _doc_items_longdesc = S("Steak is cooked beef from cows and can be eaten."), inventory_image = "mcl_mobitems_beef_cooked.png", wield_image = "mcl_mobitems_beef_cooked.png", on_place = minetest.item_eat(8), @@ -61,8 +63,8 @@ minetest.register_craftitem("mcl_mobitems:cooked_beef", { }) minetest.register_craftitem("mcl_mobitems:chicken", { - description = "Raw Chicken", - _doc_items_longdesc = "Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.", + description = S("Raw Chicken"), + _doc_items_longdesc = S("Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value."), inventory_image = "mcl_mobitems_chicken_raw.png", wield_image = "mcl_mobitems_chicken_raw.png", on_place = minetest.item_eat(2), @@ -73,8 +75,8 @@ minetest.register_craftitem("mcl_mobitems:chicken", { }) minetest.register_craftitem("mcl_mobitems:cooked_chicken", { - description = "Cooked Chicken", - _doc_items_longdesc = "A cooked chicken is a healthy food item which can be eaten.", + description = S("Cooked Chicken"), + _doc_items_longdesc = S("A cooked chicken is a healthy food item which can be eaten."), inventory_image = "mcl_mobitems_chicken_cooked.png", wield_image = "mcl_mobitems_chicken_cooked.png", on_place = minetest.item_eat(6), @@ -85,8 +87,8 @@ minetest.register_craftitem("mcl_mobitems:cooked_chicken", { }) minetest.register_craftitem("mcl_mobitems:porkchop", { - description = "Raw Porkchop", - _doc_items_longdesc = "A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.", + description = S("Raw Porkchop"), + _doc_items_longdesc = S("A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value."), inventory_image = "mcl_mobitems_porkchop_raw.png", wield_image = "mcl_mobitems_porkchop_raw.png", on_place = minetest.item_eat(3), @@ -97,8 +99,8 @@ minetest.register_craftitem("mcl_mobitems:porkchop", { }) minetest.register_craftitem("mcl_mobitems:cooked_porkchop", { - description = "Cooked Porkchop", - _doc_items_longdesc = "Cooked porkchop is the cooked flesh of a pig and is used as food.", + description = S("Cooked Porkchop"), + _doc_items_longdesc = S("Cooked porkchop is the cooked flesh of a pig and is used as food."), inventory_image = "mcl_mobitems_porkchop_cooked.png", wield_image = "mcl_mobitems_porkchop_cooked.png", on_place = minetest.item_eat(8), @@ -109,8 +111,8 @@ minetest.register_craftitem("mcl_mobitems:cooked_porkchop", { }) minetest.register_craftitem("mcl_mobitems:rabbit", { - description = "Raw Rabbit", - _doc_items_longdesc = "Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.", + description = S("Raw Rabbit"), + _doc_items_longdesc = S("Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value."), inventory_image = "mcl_mobitems_rabbit_raw.png", wield_image = "mcl_mobitems_rabbit_raw.png", on_place = minetest.item_eat(3), @@ -121,8 +123,8 @@ minetest.register_craftitem("mcl_mobitems:rabbit", { }) minetest.register_craftitem("mcl_mobitems:cooked_rabbit", { - description = "Cooked Rabbit", - _doc_items_longdesc = "This is a food item which can be eaten.", + description = S("Cooked Rabbit"), + _doc_items_longdesc = S("This is a food item which can be eaten."), inventory_image = "mcl_mobitems_rabbit_cooked.png", wield_image = "mcl_mobitems_rabbit_cooked.png", on_place = minetest.item_eat(5), @@ -143,8 +145,8 @@ end -- TODO: Clear *all* status effects minetest.register_craftitem("mcl_mobitems:milk_bucket", { - description = "Milk", - _doc_items_longdesc = "Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will cure all forms of poisoning (in later versions: all status effects), but restores no hunger points.", + description = S("Milk"), + _doc_items_longdesc = S("Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will cure all forms of poisoning, but restores no hunger points."), _doc_items_usagehelp = "Rightclick to drink the milk.", inventory_image = "mcl_mobitems_bucket_milk.png", wield_image = "mcl_mobitems_bucket_milk.png", @@ -156,8 +158,8 @@ minetest.register_craftitem("mcl_mobitems:milk_bucket", { }) minetest.register_craftitem("mcl_mobitems:spider_eye", { - description = "Spider Eye", - _doc_items_longdesc = "Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.", + description = S("Spider Eye"), + _doc_items_longdesc = S("Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly."), inventory_image = "mcl_mobitems_spider_eye.png", wield_image = "mcl_mobitems_spider_eye.png", on_place = minetest.item_eat(2), @@ -168,25 +170,25 @@ minetest.register_craftitem("mcl_mobitems:spider_eye", { }) minetest.register_craftitem("mcl_mobitems:bone", { - description = "Bone", - _doc_items_longdesc = "Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.", - _doc_items_usagehelp = "Hold the bone in your hand near wolves to attract them. Rightclick the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by rightclicking it.", + description = S("Bone"), + _doc_items_longdesc = S("Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient."), + _doc_items_usagehelp = S("Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it."), inventory_image = "mcl_mobitems_bone.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_mobitems:string",{ - description = "String", - _doc_items_longdesc = "Strings are used in crafting.", + description = S("String"), + _doc_items_longdesc = S("Strings are used in crafting."), inventory_image = "mcl_mobitems_string.png", stack_max = 64, groups = { craftitem = 1 }, }) minetest.register_craftitem("mcl_mobitems:blaze_rod", { - description = "Blaze Rod", - _doc_items_longdesc = "This is a crafting component dropped from dead blazes.", + description = S("Blaze Rod"), + _doc_items_longdesc = S("This is a crafting component dropped from dead blazes."), wield_image = "mcl_mobitems_blaze_rod.png", inventory_image = "mcl_mobitems_blaze_rod.png", groups = { craftitem = 1 }, @@ -194,8 +196,8 @@ minetest.register_craftitem("mcl_mobitems:blaze_rod", { }) minetest.register_craftitem("mcl_mobitems:blaze_powder", { - description = "Blaze Powder", - _doc_items_longdesc = "This item is mainly used for crafting.", + description = S("Blaze Powder"), + _doc_items_longdesc = S("This item is mainly used for crafting."), wield_image = "mcl_mobitems_blaze_powder.png", inventory_image = "mcl_mobitems_blaze_powder.png", groups = { craftitem = 1, brewitem = 1 }, @@ -203,8 +205,8 @@ minetest.register_craftitem("mcl_mobitems:blaze_powder", { }) minetest.register_craftitem("mcl_mobitems:magma_cream", { - description = "Magma Cream", - _doc_items_longdesc = "Magma cream is a crafting component.", + description = S("Magma Cream"), + _doc_items_longdesc = S("Magma cream is a crafting component."), wield_image = "mcl_mobitems_magma_cream.png", inventory_image = "mcl_mobitems_magma_cream.png", groups = { craftitem = 1, brewitem = 1 }, @@ -212,8 +214,8 @@ minetest.register_craftitem("mcl_mobitems:magma_cream", { }) minetest.register_craftitem("mcl_mobitems:ghast_tear", { - description = "Ghast Tear", - _doc_items_longdesc = "Place this item in an item frame as decoration.", + description = S("Ghast Tear"), + _doc_items_longdesc = S("Place this item in an item frame as decoration."), wield_image = "mcl_mobitems_ghast_tear.png", inventory_image = "mcl_mobitems_ghast_tear.png", -- TODO: Reveal item when it's useful @@ -222,8 +224,8 @@ minetest.register_craftitem("mcl_mobitems:ghast_tear", { }) minetest.register_craftitem("mcl_mobitems:nether_star", { - description = "Nether Star", - _doc_items_longdesc = "A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.", + description = S("Nether Star"), + _doc_items_longdesc = S("A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration."), wield_image = "mcl_mobitems_nether_star.png", inventory_image = "mcl_mobitems_nether_star.png", -- TODO: Reveal item when it's useful @@ -232,8 +234,8 @@ minetest.register_craftitem("mcl_mobitems:nether_star", { }) minetest.register_craftitem("mcl_mobitems:leather", { - description = "Leather", - _doc_items_longdesc = "Leather is a versatile crafting component.", + description = S("Leather"), + _doc_items_longdesc = S("Leather is a versatile crafting component."), wield_image = "mcl_mobitems_leather.png", inventory_image = "mcl_mobitems_leather.png", groups = { craftitem = 1 }, @@ -241,8 +243,8 @@ minetest.register_craftitem("mcl_mobitems:leather", { }) minetest.register_craftitem("mcl_mobitems:feather", { - description = "Feather", - _doc_items_longdesc = "Feathers are used in crafting and are dropped from chickens.", + description = S("Feather"), + _doc_items_longdesc = S("Feathers are used in crafting and are dropped from chickens."), wield_image = "mcl_mobitems_feather.png", inventory_image = "mcl_mobitems_feather.png", groups = { craftitem = 1 }, @@ -250,8 +252,8 @@ minetest.register_craftitem("mcl_mobitems:feather", { }) minetest.register_craftitem("mcl_mobitems:rabbit_hide", { - description = "Rabbit Hide", - _doc_items_longdesc = "Rabbit hide is used to create leather.", + description = S("Rabbit Hide"), + _doc_items_longdesc = S("Rabbit hide is used to create leather."), wield_image = "mcl_mobitems_rabbit_hide.png", inventory_image = "mcl_mobitems_rabbit_hide.png", groups = { craftitem = 1 }, @@ -259,8 +261,8 @@ minetest.register_craftitem("mcl_mobitems:rabbit_hide", { }) minetest.register_craftitem("mcl_mobitems:rabbit_foot", { - description = "Rabbit's Foot", - _doc_items_longdesc = "Must be your lucky day! Place this item in an item frame for decoration.", + description = S("Rabbit's Foot"), + _doc_items_longdesc = S("Must be your lucky day! Place this item in an item frame for decoration."), wield_image = "mcl_mobitems_rabbit_foot.png", inventory_image = "mcl_mobitems_rabbit_foot.png", -- TODO: Reveal item when it's useful @@ -269,8 +271,8 @@ minetest.register_craftitem("mcl_mobitems:rabbit_foot", { }) minetest.register_craftitem("mcl_mobitems:saddle", { - description = "Saddle", - _doc_items_longdesc = "Saddles can be put on some animals in order to mount them.", + description = S("Saddle"), + _doc_items_longdesc = S("Saddles can be put on some animals in order to mount them."), _doc_items_usagehelp = "Rightclick an animal (with the saddle in your hand) to try put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by rightclicking them again.", wield_image = "mcl_mobitems_saddle.png", inventory_image = "mcl_mobitems_saddle.png", @@ -279,8 +281,8 @@ minetest.register_craftitem("mcl_mobitems:saddle", { }) minetest.register_craftitem("mcl_mobitems:rabbit_stew", { - description = "Rabbit Stew", - _doc_items_longdesc = "Rabbit stew is a very nutricious food item.", + description = S("Rabbit Stew"), + _doc_items_longdesc = S("Rabbit stew is a very nutricious food item."), wield_image = "mcl_mobitems_rabbit_stew.png", inventory_image = "mcl_mobitems_rabbit_stew.png", stack_max = 1, @@ -291,21 +293,21 @@ minetest.register_craftitem("mcl_mobitems:rabbit_stew", { }) minetest.register_craftitem("mcl_mobitems:shulker_shell", { - description = "Shulker Shell", - _doc_items_longdesc = "Shulker shells are used in crafting. They are dropped from dead shulkers.", + description = S("Shulker Shell"), + _doc_items_longdesc = S("Shulker shells are used in crafting. They are dropped from dead shulkers."), inventory_image = "mcl_mobitems_shulker_shell.png", groups = { craftitem = 1 }, }) minetest.register_craftitem("mcl_mobitems:slimeball", { - description = "Slimeball", - _doc_items_longdesc = "Slimeballs are used in crafting. They are dropped from slimes.", + description = S("Slimeball"), + _doc_items_longdesc = S("Slimeballs are used in crafting. They are dropped from slimes."), inventory_image = "mcl_mobitems_slimeball.png", groups = { craftitem = 1 }, }) minetest.register_craftitem("mcl_mobitems:gunpowder", { - description = "Gunpowder", + description = S("Gunpowder"), _doc_items_longdesc = doc.sub.items.temp.craftitem, inventory_image = "default_gunpowder.png", stack_max = 64, @@ -313,9 +315,9 @@ minetest.register_craftitem("mcl_mobitems:gunpowder", { }) minetest.register_tool("mcl_mobitems:carrot_on_a_stick", { - description = "Carrot on a Stick", - _doc_items_longdesc = "A carrot on a stick can be used on saddled pigs to ride them.", - _doc_items_usagehelp = "Rightclick a saddled pig with the carrot on a stick to mount it. You can now ride it like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.", + description = S("Carrot on a Stick"), + _doc_items_longdesc = S("A carrot on a stick can be used on saddled pigs to ride them."), + _doc_items_usagehelp = S("Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick."), wield_image = "mcl_mobitems_carrot_on_a_stick.png", inventory_image = "mcl_mobitems_carrot_on_a_stick.png", groups = { transport = 1 }, @@ -357,8 +359,6 @@ minetest.register_craft({ }, }) ---[[ -TODO: Re-enable this when fishing rod is available again minetest.register_craft({ output = "mcl_mobitems:carrot_on_a_stick", recipe = { @@ -374,7 +374,6 @@ minetest.register_craft({ { "mcl_farming:carrot_item", "" }, }, }) -]] minetest.register_craft({ type = "shapeless", diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr new file mode 100644 index 000000000..a392ffc27 --- /dev/null +++ b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr @@ -0,0 +1,62 @@ +# textdomain: mcl_mobitems +Rotten Flesh=Gammelfleisch +Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.=Igitt! Dieses Stück Fleisch hat wohl bessere Tage gesehen. Wenn Sie es essen, werden Sie sofort vergiftet und erleiden einen Schaden von 4 Trefferpunkten. Aber gezähmte Wölfe können es problemlos fressen. +Raw Mutton=Rohes Hammelfleisch +Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.=Rohes Hammelfleisch ist das Fleisch eines Schafes und ein Lebensmittel, welches bedenkenlos verzehrt werden kann. Es kann gebraten werden, um seinen Nährwert deutlich zu erhöhen. +Cooked Mutton=Gebratenes Hammelfleisch +Cooked mutton is the cooked flesh from a sheep and is used as food.=Gebratenes Hammelfleisch ist das gebratene Fleisch eines Schafs und dient als Lebensmittel. +Raw Beef=Rohes Rindfleisch +Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.=Rohes Rindfleisch ist das Fleisch von Kühen und kann problemlos gegessen werden. Es kann gegart werden, um den Nährwert deutlich zu erhöhen. +Steak=Steak +Steak is cooked beef from cows and can be eaten.=Steak ist gebratenes Rindfleisch und kann gegessen werden. +Raw Chicken=Rohes Hühnchen +Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.=Rohes Hühnchen ist ein Lebensmittel, das nicht sicher für den Verzehr ist. Sie können es essen, um ein paar Hungerpunkte zu erhalten, aber mit einer Wahrscheinlichkeit von 30% erleiden Sie eine Lebensmittelvergiftung, die Ihre Hungerrate für eine Weile erhöht. Braten Sie ein rohes Hühnchen, um es sicher zuzubereiten und den Nährwert zu erhöhen. +Cooked Chicken=Gebratenes Hühnchen +A cooked chicken is a healthy food item which can be eaten.=Ein gebratenes Hühnchen ist ein gesundes essbares Lebensmittel. +Raw Porkchop=Rohes Schweinefleisch +A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.=Ein rohes Stück Schweinefleisch kann bedenkenlos gegessen werden. Man kann es braten, um seinen Nährwert stark zu erhöhen. +Cooked Porkchop=Gebratenes Schweinefleisch +Cooked porkchop is the cooked flesh of a pig and is used as food.=Ein gebratenes Stück Schweinefleisch ist ein gutes Lebensmittel. +Raw Rabbit=Rohes Kaninchen +Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.=Rohes Kaninchenfleisch ist ein Lebensmittel, welches bedenkenlos verzehrt werden kann. Es kann gebraten werden, um seinen Nährwert zu erhöhen. +Cooked Rabbit=Gebratenes Kaninchen +This is a food item which can be eaten.=Dies ist ein essbares Lebensmittel. +Milk=Milch +Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will cure all forms of poisoning, but restores no hunger points.=Milch ist sehr erfrischend und wird erhalten, wenn ein Eimer an einer Kuh benutzt wird. Wenn es getrunken wird, werden alle Vergiftungserscheinungen kuriert, aber es werden keine Hungerpunkte wiederhergestellt. +Spider Eye=Spinnenauge +Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.=Spinnenaugen werden hauptsächlich in der Fertigung benutzt. Wenn Sie wirklich verzweifelt sind, können sie es essen, aber das wird Sie kurz vergiften. +Bone=Knochen +Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.=Knochen können benutzt werden, um Wölfe zu zähmen, damit sie einen beschützen. Sie außerdem nützlich in der Fertigung. +String=Faden +Strings are used in crafting.=Fäden sind nützlich in der Fertigung. +Blaze Rod=Lohenrute +This is a crafting component dropped from dead blazes.=Dies ist eine Fertigungskomponente, die von toten Lohen abgeworfen wird. +Blaze Powder=Lohenstaub +This item is mainly used for crafting.=Dieser Gegenstand wird hauptsächlich in der Fertigung benutzt. +Magma Cream=Magmacreme +Magma cream is a crafting component.=Magmacreme ist eine Fertigungskomponente. +Ghast Tear=Ghast-Träne +Place this item in an item frame as decoration.=Platzieren Sie diesen Gegenstand in einem Rahmel als Deko. +Nether Star=Nether-Stern +A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.=Ein Netherstern wird abgeworfen, wenn der Wither stirbt. Platzieren Sie ihn in einen Rahmen, um der Welt zu zeigen, wie großartig Sie sind! +Leather=Leder +Leather is a versatile crafting component.=Leder ist eine vielseitige Fertigungskomponente. +Feather=Feder +Feathers are used in crafting and are dropped from chickens.=Federn werden in der Fertigung benutzt und werden von Hühnern abgeworfen. +Rabbit Hide=Kaninchenfell +Rabbit hide is used to create leather.=Kaninchenfell wird zur Herstellung von Leder benutzt. +Rabbit's Foot=Hasenpfote +Must be your lucky day! Place this item in an item frame for decoration.=Muss wohl Ihr Glückstag sein! Platzieren Sie diesen Gegenstand in einen Rahmen zur Dekoration. +Saddle=Sattel +Saddles can be put on some animals in order to mount them.=Sattel können auf einigen Tieren platziert werden, um sich aufzusatteln. +Rabbit Stew=Kaninchenragout +Rabbit stew is a very nutricious food item.=Kaninchenragout ist ein sehr nahrhaftes Lebensmittel. +Shulker Shell=Schulkerschale +Shulker shells are used in crafting. They are dropped from dead shulkers.=Schulkerschalen werden für die Fertigung verwendet. Sie werden von toten Schulkern fallen gelassen. +Slimeball=Schleimkugel +Slimeballs are used in crafting. They are dropped from slimes.=Schleimkugeln werden in der Fertigung verwendet. Sie werden von Schleimen fallen gelassen. +Gunpowder=Schießpulver +Carrot on a Stick=Karottenrute +A carrot on a stick can be used on saddled pigs to ride them.=Eine Karottenrute kann auf gesattelten Schweinen angewendet werden, um sie zu reiten. +Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Platzieren Sie sie auf einem Schwein mit Sattel, um sich aufzusatteln. Sie können nun das Schwein wie ein Pferd reiten. Schweine werden auch auf Sie zugehen, wenn Sie einfach nur die Karottenrute halten. +Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Halten Sie den Knochen in der Nähe von Wölfen, um sie anzulocken. Benutzen Sie die „Platzieren“-Taste auf dem Wolf, um ihm den Knochen zu geben und ihn zu zähmen. Sie können dem gezähmten Wolf Befehle erteilen, indem Sie die „Platzieren“-Taste auf ihm benutzen. diff --git a/mods/ITEMS/mcl_mobitems/locale/template.txt b/mods/ITEMS/mcl_mobitems/locale/template.txt new file mode 100644 index 000000000..2c2c15d16 --- /dev/null +++ b/mods/ITEMS/mcl_mobitems/locale/template.txt @@ -0,0 +1,62 @@ +# textdomain: mcl_mobitems +Rotten Flesh= +Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.= +Raw Mutton= +Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.= +Cooked Mutton= +Cooked mutton is the cooked flesh from a sheep and is used as food.= +Raw Beef= +Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.= +Steak= +Steak is cooked beef from cows and can be eaten.= +Raw Chicken= +Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.= +Cooked Chicken= +A cooked chicken is a healthy food item which can be eaten.= +Raw Porkchop= +A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.= +Cooked Porkchop= +Cooked porkchop is the cooked flesh of a pig and is used as food.= +Raw Rabbit= +Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.= +Cooked Rabbit= +This is a food item which can be eaten.= +Milk= +Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will cure all forms of poisoning, but restores no hunger points.= +Spider Eye= +Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.= +Bone= +Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.= +String= +Strings are used in crafting.= +Blaze Rod= +This is a crafting component dropped from dead blazes.= +Blaze Powder= +This item is mainly used for crafting.= +Magma Cream= +Magma cream is a crafting component.= +Ghast Tear= +Place this item in an item frame as decoration.= +Nether Star= +A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.= +Leather= +Leather is a versatile crafting component.= +Feather= +Feathers are used in crafting and are dropped from chickens.= +Rabbit Hide= +Rabbit hide is used to create leather.= +Rabbit's Foot= +Must be your lucky day! Place this item in an item frame for decoration.= +Saddle= +Saddles can be put on some animals in order to mount them.= +Rabbit Stew= +Rabbit stew is a very nutricious food item.= +Shulker Shell= +Shulker shells are used in crafting. They are dropped from dead shulkers.= +Slimeball= +Slimeballs are used in crafting. They are dropped from slimes.= +Gunpowder= +Carrot on a Stick= +A carrot on a stick can be used on saddled pigs to ride them.= +Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.= +Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.= diff --git a/mods/ITEMS/mcl_mobspawners/init.lua b/mods/ITEMS/mcl_mobspawners/init.lua index 58ec364c6..632e4fa75 100644 --- a/mods/ITEMS/mcl_mobspawners/init.lua +++ b/mods/ITEMS/mcl_mobspawners/init.lua @@ -1,4 +1,4 @@ -local S = mobs.intllib +local S = minetest.get_translator("mcl_mobspawners") mcl_mobspawners = {} @@ -43,6 +43,14 @@ local doll_size_overrides = { ["mobs_mc:enderdragon"] = { x = 0.16, y = 0.16 }, ["mobs_mc:witch"] = { x = 0.95, y = 0.95 }, } +local spawn_count_overrides = { + ["mobs_mc:enderdragon"] = 1, + ["mobs_mc:wither"] = 1, + ["mobs_mc:ghast"] = 1, + ["mobs_mc:guardian_elder"] = 1, + ["mobs_mc:guardian"] = 2, + ["mobs_mc:iron_golem"] = 2, +} local function set_doll_properties(doll, mob) local mobinfo = minetest.registered_entities[mob] @@ -218,7 +226,11 @@ local spawn_mobs = function(pos, elapsed) -- spawn up to 4 mobs in random air blocks if air then - for a=1, 4 do + local max = 4 + if spawn_count_overrides[mob] then + max = spawn_count_overrides[mob] + end + for a=1, max do if #air <= 0 then -- We're out of space! Stop spawning break @@ -255,7 +267,7 @@ minetest.register_node("mcl_mobspawners:spawner", { walkable = true, description = S("Mob Spawner"), _doc_items_longdesc = S("A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light."), - _doc_items_usagehelp = S("If you have a spawn egg, you use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level."), + _doc_items_usagehelp = S("If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level."), groups = {pickaxey=1, material_stone=1, deco_block=1}, is_ground_content = false, drop = "", @@ -318,8 +330,8 @@ minetest.register_node("mcl_mobspawners:spawner", { local doll_def = { hp_max = 1, - physical = true, - collisionbox = {0,0,0,0,0,0}, + physical = false, + pointable = false, visual = "mesh", makes_footstep_sound = false, timer = 0, @@ -338,8 +350,8 @@ doll_def.on_activate = function(self, staticdata, dtime_s) mob = default_mob end set_doll_properties(self.object, mob) - self.object:setvelocity({x=0, y=0, z=0}) - self.object:setacceleration({x=0, y=0, z=0}) + self.object:set_velocity({x=0, y=0, z=0}) + self.object:set_acceleration({x=0, y=0, z=0}) self.object:set_armor_groups({immortal=1}) end diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.de.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.de.tr new file mode 100644 index 000000000..84a849ed7 --- /dev/null +++ b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.de.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_mobspawners +Mob Spawner=Mobspawner +A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.=Ein Mobspawner lässt regelmäßig Mobs um ihn herum auftauchen, wenn sich ein Spieler in der Nähe befindet. Einige Mobspawner werden inaktiv, wenn sie sich im Licht befinden. +If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=Wenn Sie ein Spawn-Ei haben, können Sie es benutzen, um den Mobtyp, der erzeugt wird, zu ändern. Platzieren Sie den Gegenstand einfach auf dem Mobspawner. Von Spielern manipulierte Mobspawner erzeugen immer Mobs, unabhängig von der Helligkeit. diff --git a/mods/ITEMS/mcl_mobspawners/locale/template.txt b/mods/ITEMS/mcl_mobspawners/locale/template.txt new file mode 100644 index 000000000..6a660585f --- /dev/null +++ b/mods/ITEMS/mcl_mobspawners/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mcl_mobspawners +Mob Spawner= +A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.= +If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.= diff --git a/mods/ITEMS/mcl_monster_eggs/depends.txt b/mods/ITEMS/mcl_monster_eggs/depends.txt index fde951c96..d867036e5 100644 --- a/mods/ITEMS/mcl_monster_eggs/depends.txt +++ b/mods/ITEMS/mcl_monster_eggs/depends.txt @@ -1,3 +1,2 @@ mcl_sounds mobs_mc -intllib? diff --git a/mods/ITEMS/mcl_monster_eggs/init.lua b/mods/ITEMS/mcl_monster_eggs/init.lua index cdacc7fda..1f7244cb0 100644 --- a/mods/ITEMS/mcl_monster_eggs/init.lua +++ b/mods/ITEMS/mcl_monster_eggs/init.lua @@ -1,9 +1,7 @@ -- Monster eggs! -- Blocks which spawn silverfish when destroyed. --- Intllib -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP .. "/intllib.lua") +local S = minetest.get_translator("mcl_monster_eggs") local spawn_silverfish = function(pos, oldnode, oldmetadata, digger) if not minetest.settings:get_bool("creative_mode") then diff --git a/mods/ITEMS/mcl_monster_eggs/intllib.lua b/mods/ITEMS/mcl_monster_eggs/intllib.lua deleted file mode 100644 index 6669d7202..000000000 --- a/mods/ITEMS/mcl_monster_eggs/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/mods/ITEMS/mcl_monster_eggs/locale/mcl_monster_eggs.de.tr b/mods/ITEMS/mcl_monster_eggs/locale/mcl_monster_eggs.de.tr new file mode 100644 index 000000000..61145497a --- /dev/null +++ b/mods/ITEMS/mcl_monster_eggs/locale/mcl_monster_eggs.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_monster_eggs +An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart.=Ein verseuchter Block ist ein Block, aus dem ein Silberfischchen hinausfallen wird, wenn er zerbrochen wird. Er sieht identisch zu seinem normalen Pendant aus. +Infested Stone=Verseuchter Stein +Infested Cobblestone=Verseuchtes Kopfsteinpflaster +Infested Stone Bricks=Verseuchte Steinziegel +Infested Cracked Stone Bricks=Verseuchte rissige Steinziegel +Infested Mossy Stone Bricks=Verseuchte moosige Steinziegel +Infested Chiseled Stone Bricks=Verseuchte gemeißelte Steinziegel diff --git a/mods/ITEMS/mcl_monster_eggs/locale/template.txt b/mods/ITEMS/mcl_monster_eggs/locale/template.txt new file mode 100644 index 000000000..ce40fa8b1 --- /dev/null +++ b/mods/ITEMS/mcl_monster_eggs/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mcl_monster_eggs +An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart.= +Infested Stone= +Infested Cobblestone= +Infested Stone Bricks= +Infested Cracked Stone Bricks= +Infested Mossy Stone Bricks= +Infested Chiseled Stone Bricks= diff --git a/mods/ITEMS/mcl_mushrooms/huge.lua b/mods/ITEMS/mcl_mushrooms/huge.lua index a334a6387..54e719a5d 100644 --- a/mods/ITEMS/mcl_mushrooms/huge.lua +++ b/mods/ITEMS/mcl_mushrooms/huge.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_mushrooms") + local template = { groups = {handy=1,axey=1, building_block = 1, material_wood = 1 }, sounds = mcl_sounds.node_sound_wood_defaults(), @@ -42,7 +44,7 @@ local register_mushroom = function(color, species_id, template, d_cap, d_stem, d -- Stem texture on all sides local stem_full = table.copy(template) stem_full.description = d_stem_all - stem_full._doc_items_longdesc = "This decorative block is like a huge mushroom stem, but with the stem texture on all sides." + stem_full._doc_items_longdesc = S("This decorative block is like a huge mushroom stem, but with the stem texture on all sides.") stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" } stem_full.groups.huge_mushroom = species_id stem_full.groups.huge_mushroom_stem = 2 @@ -67,7 +69,7 @@ local register_mushroom = function(color, species_id, template, d_cap, d_stem, d -- All-faces cap. This block is exposed to the player block.description = d_cap block._doc_items_longdesc = longdesc_cap - block._doc_items_uagehelp = "By placing huge mushroom blocks of the same species next to each other, the sides that touch each other will turn into pores permanently." + block._doc_items_usagehelp = S("By placing huge mushroom blocks of the same species next to each other, the sides that touch each other will turn into pores permanently.") block.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png" } block.on_construct = function(pos) @@ -155,14 +157,14 @@ local register_mushroom = function(color, species_id, template, d_cap, d_stem, d end -local longdesc_red = "Huge red mushroom blocks are the cap parts of huge red mushrooms. It consists of a red skin and can have pores on each of its sides." -local longdesc_red_stem = "The stem part of a huge red mushroom." -register_mushroom("red", 1, red, "Huge Red Mushroom Block", "Huge Red Mushroom Stem", "Huge Red Mushroom All-Faces Stem", longdesc_red, longdesc_red_stem) +local longdesc_red = S("Huge red mushroom blocks are the cap parts of huge red mushrooms. It consists of a red skin and can have pores on each of its sides.") +local longdesc_red_stem = S("The stem part of a huge red mushroom.") +register_mushroom("red", 1, red, S("Huge Red Mushroom Block"), S("Huge Red Mushroom Stem"), S("Huge Red Mushroom All-Faces Stem"), longdesc_red, longdesc_red_stem) -local longdesc_brown = "Huge brown mushroom blocks are the cap parts of huge brown mushrooms. It consists of a brown skin and can have pores on each of its sides." -local longdesc_brown_stem = "The stem part of a huge brown mushroom." -register_mushroom("brown", 2, brown, "Huge Brown Mushroom Block", "Huge Brown Mushroom Stem", "Huge Brown Mushroom All-Faces Stem", longdesc_brown, longdesc_brown_stem) +local longdesc_brown = S("Huge brown mushroom blocks are the cap parts of huge brown mushrooms. It consists of a brown skin and can have pores on each of its sides.") +local longdesc_brown_stem = S("The stem part of a huge brown mushroom.") +register_mushroom("brown", 2, brown, S("Huge Brown Mushroom Block"), S("Huge Brown Mushroom Stem"), S("Huge Brown Mushroom All-Faces Stem"), longdesc_brown, longdesc_brown_stem) minetest.register_craft({ type = "fuel", diff --git a/mods/ITEMS/mcl_mushrooms/locale/mcl_mushrooms.de.tr b/mods/ITEMS/mcl_mushrooms/locale/mcl_mushrooms.de.tr new file mode 100644 index 000000000..8402e280a --- /dev/null +++ b/mods/ITEMS/mcl_mushrooms/locale/mcl_mushrooms.de.tr @@ -0,0 +1,22 @@ +# textdomain: mcl_mushrooms +This decorative block is like a huge mushroom stem, but with the stem texture on all sides.=Dieser dekorative Block ist wie ein Riesenpilzstängel, aber mit der Stängeltextur auf allen Seiten. +Huge red mushroom blocks are the cap parts of huge red mushrooms. It consists of a red skin and can have pores on each of its sides.=Rote Riesenpilzblöcke sind die Kappenteile von roten Riesenpilzen. Sie bestehen aus einer roten Haut und können Poren an jede ihrer Seiten haben. +The stem part of a huge red mushroom.=Der Stängelteil eines roten Riesenpilzes. +Huge Red Mushroom Block=Roter Riesenpilzblock +Huge Red Mushroom Stem=Roter Riesenpilzstängel +Huge Red Mushroom All-Faces Stem=Roter allseitiger Riesenpilzstängel +Huge brown mushroom blocks are the cap parts of huge brown mushrooms. It consists of a brown skin and can have pores on each of its sides.=Braune Riesenpilzblöcke sind die Kappenteile von braunen Riesenpilzen. Sie bestehen aus einer braunen Haut und können Poren an jede ihrer Seiten haben. +The stem part of a huge brown mushroom.=Der Stängelteil eines braunen Riesenpilzes. +Huge Brown Mushroom Block=Brauner Riesenpilzblock +Huge Brown Mushroom Stem=Brauner Riesenpilzstängel +Huge Brown Mushroom All-Faces Stem=Brauner allseitiger Riesenpilzstängel +Brown mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.=Braune Pilze wachsen und breiten sich in der Dunkelheit aus, aber sie sind lichtempfindlich. Als solche sind sie ungenießbar, aber sie können benutzt werden, um Lebensmittel herzustellen. +Red mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.=Rote Pilze wachsen und breiten sich in der Dunkelheit aus, aber sie sind lichtempfindlich. Als solche sind sie ungenießbar, aber sie können benutzt werden, um Lebensmittel herzustellen. +A single mushroom of this species will slowly spread over time towards a random solid opaque block with a light level of 12 or lower in a 3×3×3 cube around the mushroom. It stops spreading when there are 5 or more mushrooms of the same species within an area of 9×3×9 blocks around the mushroom.=Ein einzelner Pilz dieser Art wird sich im Laufe der Zeit zu einem zufälligen festem undurchsichtigem Block mit einer Lichtstärke von 12 oder weniger in einem 3×3×3-Würfel um den Pilz hin ausbreiten. Er wird sich nicht weiter ausbreiten, wenn sich 5 oder mehr Pilze der gleichen Art innerhalb eines Bereichs von 9×3×9 Blöcken um den Pilz befinden. +Mushrooms will eventually uproot at a light level of 12 or higher. On mycelium or podzol, they survive and spread at any light level.=Pilze werden sich bei einer Lichtstärke von mindestens 12 irgendwann selbst entwurzeln. Auf Myzel oder Podsol überleben sie und breiten sich bei jeder Lichtstärke aus. +This mushroom can be placed on mycelium and podzol at any light level. It can also be placed on blocks which are both solid and opaque, as long as the light level at daytime is not higher than 12.=Diser Pilz kann auf Myzel und Podsol in jeder Lichtstärke platziert werden. Er kann auch auf Blöcken platziert werden, die sowohl fest als auch undurchsichtig sind, solange die Lichtstärke des Tageslichts nicht höher als 12 ist. +Brown Mushroom=Brauner Pilz +Red Mushroom=Roter Pilz +Mushroom Stew=Pilzsuppe +Mushroom stew is a healthy soup which can be consumed to restore some hunger points.=Pilzsuppe ist eine gesunde Suppe, die für ein paar Hungerpunkte konsumiert werden kann. +By placing huge mushroom blocks of the same species next to each other, the sides that touch each other will turn into pores permanently.=Wenn Riesenpilzblöcke der selben Art nebeneinander platziert werden, werden sich die Seiten, die sich berühren, dauerhaft zu Poren verwandeln. diff --git a/mods/ITEMS/mcl_mushrooms/locale/template.txt b/mods/ITEMS/mcl_mushrooms/locale/template.txt new file mode 100644 index 000000000..cbd1f600a --- /dev/null +++ b/mods/ITEMS/mcl_mushrooms/locale/template.txt @@ -0,0 +1,22 @@ +# textdomain: mcl_mushrooms +This decorative block is like a huge mushroom stem, but with the stem texture on all sides.= +Huge red mushroom blocks are the cap parts of huge red mushrooms. It consists of a red skin and can have pores on each of its sides.= +The stem part of a huge red mushroom.= +Huge Red Mushroom Block= +Huge Red Mushroom Stem= +Huge Red Mushroom All-Faces Stem= +Huge brown mushroom blocks are the cap parts of huge brown mushrooms. It consists of a brown skin and can have pores on each of its sides.= +The stem part of a huge brown mushroom.= +Huge Brown Mushroom Block= +Huge Brown Mushroom Stem= +Huge Brown Mushroom All-Faces Stem= +Brown mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.= +Red mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.= +A single mushroom of this species will slowly spread over time towards a random solid opaque block with a light level of 12 or lower in a 3×3×3 cube around the mushroom. It stops spreading when there are 5 or more mushrooms of the same species within an area of 9×3×9 blocks around the mushroom.= +Mushrooms will eventually uproot at a light level of 12 or higher. On mycelium or podzol, they survive and spread at any light level.= +This mushroom can be placed on mycelium and podzol at any light level. It can also be placed on blocks which are both solid and opaque, as long as the light level at daytime is not higher than 12.= +Brown Mushroom= +Red Mushroom= +Mushroom Stew= +Mushroom stew is a healthy soup which can be consumed to restore some hunger points.= +By placing huge mushroom blocks of the same species next to each other, the sides that touch each other will turn into pores permanently.= diff --git a/mods/ITEMS/mcl_mushrooms/small.lua b/mods/ITEMS/mcl_mushrooms/small.lua index b12e925bf..75bdeeecf 100644 --- a/mods/ITEMS/mcl_mushrooms/small.lua +++ b/mods/ITEMS/mcl_mushrooms/small.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_mushrooms") + local on_place = mcl_util.generate_on_place_plant_function(function(place_pos, place_node) local soil_node = minetest.get_node_or_nil({x=place_pos.x, y=place_pos.y-1, z=place_pos.z}) if not soil_node then return false end @@ -15,16 +17,16 @@ local on_place = mcl_util.generate_on_place_plant_function(function(place_pos, p return ((snn == "mcl_core:podzol" or snn == "mcl_core:podzol_snow" or snn == "mcl_core:mycelium" or snn == "mcl_core:mycelium_snow") or (light_ok and minetest.get_item_group(snn, "solid") == 1 and minetest.get_item_group(snn, "opaque") == 1)) end) -local longdesc_intro_brown = [[Brown mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.]] -local longdesc_intro_red = [[Red mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.]] +local longdesc_intro_brown = S("Brown mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.") +local longdesc_intro_red = S("Red mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.") -local longdesc_append = [[A single mushroom of this species will slowly spread over time towards a random solid opaque block with a light level of 12 or lower in a 3×3×3 cube around the mushroom. It stops spreading when there are 5 or more mushrooms of the same species within an area of 9×3×9 blocks around the mushroom. -Mushrooms will eventually uproot at a light level of 12 or higher. On mycelium or podzol, they survive and spread at any light level.]] +local longdesc_append = S("A single mushroom of this species will slowly spread over time towards a random solid opaque block with a light level of 12 or lower in a 3×3×3 cube around the mushroom. It stops spreading when there are 5 or more mushrooms of the same species within an area of 9×3×9 blocks around the mushroom.").."\n".. +S("Mushrooms will eventually uproot at a light level of 12 or higher. On mycelium or podzol, they survive and spread at any light level.") -local usagehelp = "This mushroom can be placed on mycelium and podzol at any light level. They can also be placed on blocks which are both solid and opaque, as long as the light level at daytime is not higher than 12." +local usagehelp = S("This mushroom can be placed on mycelium and podzol at any light level. It can also be placed on blocks which are both solid and opaque, as long as the light level at daytime is not higher than 12.") minetest.register_node("mcl_mushrooms:mushroom_brown", { - description = "Brown Mushroom", + description = S("Brown Mushroom"), _doc_items_longdesc = longdesc_intro_brown .. "\n\n" .. longdesc_append, _doc_items_usagehelp = usagehelp, drawtype = "plantlike", @@ -47,7 +49,7 @@ minetest.register_node("mcl_mushrooms:mushroom_brown", { }) minetest.register_node("mcl_mushrooms:mushroom_red", { - description = "Red Mushroom", + description = S("Red Mushroom"), _doc_items_longdesc = longdesc_intro_red .. "\n\n" .. longdesc_append, _doc_items_usagehelp = usagehelp, drawtype = "plantlike", @@ -69,8 +71,8 @@ minetest.register_node("mcl_mushrooms:mushroom_red", { }) minetest.register_craftitem("mcl_mushrooms:mushroom_stew", { - description = "Mushroom Stew", - _doc_items_longdesc = "Mushroom stew is a healthy soup which can be consumed to restore some hunger points.", + description = S("Mushroom Stew"), + _doc_items_longdesc = S("Mushroom stew is a healthy soup which can be consumed to restore some hunger points."), inventory_image = "farming_mushroom_stew.png", on_place = minetest.item_eat(6, "mcl_core:bowl"), on_secondary_use = minetest.item_eat(6, "mcl_core:bowl"), diff --git a/mods/ITEMS/mcl_nether/depends.txt b/mods/ITEMS/mcl_nether/depends.txt index 23488aae0..273e76e1d 100644 --- a/mods/ITEMS/mcl_nether/depends.txt +++ b/mods/ITEMS/mcl_nether/depends.txt @@ -2,6 +2,6 @@ mcl_core mcl_sounds mcl_util walkover -mcl_death_messages +mcl_death_messages? doc_items doc? diff --git a/mods/ITEMS/mcl_nether/init.lua b/mods/ITEMS/mcl_nether/init.lua index 4fc36a8b4..116fe789c 100644 --- a/mods/ITEMS/mcl_nether/init.lua +++ b/mods/ITEMS/mcl_nether/init.lua @@ -1,6 +1,10 @@ +local S = minetest.get_translator("mcl_nether") + +local mod_death_messages = minetest.get_modpath("mcl_death_messages") + minetest.register_node("mcl_nether:glowstone", { - description = "Glowstone", - _doc_items_longdesc = "Glowstone is a naturally-glowing block which is home to the Nether.", + description = S("Glowstone"), + _doc_items_longdesc = S("Glowstone is a naturally-glowing block which is home to the Nether."), tiles = {"mcl_nether_glowstone.png"}, is_ground_content = true, stack_max = 64, @@ -22,8 +26,8 @@ minetest.register_node("mcl_nether:glowstone", { }) minetest.register_node("mcl_nether:quartz_ore", { - description = "Nether Quartz Ore", - _doc_items_longdesc = "Nether quartz ore is an ore containing nether quartz. It is commonly found around netherrack in the Nether.", + description = S("Nether Quartz Ore"), + _doc_items_longdesc = S("Nether quartz ore is an ore containing nether quartz. It is commonly found around netherrack in the Nether."), stack_max = 64, tiles = {"mcl_nether_quartz_ore.png"}, is_ground_content = true, @@ -60,8 +64,8 @@ local eternal_on_ignite = function(player, pointed_thing) end minetest.register_node("mcl_nether:netherrack", { - description = "Netherrack", - _doc_items_longdesc = "Netherrack is a stone-like block home to the Nether. Starting a fire on this block will create an eternal fire.", + description = S("Netherrack"), + _doc_items_longdesc = S("Netherrack is a stone-like block home to the Nether. Starting a fire on this block will create an eternal fire."), stack_max = 64, tiles = {"mcl_nether_netherrack.png"}, is_ground_content = true, @@ -76,8 +80,8 @@ minetest.register_node("mcl_nether:netherrack", { }) minetest.register_node("mcl_nether:magma", { - description = "Magma Block", - _doc_items_longdesc = "Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire.", + description = S("Magma Block"), + _doc_items_longdesc = S("Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire."), stack_max = 64, tiles = {{name="mcl_nether_magma.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.5}}}, is_ground_content = true, @@ -89,7 +93,9 @@ minetest.register_node("mcl_nether:magma", { on_walk_over = function(loc, nodeiamon, player) -- Hurt players standing on top of this block if player:get_hp() > 0 then - mcl_death_messages.player_damage(player, string.format("%s stood too long on a magma block.", player:get_player_name())) + if mod_death_messages then + mcl_death_messages.player_damage(player, S("@1 stood too long on a magma block.", player:get_player_name())) + end player:set_hp(player:get_hp() - 1) end end, @@ -102,8 +108,8 @@ minetest.register_node("mcl_nether:magma", { }) minetest.register_node("mcl_nether:soul_sand", { - description = "Soul Sand", - _doc_items_longdesc = "Soul sand is a block from the Nether. One can only slowly walk on soul sand. The slowing effect is amplified when the soul sand is on top of ice, packed ice or a slime block.", + description = S("Soul Sand"), + _doc_items_longdesc = S("Soul sand is a block from the Nether. One can only slowly walk on soul sand. The slowing effect is amplified when the soul sand is on top of ice, packed ice or a slime block."), stack_max = 64, tiles = {"mcl_nether_soul_sand.png"}, is_ground_content = true, @@ -120,7 +126,7 @@ minetest.register_node("mcl_nether:soul_sand", { minetest.register_node("mcl_nether:nether_brick", { -- Original name: Nether Brick - description = "Nether Brick Block", + description = S("Nether Brick Block"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, tiles = {"mcl_nether_nether_brick.png"}, @@ -133,7 +139,7 @@ minetest.register_node("mcl_nether:nether_brick", { minetest.register_node("mcl_nether:red_nether_brick", { -- Original name: Red Nether Brick - description = "Red Nether Brick Block", + description = S("Red Nether Brick Block"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, tiles = {"mcl_nether_red_nether_brick.png"}, @@ -146,8 +152,8 @@ minetest.register_node("mcl_nether:red_nether_brick", { minetest.register_node("mcl_nether:nether_wart_block", { - description = "Nether Wart Block", - _doc_items_longdesc = "A nether wart block is a purely decorational block made from nether wart.", + description = S("Nether Wart Block"), + _doc_items_longdesc = S("A nether wart block is a purely decorative block made from nether wart."), stack_max = 64, tiles = {"mcl_nether_nether_wart_block.png"}, is_ground_content = false, @@ -163,7 +169,7 @@ minetest.register_node("mcl_nether:nether_wart_block", { }) minetest.register_node("mcl_nether:quartz_block", { - description = "Block of Quartz", + description = S("Block of Quartz"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, is_ground_content = false, @@ -175,7 +181,7 @@ minetest.register_node("mcl_nether:quartz_block", { }) minetest.register_node("mcl_nether:quartz_chiseled", { - description = "Chiseled Quartz Block", + description = S("Chiseled Quartz Block"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, is_ground_content = false, @@ -187,7 +193,7 @@ minetest.register_node("mcl_nether:quartz_chiseled", { }) minetest.register_node("mcl_nether:quartz_pillar", { - description = "Pillar Quartz Block", + description = S("Pillar Quartz Block"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, paramtype2 = "facedir", @@ -200,7 +206,7 @@ minetest.register_node("mcl_nether:quartz_pillar", { _mcl_hardness = 0.8, }) minetest.register_node("mcl_nether:quartz_smooth", { - description = "Smooth Quartz", + description = S("Smooth Quartz"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, is_ground_content = false, @@ -212,24 +218,24 @@ minetest.register_node("mcl_nether:quartz_smooth", { }) minetest.register_craftitem("mcl_nether:glowstone_dust", { - description = "Glowstone Dust", - _doc_items_longdesc = "Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting.", + description = S("Glowstone Dust"), + _doc_items_longdesc = S("Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting."), inventory_image = "mcl_nether_glowstone_dust.png", stack_max = 64, groups = { craftitem=1 }, }) minetest.register_craftitem("mcl_nether:quartz", { - description = "Nether Quartz", - _doc_items_longdesc = "Nether quartz is a versatile crafting ingredient.", + description = S("Nether Quartz"), + _doc_items_longdesc = S("Nether quartz is a versatile crafting ingredient."), inventory_image = "mcl_nether_quartz.png", stack_max = 64, groups = { craftitem = 1 }, }) minetest.register_craftitem("mcl_nether:netherbrick", { - description = "Nether Brick", - _doc_items_longdesc = "Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences.", + description = S("Nether Brick"), + _doc_items_longdesc = S("Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences."), inventory_image = "mcl_nether_netherbrick.png", stack_max = 64, groups = { craftitem = 1 }, diff --git a/mods/ITEMS/mcl_nether/lava.lua b/mods/ITEMS/mcl_nether/lava.lua index 35959d451..ba76b749e 100644 --- a/mods/ITEMS/mcl_nether/lava.lua +++ b/mods/ITEMS/mcl_nether/lava.lua @@ -1,11 +1,12 @@ -- Lava in the Nether +local S = minetest.get_translator("mcl_nether") -- TODO: Increase flow speed. This could be done by reducing viscosity, -- but this would also allow players to swim faster in lava. local lava_src_def = table.copy(minetest.registered_nodes["mcl_core:lava_source"]) -lava_src_def.description = "Nether Lava Source" +lava_src_def.description = S("Nether Lava Source") lava_src_def._doc_items_create_entry = false lava_src_def._doc_items_entry_name = nil lava_src_def._doc_items_longdesc = nil @@ -16,7 +17,7 @@ lava_src_def.liquid_alternative_flowing = "mcl_nether:nether_lava_flowing" minetest.register_node("mcl_nether:nether_lava_source", lava_src_def) local lava_flow_def = table.copy(minetest.registered_nodes["mcl_core:lava_flowing"]) -lava_flow_def.description = "Flowing Nether Lava" +lava_flow_def.description = S("Flowing Nether Lava") lava_flow_def._doc_items_create_entry = false lava_flow_def.liquid_range = 7 lava_flow_def.liquid_alternative_flowing = "mcl_nether:nether_lava_flowing" diff --git a/mods/ITEMS/mcl_nether/locale/mcl_nether.de.tr b/mods/ITEMS/mcl_nether/locale/mcl_nether.de.tr new file mode 100644 index 000000000..4ceafbd91 --- /dev/null +++ b/mods/ITEMS/mcl_nether/locale/mcl_nether.de.tr @@ -0,0 +1,37 @@ +# textdomain: mcl_nether +Glowstone=Leuchtstein +Glowstone is a naturally-glowing block which is home to the Nether.=Leuchtstein ist ein Block aus dem Nether. Er leuchtet von Natur aus hell. +Nether Quartz Ore=Nether-Quarzerz +Nether quartz ore is an ore containing nether quartz. It is commonly found around netherrack in the Nether.=Nether-Quarzerz ist ein Erz, das Nethererz enthält. Es wird oft zwischen Netherrack im Nether gefunden. +Netherrack=Netherrack +Netherrack is a stone-like block home to the Nether. Starting a fire on this block will create an eternal fire.=Netherrack ist ein gesteinsartiger Block aus dem Nether. Auf diesem Block wird ein Feuer immer ein ewiges Feuer sein. +Magma Block=Magmablock +Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire.=Magmablöcke sind heiße feste Blöcke, die jeden, der auf ihm steht, verletzen, es sei denn, sie sind gegen Feuer immun. Auf diesem Block wird ein Feuer immer ein ewiges Feuer sein. +Soul Sand=Seelensand +Soul sand is a block from the Nether. One can only slowly walk on soul sand. The slowing effect is amplified when the soul sand is on top of ice, packed ice or a slime block.=Seelensand ist ein Block aus dem Nether. Man kann auf ihm nur langsam gehen. Die Verlangsamung ist verstärkt, wenn sich der Seelensand auf Eis, Packeis oder einem Schleimblock befindet. +Nether Brick Block=Netherziegelblock +Red Nether Brick Block=Roter Netherziegelblock +Nether Wart Block=Netherwurzblock +A nether wart block is a purely decorative block made from nether wart.=Ein Netherwurzblock ist ein rein dekorativer Block aus Netherwurz. +Block of Quartz=Quarzblock +Chiseled Quartz Block=Gemeißelter Quarzblock +Pillar Quartz Block=Quarzsäulenblock +Smooth Quartz=Glatter Quarz +Glowstone Dust=Leuchtsteinstaub +Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting.=Leuchtsteinstaub ist das Staub aus zerbrochenen Leuchtsteinen. +Nether Quartz=Netherquarz +Nether quartz is a versatile crafting ingredient.=Netherquarz ist eine vielseitige Fertigungskomponente. +Nether Brick=Netherziegel +Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences.=Netherziegel werden hauptsächlich zur Fertigung von Netherziegelblöcken und Netherzäunen benutzt. +Nether Lava Source=Netherlavaquelle +Flowing Nether Lava=Fließende Netherlava +@1 stood too long on a magma block.=@1 stand zu lange auf einem Magmablock. +Premature Nether Wart (Stage 1)=Junger Netherwurz (1. Stufe) +A premature nether wart has just recently been planted on soul sand. Nether wart slowly grows on soul sand in 4 stages (the second and third stages look identical). Although nether wart is home to the Nether, it grows in any dimension.=Ein junger Netherwurz wurde erst kürzlich auf Seelensand gepflanzt. Netherwurz wächst langsam auf Seelensand in 4 Stufen (die 2. und 3. Stufe sehen identisch aus). Obwohl Netherwurz im Nether beheimatet ist, wächst er in jeder Dimension. +Premature Nether Wart (Stage 2)=Junger Netherwurz (2. Stufe) +Premature Nether Wart (Stage 3)=Junger Netherwurz (3. Stufe) +Mature Nether Wart=Ausgewachsener Netherwurz +The mature nether wart is a plant from the Nether and reached its full size and won't grow any further. It is ready to be harvested for its items.=Der ausgewachsene Netherwurz ist eine Pflanze aus dem Nether. Er hat seine volle Größe erreicht, ist erntereif und wächst nicht weiter. +Nether Wart=Netherwurz +Nether warts are plants home to the Nether. They can be planted on soul sand and grow in 4 stages.=Netherwurze sind Pflanzen, die im Nether beheimatet sind. Sie können auf Seelensand gepflanzt werden und wachsen in 4 Stufen. +Place this item on soul sand to plant it and watch it grow.=Platzieren Sie den Gegenstand auf Seelensand, um ihn zu pflanzen und sehen Sie dabei zu, wie es wächst. diff --git a/mods/ITEMS/mcl_nether/locale/template.txt b/mods/ITEMS/mcl_nether/locale/template.txt new file mode 100644 index 000000000..cb0ba600a --- /dev/null +++ b/mods/ITEMS/mcl_nether/locale/template.txt @@ -0,0 +1,37 @@ +# textdomain: mcl_nether +Glowstone= +Glowstone is a naturally-glowing block which is home to the Nether.= +Nether Quartz Ore= +Nether quartz ore is an ore containing nether quartz. It is commonly found around netherrack in the Nether.= +Netherrack= +Netherrack is a stone-like block home to the Nether. Starting a fire on this block will create an eternal fire.= +Magma Block= +Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire.= +@1 stood too long on a magma block.= +Soul Sand= +Soul sand is a block from the Nether. One can only slowly walk on soul sand. The slowing effect is amplified when the soul sand is on top of ice, packed ice or a slime block.= +Nether Brick Block= +Red Nether Brick Block= +Nether Wart Block= +A nether wart block is a purely decorative block made from nether wart.= +Block of Quartz= +Chiseled Quartz Block= +Pillar Quartz Block= +Smooth Quartz= +Glowstone Dust= +Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting.= +Nether Quartz= +Nether quartz is a versatile crafting ingredient.= +Nether Brick= +Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences.= +Nether Lava Source= +Flowing Nether Lava= +Premature Nether Wart (Stage 1)= +A premature nether wart has just recently been planted on soul sand. Nether wart slowly grows on soul sand in 4 stages (the second and third stages look identical). Although nether wart is home to the Nether, it grows in any dimension.= +Premature Nether Wart (Stage 2)= +Premature Nether Wart (Stage 3)= +Mature Nether Wart= +The mature nether wart is a plant from the Nether and reached its full size and won't grow any further. It is ready to be harvested for its items.= +Nether Wart= +Nether warts are plants home to the Nether. They can be planted on soul sand and grow in 4 stages.= +Place this item on soul sand to plant it and watch it grow.= diff --git a/mods/ITEMS/mcl_nether/nether_wart.lua b/mods/ITEMS/mcl_nether/nether_wart.lua index fbe6653a2..7b01e4621 100644 --- a/mods/ITEMS/mcl_nether/nether_wart.lua +++ b/mods/ITEMS/mcl_nether/nether_wart.lua @@ -1,6 +1,8 @@ +local S = minetest.get_translator("mcl_nether") + minetest.register_node("mcl_nether:nether_wart_0", { - description = "Premature Nether Wart (Stage 1)", - _doc_items_longdesc = "A premature nether wart has just recently been planted on soul sand. Nether wart slowly grows on soul sand in 4 stages (the second and third stages look identical). Although nether wart is home to the Nether, it grows in any dimension.", + description = S("Premature Nether Wart (Stage 1)"), + _doc_items_longdesc = S("A premature nether wart has just recently been planted on soul sand. Nether wart slowly grows on soul sand in 4 stages (the second and third stages look identical). Although nether wart is home to the Nether, it grows in any dimension."), paramtype = "light", paramtype2 = "meshoptions", place_param2 = 3, @@ -21,7 +23,7 @@ minetest.register_node("mcl_nether:nether_wart_0", { }) minetest.register_node("mcl_nether:nether_wart_1", { - description = "Premature Nether Wart (Stage 2)", + description = S("Premature Nether Wart (Stage 2)"), _doc_items_create_entry = false, paramtype = "light", paramtype2 = "meshoptions", @@ -43,7 +45,7 @@ minetest.register_node("mcl_nether:nether_wart_1", { }) minetest.register_node("mcl_nether:nether_wart_2", { - description = "Premature Nether Wart (Stage 3)", + description = S("Premature Nether Wart (Stage 3)"), _doc_items_create_entry = false, paramtype = "light", paramtype2 = "meshoptions", @@ -65,8 +67,8 @@ minetest.register_node("mcl_nether:nether_wart_2", { }) minetest.register_node("mcl_nether:nether_wart", { - description = "Mature Nether Wart", - _doc_items_longdesc = "The mature nether wart is a plant from the Nether and reached its full size and won't grow any further. It is ready to be harvested for its items.", + description = S("Mature Nether Wart"), + _doc_items_longdesc = S("The mature nether wart is a plant from the Nether and reached its full size and won't grow any further. It is ready to be harvested for its items."), paramtype = "light", paramtype2 = "meshoptions", place_param2 = 3, @@ -94,9 +96,9 @@ minetest.register_node("mcl_nether:nether_wart", { }) minetest.register_craftitem("mcl_nether:nether_wart_item", { - description = "Nether Wart", - _doc_items_longdesc = "Nether warts are plants home to the Nether. They can be planted on soul sand and grow in 3 stages.", - _doc_items_usagehelp = "Place this item on soul sand to plant it and watch it grow.", + description = S("Nether Wart"), + _doc_items_longdesc = S("Nether warts are plants home to the Nether. They can be planted on soul sand and grow in 4 stages."), + _doc_items_usagehelp = S("Place this item on soul sand to plant it and watch it grow."), inventory_image = "mcl_nether_nether_wart.png", wield_image = "mcl_nether_nether_wart.png", on_place = function(itemstack, placer, pointed_thing) diff --git a/mods/ITEMS/mcl_ocean/init.lua b/mods/ITEMS/mcl_ocean/init.lua index 82b8126a4..b84bbeac6 100644 --- a/mods/ITEMS/mcl_ocean/init.lua +++ b/mods/ITEMS/mcl_ocean/init.lua @@ -1,8 +1,10 @@ -- Nodes +local S = minetest.get_translator("mcl_ocean") + minetest.register_node("mcl_ocean:sea_lantern", { - description = "Sea Lantern", - _doc_items_longdesc = "Sea lanterns are decorative light sources which look great underwater but can be placed anywhere.", + description = S("Sea Lantern"), + _doc_items_longdesc = S("Sea lanterns are decorative light sources which look great underwater but can be placed anywhere."), paramtype2 = "facedir", is_ground_content = false, stack_max = 64, @@ -23,8 +25,8 @@ minetest.register_node("mcl_ocean:sea_lantern", { }) minetest.register_node("mcl_ocean:prismarine", { - description = "Prismarine", - _doc_items_longdesc = "Prismarine is used as a building block. It slowly changes its color.", + description = S("Prismarine"), + _doc_items_longdesc = S("Prismarine is used as a building block. It slowly changes its color."), stack_max = 64, is_ground_content = false, -- Texture should have 22 frames for smooth transitions. @@ -36,7 +38,7 @@ minetest.register_node("mcl_ocean:prismarine", { }) minetest.register_node("mcl_ocean:prismarine_brick", { - description = "Prismarine Bricks", + description = S("Prismarine Bricks"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, is_ground_content = false, @@ -48,7 +50,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", { }) minetest.register_node("mcl_ocean:prismarine_dark", { - description = "Dark Prismarine", + description = S("Dark Prismarine"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, is_ground_content = false, @@ -62,7 +64,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", { -- Craftitems minetest.register_craftitem("mcl_ocean:prismarine_crystals", { - description = "Prismarine Crystals", + description = S("Prismarine Crystals"), _doc_items_longdesc = doc.sub.items.temp.craftitem, inventory_image = "mcl_ocean_prismarine_crystals.png", stack_max = 64, @@ -70,7 +72,7 @@ minetest.register_craftitem("mcl_ocean:prismarine_crystals", { }) minetest.register_craftitem("mcl_ocean:prismarine_shard", { - description = "Prismarine Shard", + description = S("Prismarine Shard"), _doc_items_longdesc = doc.sub.items.temp.craftitem, inventory_image = "mcl_ocean_prismarine_shard.png", stack_max = 64, diff --git a/mods/ITEMS/mcl_ocean/locale/mcl_ocean.de.tr b/mods/ITEMS/mcl_ocean/locale/mcl_ocean.de.tr new file mode 100644 index 000000000..02cdd777e --- /dev/null +++ b/mods/ITEMS/mcl_ocean/locale/mcl_ocean.de.tr @@ -0,0 +1,9 @@ +# textdomain: mcl_ocean +Sea Lantern=Seelaterne +Sea lanterns are decorative light sources which look great underwater but can be placed anywhere.=Seelaternen sind dekorative Lichtquellen, die im Wasser schick aussehen, aber sie können überall platziert werden. +Prismarine=Prismarin +Prismarine is used as a building block. It slowly changes its color.=Prismarin wird aus Baumaterial benutzt. Er verändert langsam seine Farbe. +Prismarine Bricks=Prismarinziegel +Dark Prismarine=Dunkelprismarin +Prismarine Crystals=Prismarinkristalle +Prismarine Shard=Prismarinsplitter diff --git a/mods/ITEMS/mcl_ocean/locale/template.txt b/mods/ITEMS/mcl_ocean/locale/template.txt new file mode 100644 index 000000000..943e7daef --- /dev/null +++ b/mods/ITEMS/mcl_ocean/locale/template.txt @@ -0,0 +1,9 @@ +# textdomain: mcl_ocean +Sea Lantern= +Sea lanterns are decorative light sources which look great underwater but can be placed anywhere.= +Prismarine= +Prismarine is used as a building block. It slowly changes its color.= +Prismarine Bricks= +Dark Prismarine= +Prismarine Crystals= +Prismarine Shard= diff --git a/mods/ITEMS/mcl_portals/locale/mcl_portals.de.tr b/mods/ITEMS/mcl_portals/locale/mcl_portals.de.tr new file mode 100644 index 000000000..55150a961 --- /dev/null +++ b/mods/ITEMS/mcl_portals/locale/mcl_portals.de.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_portals +End Portal=Endportal +An End portal teleports creatures and objects to the mysterious End dimension (and back!).=Ein Endportal teleportiert Kreaturen und Objekte zur mysteriösen Ende-Dimension (und wieder zurück!). +Hop into the portal to teleport. Entering an End portal in the Overworld teleports you to a fixed position in the End dimension and creates a 5×5 obsidian platform at your destination. End portals in the End will lead back to your spawn point in the Overworld.=Springen Sie ins Portal, um sich zu teleportieren. Von der Oberwelt aus werden Sie zu einer festen Position im Ende hin teleportiert. Eine 5×5-Obsidianplattform wird am Zielort erzeugt. Im Ende werden Sie zurück zu Ihrem Startpunkt in der Oberwelt teleportiert. +End Portal Frame=Endportalrahmen +End portal frames are used in the construction of End portals. Each block has a socket for an eye of ender.=Endportalrahmen werden in der Konstruktion von Endportalen benutzt. Jeder Block hat einen Sockel für ein Enderauge. +NOTE: The End dimension is currently incomplete and might change in future versions.=ANMERKUNG: Die Ende-Dimension ist momentan unfertig und könnte sich in künftigen Versionen ändern. +To create an End portal, you need 12 end portal frames and 12 eyes of ender. The end portal frames have to be arranged around a horizontal 3×3 area with each block facing inward. Any other arrangement will fail.=Um ein Endportal zu bauen, brauchen sie 12 Endportalrahmen und 12 Enderaugen. Die Endportalrahmenblöcke muss um ein horizontales Feld von 3×3 platziert sein, wobei jeder von ihnen nach innen zeigt. Jede andere Anordnung wird nicht funktionieren. +Place an eye of ender into each block. The end portal appears in the middle after placing the final eye.=Platzieren Sie ein Enderauge in jeden Block. Das Endportal wird sich in der Mitte öffnen, wenn das letzte Auge platziert wurde. +End Portal Frame with Eye of Ender=Endportalrahmen mit Enderauge +Nether Portal=Netherportal +A Nether portal teleports creatures and objects to the hot and dangerous Nether dimension (and back!). Enter at your own risk!=Ein Netherportal teleportiert Kreaturen und Objekte zur heißen und gefährlichen Nether-Dimension (und zurück!). Betreten auf eigene Gefahr! +Stand in the portal for a moment to activate the teleportation. Entering a Nether portal for the first time will also create a new portal in the other dimension. If a Nether portal has been built in the Nether, it will lead to the Overworld. A Nether portal is destroyed if the any of the obsidian which surrounds it is destroyed, or if it was caught in an explosion.=Stellen Sie sich ins Portal für einen Moment, um sich zu teleportieren. Beim ersten Mal wird auch ein Portal in der anderen Dimension erschaffen. Wenn ein Netherportal im Nether gebaut wird, wird es zurück zur Oberwelt führen. Ein Netherportal wird zerstört, wenn das Obsidian, das ihn umgibt, zerstört wird, oder, wenn es einer Explosion ausgesetzt war. +Obsidian is also used as the frame of Nether portals.=Obsidian wird auch als Rahmen von Netherportalen benutzt. +To open a Nether portal, place an upright frame of obsidian with a width of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, light a fire in the obsidian frame. Nether portals only work in the Overworld and the Nether.=Um ein Netherportal zu öffnen, platzieren Sie einen aufrechten Rahmen aus Obsidian mit einer Breite von 4 Blöcken und einer Höhe von 5 Blöcken, nur mit Luft in der Mitte. Nachdem Sie den Rahmen gebaut haben, entfachen Sie ein Feuer im Obsidianrahmen. Netherportale funktionieren nur in der Oberwelt und im Nether. +Once placed, an eye of ender can not be taken back.=Sobald platziert, kann ein Enderauge nicht mehr zurück genommen werden. diff --git a/mods/ITEMS/mcl_portals/locale/template.txt b/mods/ITEMS/mcl_portals/locale/template.txt new file mode 100644 index 000000000..02482652e --- /dev/null +++ b/mods/ITEMS/mcl_portals/locale/template.txt @@ -0,0 +1,14 @@ +# textdomain: mcl_portals +End Portal= +An End portal teleports creatures and objects to the mysterious End dimension (and back!).= +Hop into the portal to teleport. Entering an End portal in the Overworld teleports you to a fixed position in the End dimension and creates a 5×5 obsidian platform at your destination. End portals in the End will lead back to your spawn point in the Overworld.= +End Portal Frame= +End portal frames are used in the construction of End portals. Each block has a socket for an eye of ender.= +NOTE: The End dimension is currently incomplete and might change in future versions.= +End Portal Frame with Eye of Ender= +Nether Portal= +A Nether portal teleports creatures and objects to the hot and dangerous Nether dimension (and back!). Enter at your own risk!= +Stand in the portal for a moment to activate the teleportation. Entering a Nether portal for the first time will also create a new portal in the other dimension. If a Nether portal has been built in the Nether, it will lead to the Overworld. A Nether portal is destroyed if the any of the obsidian which surrounds it is destroyed, or if it was caught in an explosion.= +Obsidian is also used as the frame of Nether portals.= +To open a Nether portal, place an upright frame of obsidian with a width of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, light a fire in the obsidian frame. Nether portals only work in the Overworld and the Nether.= +Once placed, an eye of ender can not be taken back.= diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index bca803dc1..4b9a0bbb3 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_portals") + -- Parameters local SPAWN_MIN = mcl_vars.mg_end_min+70 local SPAWN_MAX = mcl_vars.mg_end_min+98 @@ -6,9 +8,9 @@ local mg_name = minetest.get_mapgen_setting("mg_name") -- End portal minetest.register_node("mcl_portals:portal_end", { - description = "End Portal", - _doc_items_longdesc = "An End portal teleports creatures and objects to the mysterious End dimension (and back!).", - _doc_items_usagehelp = "Hop into the portal to teleport. Entering an End portal in the Overworld teleports you to a fixed position in the End dimension and creates a 5×5 obsidian platform at your destination. End portals in the End will lead back to your spawn point in the Overworld.", + description = S("End Portal"), + _doc_items_longdesc = S("An End portal teleports creatures and objects to the mysterious End dimension (and back!)."), + _doc_items_usagehelp = S("Hop into the portal to teleport. Entering an End portal in the Overworld teleports you to a fixed position in the End dimension and creates a 5×5 obsidian platform at your destination. End portals in the End will lead back to your spawn point in the Overworld."), tiles = { { name = "mcl_portals_end_portal.png", @@ -207,17 +209,6 @@ minetest.register_abm({ interval = 1, chance = 1, action = function(pos, node) - -- Destroy legacy end portals created with quartz block frame - -- by turning them into cobwebs. - -- We can tell if a end portal is legacy if it has portal_target as metadata. - -- FIXME: Remove this after some time. - local meta = minetest.get_meta(pos) - local legacy_portal_target = meta:get_string("portal_frame1") - if legacy_portal_target and legacy_portal_target ~= "" then - minetest.set_node(pos, {name="mcl_core:cobweb"}) - return - end - for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do local lua_entity = obj:get_luaentity() --maikerumine added for objects to travel if obj:is_player() or lua_entity then @@ -237,9 +228,13 @@ minetest.register_abm({ local target if dim == "end" then -- End portal in the End: - -- Teleport back to the player's spawn in the Overworld. + -- Teleport back to the player's spawn or world spawn in the Overworld. - target = mcl_spawn.get_spawn_pos(obj) + if obj:is_player() then + target = mcl_spawn.get_spawn_pos(obj) + else + target = mcl_spawn.get_world_spawn_pos(obj) + end else -- End portal in any other dimension: -- Teleport to the End at a fixed position and generate a @@ -295,9 +290,9 @@ if minetest.get_modpath("screwdriver") then end minetest.register_node("mcl_portals:end_portal_frame", { - description = "End Portal Frame", - _doc_items_longdesc = "End portal frames are used in the construction of End portals. Each block has a socket for an eye of ender." .. "\n" .. "NOTE: The End dimension is currently incomplete and boring.", - _doc_items_usagehelp = "To create an End portal, you need 12 end portal frames and 12 eyes of ender. The end portal frames have to be arranged around a horizontal 3×3 area with each block facing inward. Any other arrangement will fail." .. "\n" .. "Place an eye of ender into each block. The end portal appears in the middle after placing the final eye." .. "\n" .. "Once placed, an eye of ender can not be taken back.", + description = S("End Portal Frame"), + _doc_items_longdesc = S("End portal frames are used in the construction of End portals. Each block has a socket for an eye of ender.") .. "\n" .. S("NOTE: The End dimension is currently incomplete and might change in future versions."), + _doc_items_usagehelp = S("To create an End portal, you need 12 end portal frames and 12 eyes of ender. The end portal frames have to be arranged around a horizontal 3×3 area with each block facing inward. Any other arrangement will fail.") .. "\n" .. S("Place an eye of ender into each block. The end portal appears in the middle after placing the final eye.") .. "\n" .. S("Once placed, an eye of ender can not be taken back."), groups = { creative_breakable = 1, deco_block = 1 }, tiles = { "mcl_portals_endframe_top.png", "mcl_portals_endframe_bottom.png", "mcl_portals_endframe_side.png" }, paramtype2 = "facedir", @@ -319,7 +314,7 @@ minetest.register_node("mcl_portals:end_portal_frame", { }) minetest.register_node("mcl_portals:end_portal_frame_eye", { - description = "End Portal Frame with Eye of Ender", + description = S("End Portal Frame with Eye of Ender"), _doc_items_create_entry = false, groups = { creative_breakable = 1, deco_block = 1, comparator_signal = 15 }, tiles = { "mcl_portals_endframe_top.png^[lowpart:75:mcl_portals_endframe_eye.png", "mcl_portals_endframe_bottom.png", "mcl_portals_endframe_eye.png^mcl_portals_endframe_side.png" }, diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index 64de52ba7..7d39c3954 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_portals") + -- Parameters local TCAVE = 0.6 @@ -77,9 +79,9 @@ local destroy_portal = function(pos) end minetest.register_node("mcl_portals:portal", { - description = "Nether Portal", - _doc_items_longdesc = "A Nether portal teleports creatures and objects to the hot and dangerous Nether dimension (and back!). Enter at your own risk!", - _doc_items_usagehelp = "Stand in the portal for a moment to activate the teleportation. Entering a Nether portal for the first time will also create a new portal in the other dimension. If a Nether portal has been built in the Nether, it will lead to the Overworld. A Nether portal is destroyed if the any of the obsidian which surrounds it is destroyed, or if it was caught in an explosion.", + description = S("Nether Portal"), + _doc_items_longdesc = S("A Nether portal teleports creatures and objects to the hot and dangerous Nether dimension (and back!). Enter at your own risk!"), + _doc_items_usagehelp = S("Stand in the portal for a moment to activate the teleportation. Entering a Nether portal for the first time will also create a new portal in the other dimension. If a Nether portal has been built in the Nether, it will lead to the Overworld. A Nether portal is destroyed if the any of the obsidian which surrounds it is destroyed, or if it was caught in an explosion."), tiles = { "blank.png", @@ -197,7 +199,7 @@ local function find_nether_target_y(target_x, target_z) local air = 4 for y = start_y, math.max(mcl_vars.mg_lava_nether_max + 1), -1 do - local nval_cave = nobj_cave:get3d({x = target_x, y = y, z = target_z}) + local nval_cave = nobj_cave:get_3d({x = target_x, y = y, z = target_z}) if nval_cave > TCAVE then -- Cavern air = air + 1 @@ -481,8 +483,8 @@ minetest.register_abm({ --[[ ITEM OVERRIDES ]] local longdesc = minetest.registered_nodes["mcl_core:obsidian"]._doc_items_longdesc -longdesc = longdesc .. "\n" .. "Obsidian is also used as the frame of Nether portals." -local usagehelp = "To open a Nether portal, place an upright frame of obsidian with a width of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, light a fire in the obsidian frame. Nether portals only work in the Overworld and the Nether." +longdesc = longdesc .. "\n" .. S("Obsidian is also used as the frame of Nether portals.") +local usagehelp = S("To open a Nether portal, place an upright frame of obsidian with a width of 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, light a fire in the obsidian frame. Nether portals only work in the Overworld and the Nether.") minetest.override_item("mcl_core:obsidian", { _doc_items_longdesc = longdesc, diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index ea859127b..0fc24d650 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -1,7 +1,9 @@ -local brewhelp = "Put this item in an item frame for decoration. It's useless otherwise." +local S = minetest.get_translator("mcl_potions") + +local brewhelp = S("Put this item in an item frame for decoration. It's useless otherwise.") minetest.register_craftitem("mcl_potions:fermented_spider_eye", { - description = "Fermented Spider Eye", + description = S("Fermented Spider Eye"), _doc_items_longdesc = brewhelp, wield_image = "mcl_potions_spider_eye_fermented.png", inventory_image = "mcl_potions_spider_eye_fermented.png", @@ -17,9 +19,9 @@ minetest.register_craft({ }) minetest.register_craftitem("mcl_potions:glass_bottle", { - description = "Glass Bottle", - _doc_items_longdesc = "A glass bottle is used as a container for liquids and can be used to collect water directly.", - _doc_items_usagehelp = "To collect water, it on a cauldron with water (which removes a level of water) or any water source (which removes no water).", + description = S("Glass Bottle"), + _doc_items_longdesc = S("A glass bottle is used as a container for liquids and can be used to collect water directly."), + _doc_items_usagehelp = S("To collect water, it on a cauldron with water (which removes a level of water) or any water source (which removes no water)."), inventory_image = "mcl_potions_potion_bottle_empty.png", wield_image = "mcl_potions_potion_bottle_empty.png", groups = {brewitem=1}, @@ -156,9 +158,9 @@ end -- Itemstring of potions is “mcl_potions:potion_” minetest.register_craftitem("mcl_potions:potion_water", { - description = "Water Bottle", - _doc_items_longdesc = "Water bottles can be used to fill cauldrons. Drinking water has no effect.", - _doc_items_usagehelp = "Rightclick to drink. Rightclick a cauldron to pour the water into the cauldron.", + description = S("Water Bottle"), + _doc_items_longdesc = S("Water bottles can be used to fill cauldrons. Drinking water has no effect."), + _doc_items_usagehelp = S("Use the “Place” key to drink. Place this item on a cauldron to pour the water into the cauldron."), stack_max = 1, inventory_image = potion_image("#0000FF"), wield_image = potion_image("#0000FF"), @@ -200,9 +202,10 @@ minetest.register_craftitem("mcl_potions:potion_water", { }) minetest.register_craftitem("mcl_potions:potion_river_water", { - description = "River Water Bottle", - _doc_items_longdesc = "River water bottles can be used to fill cauldrons. Drinking it has no effect.", - _doc_items_usagehelp = "Rightclick to drink. Rightclick a cauldron to pour the river water into the cauldron.", + description = S("River Water Bottle"), + _doc_items_longdesc = S("River water bottles can be used to fill cauldrons. Drinking it has no effect."), + _doc_items_usagehelp = S("Use the “Place” key to drink. Place this item on a cauldron to pour the river water into the cauldron."), + stack_max = 1, inventory_image = potion_image("#0044FF"), wield_image = potion_image("#0044FF"), @@ -245,11 +248,11 @@ minetest.register_craftitem("mcl_potions:potion_river_water", { -local how_to_drink = "To drink it, wield it, then rightclick." +local how_to_drink = S("Use the “Place” key to drink it.") minetest.register_craftitem("mcl_potions:potion_awkward", { - description = "Awkward Potion", - _doc_items_longdesc = "This potion has an awkward taste and is used for brewing more potions. Drinking it has no effect.", + description = S("Awkward Potion"), + _doc_items_longdesc = S("This potion has an awkward taste and is used for brewing more potions. Drinking it has no effect."), _doc_items_usagehelp = how_to_drink, stack_max = 1, inventory_image = potion_image("#0000FF"), @@ -260,8 +263,8 @@ minetest.register_craftitem("mcl_potions:potion_awkward", { on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), }) minetest.register_craftitem("mcl_potions:potion_mundane", { - description = "Mundane Potion", - _doc_items_longdesc = "This potion has a clean taste and is used for brewing more potions. Drinking it has no effect.", + description = S("Mundane Potion"), + _doc_items_longdesc = S("This potion has a clean taste and is used for brewing more potions. Drinking it has no effect."), _doc_items_usagehelp = how_to_drink, stack_max = 1, inventory_image = potion_image("#0000FF"), @@ -272,8 +275,8 @@ minetest.register_craftitem("mcl_potions:potion_mundane", { on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), }) minetest.register_craftitem("mcl_potions:potion_thick", { - description = "Thick Potion", - _doc_items_longdesc = "This potion has a bitter taste and is used for brewing more potions. Drinking it has no effect.", + description = S("Thick Potion"), + _doc_items_longdesc = S("This potion has a bitter taste and is used for brewing more potions. Drinking it has no effect."), _doc_items_usagehelp = how_to_drink, stack_max = 1, inventory_image = potion_image("#0000FF"), @@ -285,8 +288,8 @@ minetest.register_craftitem("mcl_potions:potion_thick", { }) minetest.register_craftitem("mcl_potions:speckled_melon", { - description = "Glistering Melon", - _doc_items_longdesc = "This shiny melon is full of tiny gold nuggets and would be nice in an item frame. It isn't edible and not useful for anything else.", + description = S("Glistering Melon"), + _doc_items_longdesc = S("This shiny melon is full of tiny gold nuggets and would be nice in an item frame. It isn't edible and not useful for anything else."), stack_max = 64, -- TODO: Reveal item when it's actually useful groups = { brewitem = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1 }, @@ -303,7 +306,7 @@ minetest.register_craft({ }) minetest.register_craftitem("mcl_potions:dragon_breath", { - description = "Dragon's Breath", + description = S("Dragon's Breath"), _doc_items_longdesc = brewhelp, wield_image = "mcl_potions_dragon_breath.png", inventory_image = "mcl_potions_dragon_breath.png", diff --git a/mods/ITEMS/mcl_potions/locale/mcl_potions.de.tr b/mods/ITEMS/mcl_potions/locale/mcl_potions.de.tr new file mode 100644 index 000000000..87db24a03 --- /dev/null +++ b/mods/ITEMS/mcl_potions/locale/mcl_potions.de.tr @@ -0,0 +1,23 @@ +# textdomain: mcl_potions +Put this item in an item frame for decoration. It's useless otherwise.=Platizeren Sie diesen Gegenstand in einen Rahmen als Deko. Ansonsten ist er nutzlos. +Fermented Spider Eye=Fermentiertes Spinnenauge +Glass Bottle=Glasflasche +A glass bottle is used as a container for liquids and can be used to collect water directly.=Eine Glasflasche wird als Behälter von Flüssigkeiten benutzt und kann Wasser direkt aufsammeln. +To collect water, it on a cauldron with water (which removes a level of water) or any water source (which removes no water).=Um Wasser aufzusammen, benutzen Sie sie an einem Kessel mit Wasser (was etwas Wasser entfernt) oder einer Wasserquelle (was kein Wasser entfernt). +Water Bottle=Wasserflasche +Water bottles can be used to fill cauldrons. Drinking water has no effect.=Wasserflaschen können benutzt werden, um Kessel aufzufüllen. Trinken hat keine Wirkung. +Rightclick to drink. Rightclick a cauldron to pour the water into the cauldron.=Rechtsklicken zum Trinken. Auf einem Kessel rechtsklicken, um das Wasser in den Kessel zu schütten. +River Water Bottle=Flusswasserflasche +River water bottles can be used to fill cauldrons. Drinking it has no effect.=Flusswasserflaschen können benutzt werden, um Kessel aufzufüllen. Trinken hat keine Wirkung. +Awkward Potion=Seltsamer Trank +This potion has an awkward taste and is used for brewing more potions. Drinking it has no effect.=Dieser Trank schmeckt komisch. Er wird zum Brauen von Tränken benutzt. Trinken hat keine Wirkung. +Mundane Potion=Klarer Trank +This potion has a clean taste and is used for brewing more potions. Drinking it has no effect.=Dieser Trank hat einen klaren Geschmack und wird zum Brauen von Tränken benutzt. Trinken hat keine Wirkung. +Thick Potion=Bitterer Trank +This potion has a bitter taste and is used for brewing more potions. Drinking it has no effect.=Dieser Trank hat einen bitteren Geschmack und wird zum Brauen von Tränken benutzt. Trinken hat keine Wirkung. +Glistering Melon=Glitzermelone +This shiny melon is full of tiny gold nuggets and would be nice in an item frame. It isn't edible and not useful for anything else.=Diese glänzende Melone ist voller winziger Goldnuggets und sähe ganz nett in einem Rahmen aus. Er ist nicht essbar und auch sonst zu nichts zu gebrauchen. +Dragon's Breath=Drachenatem +Use the “Place” key to drink it.=Benutzen Sie die „Platzieren“-Taste zum Trinken. +Use the “Place” key to drink. Place this item on a cauldron to pour the water into the cauldron.=Benutzen Sie die „Platzieren“-Taste zum Trinken. Platzieren Sie diesen Gegenstand auf einen Kessel, um das Wasser in den Kessel zu schütten. +Use the “Place” key to drink. Place this item on a cauldron to pour the river water into the cauldron.=Benutzen Sie die „Platzieren“-Taste zum Trinken. Platzieren Sie diesen Gegenstand auf einen Kessel, um das Flusswasser in den Kessel zu schütten. diff --git a/mods/ITEMS/mcl_potions/locale/template.txt b/mods/ITEMS/mcl_potions/locale/template.txt new file mode 100644 index 000000000..b7e08ebf7 --- /dev/null +++ b/mods/ITEMS/mcl_potions/locale/template.txt @@ -0,0 +1,23 @@ +# textdomain: mcl_potions +Put this item in an item frame for decoration. It's useless otherwise.= +Fermented Spider Eye= +Glass Bottle= +A glass bottle is used as a container for liquids and can be used to collect water directly.= +To collect water, it on a cauldron with water (which removes a level of water) or any water source (which removes no water).= +Water Bottle= +Water bottles can be used to fill cauldrons. Drinking water has no effect.= +Rightclick to drink. Rightclick a cauldron to pour the water into the cauldron.= +River Water Bottle= +River water bottles can be used to fill cauldrons. Drinking it has no effect.= +Awkward Potion= +This potion has an awkward taste and is used for brewing more potions. Drinking it has no effect.= +Mundane Potion= +This potion has a clean taste and is used for brewing more potions. Drinking it has no effect.= +Thick Potion= +This potion has a bitter taste and is used for brewing more potions. Drinking it has no effect.= +Glistering Melon= +This shiny melon is full of tiny gold nuggets and would be nice in an item frame. It isn't edible and not useful for anything else.= +Dragon's Breath= +Use the “Place” key to drink it.= +Use the “Place” key to drink. Place this item on a cauldron to pour the water into the cauldron.= +Use the “Place” key to drink. Place this item on a cauldron to pour the river water into the cauldron.= diff --git a/mods/ITEMS/mcl_signs/README.txt b/mods/ITEMS/mcl_signs/README.txt index 8950bead7..780875561 100644 --- a/mods/ITEMS/mcl_signs/README.txt +++ b/mods/ITEMS/mcl_signs/README.txt @@ -1,9 +1,12 @@ Mod based on reworked signs mod by PilzAdam: https://forum.minetest.net/viewtopic.php?t=3289 -License of code: WTFPL +License of code and font: MIT License -License of textures: See README.me in top directory. +Font source: 04.jp.org, some modifications and additions were made (added support for Latin-1 Supplement) +Original font license text states: “YOU MAY USE THEM AS YOU LIKE” (in about.gif file distributed with the font) + +License of textures: See README.me in top directory of MineClone 2. License of models: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html) Models author: 22i. diff --git a/mods/ITEMS/mcl_signs/characters b/mods/ITEMS/mcl_signs/characters deleted file mode 100644 index 83d65050c..000000000 --- a/mods/ITEMS/mcl_signs/characters +++ /dev/null @@ -1,279 +0,0 @@ -A -_a_ -7 -B -_b_ -5 -C -_c_ -6 -D -_d_ -6 -E -_e_ -5 -F -_f_ -5 -G -_g_ -6 -H -_h_ -6 -I -_i_ -1 -J -_j_ -4 -K -_k_ -5 -L -_l_ -4 -M -_m_ -7 -N -_n_ -6 -O -_o_ -6 -P -_p_ -5 -Q -_q_ -7 -R -_r_ -5 -S -_s_ -5 -T -_t_ -5 -U -_u_ -6 -V -_v_ -7 -W -_w_ -9 -X -_x_ -5 -Y -_y_ -7 -Z -_z_ -5 -a -_a -5 -b -_b -5 -c -_c -4 -d -_d -5 -e -_e -4 -f -_f -4 -g -_g -5 -h -_h -5 -i -_i -1 -j -_j -1 -k -_k -4 -l -_l -1 -m -_m -7 -n -_n -5 -o -_o -5 -p -_p -5 -q -_q -5 -r -_r -3 -s -_s -4 -t -_t -3 -u -_u -4 -v -_v -5 -w -_w -7 -x -_x -5 -y -_y -4 -z -_z -4 - -_sp -2 -0 -_0 -4 -1 -_1 -2 -2 -_2 -4 -3 -_3 -4 -4 -_4 -4 -5 -_5 -4 -6 -_6 -4 -7 -_7 -4 -8 -_8 -4 -9 -_9 -4 -( -_bl -2 -) -_br -2 -{ -_cl -3 -} -_cr -3 -[ -_sl -2 -] -_sr -2 -' -_ap -1 -! -_ex -1 -? -_qu -4 -@ -_at -5 -# -_hs -5 -$ -_dl -4 -% -_pr -5 -^ -_ca -3 -& -_am -5 -* -_as -3 -_ -_un -3 -+ -_ps -3 -- -_mn -3 -= -_eq -3 -; -_sm -1 -, -_cm -2 -" -_qo -3 -/ -_dv -5 -~ -_tl -4 -< -_lt -3 -> -_gt -3 -\ -_re -5 -| -_vb -1 -. -_dt -1 diff --git a/mods/ITEMS/mcl_signs/characters.txt b/mods/ITEMS/mcl_signs/characters.txt new file mode 100644 index 000000000..3e30994aa --- /dev/null +++ b/mods/ITEMS/mcl_signs/characters.txt @@ -0,0 +1,567 @@ +A +_a_ +7 +B +_b_ +5 +C +_c_ +6 +D +_d_ +6 +E +_e_ +5 +F +_f_ +5 +G +_g_ +6 +H +_h_ +6 +I +_i_ +1 +J +_j_ +4 +K +_k_ +5 +L +_l_ +4 +M +_m_ +7 +N +_n_ +6 +O +_o_ +6 +P +_p_ +5 +Q +_q_ +7 +R +_r_ +5 +S +_s_ +5 +T +_t_ +5 +U +_u_ +6 +V +_v_ +7 +W +_w_ +9 +X +_x_ +5 +Y +_y_ +7 +Z +_z_ +5 +a +_a +5 +b +_b +5 +c +_c +4 +d +_d +5 +e +_e +4 +f +_f +4 +g +_g +5 +h +_h +5 +i +_i +1 +j +_j +1 +k +_k +4 +l +_l +1 +m +_m +7 +n +_n +5 +o +_o +5 +p +_p +5 +q +_q +5 +r +_r +3 +s +_s +4 +t +_t +3 +u +_u +4 +v +_v +5 +w +_w +7 +x +_x +5 +y +_y +4 +z +_z +4 + +_sp +2 +0 +_0 +4 +1 +_1 +2 +2 +_2 +4 +3 +_3 +4 +4 +_4 +4 +5 +_5 +4 +6 +_6 +4 +7 +_7 +4 +8 +_8 +4 +9 +_9 +4 +( +_bl +2 +) +_br +2 +{ +_cl +3 +} +_cr +3 +[ +_sl +2 +] +_sr +2 +' +_ap +1 +! +_ex +1 +? +_qu +4 +@ +_at +5 +# +_hs +5 +$ +_dl +4 +% +_pr +5 +^ +_ca +3 +& +_am +5 +* +_as +3 +_ +_un +3 ++ +_ps +3 +- +_mn +3 += +_eq +3 +; +_sm +1 +, +_cm +2 +" +_qo +3 +/ +_dv +5 +~ +_tl +4 +< +_lt +3 +> +_gt +3 +\ +_re +5 +| +_vb +1 +. +_dt +1 +: +_co +1 +` +_gr +2 +ä +_ae +5 +ë +_ee +5 +ï +_ie +5 +ö +_oe +5 +ü +_ue +5 +Ä +_ae_ +5 +Ë +_ee_ +5 +Ï +_ie_ +5 +Ö +_oe_ +5 +Ü +_ue_ +5 +ß +_sz +5 +× +_times_cross +5 +· +_times_dot +5 +÷ +_div +5 +» +_guill_right +5 +« +_guill_left +5 +¢ +_cent +5 +¿ +_qu_inv +5 +± +_plus_minus +5 +© +_copyright +5 +® +_registered +5 +¨ +_diaresis +5 +§ +_paragraph +5 +¦ +_broken_bar +5 +¥ +_yen +5 +¤ +_currency +5 +£ +_pound +5 +µ +_mu +5 +¡ +_ex_inv +5 +¬ +_not +5 +¯ +_macron +5 +° +_degree +5 +¹ +_1_sup +5 +² +_2_sup +5 +³ +_3_sup +5 +´ +_acute +5 +¶ +_pilcrow +5 +¼ +_1_4 +5 +½ +_1_2 +5 +¾ +_3_4 +5 +À +_a_grave_ +5 +Á +_a_acute_ +5 +Â +_a_circumflex_ +5 +Ã +_a_tilde_ +5 +Å +_a_ring +5 +Æ +_ae_lig_ +5 +ª +_a_sup +5 +º +_o_sup +5 +¸ +_cedille +5 +Ç +_c_cedille_ +5 +ç +_c_cedille +5 +È +_e_grave_ +5 +É +_e_acute_ +5 +Ê +_e_circumflex_ +5 +Ì +_i_grave_ +5 +Í +_i_acute_ +5 +Î +_i_circumflex_ +5 +Ð +_d_dash_ +5 +Ñ +_n_tilde_ +5 +Ò +_o_grave_ +5 +Ó +_o_acute_ +5 +Ô +_o_circumflex_ +5 +Õ +_o_tilde_ +5 +Ø +_o_dash_ +5 +Ù +_u_grave_ +5 +Ú +_u_acute_ +5 +Û +_u_circumflex_ +5 +Ý +_y_acute_ +5 +Þ +_thorn_ +5 +à +_a_grave +5 +á +_a_acute +5 +â +_a_circumflex +5 +ã +_a_tilde +5 +å +_a_ring +5 +æ +_ae_lig +5 +è +_e_grave +5 +é +_e_acute +5 +ê +_e_circumflex +5 +ì +_i_grave +5 +í +_i_acute +5 +î +_i_circumflex +5 +ð +_d_dash +5 +ñ +_n_tilde +5 +ò +_o_grave +5 +ó +_o_acute +5 +ô +_o_circumflex +5 +õ +_o_tilde +5 +ø +_o_dash +5 +ù +_u_grave +5 +ú +_u_acute +5 +û +_u_circumflex +5 +ý +_y_acute +5 +þ +_thorn +5 +ÿ +_y_diaresis +5 diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index c9763379a..133c8dc61 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -1,8 +1,20 @@ --- Font: 04.jp.org +local S = minetest.get_translator("mcl_signs") +local F = minetest.formspec_escape --- load characters map -local chars_file = io.open(minetest.get_modpath("mcl_signs").."/characters", "r") --- FIXME: Support more characters (many characters are missing) +-- Load the characters map (characters.txt) +--[[ File format of characters.txt: +It's an UTF-8 encoded text file that contains metadata for all supported characters. It contains a sequence of info blocks, one for each character. Each info block is made out of 3 lines: +Line 1: The literal UTF-8 encoded character +Line 2: Name of the texture file for this character minus the “.png” suffix; found in the “textures/” sub-directory +Line 3: Currently ignored. Previously this was for the character width in pixels + +After line 3, another info block may follow. This repeats until the end of the file. + +All character files must be 5 or 6 pixels wide (5 pixels are preferred) +]] + +local chars_file = io.open(minetest.get_modpath("mcl_signs").."/characters.txt", "r") +-- FIXME: Support more characters (many characters are missing). Currently ASCII and Latin-1 Supplement are supported. local charmap = {} if not chars_file then minetest.log("error", "[mcl_signs] : character map file not found") @@ -53,8 +65,7 @@ local string_to_line_array = function(str) current = current + 1 tab[current] = "" linechar = 1 - -- This check cuts off overlong lines - elseif linechar <= LINE_LENGTH then + else tab[current] = tab[current]..char linechar = linechar + 1 end @@ -81,8 +92,9 @@ local generate_line = function(s, ypos) local width = 0 local chars = 0 local printed_char_width = CHAR_WIDTH + 1 - while chars <= LINE_LENGTH and i <= #s do + while chars < LINE_LENGTH and i <= #s do local file = nil + -- Get and render character if charmap[s:sub(i, i)] ~= nil then file = charmap[s:sub(i, i)] i = i + 1 @@ -90,8 +102,11 @@ local generate_line = function(s, ypos) file = charmap[s:sub(i, i + 1)] i = i + 2 else - minetest.log("warning", "[mcl_signs] Unknown symbol in '"..s.."' at "..i.." (probably "..s:sub(i, i)..")") + -- No character image found. + -- Use replacement character: + file = "_rc" i = i + 1 + minetest.log("verbose", "[mcl_signs] Unknown symbol in '"..s.."' at "..i) end if file ~= nil then width = width + printed_char_width @@ -114,9 +129,9 @@ local generate_texture = function(lines, signnodename) local texture = "[combine:"..SIGN_WIDTH.."x"..SIGN_WIDTH local ypos if signnodename == "mcl_signs:wall_sign" then - ypos = 29 + ypos = 30 else - ypos = -2 + ypos = 0 end for i = 1, #lines do texture = texture..generate_line(lines[i], ypos) @@ -170,7 +185,7 @@ local function get_wall_signtext_info(param2, nodename) end end -local sign_groups = {handy=1,axey=1, flammable=1, deco_block=1, material_wood=1, attached_node=1} +local sign_groups = {handy=1,axey=1, flammable=1, deco_block=1, material_wood=1, attached_node=1, dig_by_piston=1} local destruct_sign = function(pos) local objects = minetest.get_objects_inside_radius(pos, 0.5) @@ -180,6 +195,10 @@ local destruct_sign = function(pos) v:remove() end end + local players = minetest.get_connected_players() + for p=1, #players do + minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z) + end end local update_sign = function(pos, fields, sender) @@ -223,14 +242,14 @@ local update_sign = function(pos, fields, sender) text_entity:get_luaentity()._signnodename = nn text_entity:set_properties({textures={generate_texture(create_lines(text), nn)}}) - text_entity:setyaw(sign_info.yaw) + text_entity:set_yaw(sign_info.yaw) end local show_formspec = function(player, pos) minetest.show_formspec( player:get_player_name(), "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z, - "size[6,3]textarea[0.25,0.25;6,1.5;text;Edit sign text:;]label[0,1.5;Maximum line length: 15\nMaximum lines: 4]button_exit[0,2.5;6,1;submit;Done]" + "size[6,3]textarea[0.25,0.25;6,1.5;text;"..F(S("Enter sign text:"))..";]label[0,1.5;"..F(S("Maximum line length: 15")).."\n"..F(S("Maximum lines: 4")).."]button_exit[0,2.5;6,1;submit;"..F(S("Done")).."]" ) end @@ -249,9 +268,9 @@ if minetest.get_modpath("mcl_sounds") then end minetest.register_node("mcl_signs:wall_sign", { - description = "Sign", - _doc_items_longdesc = "Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them.", - _doc_items_usagehelp = "Place the sign at the side to build a wall sign, place it on top of another block to build a sign with a sign post.\nAfter placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. The text can not be changed once it has been written; you have to break and place the sign again.", + description = S("Sign"), + _doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."), + _doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again."), inventory_image = "default_sign.png", walkable = false, is_ground_content = false, @@ -359,7 +378,7 @@ minetest.register_node("mcl_signs:wall_sign", { x = place_pos.x + sign_info.delta.x, y = place_pos.y + sign_info.delta.y, z = place_pos.z + sign_info.delta.z}, "mcl_signs:text") - text_entity:setyaw(sign_info.yaw) + text_entity:set_yaw(sign_info.yaw) text_entity:get_luaentity()._signnodename = nodeitem:get_name() minetest.sound_play({name="default_place_node_hard", gain=1.0}, {pos = place_pos}) @@ -429,7 +448,7 @@ minetest.register_node("mcl_signs:standing_sign67_5", ssign67) -- FIXME: Prevent entity destruction by /clearobjects minetest.register_entity("mcl_signs:text", { - collisionbox = { 0, 0, 0, 0, 0, 0 }, + pointable = false, visual = "upright_sprite", textures = {}, physical = false, diff --git a/mods/ITEMS/mcl_signs/locale/mcl_signs.de.tr b/mods/ITEMS/mcl_signs/locale/mcl_signs.de.tr new file mode 100644 index 000000000..5129696ba --- /dev/null +++ b/mods/ITEMS/mcl_signs/locale/mcl_signs.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_signs +Sign=Schild +Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them.=Schilder können beschrieben werden und kommen in zwei Varianten: Wandschild und stehendes Schild. Sie können auf und an den Seiten von anderen Blöclen platziert werden, aber nicht unter ihnen. +After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again.=Nachdem das Schild platziert wurde, kann man etwas darauf schreiben. 4 Zeilen mit je 15 Zeichen pro Zeile sind verfügbar, alles darüber geht verloren. Es werden nicht alle Zeichen unterstützt. Der Text kann nicht geändert werden, sobald er geschrieben wurde; man muss das Schild erneut platzieren. +Enter sign text:=Schildtext eingeben: +Maximum line length: 15=Maximale Zeilenlänge: 15 +Maximum lines: 4=Maximale Zeilen: 4 +Done=Fertig diff --git a/mods/ITEMS/mcl_signs/locale/template.txt b/mods/ITEMS/mcl_signs/locale/template.txt new file mode 100644 index 000000000..f4f4827bc --- /dev/null +++ b/mods/ITEMS/mcl_signs/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mcl_signs +Sign= +Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them.= +After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again.= +Enter sign text:= +Maximum line length: 15= +Maximum lines: 4= +Done= diff --git a/mods/ITEMS/mcl_signs/textures/_0.png b/mods/ITEMS/mcl_signs/textures/_0.png index 93070cc75..e764f3d6a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_0.png and b/mods/ITEMS/mcl_signs/textures/_0.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1.png b/mods/ITEMS/mcl_signs/textures/_1.png index fc4da531e..7fae5fa4c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_1.png and b/mods/ITEMS/mcl_signs/textures/_1.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1_2.png b/mods/ITEMS/mcl_signs/textures/_1_2.png new file mode 100644 index 000000000..52d025e87 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_1_2.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1_4.png b/mods/ITEMS/mcl_signs/textures/_1_4.png new file mode 100644 index 000000000..220e65ef5 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_1_4.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1_sup.png b/mods/ITEMS/mcl_signs/textures/_1_sup.png new file mode 100644 index 000000000..6be5fdcb1 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_1_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_2.png b/mods/ITEMS/mcl_signs/textures/_2.png index e482082b3..e32866d03 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_2.png and b/mods/ITEMS/mcl_signs/textures/_2.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_2_sup.png b/mods/ITEMS/mcl_signs/textures/_2_sup.png new file mode 100644 index 000000000..3db952179 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_2_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_3.png b/mods/ITEMS/mcl_signs/textures/_3.png index c40313243..4e7da5665 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_3.png and b/mods/ITEMS/mcl_signs/textures/_3.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_3_4.png b/mods/ITEMS/mcl_signs/textures/_3_4.png new file mode 100644 index 000000000..46e171049 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_3_4.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_3_sup.png b/mods/ITEMS/mcl_signs/textures/_3_sup.png new file mode 100644 index 000000000..add337326 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_3_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_5.png b/mods/ITEMS/mcl_signs/textures/_5.png index 684fc45e5..baf23b273 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_5.png and b/mods/ITEMS/mcl_signs/textures/_5.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_6.png b/mods/ITEMS/mcl_signs/textures/_6.png index 6b91013db..31fcd7d72 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_6.png and b/mods/ITEMS/mcl_signs/textures/_6.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_7.png b/mods/ITEMS/mcl_signs/textures/_7.png index d13f39730..7594eb9d6 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_7.png and b/mods/ITEMS/mcl_signs/textures/_7.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_8.png b/mods/ITEMS/mcl_signs/textures/_8.png index af994c2aa..b61f4e294 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_8.png and b/mods/ITEMS/mcl_signs/textures/_8.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_9.png b/mods/ITEMS/mcl_signs/textures/_9.png index 5054efc91..5ed82070b 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_9.png and b/mods/ITEMS/mcl_signs/textures/_9.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_acute.png b/mods/ITEMS/mcl_signs/textures/_a_acute.png new file mode 100644 index 000000000..b72b4853e Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_acute_.png b/mods/ITEMS/mcl_signs/textures/_a_acute_.png new file mode 100644 index 000000000..d038b45ce Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_circumflex.png b/mods/ITEMS/mcl_signs/textures/_a_circumflex.png new file mode 100644 index 000000000..f9b80df66 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_a_circumflex_.png new file mode 100644 index 000000000..8b35bdf7c Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_grave.png b/mods/ITEMS/mcl_signs/textures/_a_grave.png new file mode 100644 index 000000000..3f0de45a5 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_grave_.png b/mods/ITEMS/mcl_signs/textures/_a_grave_.png new file mode 100644 index 000000000..8176f51c5 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_ring.png b/mods/ITEMS/mcl_signs/textures/_a_ring.png new file mode 100644 index 000000000..d3c06ae6d Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_ring.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_ring_.png b/mods/ITEMS/mcl_signs/textures/_a_ring_.png new file mode 100644 index 000000000..d3e9b7e96 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_ring_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_sup.png b/mods/ITEMS/mcl_signs/textures/_a_sup.png new file mode 100644 index 000000000..4f4f9801c Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_tilde.png b/mods/ITEMS/mcl_signs/textures/_a_tilde.png new file mode 100644 index 000000000..567632c37 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_tilde.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_tilde_.png b/mods/ITEMS/mcl_signs/textures/_a_tilde_.png new file mode 100644 index 000000000..fd3d97784 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_a_tilde_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_acute.png b/mods/ITEMS/mcl_signs/textures/_acute.png new file mode 100644 index 000000000..0655de2dd Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae.png b/mods/ITEMS/mcl_signs/textures/_ae.png new file mode 100644 index 000000000..7f199e477 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ae.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae_.png b/mods/ITEMS/mcl_signs/textures/_ae_.png new file mode 100644 index 000000000..e19fdf1c8 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ae_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae_lig.png b/mods/ITEMS/mcl_signs/textures/_ae_lig.png new file mode 100644 index 000000000..a02bd30cf Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ae_lig.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae_lig_.png b/mods/ITEMS/mcl_signs/textures/_ae_lig_.png new file mode 100644 index 000000000..0eb5d2f5c Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ae_lig_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_am.png b/mods/ITEMS/mcl_signs/textures/_am.png index 8e762a1d0..76a886757 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_am.png and b/mods/ITEMS/mcl_signs/textures/_am.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ap.png b/mods/ITEMS/mcl_signs/textures/_ap.png index 0575401f2..bced380ac 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ap.png and b/mods/ITEMS/mcl_signs/textures/_ap.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_bl.png b/mods/ITEMS/mcl_signs/textures/_bl.png index 046042114..422fcc586 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_bl.png and b/mods/ITEMS/mcl_signs/textures/_bl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_br.png b/mods/ITEMS/mcl_signs/textures/_br.png index c8cd9c8da..88b1ba4a3 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_br.png and b/mods/ITEMS/mcl_signs/textures/_br.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_broken_bar.png b/mods/ITEMS/mcl_signs/textures/_broken_bar.png new file mode 100644 index 000000000..c733fd862 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_broken_bar.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c.png b/mods/ITEMS/mcl_signs/textures/_c.png index e36136fae..0ae311f3d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_c.png and b/mods/ITEMS/mcl_signs/textures/_c.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c_.png b/mods/ITEMS/mcl_signs/textures/_c_.png index 7917a84e2..135260913 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_c_.png and b/mods/ITEMS/mcl_signs/textures/_c_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c_cedille.png b/mods/ITEMS/mcl_signs/textures/_c_cedille.png new file mode 100644 index 000000000..9d5a4b564 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_c_cedille.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c_cedille_.png b/mods/ITEMS/mcl_signs/textures/_c_cedille_.png new file mode 100644 index 000000000..7eb654bc4 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_c_cedille_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cedille.png b/mods/ITEMS/mcl_signs/textures/_cedille.png new file mode 100644 index 000000000..0de32ed0c Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_cedille.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cent.png b/mods/ITEMS/mcl_signs/textures/_cent.png new file mode 100644 index 000000000..ecdb1f1d1 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_cent.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cl.png b/mods/ITEMS/mcl_signs/textures/_cl.png index 106b39374..38cad796c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cl.png and b/mods/ITEMS/mcl_signs/textures/_cl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cm.png b/mods/ITEMS/mcl_signs/textures/_cm.png index 716939ad5..6b2b10a17 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cm.png and b/mods/ITEMS/mcl_signs/textures/_cm.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_co.png b/mods/ITEMS/mcl_signs/textures/_co.png new file mode 100644 index 000000000..6775d5eaf Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_co.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_copyright.png b/mods/ITEMS/mcl_signs/textures/_copyright.png new file mode 100644 index 000000000..7cfdf217e Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_copyright.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cr.png b/mods/ITEMS/mcl_signs/textures/_cr.png index fc3506b96..cd6d6dac6 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cr.png and b/mods/ITEMS/mcl_signs/textures/_cr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_currency.png b/mods/ITEMS/mcl_signs/textures/_currency.png new file mode 100644 index 000000000..1264c8945 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_currency.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_d_dash.png b/mods/ITEMS/mcl_signs/textures/_d_dash.png new file mode 100644 index 000000000..73f5a1246 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_d_dash.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_d_dash_.png b/mods/ITEMS/mcl_signs/textures/_d_dash_.png new file mode 100644 index 000000000..e9c9e69c7 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_d_dash_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_degree.png b/mods/ITEMS/mcl_signs/textures/_degree.png new file mode 100644 index 000000000..64a7ee2b1 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_degree.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_diaresis.png b/mods/ITEMS/mcl_signs/textures/_diaresis.png new file mode 100644 index 000000000..f8b75d38d Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_diaresis.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_div.png b/mods/ITEMS/mcl_signs/textures/_div.png new file mode 100644 index 000000000..808343753 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_div.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_dl.png b/mods/ITEMS/mcl_signs/textures/_dl.png index f02d723b7..044e4f00b 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_dl.png and b/mods/ITEMS/mcl_signs/textures/_dl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_dt.png b/mods/ITEMS/mcl_signs/textures/_dt.png index 92cc4a9f1..5dfa75349 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_dt.png and b/mods/ITEMS/mcl_signs/textures/_dt.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_dv.png b/mods/ITEMS/mcl_signs/textures/_dv.png index 37dc95365..2989d93db 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_dv.png and b/mods/ITEMS/mcl_signs/textures/_dv.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e.png b/mods/ITEMS/mcl_signs/textures/_e.png index 9cca45b5e..316e966a1 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e.png and b/mods/ITEMS/mcl_signs/textures/_e.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_acute.png b/mods/ITEMS/mcl_signs/textures/_e_acute.png new file mode 100644 index 000000000..911207f86 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_e_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_acute_.png b/mods/ITEMS/mcl_signs/textures/_e_acute_.png new file mode 100644 index 000000000..b60193740 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_e_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_circumflex.png b/mods/ITEMS/mcl_signs/textures/_e_circumflex.png new file mode 100644 index 000000000..2b5ace3c4 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_e_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_e_circumflex_.png new file mode 100644 index 000000000..c17d9dc29 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_e_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_grave.png b/mods/ITEMS/mcl_signs/textures/_e_grave.png new file mode 100644 index 000000000..c24ab4635 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_e_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_grave_.png b/mods/ITEMS/mcl_signs/textures/_e_grave_.png new file mode 100644 index 000000000..c71bb2ef6 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_e_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ee.png b/mods/ITEMS/mcl_signs/textures/_ee.png new file mode 100644 index 000000000..646c19e14 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ee.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ee_.png b/mods/ITEMS/mcl_signs/textures/_ee_.png new file mode 100644 index 000000000..5db7bc66a Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ee_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_eq.png b/mods/ITEMS/mcl_signs/textures/_eq.png index fc5e8310f..166f7a30d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_eq.png and b/mods/ITEMS/mcl_signs/textures/_eq.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ex.png b/mods/ITEMS/mcl_signs/textures/_ex.png index 83500a411..65a76aad1 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ex.png and b/mods/ITEMS/mcl_signs/textures/_ex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ex_inv.png b/mods/ITEMS/mcl_signs/textures/_ex_inv.png new file mode 100644 index 000000000..1e7bbfe87 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ex_inv.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_f.png b/mods/ITEMS/mcl_signs/textures/_f.png index 1ac67a01b..1e431df13 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_f.png and b/mods/ITEMS/mcl_signs/textures/_f.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_g_.png b/mods/ITEMS/mcl_signs/textures/_g_.png index 3408aa0e7..bfe054638 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_g_.png and b/mods/ITEMS/mcl_signs/textures/_g_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_gr.png b/mods/ITEMS/mcl_signs/textures/_gr.png new file mode 100644 index 000000000..3f806499a Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_gr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_gt.png b/mods/ITEMS/mcl_signs/textures/_gt.png index efe2c94a6..0449b44de 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_gt.png and b/mods/ITEMS/mcl_signs/textures/_gt.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_guill_left.png b/mods/ITEMS/mcl_signs/textures/_guill_left.png new file mode 100644 index 000000000..32b90c3e2 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_guill_left.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_guill_right.png b/mods/ITEMS/mcl_signs/textures/_guill_right.png new file mode 100644 index 000000000..d372e6a85 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_guill_right.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_h.png b/mods/ITEMS/mcl_signs/textures/_h.png index cca4751a3..bd6f1891c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_h.png and b/mods/ITEMS/mcl_signs/textures/_h.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_hs.png b/mods/ITEMS/mcl_signs/textures/_hs.png index 46f83c438..682a92a2d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_hs.png and b/mods/ITEMS/mcl_signs/textures/_hs.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_acute.png b/mods/ITEMS/mcl_signs/textures/_i_acute.png new file mode 100644 index 000000000..20bdafb62 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_i_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_acute_.png b/mods/ITEMS/mcl_signs/textures/_i_acute_.png new file mode 100644 index 000000000..4cdc943d9 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_i_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_circumflex.png b/mods/ITEMS/mcl_signs/textures/_i_circumflex.png new file mode 100644 index 000000000..f0e712725 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_i_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_i_circumflex_.png new file mode 100644 index 000000000..dc46f3ff5 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_i_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_grave.png b/mods/ITEMS/mcl_signs/textures/_i_grave.png new file mode 100644 index 000000000..7254cd7d2 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_i_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_grave_.png b/mods/ITEMS/mcl_signs/textures/_i_grave_.png new file mode 100644 index 000000000..1e2212679 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_i_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_j.png b/mods/ITEMS/mcl_signs/textures/_j.png index 9b3754487..7fec50215 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_j.png and b/mods/ITEMS/mcl_signs/textures/_j.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_k_.png b/mods/ITEMS/mcl_signs/textures/_k_.png index 4444abdda..5e0a6b995 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_k_.png and b/mods/ITEMS/mcl_signs/textures/_k_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_lt.png b/mods/ITEMS/mcl_signs/textures/_lt.png index 3a183ebd5..54295121e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_lt.png and b/mods/ITEMS/mcl_signs/textures/_lt.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_macron.png b/mods/ITEMS/mcl_signs/textures/_macron.png new file mode 100644 index 000000000..ffb9dfd77 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_macron.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_mn.png b/mods/ITEMS/mcl_signs/textures/_mn.png index 7d04cac67..2230e1065 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_mn.png and b/mods/ITEMS/mcl_signs/textures/_mn.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_mu.png b/mods/ITEMS/mcl_signs/textures/_mu.png new file mode 100644 index 000000000..3d8c1b890 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_mu.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_n_tilde.png b/mods/ITEMS/mcl_signs/textures/_n_tilde.png new file mode 100644 index 000000000..471669116 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_n_tilde.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_n_tilde_.png b/mods/ITEMS/mcl_signs/textures/_n_tilde_.png new file mode 100644 index 000000000..0dba0d471 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_n_tilde_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_not.png b/mods/ITEMS/mcl_signs/textures/_not.png new file mode 100644 index 000000000..a98f885e9 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_not.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o.png b/mods/ITEMS/mcl_signs/textures/_o.png index f644e1e72..2a579385d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o.png and b/mods/ITEMS/mcl_signs/textures/_o.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_.png b/mods/ITEMS/mcl_signs/textures/_o_.png index d5984b007..44ac3cbca 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_.png and b/mods/ITEMS/mcl_signs/textures/_o_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_acute.png b/mods/ITEMS/mcl_signs/textures/_o_acute.png new file mode 100644 index 000000000..cda99b3a6 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_acute_.png b/mods/ITEMS/mcl_signs/textures/_o_acute_.png new file mode 100644 index 000000000..e25a3a7f4 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_circumflex.png b/mods/ITEMS/mcl_signs/textures/_o_circumflex.png new file mode 100644 index 000000000..2f7a188df Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_o_circumflex_.png new file mode 100644 index 000000000..5e4c6be6a Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_dash.png b/mods/ITEMS/mcl_signs/textures/_o_dash.png new file mode 100644 index 000000000..9e5de53d1 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_dash.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_dash_.png b/mods/ITEMS/mcl_signs/textures/_o_dash_.png new file mode 100644 index 000000000..badbe9b88 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_dash_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_grave.png b/mods/ITEMS/mcl_signs/textures/_o_grave.png new file mode 100644 index 000000000..b6b31a9a6 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_grave_.png b/mods/ITEMS/mcl_signs/textures/_o_grave_.png new file mode 100644 index 000000000..d34e9d71c Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_sup.png b/mods/ITEMS/mcl_signs/textures/_o_sup.png new file mode 100644 index 000000000..eeff0a295 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_tilde.png b/mods/ITEMS/mcl_signs/textures/_o_tilde.png new file mode 100644 index 000000000..6cbd7cec0 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_tilde.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_tilde_.png b/mods/ITEMS/mcl_signs/textures/_o_tilde_.png new file mode 100644 index 000000000..bb0616918 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_o_tilde_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_oe.png b/mods/ITEMS/mcl_signs/textures/_oe.png new file mode 100644 index 000000000..9b6892155 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_oe.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_oe_.png b/mods/ITEMS/mcl_signs/textures/_oe_.png new file mode 100644 index 000000000..73b4da80e Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_oe_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_paragraph.png b/mods/ITEMS/mcl_signs/textures/_paragraph.png new file mode 100644 index 000000000..52c162120 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_paragraph.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_pilcrow.png b/mods/ITEMS/mcl_signs/textures/_pilcrow.png new file mode 100644 index 000000000..9764ff8b5 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_pilcrow.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_plus_minus.png b/mods/ITEMS/mcl_signs/textures/_plus_minus.png new file mode 100644 index 000000000..e7c3f1200 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_plus_minus.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_pound.png b/mods/ITEMS/mcl_signs/textures/_pound.png new file mode 100644 index 000000000..31d38d392 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_pound.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_pr.png b/mods/ITEMS/mcl_signs/textures/_pr.png index 5c231c9a8..c8783948d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_pr.png and b/mods/ITEMS/mcl_signs/textures/_pr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_q_.png b/mods/ITEMS/mcl_signs/textures/_q_.png index 8ad185127..674799413 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_q_.png and b/mods/ITEMS/mcl_signs/textures/_q_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_qo.png b/mods/ITEMS/mcl_signs/textures/_qo.png index 27cae96a2..c7b87be68 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_qo.png and b/mods/ITEMS/mcl_signs/textures/_qo.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_qu.png b/mods/ITEMS/mcl_signs/textures/_qu.png index 26cf5b459..1458c7e10 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_qu.png and b/mods/ITEMS/mcl_signs/textures/_qu.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_qu_inv.png b/mods/ITEMS/mcl_signs/textures/_qu_inv.png new file mode 100644 index 000000000..757bd06db Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_qu_inv.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_r_.png b/mods/ITEMS/mcl_signs/textures/_r_.png index 5acd96374..f8b472755 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_r_.png and b/mods/ITEMS/mcl_signs/textures/_r_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_rc.png b/mods/ITEMS/mcl_signs/textures/_rc.png new file mode 100644 index 000000000..8b66915e6 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_rc.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_registered.png b/mods/ITEMS/mcl_signs/textures/_registered.png new file mode 100644 index 000000000..9a78dda3c Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_registered.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_s.png b/mods/ITEMS/mcl_signs/textures/_s.png index 4e2538f4c..4c47aee01 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_s.png and b/mods/ITEMS/mcl_signs/textures/_s.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_s_.png b/mods/ITEMS/mcl_signs/textures/_s_.png index d5281d78d..08cf6ff68 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_s_.png and b/mods/ITEMS/mcl_signs/textures/_s_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sl.png b/mods/ITEMS/mcl_signs/textures/_sl.png index d825f1aaa..413aa5778 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sl.png and b/mods/ITEMS/mcl_signs/textures/_sl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sm.png b/mods/ITEMS/mcl_signs/textures/_sm.png index dc3c258d4..460c5d6dd 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sm.png and b/mods/ITEMS/mcl_signs/textures/_sm.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sp.png b/mods/ITEMS/mcl_signs/textures/_sp.png index 59bbc5818..4aae0ea85 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sp.png and b/mods/ITEMS/mcl_signs/textures/_sp.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sr.png b/mods/ITEMS/mcl_signs/textures/_sr.png index dd192f543..afefa91b2 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sr.png and b/mods/ITEMS/mcl_signs/textures/_sr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sz.png b/mods/ITEMS/mcl_signs/textures/_sz.png new file mode 100644 index 000000000..56d2847a1 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_sz.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_thorn.png b/mods/ITEMS/mcl_signs/textures/_thorn.png new file mode 100644 index 000000000..e44f23d85 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_thorn.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_thorn_.png b/mods/ITEMS/mcl_signs/textures/_thorn_.png new file mode 100644 index 000000000..1b6d2558b Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_thorn_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_times_cross.png b/mods/ITEMS/mcl_signs/textures/_times_cross.png new file mode 100644 index 000000000..25af91b68 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_times_cross.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_times_dot.png b/mods/ITEMS/mcl_signs/textures/_times_dot.png new file mode 100644 index 000000000..42dac52bc Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_times_dot.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_tl.png b/mods/ITEMS/mcl_signs/textures/_tl.png index a8bf1764a..5f1b4fb43 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_tl.png and b/mods/ITEMS/mcl_signs/textures/_tl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_acute.png b/mods/ITEMS/mcl_signs/textures/_u_acute.png new file mode 100644 index 000000000..580f61042 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_u_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_acute_.png b/mods/ITEMS/mcl_signs/textures/_u_acute_.png new file mode 100644 index 000000000..9237d3caf Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_u_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_circumflex.png b/mods/ITEMS/mcl_signs/textures/_u_circumflex.png new file mode 100644 index 000000000..2b238be12 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_u_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_u_circumflex_.png new file mode 100644 index 000000000..1608ecf17 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_u_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_grave.png b/mods/ITEMS/mcl_signs/textures/_u_grave.png new file mode 100644 index 000000000..051280428 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_u_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_grave_.png b/mods/ITEMS/mcl_signs/textures/_u_grave_.png new file mode 100644 index 000000000..668685793 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_u_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ue.png b/mods/ITEMS/mcl_signs/textures/_ue.png new file mode 100644 index 000000000..6249aaebb Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ue.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ue_.png b/mods/ITEMS/mcl_signs/textures/_ue_.png new file mode 100644 index 000000000..3193a9412 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_ue_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_vb.png b/mods/ITEMS/mcl_signs/textures/_vb.png index b40ff9892..ca2e5667a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_vb.png and b/mods/ITEMS/mcl_signs/textures/_vb.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_w.png b/mods/ITEMS/mcl_signs/textures/_w.png index daa597637..6c2eea3e1 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_w.png and b/mods/ITEMS/mcl_signs/textures/_w.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_w_.png b/mods/ITEMS/mcl_signs/textures/_w_.png index 8848484d4..f1e26c108 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_w_.png and b/mods/ITEMS/mcl_signs/textures/_w_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y_acute.png b/mods/ITEMS/mcl_signs/textures/_y_acute.png new file mode 100644 index 000000000..37cb54b30 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_y_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y_acute_.png b/mods/ITEMS/mcl_signs/textures/_y_acute_.png new file mode 100644 index 000000000..bcc15c41c Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_y_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y_diaresis.png b/mods/ITEMS/mcl_signs/textures/_y_diaresis.png new file mode 100644 index 000000000..135a8ce25 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_y_diaresis.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_yen.png b/mods/ITEMS/mcl_signs/textures/_yen.png new file mode 100644 index 000000000..ec4ad65ee Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/_yen.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_z.png b/mods/ITEMS/mcl_signs/textures/_z.png index 86eb502ce..8a710780a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_z.png and b/mods/ITEMS/mcl_signs/textures/_z.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_z_.png b/mods/ITEMS/mcl_signs/textures/_z_.png index 9bff40022..6192800b4 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_z_.png and b/mods/ITEMS/mcl_signs/textures/_z_.png differ diff --git a/mods/ITEMS/mcl_sponges/init.lua b/mods/ITEMS/mcl_sponges/init.lua index 531e74c99..23ab71166 100644 --- a/mods/ITEMS/mcl_sponges/init.lua +++ b/mods/ITEMS/mcl_sponges/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_sponges") + local absorb = function(pos) local change = false -- Count number of absorbed river water vs other nodes @@ -34,8 +36,8 @@ local absorb = function(pos) end minetest.register_node("mcl_sponges:sponge", { - description = "Sponge", - _doc_items_longdesc = "Sponges are blocks which remove water around them when they are placed or come in contact with water, turning it into a wet sponge.", + description = S("Sponge"), + _doc_items_longdesc = S("Sponges are blocks which remove water around them when they are placed or come in contact with water, turning it into a wet sponge."), drawtype = "normal", is_ground_content = false, tiles = {"mcl_sponges_sponge.png"}, @@ -92,8 +94,8 @@ minetest.register_node("mcl_sponges:sponge", { }) minetest.register_node("mcl_sponges:sponge_wet", { - description = "Waterlogged Sponge", - _doc_items_longdesc = "A waterlogged sponge can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of a furnace, the water will pour into the bucket.", + description = S("Waterlogged Sponge"), + _doc_items_longdesc = S("A waterlogged sponge can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of a furnace, the water will pour into the bucket."), drawtype = "normal", is_ground_content = false, tiles = {"mcl_sponges_sponge_wet.png"}, @@ -110,8 +112,8 @@ minetest.register_node("mcl_sponges:sponge_wet", { if minetest.get_modpath("mclx_core") then minetest.register_node("mcl_sponges:sponge_wet_river_water", { - description = "Riverwaterlogged Sponge", - _doc_items_longdesc = "This is a sponge soaking wet with river water. It can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of the furnace, the river water will pour into the bucket." .. "\n" .. "A sponge becomes riverwaterlogged (instead of waterlogged) if it sucks up more river water than (normal) water.", + description = S("Riverwaterlogged Sponge"), + _doc_items_longdesc = S("This is a sponge soaking wet with river water. It can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of the furnace, the river water will pour into the bucket.") .. "\n" .. S("A sponge becomes riverwaterlogged (instead of waterlogged) if it sucks up more river water than (normal) water."), drawtype = "normal", is_ground_content = false, tiles = {"mcl_sponges_sponge_wet_river_water.png"}, diff --git a/mods/ITEMS/mcl_sponges/locale/mcl_sponges.de.tr b/mods/ITEMS/mcl_sponges/locale/mcl_sponges.de.tr new file mode 100644 index 000000000..d226e8d1f --- /dev/null +++ b/mods/ITEMS/mcl_sponges/locale/mcl_sponges.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_sponges +Sponge=Schwamm +Sponges are blocks which remove water around them when they are placed or come in contact with water, turning it into a wet sponge.=Schwämme sind Blöcke, die Wasser um sie herum entfernen, wenn sie platziert wurden oder in Berührung mit Wasser kommen, was sie in einen nassen Schwamm verwandelt. +Waterlogged Sponge=Wassergetränkter Schwamm +A waterlogged sponge can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of a furnace, the water will pour into the bucket.=Ein wassergetränkter Schwamm kann in einem Ofen getrocknet werden, um ihn zu einem (trockenem) Schwamm zu verwandeln. Wenn es einen leeren Eimer im Brennstoffplatz des Ofens gibt, wird das Wasser in den Eimer fließen. +Riverwaterlogged Sponge=Flusswassergetränkter Schwamm +This is a sponge soaking wet with river water. It can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of the furnace, the river water will pour into the bucket.=Dies ist ein Schwamm, der triefend nass und voller Flusswasser ist. Er kann in einem Ofen getrocknet werden, um ihn zu einem (trockenem) Schwamm zu verwandeln. Wenn es einen leeren Eimer im Brennstoffplatz des Ofens gibt, wird das Flusswasser in den Eimer fließen. +A sponge becomes riverwaterlogged (instead of waterlogged) if it sucks up more river water than (normal) water.=Ein Schwamm wird flusswassergetränkt (statt wassergetränkt), wenn er mehr Flusswasser als (normales) Wasser aufsaugt. diff --git a/mods/ITEMS/mcl_sponges/locale/template.txt b/mods/ITEMS/mcl_sponges/locale/template.txt new file mode 100644 index 000000000..2de972267 --- /dev/null +++ b/mods/ITEMS/mcl_sponges/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: mcl_sponges +Sponge= +Sponges are blocks which remove water around them when they are placed or come in contact with water, turning it into a wet sponge.= +Waterlogged Sponge= +A waterlogged sponge can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of a furnace, the water will pour into the bucket.= +Riverwaterlogged Sponge= +This is a sponge soaking wet with river water. It can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of the furnace, the river water will pour into the bucket.= +A sponge becomes riverwaterlogged (instead of waterlogged) if it sucks up more river water than (normal) water.= diff --git a/mods/ITEMS/mcl_stairs/api.lua b/mods/ITEMS/mcl_stairs/api.lua index d90bc8452..a6e6c6594 100644 --- a/mods/ITEMS/mcl_stairs/api.lua +++ b/mods/ITEMS/mcl_stairs/api.lua @@ -1,20 +1,11 @@ +local S = minetest.get_translator("mcl_stairs") + -- Core mcl_stairs API -- Wrapper around mintest.pointed_thing_to_face_pos. local function get_fpos(placer, pointed_thing) - local fpos - -- Workaround: minetest.pointed_thing_to_face_pos crashes in MT 0.4.16 if - -- pointed_thing.under and pointed_thing.above are equal - -- FIXME: Remove this when MT got fixed. - if not vector.equals(pointed_thing.under, pointed_thing.above) then - -- The happy case: Everything is normal - local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing) - fpos = finepos.y % 1 - else - -- Fallback if both above and under are equal - fpos = 0 - end - return fpos + local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing) + return finepos.y % 1 end local function place_slab_normal(itemstack, placer, pointed_thing) @@ -100,7 +91,7 @@ function mcl_stairs.register_stair(subname, recipeitem, groups, images, descript minetest.register_node(":mcl_stairs:stair_" .. subname, { description = description, - _doc_items_longdesc = "Stairs are useful to reach higher places by walking over them; jumping is not required. Placing stairs in a corner pattern will create corner stairs. Stairs placed on the bottom or at the upper half of the side of a block will be placed upside down.", + _doc_items_longdesc = S("Stairs are useful to reach higher places by walking over them; jumping is not required. Placing stairs in a corner pattern will create corner stairs. Stairs placed on the ceiling or at the upper half of the side of a block will be placed upside down."), drawtype = "mesh", mesh = "stairs_stair.obj", tiles = images, @@ -188,13 +179,13 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti -- Automatically generate double slab description if not double_description then - double_description = string.format("Double %s", description) + double_description = S("Double @1", description) minetest.log("warning", "[stairs] No explicit description for double slab '"..double_slab.."' added. Using auto-generated description.") end groups.slab = 1 groups.building_block = 1 - local longdesc = "Slabs are half as high as their full block counterparts and occupy either the lower or upper part of a block, depending on how it was placed. Slabs can be easily stepped on without needing to jump. When a slab is placed on another slab of the same type, a double slab is created." + local longdesc = S("Slabs are half as high as their full block counterparts and occupy either the lower or upper part of a block, depending on how it was placed. Slabs can be easily stepped on without needing to jump. When a slab is placed on another slab of the same type, a double slab is created.") local slabdef = { description = description, @@ -258,7 +249,7 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti topdef.groups.slab_top = 1 topdef.groups.not_in_creative_inventory = 1 topdef.groups.not_in_craft_guide = 1 - topdef.description = string.format("Upper %s", description) + topdef.description = S("Upper @1", description) topdef._doc_items_create_entry = false topdef._doc_items_longdesc = nil topdef._doc_items_usagehelp = nil @@ -283,7 +274,7 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti dgroups.double_slab = 1 minetest.register_node(":"..double_slab, { description = double_description, - _doc_items_longdesc = "Double slabs are full blocks which are created by placing two slabs of the same kind on each other.", + _doc_items_longdesc = S("Double slabs are full blocks which are created by placing two slabs of the same kind on each other."), tiles = images, is_ground_content = false, groups = dgroups, diff --git a/mods/ITEMS/mcl_stairs/locale/mcl_stairs.de.tr b/mods/ITEMS/mcl_stairs/locale/mcl_stairs.de.tr new file mode 100644 index 000000000..495aa577b --- /dev/null +++ b/mods/ITEMS/mcl_stairs/locale/mcl_stairs.de.tr @@ -0,0 +1,101 @@ +# textdomain: mcl_stairs +Stairs are useful to reach higher places by walking over them; jumping is not required. Placing stairs in a corner pattern will create corner stairs. Stairs placed on the ceiling or at the upper half of the side of a block will be placed upside down.=Treppen sind nützlich, um auf höheres Gelände nur mit Gehen zu kommen, man muss nicht springen. Wenn Treppen in einem Eckmuster platziert werden, werden Ecktreppen erzeugt. Treppen, die an die Decke oder der oberen Hälfte eines Blocks platziert werden, werden verkehrt herum platziert. +Double @1=@1 (doppelt) +Slabs are half as high as their full block counterparts and occupy either the lower or upper part of a block, depending on how it was placed. Slabs can be easily stepped on without needing to jump. When a slab is placed on another slab of the same type, a double slab is created.=Eine Platte ist halb so hoch wie ihr Vollblock-Gegenstück und belegt entweder den unteren oder unteren Teil eines Blocks, je nach dem, wie er platziert wurde. Platten können leicht betreten werden, ohne springen zu müssen. Wird eine Platte auf einer anderen gleichen Platte platziert, ergibt das eine Doppelplatte. +Upper @1=@1 (oben) +Double slabs are full blocks which are created by placing two slabs of the same kind on each other.=Doppelplatten sind ganze Blöcke, die entstehen, wenn zwei gleiche Platten aufeinander gestapelt werden. +Oak Wood Stairs=Eichenholztreppe +Oak Wood Slab=Eichenholzplatte +Double Oak Wood Slab=Doppeleichenholzplatte +Jungle Wood Stairs=Dschungelholztreppe +Jungle Wood Slab=Dschungelholzplatte +Double Jungle Wood Slab=Doppeldschungelholzplatte +Acacia Wood Stairs=Akazienholztreppe +Acacia Wood Slab=Akazienholzplatte +Double Acacia Wood Slab=Doppelakazienholzplatte +Spruce Wood Stairs=Fichtenholztreppe +Spruce Wood Slab=Fichtenholzplatte +Double Spruce Wood Slab=Doppelfichtenholzplatte +Birch Wood Stairs=Birkenholztreppe +Birch Wood Slab=Birkenholzplatte +Double Birch Wood Slab=Doppelbirkenholzplatte +Dark Oak Wood Stairs=Schwarzeichenholzstreppe +Dark Oak Wood Slab=Schwarzeichenholzplatte +Double Dark Oak Wood Slab=Doppelschwarzeichenholzplatte +Stone Stairs=Steintreppe +Stone Slab=Steinplatte +Double Stone Slab=Doppelsteinplatte +Polished Stone Slab=Polierte Steinplatte +Double Polished Stone Slab=Doppelte polierte Steinplatte +Andesite Stairs=Andesittreppe +Andesite Slab=Andesitplatte +Double Andesite Slab=Doppelandesitplatte +Granite Stairs=Granittreppe +Granite Slab=Granitplatte +Double Granite Slab=Doppelgranitplatte +Diorite Stairs=Diorittreppe +Diorite Slab=Dioritplatte +Double Diorite Slab=Doppeldioritplatte +Cobblestone Stairs=Kopfsteinpflastertreppe +Cobblestone Slab=Kopfsteinpflasterplatte +Double Cobblestone Slab=Doppelkopfsteinpflasterplatte +Moss Stone Stairs=Moossteintreppe +Moss Stone Slab=Moossteinplatte +Double Moss Stone Slab=Doppelmoossteinplatte +Brick Stairs=Ziegeltreppe +Brick Slab=Ziegelplatte +Double Brick Slab=Doppelziegelplatte +Sandstone Stairs=Sandsteintreppe +Sandstone Slab=Sandsteinplatte +Double Sandstone Slab=Doppelsandsteinplatte +Smooth Sandstone Stairs=Glatte Sandsteintreppe +Smooth Sandstone Slab=Glatte Sandsteinplatte +Double Smooth Sandstone Slab=Doppelte glatte Sandsteinplatte +Red Sandstone Stairs=Rote Sandsteintreppe +Red Sandstone Slab=Rote Sandsteinplatte +Double Red Sandstone Slab=Doppelte rote Sandsteinplatte +Smooth Red Sandstone Stairs=Glatte rote Sandsteintreppe +Smooth Red Sandstone Slab=Glatte rote Sandsteinplatte +Double Smooth Red Sandstone Slab=Doppelte glatte rote Sandsteinplatte +Stone Bricks Stairs=Steinziegeltreppe +Stone Bricks Slab=Steinziegelplatte +Double Stone Bricks Slab=Doppelsteinziegelplatte +Quartz Stairs=Quarztreppe +Quartz Slab=Quarzplatte +Double Quartz Slab=Doppelquarzplatte +Smooth Quartz Stairs=Glatte Quarztreppe +Smooth Quartz Slab=Glatte Quarzplatte +Double Smooth Quartz Slab=Doppelte glatte Quarzplatte +Nether Brick Stairs=Netherziegeltreppe +Nether Brick Slab=Netherziegelplatte +Double Nether Brick Slab=Doppelte Netherziegelplatte +Red Nether Brick Stairs=Rote Netherbricktreppe +Red Nether Brick Slab=Rote Netherbrickplatte +Double Red Nether Brick Slab=Doppelte rote Netherbricktreppe +End Stone Brick Stairs=Endsteinziegeltreppe +End Stone Brick Slab=Endsteinziegelplatte +Double End Stone Brick Slab=Doppelte Endsteinziegelplatte +Purpur Stairs=Purpurtreppe +Purpur Slab=Purpurplatte +Double Purpur Slab=Doppelte Purpurplatte +Prismarine Stairs=Prismarintreppe +Prismarine Slab=Prismarinplatte +Double Prismarine Slab=Doppelte Prismarinplatte +Prismarine Brick Stairs=Prismarinziegeltreppe +Prismarine Brick Slab=Prismarinziegelplatte +Double Prismarine Brick Slab=Doppelte Prismarinziegelplatte +Dark Prismarine Stairs=Dunkelprismarintreppe +Dark Prismarine Slab=Dunkelprismarinplatte +Double Dark Prismarine Slab=Doppeldunkelprismarinplatte +Polished Andesite Slab=Polierte Andesitplatte +Double Polished Andesite Slab=Doppelte polierte Andesitplatte +Polished Andesite Stairs=Polierte Andesittreppe +Polished Granite Slab=Polierte Granitplatte +Double Polished Granite Slab=Doppelte polierte Granitplatte +Polished Granite Stairs=Polierte Granittreppe +Polished Diorite Slab=Polierte Dioritplatte +Double Polished Diorite Slab=Doppelte polierte Dioritplatte +Polished Diorite Stairs=Polierte Diorittreppe +Mossy Stone Brick Stairs=Moosige Steinziegeltreppe +Mossy Stone Brick Slab=Moosige Steinziegelplatte +Double Mossy Stone Brick Slab=Doppelte Steinziegelplatte diff --git a/mods/ITEMS/mcl_stairs/locale/template.txt b/mods/ITEMS/mcl_stairs/locale/template.txt new file mode 100644 index 000000000..bec58b3ae --- /dev/null +++ b/mods/ITEMS/mcl_stairs/locale/template.txt @@ -0,0 +1,101 @@ +# textdomain: mcl_stairs +Stairs are useful to reach higher places by walking over them; jumping is not required. Placing stairs in a corner pattern will create corner stairs. Stairs placed on the ceiling or at the upper half of the side of a block will be placed upside down.= +Double @1= +Slabs are half as high as their full block counterparts and occupy either the lower or upper part of a block, depending on how it was placed. Slabs can be easily stepped on without needing to jump. When a slab is placed on another slab of the same type, a double slab is created.= +Upper @1= +Double slabs are full blocks which are created by placing two slabs of the same kind on each other.= +Oak Wood Stairs= +Oak Wood Slab= +Double Oak Wood Slab= +Jungle Wood Stairs= +Jungle Wood Slab= +Double Jungle Wood Slab= +Acacia Wood Stairs= +Acacia Wood Slab= +Double Acacia Wood Slab= +Spruce Wood Stairs= +Spruce Wood Slab= +Double Spruce Wood Slab= +Birch Wood Stairs= +Birch Wood Slab= +Double Birch Wood Slab= +Dark Oak Wood Stairs= +Dark Oak Wood Slab= +Double Dark Oak Wood Slab= +Stone Stairs= +Stone Slab= +Double Stone Slab= +Polished Stone Slab= +Double Polished Stone Slab= +Andesite Stairs= +Andesite Slab= +Double Andesite Slab= +Granite Stairs= +Granite Slab= +Double Granite Slab= +Diorite Stairs= +Diorite Slab= +Double Diorite Slab= +Cobblestone Stairs= +Cobblestone Slab= +Double Cobblestone Slab= +Moss Stone Stairs= +Moss Stone Slab= +Double Moss Stone Slab= +Brick Stairs= +Brick Slab= +Double Brick Slab= +Sandstone Stairs= +Sandstone Slab= +Double Sandstone Slab= +Smooth Sandstone Stairs= +Smooth Sandstone Slab= +Double Smooth Sandstone Slab= +Red Sandstone Stairs= +Red Sandstone Slab= +Double Red Sandstone Slab= +Smooth Red Sandstone Stairs= +Smooth Red Sandstone Slab= +Double Smooth Red Sandstone Slab= +Stone Bricks Stairs= +Stone Bricks Slab= +Double Stone Bricks Slab= +Quartz Stairs= +Quartz Slab= +Double Quartz Slab= +Smooth Quartz Stairs= +Smooth Quartz Slab= +Double Smooth Quartz Slab= +Nether Brick Stairs= +Nether Brick Slab= +Double Nether Brick Slab= +Red Nether Brick Stairs= +Red Nether Brick Slab= +Double Red Nether Brick Slab= +End Stone Brick Stairs= +End Stone Brick Slab= +Double End Stone Brick Slab= +Purpur Stairs= +Purpur Slab= +Double Purpur Slab= +Prismarine Stairs= +Prismarine Slab= +Double Prismarine Slab= +Prismarine Brick Stairs= +Prismarine Brick Slab= +Double Prismarine Brick Slab= +Dark Prismarine Stairs= +Dark Prismarine Slab= +Double Dark Prismarine Slab= +Polished Andesite Slab= +Double Polished Andesite Slab= +Polished Andesite Stairs= +Polished Granite Slab= +Double Polished Granite Slab= +Polished Granite Stairs= +Polished Diorite Slab= +Double Polished Diorite Slab= +Polished Diorite Stairs= +Mossy Stone Brick Stairs= +Mossy Stone Brick Slab= +Double Mossy Stone Brick Slab= diff --git a/mods/ITEMS/mcl_stairs/register.lua b/mods/ITEMS/mcl_stairs/register.lua index 700852fdd..fbbedf2c6 100644 --- a/mods/ITEMS/mcl_stairs/register.lua +++ b/mods/ITEMS/mcl_stairs/register.lua @@ -3,13 +3,15 @@ -- slabs actually take slightly longer to be dug than their stair counterparts. -- Note sure if it is a good idea to preserve this oddity. +local S = minetest.get_translator("mcl_stairs") + local woods = { - { "wood", "default_wood.png", "Oak Wood Stairs", "Oak Wood Slab", "Double Oak Wood Slab" }, - { "junglewood", "default_junglewood.png", "Jungle Wood Stairs", "Jungle Wood Slab", "Double Jungle Wood Slab" }, - { "acaciawood", "default_acacia_wood.png", "Acacia Wood Stairs", "Acacia Wood Slab", "Double Acacia Wood Slab" }, - { "sprucewood", "mcl_core_planks_spruce.png", "Spruce Wood Stairs", "Spruce Wood Slab", "Double Spruce Wood Slab" }, - { "birchwood", "mcl_core_planks_birch.png", "Birch Wood Stairs", "Birch Wood Slab", "Double Birch Wood Slab" }, - { "darkwood", "mcl_core_planks_big_oak.png", "Dark Oak Wood Stairs", "Dark Oak Wood Slab", "Double Dark Oak Wood Slab" }, + { "wood", "default_wood.png", S("Oak Wood Stairs"), S("Oak Wood Slab"), S("Double Oak Wood Slab") }, + { "junglewood", "default_junglewood.png", S("Jungle Wood Stairs"), S("Jungle Wood Slab"), S("Double Jungle Wood Slab") }, + { "acaciawood", "default_acacia_wood.png", S("Acacia Wood Stairs"), S("Acacia Wood Slab"), S("Double Acacia Wood Slab") }, + { "sprucewood", "mcl_core_planks_spruce.png", S("Spruce Wood Stairs"), S("Spruce Wood Slab"), S("Double Spruce Wood Slab") }, + { "birchwood", "mcl_core_planks_birch.png", S("Birch Wood Stairs"), S("Birch Wood Slab"), S("Double Birch Wood Slab") }, + { "darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Wood Stairs"), S("Dark Oak Wood Slab"), S("Double Dark Oak Wood Slab") }, } for w=1, #woods do @@ -30,131 +32,131 @@ for w=1, #woods do wood[5]) end -mcl_stairs.register_stair_and_slab_simple("stone_rough", "mcl_core:stone", "Stone Stairs", "Stone Slab", "Double Stone Slab") +mcl_stairs.register_stair_and_slab_simple("stone_rough", "mcl_core:stone", S("Stone Stairs"), S("Stone Slab"), S("Double Stone Slab")) mcl_stairs.register_slab("stone", "mcl_core:stone_smooth", {pickaxey=1, material_stone=1}, {"mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_side.png"}, - "Polished Stone Slab", - mcl_sounds.node_sound_stone_defaults(), 2, "Double Polished Stone Slab") + S("Polished Stone Slab"), + mcl_sounds.node_sound_stone_defaults(), 2, S("Double Polished Stone Slab")) -mcl_stairs.register_stair_and_slab_simple("andesite", "mcl_core:andesite", "Andesite Stairs", "Andesite Slab", "Double Andesite Slab") -mcl_stairs.register_stair_and_slab_simple("granite", "mcl_core:granite", "Granite Stairs", "Granite Slab", "Double Granite Slab") -mcl_stairs.register_stair_and_slab_simple("diorite", "mcl_core:diorite", "Diorite Stairs", "Diorite Slab", "Double Diorite Slab") +mcl_stairs.register_stair_and_slab_simple("andesite", "mcl_core:andesite", S("Andesite Stairs"), S("Andesite Slab"), S("Double Andesite Slab")) +mcl_stairs.register_stair_and_slab_simple("granite", "mcl_core:granite", S("Granite Stairs"), S("Granite Slab"), S("Double Granite Slab")) +mcl_stairs.register_stair_and_slab_simple("diorite", "mcl_core:diorite", S("Diorite Stairs"), S("Diorite Slab"), S("Double Diorite Slab")) -mcl_stairs.register_stair_and_slab_simple("cobble", "mcl_core:cobble", "Cobblestone Stairs", "Cobblestone Slab", "Double Cobblestone Slab") -mcl_stairs.register_stair_and_slab_simple("mossycobble", "mcl_core:mossycobble", "Moss Stone Stairs", "Moss Stone Slab", "Double Moss Stone Slab") +mcl_stairs.register_stair_and_slab_simple("cobble", "mcl_core:cobble", S("Cobblestone Stairs"), S("Cobblestone Slab"), S("Double Cobblestone Slab")) +mcl_stairs.register_stair_and_slab_simple("mossycobble", "mcl_core:mossycobble", S("Moss Stone Stairs"), S("Moss Stone Slab"), S("Double Moss Stone Slab")) -mcl_stairs.register_stair_and_slab_simple("brick_block", "mcl_core:brick_block", "Brick Stairs", "Brick Slab", "Double Brick Slab") +mcl_stairs.register_stair_and_slab_simple("brick_block", "mcl_core:brick_block", S("Brick Stairs"), S("Brick Slab"), S("Double Brick Slab")) -mcl_stairs.register_stair("sandstone", "group:sandstone", +mcl_stairs.register_stair("sandstone", "group:normal_sandstone", {pickaxey=1, material_stone=1}, {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"}, - "Sandstone Stairs", + S("Sandstone Stairs"), mcl_sounds.node_sound_stone_defaults(), 0.8, nil, "mcl_core:sandstone") -mcl_stairs.register_slab("sandstone", "group:sandstone", +mcl_stairs.register_slab("sandstone", "group:normal_sandstone", {pickaxey=1, material_stone=1}, {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"}, - "Sandstone Slab", - mcl_sounds.node_sound_stone_defaults(), 2, "Double Sandstone Slab", "mcl_core:sandstone") -mcl_stairs.register_stair_and_slab_simple("sandstonesmooth2", "mcl_core:sandstonesmooth2", "Smooth Sandstone Stairs", "Smooth Sandstone Slab", "Double Smooth Sandstone Slab") + S("Sandstone Slab"), + mcl_sounds.node_sound_stone_defaults(), 2, S("Double Sandstone Slab"), "mcl_core:sandstone") +mcl_stairs.register_stair_and_slab_simple("sandstonesmooth2", "mcl_core:sandstonesmooth2", S("Smooth Sandstone Stairs"), S("Smooth Sandstone Slab"), S("Double Smooth Sandstone Slab")) -mcl_stairs.register_stair("redsandstone", "group:redsandstone", +mcl_stairs.register_stair("redsandstone", "group:red_sandstone", {pickaxey=1, material_stone=1}, {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"}, - "Red Sandstone Stairs", + S("Red Sandstone Stairs"), mcl_sounds.node_sound_stone_defaults(), 0.8, nil, "mcl_core:redsandstone") -mcl_stairs.register_slab("redsandstone", "group:redsandstone", +mcl_stairs.register_slab("redsandstone", "group:red_sandstone", {pickaxey=1, material_stone=1}, {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"}, - "Red Sandstone Slab", - mcl_sounds.node_sound_stone_defaults(), 2, "Double Red Sandstone Slab", "mcl_core:redsandstone") -mcl_stairs.register_stair_and_slab_simple("redsandstonesmooth2", "mcl_core:redsandstonesmooth2", "Smooth Red Sandstone Stairs", "Smooth Red Sandstone Slab", "Double Smooth Red Sandstone Slab") + S("Red Sandstone Slab"), + mcl_sounds.node_sound_stone_defaults(), 2, S("Double Red Sandstone Slab"), "mcl_core:redsandstone") +mcl_stairs.register_stair_and_slab_simple("redsandstonesmooth2", "mcl_core:redsandstonesmooth2", S("Smooth Red Sandstone Stairs"), S("Smooth Red Sandstone Slab"), S("Double Smooth Red Sandstone Slab")) -- Intentionally not group:stonebrick because of mclx_stairs mcl_stairs.register_stair("stonebrick", "mcl_core:stonebrick", {pickaxey=1, material_stone=1}, {"default_stone_brick.png"}, - "Stone Bricks Stairs", + S("Stone Bricks Stairs"), mcl_sounds.node_sound_stone_defaults(), 1.5, nil, "mcl_core:stonebrick") mcl_stairs.register_slab("stonebrick", "mcl_core:stonebrick", {pickaxey=1, material_stone=1}, {"default_stone_brick.png"}, - "Stone Bricks Slab", - mcl_sounds.node_sound_stone_defaults(), 2, "Double Stone Bricks Slab", "mcl_core:stonebrick") + S("Stone Bricks Slab"), + mcl_sounds.node_sound_stone_defaults(), 2, S("Double Stone Bricks Slab"), "mcl_core:stonebrick") mcl_stairs.register_stair("quartzblock", "group:quartz_block", {pickaxey=1, material_stone=1}, {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"}, - "Quartz Stairs", + S("Quartz Stairs"), mcl_sounds.node_sound_stone_defaults(), 0.8, nil, "mcl_nether:quartz_block") mcl_stairs.register_slab("quartzblock", "group:quartz_block", {pickaxey=1, material_stone=1}, {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"}, - "Quartz Slab", - mcl_sounds.node_sound_stone_defaults(), 2, "Double Quartz Slab", "mcl_nether:quartz_block") + S("Quartz Slab"), + mcl_sounds.node_sound_stone_defaults(), 2, S("Double Quartz Slab"), "mcl_nether:quartz_block") -mcl_stairs.register_stair_and_slab_simple("quartz_smooth", "mcl_nether:quartz_smooth", "Smooth Quartz Stairs", "Smooth Quartz Slab", "Double Smooth Quartz Slab") +mcl_stairs.register_stair_and_slab_simple("quartz_smooth", "mcl_nether:quartz_smooth", S("Smooth Quartz Stairs"), S("Smooth Quartz Slab"), S("Double Smooth Quartz Slab")) mcl_stairs.register_stair_and_slab("nether_brick", "mcl_nether:nether_brick", {pickaxey=1, material_stone=1}, {"mcl_nether_nether_brick.png"}, - "Nether Brick Stairs", - "Nether Brick Slab", + S("Nether Brick Stairs"), + S("Nether Brick Slab"), mcl_sounds.node_sound_stone_defaults(), 2, - "Double Nether Brick Slab") + S("Double Nether Brick Slab")) mcl_stairs.register_stair_and_slab("red_nether_brick", "mcl_nether:red_nether_brick", {pickaxey=1, material_stone=1}, {"mcl_nether_red_nether_brick.png"}, - "Red Nether Brick Stairs", - "Red Nether Brick Slab", + S("Red Nether Brick Stairs"), + S("Red Nether Brick Slab"), mcl_sounds.node_sound_stone_defaults(), 2, - "Double Red Nether Brick Slab") + S("Double Red Nether Brick Slab")) -mcl_stairs.register_stair_and_slab_simple("end_bricks", "mcl_end:end_bricks", "End Stone Brick Stairs", "End Stone Brick Slab", "Double End Stone Brick Slab") +mcl_stairs.register_stair_and_slab_simple("end_bricks", "mcl_end:end_bricks", S("End Stone Brick Stairs"), S("End Stone Brick Slab"), S("Double End Stone Brick Slab")) mcl_stairs.register_stair("purpur_block", "group:purpur_block", {pickaxey=1, material_stone=1}, {"mcl_end_purpur_block.png"}, - "Purpur Stairs", + S("Purpur Stairs"), mcl_sounds.node_sound_stone_defaults(), 1.5) mcl_stairs.register_slab("purpur_block", "group:purpur_block", {pickaxey=1, material_stone=1}, {"mcl_end_purpur_block.png"}, - "Purpur Slab", + S("Purpur Slab"), mcl_sounds.node_sound_stone_defaults(), 2, - "Double Purpur Slab") + S("Double Purpur Slab")) -mcl_stairs.register_stair_and_slab_simple("prismarine", "mcl_ocean:prismarine", "Prismarine Stairs", "Prismarine Slab", "Double Prismarine Slab") +mcl_stairs.register_stair_and_slab_simple("prismarine", "mcl_ocean:prismarine", S("Prismarine Stairs"), S("Prismarine Slab"), S("Double Prismarine Slab")) -mcl_stairs.register_stair_and_slab_simple("prismarine_brick", "mcl_ocean:prismarine_brick", "Prismarine Brick Stairs", "Prismarine Brick Slab", "Double Prismarine Brick Slab") -mcl_stairs.register_stair_and_slab_simple("prismarine_dark", "mcl_ocean:prismarine_dark", "Dark Prismarine Stairs", "Dark Prismarine Slab", "Double Dark Prismarine Slab") +mcl_stairs.register_stair_and_slab_simple("prismarine_brick", "mcl_ocean:prismarine_brick", S("Prismarine Brick Stairs"), S("Prismarine Brick Slab"), S("Double Prismarine Brick Slab")) +mcl_stairs.register_stair_and_slab_simple("prismarine_dark", "mcl_ocean:prismarine_dark", S("Dark Prismarine Stairs"), S("Dark Prismarine Slab"), S("Double Dark Prismarine Slab")) -mcl_stairs.register_slab("andesite_smooth", "mcl_core:andesite_smooth", {pickaxey=1}, {"mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"}, "Polished Andesite Slab", nil, nil, "Double Polished Andesite Slab") -mcl_stairs.register_stair("andesite_smooth", "mcl_core:andesite_smooth", {pickaxey=1}, {"mcl_stairs_andesite_smooth_slab.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"}, "Polished Andesite Stairs", nil, nil, "woodlike") +mcl_stairs.register_slab("andesite_smooth", "mcl_core:andesite_smooth", {pickaxey=1}, {"mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"}, S("Polished Andesite Slab"), nil, nil, S("Double Polished Andesite Slab")) +mcl_stairs.register_stair("andesite_smooth", "mcl_core:andesite_smooth", {pickaxey=1}, {"mcl_stairs_andesite_smooth_slab.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"}, S("Polished Andesite Stairs"), nil, nil, "woodlike") -mcl_stairs.register_slab("granite_smooth", "mcl_core:granite_smooth", {pickaxey=1}, {"mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"}, "Polished Granite Slab", nil, nil, "Double Polished Granite Slab") -mcl_stairs.register_stair("granite_smooth", "mcl_core:granite_smooth", {pickaxey=1}, {"mcl_stairs_granite_smooth_slab.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"}, "Polished Granite Stairs", nil, nil, "woodlike") +mcl_stairs.register_slab("granite_smooth", "mcl_core:granite_smooth", {pickaxey=1}, {"mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"}, S("Polished Granite Slab"), nil, nil, S("Double Polished Granite Slab")) +mcl_stairs.register_stair("granite_smooth", "mcl_core:granite_smooth", {pickaxey=1}, {"mcl_stairs_granite_smooth_slab.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"}, S("Polished Granite Stairs"), nil, nil, "woodlike") -mcl_stairs.register_slab("diorite_smooth", "mcl_core:diorite_smooth", {pickaxey=1}, {"mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"}, "Polished Diorite Slab", nil, nil, "Double Polished Diorite Slab") -mcl_stairs.register_stair("diorite_smooth", "mcl_core:diorite_smooth", {pickaxey=1}, {"mcl_stairs_diorite_smooth_slab.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"}, "Polished Diorite Stairs", nil, nil, "woodlike") +mcl_stairs.register_slab("diorite_smooth", "mcl_core:diorite_smooth", {pickaxey=1}, {"mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"}, S("Polished Diorite Slab"), nil, nil, S("Double Polished Diorite Slab")) +mcl_stairs.register_stair("diorite_smooth", "mcl_core:diorite_smooth", {pickaxey=1}, {"mcl_stairs_diorite_smooth_slab.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"}, S("Polished Diorite Stairs"), nil, nil, "woodlike") mcl_stairs.register_stair("stonebrickmossy", "mcl_core:stonebrickmossy", {pickaxey=1}, {"mcl_core_stonebrick_mossy.png"}, - "Mossy Stone Brick Stairs", + S("Mossy Stone Brick Stairs"), mcl_sounds.node_sound_stone_defaults(), 1.5, nil, "mcl_core:stonebrickmossy") mcl_stairs.register_slab("stonebrickmossy", "mcl_core:stonebrickmossy", {pickaxey=1}, {"mcl_core_stonebrick_mossy.png"}, - "Mossy Stone Brick Slab", - mcl_sounds.node_sound_stone_defaults(), 2, "Double Mossy Stone Brick Slab", "mcl_core:stonebrickmossy") + S("Mossy Stone Brick Slab"), + mcl_sounds.node_sound_stone_defaults(), 2, S("Double Mossy Stone Brick Slab"), "mcl_core:stonebrickmossy") diff --git a/mods/ITEMS/mcl_throwing/README.md b/mods/ITEMS/mcl_throwing/README.md new file mode 100644 index 000000000..c91a537e8 --- /dev/null +++ b/mods/ITEMS/mcl_throwing/README.md @@ -0,0 +1,26 @@ +# `mcl_throwing` + +It's a MineClone 2 mod containing throwable items like snowballs. + +## License of code + +- MIT License + +## License of media + +- `mcl_throwing_snowball_impact_soft.ogg`: + - License: CC BY 3.0 + - Author: YleArkisto (freesound.org) + - Source: + - Original title: `sfx_snowball_hit-03.wav` (file was edited) +- `mcl_throwing_snowball_impact_hard.ogg`: + - License: CC0 + - Author: Julien Matthey (freesound.org) + - Source: + - Original title: `JM_IMPACT_01c - Snow on cement.wav` (file was edited) +- `mcl_throwing_egg_impact.ogg`: + - License: CC0 + - Author: dav0r (freesound.org) + - Source: + - Original title: `d0_step_on_egg_04` (file was edited) +- Everything else: See MineClone 2 license infos diff --git a/mods/ITEMS/mcl_throwing/depends.txt b/mods/ITEMS/mcl_throwing/depends.txt index faf0d2d4f..2787220ee 100644 --- a/mods/ITEMS/mcl_throwing/depends.txt +++ b/mods/ITEMS/mcl_throwing/depends.txt @@ -1,3 +1,4 @@ mcl_core? mcl_mobitems? doc? +mcl_fishing diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index ee0b4fcb1..5897a6922 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -1,5 +1,9 @@ mcl_throwing = {} +local S = minetest.get_translator("mcl_throwing") +local mod_death_messages = minetest.get_modpath("mcl_death_messages") +local mod_fishing = minetest.get_modpath("mcl_fishing") + -- -- Snowballs and other throwable items -- @@ -7,18 +11,20 @@ mcl_throwing = {} local GRAVITY = tonumber(minetest.settings:get("movement_gravity")) local entity_mapping = { + ["mcl_throwing:flying_bobber"] = "mcl_throwing:flying_bobber_entity", ["mcl_throwing:snowball"] = "mcl_throwing:snowball_entity", ["mcl_throwing:egg"] = "mcl_throwing:egg_entity", ["mcl_throwing:ender_pearl"] = "mcl_throwing:ender_pearl_entity", } local velocities = { + ["mcl_throwing:flying_bobber_entity"] = 5, ["mcl_throwing:snowball_entity"] = 22, ["mcl_throwing:egg_entity"] = 22, ["mcl_throwing:ender_pearl_entity"] = 22, } -mcl_throwing.throw = function(throw_item, pos, dir, velocity) +mcl_throwing.throw = function(throw_item, pos, dir, velocity, thrower) if velocity == nil then velocity = velocities[throw_item] end @@ -28,18 +34,20 @@ mcl_throwing.throw = function(throw_item, pos, dir, velocity) local itemstring = ItemStack(throw_item):get_name() local obj = minetest.add_entity(pos, entity_mapping[itemstring]) - obj:setvelocity({x=dir.x*velocity, y=dir.y*velocity, z=dir.z*velocity}) - obj:setacceleration({x=dir.x*-3, y=-GRAVITY, z=dir.z*-3}) + obj:set_velocity({x=dir.x*velocity, y=dir.y*velocity, z=dir.z*velocity}) + obj:set_acceleration({x=dir.x*-3, y=-GRAVITY, z=dir.z*-3}) + if thrower then + obj:get_luaentity()._thrower = thrower + end return obj end -- Throw item -local throw_function = function(entity_name, velocity) +local player_throw_function = function(entity_name, velocity) local func = function(item, player, pointed_thing) local playerpos = player:get_pos() local dir = player:get_look_dir() - local obj = mcl_throwing.throw(item, {x=playerpos.x, y=playerpos.y+1.5, z=playerpos.z}, dir, velocity) - obj:get_luaentity()._thrower = player:get_player_name() + local obj = mcl_throwing.throw(item, {x=playerpos.x, y=playerpos.y+1.5, z=playerpos.z}, dir, velocity, player:get_player_name()) if not minetest.settings:get_bool("creative_mode") then item:take_item() end @@ -56,9 +64,14 @@ end -- Staticdata handling because objects may want to be reloaded local get_staticdata = function(self) + local thrower + -- Only save thrower if it's a player name + if type(self._thrower) == "string" then + thrower = self._thrower + end local data = { _lastpos = self._lastpos, - _thrower = self._thrower, + _thrower = thrower, } return minetest.serialize(data) end @@ -78,9 +91,11 @@ local snowball_ENTITY={ textures = {"mcl_throwing_snowball.png"}, visual_size = {x=0.5, y=0.5}, collisionbox = {0,0,0,0,0,0}, + pointable = false, get_staticdata = get_staticdata, on_activate = on_activate, + _thrower = nil, _lastpos={}, } @@ -90,9 +105,11 @@ local egg_ENTITY={ textures = {"mcl_throwing_egg.png"}, visual_size = {x=0.45, y=0.45}, collisionbox = {0,0,0,0,0,0}, + pointable = false, get_staticdata = get_staticdata, on_activate = on_activate, + _thrower = nil, _lastpos={}, } @@ -103,6 +120,7 @@ local pearl_ENTITY={ textures = {"mcl_throwing_ender_pearl.png"}, visual_size = {x=0.9, y=0.9}, collisionbox = {0,0,0,0,0,0}, + pointable = false, get_staticdata = get_staticdata, on_activate = on_activate, @@ -111,6 +129,54 @@ local pearl_ENTITY={ _thrower = nil, -- Player ObjectRef of the player who threw the ender pearl } +local flying_bobber_ENTITY={ + physical = false, + timer=0, + textures = {"mcl_fishing_bobber.png"}, --FIXME: Replace with correct texture. + visual_size = {x=0.5, y=0.5}, + collisionbox = {0,0,0,0,0,0}, + pointable = false, + + get_staticdata = get_staticdata, + on_activate = on_activate, + + _lastpos={}, + _thrower = nil, + objtype="fishing", +} + +local check_object_hit = function(self, pos, mob_damage) + for _,object in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do + + local entity = object:get_luaentity() + + if entity + and entity.name ~= self.object:get_luaentity().name then + + if object:is_player() and self._thrower ~= object:get_player_name() then + -- TODO: Deal knockback + self.object:remove() + return true + elseif entity._cmi_is_mob == true and (self._thrower ~= object) then + local dmg = {} + if mob_damage then + dmg = mob_damage(entity.name) + end + + -- FIXME: Knockback is broken + object:punch(self.object, 1.0, { + full_punch_interval = 1.0, + damage_groups = dmg, + }, nil) + + self.object:remove() + return true + end + end + end + return false +end + -- Snowball on_step()--> called when snowball is moving. local snowball_on_step = function(self, dtime) self.timer=self.timer+dtime @@ -121,10 +187,25 @@ local snowball_on_step = function(self, dtime) -- Destroy when hitting a solid node if self._lastpos.x~=nil then if (def and def.walkable) or not def then + minetest.sound_play("mcl_throwing_snowball_impact_hard", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 }) self.object:remove() return end end + + local mob_damage = function(mobname) + if mobname == "mobs_mc:blaze" then + return {fleshy = 3} + else + return {} + end + end + + if check_object_hit(self, pos, mob_damage) then + minetest.sound_play("mcl_throwing_snowball_impact_soft", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 }) + return + end + self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set _lastpos-->Node will be added at last pos outside the node end @@ -135,7 +216,7 @@ local egg_on_step = function(self, dtime) local node = minetest.get_node(pos) local def = minetest.registered_nodes[node.name] - -- Destroy when hitting a solid node + -- Destroy when hitting a solid node with chance to spawn chicks if self._lastpos.x~=nil then if (def and def.walkable) or not def then -- 1/8 chance to spawn a chick @@ -175,10 +256,18 @@ local egg_on_step = function(self, dtime) end end end + minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }) self.object:remove() return end end + + -- Destroy when hitting a mob or player (no chick spawning) + if check_object_hit(self, pos) then + minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }) + return + end + self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node end @@ -208,7 +297,7 @@ local pearl_on_step = function(self, dtime) -- First determine good teleport position local dir = {x=0, y=0, z=0} - local v = self.object:getvelocity() + local v = self.object:get_velocity() if walkable then local vc = table.copy(v) -- vector for calculating -- Node is walkable, we have to find a place somewhere outside of that node @@ -261,8 +350,8 @@ local pearl_on_step = function(self, dtime) local oldpos = player:get_pos() -- Teleport and hurt player - player:setpos(telepos) - player:set_hp(player:get_hp() - 5) + player:set_pos(telepos) + player:set_hp(player:get_hp() - 5, { type = "fall", origin = "mod" }) -- 5% chance to spawn endermite at the player's origin local r = math.random(1,20) @@ -278,49 +367,75 @@ local pearl_on_step = function(self, dtime) self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node end +-- Movement function of flying bobber +local flying_bobber_on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:get_pos() + local node = minetest.get_node(pos) + local def = minetest.registered_nodes[node.name] + --local player = minetest.get_player_by_name(self._thrower) + + -- Destroy when hitting a solid node + if self._lastpos.x~=nil then + if (def and (def.walkable or def.liquidtype == "flowing" or def.liquidtype == "source")) or not def then + local make_child= function(object) + local ent = object:get_luaentity() + ent.player = self._thrower + ent.child = true + end + make_child(minetest.add_entity(self._lastpos, "mcl_fishing:bobber_entity")) + self.object:remove() + return + end + end + self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node +end + snowball_ENTITY.on_step = snowball_on_step egg_ENTITY.on_step = egg_on_step pearl_ENTITY.on_step = pearl_on_step +flying_bobber_ENTITY.on_step = flying_bobber_on_step minetest.register_entity("mcl_throwing:snowball_entity", snowball_ENTITY) minetest.register_entity("mcl_throwing:egg_entity", egg_ENTITY) minetest.register_entity("mcl_throwing:ender_pearl_entity", pearl_ENTITY) +minetest.register_entity("mcl_throwing:flying_bobber_entity", flying_bobber_ENTITY) -local how_to_throw = "Hold it in your and and leftclick to throw." +local how_to_throw = S("Use the punch key to throw.") -- Snowball minetest.register_craftitem("mcl_throwing:snowball", { - description = "Snowball", - _doc_items_longdesc = "Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.", + description = S("Snowball"), + _doc_items_longdesc = S("Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing."), _doc_items_usagehelp = how_to_throw, inventory_image = "mcl_throwing_snowball.png", stack_max = 16, groups = { weapon_ranged = 1 }, - on_use = throw_function("mcl_throwing:snowball_entity"), + on_use = player_throw_function("mcl_throwing:snowball_entity"), _on_dispense = dispense_function, }) -- Egg minetest.register_craftitem("mcl_throwing:egg", { - description = "Egg", - _doc_items_longdesc = "Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chickens will pop out of the egg when it hits the ground.", + description = S("Egg"), + _doc_items_longdesc = S("Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg."), _doc_items_usagehelp = how_to_throw, inventory_image = "mcl_throwing_egg.png", stack_max = 16, - on_use = throw_function("mcl_throwing:egg_entity"), + on_use = player_throw_function("mcl_throwing:egg_entity"), _on_dispense = dispense_function, groups = { craftitem = 1 }, }) -- Ender Pearl minetest.register_craftitem("mcl_throwing:ender_pearl", { - description = "Ender Pearl", - _doc_items_longdesc = "An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block, a plant or vines. Each teleportation hurts the user by 5 hit points.", + description = S("Ender Pearl"), + _doc_items_longdesc = S("An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points."), _doc_items_usagehelp = how_to_throw, wield_image = "mcl_throwing_ender_pearl.png", inventory_image = "mcl_throwing_ender_pearl.png", stack_max = 16, - on_use = throw_function("mcl_throwing:ender_pearl_entity"), + on_use = player_throw_function("mcl_throwing:ender_pearl_entity"), groups = { transport = 1 }, }) diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.de.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.de.tr new file mode 100644 index 000000000..61ad254f2 --- /dev/null +++ b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.de.tr @@ -0,0 +1,9 @@ +# textdomain: mcl_throwing +@1 used the ender pearl too often.=@1 benutzte die Enderperle zu oft. +Use the punch key to throw.=Benutzen Sie die Schlagtaste zum Werfen. +Snowball=Schneeball +Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=Schneebälle können geworfen werden oder zum Spaß aus einem Werfer abgefeuert werden. Bei einem Treffer mit einem Schneeball passiert nichts. +Egg=Ei +Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=Eier können geworfen werden oder aus einem Werfer abgefeuert werden. Sie zerbrechen beim Einschlag. Mit etwas Glück werden aus dem Ei eines oder sogar 4 Küken hinausfallen. +Ender Pearl=Enderperle +An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=Eine Enderperle ist ein Gegenstand, der zur Teleportation benutzt werden kann auf Kosten der Gesundheit. Sie kann geworfen werden und teleportiert den Werfer zur Einschlagsstelle, wenn sie einen Block oder eine Pflanze trifft. Jede Teleportation verletzt den Werfer um 5 Trefferpunkte. diff --git a/mods/ITEMS/mcl_throwing/locale/template.txt b/mods/ITEMS/mcl_throwing/locale/template.txt new file mode 100644 index 000000000..c6c9313f2 --- /dev/null +++ b/mods/ITEMS/mcl_throwing/locale/template.txt @@ -0,0 +1,9 @@ +# textdomain: mcl_throwing +@1 used the ender pearl too often.= +Use the punch key to throw.= +Snowball= +Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.= +Egg= +Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.= +Ender Pearl= +An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.= diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg new file mode 100644 index 000000000..c4adf57a4 Binary files /dev/null and b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg differ diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg new file mode 100644 index 000000000..a3e0a00ab Binary files /dev/null and b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg differ diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg new file mode 100644 index 000000000..260cdb91a Binary files /dev/null and b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg differ diff --git a/mods/ITEMS/mcl_tnt/README.txt b/mods/ITEMS/mcl_tnt/README.txt index 14c73e079..5b1c10798 100644 --- a/mods/ITEMS/mcl_tnt/README.txt +++ b/mods/ITEMS/mcl_tnt/README.txt @@ -10,22 +10,10 @@ There are different ways to blow up TNT: 2. Activate it with redstone circuits Be aware of the damage radius! -License: -WTFPL (see below) +License of mod code and media: +MIT License -See also: -http://minetest.net/ +Sound credits: - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. +* tnt_explode.ogg: Jose Ortiz 'MindChamber' (CC0) +* tnt_ignite.ogg: Own derivate work of sound by Ned Bouhalassa (CC0) created in 2005, source: diff --git a/mods/ITEMS/mcl_tnt/depends.txt b/mods/ITEMS/mcl_tnt/depends.txt index 0f49dddde..548dace5d 100644 --- a/mods/ITEMS/mcl_tnt/depends.txt +++ b/mods/ITEMS/mcl_tnt/depends.txt @@ -1,5 +1,5 @@ mcl_sounds? mcl_mobitems? -mcl_hunger? mcl_death_messages? doc_identifier? +mesecons? diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index dd6ebc66a..6fa0728fb 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -1,5 +1,6 @@ +local S = minetest.get_translator("mcl_tnt") + local mod_death_messages = minetest.get_modpath("mcl_death_messages") -local mod_hunger = minetest.get_modpath("mcl_hunger") local function spawn_tnt(pos, entname) minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,}) @@ -11,7 +12,7 @@ end local function activate_if_tnt(nname, np, tnt_np, tntr) if nname == "mcl_tnt:tnt" then local e = spawn_tnt(np, nname) - e:setvelocity({x=(np.x - tnt_np.x)*5+(tntr / 4), y=(np.y - tnt_np.y)*5+(tntr / 3), z=(np.z - tnt_np.z)*5+(tntr / 4)}) + e:set_velocity({x=(np.x - tnt_np.x)*5+(tntr / 4), y=(np.y - tnt_np.y)*5+(tntr / 3), z=(np.z - tnt_np.z)*5+(tntr / 4)}) end end @@ -19,22 +20,19 @@ local function do_tnt_physics(tnt_np,tntr) local objs = minetest.get_objects_inside_radius(tnt_np, tntr) for k, obj in pairs(objs) do local ent = obj:get_luaentity() - local v = obj:getvelocity() + local v = obj:get_velocity() local p = obj:get_pos() if ent and ent.name == "mcl_tnt:tnt" then - obj:setvelocity({x=(p.x - tnt_np.x) + (tntr / 2) + v.x, y=(p.y - tnt_np.y) + tntr + v.y, z=(p.z - tnt_np.z) + (tntr / 2) + v.z}) + obj:set_velocity({x=(p.x - tnt_np.x) + (tntr / 2) + v.x, y=(p.y - tnt_np.y) + tntr + v.y, z=(p.z - tnt_np.z) + (tntr / 2) + v.z}) else if v ~= nil then - obj:setvelocity({x=(p.x - tnt_np.x) + (tntr / 4) + v.x, y=(p.y - tnt_np.y) + (tntr / 2) + v.y, z=(p.z - tnt_np.z) + (tntr / 4) + v.z}) + obj:set_velocity({x=(p.x - tnt_np.x) + (tntr / 4) + v.x, y=(p.y - tnt_np.y) + (tntr / 2) + v.y, z=(p.z - tnt_np.z) + (tntr / 4) + v.z}) else local dist = math.max(1, vector.distance(tnt_np, p)) local damage = (4 / dist) * tntr if obj:is_player() == true then if mod_death_messages then - mcl_death_messages.player_damage(obj, string.format("%s was caught in an explosion.", obj:get_player_name())) - end - if mod_hunger then - mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) + mcl_death_messages.player_damage(obj, S("@1 was caught in an explosion.", obj:get_player_name())) end end obj:set_hp(obj:get_hp() - damage) @@ -56,22 +54,26 @@ local sounds if minetest.get_modpath("mcl_sounds") then sounds = mcl_sounds.node_sound_wood_defaults() end +local tnt_mesecons +if minetest.get_modpath("mesecons") then + tnt_mesecons = {effector = { + action_on = tnt.ignite, + rules = mesecon.rules.alldirs, + }} +end minetest.register_node("mcl_tnt:tnt", { tiles = {"default_tnt_top.png", "default_tnt_bottom.png", "default_tnt_side.png", "default_tnt_side.png", "default_tnt_side.png", "default_tnt_side.png"}, is_ground_content = false, stack_max = 64, - description = "TNT", + description = S("TNT"), paramtype = "light", sunlight_propagates = true, - _doc_items_longdesc = string.format("An explosive device. When it explodes, it will hurt living beings, destroy blocks around it, throw blocks affected by gravity all over the place and light fires. A single TNT has an explosion radius of %d. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.", TNT_RANGE), - _doc_items_usagehelp = "Place the TNT on the ground and ignite it with one of the methods above. Quickly get in safe distance quickly. The TNT will start to be affected by gravity and explodes in 4 seconds.", + _doc_items_longdesc = S("An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.", TNT_RANGE), + _doc_items_usagehelp = S("Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds."), groups = { dig_immediate = 3, tnt = 1, enderman_takable=1 }, - mesecons = {effector = { - action_on = tnt.ignite, - rules = mesecon.rules.alldirs, - }}, + mesecons = tnt_mesecons, _on_ignite = function(player, pointed_thing) tnt.ignite(pointed_thing.under) return true @@ -104,9 +106,9 @@ function TNT:on_activate(staticdata) local phi = math.random(0, 65535) / 65535 * 2*math.pi local hdir_x = math.cos(phi) * 0.02 local hdir_z = math.sin(phi) * 0.02 - self.object:setvelocity({x=hdir_x, y=2, z=hdir_z}) - self.object:setacceleration({x=0, y=-10, z=0}) - self.object:settexturemod("^mcl_tnt_blink.png") + self.object:set_velocity({x=hdir_x, y=2, z=hdir_z}) + self.object:set_acceleration({x=0, y=-10, z=0}) + self.object:set_texture_mod("^mcl_tnt_blink.png") end local function add_effects(pos, radius, drops) @@ -174,9 +176,9 @@ function TNT:on_step(dtime) if self.blinktimer > 0.25 then self.blinktimer = self.blinktimer - 0.25 if self.blinkstatus then - self.object:settexturemod("") + self.object:set_texture_mod("") else - self.object:settexturemod("^mcl_tnt_blink.png") + self.object:set_texture_mod("^mcl_tnt_blink.png") end self.blinkstatus = not self.blinkstatus end diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.de.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.de.tr new file mode 100644 index 000000000..d2378a8a9 --- /dev/null +++ b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.de.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_tnt +@1 was caught in an explosion.=@1 wurde Opfer einer Explosion. +TNT=TNT +An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Ein Sprengstoff. Wenn er explodiert, wird er Lebewesen verletzen und Blöcke in der Nähe zerstören. TNT hat einen Explosionsradius von @1. Mit einer geringen Wahrscheinlichkeit werden Blöcke als Gegenstand abfallen (als ob sie abgebaut worden wären), anstatt völlig zerstört zu werden. TNT kann mit Werkzeugen, Explosionen, Feuer, Lava und Redstone-Signalen angezündet werden. +Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=Platizeren sie das TNT und zünden Sie es mit einer der obigen Methoden an. Begeben Sie sich rasch in eine sichere Entfernung. Das TNT wird anfangen, von der Schwerkraft beeinflusst zu sein und explodiert in 4 Sekunden. diff --git a/mods/ITEMS/mcl_tnt/locale/template.txt b/mods/ITEMS/mcl_tnt/locale/template.txt new file mode 100644 index 000000000..fc3ae612c --- /dev/null +++ b/mods/ITEMS/mcl_tnt/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: mcl_tnt +@1 was caught in an explosion.= +TNT= +An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals. +Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.= diff --git a/mods/ITEMS/mcl_tnt/sounds/tnt_explode.ogg b/mods/ITEMS/mcl_tnt/sounds/tnt_explode.ogg index a414ea046..1691a41bc 100644 Binary files a/mods/ITEMS/mcl_tnt/sounds/tnt_explode.ogg and b/mods/ITEMS/mcl_tnt/sounds/tnt_explode.ogg differ diff --git a/mods/ITEMS/mcl_tnt/sounds/tnt_ignite.ogg b/mods/ITEMS/mcl_tnt/sounds/tnt_ignite.ogg index 199f20674..aa232f0de 100644 Binary files a/mods/ITEMS/mcl_tnt/sounds/tnt_ignite.ogg and b/mods/ITEMS/mcl_tnt/sounds/tnt_ignite.ogg differ diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index c60aafe1c..3078d7f59 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_tools") + -- mods/default/tools.lua -- @@ -35,7 +37,9 @@ else end minetest.register_item(":", { type = "none", - _doc_items_longdesc = "You use your bare hand whenever you are not wielding any item. With your hand you can mine the weakest blocks and deal minor damage by punching. Using the hand is often a last resort, as proper mining tools and weapons are better than the hand. When you are wielding an item which is not a mining tool or a weapon, it will behave as if it were the hand when you start mining or punching. In Creative Mode, the hand is able to break all blocks instantly.", + _doc_items_longdesc = S("You use your bare hand whenever you are not wielding any item. With your hand you can mine most blocks, but this is the slowest method and only the weakest blocks will yield their useful drop. The hand also deals minor damage by punching. Using the hand is often a last resort, as proper mining tools and weapons are much better.").."\n".. + S("When you are wielding an item which is not a mining tool or a weapon, it will behave as if it were the hand when you start mining or punching.").."\n".. + S("In Creative Mode, the hand is able to break all blocks instantly."), wield_image = "wieldhand.png", wield_scale = {x=1.0,y=1.0,z=2.0}, -- According to Minecraft Wiki, the exact range is 3.975. @@ -50,21 +54,21 @@ minetest.register_item(":", { }) -- Help texts -local pickaxe_longdesc = "Pickaxes are mining tools to mine hard blocks, such as stone. A pickaxe can also be used as weapon, but it is rather inefficient." -local axe_longdesc = "An axe is your tool of choice to cut down trees, wood-based blocks and other blocks. Axes deal a lot of damage as well, but they are rather slow." -local sword_longdesc = "Swords are great in melee combat, as they are fast, deal high damage and can endure countless battles. Swords can also be used to cut down a few particular blocks, such as cobwebs." -local shovel_longdesc = "Shovels are tools for digging coarse blocks, such as dirt, sand and gravel. They can also be used to turn grass blocks to grass paths. Shovels can be used as weapons, but they are very weak." -local shovel_use = "To turn a grass block into a grass path, hold the shovel in your hand, then use (rightclick) the top or side of a grass block. This only works when there's air above the grass block." -local shears_longdesc = "Shears are tools to shear sheep, carve pumpkins and to mine a few block types. Shears are a special mining tool and can be used to obtain the original item from a grass, leaves and similar blocks." -local shears_use = "To shear a sheep and obtain its wool, rightclick it. To carve a face into a pumpkin and obtain 4 pumpkin seeds, rightclick it on one of its sides. Mining works are usual, but the drops are different for a few blocks." +local pickaxe_longdesc = S("Pickaxes are mining tools to mine hard blocks, such as stone. A pickaxe can also be used as weapon, but it is rather inefficient.") +local axe_longdesc = S("An axe is your tool of choice to cut down trees, wood-based blocks and other blocks. Axes deal a lot of damage as well, but they are rather slow.") +local sword_longdesc = S("Swords are great in melee combat, as they are fast, deal high damage and can endure countless battles. Swords can also be used to cut down a few particular blocks, such as cobwebs.") +local shovel_longdesc = S("Shovels are tools for digging coarse blocks, such as dirt, sand and gravel. They can also be used to turn grass blocks to grass paths. Shovels can be used as weapons, but they are very weak.") +local shovel_use = S("To turn a grass block into a grass path, hold the shovel in your hand, then use (rightclick) the top or side of a grass block. This only works when there's air above the grass block.") +local shears_longdesc = S("Shears are tools to shear sheep and to mine a few block types. Shears are a special mining tool and can be used to obtain the original item from grass, leaves and similar blocks that require cutting.") +local shears_use = S("To shear sheep or carve faceless pumpkins, use the “place” key on them. Faces can only be carved at the side of faceless pumpkins. Mining works as usual, but the drops are different for a few blocks.") -- Picks minetest.register_tool("mcl_tools:pick_wood", { - description = "Wooden Pickaxe", + description = S("Wooden Pickaxe"), _doc_items_longdesc = pickaxe_longdesc, _doc_items_hidden = false, inventory_image = "default_tool_woodpick.png", - groups = { tool=1 }, + groups = { tool=1, pickaxe=1 }, tool_capabilities = { -- 1/1.2 full_punch_interval = 0.83333333, @@ -78,10 +82,10 @@ minetest.register_tool("mcl_tools:pick_wood", { _repair_material = "group:wood", }) minetest.register_tool("mcl_tools:pick_stone", { - description = "Stone Pickaxe", + description = S("Stone Pickaxe"), _doc_items_longdesc = pickaxe_longdesc, inventory_image = "default_tool_stonepick.png", - groups = { tool=1 }, + groups = { tool=1, pickaxe=1 }, tool_capabilities = { -- 1/1.2 full_punch_interval = 0.83333333, @@ -95,10 +99,10 @@ minetest.register_tool("mcl_tools:pick_stone", { _repair_material = "mcl_core:cobble", }) minetest.register_tool("mcl_tools:pick_iron", { - description = "Iron Pickaxe", + description = S("Iron Pickaxe"), _doc_items_longdesc = pickaxe_longdesc, inventory_image = "default_tool_steelpick.png", - groups = { tool=1 }, + groups = { tool=1, pickaxe=1 }, tool_capabilities = { -- 1/1.2 full_punch_interval = 0.83333333, @@ -112,10 +116,10 @@ minetest.register_tool("mcl_tools:pick_iron", { _repair_material = "mcl_core:iron_ingot", }) minetest.register_tool("mcl_tools:pick_gold", { - description = "Golden Pickaxe", + description = S("Golden Pickaxe"), _doc_items_longdesc = pickaxe_longdesc, inventory_image = "default_tool_goldpick.png", - groups = { tool=1 }, + groups = { tool=1, pickaxe=1 }, tool_capabilities = { -- 1/1.2 full_punch_interval = 0.83333333, @@ -129,10 +133,10 @@ minetest.register_tool("mcl_tools:pick_gold", { _repair_material = "mcl_core:gold_ingot", }) minetest.register_tool("mcl_tools:pick_diamond", { - description = "Diamond Pickaxe", + description = S("Diamond Pickaxe"), _doc_items_longdesc = pickaxe_longdesc, inventory_image = "default_tool_diamondpick.png", - groups = { tool=1 }, + groups = { tool=1, pickaxe=1 }, tool_capabilities = { -- 1/1.2 full_punch_interval = 0.83333333, @@ -175,12 +179,18 @@ local make_grass_path = function(itemstack, placer, pointed_thing) -- Only make grass path if tool used on side or top of target node if pointed_thing.above.y < pointed_thing.under.y then - return + return itemstack end + if (minetest.get_item_group(node.name, "grass_block") == 1) then local above = table.copy(pointed_thing.under) above.y = above.y + 1 if minetest.get_node(above).name == "air" then + if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then + minetest.record_protection_violation(pointed_thing.under, placer:get_player_name()) + return itemstack + end + if not minetest.settings:get_bool("creative_mode") then -- Add wear, as if digging a level 0 shovely node local toolname = itemstack:get_name() @@ -238,13 +248,13 @@ end -- Shovels minetest.register_tool("mcl_tools:shovel_wood", { - description = "Wooden Shovel", + description = S("Wooden Shovel"), _doc_items_longdesc = shovel_longdesc, _doc_items_usagehelp = shovel_use, _doc_items_hidden = false, inventory_image = "default_tool_woodshovel.png", wield_image = "default_tool_woodshovel.png^[transformR90", - groups = { tool=1 }, + groups = { tool=1, shovel=1 }, tool_capabilities = { full_punch_interval = 1, max_drop_level=1, @@ -258,12 +268,12 @@ minetest.register_tool("mcl_tools:shovel_wood", { _repair_material = "group:wood", }) minetest.register_tool("mcl_tools:shovel_stone", { - description = "Stone Shovel", + description = S("Stone Shovel"), _doc_items_longdesc = shovel_longdesc, _doc_items_usagehelp = shovel_use, inventory_image = "default_tool_stoneshovel.png", wield_image = "default_tool_stoneshovel.png^[transformR90", - groups = { tool=1 }, + groups = { tool=1, shovel=1 }, tool_capabilities = { full_punch_interval = 1, max_drop_level=3, @@ -277,12 +287,12 @@ minetest.register_tool("mcl_tools:shovel_stone", { _repair_material = "mcl_core:cobble", }) minetest.register_tool("mcl_tools:shovel_iron", { - description = "Iron Shovel", + description = S("Iron Shovel"), _doc_items_longdesc = shovel_longdesc, _doc_items_usagehelp = shovel_use, inventory_image = "default_tool_steelshovel.png", wield_image = "default_tool_steelshovel.png^[transformR90", - groups = { tool=1 }, + groups = { tool=1, shovel=1 }, tool_capabilities = { full_punch_interval = 1, max_drop_level=4, @@ -296,12 +306,12 @@ minetest.register_tool("mcl_tools:shovel_iron", { _repair_material = "mcl_core:iron_ingot", }) minetest.register_tool("mcl_tools:shovel_gold", { - description = "Golden Shovel", + description = S("Golden Shovel"), _doc_items_longdesc = shovel_longdesc, _doc_items_usagehelp = shovel_use, inventory_image = "default_tool_goldshovel.png", wield_image = "default_tool_goldshovel.png^[transformR90", - groups = { tool=1 }, + groups = { tool=1, shovel=1 }, tool_capabilities = { full_punch_interval = 1, max_drop_level=2, @@ -315,12 +325,12 @@ minetest.register_tool("mcl_tools:shovel_gold", { _repair_material = "mcl_core:gold_ingot", }) minetest.register_tool("mcl_tools:shovel_diamond", { - description = "Diamond Shovel", + description = S("Diamond Shovel"), _doc_items_longdesc = shovel_longdesc, _doc_items_usagehelp = shovel_use, inventory_image = "default_tool_diamondshovel.png", wield_image = "default_tool_diamondshovel.png^[transformR90", - groups = { tool=1 }, + groups = { tool=1, shovel=1 }, tool_capabilities = { full_punch_interval = 1, max_drop_level=5, @@ -336,11 +346,11 @@ minetest.register_tool("mcl_tools:shovel_diamond", { -- Axes minetest.register_tool("mcl_tools:axe_wood", { - description = "Wooden Axe", + description = S("Wooden Axe"), _doc_items_longdesc = axe_longdesc, _doc_items_hidden = false, inventory_image = "default_tool_woodaxe.png", - groups = { tool=1 }, + groups = { tool=1, axe=1 }, tool_capabilities = { full_punch_interval = 1.25, max_drop_level=1, @@ -353,10 +363,10 @@ minetest.register_tool("mcl_tools:axe_wood", { _repair_material = "group:wood", }) minetest.register_tool("mcl_tools:axe_stone", { - description = "Stone Axe", + description = S("Stone Axe"), _doc_items_longdesc = axe_longdesc, inventory_image = "default_tool_stoneaxe.png", - groups = { tool=1 }, + groups = { tool=1, axe=1 }, tool_capabilities = { full_punch_interval = 1.25, max_drop_level=3, @@ -369,10 +379,10 @@ minetest.register_tool("mcl_tools:axe_stone", { _repair_material = "mcl_core:cobble", }) minetest.register_tool("mcl_tools:axe_iron", { - description = "Iron Axe", + description = S("Iron Axe"), _doc_items_longdesc = axe_longdesc, inventory_image = "default_tool_steelaxe.png", - groups = { tool=1 }, + groups = { tool=1, axe=1 }, tool_capabilities = { -- 1/0.9 full_punch_interval = 1.11111111, @@ -386,10 +396,10 @@ minetest.register_tool("mcl_tools:axe_iron", { _repair_material = "mcl_core:iron_ingot", }) minetest.register_tool("mcl_tools:axe_gold", { - description = "Golden Axe", + description = S("Golden Axe"), _doc_items_longdesc = axe_longdesc, inventory_image = "default_tool_goldaxe.png", - groups = { tool=1 }, + groups = { tool=1, axe=1 }, tool_capabilities = { full_punch_interval = 1.0, max_drop_level=2, @@ -402,10 +412,10 @@ minetest.register_tool("mcl_tools:axe_gold", { _repair_material = "mcl_core:gold_ingot", }) minetest.register_tool("mcl_tools:axe_diamond", { - description = "Diamond Axe", + description = S("Diamond Axe"), _doc_items_longdesc = axe_longdesc, inventory_image = "default_tool_diamondaxe.png", - groups = { tool=1 }, + groups = { tool=1, axe=1 }, tool_capabilities = { full_punch_interval = 1.0, max_drop_level=5, @@ -420,7 +430,7 @@ minetest.register_tool("mcl_tools:axe_diamond", { -- Swords minetest.register_tool("mcl_tools:sword_wood", { - description = "Wooden Sword", + description = S("Wooden Sword"), _doc_items_longdesc = sword_longdesc, _doc_items_hidden = false, inventory_image = "default_tool_woodsword.png", @@ -438,7 +448,7 @@ minetest.register_tool("mcl_tools:sword_wood", { _repair_material = "group:wood", }) minetest.register_tool("mcl_tools:sword_stone", { - description = "Stone Sword", + description = S("Stone Sword"), _doc_items_longdesc = sword_longdesc, inventory_image = "default_tool_stonesword.png", groups = { weapon=1 }, @@ -455,7 +465,7 @@ minetest.register_tool("mcl_tools:sword_stone", { _repair_material = "mcl_core:cobble", }) minetest.register_tool("mcl_tools:sword_iron", { - description = "Iron Sword", + description = S("Iron Sword"), _doc_items_longdesc = sword_longdesc, inventory_image = "default_tool_steelsword.png", groups = { weapon=1 }, @@ -472,7 +482,7 @@ minetest.register_tool("mcl_tools:sword_iron", { _repair_material = "mcl_core:iron_ingot", }) minetest.register_tool("mcl_tools:sword_gold", { - description = "Golden Sword", + description = S("Golden Sword"), _doc_items_longdesc = sword_longdesc, inventory_image = "default_tool_goldsword.png", groups = { weapon=1 }, @@ -489,7 +499,7 @@ minetest.register_tool("mcl_tools:sword_gold", { _repair_material = "mcl_core:gold_ingot", }) minetest.register_tool("mcl_tools:sword_diamond", { - description = "Diamond Sword", + description = S("Diamond Sword"), _doc_items_longdesc = sword_longdesc, inventory_image = "default_tool_diamondsword.png", groups = { weapon=1 }, @@ -508,13 +518,13 @@ minetest.register_tool("mcl_tools:sword_diamond", { --Shears minetest.register_tool("mcl_tools:shears", { - description = "Shears", + description = S("Shears"), _doc_items_longdesc = shears_longdesc, _doc_items_usagehelp = shears_use, inventory_image = "default_tool_shears.png", wield_image = "default_tool_shears.png", stack_max = 1, - groups = { tool=1 }, + groups = { tool=1, shears=1 }, tool_capabilities = { full_punch_interval = 0.5, max_drop_level=1, diff --git a/mods/ITEMS/mcl_tools/locale/mcl_tools.de.tr b/mods/ITEMS/mcl_tools/locale/mcl_tools.de.tr new file mode 100644 index 000000000..6c061dd00 --- /dev/null +++ b/mods/ITEMS/mcl_tools/locale/mcl_tools.de.tr @@ -0,0 +1,32 @@ +# textdomain: mcl_tools +You use your bare hand whenever you are not wielding any item. With your hand you can mine most blocks, but this is the slowest method and only the weakest blocks will yield their useful drop. The hand also deals minor damage by punching. Using the hand is often a last resort, as proper mining tools and weapons are much better.=Sie benutzen Ihre nackte Hand, wenn Sie keinen Gegenstand halten. Mit Ihrer Hand können Sie die meisten Blöcke abbauen, aber dies ist die langsamste Methode und nur aus den schwächsten Blöcken werden ihre brauchbaren Gegenstände hinausfallen. Die Hand richtet auch geringfügigen Schaden mit Schlägen an. Die Hand ist oft die letzte Wahl, da richtige Grabewerkzeuge und Waffen viel besser sind. +When you are wielding an item which is not a mining tool or a weapon, it will behave as if it were the hand when you start mining or punching.=Wenn Sie einen Gegenstand tragen, der kein Grabewerkzeug oder eine Waffe ist, wird sie sich verhalten, als ob Sie die Hand benutzen würden, wenn Sie etwas abbauen oder schlagen. +In Creative Mode, the hand is able to break all blocks instantly.=Im Kreativmodus kann die Hand alle Blöcke sofort zerstören. +Pickaxes are mining tools to mine hard blocks, such as stone. A pickaxe can also be used as weapon, but it is rather inefficient.=Spitzhacken sind Grabewerkzeuge, um harte Blöcke wie Stein abzubauen. Eine Spitzhacke kann auch als Waffe benutzt werden, aber das ist recht ineffizient. +An axe is your tool of choice to cut down trees, wood-based blocks and other blocks. Axes deal a lot of damage as well, but they are rather slow.=Eine Axt ist das Werkzeug zum Abbauen von Bäumen, holzbasieren Blöcken und anderen Blöcken. Äxte richten auch viel Schaden an, aber sie sind ziemlich langsam. +Swords are great in melee combat, as they are fast, deal high damage and can endure countless battles. Swords can also be used to cut down a few particular blocks, such as cobwebs.=Schwerter sind großartig im Nahkampf, da sie schnell sind, hohen Schaden anrichten und viele Schlachten schlagen können. Schwerter können auch benutzt werden, um bestimmte Blöcke abzuschneiden, so wie Spinnenweben. +Shovels are tools for digging coarse blocks, such as dirt, sand and gravel. They can also be used to turn grass blocks to grass paths. Shovels can be used as weapons, but they are very weak.=Schaufeln sind Werkzeuge zum Ausgraben von groben Blöcken, wie Erde, Sand und Kies. Sie können auch benutzt werden, um Grasblöcke zu Graspfaden zu verwandeln. Schaufeln können als Waffen benutzt werden, aber sie sind sehr schwach. +To turn a grass block into a grass path, hold the shovel in your hand, then use (rightclick) the top or side of a grass block. This only works when there's air above the grass block.=Um einen Grasblock in einen Graspfad zu verwandeln, benutzen Sie sie auf der Oberseite oder einer Seite eines Grasblocks. Das funktioniert nur, wenn sich Luft über dem Grasblock befindet. +Shears are tools to shear sheep and to mine a few block types. Shears are a special mining tool and can be used to obtain the original item from grass, leaves and similar blocks that require cutting.=Eine Schere ist ein Werkzeug, um Schafe zu scheren und ein paar Blocktypen abzubauen. Sie ist ein besonderes Grabewerkzeug, das benutzt werden kann, um den ursprünglichen Gegenstand von Gras, Blättern und ähnlichen Blöcken, die abgeschnitten werden müssen, zu erhalten. +To shear sheep or carve faceless pumpkins, use the “place” key on them. Faces can only be carved at the side of faceless pumpkins. Mining works as usual, but the drops are different for a few blocks.=Um Schafe zu scheren oder gesichtslose Kürbisse zu schnitzen, benutzen Sie die „Platzieren“-Taste auf ihnen. Gesichter können nur an der Seite von gesichtslosen Kürbissen eingeschnitzt werden. Das Abbauen funktioniert wie bei anderen Werkzeugen, nur, dass die Abwürfe für ein paar Blöcke anders sind. +Wooden Pickaxe=Holzspitzhacke +Stone Pickaxe=Steinspitzhacke +Iron Pickaxe=Eisenspitzhacke +Golden Pickaxe=Goldspitzhacke +Diamond Pickaxe=Diamantspitzhacke +Wooden Shovel=Holzschaufel +Stone Shovel=Steinschaufel +Iron Shovel=Eisenschaufel +Golden Shovel=Goldschaufel +Diamond Shovel=Diamantschaufel +Wooden Axe=Holzaxt +Stone Axe=Steinaxt +Iron Axe=Eisenaxt +Golden Axe=Goldaxt +Diamond Axe=Diamantaxt +Wooden Sword=Holzschwert +Stone Sword=Steinschwert +Iron Sword=Eisenschwert +Golden Sword=Goldschwert +Diamond Sword=Diamantschwert +Shears=Schere diff --git a/mods/ITEMS/mcl_tools/locale/template.txt b/mods/ITEMS/mcl_tools/locale/template.txt new file mode 100644 index 000000000..ecb94105f --- /dev/null +++ b/mods/ITEMS/mcl_tools/locale/template.txt @@ -0,0 +1,32 @@ +# textdomain: mcl_tools +You use your bare hand whenever you are not wielding any item. With your hand you can mine most blocks, but this is the slowest method and only the weakest blocks will yield their useful drop. The hand also deals minor damage by punching. Using the hand is often a last resort, as proper mining tools and weapons are much better.= +When you are wielding an item which is not a mining tool or a weapon, it will behave as if it were the hand when you start mining or punching.= +In Creative Mode, the hand is able to break all blocks instantly.= +Pickaxes are mining tools to mine hard blocks, such as stone. A pickaxe can also be used as weapon, but it is rather inefficient.= +An axe is your tool of choice to cut down trees, wood-based blocks and other blocks. Axes deal a lot of damage as well, but they are rather slow.= +Swords are great in melee combat, as they are fast, deal high damage and can endure countless battles. Swords can also be used to cut down a few particular blocks, such as cobwebs.= +Shovels are tools for digging coarse blocks, such as dirt, sand and gravel. They can also be used to turn grass blocks to grass paths. Shovels can be used as weapons, but they are very weak.= +To turn a grass block into a grass path, hold the shovel in your hand, then use (rightclick) the top or side of a grass block. This only works when there's air above the grass block.= +Shears are tools to shear sheep and to mine a few block types. Shears are a special mining tool and can be used to obtain the original item from grass, leaves and similar blocks that require cutting.= +To shear sheep or carve faceless pumpkins, use the “place” key on them. Faces can only be carved at the side of faceless pumpkins. Mining works as usual, but the drops are different for a few blocks.= +Wooden Pickaxe= +Stone Pickaxe= +Iron Pickaxe= +Golden Pickaxe= +Diamond Pickaxe= +Wooden Shovel= +Stone Shovel= +Iron Shovel= +Golden Shovel= +Diamond Shovel= +Wooden Axe= +Stone Axe= +Iron Axe= +Golden Axe= +Diamond Axe= +Wooden Sword= +Stone Sword= +Iron Sword= +Golden Sword= +Diamond Sword= +Shears= diff --git a/mods/ITEMS/mcl_torches/init.lua b/mods/ITEMS/mcl_torches/init.lua index 7a0be478d..24d61f9d9 100644 --- a/mods/ITEMS/mcl_torches/init.lua +++ b/mods/ITEMS/mcl_torches/init.lua @@ -1,3 +1,4 @@ +local S = minetest.get_translator("mcl_torches") -- -- 3d torch part @@ -169,13 +170,9 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc end mcl_torches.register_torch("torch", - "Torch", - "Torches are light sources which can be placed at the side or on the top of most blocks.", - [[Torches can generally be placed on full solid opaque blocks. The following exceptions apply: -• Glass, fence, wall, hopper: Can only be placed on top -• Upside-down slab/stair: Can only be placed on top -• Soul sand, mob spawner: Placement possible -• Glowstone and pistons: No placement possible]], + S("Torch"), + S("Torches are light sources which can be placed at the side or on the top of most blocks."), + nil, "default_torch_on_floor.png", "mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj", {{ diff --git a/mods/ITEMS/mcl_torches/locale/mcl_torches.de.tr b/mods/ITEMS/mcl_torches/locale/mcl_torches.de.tr new file mode 100644 index 000000000..224106abf --- /dev/null +++ b/mods/ITEMS/mcl_torches/locale/mcl_torches.de.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_torches +Torch=Fackel +Torches are light sources which can be placed at the side or on the top of most blocks.=Fackeln sind Lichtquellen, die an der Seite oder der Oberseite der meisten Blöcke platziert werden können. diff --git a/mods/ITEMS/mcl_torches/locale/template.txt b/mods/ITEMS/mcl_torches/locale/template.txt new file mode 100644 index 000000000..447fba747 --- /dev/null +++ b/mods/ITEMS/mcl_torches/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: mcl_torches +Torch= +Torches are light sources which can be placed at the side or on the top of most blocks.= diff --git a/mods/ITEMS/mcl_walls/init.lua b/mods/ITEMS/mcl_walls/init.lua index fb68f167b..162227805 100644 --- a/mods/ITEMS/mcl_walls/init.lua +++ b/mods/ITEMS/mcl_walls/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_walls") + mcl_walls = {} local function rshift(x, by) @@ -225,7 +227,7 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory -- Inventory item minetest.register_node(nodename, { description = description, - _doc_items_longdesc = "A piece of wall. It cannot be jumped over with a simple jump. When multiple of these are placed to next to each other, they will automatically build a nice wall structure.", + _doc_items_longdesc = S("A piece of wall. It cannot be jumped over with a simple jump. When multiple of these are placed to next to each other, they will automatically build a nice wall structure."), paramtype = "light", sunlight_propagates = true, is_ground_content = false, diff --git a/mods/ITEMS/mcl_walls/locale/mcl_walls.de.tr b/mods/ITEMS/mcl_walls/locale/mcl_walls.de.tr new file mode 100644 index 000000000..d4e7a6400 --- /dev/null +++ b/mods/ITEMS/mcl_walls/locale/mcl_walls.de.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_walls +A piece of wall. It cannot be jumped over with a simple jump. When multiple of these are placed to next to each other, they will automatically build a nice wall structure.=Ein Stück Mauer. Mit einem einfachen Sprung kann es nicht übersprungen werden. Wenn mehrere von diesen Blöcken nebeneinander platziert werden, werden sie automatisch ein nettes Mauerbauwerk ergeben. +Cobblestone Wall=Kopfsteinpflastermauer +Mossy Cobblestone Wall=Moosige Kopfsteinpflastermauer +Andesite Wall=Andesitmauer +Granite Wall=Granitmauer +Diorite Wall=Dioritmauer +Brick Wall=Ziegelmauer +Sandstone Wall=Sandsteinmauer +Red Sandstone Wall=Rote Sandsteinmauer +Stone Brick Wall=Steinziegelmauer +Mossy Stone Brick Wall=Moosige Steinziegelmauer +Prismarine Wall=Prismarinmauer +End Stone Brick Wall=Endsteinziegelmauer +Nether Brick Wall=Netherziegelmauer +Red Nether Brick Wall=Rote Netherziegelmauer diff --git a/mods/ITEMS/mcl_walls/locale/template.txt b/mods/ITEMS/mcl_walls/locale/template.txt new file mode 100644 index 000000000..765365997 --- /dev/null +++ b/mods/ITEMS/mcl_walls/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: mcl_walls +A piece of wall. It cannot be jumped over with a simple jump. When multiple of these are placed to next to each other, they will automatically build a nice wall structure.= +Cobblestone Wall= +Mossy Cobblestone Wall= +Andesite Wall= +Granite Wall= +Diorite Wall= +Brick Wall= +Sandstone Wall= +Red Sandstone Wall= +Stone Brick Wall= +Mossy Stone Brick Wall= +Prismarine Wall= +End Stone Brick Wall= +Nether Brick Wall= +Red Nether Brick Wall= diff --git a/mods/ITEMS/mcl_walls/register.lua b/mods/ITEMS/mcl_walls/register.lua index 5c6df791d..363ef55c7 100644 --- a/mods/ITEMS/mcl_walls/register.lua +++ b/mods/ITEMS/mcl_walls/register.lua @@ -1,14 +1,16 @@ -mcl_walls.register_wall("mcl_walls:cobble", "Cobblestone Wall", "mcl_core:cobble") -mcl_walls.register_wall("mcl_walls:mossycobble", "Mossy Cobblestone Wall", "mcl_core:mossycobble") -mcl_walls.register_wall("mcl_walls:andesite", "Andesite Wall", "mcl_core:andesite") -mcl_walls.register_wall("mcl_walls:granite", "Granite Wall", "mcl_core:granite") -mcl_walls.register_wall("mcl_walls:diorite", "Diorite Wall", "mcl_core:diorite") -mcl_walls.register_wall("mcl_walls:brick", "Brick Wall", "mcl_core:brick_block") -mcl_walls.register_wall("mcl_walls:sandstone", "Sandstone Wall", "mcl_core:sandstone") -mcl_walls.register_wall("mcl_walls:redsandstone", "Red Sandstone Wall", "mcl_core:redsandstone") -mcl_walls.register_wall("mcl_walls:stonebrick", "Stone Brick Wall", "mcl_core:stonebrick") -mcl_walls.register_wall("mcl_walls:stonebrickmossy", "Mossy Stone Brick Wall", "mcl_core:stonebrickmossy") -mcl_walls.register_wall("mcl_walls:prismarine", "Prismarine Wall", "mcl_ocean:prismarine") -mcl_walls.register_wall("mcl_walls:endbricks", "End Stone Brick Wall", "mcl_end:end_bricks") -mcl_walls.register_wall("mcl_walls:netherbrick", "Nether Brick Wall", "mcl_nether:nether_brick") -mcl_walls.register_wall("mcl_walls:rednetherbrick", "Red Nether Brick Wall", "mcl_nether:red_nether_brick") +local S = minetest.get_translator("mcl_walls") + +mcl_walls.register_wall("mcl_walls:cobble", S("Cobblestone Wall"), "mcl_core:cobble") +mcl_walls.register_wall("mcl_walls:mossycobble", S("Mossy Cobblestone Wall"), "mcl_core:mossycobble") +mcl_walls.register_wall("mcl_walls:andesite", S("Andesite Wall"), "mcl_core:andesite") +mcl_walls.register_wall("mcl_walls:granite", S("Granite Wall"), "mcl_core:granite") +mcl_walls.register_wall("mcl_walls:diorite", S("Diorite Wall"), "mcl_core:diorite") +mcl_walls.register_wall("mcl_walls:brick", S("Brick Wall"), "mcl_core:brick_block") +mcl_walls.register_wall("mcl_walls:sandstone", S("Sandstone Wall"), "mcl_core:sandstone") +mcl_walls.register_wall("mcl_walls:redsandstone", S("Red Sandstone Wall"), "mcl_core:redsandstone") +mcl_walls.register_wall("mcl_walls:stonebrick", S("Stone Brick Wall"), "mcl_core:stonebrick") +mcl_walls.register_wall("mcl_walls:stonebrickmossy", S("Mossy Stone Brick Wall"), "mcl_core:stonebrickmossy") +mcl_walls.register_wall("mcl_walls:prismarine", S("Prismarine Wall"), "mcl_ocean:prismarine") +mcl_walls.register_wall("mcl_walls:endbricks", S("End Stone Brick Wall"), "mcl_end:end_bricks") +mcl_walls.register_wall("mcl_walls:netherbrick", S("Nether Brick Wall"), "mcl_nether:nether_brick") +mcl_walls.register_wall("mcl_walls:rednetherbrick", S("Red Nether Brick Wall"), "mcl_nether:red_nether_brick") diff --git a/mods/ITEMS/mcl_wool/depends.txt b/mods/ITEMS/mcl_wool/depends.txt index 3d96266de..9699080ad 100644 --- a/mods/ITEMS/mcl_wool/depends.txt +++ b/mods/ITEMS/mcl_wool/depends.txt @@ -1 +1,2 @@ mcl_sounds +doc? diff --git a/mods/ITEMS/mcl_wool/init.lua b/mods/ITEMS/mcl_wool/init.lua index 14e7d204d..aabeb2e61 100644 --- a/mods/ITEMS/mcl_wool/init.lua +++ b/mods/ITEMS/mcl_wool/init.lua @@ -1,3 +1,6 @@ +local S = minetest.get_translator("mcl_wool") +local mod_doc = minetest.get_modpath("doc") + -- minetest/wool/init.lua -- Backwards compatibility with jordach's 16-color wool mod @@ -9,24 +12,25 @@ local wool = {} -- colors, and then some recipes using more specific colors for a few non-base -- colors available. When crafting, the last recipes will be checked first. wool.dyes = { - -- name, texture, wool desc., carpet desc., dye, color_group - {"white", "wool_white", "White Wool", "White Carpet", nil, "basecolor_white"}, - {"grey", "wool_dark_grey", "Grey Wool", "Grey Carpet", "dark_grey", "unicolor_darkgrey"}, - {"silver", "wool_grey", "Light Grey Wool", "Light Grey Carpet", "grey", "basecolor_grey"}, - {"black", "wool_black", "Black Wool", "Black Carpet", "black", "basecolor_black"}, - {"red", "wool_red", "Red Wool", "Red Carpet", "red", "basecolor_red"}, - {"yellow", "wool_yellow", "Yellow Wool", "Yellow Carpet", "yellow", "basecolor_yellow"}, - {"green", "wool_dark_green", "Green Wool", "Green Carpet", "dark_green", "unicolor_dark_green"}, - {"cyan", "wool_cyan", "Cyan Wool", "Cyan Carpet", "cyan", "basecolor_cyan"}, - {"blue", "wool_blue", "Blue Wool", "Blue Carpet", "blue", "basecolor_blue"}, - {"magenta", "wool_magenta", "Magenta Wool", "Magenta Carpet", "magenta", "basecolor_magenta"}, - {"orange", "wool_orange", "Orange Wool", "Orange Carpet", "orange", "excolor_orange"}, - {"purple", "wool_violet", "Purple Wool", "Purple Carpet", "violet", "excolor_violet"}, - {"brown", "wool_brown", "Brown Wool", "Brown Carpet", "brown", "unicolor_dark_orange"}, - {"pink", "wool_pink", "Pink Wool", "Pink Carpet", "pink", "unicolor_light_red"}, - {"lime", "mcl_wool_lime", "Lime Wool", "Lime Carpet", "green", "basecolor_green"}, - {"light_blue", "mcl_wool_light_blue", "Light Blue Wool", "Light Blue Carpet", "lightblue", "unicolor_light_blue"}, + -- name, texture, wool desc., carpet desc., dye, color_group + {"white", "wool_white", S("White Wool"), S("White Carpet"), nil, "basecolor_white"}, + {"grey", "wool_dark_grey", S("Grey Wool"), S("Grey Carpet"), "dark_grey", "unicolor_darkgrey"}, + {"silver", "wool_grey", S("Light Grey Wool"), S("Light Grey Carpet"), "grey", "basecolor_grey"}, + {"black", "wool_black", S("Black Wool"), S("Black Carpet"), "black", "basecolor_black"}, + {"red", "wool_red", S("Red Wool"), S("Red Carpet"), "red", "basecolor_red"}, + {"yellow", "wool_yellow", S("Yellow Wool"), S("Yellow Carpet"), "yellow", "basecolor_yellow"}, + {"green", "wool_dark_green", S("Green Wool"), S("Green Carpet"), "dark_green", "unicolor_dark_green"}, + {"cyan", "wool_cyan", S("Cyan Wool"), S("Cyan Carpet"), "cyan", "basecolor_cyan"}, + {"blue", "wool_blue", S("Blue Wool"), S("Blue Carpet"), "blue", "basecolor_blue"}, + {"magenta", "wool_magenta", S("Magenta Wool"), S("Magenta Carpet"), "magenta", "basecolor_magenta"}, + {"orange", "wool_orange", S("Orange Wool"), S("Orange Carpet"), "orange", "excolor_orange"}, + {"purple", "wool_violet", S("Purple Wool"), S("Purple Carpet"), "violet", "excolor_violet"}, + {"brown", "wool_brown", S("Brown Wool"), S("Brown Carpet"), "brown", "unicolor_dark_orange"}, + {"pink", "wool_pink", S("Pink Wool"), S("Pink Carpet"), "pink", "unicolor_light_red"}, + {"lime", "mcl_wool_lime", S("Lime Wool"), S("Lime Carpet"), "green", "basecolor_green"}, + {"light_blue", "mcl_wool_light_blue", S("Light Blue Wool"), S("Light Blue Carpet"), "lightblue", "unicolor_light_blue"}, } +local canonical_color = "white" for _, row in ipairs(wool.dyes) do local name = row[1] @@ -35,28 +39,45 @@ for _, row in ipairs(wool.dyes) do local desc_carpet = row[4] local dye = row[5] local color_group = row[6] + local longdesc_wool, longdesc_carpet, create_entry, name_wool, name_carpet + local is_canonical = name == canonical_color + if mod_doc then + if is_canonical then + longdesc_wool = S("Wool is a decorative block which comes in many different colors.") + longdesc_carpet = S("Carpets are thin floor covers which come in many different colors.") + name_wool = S("Wool") + name_carpet = S("Carpet") + else + create_entry = false + end + end -- Node Definition minetest.register_node("mcl_wool:"..name, { description = desc_wool, - _doc_items_longdesc = "Wool is a decorational block which comes in many different colors.", + _doc_items_create_entry = create_entry, + _doc_items_entry_name = name_wool, + _doc_items_longdesc = longdesc_wool, stack_max = 64, is_ground_content = false, tiles = {texture..".png"}, groups = {handy=1,shearsy_wool=1, flammable=1,wool=1,building_block=1}, - sounds = mcl_sounds.node_sound_defaults(), + sounds = mcl_sounds.node_sound_wool_defaults(), _mcl_hardness = 0.8, _mcl_blast_resistance = 4, }) minetest.register_node("mcl_wool:"..name.."_carpet", { description = desc_carpet, - _doc_items_longdesc = "Carpets are thin floor covers which come in many different colors.", + _doc_items_create_entry = create_entry, + _doc_items_entry_name = name_carpet, + _doc_items_longdesc = longdesc_carpet, + walkable = false, -- See is_ground_content = false, tiles = {texture..".png"}, wield_image = texture..".png", wield_scale = { x=1, y=1, z=0.5 }, groups = {handy=1, carpet=1,attached_node=1,dig_by_water=1,deco_block=1}, - sounds = mcl_sounds.node_sound_defaults(), + sounds = mcl_sounds.node_sound_wool_defaults(), paramtype = "light", sunlight_propagates = true, stack_max = 64, @@ -70,6 +91,10 @@ for _, row in ipairs(wool.dyes) do _mcl_hardness = 0.1, _mcl_blast_resistance = 0.5, }) + if mod_doc and not is_canonical then + doc.add_entry_alias("nodes", "mcl_wool:"..canonical_color, "nodes", "mcl_wool:"..name) + doc.add_entry_alias("nodes", "mcl_wool:"..canonical_color.."_carpet", "nodes", "mcl_wool:"..name.."_carpet") + end if dye then -- Crafting from dye and white wool minetest.register_craft({ diff --git a/mods/ITEMS/mcl_wool/locale/mcl_wool.de.tr b/mods/ITEMS/mcl_wool/locale/mcl_wool.de.tr new file mode 100644 index 000000000..5b979d51b --- /dev/null +++ b/mods/ITEMS/mcl_wool/locale/mcl_wool.de.tr @@ -0,0 +1,37 @@ +# textdomain: mcl_wool +Wool=Wolle +Carpet=Teppich +White Wool=Weiße Wolle +White Carpet=Weißer Teppich +Grey Wool=Graue Wolle +Grey Carpet=Grauer Teppich +Light Grey Wool=Hellgraue Wolle +Light Grey Carpet=Hellgrauer Teppich +Black Wool=Schwarze Wolle +Black Carpet=Schwarzer Teppich +Red Wool=Rote Wolle +Red Carpet=Roter Teppich +Yellow Wool=Gelbe Wolle +Yellow Carpet=Gelber Teppich +Green Wool=Grüne Wolle +Green Carpet=Grüner Teppich +Cyan Wool=Türkise Wolle +Cyan Carpet=Türkiser Teppich +Blue Wool=Blaue Wolle +Blue Carpet=Blauer Teppich +Magenta Wool=Magenta Wolle +Magenta Carpet=Magenta Teppich +Orange Wool=Orange Wolle +Orange Carpet=Orange Teppich +Purple Wool=Violette Wolle +Purple Carpet=Violetter Teppich +Brown Wool=Braune Wolle +Brown Carpet=Brauner Teppich +Pink Wool=Rosa Wolle +Pink Carpet=Rosa Teppich +Lime Wool=Lindgrüne Wolle +Lime Carpet=Lindgrüner Teppich +Light Blue Wool=Hellblaue Wolle +Light Blue Carpet=Hellblauer Teppich +Wool is a decorative block which comes in many different colors.=Wolle ist ein dekorativer Block, den es in vielen verschiedenen Farben gibt. +Carpets are thin floor covers which come in many different colors.=Teppiche sind dünne Bodenbeläge, die es in vielen verschiedenen Farben gibt. diff --git a/mods/ITEMS/mcl_wool/locale/template.txt b/mods/ITEMS/mcl_wool/locale/template.txt new file mode 100644 index 000000000..26de1ec7a --- /dev/null +++ b/mods/ITEMS/mcl_wool/locale/template.txt @@ -0,0 +1,37 @@ +# textdomain: mcl_wool +Wool= +Carpet= +White Wool= +White Carpet= +Grey Wool= +Grey Carpet= +Light Grey Wool= +Light Grey Carpet= +Black Wool= +Black Carpet= +Red Wool= +Red Carpet= +Yellow Wool= +Yellow Carpet= +Green Wool= +Green Carpet= +Cyan Wool= +Cyan Carpet= +Blue Wool= +Blue Carpet= +Magenta Wool= +Magenta Carpet= +Orange Wool= +Orange Carpet= +Purple Wool= +Purple Carpet= +Brown Wool= +Brown Carpet= +Pink Wool= +Pink Carpet= +Lime Wool= +Lime Carpet= +Light Blue Wool= +Light Blue Carpet= +Wool is a decorative block which comes in many different colors.= +Carpets are thin floor covers which come in many different colors.= diff --git a/mods/ITEMS/mclx_core/init.lua b/mods/ITEMS/mclx_core/init.lua index a90159f77..004c351d7 100644 --- a/mods/ITEMS/mclx_core/init.lua +++ b/mods/ITEMS/mclx_core/init.lua @@ -1,13 +1,15 @@ +local S = minetest.get_translator("mclx_core") + -- Liquids: River Water local source = table.copy(minetest.registered_nodes["mcl_core:water_source"]) -source.description = "River Water Source" +source.description = S("River Water Source") source.liquid_range = 2 source.liquid_alternative_flowing = "mclx_core:river_water_flowing" source.liquid_alternative_source = "mclx_core:river_water_source" source.liquid_renewable = false -source._doc_items_longdesc = "River water has the same properties as water, but has a reduced flowing distance and is not renewable." -source._doc_items_entry_name = "River Water" +source._doc_items_longdesc = S("River water has the same properties as water, but has a reduced flowing distance and is not renewable.") +source._doc_items_entry_name = S("River Water") -- Auto-expose entry only in valleys mapgen source._doc_items_hidden = minetest.get_mapgen_setting("mg_name") ~= "valleys" source.post_effect_color = {a=192, r=0x2c, g=0x88, b=0x8c} @@ -24,7 +26,7 @@ source.special_tiles = { } local flowing = table.copy(minetest.registered_nodes["mcl_core:water_flowing"]) -flowing.description = "Flowing River Water" +flowing.description = S("Flowing River Water") flowing.liquid_range = 2 flowing.liquid_alternative_flowing = "mclx_core:river_water_flowing" flowing.liquid_alternative_source = "mclx_core:river_water_source" diff --git a/mods/ITEMS/mclx_core/locale/mclx_core.de.tr b/mods/ITEMS/mclx_core/locale/mclx_core.de.tr new file mode 100644 index 000000000..f4591810c --- /dev/null +++ b/mods/ITEMS/mclx_core/locale/mclx_core.de.tr @@ -0,0 +1,5 @@ +# textdomain: mclx_core +River Water Source=Flusswasserquelle +River water has the same properties as water, but has a reduced flowing distance and is not renewable.=Flusswasser hat die gleichen Eigenschaften wie Wasser, aber es hat eine reduzierte Fließweite und ist nicht erneuerbar. +River Water=Flusswasser +Flowing River Water=Fließendes Flusswasser diff --git a/mods/ITEMS/mclx_core/locale/template.txt b/mods/ITEMS/mclx_core/locale/template.txt new file mode 100644 index 000000000..1486ee301 --- /dev/null +++ b/mods/ITEMS/mclx_core/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: mclx_core +River Water Source= +River water has the same properties as water, but has a reduced flowing distance and is not renewable.= +River Water= +Flowing River Water= diff --git a/mods/ITEMS/mclx_fences/init.lua b/mods/ITEMS/mclx_fences/init.lua index 60f0c2995..08c3d91ac 100644 --- a/mods/ITEMS/mclx_fences/init.lua +++ b/mods/ITEMS/mclx_fences/init.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mclx_fences") + -- Red Nether Brick Fence mcl_fences.register_fence_and_fence_gate( "red_nether_brick_fence", - "Red Nether Brick Fence", "Red Nether Brick Fence Gate", + S("Red Nether Brick Fence"), S("Red Nether Brick Fence Gate"), "mcl_fences_fence_red_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, minetest.registered_nodes["mcl_nether:red_nether_brick"]._mcl_hardness, @@ -13,7 +15,7 @@ mcl_fences.register_fence_and_fence_gate( mcl_fences.register_fence_gate( "nether_brick_fence", - "Nether Brick Fence Gate", + S("Nether Brick Fence Gate"), "mcl_fences_fence_gate_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_hardness, diff --git a/mods/ITEMS/mclx_fences/locale/mclx_fences.de.tr b/mods/ITEMS/mclx_fences/locale/mclx_fences.de.tr new file mode 100644 index 000000000..9aab02648 --- /dev/null +++ b/mods/ITEMS/mclx_fences/locale/mclx_fences.de.tr @@ -0,0 +1,4 @@ +# textdomain: mclx_fences +Red Nether Brick Fence=Roter Netherziegelzaun +Red Nether Brick Fence Gate=Rotes Netherziegelzauntor +Nether Brick Fence Gate=Netherziegelzauntor diff --git a/mods/ITEMS/mclx_fences/locale/template.txt b/mods/ITEMS/mclx_fences/locale/template.txt new file mode 100644 index 000000000..e6c05c7f7 --- /dev/null +++ b/mods/ITEMS/mclx_fences/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mclx_fences +Red Nether Brick Fence= +Red Nether Brick Fence Gate= +Nether Brick Fence Gate= diff --git a/mods/ITEMS/mclx_stairs/depends.txt b/mods/ITEMS/mclx_stairs/depends.txt index 89eb864a6..49805c174 100644 --- a/mods/ITEMS/mclx_stairs/depends.txt +++ b/mods/ITEMS/mclx_stairs/depends.txt @@ -5,3 +5,4 @@ mcl_nether mcl_end mcl_colorblocks mcl_stairs +doc? diff --git a/mods/ITEMS/mclx_stairs/init.lua b/mods/ITEMS/mclx_stairs/init.lua index 29f45f2bb..d43fa9c51 100644 --- a/mods/ITEMS/mclx_stairs/init.lua +++ b/mods/ITEMS/mclx_stairs/init.lua @@ -1,56 +1,76 @@ -mcl_stairs.register_stair_and_slab_simple("tree_bark", "mcl_core:tree_bark", "Oak Bark Stairs", "Oak Bark Slab", "Double Oak Bark Slab", "woodlike") -mcl_stairs.register_stair_and_slab_simple("acaciatree_bark", "mcl_core:acaciatree_bark", "Acacia Bark Stairs", "Acacia Bark Slab", "Double Acacia Bark Slab", "woodlike") -mcl_stairs.register_stair_and_slab_simple("sprucetree_bark", "mcl_core:sprucetree_bark", "Spruce Bark Stairs", "Spruce Bark Slab", "Double Spruce Bark Slab", "woodlike") -mcl_stairs.register_stair_and_slab_simple("birchtree_bark", "mcl_core:birchtree_bark", "Birch Bark Stairs", "Birch Bark Slab", "Double Birch Bark Slab", "woodlike") -mcl_stairs.register_stair_and_slab_simple("jungletree_bark", "mcl_core:jungletree_bark", "Jungle Bark Stairs", "Jungle Bark Slab", "Double Jungle Bark Slab", "woodlike") -mcl_stairs.register_stair_and_slab_simple("darktree_bark", "mcl_core:darktree_bark", "Dark Oak Bark Stairs", "Dark Oak Bark Slab", "Double Dark Oak Bark Slab", "woodlike") +local S = minetest.get_translator("mclx_stairs") +local doc_mod = minetest.get_modpath("doc") -mcl_stairs.register_slab("lapisblock", "mcl_core:lapisblock", {pickaxey=3}, {"mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_stairs_lapis_block_slab.png"}, "Lapis Lazuli Slab", nil, nil, "Double Lapis Lazuli Slab") -mcl_stairs.register_stair("lapisblock", "mcl_core:lapisblock", {pickaxey=3}, {"mcl_stairs_lapis_block_slab.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_stairs_lapis_block_slab.png"}, "Lapis Lazuli Stairs", nil, nil, "woodlike") +mcl_stairs.register_stair_and_slab_simple("tree_bark", "mcl_core:tree_bark", S("Oak Bark Stairs"), S("Oak Bark Slab"), S("Double Oak Bark Slab"), "woodlike") +mcl_stairs.register_stair_and_slab_simple("acaciatree_bark", "mcl_core:acaciatree_bark", S("Acacia Bark Stairs"), S("Acacia Bark Slab"), S("Double Acacia Bark Slab"), "woodlike") +mcl_stairs.register_stair_and_slab_simple("sprucetree_bark", "mcl_core:sprucetree_bark", S("Spruce Bark Stairs"), S("Spruce Bark Slab"), S("Double Spruce Bark Slab"), "woodlike") +mcl_stairs.register_stair_and_slab_simple("birchtree_bark", "mcl_core:birchtree_bark", S("Birch Bark Stairs"), S("Birch Bark Slab"), S("Double Birch Bark Slab"), "woodlike") +mcl_stairs.register_stair_and_slab_simple("jungletree_bark", "mcl_core:jungletree_bark", S("Jungle Bark Stairs"), S("Jungle Bark Slab"), S("Double Jungle Bark Slab"), "woodlike") +mcl_stairs.register_stair_and_slab_simple("darktree_bark", "mcl_core:darktree_bark", S("Dark Oak Bark Stairs"), S("Dark Oak Bark Slab"), S("Double Dark Oak Bark Slab"), "woodlike") -mcl_stairs.register_slab("goldblock", "mcl_core:goldblock", {pickaxey=4}, {"default_gold_block.png", "default_gold_block.png", "mcl_stairs_gold_block_slab.png"}, "Slab of Gold", nil, nil, "Double Slab of Gold") -mcl_stairs.register_stair("goldblock", "mcl_core:goldblock", {pickaxey=4}, {"mcl_stairs_gold_block_slab.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "mcl_stairs_gold_block_slab.png"}, "Stairs of Gold", nil, nil, "woodlike") +mcl_stairs.register_slab("lapisblock", "mcl_core:lapisblock", {pickaxey=3}, {"mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_stairs_lapis_block_slab.png"}, S("Lapis Lazuli Slab"), nil, nil, S("Double Lapis Lazuli Slab")) +mcl_stairs.register_stair("lapisblock", "mcl_core:lapisblock", {pickaxey=3}, {"mcl_stairs_lapis_block_slab.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_stairs_lapis_block_slab.png"}, S("Lapis Lazuli Stairs"), nil, nil, "woodlike") -mcl_stairs.register_slab("ironblock", "mcl_core:ironblock", {pickaxey=2}, {"default_steel_block.png", "default_steel_block.png", "mcl_stairs_iron_block_slab.png"}, "Slab of Iron", nil, nil, "Double Slab of Iron") -mcl_stairs.register_stair("ironblock", "mcl_core:ironblock", {pickaxey=2}, {"mcl_stairs_iron_block_slab.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "mcl_stairs_iron_block_slab.png"}, "Stairs of Iron", nil, nil, "woodlike") +mcl_stairs.register_slab("goldblock", "mcl_core:goldblock", {pickaxey=4}, {"default_gold_block.png", "default_gold_block.png", "mcl_stairs_gold_block_slab.png"}, S("Slab of Gold"), nil, nil, S("Double Slab of Gold")) +mcl_stairs.register_stair("goldblock", "mcl_core:goldblock", {pickaxey=4}, {"mcl_stairs_gold_block_slab.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "mcl_stairs_gold_block_slab.png"}, S("Stairs of Gold"), nil, nil, "woodlike") + +mcl_stairs.register_slab("ironblock", "mcl_core:ironblock", {pickaxey=2}, {"default_steel_block.png", "default_steel_block.png", "mcl_stairs_iron_block_slab.png"}, S("Slab of Iron"), nil, nil, S("Double Slab of Iron")) +mcl_stairs.register_stair("ironblock", "mcl_core:ironblock", {pickaxey=2}, {"mcl_stairs_iron_block_slab.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "mcl_stairs_iron_block_slab.png"}, S("Stairs of Iron"), nil, nil, "woodlike") mcl_stairs.register_stair("stonebrickcracked", "mcl_core:stonebrickcracked", {pickaxey=1}, {"mcl_core_stonebrick_cracked.png"}, - "Cracked Stone Brick Stairs", + S("Cracked Stone Brick Stairs"), mcl_sounds.node_sound_stone_defaults(), 1.5, nil, "mcl_core:stonebrickcracked") mcl_stairs.register_slab("stonebrickcracked", "mcl_core:stonebrickcracked", {pickaxey=1}, {"mcl_core_stonebrick_cracked.png"}, - "Cracked Stone Brick Slab", - mcl_sounds.node_sound_stone_defaults(), 2, "Double Cracked Stone Brick Slab", "mcl_core:stonebrickcracked") + S("Cracked Stone Brick Slab"), + mcl_sounds.node_sound_stone_defaults(), 2, S("Double Cracked Stone Brick Slab"), "mcl_core:stonebrickcracked") local block = {} block.dyes = { - {"white", "White", "white"}, - {"grey", "Grey", "dark_grey"}, - {"silver", "Light Grey", "grey"}, - {"black", "Black", "black"}, - {"red", "Red", "red"}, - {"yellow", "Yellow", "yellow"}, - {"green", "Green", "dark_green"}, - {"cyan", "Cyan", "cyan"}, - {"blue", "Blue", "blue"}, - {"magenta", "Magenta", "magenta"}, - {"orange", "Orange", "orange"}, - {"purple", "Purple", "violet"}, - {"brown", "Brown", "brown"}, - {"pink", "Pink", "pink"}, - {"lime", "Lime", "green"}, - {"light_blue", "Light Blue", "lightblue"}, + {"white", S("White Concrete Stairs"), S("White Concrete Slab"), S("Double White Concrete Slab"), "white"}, + {"grey", S("Grey Concrete Stairs"), S("Grey Concrete Slab"), S("Double Grey Concrete Slab"), "dark_grey"}, + {"silver", S("Light Grey Concrete Stairs"), S("Light Grey Concrete Slab"), S("Double Light Grey Concrete Slab"), "grey"}, + {"black", S("Black Concrete Stairs"), S("Black Concrete Slab"), S("Double Black Concrete Slab"), "black"}, + {"red", S("Red Concrete Stairs"), S("Red Concrete Slab"), S("Double Red Concrete Slab"), "red"}, + {"yellow", S("Yellow Concrete Stairs"), S("Yellow Concrete Slab"), S("Double Yellow Concrete Slab"), "yellow"}, + {"green", S("Green Concrete Stairs"), S("Green Concrete Slab"), S("Double Green Concrete Slab"), "dark_green"}, + {"cyan", S("Cyan Concrete Stairs"), S("Cyan Concrete Slab"), S("Double Cyan Concrete Slab"), "cyan"}, + {"blue", S("Blue Concrete Stairs"), S("Blue Concrete Slab"), S("Double Blue Concrete Slab"), "blue"}, + {"magenta", S("Magenta Concrete Stairs"), S("Magenta Concrete Slab"), S("Double Magenta Concrete Slab"), "magenta"}, + {"orange", S("Orange Concrete Stairs"), S("Orange Concrete Slab"), S("Double Orange Concrete Slab"), "orange"}, + {"purple", S("Purple Concrete Stairs"), S("Purple Concrete Slab"), S("Double Purple Concrete Slab"), "violet"}, + {"brown", S("Brown Concrete Stairs"), S("Brown Concrete Slab"), S("Double Brown Concrete Slab"), "brown"}, + {"pink", S("Pink Concrete Stairs"), S("Pink Concrete Slab"), S("Double Pink Concrete Slab"), "pink"}, + {"lime", S("Lime Concrete Stairs"), S("Lime Concrete Slab"), S("Double Lime Concrete Slab"), "green"}, + {"light_blue", S("Light Blue Concrete Stairs"), S("Light Blue Concrete Slab"), S("Double Light Blue Concrete Slab"), "lightblue"}, } +local canonical_color = "yellow" for i=1, #block.dyes do local c = block.dyes[i][1] + local is_canonical = c == canonical_color mcl_stairs.register_stair_and_slab_simple("concrete_"..c, "mcl_colorblocks:concrete_"..c, - block.dyes[i][2].." Concrete Stairs", - block.dyes[i][2].." Concrete Slab", - "Double "..block.dyes[i][2].." Concrete Slab") + block.dyes[i][2], + block.dyes[i][3], + block.dyes[i][4]) + + if doc_mod then + if not is_canonical then + doc.add_entry_alias("nodes", "mcl_stairs:slab_concrete_"..canonical_color, "nodes", "mcl_stairs:slab_concrete_"..c) + doc.add_entry_alias("nodes", "mcl_stairs:slab_concrete_"..canonical_color.."_double", "nodes", "mcl_stairs:slab_concrete_"..c.."_double") + doc.add_entry_alias("nodes", "mcl_stairs:stair_concrete_"..canonical_color, "nodes", "mcl_stairs:stair_concrete_"..c) + minetest.override_item("mcl_stairs:slab_concrete_"..c, { _doc_items_create_entry = false }) + minetest.override_item("mcl_stairs:slab_concrete_"..c.."_double", { _doc_items_create_entry = false }) + minetest.override_item("mcl_stairs:stair_concrete_"..c, { _doc_items_create_entry = false }) + else + minetest.override_item("mcl_stairs:slab_concrete_"..c, { _doc_items_entry_name = S("Concrete Slab") }) + minetest.override_item("mcl_stairs:slab_concrete_"..c.."_double", { _doc_items_entry_name = S("Double Concrete Slab") }) + minetest.override_item("mcl_stairs:stair_concrete_"..c, { _doc_items_entry_name = S("Concrete Stairs") }) + end + end end diff --git a/mods/ITEMS/mclx_stairs/locale/mclx_stairs.de.tr b/mods/ITEMS/mclx_stairs/locale/mclx_stairs.de.tr new file mode 100644 index 000000000..c6f9f65d7 --- /dev/null +++ b/mods/ITEMS/mclx_stairs/locale/mclx_stairs.de.tr @@ -0,0 +1,82 @@ +# textdomain: mclx_stairs +Oak Bark Stairs=Eichenrindentreppe +Oak Bark Slab=Eichenrindenplatte +Double Oak Bark Slab=Doppeleichenrindenplatte +Acacia Bark Stairs=Akazienrindentreppe +Acacia Bark Slab=Akazienrindenplatte +Double Acacia Bark Slab=Doppelakazienrindenplatte +Spruce Bark Stairs=Fichtenrindentreppe +Spruce Bark Slab=Fichtenrindenplatte +Double Spruce Bark Slab=Doppelfichtenrindenplatte +Birch Bark Stairs=Birkenrindentreppe +Birch Bark Slab=Birkenrindenplatte +Double Birch Bark Slab=Doppelbirkenrindenplatte +Jungle Bark Stairs=Dschungelrindentreppe +Jungle Bark Slab=Dschungelrindenplatte +Double Jungle Bark Slab=Doppelschungelbirkenplatte +Dark Oak Bark Stairs=Schwarzeichenrindentreppe +Dark Oak Bark Slab=Schwarzeichenrindenplatte +Double Dark Oak Bark Slab=Doppelschwarzeichenrindenplatte +Lapis Lazuli Slab=Lapislazuliplatte +Double Lapis Lazuli Slab=Doppellapislazuliplatte +Lapis Lazuli Stairs=Lapislazulitreppe +Slab of Gold=Goldplatte +Double Slab of Gold=Doppelgoldplatte +Stairs of Gold=Goldtreppe +Slab of Iron=Eisenplatte +Double Slab of Iron=Doppeleisenplatte +Stairs of Iron=Eisentreppe +Cracked Stone Brick Stairs=Rissige Steinziegeltreppe +Cracked Stone Brick Slab=Rissige Steinziegelplatte +Double Cracked Stone Brick Slab=Doppelte rissige Steinziegelplatte +White Concrete Stairs=Weiße Betontreppe +White Concrete Slab=Weiße Betonplatte +Double White Concrete Slab=Doppelte weiße Betonplatte +Grey Concrete Stairs=Graue Betontreppe +Grey Concrete Slab=Graue Betonplatte +Double Grey Concrete Slab=Doppelte graue Betonplatte +Light Grey Concrete Stairs=Hellgraue Betontreppe +Light Grey Concrete Slab=Hellgraue Betonplatte +Double Light Grey Concrete Slab=Doppelte hellgraue Betonplatte +Black Concrete Stairs=Schwarze Betontreppe +Black Concrete Slab=Schwarze Betonplatte +Double Black Concrete Slab=Doppelte schwarze Betonplatte +Red Concrete Stairs=Rote Betontreppe +Red Concrete Slab=Rote Betonplatte +Double Red Concrete Slab=Doppelte rote Betonplatte +Yellow Concrete Stairs=Gelbe Betontreppe +Yellow Concrete Slab=Gelbe Betonplatte +Double Yellow Concrete Slab=Doppelte gelbe Betonplatte +Green Concrete Stairs=Grüne Betontreppe +Green Concrete Slab=Grüne Betonplatte +Double Green Concrete Slab=Doppelte grüne Betonplatte +Cyan Concrete Stairs=Türkise Betontreppe +Cyan Concrete Slab=Türkise Betonplatte +Double Cyan Concrete Slab=Doppelte Türkise Betonplatte +Blue Concrete Stairs=Blaue Betontreppe +Blue Concrete Slab=Blaue Betonplatte +Double Blue Concrete Slab=Doppelte blaue Betonplatte +Magenta Concrete Stairs=Magenta Betontreppe +Magenta Concrete Slab=Magenta Betonplatte +Double Magenta Concrete Slab=Doppelte magenta Betonplatte +Orange Concrete Stairs=Orange Betontreppe +Orange Concrete Slab=Orange Betonplatte +Double Orange Concrete Slab=Doppelte orange Betonplatte +Purple Concrete Stairs=Violette Betontreppe +Purple Concrete Slab=Violette Betonplatte +Double Purple Concrete Slab=Doppelte violette Betonplatte +Brown Concrete Stairs=Braune Betontreppe +Brown Concrete Slab=Braune Betonplatte +Double Brown Concrete Slab=Doppelte braune Betonplatte +Pink Concrete Stairs=Rosa Betontreppe +Pink Concrete Slab=Rosa Betonplatte +Double Pink Concrete Slab=Doppelte rosa Betonplatte +Lime Concrete Stairs=Lindgrüne Betontreppe +Lime Concrete Slab=Lindgrüne Betonplatte +Double Lime Concrete Slab=Doppelte Betonplatte +Light Blue Concrete Stairs=Hellblaue Betontreppe +Light Blue Concrete Slab=Hellblaue Betonplatte +Double Light Blue Concrete Slab=Doppelte hellblaue Betonplatte +Concrete Slab=Betonplatte +Double Concrete Slab=Doppelte Betonplatte +Concrete Stairs=Betontreppe diff --git a/mods/ITEMS/mclx_stairs/locale/template.txt b/mods/ITEMS/mclx_stairs/locale/template.txt new file mode 100644 index 000000000..b6272dbcf --- /dev/null +++ b/mods/ITEMS/mclx_stairs/locale/template.txt @@ -0,0 +1,82 @@ +# textdomain: mclx_stairs +Oak Bark Stairs= +Oak Bark Slab= +Double Oak Bark Slab= +Acacia Bark Stairs= +Acacia Bark Slab= +Double Acacia Bark Slab= +Spruce Bark Stairs= +Spruce Bark Slab= +Double Spruce Bark Slab= +Birch Bark Stairs= +Birch Bark Slab= +Double Birch Bark Slab= +Jungle Bark Stairs= +Jungle Bark Slab= +Double Jungle Bark Slab= +Dark Oak Bark Stairs= +Dark Oak Bark Slab= +Double Dark Oak Bark Slab= +Lapis Lazuli Slab= +Double Lapis Lazuli Slab= +Lapis Lazuli Stairs= +Slab of Gold= +Double Slab of Gold= +Stairs of Gold= +Slab of Iron= +Double Slab of Iron= +Stairs of Iron= +Cracked Stone Brick Stairs= +Cracked Stone Brick Slab= +Double Cracked Stone Brick Slab= +White Concrete Stairs= +White Concrete Slab= +Double White Concrete Slab= +Grey Concrete Stairs= +Grey Concrete Slab= +Double Grey Concrete Slab= +Light Grey Concrete Stairs= +Light Grey Concrete Slab= +Double Light Grey Concrete Slab= +Black Concrete Stairs= +Black Concrete Slab= +Double Black Concrete Slab= +Red Concrete Stairs= +Red Concrete Slab= +Double Red Concrete Slab= +Yellow Concrete Stairs= +Yellow Concrete Slab= +Double Yellow Concrete Slab= +Green Concrete Stairs= +Green Concrete Slab= +Double Green Concrete Slab= +Cyan Concrete Stairs= +Cyan Concrete Slab= +Double Cyan Concrete Slab= +Blue Concrete Stairs= +Blue Concrete Slab= +Double Blue Concrete Slab= +Magenta Concrete Stairs= +Magenta Concrete Slab= +Double Magenta Concrete Slab= +Orange Concrete Stairs= +Orange Concrete Slab= +Double Orange Concrete Slab= +Purple Concrete Stairs= +Purple Concrete Slab= +Double Purple Concrete Slab= +Brown Concrete Stairs= +Brown Concrete Slab= +Double Brown Concrete Slab= +Pink Concrete Stairs= +Pink Concrete Slab= +Double Pink Concrete Slab= +Lime Concrete Stairs= +Lime Concrete Slab= +Double Lime Concrete Slab= +Light Blue Concrete Stairs= +Light Blue Concrete Slab= +Double Light Blue Concrete Slab= +Concrete Slab= +Double Concrete Slab= +Concrete Stairs= diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua b/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua index 0b07fb14c..c4de2c522 100644 --- a/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua +++ b/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua @@ -66,7 +66,9 @@ armor = { version = "0.4.6", } -if minetest.get_modpath("skins") then +if minetest.get_modpath("mcl_skins") then + skin_mod = "mcl_skins" +elseif minetest.get_modpath("skins") then skin_mod = "skins" elseif minetest.get_modpath("simple_skins") then skin_mod = "simple_skins" @@ -197,7 +199,9 @@ end armor.get_player_skin = function(self, name) local skin = nil - if skin_mod == "skins" or skin_mod == "simple_skins" then + if skin_mod == "mcl_skins" then + skin = mcl_skins.skins[name] + elseif skin_mod == "skins" or skin_mod == "simple_skins" then skin = skins.skins[name] elseif skin_mod == "u_skins" then skin = u_skins.u_skins[name] @@ -380,7 +384,12 @@ minetest.register_on_joinplayer(function(player) wielditem = "3d_armor_trans.png", preview = armor.default_skin.."_preview.png", } - if skin_mod == "skins" then + if skin_mod == "mcl_skins" then + local skin = mcl_skins.skins[name] + if skin then + armor.textures[name].skin = skin..".png" + end + elseif skin_mod == "skins" then local skin = skins.skins[name] if skin and skins.get_type(skin) == skins.type.MODEL then armor.textures[name].skin = skin..".png" @@ -424,7 +433,7 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then armor.drop_armor = function(pos, stack) local obj = minetest.add_item(pos, stack) if obj then - obj:setvelocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)}) + obj:set_velocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)}) end end minetest.register_on_dieplayer(function(player) diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor/init.lua b/mods/ITEMS/minetest-3d_armor/3d_armor/init.lua index acd633276..ee4af5b5a 100644 --- a/mods/ITEMS/minetest-3d_armor/3d_armor/init.lua +++ b/mods/ITEMS/minetest-3d_armor/3d_armor/init.lua @@ -1,12 +1,14 @@ +local S = minetest.get_translator("3d_armor") + dofile(minetest.get_modpath(minetest.get_current_modname()).."/armor.lua") -- Regisiter Head Armor -local longdesc = "This is a piece of equippable armor which reduces the amount of damage you receive." -local usage = "To equip it, put it on the corresponding armor slot in your inventory menu." +local longdesc = S("This is a piece of equippable armor which reduces the amount of damage you receive.") +local usage = S("To equip it, put it on the corresponding armor slot in your inventory menu.") minetest.register_tool("3d_armor:helmet_leather", { - description = "Leather Cap", + description = S("Leather Cap"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_helmet_leather.png", @@ -16,7 +18,7 @@ minetest.register_tool("3d_armor:helmet_leather", { }) minetest.register_tool("3d_armor:helmet_iron", { - description = "Iron Helmet", + description = S("Iron Helmet"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_helmet_iron.png", @@ -26,7 +28,7 @@ minetest.register_tool("3d_armor:helmet_iron", { }) minetest.register_tool("3d_armor:helmet_gold", { - description = "Golden Helmet", + description = S("Golden Helmet"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_helmet_gold.png", @@ -36,7 +38,7 @@ minetest.register_tool("3d_armor:helmet_gold", { }) minetest.register_tool("3d_armor:helmet_diamond",{ - description = "Diamond Helmet", + description = S("Diamond Helmet"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_helmet_diamond.png", @@ -46,7 +48,7 @@ minetest.register_tool("3d_armor:helmet_diamond",{ }) minetest.register_tool("3d_armor:helmet_chain", { - description = "Chain Helmet", + description = S("Chain Helmet"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_helmet_chain.png", @@ -58,7 +60,7 @@ minetest.register_tool("3d_armor:helmet_chain", { -- Regisiter Torso Armor minetest.register_tool("3d_armor:chestplate_leather", { - description = "Leather Tunic", + description = S("Leather Tunic"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_chestplate_leather.png", @@ -68,7 +70,7 @@ minetest.register_tool("3d_armor:chestplate_leather", { }) minetest.register_tool("3d_armor:chestplate_iron", { - description = "Iron Chestplate", + description = S("Iron Chestplate"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_chestplate_iron.png", @@ -78,7 +80,7 @@ minetest.register_tool("3d_armor:chestplate_iron", { }) minetest.register_tool("3d_armor:chestplate_gold", { - description = "Golden Chestplate", + description = S("Golden Chestplate"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_chestplate_gold.png", @@ -88,7 +90,7 @@ minetest.register_tool("3d_armor:chestplate_gold", { }) minetest.register_tool("3d_armor:chestplate_diamond",{ - description = "Diamond Chestplate", + description = S("Diamond Chestplate"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_chestplate_diamond.png", @@ -98,7 +100,7 @@ minetest.register_tool("3d_armor:chestplate_diamond",{ }) minetest.register_tool("3d_armor:chestplate_chain", { - description = "Chain Chestplate", + description = S("Chain Chestplate"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_chestplate_chain.png", @@ -110,7 +112,7 @@ minetest.register_tool("3d_armor:chestplate_chain", { -- Regisiter Leg Armor minetest.register_tool("3d_armor:leggings_leather", { - description = "Leather Pants", + description = S("Leather Pants"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_leggings_leather.png", @@ -120,7 +122,7 @@ minetest.register_tool("3d_armor:leggings_leather", { }) minetest.register_tool("3d_armor:leggings_iron", { - description = "Iron Leggings", + description = S("Iron Leggings"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_leggings_iron.png", @@ -130,7 +132,7 @@ minetest.register_tool("3d_armor:leggings_iron", { }) minetest.register_tool("3d_armor:leggings_gold", { - description = "Golden Leggings", + description = S("Golden Leggings"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_leggings_gold.png", @@ -140,7 +142,7 @@ minetest.register_tool("3d_armor:leggings_gold", { }) minetest.register_tool("3d_armor:leggings_diamond",{ - description = "Diamond Leggings", + description = S("Diamond Leggings"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_leggings_diamond.png", @@ -150,7 +152,7 @@ minetest.register_tool("3d_armor:leggings_diamond",{ }) minetest.register_tool("3d_armor:leggings_chain", { - description = "Chain Leggings", + description = S("Chain Leggings"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_leggings_chain.png", @@ -161,7 +163,7 @@ minetest.register_tool("3d_armor:leggings_chain", { -- Regisiter Boots minetest.register_tool("3d_armor:boots_leather", { - description = "Leather Boots", + description = S("Leather Boots"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_boots_leather.png", @@ -171,7 +173,7 @@ minetest.register_tool("3d_armor:boots_leather", { }) minetest.register_tool("3d_armor:boots_iron", { - description = "Iron Boots", + description = S("Iron Boots"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_boots_iron.png", @@ -181,7 +183,7 @@ minetest.register_tool("3d_armor:boots_iron", { }) minetest.register_tool("3d_armor:boots_gold", { - description = "Golden Boots", + description = S("Golden Boots"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_boots_gold.png", @@ -191,7 +193,7 @@ minetest.register_tool("3d_armor:boots_gold", { }) minetest.register_tool("3d_armor:boots_diamond",{ - description = "Diamond Boots", + description = S("Diamond Boots"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_boots_diamond.png", @@ -201,7 +203,7 @@ minetest.register_tool("3d_armor:boots_diamond",{ }) minetest.register_tool("3d_armor:boots_chain", { - description = "Chain Boots", + description = S("Chain Boots"), _doc_items_longdesc = longdesc, _doc_items_usagehelp = usage, inventory_image = "3d_armor_inv_boots_chain.png", diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor/locale/3d_armor.de.tr b/mods/ITEMS/minetest-3d_armor/3d_armor/locale/3d_armor.de.tr new file mode 100644 index 000000000..12c7c09eb --- /dev/null +++ b/mods/ITEMS/minetest-3d_armor/3d_armor/locale/3d_armor.de.tr @@ -0,0 +1,23 @@ +# textdomain: 3d_armor +This is a piece of equippable armor which reduces the amount of damage you receive.=Dies ist ein Teil einer tragbaren Rüstung, die die Menge an Schaden, den Sie erleiden, reduziert. +To equip it, put it on the corresponding armor slot in your inventory menu.=Um es zu tragen, legen Sie es in den passenden Rüstungsplatz in ihrem Inventarmenü. +Leather Cap=Lederkappe +Iron Helmet=Eisenhelm +Golden Helmet=Goldhelm +Diamond Helmet=Diamanthelm +Chain Helmet=Kettenhelm +Leather Tunic=Ledertunika +Iron Chestplate=Eisenbrustpanzer +Golden Chestplate=Goldbrustpanzer +Diamond Chestplate=Diamantbrustpanzer +Chain Chestplate=Kettenbrustpanzer +Leather Pants=Lederhose +Iron Leggings=Eisenbeinlinge +Golden Leggings=Goldbeinlinge +Diamond Leggings=Diamantbeinlinge +Chain Leggings=Kettenbeinlinge +Leather Boots=Lederstiefel +Iron Boots=Eisenstiefel +Golden Boots=Goldstiefel +Diamond Boots=Diamantstiefel +Chain Boots=Kettenstiefel diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor/locale/template.txt b/mods/ITEMS/minetest-3d_armor/3d_armor/locale/template.txt new file mode 100644 index 000000000..f0126bca9 --- /dev/null +++ b/mods/ITEMS/minetest-3d_armor/3d_armor/locale/template.txt @@ -0,0 +1,23 @@ +# textdomain: 3d_armor +This is a piece of equippable armor which reduces the amount of damage you receive.= +To equip it, put it on the corresponding armor slot in your inventory menu.= +Leather Cap= +Iron Helmet= +Golden Helmet= +Diamond Helmet= +Chain Helmet= +Leather Tunic= +Iron Chestplate= +Golden Chestplate= +Diamond Chestplate= +Chain Chestplate= +Leather Pants= +Iron Leggings= +Golden Leggings= +Diamond Leggings= +Chain Leggings= +Leather Boots= +Iron Boots= +Golden Boots= +Diamond Boots= +Chain Boots= diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.b3d b/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.b3d index 7c27caeb5..c4d45b50e 100644 Binary files a/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.b3d and b/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.b3d differ diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.blend b/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.blend index f61e222cc..44f7e27de 100644 Binary files a/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.blend and b/mods/ITEMS/minetest-3d_armor/3d_armor/models/3d_armor_character.blend differ diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/depends.txt b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/depends.txt index 3998650d3..f3ae02169 100644 --- a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/depends.txt +++ b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/depends.txt @@ -2,5 +2,4 @@ mcl_core mcl_sounds mcl_stairs -doc_identifier? screwdriver? diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua index 02eb0bcbd..c2282f2ca 100644 --- a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua +++ b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("3d_armor_stand") + local elements = {"head", "torso", "legs", "feet"} local function get_stand_object(pos) @@ -63,7 +65,7 @@ local function update_entity(pos) yaw = math.pi / 2 end end - object:setyaw(yaw) + object:set_yaw(yaw) object:set_properties({textures={texture}}) end end @@ -86,11 +88,11 @@ if minetest.get_modpath("screwdriver") then on_rotate = screwdriver.disallow end --- FIXME: The armor stand should be an entity +-- TODO: The armor stand should be an entity minetest.register_node("3d_armor_stand:armor_stand", { - description = "Armor Stand", - _doc_items_longdesc = "An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand.", - _doc_items_usagehelp = "Hold an armor item in your hand and rightclick the armor stand to put it on the armor stand. To take a piece of armor from the armor stand, select your hand and rightclick the armor stand. You'll retrieve the first armor item from above.", + description = S("Armor Stand"), + _doc_items_longdesc = S("An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand."), + _doc_items_usagehelp = S("Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand."), drawtype = "mesh", mesh = "3d_armor_stand.obj", inventory_image = "3d_armor_stand_item.png", @@ -105,8 +107,8 @@ minetest.register_node("3d_armor_stand:armor_stand", { type = "fixed", fixed = {-0.5,-0.5,-0.5, 0.5,1.4,0.5} }, - -- FIXME: This should be breakable by 2 quick punches - groups = {handy=1, deco_block=1}, + -- TODO: This should be breakable by 2 quick punches + groups = {handy=1, deco_block=1, dig_by_piston=1, attached_node=1}, _mcl_hardness = 2, sounds = mcl_sounds.node_sound_wood_defaults(), on_construct = function(pos) @@ -238,6 +240,7 @@ minetest.register_entity("3d_armor_stand:armor_entity", { mesh = "3d_armor_entity.obj", visual_size = {x=1, y=1}, collisionbox = {-0.1,-0.4,-0.1, 0.1,1.3,0.1}, + pointable = false, textures = {"3d_armor_trans.png"}, pos = nil, timer = 0, @@ -279,10 +282,6 @@ minetest.register_lbm({ end, }) -if minetest.get_modpath("doc_identifier") ~= nil then - doc.sub.identifier.register_object("3d_armor_stand:armor_entity", "nodes", "3d_armor_stand:armor_stand") -end - minetest.register_craft({ output = "3d_armor_stand:armor_stand", recipe = { diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/locale/3d_armor_stand.de.tr b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/locale/3d_armor_stand.de.tr new file mode 100644 index 000000000..b947719bb --- /dev/null +++ b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/locale/3d_armor_stand.de.tr @@ -0,0 +1,4 @@ +# textdomain: 3d_armor_stand +Armor Stand=Rüstungsständer +An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand.=Ein Rüstungsständer ist ein dekoratives Objekt, welches verschiedene Teile einer Rüstung präsentiert. Alles, was Spieler als Rüstung tragen kann, kann auch an einem Rüstungsständer platziert werden. +Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand.=Platzieren Sie einfach einen Rüstungsgegenstand auf den Rüstungsständer. Um das oberte Rüstungsteil zu nehmen, wählen Sie Ihre Hand aus und benutzen Sie die Platzieren-Taste auf dem Rüstungsständer. diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/locale/template.txt b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/locale/template.txt new file mode 100644 index 000000000..9f7d0ca4c --- /dev/null +++ b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: 3d_armor_stand +Armor Stand= +An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand.= +Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand.= diff --git a/mods/ITEMS/minetest-3d_armor/modpack.txt b/mods/ITEMS/minetest-3d_armor/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/ITEMS/modpack.txt b/mods/ITEMS/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/ITEMS/xpanes/init.lua b/mods/ITEMS/xpanes/init.lua index 1b540ee69..42dbb807d 100644 --- a/mods/ITEMS/xpanes/init.lua +++ b/mods/ITEMS/xpanes/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("xpanes") +local mod_doc = minetest.get_modpath("doc") local function is_pane(pos) return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0 @@ -161,24 +163,35 @@ function xpanes.register_pane(name, def) recipe = def.recipe }) - if minetest.get_modpath("doc") then + if mod_doc and def._doc_items_create_entry ~= false then doc.add_entry_alias("nodes", "xpanes:" .. name .. "_flat", "nodes", "xpanes:" .. name) end end +local canonical_color = "yellow" -- Register glass pane (stained and unstained) local pane = function(description, node, append) - local texture1 - + local texture1, longdesc, entry_name, create_entry + local is_canonical = true -- Special case: Default (unstained) glass texture if append == "_natural" then texture1 = "default_glass.png" + longdesc = S("Glass panes are thin layers of glass which neatly connect to their neighbors as you build them.") else + if append ~= "_"..canonical_color then + is_canonical = false + create_entry = false + else + longdesc = S("Stained glass panes are thin layers of stained glass which neatly connect to their neighbors as you build them. They come in many different colors.") + entry_name = S("Stained Glass Pane") + end texture1 = "mcl_core_glass"..append..".png" end xpanes.register_pane("pane"..append, { description = description, - _doc_items_longdesc = "Glass panes are thin layers of glass which neatly connect to their neighbors as you build them.", + _doc_items_create_entry = create_entry, + _doc_items_entry_name = entry_name, + _doc_items_longdesc = longdesc, textures = {texture1, texture1, "xpanes_top_glass"..append..".png"}, use_texture_alpha = true, inventory_image = texture1, @@ -193,12 +206,17 @@ local pane = function(description, node, append) _mcl_blast_resistance = 1.5, _mcl_hardness = 0.3, }) + + if mod_doc and not is_canonical then + doc.add_entry_alias("nodes", "xpanes:pane_".. canonical_color .. "_flat", "nodes", "xpanes:pane"..append) + doc.add_entry_alias("nodes", "xpanes:pane_".. canonical_color .. "_flat", "nodes", "xpanes:pane"..append.."_flat") + end end -- Iron Bars xpanes.register_pane("bar", { - description = "Iron Bars", - _doc_items_longdesc = "Iron bars neatly connect to their neighbors as you build them.", + description = S("Iron Bars"), + _doc_items_longdesc = S("Iron bars neatly connect to their neighbors as you build them."), textures = {"xpanes_pane_iron.png","xpanes_pane_iron.png","xpanes_top_iron.png"}, inventory_image = "xpanes_pane_iron.png", wield_image = "xpanes_pane_iron.png", @@ -213,22 +231,22 @@ xpanes.register_pane("bar", { }) -- Glass Pane -pane("Glass Pane", "mcl_core:glass", "_natural") -- triggers special case +pane(S("Glass Pane"), "mcl_core:glass", "_natural") -- triggers special case -- Stained Glass Pane -pane("Red Stained Glass Pane", "mcl_core:glass_red", "_red") -pane("Green Stained Glass Pane", "mcl_core:glass_green", "_green") -pane("Blue Stained Glass Pane", "mcl_core:glass_blue", "_blue") -pane("Light Blue Stained Glass Pane", "mcl_core:glass_light_blue", "_light_blue") -pane("Black Stained Glass Pane", "mcl_core:glass_black", "_black") -pane("White Stained Glass Pane", "mcl_core:glass_white", "_white") -pane("Yellow Stained Glass Pane", "mcl_core:glass_yellow", "_yellow") -pane("Brown Stained Glass Pane", "mcl_core:glass_brown", "_brown") -pane("Orange Stained Glass Pane", "mcl_core:glass_orange", "_orange") -pane("Pink Stained Glass Pane", "mcl_core:glass_pink", "_pink") -pane("Grey Stained Glass Pane", "mcl_core:glass_gray", "_gray") -pane("Lime Stained Glass Pane", "mcl_core:glass_lime", "_lime") -pane("Light Grey Stained Glass Pane", "mcl_core:glass_silver", "_silver") -pane("Magenta Stained Glass Pane", "mcl_core:glass_magenta", "_magenta") -pane("Purple Stained Glass Pane", "mcl_core:glass_purple", "_purple") -pane("Cyan Stained Glass Pane", "mcl_core:glass_cyan", "_cyan") +pane(S("Red Stained Glass Pane"), "mcl_core:glass_red", "_red") +pane(S("Green Stained Glass Pane"), "mcl_core:glass_green", "_green") +pane(S("Blue Stained Glass Pane"), "mcl_core:glass_blue", "_blue") +pane(S("Light Blue Stained Glass Pane"), "mcl_core:glass_light_blue", "_light_blue") +pane(S("Black Stained Glass Pane"), "mcl_core:glass_black", "_black") +pane(S("White Stained Glass Pane"), "mcl_core:glass_white", "_white") +pane(S("Yellow Stained Glass Pane"), "mcl_core:glass_yellow", "_yellow") +pane(S("Brown Stained Glass Pane"), "mcl_core:glass_brown", "_brown") +pane(S("Orange Stained Glass Pane"), "mcl_core:glass_orange", "_orange") +pane(S("Pink Stained Glass Pane"), "mcl_core:glass_pink", "_pink") +pane(S("Grey Stained Glass Pane"), "mcl_core:glass_gray", "_gray") +pane(S("Lime Stained Glass Pane"), "mcl_core:glass_lime", "_lime") +pane(S("Light Grey Stained Glass Pane"), "mcl_core:glass_silver", "_silver") +pane(S("Magenta Stained Glass Pane"), "mcl_core:glass_magenta", "_magenta") +pane(S("Purple Stained Glass Pane"), "mcl_core:glass_purple", "_purple") +pane(S("Cyan Stained Glass Pane"), "mcl_core:glass_cyan", "_cyan") diff --git a/mods/ITEMS/xpanes/locale/template.txt b/mods/ITEMS/xpanes/locale/template.txt new file mode 100644 index 000000000..cae83797b --- /dev/null +++ b/mods/ITEMS/xpanes/locale/template.txt @@ -0,0 +1,23 @@ +# textdomain: xpanes +Glass panes are thin layers of glass which neatly connect to their neighbors as you build them.= +Stained glass panes are thin layers of stained glass which neatly connect to their neighbors as you build them. They come in many different colors.= +Iron Bars= +Iron bars neatly connect to their neighbors as you build them.= +Glass Pane= +Stained Glass Pane= +Red Stained Glass Pane= +Green Stained Glass Pane= +Blue Stained Glass Pane= +Light Blue Stained Glass Pane= +Black Stained Glass Pane= +White Stained Glass Pane= +Yellow Stained Glass Pane= +Brown Stained Glass Pane= +Orange Stained Glass Pane= +Pink Stained Glass Pane= +Grey Stained Glass Pane= +Lime Stained Glass Pane= +Light Grey Stained Glass Pane= +Magenta Stained Glass Pane= +Purple Stained Glass Pane= +Cyan Stained Glass Pane= diff --git a/mods/ITEMS/xpanes/locale/xpanes.de.tr b/mods/ITEMS/xpanes/locale/xpanes.de.tr new file mode 100644 index 000000000..3c840b08c --- /dev/null +++ b/mods/ITEMS/xpanes/locale/xpanes.de.tr @@ -0,0 +1,23 @@ +# textdomain: xpanes +Glass panes are thin layers of glass which neatly connect to their neighbors as you build them.=Glasscheiben sind dünne Glasschichten, die sich mit ihren Nachbarn automatisch verbinden. +Stained glass panes are thin layers of stained glass which neatly connect to their neighbors as you build them. They come in many different colors.=Farbglasscheiben sind dünne Schichten aus Farbglas, die sich mit ihren Nachbarn automatisch verbinden. Es gibt sie in vielen verschiedenen Farben. +Iron Bars=Eisenstangen +Iron bars neatly connect to their neighbors as you build them.=Eisenstangen verbinden sich mit den Nachbarn, wenn sie gebaut werden. +Glass Pane=Glasscheibe +Stained Glass Pane=Buntglasscheibe +Red Stained Glass Pane=Rote Buntglasscheibe +Green Stained Glass Pane=Grüne Buntglasscheibe +Blue Stained Glass Pane=Blaue Buntglasscheibe +Light Blue Stained Glass Pane=Hellblaue Buntglasscheibe +Black Stained Glass Pane=Schwarze Buntglasscheibe +White Stained Glass Pane=Weiße Buntglasscheibe +Yellow Stained Glass Pane=Gelbe Buntglasscheibe +Brown Stained Glass Pane=Braune Buntglasscheibe +Orange Stained Glass Pane=Orange Buntglasscheibe +Pink Stained Glass Pane=Rosa Buntglasscheibe +Grey Stained Glass Pane=Graue Buntglasscheibe +Lime Stained Glass Pane=Lindgrüne Buntglasscheibe +Light Grey Stained Glass Pane=Hellgraue Buntglasscheibe +Magenta Stained Glass Pane=Magenta Buntglasscheibe +Purple Stained Glass Pane=Violette Buntglasscheibe +Cyan Stained Glass Pane=Türkise Buntglasscheibe diff --git a/mods/MAPGEN/mcl_biomes/depends.txt b/mods/MAPGEN/mcl_biomes/depends.txt index 3e94ed7ca..4ec3afaea 100644 --- a/mods/MAPGEN/mcl_biomes/depends.txt +++ b/mods/MAPGEN/mcl_biomes/depends.txt @@ -3,3 +3,4 @@ mcl_core mcl_worlds mcl_farming mcl_flowers +mcl_end diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 93945354d..19880f5b9 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1,24 +1,24 @@ local mg_name = minetest.get_mapgen_setting("mg_name") +local mg_seed = minetest.get_mapgen_setting("seed") -- Some mapgen settings -local imitate = minetest.settings:get("mcl_imitation_mode") local superflat = mg_name == "flat" and minetest.get_mapgen_setting("mcl_superflat_classic") == "true" -local generate_fallen_logs = false +local generate_fallen_logs = minetest.settings:get_bool("mcl_generate_fallen_logs", false) --- Jungle bush type. Default (PC/Java Edition) is Jungle Wood + Oak Leaves +-- Jungle bush schematic. In PC/Java Edition it's Jungle Wood + Oak Leaves local jungle_bush_schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush_oak_leaves.mts" -if imitate == "pocket_edition" then - -- Simple fallen tree trunk logs (not very good yet) - generate_fallen_logs = true - -- Jungle bush: Jungle Wood + Jungle Leaves - jungle_bush_schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush_jungle_leaves.mts" -end + +local deco_id_chorus_plant -- -- Register biomes -- +--[[ Special biome field: _mcl_biome_type: +Rough categorization of biomes: One of "snowy", "cold", "medium" and "hot" +Based off ]] + local function register_classic_superflat_biome() -- Classic Superflat: bedrock (not part of biome), 2 dirt, 1 grass block minetest.register_biome({ @@ -32,6 +32,7 @@ local function register_classic_superflat_biome() y_max = mcl_vars.mg_overworld_max, humidity_point = 50, heat_point = 50, + _mcl_biome_type = "medium", }) end @@ -58,7 +59,7 @@ local function register_biomes() * Other modifiers: Some complex biomes require more layers to improve the landscape. The following naming conventions apply: - * The land biome name is equal to the MC biome name (in camel case) + * The land biome name is equal to the MC biome name, as of Minecraft 1.11 (in camel case) * Height modifiers and sub-biomes are appended with underscores and in lowercase. Example: “_ocean” * Non-MC biomes are written in lowercase * MC dimension biomes are named after their MC dimension @@ -66,27 +67,20 @@ local function register_biomes() Intentionally missing biomes: * River (generated by valleys and v7) * Frozen River (generated by valleys and v7) - * Mesa (Bryce) - * Hills biomes - * Plateau - * Plateau M - * Cold Taiga M - * Taiga M - * Roofed Forest M - * Swampland M - * Mesa Plateau F M - * Extreme Hills Edge + * Hills biomes (shape only) + * Plateau (shape only) + * Plateau M (shape only) + * Cold Taiga M (mountain only) + * Taiga M (mountain only) + * Roofed Forest M (mountain only) + * Swampland M (mountain only) + * Extreme Hills Edge (unused in MC) TODO: * Better beaches * Improve Extreme Hills M * Desert M - Tricky biomes: - * Mushroom Island (must be on island) - * Stone Beach (must be at beaches only) - TODO: Find a way to position these biomes accordingly. - ]] -- List of Overworld biomes without modifiers. @@ -119,7 +113,9 @@ local function register_biomes() "Savanna", "SavannaM", "Mesa", + "MesaBryce", "MesaPlateauF", + "MesaPlateauFM", } local OCEAN_MIN = -15 @@ -133,6 +129,8 @@ local function register_biomes() depth_top = 1, node_filler = "mcl_core:dirt", depth_filler = 2, + node_water_top = "mcl_core:ice", + depth_water_top = 1, node_river_water = "mcl_core:ice", node_riverbed = "mcl_core:sand", depth_riverbed = 2, @@ -140,6 +138,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 24, heat_point = -5, + _mcl_biome_type = "snowy", }) minetest.register_biome({ name = "IcePlainsSpikes_ocean", @@ -147,8 +146,6 @@ local function register_biomes() depth_top = 2, node_filler = "mcl_core:dirt", depth_filler = 3, - node_water_top = "mcl_core:ice", - depth_water_top = 2, node_river_water = "mcl_core:ice", node_riverbed = "mcl_core:sand", depth_riverbed = 2, @@ -156,6 +153,7 @@ local function register_biomes() y_max = 0, humidity_point = 24, heat_point = -5, + _mcl_biome_type = "snowy", }) -- Cold Taiga @@ -172,6 +170,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 58, heat_point = 8, + _mcl_biome_type = "snowy", }) -- A cold beach-like biome, implemented as low part of Cold Taiga @@ -190,6 +189,7 @@ local function register_biomes() y_max = 2, humidity_point = 58, heat_point = 8, + _mcl_biome_type = "snowy", }) -- Water part of the beach. Added to prevent snow being on the ice. minetest.register_biome({ @@ -202,10 +202,11 @@ local function register_biomes() depth_filler = 2, node_riverbed = "mcl_core:sand", depth_riverbed = 2, - y_min = -3, + y_min = -4, y_max = 0, humidity_point = 58, heat_point = 8, + _mcl_biome_type = "snowy", }) minetest.register_biome({ name = "ColdTaiga_ocean", @@ -216,9 +217,11 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 2, y_min = OCEAN_MIN, - y_max = -4, + y_max = -5, humidity_point = 58, heat_point = 8, + vertical_blend = 1, + _mcl_biome_type = "snowy", }) -- Mega Taiga @@ -234,6 +237,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 76, heat_point = 10, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "MegaTaiga_ocean", @@ -247,6 +251,7 @@ local function register_biomes() y_max = 0, humidity_point = 76, heat_point = 10, + _mcl_biome_type = "cold", }) -- Mega Spruce Taiga @@ -262,6 +267,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 100, heat_point = 8, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "MegaSpruceTaiga_ocean", @@ -275,9 +281,11 @@ local function register_biomes() y_max = 0, humidity_point = 100, heat_point = 8, + _mcl_biome_type = "cold", }) -- Extreme Hills + -- Sparsely populated grasslands with little tallgras and trees. minetest.register_biome({ name = "ExtremeHills", node_top = "mcl_core:dirt_with_grass", @@ -290,6 +298,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 10, heat_point = 45, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "ExtremeHills_beach", @@ -300,10 +309,11 @@ local function register_biomes() depth_filler = 3, node_riverbed = "mcl_core:sand", depth_riverbed = 4, - y_min = -3, + y_min = -4, y_max = 3, humidity_point = 10, heat_point = 45, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "ExtremeHills_ocean", @@ -314,12 +324,15 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 4, y_min = OCEAN_MIN, - y_max = -4, + y_max = -5, + vertical_blend = 1, humidity_point = 10, heat_point = 45, + _mcl_biome_type = "cold", }) -- Extreme Hills M + -- Just gravel. minetest.register_biome({ name = "ExtremeHillsM", node_top = "mcl_core:gravel", @@ -332,6 +345,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 0, heat_point = 25, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "ExtremeHillsM_ocean", @@ -345,11 +359,12 @@ local function register_biomes() y_max = 0, humidity_point = 0, heat_point = 25, + _mcl_biome_type = "cold", }) -- Extreme Hills+ - -- This biome is identical to Extreme Hills on the surface but has snow-covered mountains with spruce/oak - -- Forests above a certain height. + -- This biome is near-identical to Extreme Hills on the surface but has snow-covered mountains with spruce/oak + -- forests above a certain height. minetest.register_biome({ name = "ExtremeHills+", node_top = "mcl_core:dirt_with_grass", @@ -359,11 +374,13 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 4, y_min = 1, - y_max = 44, + y_max = 41, humidity_point = 24, heat_point = 25, + vertical_blend = 6, + _mcl_biome_type = "cold", }) - ---- Sub-biome for Extreme Hills+ for those snow Forests + ---- Sub-biome for Extreme Hills+ for those snow forests minetest.register_biome({ name = "ExtremeHills+_snowtop", node_dust = "mcl_core:snow", @@ -374,10 +391,11 @@ local function register_biomes() node_river_water = "mcl_core:ice", node_riverbed = "mcl_core:sand", depth_riverbed = 4, - y_min = 45, + y_min = 42, y_max = mcl_vars.mg_overworld_max, humidity_point = 24, heat_point = 25, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "ExtremeHills+_ocean", @@ -391,18 +409,21 @@ local function register_biomes() y_max = 0, humidity_point = 24, heat_point = 25, + _mcl_biome_type = "cold", }) -- Stone beach - -- TODO: Should occour only at real beaches. + -- Just stone. + -- Not neccessarily a beach at all, only named so according to MC minetest.register_biome({ name = "StoneBeach", node_riverbed = "mcl_core:sand", depth_riverbed = 1, - y_min = -6, + y_min = -7, y_max = mcl_vars.mg_overworld_max, humidity_point = 0, heat_point = 8, + _mcl_biome_type = "cold", }) minetest.register_biome({ @@ -412,9 +433,11 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 1, y_min = OCEAN_MIN, - y_max = -7, + y_max = -8, + vertical_blend = 2, humidity_point = 0, heat_point = 8, + _mcl_biome_type = "cold", }) -- Ice Plains @@ -434,6 +457,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 24, heat_point = 8, + _mcl_biome_type = "snowy", }) minetest.register_biome({ name = "IcePlains_ocean", @@ -447,6 +471,7 @@ local function register_biomes() y_max = 0, humidity_point = 24, heat_point = 8, + _mcl_biome_type = "snowy", }) -- Plains @@ -462,6 +487,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 39, heat_point = 58, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Plains_beach", @@ -475,6 +501,7 @@ local function register_biomes() y_max = 2, humidity_point = 39, heat_point = 58, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Plains_ocean", @@ -488,6 +515,7 @@ local function register_biomes() y_max = -1, humidity_point = 39, heat_point = 58, + _mcl_biome_type = "medium", }) -- Sunflower Plains @@ -503,6 +531,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 28, heat_point = 45, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "SunflowerPlains_ocean", @@ -516,6 +545,7 @@ local function register_biomes() y_max = 0, humidity_point = 28, heat_point = 45, + _mcl_biome_type = "medium", }) -- Taiga @@ -531,6 +561,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 58, heat_point = 22, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "Taiga_beach", @@ -544,6 +575,7 @@ local function register_biomes() y_max = 3, humidity_point = 58, heat_point = 22, + _mcl_biome_type = "cold", }) minetest.register_biome({ name = "Taiga_ocean", @@ -557,6 +589,7 @@ local function register_biomes() y_max = 0, humidity_point = 58, heat_point = 22, + _mcl_biome_type = "cold", }) -- Forest @@ -572,6 +605,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 61, heat_point = 45, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Forest_beach", @@ -585,6 +619,7 @@ local function register_biomes() y_max = 0, humidity_point = 61, heat_point = 45, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Forest_ocean", @@ -598,6 +633,7 @@ local function register_biomes() y_max = -2, humidity_point = 61, heat_point = 45, + _mcl_biome_type = "medium", }) -- Flower Forest @@ -613,6 +649,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 44, heat_point = 32, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "FlowerForest_beach", @@ -626,6 +663,7 @@ local function register_biomes() y_max = 2, humidity_point = 44, heat_point = 32, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "FlowerForest_ocean", @@ -639,6 +677,7 @@ local function register_biomes() y_max = -3, humidity_point = 44, heat_point = 32, + _mcl_biome_type = "medium", }) -- Birch Forest @@ -654,6 +693,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 78, heat_point = 31, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "BirchForest_ocean", @@ -667,6 +707,7 @@ local function register_biomes() y_max = 0, humidity_point = 78, heat_point = 31, + _mcl_biome_type = "medium", }) -- Birch Forest M @@ -682,6 +723,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 77, heat_point = 27, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "BirchForestM_ocean", @@ -695,6 +737,7 @@ local function register_biomes() y_max = 0, humidity_point = 77, heat_point = 27, + _mcl_biome_type = "medium", }) -- Desert @@ -711,6 +754,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 26, heat_point = 94, + _mcl_biome_type = "hot", }) minetest.register_biome({ name = "Desert_ocean", @@ -724,6 +768,7 @@ local function register_biomes() y_max = 0, humidity_point = 26, heat_point = 94, + _mcl_biome_type = "hot", }) -- Roofed Forest @@ -739,6 +784,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 94, heat_point = 27, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "RoofedForest_ocean", @@ -752,9 +798,11 @@ local function register_biomes() y_max = 0, humidity_point = 94, heat_point = 27, + _mcl_biome_type = "medium", }) - -- Mesa + -- Mesa: Starts with a couple of sand-covered layers (the "sandlevel"), + -- followed by terracotta with colorful (but imperfect) strata minetest.register_biome({ name = "Mesa", node_top = "mcl_colorblocks:hardened_clay", @@ -767,6 +815,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 0, heat_point = 100, + _mcl_biome_type = "hot", }) -- Helper biome for the red sand at the bottom of Mesas. minetest.register_biome({ @@ -778,10 +827,11 @@ local function register_biomes() node_riverbed = "mcl_core:redsand", depth_riverbed = 1, node_stone = "mcl_colorblocks:hardened_clay_orange", - y_min = -3, + y_min = -4, y_max = 10, humidity_point = 0, heat_point = 100, + _mcl_biome_type = "hot", }) minetest.register_biome({ name = "Mesa_ocean", @@ -792,13 +842,63 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 2, y_min = OCEAN_MIN, - y_max = -4, + y_max = -5, + vertical_blend = 1, humidity_point = 0, heat_point = 100, + _mcl_biome_type = "hot", }) + -- Mesa Bryce: Variant of Mesa, but with perfect strata and a much smaller red sand desert + minetest.register_biome({ + name = "MesaBryce", + node_top = "mcl_colorblocks:hardened_clay", + depth_top = 1, + node_filler = "mcl_colorblocks:hardened_clay", + node_riverbed = "mcl_colorblocks:hardened_clay", + depth_riverbed = 1, + node_stone = "mcl_colorblocks:hardened_clay", + y_min = 4, + y_max = mcl_vars.mg_overworld_max, + humidity_point = -5, + heat_point = 100, + _mcl_biome_type = "hot", + }) + minetest.register_biome({ + name = "MesaBryce_sandlevel", + node_top = "mcl_core:redsand", + depth_top = 1, + node_filler = "mcl_colorblocks:hardened_clay_orange", + depth_filler = 3, + node_riverbed = "mcl_colorblocks:hardened_clay", + depth_riverbed = 1, + node_stone = "mcl_colorblocks:hardened_clay_orange", + y_min = -4, + y_max = 3, + humidity_point = -5, + heat_point = 100, + _mcl_biome_type = "hot", + }) + minetest.register_biome({ + name = "MesaBryce_ocean", + node_top = "mcl_core:sand", + depth_top = 3, + node_filler = "mcl_core:sand", + depth_filler = 2, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = OCEAN_MIN, + y_max = -5, + vertical_blend = 1, + humidity_point = -5, + heat_point = 100, + _mcl_biome_type = "hot", + }) + + + -- Mesa Plateau F - -- Identical to Mesa below Y=30. At Y=30 and above there is an oak forest + -- Identical to Mesa below Y=30. At Y=30 and above there is a "dry" oak forest minetest.register_biome({ name = "MesaPlateauF", node_top = "mcl_colorblocks:hardened_clay", @@ -811,10 +911,12 @@ local function register_biomes() y_max = 29, humidity_point = 0, heat_point = 60, + vertical_blend = 0, -- we want a sharp transition + _mcl_biome_type = "hot", }) - - -- The actual plateau of this biome - -- This is a plateau for grass blocks, tall grass, coarse dirt and oaks. + -- The oak forest plateau of this biome. + -- This is a plateau for grass blocks, dry shrubs, tall grass, coarse dirt and oaks. + -- Strata don't generate here. minetest.register_biome({ name = "MesaPlateauF_grasstop", node_top = "mcl_core:dirt_with_dry_grass", @@ -828,22 +930,22 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 0, heat_point = 60, + _mcl_biome_type = "hot", }) - - -- Helper biome for the red sand at the bottom. minetest.register_biome({ name = "MesaPlateauF_sandlevel", node_top = "mcl_core:redsand", - depth_top = 1, + depth_top = 2, node_filler = "mcl_colorblocks:hardened_clay_orange", depth_filler = 3, node_riverbed = "mcl_core:redsand", depth_riverbed = 1, node_stone = "mcl_colorblocks:hardened_clay_orange", - y_min = -3, + y_min = -5, y_max = 10, humidity_point = 0, heat_point = 60, + _mcl_biome_type = "hot", }) minetest.register_biome({ name = "MesaPlateauF_ocean", @@ -854,11 +956,82 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 2, y_min = OCEAN_MIN, - y_max = -4, + y_max = -6, + vertical_blend = 1, humidity_point = 0, heat_point = 60, + _mcl_biome_type = "hot", }) + -- Mesa Plateau FM + -- Dryer and more "chaotic"/"weathered down" variant of MesaPlateauF: + -- oak forest is less dense, more coarse dirt, more erratic terrain, vertical blend, more red sand layers, + -- red sand as ores, red sandstone at sandlevel + minetest.register_biome({ + name = "MesaPlateauFM", + node_top = "mcl_colorblocks:hardened_clay", + depth_top = 1, + node_filler = "mcl_colorblocks:hardened_clay", + node_riverbed = "mcl_core:redsand", + depth_riverbed = 2, + node_stone = "mcl_colorblocks:hardened_clay", + y_min = 12, + y_max = 29, + humidity_point = -5, + heat_point = 60, + vertical_blend = 5, + _mcl_biome_type = "hot", + }) + -- Grass plateau + minetest.register_biome({ + name = "MesaPlateauFM_grasstop", + node_top = "mcl_core:dirt_with_dry_grass", + depth_top = 1, + node_filler = "mcl_core:coarse_dirt", + depth_filler = 2, + node_riverbed = "mcl_core:redsand", + depth_riverbed = 1, + node_stone = "mcl_colorblocks:hardened_clay", + y_min = 30, + y_max = mcl_vars.mg_overworld_max, + humidity_point = -5, + heat_point = 60, + _mcl_biome_type = "hot", + }) + minetest.register_biome({ + name = "MesaPlateauFM_sandlevel", + node_top = "mcl_core:redsand", + depth_top = 3, + node_filler = "mcl_colorblocks:hardened_clay_orange", + depth_filler = 3, + node_riverbed = "mcl_core:redsand", + depth_riverbed = 2, + node_stone = "mcl_colorblocks:hardened_clay", + -- red sand has wider reach than in other mesa biomes + y_min = -7, + y_max = 11, + humidity_point = -5, + heat_point = 60, + vertical_blend = 4, + _mcl_biome_type = "hot", + }) + minetest.register_biome({ + name = "MesaPlateauFM_ocean", + node_top = "mcl_core:sand", + depth_top = 3, + node_filler = "mcl_colorblocks:sand", + depth_filler = 3, + node_riverbed = "mcl_core:sand", + depth_riverbed = 3, + y_min = OCEAN_MIN, + y_max = -8, + vertical_blend = 2, + humidity_point = -5, + heat_point = 60, + _mcl_biome_type = "hot", + }) + + -- Savanna minetest.register_biome({ name = "Savanna", @@ -872,6 +1045,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 36, heat_point = 79, + _mcl_biome_type = "hot", }) minetest.register_biome({ name = "Savanna_beach", @@ -885,6 +1059,7 @@ local function register_biomes() y_max = 0, humidity_point = 36, heat_point = 79, + _mcl_biome_type = "hot", }) minetest.register_biome({ name = "Savanna_ocean", @@ -898,6 +1073,7 @@ local function register_biomes() y_max = -2, humidity_point = 36, heat_point = 79, + _mcl_biome_type = "hot", }) -- Savanna M @@ -915,6 +1091,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 48, heat_point = 100, + _mcl_biome_type = "hot", }) minetest.register_biome({ name = "SavannaM_ocean", @@ -928,6 +1105,7 @@ local function register_biomes() y_max = 0, humidity_point = 48, heat_point = 100, + _mcl_biome_type = "hot", }) -- Jungle @@ -943,6 +1121,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 88, heat_point = 81, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Jungle_shore", @@ -952,10 +1131,11 @@ local function register_biomes() depth_filler = 3, node_riverbed = "mcl_core:sand", depth_riverbed = 2, - y_min = -1, + y_min = -2, y_max = 0, humidity_point = 88, heat_point = 81, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Jungle_ocean", @@ -966,9 +1146,11 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 2, y_min = OCEAN_MIN, - y_max = -2, + y_max = -3, + vertical_blend = 1, humidity_point = 88, heat_point = 81, + _mcl_biome_type = "medium", }) -- Jungle M @@ -985,6 +1167,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 92, heat_point = 81, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "JungleM_shore", @@ -994,10 +1177,11 @@ local function register_biomes() depth_filler = 3, node_riverbed = "mcl_core:sand", depth_riverbed = 2, - y_min = -1, + y_min = -2, y_max = 0, humidity_point = 92, heat_point = 81, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "JungleM_ocean", @@ -1008,9 +1192,11 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 2, y_min = OCEAN_MIN, - y_max = -2, + y_max = -3, + vertical_blend = 1, humidity_point = 92, heat_point = 81, + _mcl_biome_type = "medium", }) -- Jungle Edge @@ -1026,6 +1212,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 88, heat_point = 76, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "JungleEdge_ocean", @@ -1039,6 +1226,7 @@ local function register_biomes() y_max = 0, humidity_point = 88, heat_point = 76, + _mcl_biome_type = "medium", }) -- Jungle Edge M (very rare). @@ -1057,6 +1245,7 @@ local function register_biomes() y_max = mcl_vars.mg_overworld_max, humidity_point = 90, heat_point = 79, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "JungleEdgeM_ocean", @@ -1070,6 +1259,7 @@ local function register_biomes() y_max = 0, humidity_point = 90, heat_point = 79, + _mcl_biome_type = "medium", }) -- Swampland @@ -1086,6 +1276,7 @@ local function register_biomes() y_max = 23, humidity_point = 90, heat_point = 50, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Swampland_shore", @@ -1095,10 +1286,11 @@ local function register_biomes() depth_filler = 3, node_riverbed = "mcl_core:sand", depth_riverbed = 2, - y_min = -4, + y_min = -5, y_max = 0, humidity_point = 90, heat_point = 50, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "Swampland_ocean", @@ -1109,13 +1301,15 @@ local function register_biomes() node_riverbed = "mcl_core:sand", depth_riverbed = 2, y_min = OCEAN_MIN, - y_max = -5, + y_max = -6, + vertical_blend = 1, humidity_point = 90, heat_point = 50, + _mcl_biome_type = "medium", }) -- Mushroom Island / Mushroom Island Shore (rare) - -- TODO: Make sure these biomes only spawn in islands + -- Not neccessarily an island at all, only named after Minecraft's biome minetest.register_biome({ name = "MushroomIsland", node_top = "mcl_core:mycelium", @@ -1127,8 +1321,10 @@ local function register_biomes() y_min = 4, -- Note: Limited in height! y_max = 20, + vertical_blend = 1, humidity_point = 106, heat_point = 50, + _mcl_biome_type = "medium", }) minetest.register_biome({ @@ -1143,6 +1339,7 @@ local function register_biomes() y_max = 3, humidity_point = 106, heat_point = 50, + _mcl_biome_type = "medium", }) minetest.register_biome({ name = "MushroomIsland_ocean", @@ -1156,6 +1353,7 @@ local function register_biomes() y_max = 0, humidity_point = 106, heat_point = 50, + _mcl_biome_type = "medium", }) -- Add deep ocean and underground biomes automatically. @@ -1175,6 +1373,8 @@ local function register_biomes() depth_filler = 2, node_riverbed = "mcl_core:gravel", depth_riverbed = 2, + vertical_blend = 5, + _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, }) -- Underground biomes are used to identify the underground and to prevent nodes from the surface @@ -1185,6 +1385,7 @@ local function register_biomes() humidity_point = minetest.registered_biomes[biome].humidity_point, y_min = mcl_vars.mg_overworld_min, y_max = DEEP_OCEAN_MIN - 1, + _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, }) end @@ -1207,6 +1408,7 @@ local function register_dimension_biomes() y_max = mcl_vars.mg_nether_max + 80, heat_point = 100, humidity_point = 0, + _mcl_biome_type = "hot", }) --[[ THE END ]] @@ -1222,6 +1424,7 @@ local function register_dimension_biomes() y_max = mcl_vars.mg_end_max + 80, heat_point = 50, humidity_point = 50, + _mcl_biome_type = "medium", }) end @@ -1240,7 +1443,11 @@ local function register_biome_ores() clust_size = 1, y_min = mcl_worlds.layer_to_y(4), y_max = mcl_worlds.layer_to_y(32), - biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean" }, + biomes = { + "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground", + "ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground", + "ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground", + }, }) -- Rarely replace stone with stone monster eggs. @@ -1260,7 +1467,11 @@ local function register_biome_ores() clust_size = 2, y_min = mcl_vars.mg_overworld_min, y_max = mcl_worlds.layer_to_y(61), - biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean" }, + biomes = { + "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground", + "ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground", + "ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground", + }, }) -- Bonus gold spawn in Mesa @@ -1274,7 +1485,10 @@ local function register_biome_ores() clust_size = 3, y_min = mcl_worlds.layer_to_y(32), y_max = mcl_worlds.layer_to_y(79), - biomes = { "Mesa", "Mesa_sandlevel", "Mesa_ocean" }, + biomes = { "Mesa", "Mesa_sandlevel", "Mesa_ocean", + "MesaBryce", "MesaBryce_sandlevel", "MesaBryce_ocean", + "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", + "MesaPlateauFM", "MesaPlateauFM_sandlevel", "MesaPlateauFM_ocean", }, }) end end @@ -1320,6 +1534,74 @@ local function register_biomelike_ores() y_max = mcl_vars.mg_overworld_max, biomes = { "MesaPlateauF_grasstop" }, }) + minetest.register_ore({ + ore_type = "sheet", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + column_height_max = 1, + column_midpoint_factor = 0.0, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + noise_threshold = -2.5, + noise_params = {offset=1, scale=15, spread={x=250, y=250, z=250}, seed=24, octaves=3, persist=0.80}, + biomes = { "MesaPlateauFM_grasstop" }, + }) + minetest.register_ore({ + ore_type = "blob", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + clust_scarcity = 1800, + clust_num_ores = 65, + clust_size = 15, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + biomes = { "MesaPlateauFM_grasstop" }, + }) + -- Occasionally dig out portions of MesaPlateauFM + minetest.register_ore({ + ore_type = "blob", + ore = "air", + wherein = {"group:hardened_clay", "group:sand","mcl_core:coarse_dirt"}, + clust_scarcity = 4000, + clust_size = 5, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + biomes = { "MesaPlateauFM", "MesaPlateauFM_grasstop" }, + }) + minetest.register_ore({ + ore_type = "blob", + ore = "mcl_core:redsandstone", + wherein = {"mcl_colorblocks:hardened_clay_orange"}, + clust_scarcity = 300, + clust_size = 8, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + biomes = { "MesaPlateauFM_sandlevel" }, + }) + -- More red sand in MesaPlateauFM + minetest.register_ore({ + ore_type = "sheet", + ore = "mcl_core:redsand", + wherein = {"group:hardened_clay"}, + clust_scarcity = 1, + clust_num_ores = 12, + clust_size = 10, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + noise_threshold = 0.1, + noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=95, octaves=3, persist=0.70}, + biomes = { "MesaPlateauFM" }, + }) + minetest.register_ore({ + ore_type = "blob", + ore = "mcl_core:redsand", + wherein = {"group:hardened_clay"}, + clust_scarcity = 1500, + clust_size = 4, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + biomes = { "MesaPlateauFM", "MesaPlateauFM_grasstop", "MesaPlateauFM_sandlevel" }, + }) -- Small dirt patches in Extreme Hills M minetest.register_ore({ @@ -1336,31 +1618,28 @@ local function register_biomelike_ores() noise_params = {offset=0, scale=5, spread={x=250, y=250, z=250}, seed=64, octaves=3, persist=0.60}, biomes = { "ExtremeHillsM" }, }) - - - -- Small hack to make sure stone appears at ca. sea level in Mesa biomes + -- For a transition from stone to hardened clay in mesa biomes that is not perfectly flat minetest.register_ore({ - ore_type = "sheet", + ore_type = "stratum", ore = "mcl_core:stone", - noise_threshold = -100, - noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, octaves=1, persist=1.00}, + wherein = {"group:hardened_clay"}, + noise_params = {offset=-6, scale=2, spread={x=25, y=25, z=25}, octaves=1, persist=0.60}, + stratum_thickness = 8, biomes = { - "Mesa", "Mesa_sandlevel", "Mesa_ocean", "Mesa_deep_ocean", "Mesa_underground", - "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", "MesaPlateauF_deep_ocean", "MesaPlateauF_underground", + "Mesa_sandlevel", "Mesa_ocean", + "MesaBryce_sandlevel", "MesaBryce_ocean", + "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", + "MesaPlateauFM_sandlevel", "MesaPlateauFM_ocean", }, - wherein = {"mcl_colorblocks:hardened_clay"}, - column_height_min = 32, - column_height_max = 32, - y_min = -32, + y_min = -4, y_max = 0, + }) - - -- Mesa strata (registered as sheet ores) -- Helper function to create strata. - local stratum = function(y_min, height, color, seed) + local stratum = function(y_min, height, color, seed, is_perfect) if not height then height = 1 end @@ -1368,27 +1647,92 @@ local function register_biomelike_ores() seed = 39 end local y_max = y_min + height-1 + local perfect_biomes + if is_perfect then + -- "perfect" means no erosion + perfect_biomes = { "MesaBryce", "Mesa", "MesaPlateauF", "MesaPlateauFM" } + else + perfect_biomes = { "MesaBryce" } + end + -- Full, perfect stratum minetest.register_ore({ - ore_type = "sheet", + ore_type = "stratum", ore = "mcl_colorblocks:hardened_clay_"..color, + -- Only paint uncolored so the biome can choose + -- a color in advance. wherein = {"mcl_colorblocks:hardened_clay"}, - column_height_min = height, - column_height_max = height, y_min = y_min, y_max = y_max, - noise_threshold = -1.0, - noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=seed, octaves=3, persist=0.70}, - biomes = { "Mesa", "MesaPlateauF", }, + biomes = perfect_biomes, }) + if not is_perfect then + -- Slightly eroded stratum, only minor imperfections + minetest.register_ore({ + ore_type = "stratum", + ore = "mcl_colorblocks:hardened_clay_"..color, + wherein = {"mcl_colorblocks:hardened_clay"}, + y_min = y_min, + y_max = y_max, + biomes = { "Mesa", "MesaPlateauF" }, + noise_params = { + offset = y_min+(y_max-y_min)/2, + scale = 0, + spread = {x = 50, y = 50, z = 50}, + seed = seed+4, + octaves = 1, + persist = 1.0 + }, + np_stratum_thickness = { + offset = 1.28, + scale = 1, + spread = {x = 18, y = 18, z = 18}, + seed = seed+4, + octaves = 3, + persist = 0.8, + }, + }) + -- Very eroded stratum, most of the color is gone + minetest.register_ore({ + ore_type = "stratum", + ore = "mcl_colorblocks:hardened_clay_"..color, + wherein = {"mcl_colorblocks:hardened_clay"}, + y_min = y_min, + y_max = y_max, + biomes = { "MesaPlateauFM" }, + noise_params = { + offset = y_min+(y_max-y_min)/2, + scale = 0, + spread = {x = 50, y = 50, z = 50}, + seed = seed+4, + octaves = 1, + persist = 1.0 + }, + np_stratum_thickness = { + offset = 0.1, + scale = 1, + spread = {x = 28, y = 28, z = 28}, + seed = seed+4, + octaves = 2, + persist = 0.6, + }, + }) + end + end - -- First stratum near the sand level. Always orange. - stratum(11, 3, "orange") + -- Hardcoded orange strata near sea level. + + -- For MesaBryce, since it has no sand at these heights + stratum(4, 1, "orange", nil, true) + stratum(7, 2, "orange", nil, true) + + -- 3-level stratum above the sandlevel (all mesa biomes) + stratum(11, 3, "orange", nil, true) -- Create random strata for up to Y = 256. -- These strata are calculated based on the world seed and are global. - -- They are thus unique per-world. - local mesapr = PcgRandom(minetest.get_mapgen_setting("seed")) + -- They are thus different per-world. + local mesapr = PcgRandom(mg_seed) --[[ @@ -1613,46 +1957,94 @@ local function register_dimension_ores() --[[ THE END ]] -- Generate fake End - -- TODO: Remove both "ores" when there's a better End generator + -- TODO: Remove the "ores" when there's a better End generator + -- FIXME: Broken lighting in v6 mapgen + + local end_wherein + if mg_name == "v6" then + end_wherein = {"air", "mcl_core:stone"} + else + end_wherein = {"air"} + end minetest.register_ore({ - ore_type = "sheet", + ore_type = "stratum", ore = "mcl_end:end_stone", - wherein = {"air"}, + wherein = end_wherein, y_min = mcl_vars.mg_end_min+64, y_max = mcl_vars.mg_end_min+80, - column_height_min = 6, - column_height_max = 7, - column_midpoint_factor = 0.0, + noise_params = { - offset = -2, - scale = 8, - spread = {x=100, y=100, z=100}, - seed = 2999, - octaves = 5, - persist = 0.55, + offset = mcl_vars.mg_end_min+70, + scale = -1, + spread = {x=126, y=126, z=126}, + seed = mg_seed+9999, + octaves = 3, + persist = 0.5, }, - noise_threshold = 0, + + np_stratum_thickness = { + offset = -2, + scale = 10, + spread = {x=126, y=126, z=126}, + seed = mg_seed+9999, + octaves = 3, + persist = 0.5, + }, + clust_scarcity = 1, }) minetest.register_ore({ - ore_type = "sheet", + ore_type = "stratum", ore = "mcl_end:end_stone", - wherein = {"air"}, + wherein = end_wherein, y_min = mcl_vars.mg_end_min+64, y_max = mcl_vars.mg_end_min+80, - column_height_min = 4, - column_height_max = 4, - column_midpoint_factor = 0.0, + noise_params = { - offset = -4, - scale = 3, - spread = {x=200, y=200, z=200}, - seed = 5390, - octaves = 5, - persist = 0.6, + offset = mcl_vars.mg_end_min+72, + scale = -3, + spread = {x=84, y=84, z=84}, + seed = mg_seed+999, + octaves = 4, + persist = 0.8, }, - noise_threshold = 0, + + np_stratum_thickness = { + offset = -4, + scale = 10, + spread = {x=84, y=84, z=84}, + seed = mg_seed+999, + octaves = 4, + persist = 0.8, + }, + clust_scarcity = 1, + }) + minetest.register_ore({ + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + y_min = mcl_vars.mg_end_min+64, + y_max = mcl_vars.mg_end_min+80, + + noise_params = { + offset = mcl_vars.mg_end_min+70, + scale = -2, + spread = {x=84, y=84, z=84}, + seed = mg_seed+99, + octaves = 4, + persist = 0.85, + }, + + np_stratum_thickness = { + offset = -3, + scale = 5, + spread = {x=63, y=63, z=63}, + seed = mg_seed+50, + octaves = 4, + persist = 0.85, + }, + clust_scarcity = 1, }) end @@ -1876,6 +2268,25 @@ local function register_decorations() flags = "place_center_x, place_center_z", rotation = "random", }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"}, + sidelen = 16, + noise_params = { + offset = 0.008, + scale = 0.002, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.7 + }, + biomes = {"MesaPlateauFM_grasstop"}, + y_min = 30, + y_max = mcl_vars.mg_overworld_max, + schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) minetest.register_decoration({ deco_type = "schematic", @@ -2410,7 +2821,10 @@ local function register_decorations() y_min = 4, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_core:cactus", - biomes = {"Desert","Mesa","Mesa_sandlevel","MesaPlateauF","MesaPlateauF_sandlevel"}, + biomes = {"Desert", + "Mesa","Mesa_sandlevel", + "MesaPlateauF","MesaPlateauF_sandlevel", + "MesaPlateauFM","MesaPlateauFM_sandlevel"}, height = 1, height_max = 3, }) @@ -2909,14 +3323,10 @@ local function register_decorations() -- Pumpkin minetest.register_decoration({ - deco_type = "schematic", - schematic = { - size = { x=1, y=2, z=1 }, - data = { - { name = "air", prob = 0 }, - { name = "mcl_farming:pumpkin_face", param1=255, }, - }, - }, + deco_type = "simple", + decoration = "mcl_farming:pumpkin_face", + param2 = 0, + param2_max = 3, place_on = {"group:grass_block_no_snow"}, sidelen = 16, noise_params = { @@ -2929,7 +3339,6 @@ local function register_decorations() }, y_min = 1, y_max = mcl_vars.mg_overworld_max, - rotation = "random", }) -- Grasses and ferns @@ -2937,7 +3346,8 @@ local function register_decorations() local grass_mpf = {"MesaPlateauF_grasstop"} local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM" } local grass_savanna = {"Savanna", "SavannaM"} - local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle", } + local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle" } + local grass_mpfm = {"MesaPlateauFM_grasstop" } register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest) register_grass_decoration("tallgrass", -0.015, 0.075, grass_forest) @@ -2955,6 +3365,7 @@ local function register_decorations() register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains) register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna, dry_index) register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse) + register_grass_decoration("tallgrass", 0.05, 0.05, grass_mpfm, dry_index) local fern_minimal = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga" } local fern_low = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga" } @@ -3027,7 +3438,7 @@ local function register_decorations() place_on = {"group:sand", "mcl_core:podzol", "mcl_core:dirt", "mcl_core:dirt_with_dry_grass", "mcl_core:coarse_dirt", "group:hardened_clay"}, sidelen = 16, noise_params = { - offset = 0, + offset = 0.0, scale = 0.035, spread = {x = 100, y = 100, z = 100}, seed = 1972, @@ -3036,7 +3447,61 @@ local function register_decorations() }, y_min = 4, y_max = mcl_vars.mg_overworld_max, - biomes = {"Desert", "Mesa", "Mesa_sandlevel", "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_grasstop", "Taiga", "MegaTaiga"}, + biomes = {"Desert", "Mesa", "Mesa_sandlevel", "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_grasstop","MesaBryce","Taiga", "MegaTaiga"}, + decoration = "mcl_core:deadbush", + height = 1, + }) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:sand", "mcl_core:dirt", "mcl_core:dirt_with_dry_grass", "mcl_core:coarse_dirt"}, + sidelen = 16, + noise_params = { + offset = 0.1, + scale = 0.035, + spread = {x = 100, y = 100, z = 100}, + seed = 1972, + octaves = 3, + persist = 0.6 + }, + y_min = 4, + y_max = mcl_vars.mg_overworld_max, + biomes = {"MesaPlateauFM_grasstop"}, + decoration = "mcl_core:deadbush", + height = 1, + }) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:sand"}, + sidelen = 16, + noise_params = { + offset = 0.045, + scale = 0.055, + spread = {x = 100, y = 100, z = 100}, + seed = 1972, + octaves = 3, + persist = 0.6 + }, + y_min = 4, + y_max = mcl_vars.mg_overworld_max, + biomes = {"MesaPlateauFM","MesaPlateauFM_sandlevel"}, + decoration = "mcl_core:deadbush", + height = 1, + }) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:hardened_clay"}, + sidelen = 16, + noise_params = { + offset = 0.010, + scale = 0.035, + spread = {x = 100, y = 100, z = 100}, + seed = 1972, + octaves = 3, + persist = 0.6 + }, + y_min = 4, + y_max = mcl_vars.mg_overworld_max, + biomes = {"MesaPlateauFM", "MesaPlateauFM_sandlevel", "MesaPlateauFM_grasstop"}, decoration = "mcl_core:deadbush", height = 1, }) @@ -3196,7 +3661,38 @@ end -- Decorations in non-Overworld dimensions local function register_dimension_decorations() - -- TODO + --[[ NETHER ]] + -- TODO: Nether + + --[[ THE END ]] + + -- Chorus plant + minetest.register_decoration({ + name = "mcl_biomes:chorus_plant", + deco_type = "simple", + place_on = {"mcl_end:end_stone", "air"}, + flags = "all_floors", + sidelen = 16, + noise_params = { + offset = -0.012, + scale = 0.024, + spread = {x = 100, y = 100, z = 100}, + seed = 257, + octaves = 3, + persist = 0.6 + }, + y_min = mcl_vars.mg_end_min, + y_max = mcl_vars.mg_end_max, + decoration = "mcl_end:chorus_flower", + height = 1, + biomes = { "End" }, + }) + + deco_id_chorus_plant = minetest.get_decoration_id("mcl_biomes:chorus_plant") + minetest.set_gen_notify({decoration=true}, { deco_id_chorus_plant }) + + -- TODO: End cities + end @@ -3229,5 +3725,17 @@ if mg_name ~= "singlenode" then register_dimension_decorations() -- Overworld decorations for v6 are handled in mcl_mapgen_core + + if deco_id_chorus_plant then + minetest.register_on_generated(function(minp, maxp, blockseed) + local gennotify = minetest.get_mapgen_object("gennotify") + local poslist = {} + for _, pos in ipairs(gennotify["decoration#"..deco_id_chorus_plant] or {}) do + local realpos = { x = pos.x, y = pos.y + 1, z = pos.z } + mcl_end.grow_chorus_plant(realpos) + end + end) + end + end diff --git a/mods/MAPGEN/mcl_dungeons/init.lua b/mods/MAPGEN/mcl_dungeons/init.lua index f23c33bfb..dc19a6e19 100644 --- a/mods/MAPGEN/mcl_dungeons/init.lua +++ b/mods/MAPGEN/mcl_dungeons/init.lua @@ -366,9 +366,7 @@ minetest.register_on_generated(function(minp, maxp) local meta = minetest.get_meta(cpos) local inv = meta:get_inventory() local items = get_loot() - for i=1, math.min(#items, inv:get_size("main")) do - inv:set_stack("main", i, ItemStack(items[i])) - end + mcl_loot.fill_inventory(inv, "main", items) end -- Mob spawners are placed seperately, too diff --git a/mods/MAPGEN/mcl_mapgen_core/depends.txt b/mods/MAPGEN/mcl_mapgen_core/depends.txt index 9dc58fe69..783a7da49 100644 --- a/mods/MAPGEN/mcl_mapgen_core/depends.txt +++ b/mods/MAPGEN/mcl_mapgen_core/depends.txt @@ -1,5 +1,6 @@ mcl_init mcl_core +biomeinfo mclx_core? mcl_worlds mcl_cocoas diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 9a979d436..8675b1238 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -64,8 +64,6 @@ local c_dirt_with_grass = minetest.get_content_id("mcl_core:dirt_with_grass") local c_dirt_with_grass_snow = minetest.get_content_id("mcl_core:dirt_with_grass_snow") local c_sand = minetest.get_content_id("mcl_core:sand") local c_sandstone = minetest.get_content_id("mcl_core:sandstone") -local c_redsand = minetest.get_content_id("mcl_core:redsand") -local c_redsandstone = minetest.get_content_id("mcl_core:redsandstone") local c_void = minetest.get_content_id("mcl_core:void") local c_lava = minetest.get_content_id("mcl_core:lava_source") local c_water = minetest.get_content_id("mcl_core:water_source") @@ -784,14 +782,10 @@ local function register_mgv6_decorations() -- Pumpkin minetest.register_decoration({ - deco_type = "schematic", - schematic = { - size = { x=1, y=2, z=1 }, - data = { - { name = "air", prob = 0 }, - { name = "mcl_farming:pumpkin_face" }, - }, - }, + deco_type = "simple", + decoration = "mcl_farming:pumpkin_face", + param2 = 0, + param2_max = 3, place_on = {"group:grass_block_no_snow"}, sidelen = 16, noise_params = { @@ -804,7 +798,27 @@ local function register_mgv6_decorations() }, y_min = 1, y_max = mcl_vars.overworld_max, - rotation = "random", + }) + + -- Melon + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow"}, + sidelen = 16, + noise_params = { + offset = 0.002, + scale = 0.006, + spread = {x = 250, y = 250, z = 250}, + seed = 333, + octaves = 3, + persist = 0.6 + }, + -- Small trick to make sure melon spawn in jungles + spawn_by = { "mcl_core:jungletree", "mcl_flowers:fern" }, + num_spawn_by = 1, + y_min = 1, + y_max = 40, + decoration = "mcl_farming:melon", }) -- Tall grass @@ -934,6 +948,17 @@ local function register_mgv6_decorations() register_mgv6_flower("oxeye_daisy", 3490) register_mgv6_flower("poppy", 9439) + -- Put top snow on snowy grass blocks. The v6 mapgen does not generate the top snow on its own. + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_snow"}, + sidelen = 16, + fill_ratio = 11.0, -- complete coverage + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_core:snow", + }) + end -- Apply mapgen-specific mapgen code @@ -1022,7 +1047,7 @@ local function generate_clay(minp, maxp, seed, voxelmanip_data, voxelmanip_area, local surfacenode = voxelmanip_data[surface_pos] local genrnd = math.random(1, 20) - if genrnd == 1 and perlin_clay:get3d({x=cx,y=y,z=cz}) > 0 and waternode == c_water and + if genrnd == 1 and perlin_clay:get_3d({x=cx,y=y,z=cz}) > 0 and waternode == c_water and (surfacenode == c_dirt or minetest.get_item_group(minetest.get_name_from_content_id(surfacenode), "sand") == 1) then local diamondsize = math.random(1, 3) for x1 = -diamondsize, diamondsize do @@ -1062,7 +1087,7 @@ local function generate_structures(minp, maxp, seed, biomemap) local x1 = minp.x + math.floor((divx+1)*divlen) local z1 = minp.z + math.floor((divz+1)*divlen) -- Determine amount from perlin noise - local amount = math.floor(perlin_structures:get2d({x=x0, y=z0}) * 9) + local amount = math.floor(perlin_structures:get_2d({x=x0, y=z0}) * 9) -- Find random positions based on this random local pr = PseudoRandom(seed+1) for i=0, amount do @@ -1145,7 +1170,8 @@ local function generate_structures(minp, maxp, seed, biomemap) -- Witch hut if ground_y <= 0 and nn == "mcl_core:dirt" then - local prob = minecraft_chunk_probability(48, minp, maxp) + local prob = minecraft_chunk_probability(48, minp, maxp) + if math.random(1, prob) == 1 then local swampland = minetest.get_biome_id("Swampland") local swampland_shore = minetest.get_biome_id("Swampland_shore") @@ -1154,19 +1180,19 @@ local function generate_structures(minp, maxp, seed, biomemap) local here_be_witches = false if mg_name == "v6" then - -- In ye good ol' landes of v6, witches will settle at any - -- shores of dirt. - here_be_witches = true + -- v6: In Normal biome + if biomeinfo.get_v6_biome(p) == "Normal" then + here_be_witches = true + end else - -- The townsfolk told me that witches live in the swamplands! + -- Other mapgens: In swampland biome local bi = xz_to_biomemap_index(p.x, p.z, minp, maxp) if biomemap[bi] == swampland or biomemap[bi] == swampland_shore then here_be_witches = true end end - -- We still need a bit of luck! - if here_be_witches and math.random(1, prob) == 1 then + if here_be_witches then local r = tostring(math.random(0, 3) * 90) -- "0", "90", "180" or 270" local p1 = {x=p.x-1, y=WITCH_HUT_HEIGHT+2, z=p.z-1} local size @@ -1243,6 +1269,7 @@ local function generate_structures(minp, maxp, seed, biomemap) end end end + end -- Ice spikes in v6 -- In other mapgens, ice spikes are generated as decorations. @@ -1251,7 +1278,7 @@ local function generate_structures(minp, maxp, seed, biomemap) if spike < 3 then -- Check surface local floor = {x=p.x+4, y=p.y-1, z=p.z+4} - local surface = minetest.find_nodes_in_area({x=p.x+1,y=p.y-1,z=p.z+1}, floor, {"mcl_core:snowblock", "mcl_core:dirt_with_grass_snow"}) + local surface = minetest.find_nodes_in_area({x=p.x+1,y=p.y-1,z=p.z+1}, floor, {"mcl_core:snowblock"}) -- Check for collision with spruce local spruce_collisions = minetest.find_nodes_in_area({x=p.x+1,y=p.y+2,z=p.z+1}, {x=p.x+4, y=p.y+6, z=p.z+4}, {"mcl_core:sprucetree", "mcl_core:spruceleaves"}) @@ -1367,7 +1394,7 @@ local function generate_tree_decorations(minp, maxp, seed, data, param2_data, ar -- Pass 1: Generate cocoas at jungle trees for n = 1, #jungletree do - pos = jungletree[n] + pos = table.copy(jungletree[n]) treepos = table.copy(pos) if minetest.find_node_near(pos, 1, {"mcl_core:jungleleaves"}) then @@ -1445,12 +1472,12 @@ local function generate_tree_decorations(minp, maxp, seed, data, param2_data, ar local pos = vector.add(pos, dirs[d]) local p_pos = area:index(pos.x, pos.y, pos.z) - local vine_threshold = math.max(0.33333, perlin_vines_density:get2d(pos)) + local vine_threshold = math.max(0.33333, perlin_vines_density:get_2d(pos)) if dense_vegetation then vine_threshold = vine_threshold * (2/3) end - if perlin_vines:get2d(pos) > -1.0 and perlin_vines_fine:get3d(pos) > vine_threshold and data[p_pos] == c_air then + if perlin_vines:get_2d(pos) > -1.0 and perlin_vines_fine:get_3d(pos) > vine_threshold and data[p_pos] == c_air then local rdir = {} rdir.x = -dirs[d].x @@ -1462,13 +1489,13 @@ local function generate_tree_decorations(minp, maxp, seed, data, param2_data, ar local grow_upwards = false -- Only possible on the wood, not on the leaves if i == 1 then - grow_upwards = perlin_vines_upwards:get3d(pos) > 0.8 + grow_upwards = perlin_vines_upwards:get_3d(pos) > 0.8 end if grow_upwards then -- Grow vines up 1-4 nodes, even through jungleleaves. -- This may give climbing access all the way to the top of the tree :-) -- But this will be fairly rare. - local length = math.ceil(math.abs(perlin_vines_length:get3d(pos)) * 4) + local length = math.ceil(math.abs(perlin_vines_length:get_3d(pos)) * 4) for l=0, length-1 do local t_pos = area:index(treepos.x, treepos.y, treepos.z) @@ -1486,7 +1513,7 @@ local function generate_tree_decorations(minp, maxp, seed, data, param2_data, ar end else -- Grow vines down, length between 1 and maxvinelength - local length = math.ceil(math.abs(perlin_vines_length:get3d(pos)) * maxvinelength) + local length = math.ceil(math.abs(perlin_vines_length:get_3d(pos)) * maxvinelength) for l=0, length-1 do if data[p_pos] == c_air then data[p_pos] = c_vine @@ -1733,20 +1760,7 @@ minetest.register_on_generated(function(minp, maxp, seed) -- A snowy grass block must be below a top snow or snow block at all times. if emin.y <= mcl_vars.mg_overworld_max and emax.y >= mcl_vars.mg_overworld_min then -- v6 mapgen: - -- Put top snow on snowy grass blocks. The mapgen does not generate the top snow on its own. if mg_name == "v6" then - -- FIXME: Cavegen and mudflow might screw this up and cause floating top snow to appear - local snowdirt = minetest.find_nodes_in_area_under_air(minp, maxp, "mcl_core:dirt_with_grass_snow") - for n = 1, #snowdirt do - -- CHECKME: What happens at chunk borders? - local p_pos = area:index(snowdirt[n].x, snowdirt[n].y + 1, snowdirt[n].z) - if p_pos then - data[p_pos] = c_top_snow - end - end - if #snowdirt > 0 then - lvm_used = true - end --[[ Remove broken double plants caused by v6 weirdness. v6 might break the bottom part of double plants because of how it works. @@ -1779,9 +1793,8 @@ minetest.register_on_generated(function(minp, maxp, seed) -- Non-v6 mapgens: -- Clear snowy grass blocks without snow above to ensure consistency. - -- Solidify floating sand to sandstone (both colors). else - local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:dirt_with_grass_snow", "mcl_core:sand", "mcl_core:redsand"}) + local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:dirt_with_grass_snow"}) for n=1, #nodes do local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z) local p_pos_above = area:index(nodes[n].x, nodes[n].y+1, nodes[n].z) @@ -1789,15 +1802,6 @@ minetest.register_on_generated(function(minp, maxp, seed) if data[p_pos] == c_dirt_with_grass_snow and p_pos_above and data[p_pos_above] ~= c_top_snow and data[p_pos_above] ~= c_snow_block then data[p_pos] = c_dirt_with_grass lvm_used = true - elseif p_pos_below and data[p_pos_below] == c_air or data[p_pos_below] == c_water then - if data[p_pos] == c_sand then - data[p_pos] = c_sandstone - lvm_used = true - elseif data[p_pos] == c_redsand then - -- Note: This is the only place in which red sandstone is generatd - data[p_pos] = c_redsandstone - lvm_used = true - end end end end @@ -1841,15 +1845,7 @@ minetest.register_on_generated(function(minp, maxp, seed) local y = nodes[n].y local p_pos = area:index(nodes[n].x, y, nodes[n].z) - if data[p_pos] == c_water then - if y <= mcl_vars.mg_end_min + 104 and y >= mcl_vars.mg_end_min + 40 then - data[p_pos] = c_end_stone - lvm_used = true - else - data[p_pos] = c_air - lvm_used = true - end - elseif data[p_pos] == c_stone or data[p_pos] == c_dirt or data[p_pos] == c_sand then + if data[p_pos] == c_water or data[p_pos] == c_stone or data[p_pos] == c_dirt or data[p_pos] == c_sand then data[p_pos] = c_air lvm_used = true end diff --git a/mods/MAPGEN/mcl_strongholds/init.lua b/mods/MAPGEN/mcl_strongholds/init.lua index e82540f2f..92313bee7 100644 --- a/mods/MAPGEN/mcl_strongholds/init.lua +++ b/mods/MAPGEN/mcl_strongholds/init.lua @@ -19,6 +19,7 @@ local strongholds = {} local strongholds_inited = false local mg_name = minetest.get_mapgen_setting("mg_name") +local superflat = mg_name == "flat" and minetest.get_mapgen_setting("mcl_superflat_classic") == "true" -- Determine the stronghold positions and store them into the strongholds table. -- The stronghold positions are based on the world seed. @@ -45,7 +46,7 @@ local init_strongholds = function() for a=1, ring.amount do local dist = pr:next(ring.min, ring.max) local y - if mg_name == "flat" then + if superflat then y = mcl_vars.mg_bedrock_overworld_max + 3 else y = pr:next(mcl_vars.mg_bedrock_overworld_max+1, mcl_vars.mg_overworld_min+48) diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 552691bf4..bb51004ae 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -1,4 +1,5 @@ local init = os.clock() +local S = minetest.get_translator("mcl_structures") mcl_structures ={} mcl_structures.get_struct = function(file) @@ -15,6 +16,22 @@ mcl_structures.get_struct = function(file) return allnode end +local mapseed = tonumber(minetest.get_mapgen_setting("seed")) +-- Random number generator for all generated structures +local pr = PseudoRandom(mapseed) + +-- Call on_construct on pos. +-- Useful to init chests from formspec. +local init_node_construct = function(pos) + local node = minetest.get_node(pos) + local def = minetest.registered_nodes[node.name] + if def and def.on_construct then + def.on_construct(pos) + return true + end + return false +end + -- The call of Struct mcl_structures.call_struct = function(pos, struct_style, rotation) if not rotation then @@ -27,7 +44,7 @@ mcl_structures.call_struct = function(pos, struct_style, rotation) elseif struct_style == "desert_well" then return mcl_structures.generate_desert_well(pos, rotation) elseif struct_style == "igloo" then - return mcl_structures.generate_igloo_top(pos, rotation) + return mcl_structures.generate_igloo(pos, rotation) elseif struct_style == "witch_hut" then return mcl_structures.generate_witch_hut(pos, rotation) elseif struct_style == "ice_spike_small" then @@ -60,17 +77,25 @@ mcl_structures.generate_desert_well = function(pos) end mcl_structures.generate_igloo = function(pos) - -- TODO: Check if we're allowed to destroy nodes - -- FIXME: Some nodes (water, ice) don't get overwritten by ladder - -- FIXME: Nodes at Y=0 don't get overwritten by ladder - -- FIXME: Apply basement height limit in other dimensions - -- TODO: Check if basement generation would not be too obvious - -- TODO: Generate basement with 50% chance only + -- Place igloo local success, rotation = mcl_structures.generate_igloo_top(pos) - if success then - local buffer = pos.y - (mcl_vars.mg_lava_overworld_max + 10) + -- Place igloo basement with 50% chance + local r = math.random(1,2) + if success and r == 1 then + -- Select basement depth + local dim = mcl_worlds.pos_to_dimension(pos) + buffer = pos.y - (mcl_vars.mg_lava_overworld_max + 10) + if dim == "nether" then + buffer = pos.y - (mcl_vars.mg_lava_nether_max + 10) + elseif dim == "end" then + buffer = pos.y - (mcl_vars.mg_end_min + 1) + elseif dim == "overworld" then + buffer = pos.y - (mcl_vars.mg_lava_overworld_max + 10) + else + return success + end if buffer <= 19 then - return + return success end local depth = math.random(19, buffer) local bpos = {x=pos.x, y=pos.y-depth, z=pos.z} @@ -96,8 +121,6 @@ mcl_structures.generate_igloo = function(pos) else return success end - -- TODO: more reliable param2 - minetest.set_node(tpos, {name="mcl_doors:trapdoor", param2=20+minetest.dir_to_facedir(dir)}) local set_brick = function(pos) local c = math.random(1, 3) -- cracked chance local m = math.random(1, 10) -- chance for monster egg @@ -118,13 +141,31 @@ mcl_structures.generate_igloo = function(pos) minetest.set_node(pos, {name=brick}) end local ladder_param2 = minetest.dir_to_wallmounted(tdir) + local real_depth = 0 + -- Check how deep we can actuall dig for y=1, depth-5 do + real_depth = real_depth + 1 + local node = minetest.get_node({x=tpos.x,y=tpos.y-y,z=tpos.z}) + local def = minetest.registered_nodes[node.name] + if (not def) or (not def.walkable) or (def.liquidtype ~= "none") or (not def.is_ground_content) then + bpos.y = tpos.y-y+1 + break + end + end + if real_depth <= 6 then + return success + end + -- Place hidden trapdoor + minetest.set_node(tpos, {name="mcl_doors:trapdoor", param2=20+minetest.dir_to_facedir(dir)}) -- TODO: more reliable param2 + -- Generate ladder to basement + for y=1, real_depth-1 do set_brick({x=tpos.x-1,y=tpos.y-y,z=tpos.z }) set_brick({x=tpos.x+1,y=tpos.y-y,z=tpos.z }) set_brick({x=tpos.x ,y=tpos.y-y,z=tpos.z-1}) set_brick({x=tpos.x ,y=tpos.y-y,z=tpos.z+1}) minetest.set_node({x=tpos.x,y=tpos.y-y,z=tpos.z}, {name="mcl_core:ladder", param2=ladder_param2}) end + -- Place basement mcl_structures.generate_igloo_basement(bpos, rotation) end return success @@ -159,8 +200,6 @@ mcl_structures.generate_igloo_basement = function(pos, orientation) else return success end - -- FIXME: Use better seeding - local pr = PseudoRandom(math.random(0, 4294967295)) local size = {x=9,y=5,z=7} local lootitems = mcl_loot.get_multi_loot({ { @@ -185,12 +224,10 @@ mcl_structures.generate_igloo_basement = function(pos, orientation) }}, pr) local chest_pos = vector.add(pos, chest_offset) + init_node_construct(chest_pos) local meta = minetest.get_meta(chest_pos) local inv = meta:get_inventory() - inv:set_size("main", 9*3) - for i=1, #lootitems do - inv:add_item("main", lootitems[i]) - end + mcl_loot.fill_inventory(inv, "main", lootitems) end return success end @@ -267,8 +304,6 @@ mcl_structures.generate_end_portal_shrine = function(pos) -- Shuffle stone brick types local bricks = minetest.find_nodes_in_area(area_start, area_end, "mcl_core:stonebrick") - -- FIXME: Use better seeding - local pr = PseudoRandom(math.random(0, 4294967295)) for b=1, #bricks do local r_bricktype = pr:next(1, 100) local r_infested = pr:next(1, 100) @@ -358,10 +393,7 @@ mcl_structures.generate_desert_temple = function(pos) local chests = minetest.find_nodes_in_area({x=newpos.x-size.x, y=newpos.y, z=newpos.z-size.z}, vector.add(newpos, size), "mcl_chests:chest") -- Add desert temple loot into chests - -- FIXME: Use better seeding - local pr = PseudoRandom(math.random(0, 4294967295)) for c=1, #chests do - -- FIXME: Use better seeding local lootitems = mcl_loot.get_multi_loot({ { stacks_min = 2, @@ -398,12 +430,11 @@ mcl_structures.generate_desert_temple = function(pos) } }}, pr) + local meta = minetest.get_meta(chests[c]) + init_node_construct(chests[c]) local meta = minetest.get_meta(chests[c]) local inv = meta:get_inventory() - inv:set_size("main", 9*3) - for i=1, #lootitems do - inv:add_item("main", lootitems[i]) - end + mcl_loot.fill_inventory(inv, "main", lootitems) end -- Initialize pressure plates and randomly remove up to 5 plates @@ -453,56 +484,49 @@ end -- Debug command minetest.register_chatcommand("spawnstruct", { params = "desert_temple | desert_well | igloo | village | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_portal_shrine", - description = "Generate a pre-defined structure near your position.", + description = S("Generate a pre-defined structure near your position."), privs = {debug = true}, func = function(name, param) - local pos= minetest.get_player_by_name(name):get_pos() + local pos = minetest.get_player_by_name(name):get_pos() if not pos then return end + pos = vector.round(pos) local errord = false + local message = S("Structure placed.") if param == "village" then mcl_structures.generate_village(pos) - minetest.chat_send_player(name, "Village built. WARNING: Villages are experimental and might have bugs.") + message = S("Village built. WARNING: Villages are experimental and might have bugs.") elseif param == "desert_temple" then mcl_structures.generate_desert_temple(pos) - minetest.chat_send_player(name, "Desert temple built.") elseif param == "desert_well" then mcl_structures.generate_desert_well(pos) - minetest.chat_send_player(name, "Desert well built.") elseif param == "igloo" then - mcl_structures.generate_igloo_top(pos) - minetest.chat_send_player(name, "Igloo built.") + mcl_structures.generate_igloo(pos) elseif param == "witch_hut" then mcl_structures.generate_witch_hut(pos) - minetest.chat_send_player(name, "Witch hut built.") elseif param == "boulder" then mcl_structures.generate_boulder(pos) - minetest.chat_send_player(name, "Moss stone boulder placed.") elseif param == "fossil" then mcl_structures.generate_fossil(pos) - minetest.chat_send_player(name, "Fossil placed.") elseif param == "ice_spike_small" then mcl_structures.generate_ice_spike_small(pos) - minetest.chat_send_player(name, "Small ice spike placed.") elseif param == "ice_spike_large" then mcl_structures.generate_ice_spike_large(pos) - minetest.chat_send_player(name, "Large ice spike placed.") elseif param == "end_exit_portal" then mcl_structures.generate_end_exit_portal(pos) - minetest.chat_send_player(name, "End exit portal placed.") elseif param == "end_portal_shrine" then mcl_structures.generate_end_portal_shrine(pos) - minetest.chat_send_player(name, "End portal shrine placed.") elseif param == "" then - minetest.chat_send_player(name, "Error: No structure type given. Please use “/spawnstruct ”.") + message = S("Error: No structure type given. Please use “/spawnstruct ”.") errord = true else - minetest.chat_send_player(name, "Error: Unknown structure type. Please use “/spawnstruct ”.") + message = S("Error: Unknown structure type. Please use “/spawnstruct ”.") errord = true end + minetest.chat_send_player(name, message) if errord then - minetest.chat_send_player(name, "Use /help spawnstruct to see a list of avaiable types.") + minetest.chat_send_player(name, S("Use /help spawnstruct to see a list of avaiable types.")) end end }) diff --git a/mods/MAPGEN/mcl_structures/locale/mcl_structures.de.tr b/mods/MAPGEN/mcl_structures/locale/mcl_structures.de.tr new file mode 100644 index 000000000..e701b7879 --- /dev/null +++ b/mods/MAPGEN/mcl_structures/locale/mcl_structures.de.tr @@ -0,0 +1,7 @@ +# textdomain: mcl_structures +Generate a pre-defined structure near your position.=Erzeugt ein vordefiniertes Gebäude in Ihrer Nähe. +Structure placed.=Gebäude platziert. +Village built. WARNING: Villages are experimental and might have bugs.=Dorf gebaut. ACHTUNG: Dörfer sind experimentell und können fehlerhaft sein. +Error: No structure type given. Please use “/spawnstruct ”.=Fehler: Kein Gebäudetyp angegeben. Bitte benutzen Sie „/spawnstruct “. +Error: Unknown structure type. Please use “/spawnstruct ”.=Fehler: Unbekannter Gebäudetyp. Bitte benutzen Sie „/spawnstruct “. +Use /help spawnstruct to see a list of avaiable types.=Benutzen Sie „/help spawnstruct“, um eine Liste der vorhandenen Typen zu sehen. diff --git a/mods/MAPGEN/mcl_structures/locale/template.txt b/mods/MAPGEN/mcl_structures/locale/template.txt new file mode 100644 index 000000000..76f85c4c9 --- /dev/null +++ b/mods/MAPGEN/mcl_structures/locale/template.txt @@ -0,0 +1,7 @@ +# textdomain: mcl_structures +Generate a pre-defined structure near your position.= +Structure placed.= +Village built. WARNING: Villages are experimental and might have bugs.= +Error: No structure type given. Please use “/spawnstruct ”.= +Error: Unknown structure type. Please use “/spawnstruct ”.= +Use /help spawnstruct to see a list of avaiable types.= diff --git a/mods/MAPGEN/modpack.txt b/mods/MAPGEN/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/MAPGEN/tsm_railcorridors/init.lua b/mods/MAPGEN/tsm_railcorridors/init.lua index d6de8198a..3cc0d75da 100644 --- a/mods/MAPGEN/tsm_railcorridors/init.lua +++ b/mods/MAPGEN/tsm_railcorridors/init.lua @@ -124,7 +124,6 @@ local function InitRandomizer(seed) -- Used for cobweb generation, both noises have to reach a high value for cobwebs to appear webperlin_major = PerlinNoise(934, 3, 0.6, 500) webperlin_minor = PerlinNoise(834, 3, 0.6, 50) - pr_inited = true end local carts_table = {} @@ -377,9 +376,7 @@ local function PlaceChest(pos, param2) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() local items = tsm_railcorridors.get_treasures(pr) - for i=1, math.min(#items, inv:get_size("main")) do - inv:set_stack("main", i, ItemStack(items[i])) - end + mcl_loot.fill_inventory(inv, "main", items) end end @@ -738,13 +735,13 @@ local function create_corridor_section(waypoint, axis, sign, up_or_down, up_or_d -- Mob spawner (at center) if place_mob_spawners and tsm_railcorridors.nodes.spawner and not no_spawner and - webperlin_major:get3d(p) > 0.3 and webperlin_minor:get3d(p) > 0.5 then + webperlin_major:get_3d(p) > 0.3 and webperlin_minor:get_3d(p) > 0.5 then -- Place spawner (if activated in gameconfig), -- enclose in cobwebs and setup the spawner node. local spawner_placed = SetNodeIfCanBuild(p, {name=tsm_railcorridors.nodes.spawner}) if spawner_placed then local size = 1 - if webperlin_major:get3d(p) > 0.5 then + if webperlin_major:get_3d(p) > 0.5 then size = 2 end if place_cobwebs then @@ -767,7 +764,7 @@ local function create_corridor_section(waypoint, axis, sign, up_or_down, up_or_d if pr:next(1,5) == 1 then local h = pr:next(0, 2) -- 3 possible cobweb heights local cpos = {x=basepos.x+vek.x, y=basepos.y+h, z=basepos.z+vek.z} - if webperlin_major:get3d(cpos) > 0.05 and webperlin_minor:get3d(cpos) > 0.1 then + if webperlin_major:get_3d(cpos) > 0.05 and webperlin_minor:get_3d(cpos) > 0.1 then if h == 0 then -- No check neccessary at height offset 0 since the cobweb is on the floor return TryPlaceCobweb(cpos) diff --git a/mods/MISC/mcl_commands/depends.txt b/mods/MISC/mcl_commands/depends.txt new file mode 100644 index 000000000..6e14ff130 --- /dev/null +++ b/mods/MISC/mcl_commands/depends.txt @@ -0,0 +1 @@ +mcl_death_messages? diff --git a/mods/MISC/mcl_commands/init.lua b/mods/MISC/mcl_commands/init.lua index b7ce1e1cd..c77b30816 100644 --- a/mods/MISC/mcl_commands/init.lua +++ b/mods/MISC/mcl_commands/init.lua @@ -1,11 +1,8 @@ local minecraftaliases = true -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end -end +local S = minetest.get_translator("mcl_commands") + +local mod_death_messages = minetest.get_modpath("mcl_death_messages") local function handle_kill_command(suspect, victim) if minetest.settings:get_bool("enable_damage") == false then @@ -21,17 +18,29 @@ local function handle_kill_command(suspect, victim) return false, S("@1 is already dead", victim) end end - if not suspect == victim then - minetest.log("action", S("@1 killed @2", suspect, victim)) - end -- If player holds a totem of undying, destroy it before killing, -- so it doesn't rescue the player. local wield = victimref:get_wielded_item() if wield:get_name() == "mobs_mc:totem" then victimref:set_wielded_item("") end + if mod_death_messages then + local msg + if suspect == victim then + msg = S("@1 committed suicide.", victim) + else + msg = S("@1 was killed by @2.", victim, suspect) + end + mcl_death_messages.player_damage(victimref, msg) + end -- DIE! victimref:set_hp(0) + -- Log + if not suspect == victim then + minetest.log("action", string.format("%s killed %s using /kill", suspect, victim)) + else + minetest.log("action", string.format("%s committed suicide using /kill", victim)) + end return true end @@ -91,7 +100,7 @@ minetest.register_chatcommand("setblock", { }) minetest.register_chatcommand("list", { - description = "Show who is logged on", + description = S("Show who is logged on"), params = "", privs = {}, func = function(name) @@ -104,7 +113,7 @@ minetest.register_chatcommand("list", { }) minetest.register_chatcommand("seed", { - description = "Displays the world seed", + description = S("Displays the world seed"), params = "", privs = {}, func = function(name) diff --git a/mods/MISC/mcl_commands/locale/mcl_commands.de.tr b/mods/MISC/mcl_commands/locale/mcl_commands.de.tr new file mode 100644 index 000000000..98f1e6a0d --- /dev/null +++ b/mods/MISC/mcl_commands/locale/mcl_commands.de.tr @@ -0,0 +1,22 @@ +# textdomain: mcl_commands +Players can't be killed right now, damage has been disabled.=Spieler können jetzt nicht getötet werden, der Schaden wurde deaktiviert. +Player @1 does not exist.=Spieler @1 existiert nicht. +You are already dead=Sie sind schon tot +@1 is already dead=@1 ist schon tot +@1 committed suicide.=@1 beging Selbstmord. +@1 was killed by @2.=@1 wurde von @2 getötet. +[]=[] +Kill player or yourself=Spieler oder sich selbst töten +Can use /say=Kann „/say“ benutzen += +Send a message to every player=Nachricht an alle Spieler senden +Invalid usage, see /help say.=Falsche Benutzung, siehe „/help say“. +,, =,, +Set node at given position=Node (Block) an der gegebenen Position platzieren +Invalid node=Unültiger Node +@1 spawned.=@1 gespawnt. +Invalid parameters (see /help setblock)=Ungültige Parameter (siehe „/help setblock”) +List bans=Bannliste anzeigen +Ban list: @1=Bannliste: @1 +Show who is logged on=Anzeigen, wer eingeloggt ist +Displays the world seed=Den Seed der Welt anzeigen diff --git a/mods/MISC/mcl_commands/locale/template.txt b/mods/MISC/mcl_commands/locale/template.txt new file mode 100644 index 000000000..fc979be6f --- /dev/null +++ b/mods/MISC/mcl_commands/locale/template.txt @@ -0,0 +1,22 @@ +# textdomain: mcl_commands +Players can't be killed right now, damage has been disabled.= +Player @1 does not exist.= +You are already dead= +@1 is already dead= +@1 committed suicide.= +@1 was killed by @2.= +[]= +Kill player or yourself= +Can use /say= += +Send a message to every player= +Invalid usage, see /help say.= +,, = +Set node at given position= +Invalid node= +@1 spawned.= +Invalid parameters (see /help setblock)= +List bans= +Ban list: @1= +Show who is logged on= +Displays the world seed= diff --git a/mods/MISC/mcl_privs/init.lua b/mods/MISC/mcl_privs/init.lua index c242ed3de..00670db1c 100644 --- a/mods/MISC/mcl_privs/init.lua +++ b/mods/MISC/mcl_privs/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_privs") + minetest.register_privilege("maphack", { - description = "Can place and use advanced blocks like mob spawners, command blocks and barriers.", + description = S("Can place and use advanced blocks like mob spawners, command blocks and barriers."), }) diff --git a/mods/MISC/mcl_privs/locale/mcl_privs.de.tr b/mods/MISC/mcl_privs/locale/mcl_privs.de.tr new file mode 100644 index 000000000..c5b799767 --- /dev/null +++ b/mods/MISC/mcl_privs/locale/mcl_privs.de.tr @@ -0,0 +1,2 @@ +# textdomain: mcl_privs +Can place and use advanced blocks like mob spawners, command blocks and barriers.=Kann fortgeschrittene Blöcke wie Mobspawner, Befehlsblöcke und Barrieren platzieren und benutzen. diff --git a/mods/MISC/mcl_privs/locale/template.txt b/mods/MISC/mcl_privs/locale/template.txt new file mode 100644 index 000000000..11be33493 --- /dev/null +++ b/mods/MISC/mcl_privs/locale/template.txt @@ -0,0 +1,2 @@ +# textdomain: mcl_privs +Can place and use advanced blocks like mob spawners, command blocks and barriers.= diff --git a/mods/MISC/mcl_temp_helper_recipes/init.lua b/mods/MISC/mcl_temp_helper_recipes/init.lua index 06206372d..2bb7ff61e 100644 --- a/mods/MISC/mcl_temp_helper_recipes/init.lua +++ b/mods/MISC/mcl_temp_helper_recipes/init.lua @@ -17,15 +17,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = "mcl_end:end_stone", - recipe = { - { "mcl_core:sandstone", "mcl_core:stone", "mcl_core:sandstone" }, - { "mcl_core:stone", "mcl_core:sandstone", "mcl_core:stone" }, - { "mcl_core:sandstone", "mcl_core:stone", "mcl_core:sandstone" }, - }, -}) - minetest.register_craft({ output = "mcl_ocean:prismarine_shard", recipe = { @@ -39,15 +30,6 @@ minetest.register_craft({ recipe = { "mcl_ocean:prismarine_shard", "mcl_ocean:prismarine_shard", "mcl_ocean:prismarine_shard", "mcl_core:gold_ingot" }, }) -minetest.register_craft({ - output = "mcl_end:chorus_flower", - recipe = { - { "mcl_flowers:allium", "mcl_end:end_stone", "mcl_flowers:allium" }, - { "mcl_end:end_stone", "mcl_end:end_stone", "mcl_end:end_stone" }, - { "mcl_flowers:allium", "mcl_end:end_stone", "mcl_flowers:allium" }, - }, -}) - minetest.register_craft({ output = "mcl_mobitems:shulker_shell", recipe = { @@ -91,24 +73,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = "mcl_mobitems:carrot_on_a_stick", - recipe = { - { "", "", "mcl_core:stick", }, - { "", "mcl_core:stick", "mcl_mobitems:string", }, - { "mcl_core:stick", "", "mcl_farming:carrot_item" }, - }, -}) - -minetest.register_craft({ - output = "mcl_mobitems:carrot_on_a_stick", - recipe = { - { "mcl_core:stick", "", "" }, - { "mcl_mobitems:string", "mcl_core:stick", "", }, - { "mcl_farming:carrot_item", "", "mcl_core:stick" }, - }, -}) - -- Make red sand, red sandstone and more craftable in v6 -- NOTE: When you change these, also update mcl_craftguide for the "v6" icon in -- the craft guide! @@ -148,14 +112,6 @@ minetest.register_craft({ }, }) -minetest.register_craft({ - output = "mcl_core:stone_smooth 2", - recipe = { - { "mcl_stairs:slab_stone" }, - { "mcl_stairs:slab_stone" }, - }, -}) - minetest.register_craft({ output = "mcl_core:gold_ingot 9", recipe = {{ "mcl_core:emerald" }}, diff --git a/mods/MISC/mcl_wip/description.txt b/mods/MISC/mcl_wip/description.txt index 581de9981..d90115acf 100644 --- a/mods/MISC/mcl_wip/description.txt +++ b/mods/MISC/mcl_wip/description.txt @@ -1 +1 @@ -Development mod for MineClone 2 which add a “WIP” comment to items which are considered to be very unfinished. +Development mod for MineClone 2 which add a “WIP” (Work In Progress) comment to items which are considered to be very unfinished. diff --git a/mods/MISC/mcl_wip/init.lua b/mods/MISC/mcl_wip/init.lua index 8f9d206b8..4f8f0a562 100644 --- a/mods/MISC/mcl_wip/init.lua +++ b/mods/MISC/mcl_wip/init.lua @@ -1,5 +1,8 @@ +-- Mod to mark WIP (Work In Progress) content + +local S = minetest.get_translator("mcl_wip") + local wip_items = { - "mcl_fishing:fishing_rod", "mcl_maps:empty_map", "mcl_comparators:comparator_off_comp", "mcl_minecarts:hopper_minecart", @@ -27,7 +30,7 @@ for i=1,#wip_items do if new_description == "" then new_description = wip_items[i] end - new_description = new_description .. "\n"..core.colorize("#FF0000", "(WIP)") + new_description = new_description .. "\n"..core.colorize("#FF0000", S("(WIP)")) new_groups.not_in_craft_guide = 1 minetest.override_item(wip_items[i], { description = new_description, groups = new_groups }) end @@ -39,7 +42,7 @@ for i=1,#experimental_items do break end local new_description = def.description - new_description = new_description .. "\n"..core.colorize("#FFFF00", "(Temporary)") + new_description = new_description .. "\n"..core.colorize("#FFFF00", S("(Temporary)")) minetest.override_item(experimental_items[i], { description = new_description }) end diff --git a/mods/MISC/mcl_wip/locale/mcl_wip.de.tr b/mods/MISC/mcl_wip/locale/mcl_wip.de.tr new file mode 100644 index 000000000..9cf3b6f01 --- /dev/null +++ b/mods/MISC/mcl_wip/locale/mcl_wip.de.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_wip +(WIP)=(in Arbeit) +(Temporary)=(temporär) diff --git a/mods/MISC/mcl_wip/locale/template.txt b/mods/MISC/mcl_wip/locale/template.txt new file mode 100644 index 000000000..b74273642 --- /dev/null +++ b/mods/MISC/mcl_wip/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mcl_wip +# WIP means “Work in Progress” +(WIP)= +(Temporary)= diff --git a/mods/MISC/modpack.txt b/mods/MISC/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/PLAYER/mcl_death_drop/init.lua b/mods/PLAYER/mcl_death_drop/init.lua index 5f4b1ddb9..54672a5db 100644 --- a/mods/PLAYER/mcl_death_drop/init.lua +++ b/mods/PLAYER/mcl_death_drop/init.lua @@ -1,5 +1,5 @@ minetest.register_on_dieplayer(function(player) - local keep = minetest.settings:get_bool("mcl_keepInventory") or false + local keep = minetest.settings:get_bool("mcl_keepInventory", false) if keep == false then -- Drop inventory, crafting grid and armor local inv = player:get_inventory() diff --git a/mods/PLAYER/mcl_hunger/api.lua b/mods/PLAYER/mcl_hunger/api.lua index 04c384f98..46dc76fa2 100644 --- a/mods/PLAYER/mcl_hunger/api.lua +++ b/mods/PLAYER/mcl_hunger/api.lua @@ -1,24 +1,37 @@ mcl_hunger.registered_foods = {} +function mcl_hunger.init_player(player) + local meta = player:get_meta() + if meta:get_string("mcl_hunger:hunger") == "" then + meta:set_string("mcl_hunger:hunger", tostring(20)) + end + if meta:get_string("mcl_hunger:saturation") == "" then + meta:set_string("mcl_hunger:saturation", tostring(mcl_hunger.SATURATION_INIT)) + end + if meta:get_string("mcl_hunger:exhaustion") == "" then + meta:set_string("mcl_hunger:exhaustion", tostring(0)) + end +end + if mcl_hunger.active then function mcl_hunger.get_hunger(player) - local hunger = player:get_attribute("mcl_hunger:hunger") or 20 - return tonumber(hunger) + local hunger = tonumber(player:get_meta():get_string("mcl_hunger:hunger")) or 20 + return hunger end function mcl_hunger.get_saturation(player) - local saturation = player:get_attribute("mcl_hunger:saturation") or mcl_hunger.SATURATION_INIT - return tonumber(saturation) + local saturation = tonumber(player:get_meta():get_string("mcl_hunger:saturation")) or mcl_hunger.SATURATION_INIT + return saturation end function mcl_hunger.get_exhaustion(player) - local exhaustion = player:get_attribute("mcl_hunger:exhaustion") or 0 - return tonumber(exhaustion) + local exhaustion = tonumber(player:get_meta():get_string("mcl_hunger:exhaustion")) or 0 + return exhaustion end function mcl_hunger.set_hunger(player, hunger, update_hudbars) hunger = math.min(20, math.max(0, hunger)) - player:set_attribute("mcl_hunger:hunger", tostring(hunger)) + player:get_meta():set_string("mcl_hunger:hunger", tostring(hunger)) if update_hudbars ~= false then hb.change_hudbar(player, "hunger", hunger) mcl_hunger.update_saturation_hud(player, nil, hunger) @@ -28,7 +41,7 @@ if mcl_hunger.active then function mcl_hunger.set_saturation(player, saturation, update_hudbar) saturation = math.min(mcl_hunger.get_hunger(player), math.max(0, saturation)) - player:set_attribute("mcl_hunger:saturation", tostring(saturation)) + player:get_meta():set_string("mcl_hunger:saturation", tostring(saturation)) if update_hudbar ~= false then mcl_hunger.update_saturation_hud(player, saturation) end @@ -37,7 +50,7 @@ if mcl_hunger.active then function mcl_hunger.set_exhaustion(player, exhaustion, update_hudbar) exhaustion = math.min(mcl_hunger.EXHAUST_LVL, math.max(0.0, exhaustion)) - player:set_attribute("mcl_hunger:exhaustion", tostring(exhaustion)) + player:get_meta():set_string("mcl_hunger:exhaustion", tostring(exhaustion)) if update_hudbar ~= false then mcl_hunger.update_exhaustion_hud(player, exhaustion) end diff --git a/mods/PLAYER/mcl_hunger/depends.txt b/mods/PLAYER/mcl_hunger/depends.txt index db4d6ccba..ed8cc4236 100644 --- a/mods/PLAYER/mcl_hunger/depends.txt +++ b/mods/PLAYER/mcl_hunger/depends.txt @@ -1,2 +1,2 @@ hudbars -intllib? +mcl_death_messages? diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua index 939aeed97..53799a051 100644 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ b/mods/PLAYER/mcl_hunger/hunger.lua @@ -1,3 +1,6 @@ +local S = minetest.get_translator("mcl_hunger") +local mod_death_messages = minetest.get_modpath("mcl_death_messages") + -- wrapper for minetest.item_eat (this way we make sure other mods can't break this one) local org_eat = minetest.do_item_eat minetest.do_item_eat = function(hp_change, replace_with_item, itemstack, user, pointed_thing) @@ -110,7 +113,11 @@ local function poisonp(tick, time, time_left, damage, exhaustion, name) end -- Deal damage and exhaust player + -- TODO: Introduce fatal poison at higher difficulties if player:get_hp()-damage > 0 then + if mod_death_messages then + mcl_death_messages.player_damage(player, S("@1 succumbed to the poison.", name)) + end player:set_hp(player:get_hp()-damage) end @@ -138,9 +145,12 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso if foodtype == 3 then -- Item is a drink, only play drinking sound (no particle) minetest.sound_play("survival_thirst_drink", { - pos = pos, max_hear_distance = 12, gain = 1.0, + pitch = 1 + math.random(-10, 10)*0.005, + -- FIXME: Should be linked to object, but it's broken in Minetest 5.1.0 + -- See https://github.com/minetest/minetest/issues/9183 + pos = pos, }) else -- Assume the item is a food @@ -176,9 +186,12 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso }) end minetest.sound_play("mcl_hunger_bite", { - pos = pos, max_hear_distance = 12, gain = 1.0, + pitch = 1 + math.random(-10, 10)*0.005, + -- FIXME: Should be linked to object, but it's broken in Minetest 5.1.0 + -- See https://github.com/minetest/minetest/issues/9183 + pos = pos, }) end diff --git a/mods/PLAYER/mcl_hunger/init.lua b/mods/PLAYER/mcl_hunger/init.lua index f71dc1216..a90bdb73e 100644 --- a/mods/PLAYER/mcl_hunger/init.lua +++ b/mods/PLAYER/mcl_hunger/init.lua @@ -1,10 +1,5 @@ -local S -if (minetest.get_modpath("intllib")) then - S = intllib.Getter() -else - S = function ( s ) return s end -end - +local S = minetest.get_translator("mcl_hunger") +local mod_death_messages = minetest.get_modpath("mcl_death_messages") mcl_hunger = {} @@ -29,7 +24,7 @@ mcl_hunger.EXHAUST_SPRINT_JUMP = 200 -- jump while sprinting mcl_hunger.EXHAUST_ATTACK = 100 -- hit an enemy mcl_hunger.EXHAUST_SWIM = 10 -- player movement in water mcl_hunger.EXHAUST_SPRINT = 100 -- sprint (per node) -mcl_hunger.EXHAUST_DAMAGE = 100 -- TODO (mostly done): taking damage (protected by armor) +mcl_hunger.EXHAUST_DAMAGE = 100 -- taking damage (protected by armor) mcl_hunger.EXHAUST_REGEN = 6000 -- Regenerate 1 HP mcl_hunger.EXHAUST_LVL = 4000 -- at what exhaustion player saturation gets lowered @@ -101,15 +96,9 @@ if mcl_hunger.debug then hb.register_hudbar("exhaustion", 0xFFFFFF, S("Exhaust."), { icon = "mcl_hunger_icon_exhaustion.png", bgicon = "mcl_hunger_bgicon_exhaustion.png", bar = "mcl_hunger_bar_exhaustion.png" }, 0, mcl_hunger.EXHAUST_LVL, false, S("%s: %d/%d")) end -minetest.register_on_newplayer(function(player) - local name = player:get_player_name() - mcl_hunger.set_hunger(player, 20, false) - mcl_hunger.set_saturation(player, mcl_hunger.SATURATION_INIT, false) - mcl_hunger.set_exhaustion(player, 0, false) -end) - minetest.register_on_joinplayer(function(player) local name = player:get_player_name() + mcl_hunger.init_player(player) init_hud(player) mcl_hunger.poison_damage[name] = 0 mcl_hunger.poison_hunger[name] = 0 @@ -134,12 +123,19 @@ end) -- PvP combat exhaustion minetest.register_on_punchplayer(function(victim, puncher, time_from_last_punch, tool_capabilities, dir, damage) - if victim:is_player() and puncher:is_player() then - mcl_hunger.exhaust(victim:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) + if puncher:is_player() then mcl_hunger.exhaust(puncher:get_player_name(), mcl_hunger.EXHAUST_ATTACK) end end) +-- Exhaust on taking damage +minetest.register_on_player_hpchange(function(player, hp_change) + if hp_change < 0 then + local name = player:get_player_name() + mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_DAMAGE) + end +end) + local main_timer = 0 local timer = 0 -- Half second timer local timerMult = 1 -- Cycles from 0 to 7, each time when timer hits half a second @@ -165,7 +161,11 @@ minetest.register_globalstep(function(dtime) mcl_hunger.update_exhaustion_hud(player, mcl_hunger.get_exhaustion(player)) elseif h == 0 then -- Damage hungry player down to 1 HP + -- TODO: Allow starvation at higher difficulty levels if hp-1 > 0 then + if mod_death_messages then + mcl_death_messages.player_damage(player, S("@1 starved to death.", name)) + end player:set_hp(hp-1) end end @@ -187,6 +187,7 @@ end) else minetest.register_on_joinplayer(function(player) + mcl_hunger.init_player(player) mcl_hunger.last_eat[player:get_player_name()] = -1 end) diff --git a/mods/PLAYER/mcl_hunger/locale/de.txt b/mods/PLAYER/mcl_hunger/locale/de.txt deleted file mode 100644 index 3a06d93f4..000000000 --- a/mods/PLAYER/mcl_hunger/locale/de.txt +++ /dev/null @@ -1 +0,0 @@ -Satiation = Sättigung diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.de.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.de.tr new file mode 100644 index 000000000..7a04e091b --- /dev/null +++ b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.de.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_hunger +@1 succumbed to the poison.=@1 erlag dem Gift. +Food=Nahrung +Saturation=Sättigung +%s: %.1f/%d=%s: %.1f +Exhaust.=Erschöpf. +%s: %d/%d=%s: %d/%d +@1 starved to death.=%1 verhungerte. diff --git a/mods/PLAYER/mcl_hunger/locale/pt.txt b/mods/PLAYER/mcl_hunger/locale/pt.txt deleted file mode 100644 index 44fe45217..000000000 --- a/mods/PLAYER/mcl_hunger/locale/pt.txt +++ /dev/null @@ -1 +0,0 @@ -Satiation = Saciedade diff --git a/mods/PLAYER/mcl_hunger/locale/template.txt b/mods/PLAYER/mcl_hunger/locale/template.txt index 37a578dcd..d745ab08a 100644 --- a/mods/PLAYER/mcl_hunger/locale/template.txt +++ b/mods/PLAYER/mcl_hunger/locale/template.txt @@ -1 +1,8 @@ -Satiation +# textdomain: mcl_hunger +@1 succumbed to the poison.= +Food= +Saturation= +%s: %.1f/%d= +Exhaust.= +%s: %d/%d= +@1 starved to death.= diff --git a/mods/PLAYER/mcl_meshhand/README.md b/mods/PLAYER/mcl_meshhand/README.md new file mode 100644 index 000000000..2c796ff32 --- /dev/null +++ b/mods/PLAYER/mcl_meshhand/README.md @@ -0,0 +1,9 @@ +Mesh hand mod for MineClone 2. + +This mod uses a better-looking mesh for the wieldhand and applies the player skin texture to it. + +== Credits == +Based on 3D Hand [newhand] mod by jordan4ibanez. +https://forum.minetest.net/viewtopic.php?t=16435 + +License: CC0 diff --git a/mods/PLAYER/mcl_meshhand/depends.txt b/mods/PLAYER/mcl_meshhand/depends.txt new file mode 100644 index 000000000..c86b5f93b --- /dev/null +++ b/mods/PLAYER/mcl_meshhand/depends.txt @@ -0,0 +1,2 @@ +mcl_tools +mcl_skins? diff --git a/mods/PLAYER/mcl_meshhand/description.txt b/mods/PLAYER/mcl_meshhand/description.txt new file mode 100644 index 000000000..7a4daae59 --- /dev/null +++ b/mods/PLAYER/mcl_meshhand/description.txt @@ -0,0 +1 @@ +Applies the player skin texture to the hand. diff --git a/mods/PLAYER/mcl_meshhand/init.lua b/mods/PLAYER/mcl_meshhand/init.lua new file mode 100644 index 000000000..14bf10090 --- /dev/null +++ b/mods/PLAYER/mcl_meshhand/init.lua @@ -0,0 +1,49 @@ +local has_mcl_skins = minetest.get_modpath("mcl_skins") ~= nil + +local def = minetest.registered_items[""] + +local list +-- mcl_skins is enabled +if has_mcl_skins == true then + list = mcl_skins.list +else + list = { "hand" } +end + +--generate a node for every skin +for _,texture in pairs(list) do + -- This is a fake node that should never be placed in the world + minetest.register_node("mcl_meshhand:"..texture, { + description = "", + tiles = {texture..".png"}, + visual_scale = 1, + wield_scale = {x=1,y=1,z=1}, + paramtype = "light", + drawtype = "mesh", + mesh = "mcl_meshhand.b3d", + -- Prevent construction + node_placement_prediction = "", + on_construct = function(pos) + minetest.log("error", "[mcl_meshhand] Trying to construct mcl_meshhand:"..texture.." at "..minetest.pos_to_string(pos)) + minetest.remove_node(pos) + end, + drop = "", + on_drop = function() + return "" + end, + groups = { dig_immediate = 3, not_in_creative_inventory = 1 }, + range = def.range, + }) +end + +if has_mcl_skins == true then + --change the player's hand to their skin + mcl_skins.register_on_set_skin(function(player, skin) + local name = player:get_player_name() + player:get_inventory():set_stack("hand", 1, "mcl_meshhand:"..skin) + end) +else + minetest.register_on_joinplayer(function(player) + player:get_inventory():set_stack("hand", 1, "mcl_meshhand:hand") + end) +end diff --git a/mods/PLAYER/mcl_meshhand/mod.conf b/mods/PLAYER/mcl_meshhand/mod.conf new file mode 100644 index 000000000..6b57f4a49 --- /dev/null +++ b/mods/PLAYER/mcl_meshhand/mod.conf @@ -0,0 +1 @@ +name = mcl_meshhand diff --git a/mods/PLAYER/mcl_meshhand/models/mcl_meshhand.b3d b/mods/PLAYER/mcl_meshhand/models/mcl_meshhand.b3d new file mode 100644 index 000000000..a38124c60 Binary files /dev/null and b/mods/PLAYER/mcl_meshhand/models/mcl_meshhand.b3d differ diff --git a/mods/PLAYER/mcl_meshhand/models/mcl_meshhand.blend b/mods/PLAYER/mcl_meshhand/models/mcl_meshhand.blend new file mode 100644 index 000000000..495e74eb5 Binary files /dev/null and b/mods/PLAYER/mcl_meshhand/models/mcl_meshhand.blend differ diff --git a/mods/PLAYER/mcl_player/init.lua b/mods/PLAYER/mcl_player/init.lua index 599acd65a..a766eed28 100644 --- a/mods/PLAYER/mcl_player/init.lua +++ b/mods/PLAYER/mcl_player/init.lua @@ -70,10 +70,22 @@ function mcl_player.player_set_model(player, model_name) player_model[name] = model_name end -function mcl_player.player_set_textures(player, textures) +function mcl_player.player_set_textures(player, textures, preview) local name = player:get_player_name() player_textures[name] = textures player:set_properties({textures = textures,}) + if preview then + player:get_meta():set_string("mcl_player:preview", preview) + end +end + +function mcl_player.player_get_preview(player) + local preview = player:get_meta():get_string("mcl_player:preview") + if preview == nil or preview == "" then + return "player.png" + else + return preview + end end function mcl_player.player_set_animation(player, anim_name, speed) diff --git a/mods/PLAYER/mcl_player/models/character.b3d b/mods/PLAYER/mcl_player/models/character.b3d index 9ab454366..b3b772a41 100644 Binary files a/mods/PLAYER/mcl_player/models/character.b3d and b/mods/PLAYER/mcl_player/models/character.b3d differ diff --git a/mods/PLAYER/mcl_player/models/character.blend b/mods/PLAYER/mcl_player/models/character.blend index fca9f6597..652579c15 100644 Binary files a/mods/PLAYER/mcl_player/models/character.blend and b/mods/PLAYER/mcl_player/models/character.blend differ diff --git a/mods/PLAYER/mcl_player_init/init.lua b/mods/PLAYER/mcl_player_init/init.lua new file mode 100644 index 000000000..52967a441 --- /dev/null +++ b/mods/PLAYER/mcl_player_init/init.lua @@ -0,0 +1,4 @@ +minetest.register_on_joinplayer(function(player) + -- Settable hand + player:get_inventory():set_size("hand", 1) +end) diff --git a/mods/PLAYER/mcl_player_init/mod.conf b/mods/PLAYER/mcl_player_init/mod.conf new file mode 100644 index 000000000..8d559910c --- /dev/null +++ b/mods/PLAYER/mcl_player_init/mod.conf @@ -0,0 +1,2 @@ +name = mcl_player_init +description = Initialize player gameplay stuff that are neither model nor HUD-related diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index f9022a3b7..c3315f42c 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_playerplus") + -- Internal player state local mcl_playerplus_internal = {} @@ -118,7 +120,7 @@ minetest.register_globalstep(function(dtime) -- Check privilege, too and (not minetest.check_player_privs(name, {noclip = true})) then if player:get_hp() > 0 then - mcl_death_messages.player_damage(player, string.format("%s suffocated to death.", name)) + mcl_death_messages.player_damage(player, S("@1 suffocated to death.", name)) player:set_hp(player:get_hp() - 1) end end @@ -134,8 +136,7 @@ minetest.register_globalstep(function(dtime) local dist_feet = vector.distance({x=pos.x, y=pos.y-1, z=pos.z}, near) if dist < 1.1 or dist_feet < 1.1 then if player:get_hp() > 0 then - mcl_death_messages.player_damage(player, string.format("%s was prickled by a cactus.", name)) - mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_DAMAGE) + mcl_death_messages.player_damage(player, S("@1 was prickled to death by a cactus.", name)) player:set_hp(player:get_hp() - 1) end end @@ -209,6 +210,7 @@ minetest.register_globalstep(function(dtime) expirationtime = 1, size = 8, texture = tex, + glow = 14, playername = name }) end diff --git a/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.de.tr b/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.de.tr new file mode 100644 index 000000000..44d486d08 --- /dev/null +++ b/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.de.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_playerplus +@1 suffocated to death.=@1 erstickte zu Tode. +@1 was prickled to death by a cactus.=@1 wurde von einem Kaktus zu Tode gepiekst. diff --git a/mods/PLAYER/mcl_playerplus/locale/template.txt b/mods/PLAYER/mcl_playerplus/locale/template.txt new file mode 100644 index 000000000..49b1f96ac --- /dev/null +++ b/mods/PLAYER/mcl_playerplus/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: mcl_playerplus +@1 suffocated to death.= +@1 was prickled to death by a cactus.= diff --git a/mods/PLAYER/mcl_skins/LICENSE.txt b/mods/PLAYER/mcl_skins/LICENSE.txt new file mode 100644 index 000000000..fec6f6aa5 --- /dev/null +++ b/mods/PLAYER/mcl_skins/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 TenPlus1 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/mods/PLAYER/mcl_skins/README.md b/mods/PLAYER/mcl_skins/README.md new file mode 100644 index 000000000..bbe5309ab --- /dev/null +++ b/mods/PLAYER/mcl_skins/README.md @@ -0,0 +1,13 @@ += Skins for MineClone 2 = + +Simple mod to allow players to select a skin. +Use the chat command /setskin to change skin. + +Forked from Simple Skins by TenPlus1. +https://forum.minetest.net/viewtopic.php?id=9100 + +== License == +Code under MIT license +Origial authors: +- TenPlus1 +- Zeg9 diff --git a/mods/PLAYER/mcl_skins/depends.txt b/mods/PLAYER/mcl_skins/depends.txt new file mode 100644 index 000000000..e0804a6f9 --- /dev/null +++ b/mods/PLAYER/mcl_skins/depends.txt @@ -0,0 +1,4 @@ +mcl_player +mcl_inventory? +intllib? +3d_armor? diff --git a/mods/PLAYER/mcl_skins/description.txt b/mods/PLAYER/mcl_skins/description.txt new file mode 100644 index 000000000..61c7bff64 --- /dev/null +++ b/mods/PLAYER/mcl_skins/description.txt @@ -0,0 +1 @@ +Mod that allows players to set their individual skins. \ No newline at end of file diff --git a/mods/PLAYER/mcl_skins/init.lua b/mods/PLAYER/mcl_skins/init.lua new file mode 100644 index 000000000..401ba1600 --- /dev/null +++ b/mods/PLAYER/mcl_skins/init.lua @@ -0,0 +1,287 @@ +-- Skins for MineClone 2 + +mcl_skins = { + skins = {}, list = {}, previews = {}, meta = {}, has_preview = {}, + modpath = minetest.get_modpath("mcl_skins"), + skin_count = 0, -- counter of _custom_ skins (all skins except character.png) +} + +local S = minetest.get_translator("mcl_skins") + +-- load skin list and metadata +local id, f, data, skin = 0 + +while true do + + if id == 0 then + skin = "character" + mcl_skins.has_preview[id] = true + else + skin = "mcl_skins_character_" .. id + local preview = "mcl_skins_player_" .. id + + -- Does skin file exist? + f = io.open(mcl_skins.modpath .. "/textures/" .. skin .. ".png") + + -- escape loop if not found + if not f then + break + end + f:close() + + -- Does skin preview file exist? + local file_preview = io.open(mcl_skins.modpath .. "/textures/" .. preview .. ".png") + if file_preview == nil then + minetest.log("warning", "[mcl_skins] Player skin #"..id.." does not have preview image (player_"..id..".png)") + mcl_skins.has_preview[id] = false + else + mcl_skins.has_preview[id] = true + file_preview:close() + end + end + + mcl_skins.list[id] = skin + + -- does metadata exist for that skin file ? + if id == 0 then + metafile = "mcl_skins_character.txt" + else + metafile = "mcl_skins_character_"..id..".txt" + end + f = io.open(mcl_skins.modpath .. "/meta/" .. metafile) + + data = nil + if f then + data = minetest.deserialize("return {" .. f:read('*all') .. "}") + f:close() + end + + -- add metadata to list + mcl_skins.meta[skin] = { + name = data and data.name or "", + author = data and data.author or "", + } + + if id > 0 then + mcl_skins.skin_count = mcl_skins.skin_count + 1 + end + id = id + 1 +end + +mcl_skins.cycle_skin = function(player) + local skin_id = tonumber(player:get_meta():get_string("mcl_skins:skin_id")) + if not skin_id then + skin_id = 0 + end + skin_id = skin_id + 1 + if skin_id > mcl_skins.skin_count then + skin_id = 0 + end + mcl_skins.set_player_skin(player, skin_id) +end + +mcl_skins.set_player_skin = function(player, skin_id) + if not player then + return false + end + local playername = player:get_player_name() + local skin, skin_file, preview + if skin_id == nil or type(skin_id) ~= "number" or skin_id < 0 or skin_id > mcl_skins.skin_count then + return false + elseif skin_id == 0 then + skin = "character" + preview = "player" + else + skin = "mcl_skins_character_" .. tostring(skin_id) + if mcl_skins.has_preview[skin_id] then + preview = "mcl_skins_player_" .. tostring(skin_id) + else + -- Fallback preview image if preview image is missing + preview = "mcl_skins_player_dummy" + end + end + skin_file = skin .. ".png" + mcl_skins.skins[playername] = skin + mcl_skins.previews[playername] = preview + player:get_meta():set_string("mcl_skins:skin_id", tostring(skin_id)) + mcl_skins.update_player_skin(player) + if minetest.get_modpath("3d_armor") then + armor.textures[playername].skin = skin_file + armor:update_player_visuals(player) + end + if minetest.get_modpath("mcl_inventory") then + mcl_inventory.update_inventory_formspec(player) + end + for i=1, #mcl_skins.registered_on_set_skins do + mcl_skins.registered_on_set_skins[i](player, skin) + end + minetest.log("action", "[mcl_skins] Player skin for "..playername.." set to skin #"..skin_id) + return true +end + +mcl_skins.update_player_skin = function(player) + if not player then + return + end + local playername = player:get_player_name() + mcl_player.player_set_textures(player, { mcl_skins.skins[playername] .. ".png" }, mcl_skins.previews[playername] .. ".png" ) +end + +-- load player skin on join +minetest.register_on_joinplayer(function(player) + + local name = player:get_player_name() + local skin_id = player:get_meta():get_string("mcl_skins:skin_id") + local set_skin + -- do we already have a skin in player attributes? + if skin_id ~= nil and skin_id ~= "" then + set_skin = tonumber(skin_id) + -- otherwise use random skin if not set + end + if not set_skin then + set_skin = math.random(0, mcl_skins.skin_count) + end + local ok = mcl_skins.set_player_skin(player, set_skin) + if not ok then + set_skin = math.random(0, mcl_skins.skin_count) + minetest.log("warning", "[mcl_skins] Player skin for "..name.." not found, falling back to skin #"..set_skin) + mcl_skins.set_player_skin(player, set_skin) + end +end) + +mcl_skins.registered_on_set_skins = {} + +mcl_skins.register_on_set_skin = function(func) + table.insert(mcl_skins.registered_on_set_skins, func) +end + +-- command to set player skin (usually for custom skins) +minetest.register_chatcommand("setskin", { + params = S("[] []"), + description = S("Select player skin of yourself or another player"), + privs = {}, + func = function(name, param) + + if param == "" and name ~= "" then + mcl_skins.show_formspec(name) + return true + end + local playername, skin_id = string.match(param, "([^ ]+) (%d+)") + if not playername or not skin_id then + skin_id = string.match(param, "(%d+)") + if not skin_id then + return false, S("Insufficient or wrong parameters") + end + playername = name + end + skin_id = tonumber(skin_id) + + local player = minetest.get_player_by_name(playername) + + if not player then + return false, S("Player @1 not online!", playername) + end + if name ~= playername then + local privs = minetest.get_player_privs(name) + if not privs.server then + return false, S("You need the “server” privilege to change the skin of other players!") + end + end + + local skin + local ok = mcl_skins.set_player_skin(player, skin_id) + if not ok then + return false, S("Invalid skin number! Valid numbers: 0 to @1", mcl_skins.skin_count) + end + local skinfile = "#"..skin_id + + local meta = mcl_skins.meta[mcl_skins.skins[playername]] + local your_msg + if not meta.name or meta.name == "" then + your_msg = S("Your skin has been set to: @1", skinfile) + else + your_msg = S("Your skin has been set to: @1 (@2)", meta.name, skinfile) + end + if name == playername then + return true, your_msg + else + minetest.chat_send_player(playername, your_msg) + return true, S("Skin of @1 set to: @2 (@3)", playername, meta.name, skinfile) + end + + end, +}) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if fields.__mcl_skins then + if mcl_skins.skin_count <= 6 then + -- Change skin immediately if there are not many skins + mcl_skins.cycle_skin(player) + else + -- Show skin selection formspec otherwise + mcl_skins.show_formspec(player:get_player_name()) + end + end +end) + +mcl_skins.show_formspec = function(playername) + local formspec = "size[7,8.5]" + + formspec = formspec .. "label[2,2;" .. minetest.formspec_escape(S("Select player skin:")) .. "]" + .. "textlist[0,2.5;6.8,6;skins_set;" + + local meta + local selected = 1 + + for i = 0, mcl_skins.skin_count do + + local label = S("@1 (@2)", mcl_skins.meta[mcl_skins.list[i]].name, "#"..i) + + formspec = formspec .. minetest.formspec_escape(label) + + if mcl_skins.skins[playername] == mcl_skins.list[i] then + selected = i + 1 + meta = mcl_skins.meta[mcl_skins.list[i]] + end + + if i < #mcl_skins.list then + formspec = formspec .."," + end + end + + formspec = formspec .. ";" .. selected .. ";false]" + + formspec = formspec .. "image[0,0;1.35,2.7;" .. mcl_skins.previews[playername] .. ".png]" + + if meta then + if meta.name and meta.name ~= "" then + formspec = formspec .. "label[2,0.5;" .. minetest.formspec_escape(S("Name: @1", meta.name)) .. "]" + end + end + + minetest.show_formspec(playername, "mcl_skins:skin_select", formspec) +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + + if formname == "mcl_skins:skin_select" then + + local name = player:get_player_name() + + local event = minetest.explode_textlist_event(fields["skins_set"]) + + if event.type == "CHG" or event.type == "DCL" then + + local skin_id = math.min(event.index - 1, mcl_skins.skin_count) + if not mcl_skins.list[skin_id] then + return -- Do not update wrong skin number + end + + mcl_skins.set_player_skin(player, skin_id) + mcl_skins.show_formspec(name) + end + end +end) + +minetest.log("action", "[mcl_skins] Mod initialized with "..mcl_skins.skin_count.." custom skin(s)") + diff --git a/mods/ENTITIES/mcl_mobs/intllib.lua b/mods/PLAYER/mcl_skins/intllib.lua similarity index 100% rename from mods/ENTITIES/mcl_mobs/intllib.lua rename to mods/PLAYER/mcl_skins/intllib.lua diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.de.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.de.tr new file mode 100644 index 000000000..8f9b488db --- /dev/null +++ b/mods/PLAYER/mcl_skins/locale/mcl_skins.de.tr @@ -0,0 +1,13 @@ +# textdomain: mcl_skins +[] []=[] [] +Select player skin of yourself or another player=Spieleraussehen von Ihnen oder einem anderen Spieler auswählen +Insufficient or wrong parameters=Unzureichende oder falsche Parameter +Player @1 not online!=Spieler @1 ist nicht online! +You need the “server” privilege to change the skin of other players!=Sie brauchen das „server“-Privileg, um das Aussehen anderer Spieler zu ändern! +Invalid skin number! Valid numbers: 0 to @1=Ungültige Aussehens-Nummer! Gültige Nummern: 0 bis @1 +Your skin has been set to: @1=Ihr Aussehen wurde geändert auf: @1 +Your skin has been set to: @1 (@2)=Ihr Aussehen wurde geändert auf: @1 (@2) +Skin of @1 set to: @2 (@3)=Aussehen von @1 gesetzt auf: @2 (@3) +Select player skin:=Spieleraussehen wählen: +@1 (@2)=@1 (@2) +Name: @1=Name: @1 diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.fr.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.fr.tr new file mode 100644 index 000000000..fe321cfbf --- /dev/null +++ b/mods/PLAYER/mcl_skins/locale/mcl_skins.fr.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_skins +# UNFINISHED translation! +# TODO: Remove the # sign from the translations below and add the missing translations. + +#[] []= +#Select player skin of yourself or another player= +#Insufficient or wrong parameters= +#Player @1 not online!= +#You need the “server” privilege to change the skin of other players!= +#Invalid skin number! Valid numbers: 0 to @1= +#Your skin has been set to: @1= +#Your skin has been set to: @1 (@2)= +#Skin of @1 set to: @2 (@3)= +Select player skin:=Sélectionner l'apparence du joueur : +#@1 (@2)= +Name: @1=Nom : @1 diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.ms.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.ms.tr new file mode 100644 index 000000000..58946f605 --- /dev/null +++ b/mods/PLAYER/mcl_skins/locale/mcl_skins.ms.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_skins +# UNFINISHED translation! +# TODO: Remove the # sign from the translations below and add the missing translations. + +[] []= +Select player skin of yourself or another player= +Insufficient or wrong parameters= +Player @1 not online!= +You need the “server” privilege to change the skin of other players!= +Invalid skin number! Valid numbers: 0 to @1= +Your skin has been set to: @1= +Your skin has been set to: @1 (@2)= +Skin of @1 set to: @2 (@3)= +Select player skin:=Pilih Kulit Pemain: +@1 (@2)= +Name: @1=Nama: @1 diff --git a/mods/PLAYER/mcl_skins/locale/template.txt b/mods/PLAYER/mcl_skins/locale/template.txt new file mode 100644 index 000000000..c683fa4e4 --- /dev/null +++ b/mods/PLAYER/mcl_skins/locale/template.txt @@ -0,0 +1,13 @@ +# textdomain: mcl_skins +[] []= +Select player skin of yourself or another player= +Insufficient or wrong parameters= +Player @1 not online!= +You need the “server” privilege to change the skin of other players!= +Invalid skin number! Valid numbers: 0 to @1= +Your skin has been set to: @1= +Your skin has been set to: @1 (@2)= +Skin of @1 set to: @2 (@3)= +Select player skin:= +@1 (@2)= +Name: @1= diff --git a/mods/PLAYER/mcl_skins/meta/mcl_skins_character.txt b/mods/PLAYER/mcl_skins/meta/mcl_skins_character.txt new file mode 100644 index 000000000..00061a654 --- /dev/null +++ b/mods/PLAYER/mcl_skins/meta/mcl_skins_character.txt @@ -0,0 +1,2 @@ +name = "Steve", +author = "%TEXTURE_PACK_AUTHOR%", diff --git a/mods/PLAYER/mcl_skins/meta/mcl_skins_character_1.txt b/mods/PLAYER/mcl_skins/meta/mcl_skins_character_1.txt new file mode 100644 index 000000000..f96b13f68 --- /dev/null +++ b/mods/PLAYER/mcl_skins/meta/mcl_skins_character_1.txt @@ -0,0 +1,2 @@ +name = "Alex", +author = "%TEXTURE_PACK_AUTHOR%", diff --git a/mods/PLAYER/mcl_skins/mod.conf b/mods/PLAYER/mcl_skins/mod.conf new file mode 100644 index 000000000..96f827646 --- /dev/null +++ b/mods/PLAYER/mcl_skins/mod.conf @@ -0,0 +1 @@ +name = mcl_skins diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_button.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_button.png new file mode 100644 index 000000000..49acf8550 Binary files /dev/null and b/mods/PLAYER/mcl_skins/textures/mcl_skins_button.png differ diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_character_1.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_character_1.png new file mode 100644 index 000000000..71f02471d Binary files /dev/null and b/mods/PLAYER/mcl_skins/textures/mcl_skins_character_1.png differ diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_player_1.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_player_1.png new file mode 100644 index 000000000..3d7af2a98 Binary files /dev/null and b/mods/PLAYER/mcl_skins/textures/mcl_skins_player_1.png differ diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_player_dummy.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_player_dummy.png new file mode 100644 index 000000000..d1f7dc20a Binary files /dev/null and b/mods/PLAYER/mcl_skins/textures/mcl_skins_player_dummy.png differ diff --git a/mods/PLAYER/mcl_spawn/init.lua b/mods/PLAYER/mcl_spawn/init.lua index 5c8a797eb..66fe8cdd0 100644 --- a/mods/PLAYER/mcl_spawn/init.lua +++ b/mods/PLAYER/mcl_spawn/init.lua @@ -1,32 +1,55 @@ mcl_spawn = {} +local S = minetest.get_translator("mcl_spawn") local mg_name = minetest.get_mapgen_setting("mg_name") --- Returns current custom spawn position of player. --- Returns nil if player has no custom spawn position. --- If player is nil or not a player, the default spawn point is returned. --- The second return value is true if spawn point is player-chosen, +local cached_world_spawn + +mcl_spawn.get_world_spawn_pos = function() + local spawn + spawn = minetest.setting_get_pos("static_spawnpoint") + if spawn then + return spawn + end + if cached_world_spawn then + return cached_world_spawn + end + -- 32 attempts to find a suitable spawn point + spawn = { x=math.random(-16, 16), y=8, z=math.random(-16, 16) } + for i=1, 32 do + local y = minetest.get_spawn_level(spawn.x, spawn.z) + if y then + spawn.y = y + cached_world_spawn = spawn + minetest.log("action", "[mcl_spawn] Dynamic world spawn determined to be "..minetest.pos_to_string(spawn)) + return spawn + end + -- Random walk + spawn.x = spawn.x + math.random(-64, 64) + spawn.z = spawn.z + math.random(-64, 64) + end + minetest.log("action", "[mcl_spawn] Failed to determine dynamic world spawn!") + -- Use dummy position if nothing found + return { x=math.random(-16, 16), y=8, z=math.random(-16, 16) } +end + +-- Returns a spawn position of player. +-- If player is nil or not a player, a world spawn point is returned. +-- The second return value is true if returned spawn point is player-chosen, -- false otherwise. mcl_spawn.get_spawn_pos = function(player) local spawn, custom_spawn = nil, false if player ~= nil and player:is_player() then - local attr = player:get_attribute("mcl_beds:spawn") + local attr = player:get_meta():get_string("mcl_beds:spawn") if attr ~= nil and attr ~= "" then spawn = minetest.string_to_pos(attr) custom_spawn = true end end if not spawn or spawn == "" then - spawn = minetest.setting_get_pos("static_spawnpoint") + spawn = mcl_spawn.get_world_spawn_pos() custom_spawn = false end - if not spawn or spawn == "" then - local attr = player:get_attribute("mcl_spawn:first_spawn") - if attr ~= nil and attr ~= "" then - spawn = minetest.string_to_pos(attr) - custom_spawn = false - end - end return spawn, custom_spawn end @@ -36,39 +59,49 @@ end -- changed. mcl_spawn.set_spawn_pos = function(player, pos, message) local spawn_changed = false + local meta = player:get_meta() if pos == nil then - if player:get_attribute("mcl_beds:spawn") ~= "" then + if meta:get_string("mcl_beds:spawn") ~= "" then spawn_changed = true if message then - minetest.chat_send_player(player:get_player_name(), "Respawn position cleared!") + minetest.chat_send_player(player:get_player_name(), S("Respawn position cleared!")) end end - player:set_attribute("mcl_beds:spawn", "") + meta:set_string("mcl_beds:spawn", "") else - local oldpos = minetest.string_to_pos(player:get_attribute("mcl_beds:spawn")) + local oldpos = minetest.string_to_pos(meta:get_string("mcl_beds:spawn")) if oldpos then -- We don't bother sending a message if the new spawn pos is basically the same if vector.distance(pos, oldpos) > 0.1 then spawn_changed = true if message then - minetest.chat_send_player(player:get_player_name(), "New respawn position set!") + minetest.chat_send_player(player:get_player_name(), S("New respawn position set!")) end end end - player:set_attribute("mcl_beds:spawn", minetest.pos_to_string(pos)) + meta:set_string("mcl_beds:spawn", minetest.pos_to_string(pos)) end return spawn_changed end +local function get_far_node(pos) + local node = minetest.get_node(pos) + if node.name ~= "ignore" then + return node + end + minetest.get_voxel_manip():read_from_map(pos, pos) + return minetest.get_node(pos) +end + -- Respawn player at specified respawn position minetest.register_on_respawnplayer(function(player) local pos, custom_spawn = mcl_spawn.get_spawn_pos(player) if pos and custom_spawn then -- Check if bed is still there -- and the spawning position is free of solid or damaging blocks. - local node_bed = minetest.get_node(pos) - local node_up1 = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}) - local node_up2 = minetest.get_node({x=pos.x,y=pos.y+2,z=pos.z}) + local node_bed = get_far_node(pos) + local node_up1 = get_far_node({x=pos.x,y=pos.y+1,z=pos.z}) + local node_up2 = get_far_node({x=pos.x,y=pos.y+2,z=pos.z}) local bgroup = minetest.get_item_group(node_bed.name, "bed") local def1 = minetest.registered_nodes[node_up1.name] local def2 = minetest.registered_nodes[node_up2.name] @@ -83,13 +116,8 @@ minetest.register_on_respawnplayer(function(player) if (bgroup ~= 1 and bgroup ~= 2) then mcl_spawn.set_spawn_pos(player, nil) end - minetest.chat_send_player(player:get_player_name(), "Your spawn bed was missing or blocked.") + minetest.chat_send_player(player:get_player_name(), S("Your spawn bed was missing or blocked.")) end end end) -minetest.register_on_newplayer(function(player) - -- Remember where the player spawned first - player:set_attribute("mcl_spawn:first_spawn", minetest.pos_to_string(player:get_pos())) -end) - diff --git a/mods/PLAYER/mcl_spawn/locale/mcl_spawn.de.tr b/mods/PLAYER/mcl_spawn/locale/mcl_spawn.de.tr new file mode 100644 index 000000000..e30a71650 --- /dev/null +++ b/mods/PLAYER/mcl_spawn/locale/mcl_spawn.de.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_spawn +New respawn position set!=Neue Wiedereinstiegsposition gesetzt! +Respawn position cleared!=Wiedereinstiegsposition gelöscht! +Your spawn bed was missing or blocked.=Ihr Startbett fehlte oder war blockiert. diff --git a/mods/PLAYER/mcl_spawn/locale/template.txt b/mods/PLAYER/mcl_spawn/locale/template.txt new file mode 100644 index 000000000..8906d18f9 --- /dev/null +++ b/mods/PLAYER/mcl_spawn/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: mcl_spawn +New respawn position set!= +Respawn position cleared!= +Your spawn bed was missing or blocked.= diff --git a/mods/PLAYER/mcl_sprint/init.lua b/mods/PLAYER/mcl_sprint/init.lua index 123809a89..c19152907 100644 --- a/mods/PLAYER/mcl_sprint/init.lua +++ b/mods/PLAYER/mcl_sprint/init.lua @@ -107,7 +107,7 @@ minetest.register_globalstep(function(dtime) if players[playerName]["shouldSprint"] == true then --Stopped local sprinting -- Prevent sprinting if hungry or sleeping - if (mcl_hunger.active and mcl_hunger.get_hunger(player) <= 6) or (player:get_attribute("mcl_beds:sleeping") == "true")then + if (mcl_hunger.active and mcl_hunger.get_hunger(player) <= 6) or (player:get_meta():get_string("mcl_beds:sleeping") == "true")then sprinting = false else sprinting = true diff --git a/mods/PLAYER/modpack.txt b/mods/PLAYER/modpack.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mods/PLAYER/playerphysics/init.lua b/mods/PLAYER/playerphysics/init.lua index 2b7d7df02..50d6454d3 100644 --- a/mods/PLAYER/playerphysics/init.lua +++ b/mods/PLAYER/playerphysics/init.lua @@ -1,7 +1,7 @@ playerphysics = {} local function calculate_attribute_product(player, attribute) - local a = minetest.deserialize(player:get_attribute("playerphysics:physics")) + local a = minetest.deserialize(player:get_meta():get_string("playerphysics:physics")) local product = 1 if a == nil or a[attribute] == nil then return product @@ -16,7 +16,8 @@ local function calculate_attribute_product(player, attribute) end function playerphysics.add_physics_factor(player, attribute, id, value) - local a = minetest.deserialize(player:get_attribute("playerphysics:physics")) + local meta = player:get_meta() + local a = minetest.deserialize(meta:get_string("playerphysics:physics")) if a == nil then a = { [attribute] = { [id] = value } } elseif a[attribute] == nil then @@ -24,20 +25,21 @@ function playerphysics.add_physics_factor(player, attribute, id, value) else a[attribute][id] = value end - player:set_attribute("playerphysics:physics", minetest.serialize(a)) + meta:set_string("playerphysics:physics", minetest.serialize(a)) local raw_value = calculate_attribute_product(player, attribute) player:set_physics_override({[attribute] = raw_value}) end function playerphysics.remove_physics_factor(player, attribute, id) - local a = minetest.deserialize(player:get_attribute("playerphysics:physics")) + local meta = player:get_meta() + local a = minetest.deserialize(meta:get_string("playerphysics:physics")) if a == nil or a[attribute] == nil then -- Nothing to remove return else a[attribute][id] = nil end - player:set_attribute("playerphysics:physics", minetest.serialize(a)) + meta:set_string("playerphysics:physics", minetest.serialize(a)) local raw_value = calculate_attribute_product(player, attribute) player:set_physics_override({[attribute] = raw_value}) end diff --git a/settingtypes.txt b/settingtypes.txt index 1adfec3fb..ac9ba89b8 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -11,25 +11,11 @@ # per-player Creative Mode. creative_mode (Creative mode) bool false -# Which edition of Minecraft to imitate. This currently only affects two map -# generation aspects. -# This setting might be removed in a later version. -# Available options: -# -# pc_edition: PC Edition (later known as “Java Edition”). -# There are no fallen tree trunks. -# Jungle bushes have oak leaves. -# -# pocket_edition: Pocket Edition -# There are simple fallen tree trunks with mushrooms. -# Jungle bushes have jungle leaves. -mcl_imitation_mode (Imitated Minecraft edition) enum pc_edition pc_edition,pocket_edition - -# Fire spreads and flammable nodes will be ignited by nearby fire. -# Spreading fire may cause severe destruction. -# Spreading fire blocks will disappear when fire is disabled, but -# eternal fire is unaffected. -enable_fire (Fire) bool true +# Fire spreads and flammable blocks might be destroyed by nearby fire. +# Destructive fire may cause severe destruction. +# Fire blocks will be non-destructive and stops spreading when this +# setting is disabled, but they still deal damage to creatures. +enable_fire (Destructive and spreading fire) bool true # If enabled, the weather will change naturally over time. mcl_doWeatherCycle (Change weather) bool true @@ -54,6 +40,11 @@ mcl_keepInventory (Keep inventory on death) bool false # If enabled, chat messages are shown to everyone when a player dies. mcl_showDeathMessages (Show death messages) bool true +# If enabled, the recipe book will progressively be filled with new recipes that can be crafted from all items you ever have had in your inventory. +# Recommended for new players and for a spoiler-free gameplay experience. +# If disabled, all recipes will be shown. +mcl_craftguide_progressive_mode (Learn crafting recipes progressively) bool true + [Mobs] # If enabled, mobs will spawn naturally. This does not affect # affect mob spawners. @@ -73,33 +64,28 @@ only_peaceful_mobs (Spawn only peaceful mobs) bool false # mob spawners. mobs_spawn_protected (Mobs spawn in protected areas) bool false +# Mobs difficulty. This is a number that will affect the initial and maximum +# health and the amount of damage that mobs deal. Health and damage will +# be multiplied with this number. +mob_difficulty (Mob difficulty factor) float 1.0 0.0 + # If enabled, mobs might drop items when they die. mobs_drop_items (Mobs drop items) bool true # If enabled, mobs can take, place, change and destroy blocks around them. mobs_griefing (Mobs change blocks) bool true -# If enable, mobs won't bleed or emit other damage particles when -# they got hurt. -mobs_disable_blood (Disable mob blood) bool false +# If enabled, mobs won't damage particles when they got hurt. +mobs_disable_blood (Disable mob damage particles) bool false [Audio] # Enable flame sound. flame_sound (Flame sound) bool true [Experimental] -# If enabled, the recipe book will only show recipes which require one -# item which you have already discovered. -# If disabled, the recipe book shows all crafting recipes. -# This setting is EXPERIMENTAL and may be changed in later versions. -# Feedback is appreciated. -craftguide_progressive_mode (Enable recipe book progressive mode) bool false - -# Mobs difficulty. This is a number that will affect the initial and maximum -# health and the amount of damage that mobs deal. Health and damage will -# be multiplied with this number. -# This feature is not finished yet! -mob_difficulty (Mob difficulty factor) float 1.0 0.0 +# Whether to generate fallen logs in some biomes. +# They might not always look pretty and have strange overhangs. +mcl_generate_fallen_logs (Generate fallen logs) bool false # If enabled, the “flat” map generator generates a Classic Superflat world: # Completely flat, 1 layer of grass blocks on top of 2 layers of dirt on