From c21e8ee032ab1e9af8dea4e122ee39899c243b59 Mon Sep 17 00:00:00 2001 From: VirxEC Date: Fri, 5 Jun 2026 11:26:15 -0500 Subject: [PATCH] Add new mutators --- RLBotCS/Conversion/FlatToCommand.cs | 73 +++++++++++++++++++++++++++++ flatbuffers-schema | 2 +- 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/RLBotCS/Conversion/FlatToCommand.cs b/RLBotCS/Conversion/FlatToCommand.cs index ce9e191..109bc38 100644 --- a/RLBotCS/Conversion/FlatToCommand.cs +++ b/RLBotCS/Conversion/FlatToCommand.cs @@ -50,6 +50,7 @@ private static string MapMaxScore(MaxScoreMutator maxScore) => MaxScoreMutator.EightyGoals => "Max80", MaxScoreMutator.NinetyGoals => "Max90", MaxScoreMutator.HundredGoals => "Max100", + MaxScoreMutator.OneHundredFiftyOneGoals => "Max151", _ => throw new ArgumentOutOfRangeException(nameof(maxScore), maxScore, null), }; @@ -119,6 +120,8 @@ private static string MapBallType(BallTypeMutator option) => BallTypeMutator.ScoreAbsorb => "Ball_Score", BallTypeMutator.Shoe => "Ball_Shoe", BallTypeMutator.PizzaPuck => "Ball_PizzaPuck", + BallTypeMutator.Strike => "Ball_Strike", + BallTypeMutator.SpookyBalloon => "Ball_SpookyBalloon", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; @@ -133,6 +136,7 @@ private static string MapBallWeight(BallWeightMutator option) => BallWeightMutator.BeachBallCurve => "MagnusBeachBall", BallWeightMutator.MagnusFutBall => "MagnusFutBallTest", BallWeightMutator.MagnusFutballLess => "MagnusFutballLess", + BallWeightMutator.Balloon => "BalloonBall", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; @@ -241,7 +245,21 @@ private static string MapMaxTime(MaxTimeMutator option) => option switch { MaxTimeMutator.Unlimited => "", + MaxTimeMutator.OneMinute => "MaxTime1Minute", + MaxTimeMutator.TwoMinutes => "MaxTime2Minutes", + MaxTimeMutator.ThreeMinutes => "MaxTime3Minutes", + MaxTimeMutator.FourMinutes => "MaxTime4Minutes", + MaxTimeMutator.FiveMinutes => "MaxTime5Minutes", + MaxTimeMutator.SixMinutes => "MaxTime6Minutes", + MaxTimeMutator.SevenMinutes => "MaxTime7Minutes", + MaxTimeMutator.EightMinutes => "MaxTime8Minutes", + MaxTimeMutator.NineMinutes => "MaxTime9Minutes", + MaxTimeMutator.TenMinutes => "MaxTime10Minutes", MaxTimeMutator.ElevenMinutes => "MaxTime11Minutes", + MaxTimeMutator.TwelveMinutes => "MaxTime12Minutes", + MaxTimeMutator.ThirteenMinutes => "MaxTime13Minutes", + MaxTimeMutator.FourteenMinutes => "MaxTime14Minutes", + MaxTimeMutator.FifteenMinutes => "MaxTime15Minutes", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; @@ -381,6 +399,55 @@ private static string MapScoringRule(ScoringRuleMutator option) => _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; + private static string MapTriTipMode(TriTipModeMutator option) => + option switch + { + TriTipModeMutator.Off => "", + TriTipModeMutator.Tritip => "Tritip", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapLockedDamagePhase(LockedDamagePhaseMutator option) => + option switch + { + LockedDamagePhaseMutator.Default => "", + LockedDamagePhaseMutator.High => "BreakoutBallIndex2", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapSpawnDemoball(SpawnDemoballMutator option) => + option switch + { + SpawnDemoballMutator.Off => "", + SpawnDemoballMutator.On => "FireBallObstacleEnabled", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapBoostRestriction(BoostRestritionMutator option) => + option switch + { + BoostRestritionMutator.Default => "", + BoostRestritionMutator.AerialOnly => "AerialBoostOnly", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapKeepUpRules(KeepUpRulesMutator option) => + option switch + { + KeepUpRulesMutator.Off => "", + KeepUpRulesMutator.EnabledIncrement => "KeepUpEnabled", + KeepUpRulesMutator.Enabled => "KeepUpStageEnabled", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + + private static string MapMatchAdmin(MatchAdminMutator option) => + option switch + { + MatchAdminMutator.Off => "", + MatchAdminMutator.On => "MatchCreatorAdminEnabled", + _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), + }; + private static string GetOption(string option) { if (option != "") @@ -480,6 +547,12 @@ public static (string, CustomMap?) MakeOpenCommand(MatchConfigurationT matchConf command += GetOption(MapAssistGoalScore(mutatorSettings.AssistGoalScore)); command += GetOption(MapInputRestriction(mutatorSettings.InputRestriction)); command += GetOption(MapScoringRule(mutatorSettings.ScoringRule)); + command += GetOption(MapTriTipMode(mutatorSettings.TriTipMode)); + command += GetOption(MapLockedDamagePhase(mutatorSettings.LockedDamagePhase)); + command += GetOption(MapSpawnDemoball(mutatorSettings.SpawnDemoball)); + command += GetOption(MapBoostRestriction(mutatorSettings.BoostRestriction)); + command += GetOption(MapKeepUpRules(mutatorSettings.KeepUpRules)); + command += GetOption(MapMatchAdmin(mutatorSettings.MatchAdmin)); return (command, customMap); } diff --git a/flatbuffers-schema b/flatbuffers-schema index a77d8d7..aa6a526 160000 --- a/flatbuffers-schema +++ b/flatbuffers-schema @@ -1 +1 @@ -Subproject commit a77d8d7dbf5d7570f45ff34ebaeca6ed940b0927 +Subproject commit aa6a52636f63cc84d527ba5432f9eca0420bac47