-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand provision capability, fix chat command handling
- Loading branch information
Showing
8 changed files
with
129 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Serilog; | ||
|
||
namespace BitMod.Provision.Helpers; | ||
|
||
public class GamemodeValidator | ||
{ | ||
public static IEnumerable<string> Known = new[] | ||
{ | ||
// infantry conquest | ||
"INFCONQ", | ||
// rush (bomb defusal) | ||
"RUSH", | ||
// conquest | ||
"CONQ", | ||
// team deathmatch | ||
"TDM", | ||
// domination | ||
"DOMI", | ||
"FRONTLINE", | ||
"Elimination", | ||
"CaptureTheFlag", | ||
"CashRun", | ||
"VoxelTrench", | ||
"VoxelFortify", | ||
|
||
}; | ||
|
||
public static void ValidateGamemodes(ILogger logger, IEnumerable<string> chosen) | ||
{ | ||
var notInKnown = chosen | ||
.Where(opt => !Known.Contains(opt)); | ||
|
||
foreach (string s in notInKnown) | ||
logger.Warning("[BitMod Provision] Gamemode {@Gamemode} is not known to BitMod, it may be invalid! Check your spelling.", s); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using Serilog; | ||
|
||
namespace BitMod.Provision.Helpers; | ||
|
||
public class MapcycleValidator | ||
{ | ||
public static IEnumerable<string> Known = new[] | ||
{ | ||
|
||
"Azagor", | ||
"Basra", | ||
"Construction", | ||
"District", | ||
"Dustydew", | ||
"Eduardovo", | ||
"Frugis", | ||
"Isle", | ||
"Lonovo", | ||
"MultiIslands", | ||
"Namak", | ||
"OilDunes", | ||
"River", | ||
"Salhan", | ||
"SandySunset", | ||
"TensaTown", | ||
"Valley", | ||
"Wakistan", | ||
"WineParadise", | ||
|
||
// old versions of maps | ||
"Old_District", | ||
"Old_Eduardovo", | ||
"Old_MultuIslands", | ||
"Old_Namak", | ||
"Old_OilDunes", | ||
|
||
// not visible in polls | ||
"EventMap" | ||
}; | ||
|
||
public static void ValidateMaps(ILogger logger, IEnumerable<string> chosen) | ||
{ | ||
var notInKnown = chosen | ||
.Where(opt => !Known.Contains(opt)); | ||
|
||
foreach (string s in notInKnown) | ||
logger.Warning("[BitMod Provision] Map {@Map} is not known to BitMod, it may be invalid! Check your spelling.", s); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters