Add intllib + doc_items support
This commit is contained in:
parent
53a8a26803
commit
6226a44241
@ -1 +1,3 @@
|
||||
intllib?
|
||||
mesecons_mvps?
|
||||
doc_items?
|
||||
|
12
init.lua
12
init.lua
@ -1,3 +1,11 @@
|
||||
local S
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function ( s ) return s end
|
||||
end
|
||||
|
||||
local bedrock = {}
|
||||
|
||||
bedrock.layer = -30912 -- determined as appropriate by experiment
|
||||
@ -30,7 +38,7 @@ minetest.register_on_generated(function(minp, maxp)
|
||||
end)
|
||||
|
||||
minetest.register_node("bedrock2:bedrock", {
|
||||
description = "Bedrock",
|
||||
description = S("Bedrock"),
|
||||
tiles = {"bedrock2_bedrock.png"},
|
||||
groups = {immortal=1, not_in_creative_inventory=1, in_doc = 1 },
|
||||
sounds = { footstep = { name = "bedrock2_step", gain = 1 } },
|
||||
@ -47,5 +55,5 @@ if minetest.get_modpath("mesecons_mvps") ~= nil then
|
||||
end
|
||||
|
||||
if minetest.get_modpath("doc_items") ~= nil then
|
||||
doc.sub.items.set_items_longdesc({["bedrock2:bedrock"] = "Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer."})
|
||||
doc.sub.items.set_items_longdesc({["bedrock2:bedrock"] = S("Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer.")})
|
||||
end
|
||||
|
2
locale/de.txt
Normal file
2
locale/de.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Bedrock = Grundgestein
|
||||
Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer. = Grundgestein ist sehr hart. Es kann nicht gegraben, verändert, zerstört oder bewegt werden. Es taucht am Boden der Welt in einer flachen Ebene auf.
|
2
locale/template.txt
Normal file
2
locale/template.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Bedrock
|
||||
Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer.
|
Loading…
x
Reference in New Issue
Block a user