• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
Support remodel pairs
Line 10: Line 10:  
! rowspan=2 style="width:30px;" | ⇒
 
! rowspan=2 style="width:30px;" | ⇒
 
! colspan=3 | After Remodel
 
! colspan=3 | After Remodel
! colspan=2 | Required Resources
+
! colspan=3 | Required Resources
 
|-
 
|-
 
! style="width: 50px;" | No.
 
! style="width: 50px;" | No.
Line 22: Line 22:  
! style="width: 30px;" | Type
 
! style="width: 30px;" | Type
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: darkgoldenrod;" | ${ammo}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: darkgoldenrod;" | ${ammo}
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightgrey;" | ${steel}]],
+
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightgrey;" | ${steel}
 +
! style="width: 30px;" | ${devmat}]],
 
_header_template_bottom = [[! style="width: 50px;" | No.
 
_header_template_bottom = [[! style="width: 50px;" | No.
 
! style="width: 100px;" | Name
 
! style="width: 100px;" | Name
Line 35: Line 36:  
! style="width: 30px; text-align: center; vertical-align: middle; background-color: darkgoldenrod;" | ${ammo}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: darkgoldenrod;" | ${ammo}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightgrey;" | ${steel}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightgrey;" | ${steel}
 +
! style="width: 30px;" | ${devmat}
 
|-
 
|-
 
! colspan=6 | Before Remodel
 
! colspan=6 | Before Remodel
 
! colspan=3 | After Remodel
 
! colspan=3 | After Remodel
! colspan=2 | Required Resources]],
+
! colspan=3 | Required Resources]],
 
_columns = {
 
_columns = {
 
"id",
 
"id",
Line 52: Line 54:  
"ammo",
 
"ammo",
 
"steel",
 
"steel",
 +
"devmat",
 
},
 
},
 
_empty_cell = [[| style="text-align: center; vertical-align: middle;" | -]],
 
_empty_cell = [[| style="text-align: center; vertical-align: middle;" | -]],
Line 84: Line 87:  
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
 +
self._remodel_is_reversion = true
 +
else
 +
self._remodel_is_reversion = false
 +
end
 
self._remodel_to = Ship(self._remodel_to)
 
self._remodel_to = Ship(self._remodel_to)
remodel_level = self._remodel_to:remodel_level()
+
if self._remodel_is_reversion then
 +
remodel_level = ship:remodel_to_level()
 +
else
 +
remodel_level = self._remodel_to:remodel_level()
 +
end
 
end
 
end
 
return {values = {value = remodel_level == false and self._dash or Formatting:format_stat(remodel_level)}, bg_color = self._transparent, text_align = self._center_align}
 
return {values = {value = remodel_level == false and self._dash or Formatting:format_stat(remodel_level)}, bg_color = self._transparent, text_align = self._center_align}
 
end
 
end
   −
function ShipRemodelListKai:remodel_blueprint()
+
function ShipRemodelListKai:remodel_blueprint(ship)
 
local value = self._dash
 
local value = self._dash
 
if self._remodel_to then
 
if self._remodel_to then
value = Formatting:format_blueprint_requirement(self._remodel_to:remodel_blueprint(), true)
+
if self._remodel_is_reversion then
 +
value = Formatting:format_blueprint_requirement(ship:remodel_to_blueprint(), true)
 +
else
 +
value = Formatting:format_blueprint_requirement(self._remodel_to:remodel_blueprint(), true)
 +
end
 
elseif self._remodel_to == nil then
 
elseif self._remodel_to == nil then
 
value = self._question_marks
 
value = self._question_marks
Line 100: Line 116:  
end
 
end
   −
function ShipRemodelListKai:remodel_catapult()
+
function ShipRemodelListKai:remodel_catapult(ship)
 
local value = self._dash
 
local value = self._dash
 
if self._remodel_to then
 
if self._remodel_to then
value = Formatting:format_catapult_requirement(self._remodel_to:remodel_catapult(), true)
+
if self._remodel_is_reversion then
 +
value = Formatting:format_catapult_requirement(ship:remodel_to_catapult(), true)
 +
else
 +
value = Formatting:format_catapult_requirement(self._remodel_to:remodel_catapult(), true)
 +
end
 
elseif self._remodel_to == nil then
 
elseif self._remodel_to == nil then
 
value = self._question_marks
 
value = self._question_marks
Line 142: Line 162:  
end
 
end
   −
function ShipRemodelListKai:ammo()
+
function ShipRemodelListKai:ammo(ship)
 
local ammo = self._remodel_to == nil and self._question_marks or self._dash
 
local ammo = self._remodel_to == nil and self._question_marks or self._dash
 
if self._remodel_to then
 
if self._remodel_to then
ammo = self._remodel_to:remodel_cost().ammo
+
if self._remodel_is_reversion then
 +
ammo = ship:remodel_to_cost().ammo
 +
else
 +
ammo = self._remodel_to:remodel_cost().ammo
 +
end
 
end
 
end
 
return {values = {value = ammo}, bg_color = self._transparent, text_align = self._center_align}
 
return {values = {value = ammo}, bg_color = self._transparent, text_align = self._center_align}
 
end
 
end
   −
function ShipRemodelListKai:steel()
+
function ShipRemodelListKai:steel(ship)
 
local steel = self._remodel_to == nil and self._question_marks or self._dash
 
local steel = self._remodel_to == nil and self._question_marks or self._dash
 
if self._remodel_to then
 
if self._remodel_to then
steel = self._remodel_to:remodel_cost().steel
+
if self._remodel_is_reversion then
 +
steel = ship:remodel_to_cost().steel
 +
else
 +
steel = self._remodel_to:remodel_cost().steel
 +
end
 
end
 
end
 
return {values = {value = steel}, bg_color = self._transparent, text_align = self._center_align}
 
return {values = {value = steel}, bg_color = self._transparent, text_align = self._center_align}
 +
end
 +
 +
function ShipRemodelListKai:devmat(ship)
 +
local devmat = self._remodel_to == nil and self._question_marks or self._dash
 +
if self._remodel_to then
 +
if self._remodel_is_reversion then
 +
devmat = ship:remodel_to_cost().devmat
 +
else
 +
devmat = self._remodel_to:remodel_cost().devmat
 +
end
 +
end
 +
return {values = {value = devmat}, bg_color = self._transparent, text_align = self._center_align}
 
end
 
end
   Line 168: Line 208:  
ammo = ResourceIcons.ammo,
 
ammo = ResourceIcons.ammo,
 
steel = ResourceIcons.steel,
 
steel = ResourceIcons.steel,
 +
devmat = ResourceIcons.devmat,
 
}
 
}
 
for key, value in pairs(header_icons) do
 
for key, value in pairs(header_icons) do
Anonymous user

Navigation menu