Updated to 16584 (AKI 2.2.0) + some changes
This commit is contained in:
parent
47e9dae192
commit
7084f649c8
@ -18,9 +18,6 @@ In order to open panel, press keypad "Home" or open game console with ` and writ
|
|||||||
### How to build from source
|
### How to build from source
|
||||||
|
|
||||||
1. Download/clone this repository
|
1. Download/clone this repository
|
||||||
2. Download/clone the `SPT-AKI/Modules` repository: [link](https://dev.sp-tarkov.com/SPT-AKI/Modules)
|
2. Build `SamSWAT.TimeWeatherChanger.csproj` - `SamSWAT.TimeWeatherChanger.dll` should appear in `bin\Debug` directory
|
||||||
3. Move the contents of the `project` folder over to the SPT-AKI Modules `project` folder
|
3. Copy the .dll into the `mod/SamSWAT-TWChanger` folder and rename to `module.dll`
|
||||||
4. Add the `SamSWAT.TimeWeatherChanger` project to the SPT-AKI Modules solution
|
4. That's it, you have a working release of this mod! Follow the `How to install` instructions on how to get the mod into your game
|
||||||
5. Build modules - `SamSWAT.TimeWeatherChanger.dll` should appear under `Build/EscapeFromTarkov_Data/Managed` in the SPT-AKI Modules directory
|
|
||||||
6. Copy the .dll into the `mod/SamSWAT-TWChanger` folder and rename to `module.dll`
|
|
||||||
7. That's it, you have a working release of this mod! Follow the `How to install` instructions on how to get the mod into your game
|
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "time_weather_changer",
|
"name": "time_weather_changer",
|
||||||
"author": "SamSWAT",
|
"author": "SamSWAT",
|
||||||
"version": "1.0.0",
|
"version": "2.0.0",
|
||||||
"license": "CC BY-NC 4.0",
|
"license": "CC BY-NC 4.0",
|
||||||
"akiVersion": "2.1.2"
|
"akiVersion": "2.2.0"
|
||||||
}
|
}
|
||||||
|
|
@ -7,6 +7,8 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
public static GameObject Hook;
|
public static GameObject Hook;
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
Debug.LogError("SamSWAT - Time and Weather Changer loaded");
|
||||||
|
|
||||||
Hook = new GameObject();
|
Hook = new GameObject();
|
||||||
Hook.AddComponent<TimeWeatherController>();
|
Hook.AddComponent<TimeWeatherController>();
|
||||||
Object.DontDestroyOnLoad(Hook);
|
Object.DontDestroyOnLoad(Hook);
|
||||||
|
@ -37,24 +37,27 @@
|
|||||||
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Assembly-CSharp">
|
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\Shared\References\Assembly-CSharp.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>References\Assembly-CSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Comfort">
|
<Reference Include="Comfort, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\Shared\References\Comfort.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>References\Comfort.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="UnityEngine">
|
<Reference Include="UnityEngine">
|
||||||
<HintPath>..\Shared\References\UnityEngine.dll</HintPath>
|
<HintPath>References\UnityEngine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UnityEngine.CoreModule">
|
<Reference Include="UnityEngine.CoreModule">
|
||||||
<HintPath>..\Shared\References\UnityEngine.CoreModule.dll</HintPath>
|
<HintPath>References\UnityEngine.CoreModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UnityEngine.IMGUIModule">
|
<Reference Include="UnityEngine.IMGUIModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>.\UnityEngine.IMGUIModule.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>References\UnityEngine.IMGUIModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UnityEngine.InputLegacyModule">
|
<Reference Include="UnityEngine.InputLegacyModule">
|
||||||
<HintPath>..\Shared\References\UnityEngine.InputLegacyModule.dll</HintPath>
|
<HintPath>References\UnityEngine.InputLegacyModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -39,7 +39,7 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
private static int topwinddirection = 2;
|
private static int topwinddirection = 2;
|
||||||
private static WeatherDebug.Direction _winddirection;
|
private static WeatherDebug.Direction _winddirection;
|
||||||
private static Vector2 _topwinddirection;
|
private static Vector2 _topwinddirection;
|
||||||
|
|
||||||
private static string weatherdebugtex;
|
private static string weatherdebugtex;
|
||||||
private static int targetTimeHours;
|
private static int targetTimeHours;
|
||||||
private static int targetTimeMinutes;
|
private static int targetTimeMinutes;
|
||||||
@ -47,12 +47,13 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
private static KeyCode ToggleKey = KeyCode.Home;
|
private static KeyCode ToggleKey = KeyCode.Home;
|
||||||
private static Dictionary<string, string> ini;
|
private static Dictionary<string, string> ini;
|
||||||
|
|
||||||
private static string modfolder = Path.Combine(Directory.GetParent(Application.dataPath).ToString(), "user/mods/SamSWAT-TWChanger");
|
private static string modfolder;
|
||||||
private static string configpath = Path.Combine(modfolder, "config.ini");
|
private static string configpath;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
Debug.LogError("SamSWAT - Time and Weather Changer loaded");
|
modfolder = Path.Combine(Directory.GetParent(Application.dataPath).ToString(), "user/mods/SamSWAT-TWChanger");
|
||||||
|
configpath = Path.Combine(modfolder, "config.ini");
|
||||||
|
|
||||||
//Duplicate functionality of toggle key
|
//Duplicate functionality of toggle key
|
||||||
ConsoleScreen.Commands.AddCommand(new RegexCMD("twc", match =>
|
ConsoleScreen.Commands.AddCommand(new RegexCMD("twc", match =>
|
||||||
@ -98,7 +99,7 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
//Load config
|
//Load config
|
||||||
StartCoroutine(PreloaderUIWaiter());
|
StartCoroutine(PreloaderUIWaiter());
|
||||||
}
|
}
|
||||||
@ -157,7 +158,7 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
public void OnGUI()
|
public void OnGUI()
|
||||||
{
|
{
|
||||||
if (GUIStatus)
|
if (GUIStatus)
|
||||||
windowRect = GUI.Window(0, windowRect, WindowFunction, "Time & Weather Changer by SamSWAT v1.0");
|
windowRect = GUI.Window(0, windowRect, WindowFunction, "Time & Weather Changer by SamSWAT v2.0");
|
||||||
}
|
}
|
||||||
void WindowFunction(int windowID)
|
void WindowFunction(int windowID)
|
||||||
{
|
{
|
||||||
@ -289,7 +290,7 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
|
|
||||||
GUILayout.Box("Thunder prob: " + Math.Round(_lightningthunderprobability * 1000) / 1000);
|
GUILayout.Box("Thunder prob: " + Math.Round(_lightningthunderprobability * 1000) / 1000);
|
||||||
_lightningthunderprobability = GUILayout.HorizontalSlider(_lightningthunderprobability, 0f, 1f);
|
_lightningthunderprobability = GUILayout.HorizontalSlider(_lightningthunderprobability, 0f, 1f);
|
||||||
|
|
||||||
if (GUILayout.Button("Randomize"))
|
if (GUILayout.Button("Randomize"))
|
||||||
{
|
{
|
||||||
float num = Random.Range(-1f, 1f);
|
float num = Random.Range(-1f, 1f);
|
||||||
@ -412,7 +413,7 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
|
|
||||||
GUILayout.Box("TopWind dir " + _topwinddirection.ToString());
|
GUILayout.Box("TopWind dir " + _topwinddirection.ToString());
|
||||||
topwinddirection = Mathf.RoundToInt(GUILayout.HorizontalSlider(topwinddirection, 1, 6));
|
topwinddirection = Mathf.RoundToInt(GUILayout.HorizontalSlider(topwinddirection, 1, 6));
|
||||||
|
|
||||||
switch (topwinddirection)
|
switch (topwinddirection)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@ -532,8 +533,8 @@ namespace SamSWAT.TimeWeatherChanger
|
|||||||
{
|
{
|
||||||
//reading config.ini and separating line in it into dictionary where key=value so we will be able to use our prefered key
|
//reading config.ini and separating line in it into dictionary where key=value so we will be able to use our prefered key
|
||||||
ini = File.ReadLines(configpath).Where(IsConfigurationLine).Select(line => line.Split('=')).ToDictionary(line => line[0], line => line[1]);
|
ini = File.ReadLines(configpath).Where(IsConfigurationLine).Select(line => line.Split('=')).ToDictionary(line => line[0], line => line[1]);
|
||||||
|
|
||||||
//checking if the line exists in the config file
|
//check if the line exists in the config file
|
||||||
if (!ini.TryGetValue("PanelToggleKey", out var value))
|
if (!ini.TryGetValue("PanelToggleKey", out var value))
|
||||||
{
|
{
|
||||||
//Showing error message if there is no such line
|
//Showing error message if there is no such line
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user