Fix RCS1205
This commit is contained in:
@@ -1097,6 +1097,9 @@ dotnet_diagnostic.RCS1199.severity = warning
|
|||||||
# Use EventArgs.Empty.
|
# Use EventArgs.Empty.
|
||||||
dotnet_diagnostic.RCS1204.severity = warning
|
dotnet_diagnostic.RCS1204.severity = warning
|
||||||
|
|
||||||
|
# Order named arguments according to the order of parameters.
|
||||||
|
dotnet_diagnostic.RCS1205.severity = warning
|
||||||
|
|
||||||
# Order type parameter constraints.
|
# Order type parameter constraints.
|
||||||
dotnet_diagnostic.RCS1209.severity = warning
|
dotnet_diagnostic.RCS1209.severity = warning
|
||||||
|
|
||||||
|
|||||||
@@ -936,8 +936,8 @@ namespace OpenRA.Mods.Common.Pathfinder
|
|||||||
using (var fromDest = GetLocalPathSearch(
|
using (var fromDest = GetLocalPathSearch(
|
||||||
self, new[] { target }, source, customCost, ignoreActor, check, laneBias, null, heuristicWeightPercentage,
|
self, new[] { target }, source, customCost, ignoreActor, check, laneBias, null, heuristicWeightPercentage,
|
||||||
heuristic: Heuristic(forwardAbstractSearch, estimatedSearchSize, null, null),
|
heuristic: Heuristic(forwardAbstractSearch, estimatedSearchSize, null, null),
|
||||||
recorder: pathFinderOverlay?.RecordLocalEdges(self),
|
inReverse: true,
|
||||||
inReverse: true))
|
recorder: pathFinderOverlay?.RecordLocalEdges(self)))
|
||||||
return PathSearch.FindBidiPath(fromDest, fromSrc);
|
return PathSearch.FindBidiPath(fromDest, fromSrc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
Dictionary<string, object> titleArguments = null,
|
Dictionary<string, object> titleArguments = null,
|
||||||
Dictionary<string, object> textArguments = null,
|
Dictionary<string, object> textArguments = null,
|
||||||
Action onConfirm = null,
|
Action onConfirm = null,
|
||||||
Action onCancel = null,
|
|
||||||
Action onOther = null,
|
|
||||||
string confirmText = null,
|
string confirmText = null,
|
||||||
|
Action onCancel = null,
|
||||||
string cancelText = null,
|
string cancelText = null,
|
||||||
|
Action onOther = null,
|
||||||
string otherText = null)
|
string otherText = null)
|
||||||
{
|
{
|
||||||
var promptName = onOther != null ? "THREEBUTTON_PROMPT" : "TWOBUTTON_PROMPT";
|
var promptName = onOther != null ? "THREEBUTTON_PROMPT" : "TWOBUTTON_PROMPT";
|
||||||
|
|||||||
@@ -250,13 +250,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: OverwriteMapFailedTitle,
|
title: OverwriteMapFailedTitle,
|
||||||
text: OverwriteMapFailedPrompt,
|
text: OverwriteMapFailedPrompt,
|
||||||
confirmText: OverwriteMapFailedConfirm,
|
|
||||||
onConfirm: () =>
|
onConfirm: () =>
|
||||||
{
|
{
|
||||||
saveMap(combinedPath);
|
saveMap(combinedPath);
|
||||||
if (actionManager != null)
|
if (actionManager != null)
|
||||||
actionManager.SaveFailed = false;
|
actionManager.SaveFailed = false;
|
||||||
},
|
},
|
||||||
|
confirmText: OverwriteMapFailedConfirm,
|
||||||
onCancel: () =>
|
onCancel: () =>
|
||||||
{
|
{
|
||||||
if (actionManager != null)
|
if (actionManager != null)
|
||||||
@@ -278,13 +278,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: OverwriteMapOutsideEditTitle,
|
title: OverwriteMapOutsideEditTitle,
|
||||||
text: OverwriteMapOutsideEditPrompt,
|
text: OverwriteMapOutsideEditPrompt,
|
||||||
confirmText: SaveMapMapOutsideConfirm,
|
|
||||||
onConfirm: () =>
|
onConfirm: () =>
|
||||||
{
|
{
|
||||||
saveMap(combinedPath);
|
saveMap(combinedPath);
|
||||||
if (actionManager != null)
|
if (actionManager != null)
|
||||||
actionManager.SaveFailed = false;
|
actionManager.SaveFailed = false;
|
||||||
},
|
},
|
||||||
|
confirmText: SaveMapMapOutsideConfirm,
|
||||||
onCancel: () =>
|
onCancel: () =>
|
||||||
{
|
{
|
||||||
if (actionManager != null)
|
if (actionManager != null)
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
{
|
{
|
||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: VoteKickTitle,
|
title: VoteKickTitle,
|
||||||
titleArguments: Translation.Arguments("player", client.Name),
|
|
||||||
text: botsCount > 0 ? VoteKickPromptBreakBots : VoteKickPrompt,
|
text: botsCount > 0 ? VoteKickPromptBreakBots : VoteKickPrompt,
|
||||||
|
titleArguments: Translation.Arguments("player", client.Name),
|
||||||
textArguments: Translation.Arguments("bots", botsCount),
|
textArguments: Translation.Arguments("bots", botsCount),
|
||||||
onConfirm: () =>
|
onConfirm: () =>
|
||||||
{
|
{
|
||||||
@@ -174,8 +174,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: VoteKickTitle,
|
title: VoteKickTitle,
|
||||||
titleArguments: Translation.Arguments("player", client.Name),
|
|
||||||
text: botsCount > 0 ? VoteKickPromptBreakBots : VoteKickPrompt,
|
text: botsCount > 0 ? VoteKickPromptBreakBots : VoteKickPrompt,
|
||||||
|
titleArguments: Translation.Arguments("player", client.Name),
|
||||||
textArguments: Translation.Arguments("bots", botsCount),
|
textArguments: Translation.Arguments("bots", botsCount),
|
||||||
onConfirm: () =>
|
onConfirm: () =>
|
||||||
{
|
{
|
||||||
@@ -184,6 +184,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
closeMenu();
|
closeMenu();
|
||||||
},
|
},
|
||||||
confirmText: VoteKickVoteFor,
|
confirmText: VoteKickVoteFor,
|
||||||
|
onCancel: () => hideMenu(false),
|
||||||
|
cancelText: VoteKickVoteCancel,
|
||||||
onOther: () =>
|
onOther: () =>
|
||||||
{
|
{
|
||||||
Ui.CloseWindow();
|
Ui.CloseWindow();
|
||||||
@@ -191,16 +193,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
hideMenu(false);
|
hideMenu(false);
|
||||||
closeMenu();
|
closeMenu();
|
||||||
},
|
},
|
||||||
otherText: VoteKickVoteAgainst,
|
otherText: VoteKickVoteAgainst);
|
||||||
onCancel: () => hideMenu(false),
|
|
||||||
cancelText: VoteKickVoteCancel);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: KickTitle,
|
title: KickTitle,
|
||||||
titleArguments: Translation.Arguments("player", client.Name),
|
|
||||||
text: KickPrompt,
|
text: KickPrompt,
|
||||||
|
titleArguments: Translation.Arguments("player", client.Name),
|
||||||
onConfirm: () =>
|
onConfirm: () =>
|
||||||
{
|
{
|
||||||
orderManager.IssueOrder(Order.Command($"kick {client.Index} {false}"));
|
orderManager.IssueOrder(Order.Command($"kick {client.Index} {false}"));
|
||||||
|
|||||||
@@ -322,8 +322,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
title: LeaveMissionTitle,
|
title: LeaveMissionTitle,
|
||||||
text: LeaveMissionPrompt,
|
text: LeaveMissionPrompt,
|
||||||
onConfirm: () => { OnQuit(world); leaving = true; },
|
onConfirm: () => { OnQuit(world); leaving = true; },
|
||||||
onCancel: ShowMenu,
|
|
||||||
confirmText: LeaveMissionAccept,
|
confirmText: LeaveMissionAccept,
|
||||||
|
onCancel: ShowMenu,
|
||||||
cancelText: LeaveMissionCancel);
|
cancelText: LeaveMissionCancel);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -358,8 +358,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
title: RestartMissionTitle,
|
title: RestartMissionTitle,
|
||||||
text: RestartMissionPrompt,
|
text: RestartMissionPrompt,
|
||||||
onConfirm: OnRestart,
|
onConfirm: OnRestart,
|
||||||
onCancel: ShowMenu,
|
|
||||||
confirmText: RestartMissionAccept,
|
confirmText: RestartMissionAccept,
|
||||||
|
onCancel: ShowMenu,
|
||||||
cancelText: RestartMissionCancel);
|
cancelText: RestartMissionCancel);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -384,8 +384,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
title: SurrenderTitle,
|
title: SurrenderTitle,
|
||||||
text: SurrenderPrompt,
|
text: SurrenderPrompt,
|
||||||
onConfirm: OnSurrender,
|
onConfirm: OnSurrender,
|
||||||
onCancel: ShowMenu,
|
|
||||||
confirmText: SurrenderAccept,
|
confirmText: SurrenderAccept,
|
||||||
|
onCancel: ShowMenu,
|
||||||
cancelText: SurrenderCancel);
|
cancelText: SurrenderCancel);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -591,8 +591,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
title: ExitToMapEditorTitle,
|
title: ExitToMapEditorTitle,
|
||||||
text: ExitToMapEditorPrompt,
|
text: ExitToMapEditorPrompt,
|
||||||
onConfirm: OnConfirm,
|
onConfirm: OnConfirm,
|
||||||
onCancel: ShowMenu,
|
|
||||||
confirmText: ExitToMapEditorConfirm,
|
confirmText: ExitToMapEditorConfirm,
|
||||||
|
onCancel: ShowMenu,
|
||||||
cancelText: ExitToMapEditorCancel);
|
cancelText: ExitToMapEditorCancel);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -617,8 +617,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: ExitMapEditorTitle,
|
title: ExitMapEditorTitle,
|
||||||
text: deletedOrUnavailable ? ExitMapEditorPromptDeleted : ExitMapEditorPromptUnsaved,
|
text: deletedOrUnavailable ? ExitMapEditorPromptDeleted : ExitMapEditorPromptUnsaved,
|
||||||
confirmText: deletedOrUnavailable ? ExitMapEditorAnywayConfirm : ExitMapEditorConfirm,
|
|
||||||
onConfirm: () => { onSuccess(); leaving = true; },
|
onConfirm: () => { onSuccess(); leaving = true; },
|
||||||
|
confirmText: deletedOrUnavailable ? ExitMapEditorAnywayConfirm : ExitMapEditorConfirm,
|
||||||
onCancel: ShowMenu);
|
onCancel: ShowMenu);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -438,8 +438,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: NoVideoTitle,
|
title: NoVideoTitle,
|
||||||
text: NoVideoPrompt,
|
text: NoVideoPrompt,
|
||||||
cancelText: NoVideoCancel,
|
onCancel: () => { },
|
||||||
onCancel: () => { });
|
cancelText: NoVideoCancel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -455,8 +455,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: CantPlayTitle,
|
title: CantPlayTitle,
|
||||||
text: CantPlayPrompt,
|
text: CantPlayPrompt,
|
||||||
cancelText: CantPlayCancel,
|
onCancel: () => { },
|
||||||
onCancel: () => { });
|
cancelText: CantPlayCancel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
title: RestartTitle,
|
title: RestartTitle,
|
||||||
text: RestartPrompt,
|
text: RestartPrompt,
|
||||||
onConfirm: () => Game.SwitchToExternalMod(external, null, NoRestart),
|
onConfirm: () => Game.SwitchToExternalMod(external, null, NoRestart),
|
||||||
onCancel: CloseAndExit,
|
|
||||||
confirmText: RestartAccept,
|
confirmText: RestartAccept,
|
||||||
|
onCancel: CloseAndExit,
|
||||||
cancelText: RestartCancel);
|
cancelText: RestartCancel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -142,11 +142,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
ConfirmationDialogs.ButtonPrompt(modData,
|
ConfirmationDialogs.ButtonPrompt(modData,
|
||||||
title: ResetTitle,
|
title: ResetTitle,
|
||||||
titleArguments: Translation.Arguments("panel", panels[activePanel]),
|
|
||||||
text: ResetPrompt,
|
text: ResetPrompt,
|
||||||
|
titleArguments: Translation.Arguments("panel", panels[activePanel]),
|
||||||
onConfirm: Reset,
|
onConfirm: Reset,
|
||||||
onCancel: () => { },
|
|
||||||
confirmText: ResetAccept,
|
confirmText: ResetAccept,
|
||||||
|
onCancel: () => { },
|
||||||
cancelText: ResetCancel);
|
cancelText: ResetCancel);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user