diff --git a/RLBotCS/Conversion/FlatToCommand.cs b/RLBotCS/Conversion/FlatToCommand.cs index abe721f..fb2ff10 100644 --- a/RLBotCS/Conversion/FlatToCommand.cs +++ b/RLBotCS/Conversion/FlatToCommand.cs @@ -40,6 +40,16 @@ private static string MapMaxScore(MaxScoreMutator maxScore) => MaxScoreMutator.ThreeGoals => "Max3", MaxScoreMutator.FiveGoals => "Max5", MaxScoreMutator.SevenGoals => "Max7", + MaxScoreMutator.TenGoals => "Max10", + MaxScoreMutator.TwentyGoals => "Max20", + MaxScoreMutator.ThirtyGoals => "Max30", + MaxScoreMutator.FortyGoals => "Max40", + MaxScoreMutator.FiftyGoals => "Max50", + MaxScoreMutator.SixtyGoals => "Max60", + MaxScoreMutator.SeventyGoals => "Max70", + MaxScoreMutator.EightyGoals => "Max80", + MaxScoreMutator.NinetyGoals => "Max90", + MaxScoreMutator.HundredGoals => "Max100", MaxScoreMutator.Unlimited => "UnlimitedScore", _ => throw new ArgumentOutOfRangeException(nameof(maxScore), maxScore, null), }; @@ -104,6 +114,10 @@ private static string MapBallType(BallTypeMutator option) => BallTypeMutator.Haunted => "Ball_Haunted", BallTypeMutator.Ekin => "Ball_Ekin", BallTypeMutator.SpookyCube => "Ball_SpookyCube", + BallTypeMutator.Egg => "Ball_Egg", + BallTypeMutator.PlayerSeeking => "Ball_Fire", + BallTypeMutator.Dropshot => "Ball_Breakout", + BallTypeMutator.ScoreAbsorb => "Ball_Score", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; @@ -138,7 +152,7 @@ private static string MapBallBounciness(BallBouncinessMutator option) => BallBouncinessMutator.Low => "LowBounciness", BallBouncinessMutator.High => "HighBounciness", BallBouncinessMutator.SuperHigh => "SuperBounciness", - BallBouncinessMutator.LowishBounciness => "LowishBounciness", + BallBouncinessMutator.Lowish => "LowishBounciness", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; @@ -167,6 +181,8 @@ private static string MapRumble(RumbleMutator option) => RumbleMutator.HauntedBallBeam => "ItemsModeHauntedBallBeam", RumbleMutator.Tactical => "ItemsModeSelection", RumbleMutator.BatmanRumble => "ItemsMode_BM", + RumbleMutator.GrapplingOnly => "ItemsModeGrapplingHooks", + RumbleMutator.HaymakerOnly => "ItemsModeBoxingGloves", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; @@ -200,6 +216,8 @@ private static string MapDemolish(DemolishMutator option) => DemolishMutator.FriendlyFire => "DemolishAll", DemolishMutator.OnContact => "AlwaysDemolishOpposing", DemolishMutator.OnContactFF => "AlwaysDemolish", + DemolishMutator.OnBallContact => "TeamDemoBall", + DemolishMutator.OnBallContactFF => "FFADemoBall", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; @@ -238,6 +256,117 @@ private static string MapAudio(AudioMutator option) => _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; + private static string MapBallGravity(BallGravityMutator option) => + option switch + { + BallGravityMutator.Default => "", + BallGravityMutator.Low => "LowGravityBall", + BallGravityMutator.High => "HighGravityBall", + BallGravityMutator.SuperHigh => "SuperGravityBall", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapTerritory(TerritoryMutator option) => + option switch + { + TerritoryMutator.Default => "", + TerritoryMutator.Territory => "Territory", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapStaleBall(StaleBallMutator option) => + option switch + { + StaleBallMutator.Default => "", + StaleBallMutator.ThirtySeconds => "ThirtySeconds", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapJump(JumpMutator option) => + option switch + { + JumpMutator.Default => "", + JumpMutator.Grounded => "Grounded", + JumpMutator.Two => "2DoubleJumps", + JumpMutator.Three => "3DoubleJumps", + JumpMutator.Four => "4DoubleJumps", + JumpMutator.Unlimited => "UnlimitedJumps", + JumpMutator.NoJumps => "NoJumps", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapDodgeTimer(DodgeTimerMutator option) => + option switch + { + DodgeTimerMutator.Default => "", + DodgeTimerMutator.TwoSeconds => "DodgeTwoSeconds", + DodgeTimerMutator.ThreeSeconds => "DodgeThreeSeconds", + DodgeTimerMutator.Unlimited => "DodgeUnlimitedSeconds", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapPossessionScore(PossessionScoreMutator option) => + option switch + { + PossessionScoreMutator.Default => "", + PossessionScoreMutator.OneSecond => "Possession1Second", + PossessionScoreMutator.TwoSeconds => "Possession2Seconds", + PossessionScoreMutator.ThreeSeconds => "Possession3Seconds", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapDemolishScore(DemolishScoreMutator option) => + option switch + { + DemolishScoreMutator.Default => "", + DemolishScoreMutator.One => "DemolishScore1", + DemolishScoreMutator.Two => "DemolishScore2", + DemolishScoreMutator.Three => "DemolishScore3", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapNormalGoalScore(NormalGoalScoreMutator option) => + option switch + { + NormalGoalScoreMutator.Default => "", + NormalGoalScoreMutator.Zero => "GoalScore0", + NormalGoalScoreMutator.Two => "GoalScore2", + NormalGoalScoreMutator.Three => "GoalScore3", + NormalGoalScoreMutator.Five => "GoalScore5", + NormalGoalScoreMutator.Ten => "GoalScore10", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapAerialGoalScore(AerialGoalScoreMutator option) => + option switch + { + AerialGoalScoreMutator.Default => "", + AerialGoalScoreMutator.Zero => "AerialGoalScore0", + AerialGoalScoreMutator.Two => "AerialGoalScore2", + AerialGoalScoreMutator.Three => "AerialGoalScore3", + AerialGoalScoreMutator.Five => "AerialGoalScore5", + AerialGoalScoreMutator.Ten => "AerialGoalScore10", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapAssistGoalScore(AssistGoalScoreMutator option) => + option switch + { + AssistGoalScoreMutator.Default => "", + AssistGoalScoreMutator.One => "AssistScore1", + AssistGoalScoreMutator.Two => "AssistScore2", + AssistGoalScoreMutator.Three => "AssistScore3", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapInputRestriction(InputRestrictionMutator option) => + option switch + { + InputRestrictionMutator.Default => "", + InputRestrictionMutator.Backwards => "BackwardsMode", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + private static string GetOption(string option) { if (option != "") @@ -301,6 +430,16 @@ public static string MakeOpenCommand(MatchConfigurationT matchConfig) command += GetOption(MapMaxTime(mutatorSettings.MaxTime)); command += GetOption(MapGameEvent(mutatorSettings.GameEvent)); command += GetOption(MapAudio(mutatorSettings.Audio)); + command += GetOption(MapBallGravity(mutatorSettings.BallGravity)); + command += GetOption(MapTerritory(mutatorSettings.Territory)); + command += GetOption(MapStaleBall(mutatorSettings.StaleBall)); + command += GetOption(MapJump(mutatorSettings.Jump)); + command += GetOption(MapDodgeTimer(mutatorSettings.DodgeTimer)); + command += GetOption(MapPossessionScore(mutatorSettings.PossessionScore)); + command += GetOption(MapDemolishScore(mutatorSettings.DemolishScore)); + command += GetOption(MapNormalGoalScore(mutatorSettings.NormalGoalScore)); + command += GetOption(MapAerialGoalScore(mutatorSettings.AerialGoalScore)); + command += GetOption(MapAssistGoalScore(mutatorSettings.AssistGoalScore)); return command; } diff --git a/RLBotCS/Main.cs b/RLBotCS/Main.cs index bc00e3b..11fe139 100644 --- a/RLBotCS/Main.cs +++ b/RLBotCS/Main.cs @@ -8,7 +8,7 @@ if (args.Length > 0 && args[0] == "--version") { - Console.WriteLine("RLBotServer v5.beta.4.8"); + Console.WriteLine("RLBotServer v5.beta.4.9"); Environment.Exit(0); } diff --git a/RLBotCS/ManagerTools/ConfigParser.cs b/RLBotCS/ManagerTools/ConfigParser.cs index 229a0c3..80da0c1 100644 --- a/RLBotCS/ManagerTools/ConfigParser.cs +++ b/RLBotCS/ManagerTools/ConfigParser.cs @@ -47,6 +47,17 @@ public static class Fields public const string MutatorsMaxTime = "max_time"; public const string MutatorsGameEvent = "game_event"; public const string MutatorsAudio = "audio"; + public const string MutatorsBallGravity = "ball_gravity"; + public const string MutatorsTerritory = "territory"; + public const string MutatorsStaleBall = "stale_ball"; + public const string MutatorsJump = "jump"; + public const string MutatorsDodgeTimer = "dodge_timer"; + public const string MutatorsPossessionScore = "possession_score"; + public const string MutatorsDemolishScore = "demolish_score"; + public const string MutatorsNormalGoalScore = "normal_goal_score"; + public const string MutatorsAerialGoalScore = "aerial_goal_score"; + public const string MutatorsAssistGoalScore = "assist_goal_score"; + public const string MutatorsInputRestriction = "input_restriction"; public const string CarsList = "cars"; public const string ScriptsList = "scripts"; @@ -520,6 +531,57 @@ private MutatorSettingsT GetMutatorSettings(TomlTable mutatorTable) => GameEventMutator.Default ), Audio = GetEnum(mutatorTable, Fields.MutatorsAudio, AudioMutator.Default), + BallGravity = GetEnum( + mutatorTable, + Fields.MutatorsBallGravity, + BallGravityMutator.Default + ), + Territory = GetEnum( + mutatorTable, + Fields.MutatorsTerritory, + TerritoryMutator.Default + ), + StaleBall = GetEnum( + mutatorTable, + Fields.MutatorsStaleBall, + StaleBallMutator.Default + ), + Jump = GetEnum(mutatorTable, Fields.MutatorsJump, JumpMutator.Default), + DodgeTimer = GetEnum( + mutatorTable, + Fields.MutatorsDodgeTimer, + DodgeTimerMutator.Default + ), + PossessionScore = GetEnum( + mutatorTable, + Fields.MutatorsPossessionScore, + PossessionScoreMutator.Default + ), + DemolishScore = GetEnum( + mutatorTable, + Fields.MutatorsDemolishScore, + DemolishScoreMutator.Default + ), + NormalGoalScore = GetEnum( + mutatorTable, + Fields.MutatorsNormalGoalScore, + NormalGoalScoreMutator.Default + ), + AerialGoalScore = GetEnum( + mutatorTable, + Fields.MutatorsAerialGoalScore, + AerialGoalScoreMutator.Default + ), + AssistGoalScore = GetEnum( + mutatorTable, + Fields.MutatorsAssistGoalScore, + AssistGoalScoreMutator.Default + ), + InputRestriction = GetEnum( + mutatorTable, + Fields.MutatorsInputRestriction, + InputRestrictionMutator.Default + ), }; /// diff --git a/flatbuffers-schema b/flatbuffers-schema index 5410e4c..c11b953 160000 --- a/flatbuffers-schema +++ b/flatbuffers-schema @@ -1 +1 @@ -Subproject commit 5410e4c5edced040945a963fa95b9661d90267bc +Subproject commit c11b9538c9d468e5efc8ac2ef163139a4aa0b332