From 09a019f9c66fa489b8f0ba22c0f1cc09d2c9308a Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 16 Feb 2020 12:01:33 +0000 Subject: [PATCH] Add a lint check for LockFaction on mission players. --- OpenRA.Mods.Common/Lint/CheckPlayers.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Mods.Common/Lint/CheckPlayers.cs b/OpenRA.Mods.Common/Lint/CheckPlayers.cs index 2f2cf6ebd8..09011326dd 100644 --- a/OpenRA.Mods.Common/Lint/CheckPlayers.cs +++ b/OpenRA.Mods.Common/Lint/CheckPlayers.cs @@ -46,6 +46,11 @@ namespace OpenRA.Mods.Common.Lint if (player.Playable) emitError("The player {0} owning the world can't be playable.".F(player.Name)); } + else if (map.Visibility == MapVisibility.MissionSelector && player.Playable && !player.LockFaction) + { + // Missions must lock the faction of the player to force the server to override the default Random faction + emitError("The player {0} must specify LockFaction: True.".F(player.Name)); + } } if (!worldOwnerFound)