Changes

no edit summary
Line 168: Line 168:  
end
 
end
 
else
 
else
remodel_from = Ship(self:process_item_key(remodel_from))
+
remodel_from = Ship(remodel_from)
 
table.insert(build_info, self._remodel_from_label .. format{self._remodel_template, link = Formatting:format_link(remodel_from:link()), level = ship:remodel_level()})
 
table.insert(build_info, self._remodel_from_label .. format{self._remodel_template, link = Formatting:format_link(remodel_from:link()), level = ship:remodel_level()})
 
end
 
end
Line 174: Line 174:  
local remodel_to = ship:remodel_to()
 
local remodel_to = ship:remodel_to()
 
if remodel_to then
 
if remodel_to then
remodel_to = Ship(self:process_item_key(remodel_to))
+
remodel_to = Ship(remodel_to)
 
table.insert(build_info, self._remodel_to_label .. format{self._remodel_template, link = Formatting:format_link(remodel_to:link()), level = remodel_to:remodel_level()})
 
table.insert(build_info, self._remodel_to_label .. format{self._remodel_template, link = Formatting:format_link(remodel_to:link()), level = remodel_to:remodel_level()})
 
end
 
end
Line 188: Line 188:  
end
 
end
   −
function ShipListKai:process_item_key(item_key)
+
ShipListKai.process_item_key = Ship.process_item_key
local split = mw.ustring.find(item_key, '/')
  −
local ship_base_name, ship_suffix
  −
if split == nil then
  −
ship_base_name = item_key
  −
else
  −
ship_base_name = mw.ustring.sub(item_key, 1, split - 1)
  −
ship_suffix = mw.ustring.sub(item_key, split + 1, -1)
  −
end
  −
return ship_base_name, ship_suffix
  −
end
      
function BaseTable:build_rows()
 
function BaseTable:build_rows()
Anonymous user