Skip to content

Commit

Permalink
some small improvements and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikihero committed Oct 4, 2022
1 parent 2563fdb commit 022db71
Show file tree
Hide file tree
Showing 7 changed files with 266 additions and 283 deletions.
36 changes: 17 additions & 19 deletions Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ public sealed class Config : IConfig
[Description("The amount of seconds every which the plugin should check if round lock is enabled and send a broadcast accordingly. Default: 300")]
public float RLReminderTime { get; set; } = 300;

[Description("Whether or not the EventStart command should cleanup ragdolls. Default: true")]
public bool ESCleanupRagdolls { get; set; } = true;
[Description("Whether or not the EventPrep command should cleanup ragdolls. Default: true")]
public bool EPCleanupRagdolls { get; set; } = true;

[Description("Whether or not the EventStart command should cleanup items. Default: true")]
public bool ESCleanupItems { get; set; } = true;
[Description("Whether or not the EventPrep command should cleanup items. Default: true")]
public bool EPCleanupItems { get; set; } = true;

[Description("Whether or not the EventStart command should enable roundlock. Default: true")]
public bool ESRoundLock { get; set; } = true;
[Description("Whether or not the EventPrep command should enable roundlock. Default: true")]
public bool EPRoundLock { get; set; } = true;

[Description("Whether or not the EventStart command should set MTF and CI tickets to 1 (1 not 0 because at 0 tickets SL will still spawn ~5 people). Default: true")]
public bool ESRespawnTickets { get; set; } = true;
[Description("Whether or not the EventPrep command should set MTF and CI tickets to 1 (1 not 0 because at 0 tickets SL will still spawn ~5 people). Default: true")]
public bool EPRespawnTickets { get; set; } = true;

[Description("Whether or not the person executing the EventStart command should be forceclassed to tutorial. Default: true")]
public bool ESFCToTutorial { get; set; } = true;
[Description("Whether or not the person executing the EventPrep command should be forceclassed to tutorial. Default: true")]
public bool EPFCToTutorial { get; set; } = true;

[Description("Whether or not the EventStart command should lock all doors in the facility. Default: true")]
public bool ESLockAllDoors { get; set; } = true;
[Description("Whether or not the EventPrep command should lock all doors in the facility. Default: true")]
public bool EPLockAllDoors { get; set; } = true;

[Description("Whether or not the person using the EventStart command should have their noclip enabled. Default: true")]
public bool ESEnableNoclip { get; set; } = true;
[Description("Whether or not the person using the EventPrep command should have their noclip enabled. Default: true")]
public bool EPEnableNoclip { get; set; } = true;

[Description("Whether or not everyone except for the person executing the EventStart command should be forceclassed Class D. Default: true")]
public bool ESForceClassEveryone { get; set; } = true;
[Description("Whether or not everyone except the person executing the EventPrep command should be forceclassed to Class D. Default: true")]
public bool EPForceClassEveryone { get; set; } = true;

[Description("The message sent using CASSIE with the EventCountdown command.")]
public string ECCassieMessage { get; set; } = "10 9 8 7 6 5 4 3 2 1 start";
Expand All @@ -61,9 +61,7 @@ public sealed class Config : IConfig

[Description("Whether or not the EventWin command should forceclass everyone except you and your target to spectator. Default: false")]
public bool EWFCEveryoneToSpectator { get; set; } = false;

[Description ("Whether or not the FactionWars command should cleanup items. Default: true.")]
public bool FWCleanupItems { get; set; } = true;

[Description("Whether or not the FactionWars command should disable friendly fire. Default: true.")]
public bool FWDisaableFF { get; set; } = true;
}
Expand Down
46 changes: 6 additions & 40 deletions EventTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,45 +41,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp_publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\Assembly-CSharp_publicized.dll</HintPath>
</Reference>
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Exiled.API, Version=5.3.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\EXILED\Plugins\dependencies\Exiled.API.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags, Version=5.2.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\EXILED\Plugins\Exiled.CreditTags.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomItems, Version=5.2.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\EXILED\Plugins\Exiled.CustomItems.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomRoles, Version=5.2.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\EXILED\Plugins\Exiled.CustomRoles.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events">
<HintPath>C:\Users\Miki\AppData\Roaming\EXILED\Plugins\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader, Version=5.2.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\EXILED\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions, Version=5.2.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\EXILED\Plugins\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="Exiled.Updater, Version=3.1.1.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\exiled files\EXILED\Plugins\Exiled.Updater.dll</HintPath>
</Reference>
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Mirror.dll</HintPath>
Expand Down Expand Up @@ -117,7 +78,7 @@
<Compile Include="Commands\EventExplode.cs" />
<Compile Include="Commands\EventNow.cs" />
<Compile Include="Commands\EventNext.cs" />
<Compile Include="Commands\EventStart.cs" />
<Compile Include="Commands\EventPrep.cs" />
<Compile Include="Commands\EventWin.cs" />
<Compile Include="Commands\FactionWars.cs" />
<Compile Include="Commands\LockZone.cs" />
Expand All @@ -129,5 +90,10 @@
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="EXILED">
<Version>5.3.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
8 changes: 4 additions & 4 deletions Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Plugin : Plugin<Config>
{
public static Plugin Instance;
public override Version RequiredExiledVersion => new Version(5, 3, 0);
public override Version Version => new Version(2, 0, 0);
public override Version Version => new Version(2, 0, 1);
public override string Author => "Miki_hero";

public static int test = 0;
Expand Down Expand Up @@ -60,7 +60,7 @@ public IEnumerator<float> RoundLockToggle()
{
if (Permissions.CheckPermission(pl, "et.roundlockinfo"))
{
pl.Broadcast(5, message, Broadcast.BroadcastFlags.AdminChat);
pl.Broadcast(3, message, Broadcast.BroadcastFlags.AdminChat);
Timing.RunCoroutine(RoundLockReminder(), "RoundLockReminder");
}
}
Expand All @@ -76,7 +76,7 @@ public IEnumerator<float> RoundLockToggle()
{
if (Permissions.CheckPermission(pl, "et.roundlockinfo"))
{
pl.Broadcast(5, message, Broadcast.BroadcastFlags.AdminChat);
pl.Broadcast(3, message, Broadcast.BroadcastFlags.AdminChat);
Timing.KillCoroutines("RoundLockReminder");
}
}
Expand All @@ -91,7 +91,7 @@ public IEnumerator<float> RoundLockReminder()
{
while(true)
{
yield return Timing.WaitForSeconds(Instance.Config.RLReminderTime); //every x ammount of seconds (determined by config) checks if the round lock is enabled, if so sends a broadcast
yield return Timing.WaitForSeconds(Instance.Config.RLReminderTime); //if roundlock has been enabled for 300 (configurable) seconds a broadcast is sent
string message = Instance.Config.RLStillEnabled;
if (Round.IsLocked)
{
Expand Down
Loading

0 comments on commit 022db71

Please sign in to comment.