Changes

no edit summary
Line 7: Line 7:  
local EquipmentLink = require('Module:EquipmentLink')
 
local EquipmentLink = require('Module:EquipmentLink')
 
local format = require('Module:Utils').format
 
local format = require('Module:Utils').format
 +
local CalcAsset = require('Module:Calc/Plugins/Assets')
    
local t = require('Module:I18N').t
 
local t = require('Module:I18N').t
Line 61: Line 62:  
"gun_fit_properties",
 
"gun_fit_properties",
 
"improvement",
 
"improvement",
 +
"asset_key",
 
},
 
},
 
_slot_template = [[|- align=center style="background-color: whitesmoke; line-height: 1.1;"
 
_slot_template = [[|- align=center style="background-color: whitesmoke; line-height: 1.1;"
Line 67: Line 69:  
| style="width: 50px;" | ${slot_size}
 
| style="width: 50px;" | ${slot_size}
 
]],
 
]],
_template = [[{|class="${table_class}" id="${table_id}" style="width: 320px; float: ${float};"
+
_template = [[{|class="${table_class}" id="${table_id}" style="width: 320px; float: ${float};" data-asset-key="${asset_key}"
 
|-
 
|-
 
| colspan="6" class="infobox-kai-header-major" style="position: relative; text-align: center; background-color: ${top_bg_color};${top_extra_style}" title="${rarity}" | <div style="position: absolute; right: 5px;">${edit_link}</div>
 
| colspan="6" class="infobox-kai-header-major" style="position: relative; text-align: center; background-color: ${top_bg_color};${top_extra_style}" title="${rarity}" | <div style="position: absolute; right: 5px;">${edit_link}</div>
Line 161: Line 163:  
function ShipInfoKai:edit_link()
 
function ShipInfoKai:edit_link()
 
self._vars.edit_link = Formatting:format_edit_link(self._ship_data_module, self._edit_link_text, self._ship_data_documentation)
 
self._vars.edit_link = Formatting:format_edit_link(self._ship_data_module, self._edit_link_text, self._ship_data_documentation)
 +
end
 +
 +
function ShipInfoKai:asset_key()
 +
self._vars.asset_key = CalcAsset.card(self._ship)
 
end
 
end
  
cssedit, gkautomate
7,064

edits