Implement i18n support

This commit is contained in:
Till Affeldt
2020-05-29 22:02:12 +02:00
parent 920f80e044
commit 0fd6942225
6 changed files with 22 additions and 1 deletions

View File

@ -5,7 +5,10 @@ then return end
local BLOCK_NAME = "regional_weather:ice"
local S = regional_weather.i18n
minetest.register_node(BLOCK_NAME, {
description = S("Thin Ice"),
tiles = {"(default_ice.png^[colorize:#ffffff:50)^[opacity:200"},
paramtype = "light",
groups = {

View File

@ -13,6 +13,8 @@ local GROUND_COVERS = {
"default:permafrost_with_stones"
}
local S = regional_weather.i18n
-- clean up puddles if disabled
if not regional_weather.settings.puddles then
-- set all puddle nodes to air
@ -57,6 +59,7 @@ for i = 1, VARIANT_COUNT do
texture = texture .. "^[transformFX"
end
minetest.register_node(name, {
description = S("Puddle"),
tiles = { texture },
drawtype = "nodebox",
pointable = false,

View File

@ -2,6 +2,8 @@ local BLOCK_PREFIX = "regional_weather:snow_cover_"
local CHECK_DISTANCE = 3
local MAX_AMOUNT = 20
local S = regional_weather.i18n
if not minetest.get_modpath("default")
or default.node_sound_snow_defaults == nil
or not regional_weather.settings.snow then
@ -25,6 +27,7 @@ for i = 1,5 do
}
minetest.register_node(BLOCK_PREFIX .. i, {
description = S("Snow Cover"),
tiles = { "default_snow.png" },
drawtype = "nodebox",
buildable_to = i < 3,