diff --git a/vasl_templates/webapp/data/extensions/bfp-bj-v403.json b/vasl_templates/webapp/data/extensions/bfp-bj-v403.json index d313ef0..d8eb6a5 100644 --- a/vasl_templates/webapp/data/extensions/bfp-bj-v403.json +++ b/vasl_templates/webapp/data/extensions/bfp-bj-v403.json @@ -738,7 +738,7 @@ { "name": "Type 89 Heavy Grenade Launcher", "type": "MTR", - "capabilities2": { "WP": [ [5,5] ], "S": [ [6,5] ] }, + "capabilities2": { "WP": [ [5,5] ], "s": [ [6,5] ] }, "comments": [ "HE: Range ≤ 2, ROF 1", "Smoke: [3-10]", "WP: [1-5], ROF 1" ], "note_number": "1", "id": "ina/o:900", diff --git a/vasl_templates/webapp/static/snippets.js b/vasl_templates/webapp/static/snippets.js index bfbb1ca..78998d9 100644 --- a/vasl_templates/webapp/static/snippets.js +++ b/vasl_templates/webapp/static/snippets.js @@ -1426,7 +1426,7 @@ function adjust_capabilities_for_elite( capabilities, delta ) if ( capabilities[i].indexOf( "" ) !== -1 ) continue ; // nb: ignore raw capabilities (e.g. if the scenario date hasn't been set) // NOTE: Elite status doesn't apply to vehicular smoke dispensers (C8.9). - var match = capabilities[i].match( /^(A|M|H|C|D|HE|AP|WP|S)([1-9][0-9]?)/ ) ; + var match = capabilities[i].match( /^(A|M|H|C|D|HE|AP|WP|s)([1-9][0-9]?)/ ) ; if ( match ) capabilities[i] = match[1] + (parseInt(match[2]) + delta) + capabilities[i].substr(match[1].length+match[2].length) ; } diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1940.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1940.txt index 0cc14c0..35e8e91 100644 --- a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1940.txt +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1940.txt @@ -2,7 +2,7 @@ Name Capabilities (effective) # Notes Comments --------------------------------- -------------- ------------- --- ------- ------------------------------------------------------------- -Type 89 Heavy Grenade Launcher S6[5] WP5[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 +Type 89 Heavy Grenade Launcher WP5[5] s6[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 Type 97 Automatic Gun 2 Jp A No Long Range | Animal-Packed Year-11 Flat-Trajectory INF Gun 3 Jp A Crewed | Animal-Packed Type 94 Rapid-Fire Gun 4 Jp A QSU | Horse-Drawn | Animal-Packed diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1941.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1941.txt index 3b5bea8..930dcd8 100644 --- a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1941.txt +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1941.txt @@ -2,7 +2,7 @@ Name Capabilities (effective) # Notes Comments --------------------------------- -------------- ------------- --- ------- ------------------------------------------------------------- -Type 89 Heavy Grenade Launcher S6[5] WP5[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 +Type 89 Heavy Grenade Launcher WP5[5] s6[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 Type 97 Automatic Gun 2 Jp A No Long Range | Animal-Packed Year-11 Flat-Trajectory INF Gun 3 Jp A Crewed | Animal-Packed Type 94 Rapid-Fire Gun 4 Jp A QSU | Horse-Drawn | Animal-Packed diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1942.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1942.txt index 09cd266..e801d05 100644 --- a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1942.txt +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1942.txt @@ -2,7 +2,7 @@ Name Capabilities (effective) # Notes Comments --------------------------------- -------------- ------------- --- ------- ------------------------------------------------------------- -Type 89 Heavy Grenade Launcher S6[5] WP5[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 +Type 89 Heavy Grenade Launcher WP5[5] s6[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 Type 97 Automatic Gun 2 Jp A No Long Range | Animal-Packed Year-11 Flat-Trajectory INF Gun 3 Jp A Crewed | Animal-Packed Type 94 Rapid-Fire Gun 4 Jp A QSU | Horse-Drawn | Animal-Packed diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1943.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1943.txt index b71b436..f11803c 100644 --- a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1943.txt +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1943.txt @@ -2,7 +2,7 @@ Name Capabilities (effective) # Notes Comments --------------------------------- -------------- ------------- --- ------- ------------------------------------------------------------- -Type 89 Heavy Grenade Launcher S6[5] WP5[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 +Type 89 Heavy Grenade Launcher WP5[5] s6[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 Type 97 Automatic Gun 2 Jp A No Long Range | Animal-Packed Year-11 Flat-Trajectory INF Gun 3 Jp A Crewed | Animal-Packed Type 94 Rapid-Fire Gun 4 Jp A QSU | Horse-Drawn | Animal-Packed diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1944.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1944.txt index 39a8fe0..32b95dc 100644 --- a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1944.txt +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1944.txt @@ -2,7 +2,7 @@ Name Capabilities (effective) # Notes Comments --------------------------------- -------------- ------------- --- ------- ------------------------------------------------------------- -Type 89 Heavy Grenade Launcher S6[5] WP5[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 +Type 89 Heavy Grenade Launcher WP5[5] s6[5] 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 Type 97 Automatic Gun 2 Jp A No Long Range | Animal-Packed Year-11 Flat-Trajectory INF Gun 3 Jp A Crewed | Animal-Packed Type 94 Rapid-Fire Gun 4 Jp A QSU | Horse-Drawn | Animal-Packed diff --git a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1945.txt b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1945.txt index 9dce6fd..b3c9023 100644 --- a/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1945.txt +++ b/vasl_templates/webapp/tests/fixtures/vo-reports/ordnance/indonesian/1945.txt @@ -2,7 +2,7 @@ Name Capabilities (effective) # Notes Comments --------------------------------- -------------- ------------- --- ------- ------------------------------------------------------------- -Type 89 Heavy Grenade Launcher S6[5] WP5[5] S6 WP5 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 +Type 89 Heavy Grenade Launcher WP5[5] s6[5] WP5 s6 1 n/a HE: Range ≤ 2, ROF 1 | Smoke: [3-10] | WP: [1-5], ROF 1 Type 97 Automatic Gun 2 Jp A No Long Range | Animal-Packed Year-11 Flat-Trajectory INF Gun 3 Jp A Crewed | Animal-Packed Type 94 Rapid-Fire Gun 4 Jp A QSU | Horse-Drawn | Animal-Packed diff --git a/vasl_templates/webapp/tests/test_capabilities.py b/vasl_templates/webapp/tests/test_capabilities.py index 4fbe8b2..bd85851 100644 --- a/vasl_templates/webapp/tests/test_capabilities.py +++ b/vasl_templates/webapp/tests/test_capabilities.py @@ -878,7 +878,7 @@ def test_elite( webapp, webdriver ): #pylint: disable=too-many-statements caps = [ c.text for c in find_children(".vo-capability",get_sortable_elem()) ] if expected: assert vo_name.endswith( "\u24ba" ) - expected = [ "H9", "s9", "sD7", "CS 5" ] + expected = [ "H9", "s10", "sD7", "CS 5" ] if custom: expected.append( "HE11" ) assert caps == expected @@ -894,7 +894,7 @@ def test_elite( webapp, webdriver ): #pylint: disable=too-many-statements caps = [ c.get_attribute("value") for c in find_children("#vo_capabilities-sortable input[type='text']") ] if expected: assert vo_name.endswith( "\u24ba" ) - expected = [ "H9", "s9", "sD7", "CS 5" ] + expected = [ "H9", "s10", "sD7", "CS 5" ] if custom: expected.append( "HE11" ) assert caps == expected @@ -939,7 +939,7 @@ def test_elite( webapp, webdriver ): #pylint: disable=too-many-statements assert len(saved_scenario["OB_VEHICLES_1"]) == 1 assert saved_scenario["OB_VEHICLES_1"][0]["elite"] assert saved_scenario["OB_VEHICLES_1"][0]["custom_capabilities"] == \ - [ "H9", "s9", "sD7", "CS 5", "HE11" ] + [ "H9", "s10", "sD7", "CS 5", "HE11" ] select_menu_option( "new_scenario" ) load_scenario( saved_scenario ) select_tab( "ob1" ) @@ -978,7 +978,7 @@ def test_elite( webapp, webdriver ): #pylint: disable=too-many-statements saved_scenario = save_scenario() assert len(saved_scenario["OB_VEHICLES_1"]) == 1 assert saved_scenario["OB_VEHICLES_1"][0]["elite"] - assert saved_scenario["OB_VEHICLES_1"][0]["custom_capabilities"] == [ "H9", "s9", "sD7", "CS 5" ] + assert saved_scenario["OB_VEHICLES_1"][0]["custom_capabilities"] == [ "H9", "s10", "sD7", "CS 5" ] select_menu_option( "new_scenario" ) load_scenario( saved_scenario ) select_tab( "ob1" )