Skip to content

Commit

Permalink
1.8.2 bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cattlesquat committed Dec 31, 2020
1 parent 7b03cdb commit cd93a5c
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 86 deletions.
221 changes: 148 additions & 73 deletions DeathRun/DeathRun.cs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion DeathRun/DeathRunConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class Config : ConfigFile

public const string NO_VEHICLES = "No Vehicles Challenge!";
public const string DEATH_VEHICLES = "Death Run (exotic costs)";
public const string DEATH_VEHICLES_2 = "Death Run (alternate costs)";
public const string HARD_VEHICLES = "Hard (unusual costs)";

public const string RADIATION_DEATHRUN = "Death Run (60m)";
Expand Down Expand Up @@ -102,7 +103,7 @@ public class Config : ConfigFile
[Choice("Power to Exit Vehicles", new string[] { EXORBITANT, DEATHRUN, HARD, NORMAL }), OnChange(nameof(ChangedChoice))]
public string powerExitVehicles = DEATHRUN;

[Choice("Vehicle Costs", new string[] { NO_VEHICLES, DEATH_VEHICLES, HARD_VEHICLES, NORMAL }), OnChange(nameof(ChangedChoice))]
[Choice("Vehicle Costs", new string[] { NO_VEHICLES, DEATH_VEHICLES, DEATH_VEHICLES_2, HARD_VEHICLES, NORMAL }), OnChange(nameof(ChangedChoice))]
public string vehicleCosts = DEATH_VEHICLES;

[Choice("Habitat Builder", new string[] { DEATHRUN, HARD, NORMAL }), OnChange(nameof(ChangedChoice))]
Expand Down
2 changes: 1 addition & 1 deletion DeathRun/DeathRunUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public static void ShowHighScores(bool should)
}

highScoreLabel.setAlign(TextAnchor.MiddleCenter);
highScoreLabel.ShowMessage("Death Run 1.8.1 - Best Scores");
highScoreLabel.ShowMessage("Death Run 1.8.2 - Best Scores");
highScoreTag.setAlign(TextAnchor.MiddleCenter);

int pick;
Expand Down
2 changes: 1 addition & 1 deletion DeathRun/Patchers/AggressionPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public static void PostFix(EcoRegion __instance, EcoTargetType type, Vector3 wsP
{
float sqrMagnitude = (wsPos - ecoTarget.GetPosition()).sqrMagnitude;

if (((ecoTarget.GetGameObject() == Player.main.gameObject) && !Player.main.IsInside()) ||
if (((ecoTarget.GetGameObject() == Player.main.gameObject) && !Player.main.IsInside() && Player.main.IsUnderwater()) ||
(ecoTarget.GetGameObject().GetComponent<Vehicle>() && (ecoTarget.GetGameObject().GetComponent<Vehicle>() == Player.main.currentMountedVehicle)))
{
bool feeding = false;
Expand Down
9 changes: 8 additions & 1 deletion DeathRun/Patchers/DamagePatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ public static void Postfix(DamageType type, GameObject target, ref float __resul
break;

case DamageType.Normal:
__result *= little;
if (__result < 50)
{
__result *= UnityEngine.Random.Range(little, big);
}
else
{
__result *= little;
}
break;

case DamageType.Poison:
Expand Down
2 changes: 1 addition & 1 deletion DeathRun/Patchers/MainMenuPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static bool Prefix()


[HarmonyPatch(typeof(uGUI_MainMenu))]
[HarmonyPatch("OnButtonFreedom")]
[HarmonyPatch("OnButtonCreative")]
internal class CreativeButtonPatcher
{
[HarmonyPrefix]
Expand Down
4 changes: 2 additions & 2 deletions DeathRun/Patchers/NitroLevPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ public static bool Prefix (ref NitrogenLevel __instance)
{
DeathRunUtils.CenterMessage("Decompression Warning", 5);
DeathRunUtils.CenterMessage("Dive to Safe Depth!", 5, 1);
DeathRun.saveData.nitroSave.n2WarningTicks = ticks;
}
}
DeathRun.saveData.nitroSave.n2WarningTicks = ticks;
}
}

Expand Down Expand Up @@ -392,9 +392,9 @@ private static void doAscentWarning (int ticks)
{
ErrorMessage.AddMessage("Ascending too quickly!");
DeathRunUtils.CenterMessage("Ascending too quickly!", 5);
DeathRun.saveData.nitroSave.ascentWarningTicks = ticks;
}
}
DeathRun.saveData.nitroSave.ascentWarningTicks = ticks;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions DeathRun/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.1.0")]
[assembly: AssemblyFileVersion("1.8.1.0")]
[assembly: AssemblyVersion("1.8.2.0")]
[assembly: AssemblyFileVersion("1.8.2.0")]
5 changes: 4 additions & 1 deletion DeathRun/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEATH RUN - 1.8.1 - by Cattlesquat "standing on the shoulders of giants"
DEATH RUN - 1.8.2 - by Cattlesquat "standing on the shoulders of giants"

Turns Subnautica into a "roguelike" where everything is harder and the only real question is how LONG you can survive.

Expand Down Expand Up @@ -46,6 +46,9 @@ Turns Subnautica into a "roguelike" where everything is harder and the only real
• 1.8 - Damage increases WEREN'T WORKING. Now they are! FEAR THE DAMAGE INCREASES!!!
• 1.8 - Won't take Bends damage while inside your own base
• 1.8 - Can adjust the frequency with which Bends / Air Breathability / Etc warnings (aka "tips") appear
• 1.8.2 - Alternative "Death Run Costs" for Vehicles available
• 1.8.2 - Fixed lack of bends damage w/ warnings turned off
• 1.8.2 - Spotlights back to only requiring one scan (since they don't despawn when you scan them, no point)
-------------------------------------------------------------------------------------------------------------

:: GENERAL OTHER STUFF ::
Expand Down
2 changes: 1 addition & 1 deletion DeathRun/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Id": "DeathRun",
"DisplayName": "DeathRun",
"Author": "Cattlesquat",
"Version": "1.8.1",
"Version": "1.8.2",
"Enable": true,
"AssemblyName": "DeathRun.dll",
"EntryMethod": "DeathRun.DeathRun.Patch",
Expand Down
5 changes: 4 additions & 1 deletion QMods/DeathRun/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEATH RUN - 1.7.3 - by Cattlesquat "standing on the shoulders of giants"
DEATH RUN - 1.8.2 - by Cattlesquat "standing on the shoulders of giants"

Turns Subnautica into a "roguelike" where everything is harder and the only real question is how LONG you can survive.

Expand Down Expand Up @@ -46,6 +46,9 @@ Turns Subnautica into a "roguelike" where everything is harder and the only real
• 1.8 - Damage increases WEREN'T WORKING. Now they are! FEAR THE DAMAGE INCREASES!!!
• 1.8 - Won't take Bends damage while inside your own base
• 1.8 - Can adjust the frequency with which Bends / Air Breathability / Etc warnings (aka "tips") appear
• 1.8.2 - Alternative "Death Run Costs" for Vehicles available
• 1.8.2 - Fixed lack of bends damage w/ warnings turned off
• 1.8.2 - Spotlights back to only requiring one scan (since they don't despawn when you scan them, no point)
-------------------------------------------------------------------------------------------------------------

:: GENERAL OTHER STUFF ::
Expand Down
2 changes: 1 addition & 1 deletion QMods/DeathRun/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Id": "DeathRun",
"DisplayName": "DeathRun",
"Author": "Cattlesquat",
"Version": "1.7.3",
"Version": "1.8.2",
"Enable": true,
"AssemblyName": "DeathRun.dll",
"EntryMethod": "DeathRun.DeathRun.Patch",
Expand Down

0 comments on commit cd93a5c

Please sign in to comment.