• 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 52: Line 52:  
"build_remodel_header",
 
"build_remodel_header",
 
"build_remodel_info",
 
"build_remodel_info",
"remodel_cost",
   
"slots",
 
"slots",
 
"slot_details",
 
"slot_details",
Line 120: Line 119:  
| colspan="6" style="text-align: center; padding: 0px;" | <div class="mw-collapsible mw-collapsed">
 
| colspan="6" style="text-align: center; padding: 0px;" | <div class="mw-collapsible mw-collapsed">
 
<div style="background-color: lightskyblue; text-align: center; margin: 0px;">'''Extra Statistics'''</div>
 
<div style="background-color: lightskyblue; text-align: center; margin: 0px;">'''Extra Statistics'''</div>
<div class="mw-collapsible-content">${remodel_cost}
+
<div class="mw-collapsible-content">${remodel_cost}${reversion_cost}
 
<div style="text-align: center; background-color: lightgrey; margin:2px 0px 2px;">'''Modernization Bonus'''</div>
 
<div style="text-align: center; background-color: lightgrey; margin:2px 0px 2px;">'''Modernization Bonus'''</div>
 
<div style="text-align: center; background-color: whitesmoke; margin:2px 0px 2px;">${modernization}</div>
 
<div style="text-align: center; background-color: whitesmoke; margin:2px 0px 2px;">${modernization}</div>
Line 130: Line 129:  
_remodel_cost_template = [[<div style="text-align: center; background-color: lightgrey; margin:2px 0px 2px;">'''Remodel Cost'''</div>
 
_remodel_cost_template = [[<div style="text-align: center; background-color: lightgrey; margin:2px 0px 2px;">'''Remodel Cost'''</div>
 
<div style="text-align: center; background-color: whitesmoke; margin:2px 0px 2px;">${remodel_cost}</div>]],
 
<div style="text-align: center; background-color: whitesmoke; margin:2px 0px 2px;">${remodel_cost}</div>]],
 +
_reversion_cost_template = [[<div style="text-align: center; background-color: lightgrey; margin:2px 0px 2px;">'''Cost to Revert to ${suffix}'''</div>
 +
<div style="text-align: center; background-color: whitesmoke; margin:2px 0px 2px;">${level_items}<br />${resources}</div>]],
 
}
 
}
   Line 348: Line 349:  
end
 
end
 
end
 
end
end
     −
function ShipInfoKai:remodel_cost()
   
local remodel_cost = self._ship:remodel_cost()
 
local remodel_cost = self._ship:remodel_cost()
 
if remodel_cost then
 
if remodel_cost then
Line 356: Line 355:  
else
 
else
 
self._vars.remodel_cost = ""
 
self._vars.remodel_cost = ""
 +
end
 +
 +
if self._ship.remodel_from == self._ship.remodel_to then
 +
self._vars.reversion_cost = format{self._reversion_cost_template,
 +
suffix = Ship(self._ship:remodel_to():suffix()),
 +
level_items = Formatting:format_remodel_level_and_item_cost(self._ship:remodel_to_level(), self._ship:remodel_to_blueprint(), self._ship:remodel_to_catapult()),
 +
resources = Formatting:format_resources(self._ship:remodel_to_cost())
 +
}
 +
else
 +
self._vars.reversion_cost = ""
 
end
 
end
 
end
 
end
Anonymous user

Navigation menu