mirror of
https://git.0x7be.net/dirk/uniham.git
synced 2024-11-21 23:03:54 +01:00
add translations and fix loading mod support
This commit is contained in:
parent
9186bb8de5
commit
1e9baa2fc2
4
init.lua
4
init.lua
@ -1,7 +1,9 @@
|
|||||||
-- Init
|
-- Init
|
||||||
uniham = {}
|
uniham = {}
|
||||||
uniham.modpath = minetest.get_modpath(minetest.get_current_modname())
|
uniham.modname = minetest.get_current_modname()
|
||||||
|
uniham.modpath = minetest.get_modpath(uniham.modname)
|
||||||
uniham.syspath = uniham.modpath..DIR_DELIM..'system'
|
uniham.syspath = uniham.modpath..DIR_DELIM..'system'
|
||||||
|
uniham.translator = minetest.get_translator(uniham.modname)
|
||||||
|
|
||||||
|
|
||||||
-- Load mod
|
-- Load mod
|
||||||
|
15
locale/uniham.de.tr
Normal file
15
locale/uniham.de.tr
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# textdomain: uniham
|
||||||
|
|
||||||
|
# default
|
||||||
|
Bronze Hammer=Bronzener Hammer
|
||||||
|
Diamond Hammer=Diamantener Hammer
|
||||||
|
Golden Hammer=Goldener Hammer
|
||||||
|
Mese Hammer=Mese-Hammer
|
||||||
|
Obsidian Hammer=Obsidian-Hammer
|
||||||
|
Steel Hammer=Stählerner Hammer
|
||||||
|
Stone Hammer=Steinerner Hammer
|
||||||
|
Wooden Hammer=Hölzerner Hammer
|
||||||
|
|
||||||
|
# moreores
|
||||||
|
Mithril Hammer=Mithril-Hammer
|
||||||
|
Silver Hammer=Silberner Hammer
|
@ -1,58 +1,59 @@
|
|||||||
-- Localize
|
-- Localize
|
||||||
local register_hammer = uniham.register_hammer
|
local register_hammer = uniham.register_hammer
|
||||||
|
local S = uniham.translator
|
||||||
|
|
||||||
|
|
||||||
register_hammer('hammer_bronze', {
|
register_hammer('hammer_bronze', {
|
||||||
name = 'Bronze Hammer',
|
name = S('Bronze Hammer'),
|
||||||
head = 'default_bronze_block.png',
|
head = 'default_bronze_block.png',
|
||||||
craft = 'default:bronze_ingot',
|
craft = 'default:bronze_ingot',
|
||||||
uses = 150
|
uses = 150
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_diamond', {
|
register_hammer('hammer_diamond', {
|
||||||
name = 'Diamond Hammer',
|
name = S('Diamond Hammer'),
|
||||||
head = 'default_diamond_block.png',
|
head = 'default_diamond_block.png',
|
||||||
craft = 'default:diamond',
|
craft = 'default:diamond',
|
||||||
uses = 300
|
uses = 300
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_gold', {
|
register_hammer('hammer_gold', {
|
||||||
name = 'Golden Hammer',
|
name = S('Golden Hammer'),
|
||||||
head = 'default_gold_block.png',
|
head = 'default_gold_block.png',
|
||||||
craft = 'default:gold_ingot',
|
craft = 'default:gold_ingot',
|
||||||
uses = 100
|
uses = 100
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_mese', {
|
register_hammer('hammer_mese', {
|
||||||
name = 'Mese Hammer',
|
name = S('Mese Hammer'),
|
||||||
head = 'default_mese_block.png',
|
head = 'default_mese_block.png',
|
||||||
craft = 'default:mese_crystal',
|
craft = 'default:mese_crystal',
|
||||||
uses = 350
|
uses = 350
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_obsidian', {
|
register_hammer('hammer_obsidian', {
|
||||||
name = 'Obsidian Hammer',
|
name = S('Obsidian Hammer'),
|
||||||
head = 'default_obsidian_block.png',
|
head = 'default_obsidian_block.png',
|
||||||
craft = 'default:obsidian_shard',
|
craft = 'default:obsidian_shard',
|
||||||
uses = 400
|
uses = 400
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_steel', {
|
register_hammer('hammer_steel', {
|
||||||
name = 'Steel Hammer',
|
name = S('Steel Hammer'),
|
||||||
head = 'default_steel_block.png',
|
head = 'default_steel_block.png',
|
||||||
craft = 'default:steel_ingot',
|
craft = 'default:steel_ingot',
|
||||||
uses = 200
|
uses = 200
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_stone', {
|
register_hammer('hammer_stone', {
|
||||||
name = 'Stone Hammer',
|
name = S('Stone Hammer'),
|
||||||
head = 'default_stone.png',
|
head = 'default_stone.png',
|
||||||
craft = 'default:cobble',
|
craft = 'default:cobble',
|
||||||
uses = 70
|
uses = 70
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_wood', {
|
register_hammer('hammer_wood', {
|
||||||
name = 'Wooden Hammer',
|
name = S('Wooden Hammer'),
|
||||||
head = 'default_wood.png',
|
head = 'default_wood.png',
|
||||||
craft = 'default:wood',
|
craft = 'default:wood',
|
||||||
uses = 30
|
uses = 30
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
-- Localize
|
-- Localize
|
||||||
local register_hammer = uniham.register_hammer
|
local register_hammer = uniham.register_hammer
|
||||||
|
local S = uniham.translator
|
||||||
|
|
||||||
|
|
||||||
register_hammer('hammer_mithril', {
|
register_hammer('hammer_mithril', {
|
||||||
name = 'Mithril Hammer',
|
name = S('Mithril Hammer'),
|
||||||
head = 'moreores_mithril_block.png',
|
head = 'moreores_mithril_block.png',
|
||||||
craft = 'moreores:mithril_ingot',
|
craft = 'moreores:mithril_ingot',
|
||||||
uses = 450
|
uses = 450
|
||||||
})
|
})
|
||||||
|
|
||||||
register_hammer('hammer_silver', {
|
register_hammer('hammer_silver', {
|
||||||
name = 'Silver Hammer',
|
name = S('Silver Hammer'),
|
||||||
head = 'moreores_silver_block.png',
|
head = 'moreores_silver_block.png',
|
||||||
craft = 'moreores:silver_ingot',
|
craft = 'moreores:silver_ingot',
|
||||||
uses = 250
|
uses = 250
|
||||||
|
@ -28,7 +28,7 @@ local depends = config:get('depends')..', '..config:get('optional_depends')
|
|||||||
|
|
||||||
for modname in depends:gmatch('[0-9a-z_-]+') do
|
for modname in depends:gmatch('[0-9a-z_-]+') do
|
||||||
local registry_file = registry..DIR_DELIM..modname..'.lua'
|
local registry_file = registry..DIR_DELIM..modname..'.lua'
|
||||||
if file_exists(registry_file) then
|
if file_exists(registry_file) and minetest.get_modpath(modname) then
|
||||||
dofile(registry_file)
|
dofile(registry_file)
|
||||||
local message = 'Loaded built-in '..modname..' support'
|
local message = 'Loaded built-in '..modname..' support'
|
||||||
minetest.log('action', log_prefix..message)
|
minetest.log('action', log_prefix..message)
|
||||||
|
Loading…
Reference in New Issue
Block a user