• 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
no edit summary
Line 7: Line 7:  
local ShipsByApiId = require('Module:Collection/ShipsByApiId')
 
local ShipsByApiId = require('Module:Collection/ShipsByApiId')
 
local VitaShipsByApiId = require('Module:Collection/VitaShipsByApiId')
 
local VitaShipsByApiId = require('Module:Collection/VitaShipsByApiId')
 +
local mapNodeTranslations = require('Module:Data/Map/Translation')
    
local NodeInfo = BaseTable({
 
local NodeInfo = BaseTable({
Line 35: Line 36:  
         as = [[|style="text-align:center;background-color:${bg_color};color: ${color}" |${values.as}]],
 
         as = [[|style="text-align:center;background-color:${bg_color};color: ${color}" |${values.as}]],
 
     },
 
     },
     _empty_node_template = [[|style="text-align:center"|${values.node}
+
 
|colspan="3" style="text-align:center" |Must be my imagination (battle avoided)/No enemies sighted<br /><span lang="ja">気のせいだった(戦闘回避)/敵影を見ず。(戦闘なし)</span>]],
+
     _simple_node_template = [[|style="text-align:center"|${node}
     _selection_node_template = [[|style="text-align:center"|${values.node}
+
|colspan="3" style="text-align:center"|${en}<br><span lang="ja">${ja}</span>]],
|colspan="3" style="text-align:center"|You may choose which direction your fleet will go. Admiral, which path will you choose?<br /><span lang="ja">艦隊針路選択可能!/艦隊の針路を選択できます。提督、どちらの針路をとられますか?</span>]],
+
 
 +
     _empty_node_en = 'Must be my imagination./No enemy spotted./Calm seas./Calm straits./Be alert./Peaceful seas.',
 +
    _empty_node_ja = '気のせいだった。/敵影を見ず。/穏やかな海です。/穏やかな海峡です。/警戒が必要です。/静かな海です。',
 +
 
 +
    _select_node_en = 'You can decide the fleet\'s course. Admiral, which heading should we take?',
 +
    _select_node_ja = '艦隊の針路を選択できます。提督、どちらの針路をとられますか?',
 +
 
 
     _resource_node_template = [[|style="text-align:center;background-color:${values.bg_color};color:${values.color}"|${values.node}
 
     _resource_node_template = [[|style="text-align:center;background-color:${values.bg_color};color:${values.color}"|${values.node}
 
|colspan="3" style="text-align:center;background-color:${values.bg_color};color:${values.color}"|${values.text}]],
 
|colspan="3" style="text-align:center;background-color:${values.bg_color};color:${values.color}"|${values.text}]],
 +
 
     _collapser_template = [[<div class="mw-customtoggle-${toggle_id} wikia-menu-button">${button_display}</div>
 
     _collapser_template = [[<div class="mw-customtoggle-${toggle_id} wikia-menu-button">${button_display}</div>
 
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-${toggle_id}">]],
 
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-${toggle_id}">]],
 +
 
     _collapser_end = [[</div>]],
 
     _collapser_end = [[</div>]],
 
     _columns = {
 
     _columns = {
Line 65: Line 74:  
     _boss_battle_color = "red",
 
     _boss_battle_color = "red",
 
     _clear_battle_color = "blue",
 
     _clear_battle_color = "blue",
    --_resource_node_bg_color = "lightgreen",
  −
    _resource_node_bg_color = "initial",
  −
    --_maelstrom_node_bg_color = "pink",
  −
    _maelstrom_node_bg_color = "initial",
   
     _ambush_battle_bg_color = "#FFB74D",
 
     _ambush_battle_bg_color = "#FFB74D",
 
})
 
})
Line 128: Line 133:  
   
 
   
 
function NodeInfo:create_as_string(as, as_complete, oneline)
 
function NodeInfo:create_as_string(as, as_complete, oneline)
    --[=[
  −
    -- Can give weird results when major contributors to air power are unknown
  −
    -- [[Category:Todo]] : use tooltips with explanations instead
  −
      local air_parity = (as_complete or as > 0) and string.format("%.1d", math.ceil((2./3.) * as)) or "??"
  −
      local air_superiority = (as_complete or as > 0) and string.format("%.1d", math.ceil(as * (3 / 2))) or "??"
  −
      local air_supremacy = (as_complete or as > 0) and tostring(as * 3) or "??"
  −
      local air_string = not as_complete and as > 0 and (air_parity .. "+/" .. air_superiority .. "+/" .. air_supremacy .. "+")
  −
        or (air_parity .. "/" .. air_superiority .. "/" .. air_supremacy)
  −
    --]=]
  −
   
     local air_denial_string = "?"
 
     local air_denial_string = "?"
 
     local air_parity_string = "?"
 
     local air_parity_string = "?"
Line 407: Line 402:  
         boss = 'Boss Battle Node',
 
         boss = 'Boss Battle Node',
 
         resource = 'Resource Node',
 
         resource = 'Resource Node',
 +
        landing = 'Landing Node',
 
         storm = 'Maelstrom Node',
 
         storm = 'Maelstrom Node',
 
         empty = 'Empty Node',
 
         empty = 'Empty Node',
 +
        repair = 'Repair Node',
 
         select = 'Selection Node',
 
         select = 'Selection Node',
 
         night = 'Night Battle Node',
 
         night = 'Night Battle Node',
Line 421: Line 418:  
   
 
   
 
function NodeInfo:is_simple_node_type()
 
function NodeInfo:is_simple_node_type()
     return self._node_type == 'resource' or self._node_type == 'storm' or self._node_type == 'empty' or self._node_type == 'select'
+
     return self._node_type == 'resource' or self._node_type == 'storm' or self._node_type == 'empty' or self._node_type == 'select' or self._node_type == 'landing' or self._node_type == 'repair'
 
end
 
end
 
   
 
   
Line 524: Line 521:  
            end
 
            end
 
            table.insert(values, row_values)
 
            table.insert(values, row_values)
 +
            local kind = values[2] == "select" and 2 or self._args.kind
 +
            local nodeText = mapNodeTranslations[kind]
 
            if values[2] == "empty" then
 
            if values[2] == "empty" then
                table.insert(self._rows, format{self._empty_node_template, values = { node = Formatting:japanese_text(values[1]) } })
+
                table.insert(self._rows, format{
 +
                    self._simple_node_template,
 +
                    node = Formatting:japanese_text(values[1]),
 +
                    en = nodeText and nodeText.en or self._empty_node_en,
 +
                    ja = nodeText and nodeText.ja or self._empty_node_ja,
 +
                })
 
            elseif values[2] == "select" then
 
            elseif values[2] == "select" then
                table.insert(self._rows, format{self._selection_node_template, values = { node = Formatting:japanese_text(values[1]) } })
+
                table.insert(self._rows, format{
 +
                    self._simple_node_template,
 +
                    node = Formatting:japanese_text(values[1]),
 +
                    en = nodeText and nodeText.en or self._select_node_en,
 +
                    ja = nodeText and nodeText.ja or self._select_node_ja,
 +
                })
 
             else
 
             else
 
                local resource = Formatting:format_image{values[2] .. ".png", caption = self:upcase(values[2]), size = "22x22px"}
 
                local resource = Formatting:format_image{values[2] .. ".png", caption = self:upcase(values[2]), size = "22x22px"}
cssedit, gkautomate
6,928

edits

Navigation menu