Skip to content

Commit 8ac3cfb

Browse files
committed
finally fixed this thing
1 parent 37ae3c8 commit 8ac3cfb

File tree

4 files changed

+76
-1
lines changed

4 files changed

+76
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using Epic.OnlineServices.Stats;
2+
using NewHorizons.Components.SizeControllers;
3+
using NewHorizons.Utility.Files;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
using UnityEngine;
10+
11+
namespace OWJam5ModProject
12+
{
13+
public class ActualBundleMessagerFix : MonoBehaviour
14+
{
15+
static ScreenPrompt prompt;
16+
public void Start()
17+
{
18+
InitializePrompt();
19+
}
20+
21+
static void InitializePrompt()
22+
{
23+
string promptText = "Assetbundles not loaded for Heliostudy!\nThis was likely caused by the New Horizons \"Reload Config\" option.";
24+
prompt = new ScreenPrompt(promptText);
25+
Locator.GetPromptManager().AddScreenPrompt(prompt);
26+
prompt.SetVisibility(true);
27+
}
28+
}
29+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Epic.OnlineServices.Stats;
2+
using NewHorizons.Components.SizeControllers;
3+
using NewHorizons.Utility.Files;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
using UnityEngine;
10+
11+
namespace OWJam5ModProject
12+
{
13+
public static class BundleBrokenMessage
14+
{
15+
16+
static ScreenPrompt prompt;
17+
public static void BeginCheck()
18+
{
19+
bool loadedCorrectly = false;
20+
if (GameObject.FindObjectOfType<GrandOrreryController>())
21+
{
22+
OWJam5ModProject.DebugLog("Bundle loaded correctly!! Thank goodness");
23+
loadedCorrectly = true;
24+
}
25+
if (!loadedCorrectly)
26+
{
27+
OWJam5ModProject.DebugLog("Assetbundles not loaded for Heliostudy! This was likely caused by the New Horizons \"Reload Config\" option.");
28+
GameObject.Find("Walker_Jam5_Platform_Body").gameObject.SetActive(false);
29+
GameObject newObj = new GameObject();
30+
newObj.AddComponent<ActualBundleMessagerFix>();
31+
}
32+
}
33+
}
34+
}

OWJam5ModProject/OWJam5ModProject.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class OWJam5ModProject : ModBehaviour
1818
public static OWJam5ModProject Instance;
1919
public INewHorizons NewHorizons;
2020
private List<GameObject> planetPivots = null;
21+
public bool BundlesBroken = false;
2122

2223
public void Awake()
2324
{
@@ -29,6 +30,7 @@ public void Awake()
2930

3031
public void Start()
3132
{
33+
3234
// Starting here, you'll have access to OWML's mod helper.
3335
ModHelper.Console.WriteLine($"My mod {nameof(OWJam5ModProject)} is loaded!", MessageType.Success);
3436

@@ -59,6 +61,8 @@ void OnStarSystemLoaded(string system)
5961
return;
6062
}
6163

64+
BundleBrokenMessage.BeginCheck();
65+
6266
RotateSystem();
6367
FinalRequirementManager.inJamSystem = true;
6468
InitializeFunnels();
@@ -192,6 +196,14 @@ private void Update()
192196
}
193197
}
194198

199+
200+
private void OnGui()
201+
{
202+
if (BundlesBroken)
203+
{
204+
GUI.Box(new Rect(10, 10, 400, 45), "Assetbundles not loaded for Heliostudy!\nThis was likely caused by the New Horizons \"Reload Config\" option.");
205+
}
206+
}
195207
/**
196208
* Print a string to the console
197209
*/

OWJam5ModProject/planets/heliostudy_platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"parentPath": "Sector/Platform/Root/Ernesto/Root/Credits/CreditsAnchorChild",
1212
"isRelativeToParent": true,
13-
"radius": 100,
13+
"radius": 5,
1414
"deathType": "crushedByElevator",
1515
"gameOver": {
1616
"text": "You are not real.",

0 commit comments

Comments
 (0)