Skip to content

Commit 99ec90d

Browse files
committed
code clean up
1 parent 524940f commit 99ec90d

9 files changed

+31
-31
lines changed

Pets/Commands/MyPetCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public CommandResult Execute(CommandContext context)
4444
};
4545

4646

47-
if (Pet.SpawnPet(context.Player, result, out var pet))
47+
if (Pet.SpawnPet(context.Player, result, out _))
4848
return new CommandResult
4949
{
5050
Message = PluginClass.PetPlugin.Translation.ActiveTranslation.Spawned,

Pets/Pet.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using Synapse.Api;
1+
using System.Collections.Generic;
2+
using System.Linq;
23
using MEC;
3-
using System.Collections.Generic;
4+
using Synapse.Api;
45
using UnityEngine;
5-
using System.Linq;
66

77
namespace Pets
88
{

Pets/PetConfiguration.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using Synapse.Config;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
2+
using Synapse.Config;
33

44
namespace Pets
55
{

Pets/PetHandler.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
using System.Collections.Generic;
2-
using System.Linq;
3-
using Synapse.Api;
1+
using System;
2+
using System.Collections.Generic;
43
using System.IO;
4+
using System.Linq;
55
using Synapse;
6-
using System;
6+
using Synapse.Api;
77
using Synapse.Config;
88

99
namespace Pets
1010
{
1111
public class PetHandler
1212
{
13-
public List<PetConfiguration> Pets { get; } = new List<PetConfiguration>();
13+
internal List<PetConfiguration> Pets { get; } = new List<PetConfiguration>();
1414

1515
[API]
1616
public PetConfiguration GetPet(int ID) => Pets.FirstOrDefault(x => x.PetID == ID);
1717

1818
[API]
1919
public bool PetIsRegistered(int ID) => Pets.Any(x => x.PetID == ID);
2020

21-
public void LoadPets()
21+
internal void LoadPets()
2222
{
2323
var spath = Path.Combine(Server.Get.Files.SharedConfigDirectory, "pets");
2424
var path = Path.Combine(Server.Get.Files.ConfigDirectory, "pets");

Pets/PetOwnerScript.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using UnityEngine;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
2+
using UnityEngine;
33

44
namespace Pets
55
{

Pets/PluginClass.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using HarmonyLib;
2-
using System;
3-
using Synapse.Api.Plugin;
1+
using System;
2+
using HarmonyLib;
43
using Synapse.Api;
4+
using Synapse.Api.Plugin;
55
using Synapse.Translation;
66

77
namespace Pets

Pets/PluginConfig.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
using Synapse.Config;
2-
using System.ComponentModel;
1+
using System.ComponentModel;
2+
using Synapse.Config;
33

44
namespace Pets
55
{
66
public class PluginConfig : AbstractConfigSection
77
{
88
[Description("The max Amount of Pets a Player can have at the same time")]
9-
public int MaxPets = 1;
9+
public int MaxPets { get; set; } = 1;
1010

1111
[Description("If enabled only the Owner of the pet can see it")]
12-
public bool InvisiblePet = false;
12+
public bool InvisiblePet { get; set; } = false;
1313

1414
[Description("If Enabled the Name of the Owner will also be displayed")]
15-
public bool ShowOwnerName = true;
15+
public bool ShowOwnerName { get; set; } = true;
1616

1717
[Description("If Disabled the Role of the Pet will no longer be displayed")]
18-
public bool ShowRole = false;
18+
public bool ShowRole { get; set; } = false;
1919
}
2020
}

Pets/PluginExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Synapse.Api;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.Linq;
3+
using Synapse.Api;
44

55
namespace Pets
66
{

Pets/PluginPatches.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
3-
using Synapse;
4-
using Synapse.Api;
4+
using System.Text;
55
using HarmonyLib;
66
using Respawning.NamingRules;
7-
using System.Text;
8-
using System.Collections.Generic;
7+
using Synapse;
8+
using Synapse.Api;
99

1010
namespace Pets
1111
{
12-
[HarmonyPatch(typeof(NineTailedFoxNamingRule), nameof(NineTailedFoxNamingRule.PlayEntranceAnnouncement))]
12+
[HarmonyPatch(typeof(NineTailedFoxNamingRule), nameof(NineTailedFoxNamingRule.PlayEntranceAnnouncement))]
1313
internal static class AnnouncePatch
1414
{
1515
private static bool Prefix(NineTailedFoxNamingRule __instance, string regular)
@@ -19,7 +19,7 @@ private static bool Prefix(NineTailedFoxNamingRule __instance, string regular)
1919
string cassieUnitName = __instance.GetCassieUnitName(regular);
2020
int num = Server.Get.GetPlayers(x => x.RealTeam == Team.SCP && !x.IsDummy).Count;
2121
StringBuilder stringBuilder = new StringBuilder();
22-
if (global::ClutterSpawner.IsHolidayActive(global::Holidays.Christmas))
22+
if (ClutterSpawner.IsHolidayActive(Holidays.Christmas))
2323
{
2424
stringBuilder.Append("XMAS_EPSILON11 ");
2525
stringBuilder.Append(cassieUnitName);

0 commit comments

Comments
 (0)