Raise the configurable roadblock limit to 30

Align runtime validation, settings import, admin UI, help and documentation. Update boundary regression coverage; keep the default at four.
This commit is contained in:
2026-10-13 22:52:54 +02:00
parent 6a667d8deb
commit bf85f62dca
6 changed files with 6 additions and 6 deletions
@@ -178,7 +178,7 @@ class ERR_AdminService
if (key == "objectGuardHQMode") return "0: all hold their posts; 1: half hold, half respond to HQ; 2: all may respond to HQ. All report contacts. Next round.";
if (key == "objectGuardCount") return "0..16 soldiers per factory/industrial, military or infrastructure site; default 8, zero off. Next round. HQ participation is configured separately; all report. Towers and chimneys use suitable platforms. Lost guards are not replaced.";
if (key == "hunterSpawnDistanceMetres") return "Opening UAZ and troop-truck patrol placement. Applies next round.";
if (key == "roadblockCount") return "Set 0..12 roadblocks (default 4; 0 disables). Applies next round. Each has four guards; unsuitable sites are skipped.";
if (key == "roadblockCount") return "Set 0..30 roadblocks (default 4; 0 disables). Applies next round. Each has four guards; unsuitable sites are skipped.";
if (key == "civilianTrafficCount") return "Set 0..6 civilian cars (default 3). Zero disables new traffic. Unclaimed cars retire only far from all players and out of sight; player-entered cars are preserved.";
if (key == "keepWeaponOnUnconscious") return "Set 1 to retain the held firearm during unconsciousness and equip it after recovery; 0 keeps normal dropping. Applies to the next knockout.";
if (key == "antiAirChancePercent" || key == "antiPersonnelMineChancePercent")
@@ -28,7 +28,7 @@ class ERR_Settings
if (key == "objectGuardHQMode") return value >= 0 && value <= 2;
if (key == "objectGuardCount") return value >= 0 && value <= 16;
if (key == "hunterSpawnDistanceMetres") return value >= 800 && value <= 3000;
if (key == "roadblockCount") return value >= 0 && value <= 12;
if (key == "roadblockCount") return value >= 0 && value <= 30;
if (key == "civilianTrafficCount") return value >= 0 && value <= 6;
if (key == "startMode") return value == 0 || value == 1;
if (key == "keepWeaponOnUnconscious") return value == 0 || value == 1;
+1 -1
View File
@@ -100,7 +100,7 @@ TextWidgetClass {
Color 0.72 0.81 0.87 1 Text "0 disables convoys. Lost convoys stay lost. Next round." "Font Size" 14 "Min Font Size" 14 Wrap 1
FontProperties FontProperties { Font "{3E7733BAC8C831F6}UI/Fonts/RobotoCondensed/RobotoCondensed_Regular.fnt" }
}
TextWidgetClass { Name "Label_roadblockCount" Slot FrameWidgetSlot { Anchor 0 0 0 0 PositionX 508 OffsetLeft 508 PositionY 66 OffsetTop 66 SizeX 456 OffsetRight -964 SizeY 26 OffsetBottom -92 } Color 0.9 0.92 0.94 1 Text "Roadblocks (0-12; 0 off)" "Font Size" 20 "Min Font Size" 20 Wrap 1 FontProperties FontProperties { Font "{3E7733BAC8C831F6}UI/Fonts/RobotoCondensed/RobotoCondensed_Regular.fnt" } }
TextWidgetClass { Name "Label_roadblockCount" Slot FrameWidgetSlot { Anchor 0 0 0 0 PositionX 508 OffsetLeft 508 PositionY 66 OffsetTop 66 SizeX 456 OffsetRight -964 SizeY 26 OffsetBottom -92 } Color 0.9 0.92 0.94 1 Text "Roadblocks (0-30; 0 off)" "Font Size" 20 "Min Font Size" 20 Wrap 1 FontProperties FontProperties { Font "{3E7733BAC8C831F6}UI/Fonts/RobotoCondensed/RobotoCondensed_Regular.fnt" } }
ButtonWidgetClass : "{DA43C77A0D1E59F8}UI/layouts/ERR/AdminValue.layout" { Name "roadblockCount" Slot FrameWidgetSlot { Anchor 0 0 0 0 PositionX 508 OffsetLeft 508 PositionY 96 OffsetTop 96 SizeX 130 OffsetRight -638 SizeY 38 OffsetBottom -134 } components { SCR_EditBoxComponent "{547290FFBD5B33E9}" { m_sLabel "" } } }
ButtonWidgetClass : "{75C912A1C89BE6C2}UI/layouts/WidgetLibrary/Buttons/WLib_ButtonText.layout" { Name "Apply_roadblockCount" Slot FrameWidgetSlot { Anchor 0 0 0 0 PositionX 650 OffsetLeft 650 PositionY 96 OffsetTop 96 SizeX 110 OffsetRight -760 SizeY 38 OffsetBottom -134 } components { SCR_ButtonTextComponent "{5548F0143AE99095}" { m_sText "Apply" } } }
TextWidgetClass { Name "Saved_roadblockCount" Slot FrameWidgetSlot { Anchor 0 0 0 0 PositionX 508 OffsetLeft 508 PositionY 136 OffsetTop 136 SizeX 456 OffsetRight -964 SizeY 22 OffsetBottom -158 } Color 0.9 0.92 0.94 1 Text "Waiting for saved value" "Font Size" 16 "Min Font Size" 16 FontProperties FontProperties { Font "{3E7733BAC8C831F6}UI/Fonts/RobotoCondensed/RobotoCondensed_Regular.fnt" } }
+1 -1
View File
@@ -40,7 +40,7 @@ and `/esc mission startammo set N` (also `show` and `help`).
## Roadblocks
The admin menu **Settings → Roadblocks next round** sets `mission.roadblockCount`
in `Escapists.json`: **0–12**, default **4**; **0 disables** them. The chat equivalent
in `Escapists.json`: **0–30**, default **4**; **0 disables** them. The chat equivalent
is `/esc mission roadblocks set N` (also `show` and `help`). Changes apply on the
next round/restart, leaving current units and cover in place.
+1 -1
View File
@@ -36,7 +36,7 @@ assert '"roadblockCount"' in body(settings,'static array<string> Keys(')
import re
valid=re.search(r'if \(key == "roadblockCount"\) return ([^;]+);',body(settings,'static bool Valid('))[1]
default=re.search(r'if \(key == "roadblockCount"\) return ([^;]+);',body(settings,'static int AddedDefault('))[1]
run('#include <cassert>\nbool valid(int value){return '+valid+';}\nint main(){assert(!valid(-1)&&valid(0)&&valid(4)&&valid(12)&&!valid(13));assert('+default+'==4);}')
run('#include <cassert>\nbool valid(int value){return '+valid+';}\nint main(){assert(!valid(-1)&&valid(0)&&valid(4)&&valid(12)&&valid(13)&&valid(30)&&!valid(31));assert('+default+'==4);}')
s=p.read_text()
assert s.index('m_Mode.Forces().Register(')<s.index('m_Mode.RegisterGroup(group)')
assert 'm_Groups.Insert(group)' in s and 'm_Mode.Own(ownedEntity)' in s
+1 -1
View File
@@ -9,7 +9,7 @@ SCHEMA={
'planeReplacementSeconds':(60,30,1800),
'planeSectorSeconds':(120,30,600),
'planeReconEnabled':(1,0,1),
'roadblockCount':(4,0,12),
'roadblockCount':(4,0,30),
'civilianTrafficCount':(3,0,6),
'startMode':(0,0,1),
'keepWeaponOnUnconscious':(1,0,1),