Line 34: |
Line 34: |
| local success = 0 | | local success = 0 |
| for k, v in pairs(remodelSuffix) do | | for k, v in pairs(remodelSuffix) do |
− | if success == 0 then | + | if success == 0 and v ~= nil and v ~= "" then |
| name,success = name:gsub("." .. v, "/" .. v) | | name,success = name:gsub("." .. v, "/" .. v) |
| end | | end |
− | end
| |
− | if success == 0 then
| |
− | name,success = name:gsub(".Kai", "/Kai")
| |
| end | | end |
| result = result .. string.format(template.item, name) | | result = result .. string.format(template.item, name) |
Line 114: |
Line 111: |
| frame.args = {} | | frame.args = {} |
| frame.args['shipClass'] = "Destroyer" | | frame.args['shipClass'] = "Destroyer" |
− | frame.args['remodelSuffix'] = "B Kai, D Kai, Mk.II, Zwei" | + | frame.args['remodelSuffix'] = "B Kai,D Kai,Mk.II,Zwei,Kai" |
| frame.args['notes'] = "Mikazuki/Kai_notes = Can equip [[Daihatsu Landing Craft|Daihatsu]],\nMutsuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]],\nKisaragi/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]],\nSatsuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]] & [[Special Type 2 Amphibious Landing Craft|Type 2 Landing Craft]],\nFumizuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]] & [[Special Type 2 Amphibious Landing Craft|Type 2 Landing Craft]]" | | frame.args['notes'] = "Mikazuki/Kai_notes = Can equip [[Daihatsu Landing Craft|Daihatsu]],\nMutsuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]],\nKisaragi/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]],\nSatsuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]] & [[Special Type 2 Amphibious Landing Craft|Type 2 Landing Craft]],\nFumizuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]] & [[Special Type 2 Amphibious Landing Craft|Type 2 Landing Craft]]" |
| frame.args['coloring'] = "remodel_level_good = 20,\nremodel_level_outstanding = 15,\nremodel_level_operator = <,\nfirepower_good = 56,\nfirepower_outstanding = 61,\ntorpedo_good = 83,\ntorpedo_outstanding = 89,\nnight_battle = true,\nnight_battle_good = 140,\nnight_battle_outstanding = 150,\nreference_type = 2" | | frame.args['coloring'] = "remodel_level_good = 20,\nremodel_level_outstanding = 15,\nremodel_level_operator = <,\nfirepower_good = 56,\nfirepower_outstanding = 61,\ntorpedo_good = 83,\ntorpedo_outstanding = 89,\nnight_battle = true,\nnight_battle_good = 140,\nnight_battle_outstanding = 150,\nreference_type = 2" |
Line 120: |
Line 117: |
| end | | end |
| | | |
− | --return { render = render, test = test } | + | --return { render = render, test = test } --swap comments to test |
| return ListOfSortable | | return ListOfSortable |
| | | |
| -- TEST: p.test() | | -- TEST: p.test() |