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 @@ + + {ce472bdb-9441-4589-a135-2382c2dec4ef} + {e36e2359-e1e5-446e-8940-df0180669392} + {2d0ff93e-e9de-4501-b4d8-d92b3833977f} @@ -64,11 +67,6 @@ - - - {edf25067-7c68-4bae-a562-28adb0421faa} - - false @@ -79,6 +77,16 @@ {2d0ff93e-e9de-4501-b4d8-d92b3833977f} + + + {540cf702-5f8a-4a1d-99f5-d9a31a53c833} + + + + + {255c0af3-d82c-48de-970b-933bda576119} + + {8e46e64e-457f-4893-948d-f2f11df92fb3} @@ -90,8 +98,19 @@ {9f603c91-fa81-4542-bce8-c4de1133487c} + + + {7057829f-97fc-4dba-b6ca-62909f5e8d69} + + + + + {d0dd02e5-0744-4c06-9a12-193db7e36922} + + + {baa35633-7c5f-4801-8218-2ca20461e2b4} {4828a929-4152-46e5-b98c-945a7a7ea1b1} @@ -101,20 +120,6 @@ - - - Audio 1 - - - {68b83339-e8c6-49c6-8d91-d80b3f5d42f4} - - - {9bfa4f8e-25cc-42df-a016-9e16357452c9} - - - {7f6d89a1-e8a7-4ba1-a645-d5a9ca507315} - - {9069bddd-ad6f-43a1-aabc-485a75f1a42f} @@ -122,6 +127,11 @@ + + + {7057829f-97fc-4dba-b6ca-62909f5e8d69} + + {4dffe96f-ae99-4cac-b298-7eeb65e521e0} @@ -136,12 +146,6 @@ - - - {7db1ee88-2e2c-458f-86a3-4707c6e1d1d3} - - - @@ -151,6 +155,14 @@ {d0dd02e5-0744-4c06-9a12-193db7e36922} + + + duration + + + {2a8988d0-789f-411d-aa48-d9d033b17f54} + + {bdba604e-eb1c-4dec-8a23-2df5dc12f1db} @@ -196,7 +208,6 @@ {91075e86-d92e-42ae-a719-7c70cc11cb68} - panBlend @@ -206,6 +217,15 @@ {2654bb0b-10ce-41cf-af83-58ed41c0bfe6} + + + {255c0af3-d82c-48de-970b-933bda576119} + + + {fcb31373-130a-4d8d-88e2-97f29331d23c} + {6f444e49-8cd2-4993-8736-15f5eb488fe0} + + {12032229-6fd3-48fb-8248-fd442b00a139} @@ -220,6 +240,22 @@ {242edb1b-6363-4528-8f9f-9078bf04bfc6} + + + 0 + + + 0 + + + + + 60 + + + 60000 + + 0 diff --git a/FMOD Project/Metadata/Event/{73857f49-d31c-44b0-a602-7e66899dbe7c}.xml b/FMOD Project/Metadata/Event/{73857f49-d31c-44b0-a602-7e66899dbe7c}.xml index 5e7f3da7..d3ccba24 100644 --- a/FMOD Project/Metadata/Event/{73857f49-d31c-44b0-a602-7e66899dbe7c}.xml +++ b/FMOD Project/Metadata/Event/{73857f49-d31c-44b0-a602-7e66899dbe7c}.xml @@ -138,6 +138,10 @@ + + {bd0a1f98-e9b3-4358-bd8d-8dc673720bcc} + {8d4e9391-e0ab-4bf2-8ae1-2cb8b2fcc6e6} + {14de5335-ec95-49af-ba08-f9f994d198c7} @@ -148,4 +152,14 @@ + + + {2f19ed91-ae76-4949-8341-65e96d7289b0} + + + + + {cc5dbe11-70b2-48b5-a896-bf8e14911818} + + diff --git a/FMOD Project/Metadata/Event/{cea36772-648f-4857-8b42-285d867c2778}.xml b/FMOD Project/Metadata/Event/{cea36772-648f-4857-8b42-285d867c2778}.xml index be005ee9..d1c3a11f 100644 --- a/FMOD Project/Metadata/Event/{cea36772-648f-4857-8b42-285d867c2778}.xml +++ b/FMOD Project/Metadata/Event/{cea36772-648f-4857-8b42-285d867c2778}.xml @@ -31,6 +31,7 @@ {03a87551-be1b-495b-b05d-596221f5f706} {ba9ad230-e03d-4506-b5a0-2aeb5a8b9751} + {f76091f1-08f6-4ac7-b703-6a06ed1d3a1f} {6f6c823e-9073-439e-9503-3b2b490ddbfb} @@ -43,7 +44,8 @@ - {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