Changes

m
no edit summary
Line 12: Line 12:  
     _header_template = nil,
 
     _header_template = nil,
 
     _calculated_cell_template = [[| colspan="6" style="background: whitesmoke; text-align: center;" |Effective Line of Sight: ${elos} // Fighter Power: ${fighter_power}]],
 
     _calculated_cell_template = [[| colspan="6" style="background: whitesmoke; text-align: center;" |Effective Line of Sight: ${elos} // Fighter Power: ${fighter_power}]],
 +
    _route_cell_template = [[| colspan="6" style="background: whitesmoke; text-align: center;" |Route Taken: ${route_taken}]],
 
     _column_cell_templates = {
 
     _column_cell_templates = {
 
         ship = [[| rowspan="4" style="background: transparent;" |${values.ship_card}]],
 
         ship = [[| rowspan="4" style="background: transparent;" |${values.ship_card}]],
Line 30: Line 31:  
     _elos = 0,
 
     _elos = 0,
 
     _fighter_power = 0,
 
     _fighter_power = 0,
     _hq_lvl = 0
+
     _hq_lvl = 0,
 +
    _route_taken = ""
 
})
 
})
   Line 98: Line 100:  
         elseif item_key == "!-" then
 
         elseif item_key == "!-" then
 
             item = "locked"
 
             item = "locked"
         elseif mw.ustring.find(item_key, '!') then
+
         elseif mw.ustring.find(item_key, '!hq') then
 
             item = false
 
             item = false
 
              
 
              
Line 106: Line 108:  
             --Get bracket of 5
 
             --Get bracket of 5
 
             self._hq_lvl = self._hq_lvl - (self._hq_lvl % 5)
 
             self._hq_lvl = self._hq_lvl - (self._hq_lvl % 5)
 +
        elseif mw.ustring.find(item_key, '!route') then
 +
            local split = mw.ustring.find(item_key, '=')
 +
            self._route_taken = mw.ustring.sub(item_key, split + 1)
 
         else
 
         else
 
             if mw.ustring.find(item_key, '/') then
 
             if mw.ustring.find(item_key, '/') then
Line 224: Line 229:  
                 elos = self._elos - (self._hq_lvl * 0.61),
 
                 elos = self._elos - (self._hq_lvl * 0.61),
 
                 fighter_power = self._fighter_power
 
                 fighter_power = self._fighter_power
 +
            })
 +
            table.insert(self._rows, self._row_starter)
 +
            table.insert(self._rows, format{self._route_cell_template,
 +
                route_taken = self._route_taken
 
             })
 
             })
 
end
 
end
48

edits