Changes

no edit summary
Line 10: Line 10:  
! rowspan=2 style="width:30px;" | ⇒
 
! rowspan=2 style="width:30px;" | ⇒
 
! colspan=3 | After Remodel
 
! colspan=3 | After Remodel
! colspan=11 | Required Resources
+
! colspan=12 | Required Resources
 
|-
 
|-
 
! style="width: 50px;" | No.
 
! style="width: 50px;" | No.
Line 29: Line 29:  
! style="width: 30px;" | ${gunmat}
 
! style="width: 30px;" | ${gunmat}
 
! style="width: 30px;" | ${airmat}
 
! style="width: 30px;" | ${airmat}
! style="width: 30px;" | ${armament}]],
+
! style="width: 30px;" | ${armament}
 +
! style="width: 30px;" | ${overseas}]],
 
_header_template_bottom = [[! style="width: 50px;" | No.
 
_header_template_bottom = [[! style="width: 50px;" | No.
 
! style="width: 100px;" | Name
 
! style="width: 100px;" | Name
Line 49: Line 50:  
! style="width: 30px;" | ${airmat}
 
! style="width: 30px;" | ${airmat}
 
! style="width: 30px;" | ${armament}
 
! style="width: 30px;" | ${armament}
 +
! style="width: 30px;" | ${overseas}
 
|-
 
|-
 
! colspan=4 | Before Remodel
 
! colspan=4 | Before Remodel
 
! colspan=3 | After Remodel
 
! colspan=3 | After Remodel
! colspan=11 | Required Resources]],
+
! colspan=12 | Required Resources]],
 
_columns = {
 
_columns = {
 
"id",
 
"id",
Line 73: Line 75:  
"airmat",
 
"airmat",
 
"armament",
 
"armament",
 +
"overseas",
 
},
 
},
 
_empty_cell = [[| style="text-align: center; vertical-align: middle;" | -]],
 
_empty_cell = [[| style="text-align: center; vertical-align: middle;" | -]],
Line 103: Line 106:  
function ShipRemodelListKai:remodel_level(ship)
 
function ShipRemodelListKai:remodel_level(ship)
 
self._remodel_to = ship:remodel_to()
 
self._remodel_to = ship:remodel_to()
 +
self._remodel_is_reversion = false
 
local remodel_level = false
 
local remodel_level = false
 
if self._remodel_to then
 
if self._remodel_to then
if self._remodel_to == ship:remodel_from() then
+
if self._remodel_to == ship:remodel_from() or ship:remodel_from() and self._remodel_to == Ship(ship:remodel_from()):remodel_from() then
 
self._remodel_is_reversion = true
 
self._remodel_is_reversion = true
 
else
 
else
Line 160: Line 164:  
airmat = "new_model_aerial_armament_material_item",
 
airmat = "new_model_aerial_armament_material_item",
 
armament = "new_model_armament_material_item",
 
armament = "new_model_armament_material_item",
 +
overseas = "latest_overseas_warship_technology_item",
 
}
 
}
 
value = special_items[item] and Formatting:format_item_requirement(special_items[item], value, true) or value
 
value = special_items[item] and Formatting:format_item_requirement(special_items[item], value, true) or value
Line 215: Line 220:  
function ShipRemodelListKai:armament(ship)
 
function ShipRemodelListKai:armament(ship)
 
return self:remodel_item(ship, 'armament')
 
return self:remodel_item(ship, 'armament')
 +
end
 +
 +
function ShipRemodelListKai:overseas(ship)
 +
return self:remodel_item(ship, 'overseas')
 
end
 
end
   Line 234: Line 243:  
airmat = ResourceIcons.new_model_aerial_armament_material,
 
airmat = ResourceIcons.new_model_aerial_armament_material,
 
armament = ResourceIcons.new_model_armament_material,
 
armament = ResourceIcons.new_model_armament_material,
 +
overseas = ResourceIcons.latest_overseas_warship_technology,
 
}
 
}
 
for key, value in pairs(header_icons) do
 
for key, value in pairs(header_icons) do
Line 241: Line 251:  
self._header = format(self._header_template, header_icons)
 
self._header = format(self._header_template, header_icons)
 
self._header_bottom = format(self._header_template_bottom, header_icons)
 
self._header_bottom = format(self._header_template_bottom, header_icons)
 +
end
 +
 +
function ShipRemodelListKai:test()
 +
mw.log(ShipRemodelListKai:Table({iterator = 'shipsByType', type = '6', sort = '_class', listBase = 'true'}))
 
end
 
end
    
return ShipRemodelListKai
 
return ShipRemodelListKai
cssedit, gkautomate
7,076

edits