Initial upload of mod.
This commit is contained in:
parent
f5f9c4cff7
commit
c2963a200a
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.zip
|
||||
.vs/
|
||||
ValensHasThePower/bin/
|
||||
ValensHasThePower/obj/
|
24
ValensHasThePower/Patches.cs
Normal file
24
ValensHasThePower/Patches.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System.Reflection;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.Reflection.Utils;
|
||||
using EFT;
|
||||
|
||||
namespace ValensHasThePower
|
||||
{
|
||||
public class PatchThePower : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
var result = typeof(MainApplication).GetMethod("method_41", PatchConstants.PrivateFlags);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
[PatchPostfix]
|
||||
private static void PatchPostFix()
|
||||
{
|
||||
PowerOn.Start();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
58
ValensHasThePower/Program.cs
Normal file
58
ValensHasThePower/Program.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using BepInEx;
|
||||
using UnityEngine;
|
||||
using EFT.Interactive;
|
||||
using System.Linq;
|
||||
|
||||
namespace ValensHasThePower
|
||||
{
|
||||
[BepInPlugin("com.Valens.HasThePower", "ValensHasThePower", "1.0.0")]
|
||||
public class Plugin : BaseUnityPlugin
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
Logger.LogInfo($"Valens...now has the POWER!!!");
|
||||
new PatchThePower().Enable();
|
||||
}
|
||||
}
|
||||
|
||||
public class PowerOn
|
||||
{
|
||||
public static void Start()
|
||||
{
|
||||
var power = GameObject.FindObjectsOfType<Switch>().ToList();
|
||||
|
||||
foreach (var Switch in power) // Turn the Power Station switch to On.
|
||||
{
|
||||
//Interchange - Power to Mall
|
||||
if (Switch.Id == "Shopping_Mall_DesignStuff_00055"&&Switch.name == "reserve_electric_switcher_lever")
|
||||
{
|
||||
Switch.DoorState = EDoorState.Open;
|
||||
Debug.LogError(Switch.name);
|
||||
}
|
||||
//Activation of Toilet Key Card Reader in Burger Stop
|
||||
if (Switch.name == "Node_Keycard_Saferoom")
|
||||
{
|
||||
Switch.DoorState = EDoorState.Open;
|
||||
}
|
||||
//Activation of OBJ21 Container
|
||||
if (Switch.Id == "Shopping_Mall_DesignStuff_00061"&&Switch.Id == "reserve_electric_switcher_lever")
|
||||
{
|
||||
Switch.DoorState = EDoorState.Open;
|
||||
}
|
||||
|
||||
//Customs - Power to ZB-013 Extract.
|
||||
if (Switch.Id == "custom_DesignStuff_00034"&&Switch.name == "reserve_electric_switcher_lever")
|
||||
{
|
||||
Switch.DoorState = EDoorState.Open;
|
||||
}
|
||||
|
||||
if (Switch.ExfiltrationPoint == "EXFIL_ZONE_ZB013")
|
||||
{
|
||||
Switch.ExfiltrationPoint.Status = ??
|
||||
}
|
||||
|
||||
//Reserve
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
28
ValensHasThePower/ValensHasThePower.csproj
Normal file
28
ValensHasThePower/ValensHasThePower.csproj
Normal file
@ -0,0 +1,28 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Aki.Common">
|
||||
<HintPath>H:\SP Tarkov\EFT (2.3)\EscapeFromTarkov_Data\Managed\Aki.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Aki.Reflection">
|
||||
<HintPath>H:\SP Tarkov\EFT (2.3)\EscapeFromTarkov_Data\Managed\Aki.Reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>H:\SP Tarkov\EFT (2.3)\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>H:\SP Tarkov\EFT (2.3)\BepInEx\core\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>H:\SP Tarkov\EFT (2.3)\EscapeFromTarkov_Data\Managed\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>H:\SP Tarkov\EFT (2.3)\EscapeFromTarkov_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
25
ValensHasThePower/ValensHasThePower.sln
Normal file
25
ValensHasThePower/ValensHasThePower.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32228.430
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValensHasThePower", "ValensHasThePower.csproj", "{570E1C73-2B17-4FE0-B476-23BEA636E293}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{570E1C73-2B17-4FE0-B476-23BEA636E293}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{570E1C73-2B17-4FE0-B476-23BEA636E293}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{570E1C73-2B17-4FE0-B476-23BEA636E293}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{570E1C73-2B17-4FE0-B476-23BEA636E293}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {705DD5E9-5B56-4E61-8E01-F1E6DE66E98A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
x
Reference in New Issue
Block a user