1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-30 04:30:58 +02:00

updates to locale_builder

This commit is contained in:
grilledham 2019-06-04 19:06:05 +01:00
parent 63549e00f8
commit b6079f6288

View File

@ -55,7 +55,7 @@ local function localise(item)
end
function add(self, item)
if not item then
if item == nil then
item = self
self = nil
end
@ -68,9 +68,13 @@ function add(self, item)
local tail = self.tail
if not tail then
tail = {'', self}
self = new(tail)
set_tail(self, tail)
if self[1] == '' then
tail = self
else
tail = {'', self}
self = new(tail)
set_tail(self, tail)
end
end
local count = #tail
@ -87,6 +91,10 @@ end
Public.add = add
function Public.__call(_, item)
if item == nil then
item = {''}
end
return add(nil, item)
end
setmetatable(Public, Public)