Модуль:Entity Lookup: различия между версиями

Нет описания правки
Нет описания правки
 
Строка 10: Строка 10:
p.entities = safeLoad("entity prototypes.json")
p.entities = safeLoad("entity prototypes.json")
p.name_overrides = safeLoad("entity name overrides.json")
p.name_overrides = safeLoad("entity name overrides.json")
local function lower(value)
return mw.ustring.lower(value)
end


local function buildName(entity, useSuffix)
local function buildName(entity, useSuffix)
local name = entity.name or ""
local name = entity.name or ""
local label = lower(entity.label or "")
local label = mw.ustring.lower(entity.label or "")
local suffix = lower(entity.suffix or "")
local suffix = mw.ustring.lower(entity.suffix or "")


if useSuffix and suffix ~= "" then
if useSuffix and suffix ~= "" then