mirror of
https://github.com/TheJordanDev/PEAK-JordanMod.git
synced 2026-10-17 08:05:25 +02:00
0.1.11 | Fix for last update
This commit is contained in:
@@ -24,7 +24,7 @@ public class BagsForEveryonePatch
|
||||
bool isFirstSpawner = spawner.transform.IsChildOf(GameObject.Find("Biome_1").transform);
|
||||
if (!isFirstSpawner) return;
|
||||
|
||||
int playerCount = PhotonNetwork.PlayerList.Length - 1;
|
||||
int playerCount = PhotonNetwork.PlayerList.Length - 1; // Already one bag
|
||||
if (playerCount <= 0) return;
|
||||
for (int i = 1; i <= playerCount; i++)
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ public class BetterBuglePatch
|
||||
// BetterBugleUI.Instance?.ShowActionbar("No songs available.");
|
||||
// return;
|
||||
// }
|
||||
if (AudioSyncWorker.IsLoading) return;
|
||||
if (AudioSyncWorker.IsLoading || AudioSyncWorker.IsSyncing) return;
|
||||
if (!BetterBugleModule.HadConfirmation)
|
||||
{
|
||||
BetterBugleUI.Instance?.ShowActionbar("Are you sure you want to refresh songs ? Right-click again to reload.");
|
||||
@@ -57,15 +57,18 @@ public class BetterBuglePatch
|
||||
{
|
||||
BetterBugleModule.HadConfirmation = false; // Reset confirmation state
|
||||
BetterBugleUI.Instance?.ShowActionbar("Refreshing songs...");
|
||||
AudioSyncService.GetAudioClips();
|
||||
// Refresh = unload everything and reload from local files only (no network).
|
||||
// For downloading from the audio bank API, use the Sync keybind instead.
|
||||
AudioSyncService.ClearAudioClips();
|
||||
AudioSyncWorker.GetAudioClips();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static IEnumerator ResetConfirmation()
|
||||
{
|
||||
if (!BetterBugleModule.HadConfirmation) yield break;
|
||||
yield return new WaitForSeconds(2f);
|
||||
if (!BetterBugleModule.HadConfirmation) yield break; // already confirmed (or reset) in the meantime
|
||||
BetterBugleUI.Instance?.ShowActionbar("No answer, not refreshing songs.");
|
||||
BetterBugleModule.HadConfirmation = false;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@ class EasyBackpackPatch
|
||||
[HarmonyPrefix]
|
||||
static bool BackpackWheelUpdatePrefix(BackpackWheel __instance)
|
||||
{
|
||||
if (!__instance.backpack.exists || __instance.backpack.locationTransform == null)
|
||||
{
|
||||
GUIManager.instance.CloseBackpackWheel();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isBackPackOpen = EasyBackpackModule.Instance?._isBackpackOpen ?? false;
|
||||
|
||||
if (!Character.localCharacter.input.interactIsPressed && !isBackPackOpen)
|
||||
@@ -18,13 +24,17 @@ class EasyBackpackPatch
|
||||
return false;
|
||||
}
|
||||
|
||||
if (__instance.backpack.locationTransform != null && Vector3.Distance(__instance.backpack.locationTransform.position, Character.localCharacter.Center) > 6f)
|
||||
if (Vector3.Distance(__instance.backpack.locationTransform.position, Character.localCharacter.Center) > 6f)
|
||||
{
|
||||
GUIManager.instance.CloseBackpackWheel();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (__instance.chosenSlice.IsSome && !__instance.chosenSlice.Value.isBackpackWear && !__instance.slices[__instance.chosenSlice.Value.slotID + 1].image.enabled)
|
||||
if (__instance.chosenSlice.IsSome && __instance.chosenSlice.Value.isJetpackFuelSlice)
|
||||
{
|
||||
__instance.currentlyHeldItem.transform.position = Vector3.Lerp(__instance.currentlyHeldItem.transform.position, __instance.jetpackSlice.transform.GetChild(0).GetChild(0).position, Time.deltaTime * 20f);
|
||||
}
|
||||
else if (__instance.chosenSlice.IsSome && !__instance.chosenSlice.Value.isBackpackWear && !__instance.slices[__instance.chosenSlice.Value.slotID + 1].image.enabled)
|
||||
{
|
||||
__instance.currentlyHeldItem.transform.position = Vector3.Lerp(__instance.currentlyHeldItem.transform.position, __instance.slices[__instance.chosenSlice.Value.slotID + 1].transform.GetChild(0).GetChild(0).position, Time.deltaTime * 20f);
|
||||
}
|
||||
@@ -32,7 +42,7 @@ class EasyBackpackPatch
|
||||
{
|
||||
__instance.currentlyHeldItem.transform.localPosition = Vector3.Lerp(__instance.currentlyHeldItem.transform.localPosition, Vector3.zero, Time.deltaTime * 20f);
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user