Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
C# changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Trojaner committed Feb 6, 2021
1 parent 215397f commit 18c7288
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
9 changes: 5 additions & 4 deletions src/Commands/CommandOpenMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace OpenMod.Installer.RocketMod.Commands
{
public class CommandOpenMod : IRocketCommand
{
private static readonly List<IJob> s_Jobs = new List<IJob>();
private static readonly List<CommandWindowInputted> s_RocketModComandWindowsDelegates = new List<CommandWindowInputted>();
private static readonly List<IJob> s_Jobs = new();
private static readonly List<CommandWindowInputted> s_RocketModComandWindowsDelegates = new();
private static CommandStep s_CurrentStep;
private static string[] s_Args;
public void Execute(IRocketPlayer caller, string[] command)
Expand Down Expand Up @@ -65,9 +65,10 @@ private void UnbindCommandInput()
RestoreRocketModConsoleInput();
}

private void OnCommandWindowInputted(string text, ref bool shouldexecutecommand)
// ReSharper disable once RedundantAssignment
private void OnCommandWindowInputted(string text, ref bool shouldExecuteCommand)
{
shouldexecutecommand = false;
shouldExecuteCommand = false;
text = text.Trim();

if (text.Equals("cancel", StringComparison.OrdinalIgnoreCase))
Expand Down
6 changes: 3 additions & 3 deletions src/Commands/OpenModEconomyStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public OpenModEconomyStep(List<IJob> jobs) : base(jobs)

public override string Text { get; } = "Which economy system do you want to use?";

public override List<CommandStepChoice> Choices { get; } = new List<CommandStepChoice>
public override List<CommandStepChoice> Choices { get; } = new()
{
new CommandStepChoice
new()
{
Name = "RocketMod (recommended)",
Description = "OpenMod will use RocketMod Uconomy for economy."
},
new CommandStepChoice
new()
{
Name = "OpenMod",
Description = "RocketMod will use OpenMod's economy system. Works with plugins that use Uconomy. Will import existing data from Uconomy."
Expand Down
6 changes: 3 additions & 3 deletions src/Commands/OpenModPermissionsStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public OpenModPermissionsStep(List<IJob> jobs) : base(jobs)

public override string Text { get; } = "Which permissions system do you want to use?";

public override List<CommandStepChoice> Choices { get; } = new List<CommandStepChoice>
public override List<CommandStepChoice> Choices { get; } = new()
{
new CommandStepChoice
new()
{
Name = "RocketMod (recommended)",
Description = "OpenMod will use RocketMod's Permissions.config.xml for permissions."
},
new CommandStepChoice
new()
{
Name = "OpenMod",
Description = "RocketMod will use OpenMod's permission system. Will import existing permissions from RocketMod's Permissions.config.xml."
Expand Down
1 change: 0 additions & 1 deletion src/Helpers/AssemblyHelper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Reflection;

namespace OpenMod.Installer.RocketMod.Helpers
Expand Down
2 changes: 2 additions & 0 deletions src/OpenMod.Installer.RocketMod.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue">DO_NOT_SHOW</s:String></wpf:ResourceDictionary>

0 comments on commit 18c7288

Please sign in to comment.