Changes to the RestartGame function to make it more streamlined
Removal of PromptAbortAction and inclusion into PromptConfirmAction Changes to prevent a restart button being required for all mods ConfirmAction Addtion of named parameters to PromptConfirmAction Moved StartGame from MissionBrowserLogic.cs to Game.cs
This commit is contained in:
@@ -301,29 +301,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
PlayVideo(fsPlayer, gameStartVideo, PlayingVideo.GameStart, () =>
|
||||
{
|
||||
StopVideo(fsPlayer);
|
||||
StartMission();
|
||||
Game.StartMission(selectedMapPreview.Uid, gameSpeed, difficulty, onStart);
|
||||
});
|
||||
}
|
||||
else
|
||||
StartMission();
|
||||
}
|
||||
|
||||
void StartMission()
|
||||
{
|
||||
OrderManager om = null;
|
||||
|
||||
Action lobbyReady = null;
|
||||
lobbyReady = () =>
|
||||
{
|
||||
om.IssueOrder(Order.Command("gamespeed {0}".F(gameSpeed)));
|
||||
om.IssueOrder(Order.Command("difficulty {0}".F(difficulty)));
|
||||
Game.LobbyInfoChanged -= lobbyReady;
|
||||
onStart();
|
||||
om.IssueOrder(Order.Command("state {0}".F(Session.ClientState.Ready)));
|
||||
};
|
||||
Game.LobbyInfoChanged += lobbyReady;
|
||||
|
||||
om = Game.JoinServer(IPAddress.Loopback.ToString(), Game.CreateLocalServer(selectedMapPreview.Uid), "");
|
||||
Game.StartMission(selectedMapPreview.Uid, gameSpeed, difficulty, onStart);
|
||||
}
|
||||
|
||||
class DropDownOption
|
||||
|
||||
Reference in New Issue
Block a user