Skip to content

Commit

Permalink
v0.8.64 Commander Management Patches
Browse files Browse the repository at this point in the history
  • Loading branch information
data-bomb committed Jul 12, 2024
1 parent 6cb5a13 commit ad45c5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Si_CommManagement/CommanderPrimitives.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void DemoteTeamsCommander(MP_Strategy strategyInstance, Team Targe
#endif

// need to get the player back to Infantry and not stuck in no-clip
SendToRole(DemotedCommander, MP_Strategy.ETeamRole.INFANTRY);
SendToRole(DemotedCommander, GameModeExt.ETeamRole.INFANTRY);
// respawn
GameMode.CurrentGameMode.SpawnUnitForPlayer(DemotedCommander, TargetTeam);
}
Expand All @@ -77,7 +77,7 @@ public static void PromoteToCommander(Player CommanderPlayer)
#endif

// now mimic switching to COMMANDER role
StrategyTeamSetup strategyTeamInstance = strategyInstance.GetStrategyTeamSetup(CommanderPlayer.Team);
BaseTeamSetup strategyTeamInstance = strategyInstance.GetTeamSetup(CommanderPlayer.Team);
MelonLogger.Msg("Trying to promote " + CommanderPlayer.PlayerName + " on team " + CommanderPlayer.Team.TeamShortName);


Expand All @@ -94,10 +94,10 @@ public static void PromoteToCommander(Player CommanderPlayer)
#endif

// make a log entry of this role change
Event_Roles.FireOnRoleChangedEvent(CommanderPlayer, MP_Strategy.ETeamRole.COMMANDER);
Event_Roles.FireOnRoleChangedEvent(CommanderPlayer, GameModeExt.ETeamRole.COMMANDER);
}

public static void SendToRole(Player FormerCommander, MP_Strategy.ETeamRole role)
public static void SendToRole(Player FormerCommander, GameModeExt.ETeamRole role)
{
GameByteStreamWriter theRoleStream;
theRoleStream = GameMode.CurrentGameMode.CreateRPCPacket(2);
Expand Down
2 changes: 1 addition & 1 deletion Si_CommManagement/Si_CommanderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You should have received a copy of the GNU General Public License
using SilicaAdminMod;
using System.Linq;

[assembly: MelonInfo(typeof(CommanderManager), "Commander Management", "1.6.5", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonInfo(typeof(CommanderManager), "Commander Management", "1.6.6", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonGame("Bohemia Interactive", "Silica")]
[assembly: MelonOptionalDependencies("Admin Mod")]

Expand Down

0 comments on commit ad45c5e

Please sign in to comment.