Line 2: |
Line 2: |
| local ShipAsset = require('Module:ShipAsset') | | local ShipAsset = require('Module:ShipAsset') |
| | | |
− | local split = require("Module:StringOperations").split | + | local split = require("Module:Core").split |
| | | |
| local ShipCardKai = ShipAsset{ | | local ShipCardKai = ShipAsset{ |
| _card_size = "218x300px", | | _card_size = "218x300px", |
| + | _card_size_hd = "327x450px", |
| _card_layers = { | | _card_layers = { |
| status_expedition = {image = "Card Status Expedition.png", style = {top = "229px", left = "133px"}}, | | status_expedition = {image = "Card Status Expedition.png", style = {top = "229px", left = "133px"}}, |
Line 19: |
Line 20: |
| | | |
| function ShipCardKai:get_source(ship, args) | | function ShipCardKai:get_source(ship, args) |
− | return args.damaged and ship:card_damaged() or ship:card() | + | return args.damaged and ship:card_damaged(args.hd) or ship:card(args.hd) |
| end | | end |
| | | |
Line 28: |
Line 29: |
| link = args.link | | link = args.link |
| end | | end |
− | local image = Formatting:format_image{args.damaged and ship:card_damaged() or ship:card(), size = args.size or self._card_size, link = link, caption = args.caption} | + | args[1] = self:get_source(ship, args) |
| + | if not args.size then |
| + | args.size = args.hd and self._card_size_hd or self._card_size |
| + | end |
| + | args.link = link |
| + | local image = Formatting:format_image(args) |
| if args.layers or args.grayscale then | | if args.layers or args.grayscale then |
| local stack = self:_create_stack(image, args.grayscale) | | local stack = self:_create_stack(image, args.grayscale) |
Line 34: |
Line 40: |
| for _, layer in ipairs(split(args.layers)) do | | for _, layer in ipairs(split(args.layers)) do |
| if self._card_layers[layer] then | | if self._card_layers[layer] then |
− | self:_add_layer(stack, self._card_layers[layer], ship, args) | + | self:_add_layer(stack, self._card_layers[layer], ship, args, link) |
| end | | end |
| end | | end |