Skip to content

Commit 2548510

Browse files
committed
Config assistance
1 parent 8ff0a19 commit 2548510

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

RespawnOverhaul/CustomConfig.cs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ namespace RespawnOverhaul;
77
public class CustomConfig
88
{
99
#region StartingRespawnTokens
10-
[Description("The starting amount of spawn waves for the Nine Tailed Fox unit. Backup waves not included. Values >= 0")]
10+
[Description("The starting amount of spawn waves for the Nine Tailed Fox unit. Backup waves not included. Values >= -1")]
1111
public int NtfStartingRespawnTokens { get; set; } = 2;
12-
[Description("The starting amount of spawn waves for the Chaos Insurgency unit. Backup waves not included. Values >= 0")]
12+
[Description("The starting amount of spawn waves for the Chaos Insurgency unit. Backup waves not included. Values >= -1")]
1313
public int ChaosStartingRespawnTokens { get; set; } = 2;
14-
[Description("The starting amount of spawn waves for the Tutorial team. Backup waves not included.\n# This is here to be compatible with plugins, as they cannot spawn naturally. Values >= 0")]
14+
[Description("The starting amount of spawn waves for the Tutorial team. Backup waves not included.\n# This is here to be compatible with plugins, as they cannot spawn naturally. Values >= -1")]
1515
public int TutorialStartingRespawnTokens { get; set; } = 2;
16-
[Description("The starting amount of spawn waves for the SCP team. Backup waves not included.\n# This is here to be compatible with plugins, as they cannot spawn naturally. Values >= 0")]
16+
[Description("The starting amount of spawn waves for the SCP team. Backup waves not included.\n# This is here to be compatible with plugins, as they cannot spawn naturally. Values >= -1")]
1717
// ReSharper disable once InconsistentNaming
1818
public int SCPStartingRespawnTokens { get; set; } = 2;
19-
[Description("The starting amount of spawn waves for the Flamingo team. Backup waves not included.\n# This is here to be compatible with plugins, as they cannot spawn naturally. Values >= 0")]
19+
[Description("The starting amount of spawn waves for the Flamingo team. Backup waves not included.\n# This is here to be compatible with plugins, as they cannot spawn naturally. Values >= -1")]
2020
public int FlamingoStartingRespawnTokens { get; set; } = 2;
2121
#endregion
2222

@@ -57,7 +57,15 @@ public static int GetFactionDefaultRespawnTokens(Faction faction)
5757
/// <returns>Configuration validity.</returns>
5858
public bool ValidConfiguration()
5959
{
60-
// todo: rewrite verification.
61-
return ChaosStartingRespawnTokens >= -1 && NtfStartingRespawnTokens >= -1 && TutorialStartingRespawnTokens >= -1 && SCPStartingRespawnTokens >= -1 && FlamingoStartingRespawnTokens >= -1;
60+
return (
61+
// Respawn tokens minimum value.
62+
ChaosStartingRespawnTokens >= -1 &&
63+
NtfStartingRespawnTokens >= -1 &&
64+
TutorialStartingRespawnTokens >= -1 &&
65+
SCPStartingRespawnTokens >= -1 &&
66+
FlamingoStartingRespawnTokens >= -1 &&
67+
68+
MinimumWaveSizePercentage is >= -1 and <= 100
69+
);
6270
}
6371
}

RespawnOverhaul/ROPlugin.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ namespace RespawnOverhaul;
1515
// ReSharper disable once InconsistentNaming
1616
public class ROPlugin : Plugin<CustomConfig>
1717
{
18-
// todo: protect certain things of the plugin.
19-
2018
// The name of the plugin
2119
public override string Name { get; } = "RespawnTokenOverhaul";
2220

0 commit comments

Comments
 (0)