Changes
Add remodel_cost() and remodel_blueprint()
local format = require("Module:StringInterpolation").format
local format = require("Module:StringInterpolation").format
local ResourceIcons = require("Module:ResourceIcons")
local BaseData = require("Module:BaseData")
local BaseData = require("Module:BaseData")
function ShipData:card(raw)
function ShipData:card(raw)
return self:format_image(self._card, raw)
return self:format_image(self._card, nil, raw)
end
end
function ShipData:remodel_level(raw)
function ShipData:remodel_level(raw)
return self:format_level(self._remodel_level, raw)
return self:format_level(self._remodel_level, raw)
end
function ShipData:remodel_cost(raw)
if raw then
return {
ammo = self._remodel_ammo,
steel = self._remodel_steel,
}
else
return mw.ustring.format("%s %d %s %d", self:format_image(ResourceIcons.ammo), self:format_stat(self._remodel_ammo), self:format_image(ResourceIcons.steel), self:format_stat(self._remodel_steel))
end
end
function ShipData:remodel_blueprint(raw)
if raw then
return self._remodel_blueprint
else
return mw.ustring.format("%s %s", self:format_image(ResourceIcons.blueprint, "36px"), self._remodel_blueprint and "✓" or "✗")
end
end
end