• 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
Add devmat remodel cost support
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 119: Line 120:  
| 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">
+
<div class="mw-collapsible-content">${remodel_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 127: Line 128:  
</div>
 
</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>]],
 
}
 
}
   Line 327: Line 330:  
local remodel_level = self._ship:remodel_level()
 
local remodel_level = self._ship:remodel_level()
 
if remodel_level or self._ship:remodel_from() then
 
if remodel_level or self._ship:remodel_from() then
self._vars.build_remodel_info =  Formatting:format_remodel_level_and_cost(remodel_level, self._ship:remodel_cost(), self._ship:remodel_blueprint(), self._ship:remodel_catapult())
+
self._vars.build_remodel_info =  Formatting:format_remodel_level_and_item_cost(remodel_level, self._ship:remodel_cost(), self._ship:remodel_blueprint(), self._ship:remodel_catapult())
 
else
 
else
 
local buildable = self._ship:buildable()
 
local buildable = self._ship:buildable()
Line 344: Line 347:  
self._vars.build_remodel_info =  build_time and Formatting:tooltip(self._unbuildable, Formatting:seconds_to_hms(build_time * 60)) or self._unbuildable
 
self._vars.build_remodel_info =  build_time and Formatting:tooltip(self._unbuildable, Formatting:seconds_to_hms(build_time * 60)) or self._unbuildable
 
end
 
end
 +
end
 +
end
 +
 +
function ShipInfoKai:remodel_cost()
 +
local remodel_cost = self._ship:remodel_cost()
 +
if remodel_cost then
 +
self._vars.remodel_cost = format{self._remodel_cost_template, remodel_cost = Formatting:format_resources(remodel_cost)}
 +
else
 +
self._vars.remodel_cost = ""
 
end
 
end
 
end
 
end
Anonymous user

Navigation menu