Write out list of all area names
This commit is contained in:
parent
dd3a05bbff
commit
8df7a67908
29
mods/tutorial_areas/areas_list.lua
Normal file
29
mods/tutorial_areas/areas_list.lua
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
-- This file is not actually executed, it's just there
|
||||||
|
-- to provide the area names for the translation string collector.
|
||||||
|
-- To update this list, set PRINT_NAMES to true in internal.lua,
|
||||||
|
-- launch the tutorial and copy the list from the Luanti console
|
||||||
|
-- to here
|
||||||
|
local NS = function(s) return s end
|
||||||
|
|
||||||
|
--- LIST OF AREAS ---
|
||||||
|
NS("Start room")
|
||||||
|
NS("Jumping section")
|
||||||
|
NS("Pointing section")
|
||||||
|
NS("Using section")
|
||||||
|
NS("Inventory and Chests section")
|
||||||
|
NS("Comestibles section")
|
||||||
|
NS("Crafting and Tools section")
|
||||||
|
NS("Smelting section")
|
||||||
|
NS("Swimming section")
|
||||||
|
NS("Diving section")
|
||||||
|
NS("Waterfall section")
|
||||||
|
NS("Viscosity section")
|
||||||
|
NS("Health and Damage section")
|
||||||
|
NS("Climbing section")
|
||||||
|
NS("Mining section")
|
||||||
|
NS("Special Blocks section")
|
||||||
|
NS("Tutorial Mine")
|
||||||
|
NS("Building section")
|
||||||
|
NS("Sneaking section")
|
||||||
|
NS("Good-Bye room")
|
||||||
|
--- END OF LIST OF AREAS ---
|
@ -1,3 +1,5 @@
|
|||||||
|
local PRINT_AREAS = true
|
||||||
|
|
||||||
-- Load the areas table from the save file
|
-- Load the areas table from the save file
|
||||||
function areas:load()
|
function areas:load()
|
||||||
local file, err = io.open(minetest.get_modpath("tutorial_areas") .. "/areas.dat", "r")
|
local file, err = io.open(minetest.get_modpath("tutorial_areas") .. "/areas.dat", "r")
|
||||||
@ -9,5 +11,20 @@ function areas:load()
|
|||||||
if type(self.areas) ~= "table" then
|
if type(self.areas) ~= "table" then
|
||||||
self.areas = {}
|
self.areas = {}
|
||||||
end
|
end
|
||||||
|
if PRINT_AREAS then
|
||||||
|
print('--- LIST OF AREAS: ---')
|
||||||
|
for a=1, #self.areas do
|
||||||
|
local area = self.areas[a]
|
||||||
|
if not area.hidden then
|
||||||
|
local name = area.name
|
||||||
|
if not area.name then
|
||||||
|
minetest.log("error", "[tutorial_areas] Area no. "..a.." doesn't have a name!")
|
||||||
|
break
|
||||||
|
end
|
||||||
|
print('NS("'..tostring(name)..'")')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
print('--- END OF LIST OF AREAS ---')
|
||||||
|
end
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user