diff --git a/.gitattributes b/.gitattributes
index ffcbd162..272b4a1e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,4 +3,5 @@ SCHIZO/Resources/AssetBundles/* merge=ours
*.asset text eol=lf
*.prefab text eol=lf
*.meta text eol=lf
-*.asmdef text eol=lf
\ No newline at end of file
+*.asmdef text eol=lf
+FMOD Project/**/*.xml text eol=lf
\ No newline at end of file
diff --git a/FMOD Project/Metadata/Event/{14de5335-ec95-49af-ba08-f9f994d198c7}.xml b/FMOD Project/Metadata/Event/{14de5335-ec95-49af-ba08-f9f994d198c7}.xml
index 01ec2dc3..6fb1592e 100644
--- a/FMOD Project/Metadata/Event/{14de5335-ec95-49af-ba08-f9f994d198c7}.xml
+++ b/FMOD Project/Metadata/Event/{14de5335-ec95-49af-ba08-f9f994d198c7}.xml
@@ -25,14 +25,13 @@
{ffcde3d2-a590-422e-b66b-7f4ae6420e7a}
-
- {be0c1090-ddc8-47c9-a0cc-a8239b29b00e}
-
{12032229-6fd3-48fb-8248-fd442b00a139}
{e35b7b12-b54d-4e05-a30e-7929664dbfae}
+ {2f19ed91-ae76-4949-8341-65e96d7289b0}
+ {cc5dbe11-70b2-48b5-a896-bf8e14911818}
{6f6c823e-9073-439e-9503-3b2b490ddbfb}
@@ -44,6 +43,10 @@
-
+
+
+
+
@@ -101,20 +120,6 @@
-
+
-
-
+
-
+
+
+
- {be5f00d7-2aee-4c35-adac-2f857328417d}
+ {2015b7cc-f957-411f-9b91-c7ce3da1e8f0}
+ {5432be53-62b7-4e57-877f-2a372869711b}
{1833eab9-d3ed-495c-8dc6-6ced02d0023d}
@@ -80,6 +82,11 @@
{540cf702-5f8a-4a1d-99f5-d9a31a53c833}
+
+
+ {255c0af3-d82c-48de-970b-933bda576119}
+
+
{c7cefa86-ef7f-4549-ac6b-a01dcb464825}
@@ -91,13 +98,19 @@
{34f7799d-ca7f-42a0-aabd-c904ec571a55}
-
+
{b09ba597-cbdf-4c77-8cdf-6e210bc409e1}
+
+
+ {d5383c60-dc96-4ca5-9d32-674ada81bc22}
+
+
+ {cedd8c48-2509-46fe-91a2-5f8d57040cb6}
{2f9a26db-71a7-4215-8bf3-b669341beb9d}
@@ -114,6 +127,11 @@
+
+
+ {d5383c60-dc96-4ca5-9d32-674ada81bc22}
+
+
{9b9dc9e9-2435-4359-97fd-535e67ae46bc}
@@ -144,6 +162,14 @@
{b09ba597-cbdf-4c77-8cdf-6e210bc409e1}
+
+
+ duration
+
+
+ {0122cb9d-2fe0-4d33-836d-09088d51f3a8}
+
+
{f0408717-954e-4a6b-8161-a0076e16d9c2}
@@ -233,6 +259,15 @@
{342c4ac6-3526-4f26-a652-9915c4d066a5}
+
+
+ {255c0af3-d82c-48de-970b-933bda576119}
+
+
+ {dbbc3a4f-fb9b-4358-987e-6cfd51e536c8}
+ {14161fee-c0aa-4126-a8e4-4ebe4e06bcab}
+
+
{6eb3d9cb-e5b9-4596-b62f-b8b1c991c45b}
@@ -247,6 +282,22 @@
{75f0e939-b147-4d77-93a0-6c4a74102569}
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 60
+
+
+ 60000
+
+
0
diff --git a/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs b/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs
index adea7f08..49c651ac 100644
--- a/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs
+++ b/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs
@@ -1,18 +1,14 @@
-using Nautilus.Handlers;
-using Nautilus.Utility;
-
namespace SCHIZO.Jukebox;
public sealed class CustomJukeboxDisk : JukeboxDisk
{
- public string unlockFmodEvent;
-
public new void Start()
{
- if (track == default) LOGGER.LogWarning($"Jukebox disk {name} at {transform.position} was not assigned a track");
-
- if (!string.IsNullOrEmpty(unlockFmodEvent))
- acquireSound = AudioUtils.GetFmodAsset(unlockFmodEvent);
+ if (track == default)
+ {
+ LOGGER.LogError($"Jukebox disk {name} at {transform.position} was not assigned a track, self-destructing");
+ Destroy(this);
+ }
base.Start();
}
diff --git a/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs b/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs
index 95d7d19f..ff8d071c 100644
--- a/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs
+++ b/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs
@@ -2,6 +2,7 @@
using FMOD;
using Nautilus.Handlers;
using Nautilus.Utility;
+using SCHIZO.Helpers;
using UnityEngine;
using BZJukebox = Jukebox;
@@ -145,7 +146,7 @@ private void SpawnDisk(BZJukebox.UnlockableTrack trackId, Vector3 position, Vect
CustomJukeboxDisk diskComp = disk.EnsureComponent();
diskComp.track = trackId;
- diskComp.unlockFmodEvent = unlockFmodEvent;
+ diskComp.acquireSound = AudioUtils.GetFmodAsset(unlockFmodEvent, FMODHelpers.GetId(unlockFmodEvent));
disk.GetComponent().enabled = false; // don't save
diff --git a/SCHIZO/Sounds/Patches/ItemSoundsPatches.cs b/SCHIZO/Sounds/Patches/ItemSoundsPatches.cs
index 3618fc8b..4bd9bc31 100644
--- a/SCHIZO/Sounds/Patches/ItemSoundsPatches.cs
+++ b/SCHIZO/Sounds/Patches/ItemSoundsPatches.cs
@@ -48,14 +48,11 @@ private static void Patch(GameObject useObj)
}
}
- // TODO get the first inventory item with the ingredients' techtype
- // the techtype passed to the function is actually the craft result
- // how did this ever work in the first place holy
+ private static float delayPerItem = 0.2f;
[HarmonyPatch(typeof(Crafter), nameof(Crafter.OnCraftingBegin))]
[HarmonyPostfix]
- public static void PlayCustomCookSound(Crafter __instance, TechType techType)
+ public static void PlayCustomCookSound(Crafter __instance, TechType techType) // the craft result
{
- const float delayPerItem = 0.1f;
#if BELOWZERO
IEnumerable ingredients = TechData.GetIngredients(techType);
#else