From f5c1e19781c8cb721efb5d7b528a5c8eb6f9dd37 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 15 Mar 2019 04:25:54 +0100 Subject: [PATCH] Add help for disabled fire and translate --- mods/ITEMS/mcl_fire/init.lua | 43 +++++++++++++++-------- mods/ITEMS/mcl_fire/locale/mcl_fire.de.tr | 16 +++++++++ mods/ITEMS/mcl_fire/locale/template.txt | 3 +- settingtypes.txt | 10 +++--- 4 files changed, 51 insertions(+), 21 deletions(-) create mode 100644 mods/ITEMS/mcl_fire/locale/mcl_fire.de.tr diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index 0ffaf7752..fa0646218 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -10,8 +10,34 @@ local S = minetest.get_translator("mcl_fire") -- Flame nodes -local 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.") -local eternal_fire_help = S("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") +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 + +-- Enable sound +local flame_sound = minetest.settings:get_bool("flame_sound") +if flame_sound == nil then + -- Enable if no setting present + flame_sound = true +end + + +-- Help texts +local 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 flammable block around. Fire does neither spread nor 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 + +local 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.") + local fire_death_messages = { S("%s has been cooked crisp."), S("%s felt the burn."), @@ -191,12 +217,6 @@ minetest.override_item("mcl_core:lava_source", { -- 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 = {} @@ -327,13 +347,6 @@ 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 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..29adafc94 --- /dev/null +++ b/mods/ITEMS/mcl_fire/locale/mcl_fire.de.tr @@ -0,0 +1,16 @@ +# 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 flammable block around. Fire does neither spread nor 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 keine entzündlichen Blöcke da sind. 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 Fuer nicht von alleine aus, auf nicht unter Regen. Es ist sicher, ein ewiges Feuer zu schlagen, aber es tut weh, wenn man direkt in einem steht. +%s has been cooked crisp.=%s wurde knusprig gebraten. +%s felt the burn.=%s ist völlig verbrannt. +%s died in the flames.=%s starb in den Flammen. +%s died in a fire.=%s 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 index d691bf22f..bda1a8920 100644 --- a/mods/ITEMS/mcl_fire/locale/template.txt +++ b/mods/ITEMS/mcl_fire/locale/template.txt @@ -6,7 +6,8 @@ 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.= -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 is a damaging but non-destructive short-lived kind of block. It will disappear when there is flammable block around. Fire does neither spread nor 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.= %s has been cooked crisp.= %s felt the burn.= %s died in the flames.= diff --git a/settingtypes.txt b/settingtypes.txt index ae31f9304..d39f33794 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -11,11 +11,11 @@ # per-player Creative Mode. creative_mode (Creative mode) bool false -# 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 when this setting is disabled, but they +# still deal damage to creatures. Eternal fire is unaffected. +enable_fire (Destructive fire) bool true # If enabled, the weather will change naturally over time. mcl_doWeatherCycle (Change weather) bool true