correct use of S() func

This commit is contained in:
Dyed ef Ra 2024-03-27 21:47:06 +01:00
parent c8be496afe
commit 1e28f1c565
3 changed files with 20 additions and 20 deletions

View File

@ -647,7 +647,7 @@ end
-- \returns nil -- \returns nil
industrialtest.api.registerResourceDust=function(name,displayName,resources,color,registerMaceratorRecipe) industrialtest.api.registerResourceDust=function(name,displayName,resources,color,registerMaceratorRecipe)
minetest.register_craftitem("industrialtest:"..name.."_dust",{ minetest.register_craftitem("industrialtest:"..name.."_dust",{
description=S(displayName.." Dust"), description=S("@1 Dust", displayName),
inventory_image="industrialtest_dust.png", inventory_image="industrialtest_dust.png",
color=color color=color
}) })
@ -693,7 +693,7 @@ industrialtest.api.registerStorageCell=function(name,displayName,node,modname)
modname="industrialtest" modname="industrialtest"
end end
minetest.register_craftitem("industrialtest:"..name.."_cell",{ minetest.register_craftitem("industrialtest:"..name.."_cell",{
description=S(displayName.." Cell"), description=S("@1 Cell", displayName),
inventory_image=modname.."_"..name.."_cell.png", inventory_image=modname.."_"..name.."_cell.png",
on_place=function(itemstack,user,pointed) on_place=function(itemstack,user,pointed)
if pointed.type~="node" or not user or not user:is_player() then if pointed.type~="node" or not user or not user:is_player() then

View File

@ -47,7 +47,7 @@ end
local function registerCable(name,displayName,size,flow,registerInsulated) local function registerCable(name,displayName,size,flow,registerInsulated)
local definition={ local definition={
description=S(displayName.." Cable"), description=S("@1 Cable", displayName),
inventory_image="industrialtest_"..name.."_cable_inv.png", inventory_image="industrialtest_"..name.."_cable_inv.png",
tiles={"industrialtest_"..name.."_cable.png"}, tiles={"industrialtest_"..name.."_cable.png"},
wield_image="industrialtest_"..name.."_cable_inv.png", wield_image="industrialtest_"..name.."_cable_inv.png",
@ -142,7 +142,7 @@ local function registerCable(name,displayName,size,flow,registerInsulated)
minetest.register_node("industrialtest:"..name.."_cable",definition) minetest.register_node("industrialtest:"..name.."_cable",definition)
if registerInsulated then if registerInsulated then
definition=table.copy(definition) definition=table.copy(definition)
definition.description=S("Insulated "..displayName.." Cable") definition.description=S("Insulated @1 Cable", displayName)
definition.inventory_image="industrialtest_insulated_"..name.."_cable_inv.png" definition.inventory_image="industrialtest_insulated_"..name.."_cable_inv.png"
definition.tiles={"industrialtest_insulated_"..name.."_cable.png"} definition.tiles={"industrialtest_insulated_"..name.."_cable.png"}
definition.wield_image="industrialtest_insulated_"..name.."_cable_inv.png" definition.wield_image="industrialtest_insulated_"..name.."_cable_inv.png"

View File

@ -94,15 +94,15 @@ end
if industrialtest.mclAvailable then if industrialtest.mclAvailable then
industrialtest.internal.registerMetal=function(name,displayName,oreBlastResistance,oreHardness,rawBlockBlastResistance,rawBlockHardness,blockBlastResistance,blockHardness) industrialtest.internal.registerMetal=function(name,displayName,oreBlastResistance,oreHardness,rawBlockBlastResistance,rawBlockHardness,blockBlastResistance,blockHardness)
minetest.register_craftitem("industrialtest:raw_"..name,{ minetest.register_craftitem("industrialtest:raw_"..name,{
description=S("Raw "..displayName), description=S("Raw @1", displayName),
inventory_image="industrialtest_mcl_raw_"..name..".png" inventory_image="industrialtest_mcl_raw_"..name..".png"
}) })
minetest.register_craftitem("industrialtest:"..name.."_ingot",{ minetest.register_craftitem("industrialtest:"..name.."_ingot",{
description=S(displayName.." Ingot"), description=S("@1 Ingot", displayName),
inventory_image="industrialtest_mcl_"..name.."_ingot.png" inventory_image="industrialtest_mcl_"..name.."_ingot.png"
}) })
minetest.register_node("industrialtest:stone_with_"..name,{ minetest.register_node("industrialtest:stone_with_"..name,{
description=S(displayName.." Ore"), description=S("@1 Ore", displayName),
tiles={"default_stone.png^industrialtest_mcl_stone_with_"..name..".png"}, tiles={"default_stone.png^industrialtest_mcl_stone_with_"..name..".png"},
sounds=mcl_sounds.node_sound_stone_defaults(), sounds=mcl_sounds.node_sound_stone_defaults(),
drop="industrialtest:raw_"..name, drop="industrialtest:raw_"..name,
@ -114,7 +114,7 @@ if industrialtest.mclAvailable then
_mcl_fortune_drop = mcl_core.fortune_drop_ore, _mcl_fortune_drop = mcl_core.fortune_drop_ore,
}) })
minetest.register_node("industrialtest:deepslate_with_"..name,{ minetest.register_node("industrialtest:deepslate_with_"..name,{
description=S("Deepslate with "..displayName), description=S("Deepslate with @1", displayName),
tiles={"mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate.png^industrialtest_mcl_stone_with_"..name..".png"}, tiles={"mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate.png^industrialtest_mcl_stone_with_"..name..".png"},
sounds=mcl_sounds.node_sound_stone_defaults(), sounds=mcl_sounds.node_sound_stone_defaults(),
drop="industrialtest:raw_"..name, drop="industrialtest:raw_"..name,
@ -128,7 +128,7 @@ if industrialtest.mclAvailable then
_mcl_fortune_drop = mcl_core.fortune_drop_ore, _mcl_fortune_drop = mcl_core.fortune_drop_ore,
}) })
minetest.register_node("industrialtest:raw_"..name.."_block",{ minetest.register_node("industrialtest:raw_"..name.."_block",{
description=S("Raw "..displayName.." Block"), description=S("Raw @1 Block", displayName),
tiles={"industrialtest_mcl_raw_"..name.."_block.png"}, tiles={"industrialtest_mcl_raw_"..name.."_block.png"},
groups={pickaxey=2,building_block=1,blast_furnace_smeltable=1}, groups={pickaxey=2,building_block=1,blast_furnace_smeltable=1},
sounds=mcl_sounds.node_sound_metal_defaults(), sounds=mcl_sounds.node_sound_metal_defaults(),
@ -136,7 +136,7 @@ if industrialtest.mclAvailable then
_mcl_hardness=rawBlockHardness, _mcl_hardness=rawBlockHardness,
}) })
minetest.register_node("industrialtest:"..name.."_block",{ minetest.register_node("industrialtest:"..name.."_block",{
description=S("Block of "..displayName), description=S("Block of @1", displayName),
tiles={"industrialtest_"..name.."_block.png"}, tiles={"industrialtest_"..name.."_block.png"},
groups={pickaxey=2,building_block=1}, groups={pickaxey=2,building_block=1},
sounds=mcl_sounds.node_sound_metal_defaults(), sounds=mcl_sounds.node_sound_metal_defaults(),
@ -192,7 +192,7 @@ if industrialtest.mclAvailable then
end end
industrialtest.registerToolset=function(material,materialItem,materialDisplayName,config) industrialtest.registerToolset=function(material,materialItem,materialDisplayName,config)
minetest.register_tool("industrialtest:"..material.."_pickaxe",{ minetest.register_tool("industrialtest:"..material.."_pickaxe",{
description=S(materialDisplayName.." Pickaxe"), description=S("@1 Pickaxe", materialDisplayName),
inventory_image="industrialtest_mcl_"..material.."_pickaxe.png", inventory_image="industrialtest_mcl_"..material.."_pickaxe.png",
groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass}, groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={ tool_capabilities={
@ -208,7 +208,7 @@ if industrialtest.mclAvailable then
} }
}) })
minetest.register_tool("industrialtest:"..material.."_shovel",{ minetest.register_tool("industrialtest:"..material.."_shovel",{
description=S(materialDisplayName.." Shovel"), description=S("@1 Shovel", materialDisplayName),
inventory_image="industrialtest_mcl_"..material.."_shovel.png", inventory_image="industrialtest_mcl_"..material.."_shovel.png",
groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass}, groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={ tool_capabilities={
@ -260,7 +260,7 @@ if industrialtest.mclAvailable then
} }
}) })
minetest.register_tool("industrialtest:"..material.."_axe",{ minetest.register_tool("industrialtest:"..material.."_axe",{
description=S(materialDisplayName.." Axe"), description=S("@1 Axe", materialDisplayName),
inventory_image="industrialtest_mcl_"..material.."_axe.png", inventory_image="industrialtest_mcl_"..material.."_axe.png",
groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass}, groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={ tool_capabilities={
@ -277,7 +277,7 @@ if industrialtest.mclAvailable then
} }
}) })
minetest.register_tool("industrialtest:"..material.."_sword",{ minetest.register_tool("industrialtest:"..material.."_sword",{
description=S(materialDisplayName.." Sword"), description=S("@1 Sword", materialDisplayName),
inventory_image="industrialtest_mcl_"..material.."_sword.png", inventory_image="industrialtest_mcl_"..material.."_sword.png",
groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass}, groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={ tool_capabilities={
@ -294,7 +294,7 @@ if industrialtest.mclAvailable then
} }
}) })
minetest.register_tool("industrialtest:"..material.."_hoe",{ minetest.register_tool("industrialtest:"..material.."_hoe",{
description=S(materialDisplayName.." Hoe"), description=S("@1 Hoe", materialDisplayName),
inventory_image="industrialtest_mcl_"..material.."_hoe.png", inventory_image="industrialtest_mcl_"..material.."_hoe.png",
groups={tool=1,hoe=1}, groups={tool=1,hoe=1},
tool_capabilities={ tool_capabilities={
@ -552,7 +552,7 @@ if industrialtest.mclAvailable then
} }
}) })
industrialtest.elementKeys.bronzeIngot="industrialtest:bronze_ingot" industrialtest.elementKeys.bronzeIngot="industrialtest:bronze_ingot"
industrialtest.registerToolset("bronze","bronze_ingot","Bronze",{ industrialtest.registerToolset("bronze","bronze_ingot",S("Bronze"),{
digSpeedClass=4, digSpeedClass=4,
dropLevel=4, dropLevel=4,
speed=6, speed=6,
@ -617,22 +617,22 @@ elseif industrialtest.mtgAvailable then
industrialtest.internal.registerMetal=function(name,displayName,hardness) industrialtest.internal.registerMetal=function(name,displayName,hardness)
minetest.register_craftitem("industrialtest:"..name.."_lump",{ minetest.register_craftitem("industrialtest:"..name.."_lump",{
description=S(displayName.." Lump"), description=S("@1 Lump", displayName),
inventory_image="industrialtest_mtg_"..name.."_lump.png" inventory_image="industrialtest_mtg_"..name.."_lump.png"
}) })
minetest.register_craftitem("industrialtest:"..name.."_ingot",{ minetest.register_craftitem("industrialtest:"..name.."_ingot",{
description=S(displayName.." Ingot"), description=S("@1 Ingot", displayName),
inventory_image="industrialtest_mtg_"..name.."_ingot.png" inventory_image="industrialtest_mtg_"..name.."_ingot.png"
}) })
minetest.register_node("industrialtest:stone_with_"..name,{ minetest.register_node("industrialtest:stone_with_"..name,{
description=S(displayName.." Ore"), description=S("@1 Ore", displayName),
tiles={"default_stone.png^industrialtest_mtg_stone_with_"..name..".png"}, tiles={"default_stone.png^industrialtest_mtg_stone_with_"..name..".png"},
sounds=default.node_sound_stone_defaults(), sounds=default.node_sound_stone_defaults(),
drop="industrialtest:"..name.."_lump", drop="industrialtest:"..name.."_lump",
groups={cracky=hardness}, groups={cracky=hardness},
}) })
minetest.register_node("industrialtest:"..name.."_block",{ minetest.register_node("industrialtest:"..name.."_block",{
description=S("Block of "..displayName), description=S("Block of @1", displayName),
tiles={"industrialtest_"..name.."_block.png"}, tiles={"industrialtest_"..name.."_block.png"},
groups={cracky=hardness,level=2}, groups={cracky=hardness,level=2},
sounds=default.node_sound_metal_defaults(), sounds=default.node_sound_metal_defaults(),