Skip to content

Commit

Permalink
Update EXILED
Browse files Browse the repository at this point in the history
  • Loading branch information
Ugi0 committed Sep 5, 2023
1 parent ae28dc6 commit 1f98c8a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 34 deletions.
10 changes: 10 additions & 0 deletions IDS/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NorthwoodLib" publicKeyToken="null" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
46 changes: 22 additions & 24 deletions IDS/IDS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,47 +33,44 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>F:\JetBrains\Assemblies\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\CommandSystem.Core.dll</HintPath>
<HintPath>..\packages\EXILED.8.1.0\lib\net48\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Exiled.API, Version=7.2.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.API.dll</HintPath>
<Reference Include="Exiled.API, Version=8.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.API.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags, Version=7.2.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.CreditTags.dll</HintPath>
<Reference Include="Exiled.CreditTags, Version=8.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.CreditTags.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomItems, Version=7.2.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.CustomItems.dll</HintPath>
<Reference Include="Exiled.CustomItems, Version=8.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.CustomItems.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomRoles, Version=7.2.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.CustomRoles.dll</HintPath>
<Reference Include="Exiled.CustomRoles, Version=8.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.CustomRoles.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events, Version=7.2.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.Events.dll</HintPath>
<Reference Include="Exiled.Events, Version=8.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader, Version=7.2.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.Loader.dll</HintPath>
<Reference Include="Exiled.Loader, Version=8.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions, Version=7.2.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.Permissions.dll</HintPath>
<Reference Include="Exiled.Permissions, Version=8.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="Exiled.Updater, Version=3.1.2.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\Exiled.Updater.dll</HintPath>
<HintPath>..\packages\EXILED.8.1.0\lib\net48\Exiled.Updater.dll</HintPath>
</Reference>
<Reference Include="Mirror">
<HintPath>F:\JetBrains\Assemblies\Mirror.dll</HintPath>
</Reference>
<Reference Include="NorthwoodLib, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\NorthwoodLib.dll</HintPath>
<Reference Include="NorthwoodLib, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="PluginAPI, Version=13.1.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\PluginAPI.dll</HintPath>
<Reference Include="PluginAPI, Version=12.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.8.1.0\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -83,7 +80,7 @@
<HintPath>..\packages\Defiant_Zombie.KSP.Skeleton.UnityEngine.CoreModule.1.11.2\lib\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.7.2.0\lib\net48\YamlDotNet.dll</HintPath>
<HintPath>..\packages\EXILED.8.1.0\lib\net48\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand All @@ -93,6 +90,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
18 changes: 9 additions & 9 deletions IDS/com.github.sekasin.ids/EventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,24 @@ private void StopIDSTimer(RoundEndedEventArgs ev) {

private void TurnOffRandomRoomLight()
{
int index = rnd.Next(RoomLightController.Instances.Count);

RoomLightController.Instances.RemoveAll(item => Room.Get(item.Room).Zone == ZoneType.Other || Room.Get(item.Room).Zone == ZoneType.Unspecified);
RoomLightController chosen = RoomLightController.Instances[index];

Room room = Room.Get(chosen.Room);

var Roomlist = Room.List.ToList();
Roomlist.RemoveAll(item => item.Zone == ZoneType.Other || item.Zone == ZoneType.Unspecified);

int index = rnd.Next(Roomlist.Count);
Room room = Roomlist[index];
room.TurnOffLights(BlackoutDuration);

if (_debugMode) {
Log.Debug(chosen.Room + " in blackout");
Log.Debug(room + " in blackout");
}

if (rnd.NextDouble() < DoorLockDownChance)
{
room.LockDown(BlackoutDuration);
if (_debugMode) {
Log.Debug(chosen.Room + " in lockdown");
Log.Debug(room + " in lockdown");
}
}

Expand Down
2 changes: 1 addition & 1 deletion IDS/com.github.sekasin.ids/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace IDSSuperScan.com.github.sekasin.ids {
public class SuperScan : Plugin<Config> {
public override string Name => "IDS";
public override string Author => "Ugi0";
public override Version Version => new Version(1, 0, 0);
public override Version Version => new Version(2, 0, 0);
public EventHandler eventHandler;

public override void OnEnabled() {
Expand Down

0 comments on commit 1f98c8a

Please sign in to comment.