-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d514331
commit 1053406
Showing
5 changed files
with
445 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using Modding; | ||
using UnityEngine; | ||
using System.IO; | ||
using System.Diagnostics; | ||
namespace HollowSpouse | ||
{ | ||
public class HollowSpouse : Mod, IGlobalSettings<GlobalSettings>, ITogglableMod | ||
{ | ||
|
||
private float falltimer = 0f; | ||
|
||
public bool ToggleButtonInsideMenu => true; | ||
|
||
public static GlobalSettings GS { get; set; } = new GlobalSettings(); | ||
|
||
new public string GetName() => "HollowSpouse"; | ||
|
||
public override string GetVersion() => "0.9.5"; | ||
|
||
public Process processTemp; | ||
public override void Initialize() | ||
{ | ||
if (Process.GetProcessesByName("lovespouse").Length == 0) | ||
{ | ||
Process.Start(Application.dataPath + "/Managed/Mods/HollowSpouse/" + "lovespouse.exe"); | ||
|
||
} | ||
if(File.Exists(Application.dataPath + "/Managed/Mods/HollowSpouse/" + "vib.dat")) | ||
{ | ||
File.Delete(Application.dataPath + "/Managed/Mods/HollowSpouse/" + "vib.dat"); | ||
} | ||
ModHooks.HeroUpdateHook += HeroUpdateHook; | ||
} | ||
|
||
private void HeroUpdateHook() | ||
{ | ||
if (Process.GetProcessesByName("lovespouse").Length == 0) | ||
{ | ||
Process.Start(Application.dataPath + "/Managed/Mods/HollowSpouse/" + "lovespouse.exe"); | ||
|
||
} | ||
File.WriteAllText(Application.dataPath + "/Managed/Mods/HollowSpouse/" + "vib.dat","SHAKE " + ((int)(9 * (1 - ((float)GameObject.Find("Knight").GetComponent<HeroController>().playerData.health / (float)GameObject.Find("Knight").GetComponent<HeroController>().playerData.maxHealth)))).ToString() + " 0.1"); | ||
} | ||
|
||
|
||
public void Unload() | ||
{ | ||
processTemp.Kill(); | ||
ModHooks.HeroUpdateHook -= HeroUpdateHook; | ||
Log("Mod unloaded"); | ||
} | ||
|
||
public void OnLoadGlobal(GlobalSettings s) => GS = s; | ||
|
||
public GlobalSettings OnSaveGlobal() => GS; | ||
} | ||
|
||
public class GlobalSettings | ||
{ | ||
|
||
} | ||
} | ||
|
||
/*Falltimer max amounts: | ||
* Resting Grounds drop: 4.036 | ||
* King's Pass drop: 4.086 | ||
* Crossroads drop: 4.270 | ||
* Cliffs leftside drop: 6.822 | ||
* CoT elevator drop: 8.289 | ||
* Abyss full drop: 11.000 | ||
* | ||
* Built in BIG_FALL_TIME = 1.1 | ||
*/ |
Oops, something went wrong.