Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
roncli committed Dec 25, 2022
2 parents fdacda0 + 018c53c commit bd9f3d5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions GameMod/MPLoadouts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -806,4 +806,17 @@ public static void Prefix(PlayerShip __instance)
}
}
}

// Disables reflex powerups since it's provided as a standard sidearm now.
[HarmonyPatch(typeof(MenuManager), "MpMatchSetup")]
internal class MPLoadouts_MenuManager_MpMatchSetup
{
public static void Postfix()
{
if (!Menus.mms_classic_spawns)
{
MenuManager.mms_powerup_filter[2] = false;
}
}
}
}
7 changes: 7 additions & 0 deletions GameMod/MPMatchPresets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ class MPMatchPreset

public void Apply()
{
// part of the reflex sidearm addition (possibly unnecessary workaround for remote presets)
// disables reflex drops if classic spawns is off, regardless of the preset setting
if (!this.classicSpawnsEnabled)
{
this.powerupFilter[2] = false;
}

MenuManager.mms_mode = this.matchMode;
MenuManager.mms_max_players = this.maxPlayers;
MenuManager.mms_friendly_fire = this.friendlyFire;
Expand Down
5 changes: 5 additions & 0 deletions GameMod/Menus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,11 @@ static void ProcessAdditional()
case 13:
Menus.mms_classic_spawns = !Menus.mms_classic_spawns;
MenuManager.PlayCycleSound(1f, (float)UIManager.m_select_dir);
// Re-enables Reflex drops in classic spawn mode by default.
if (Menus.mms_classic_spawns)
{
MenuManager.mms_powerup_filter[2] = true;
}
break;
case 14:
Menus.mms_ctf_boost = !Menus.mms_ctf_boost;
Expand Down

0 comments on commit bd9f3d5

Please sign in to comment.