diff --git a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3 b/FMOD Project/Assets/jukebox/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3 similarity index 100% rename from Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3 rename to FMOD Project/Assets/jukebox/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3 diff --git a/FMOD Project/Assets/hatevedal-01.ogg b/FMOD Project/Assets/neuro logs/hate vedal/hatevedal-01.ogg similarity index 100% rename from FMOD Project/Assets/hatevedal-01.ogg rename to FMOD Project/Assets/neuro logs/hate vedal/hatevedal-01.ogg diff --git a/FMOD Project/Assets/hatevedal-02.ogg b/FMOD Project/Assets/neuro logs/hate vedal/hatevedal-02.ogg similarity index 100% rename from FMOD Project/Assets/hatevedal-02.ogg rename to FMOD Project/Assets/neuro logs/hate vedal/hatevedal-02.ogg diff --git a/FMOD Project/Assets/hatevedal-03.ogg b/FMOD Project/Assets/neuro logs/hate vedal/hatevedal-03.ogg similarity index 100% rename from FMOD Project/Assets/hatevedal-03.ogg rename to FMOD Project/Assets/neuro logs/hate vedal/hatevedal-03.ogg diff --git a/FMOD Project/Assets/hatevedal-04.ogg b/FMOD Project/Assets/neuro logs/hate vedal/hatevedal-04.ogg similarity index 100% rename from FMOD Project/Assets/hatevedal-04.ogg rename to FMOD Project/Assets/neuro logs/hate vedal/hatevedal-04.ogg diff --git a/FMOD Project/Assets/hatevedal-05.ogg b/FMOD Project/Assets/neuro logs/hate vedal/hatevedal-05.ogg similarity index 100% rename from FMOD Project/Assets/hatevedal-05.ogg rename to FMOD Project/Assets/neuro logs/hate vedal/hatevedal-05.ogg diff --git a/FMOD Project/Assets/hatevedal-06.ogg b/FMOD Project/Assets/neuro logs/hate vedal/hatevedal-06.ogg similarity index 100% rename from FMOD Project/Assets/hatevedal-06.ogg rename to FMOD Project/Assets/neuro logs/hate vedal/hatevedal-06.ogg diff --git a/FMOD Project/Assets/hatevedal-07.ogg b/FMOD Project/Assets/neuro logs/hate vedal/hatevedal-07.ogg similarity index 100% rename from FMOD Project/Assets/hatevedal-07.ogg rename to FMOD Project/Assets/neuro logs/hate vedal/hatevedal-07.ogg diff --git a/FMOD Project/Assets/lovevedal-01.ogg b/FMOD Project/Assets/neuro logs/love vedal/lovevedal-01.ogg similarity index 100% rename from FMOD Project/Assets/lovevedal-01.ogg rename to FMOD Project/Assets/neuro logs/love vedal/lovevedal-01.ogg diff --git a/FMOD Project/Assets/lovevedal-02.ogg b/FMOD Project/Assets/neuro logs/love vedal/lovevedal-02.ogg similarity index 100% rename from FMOD Project/Assets/lovevedal-02.ogg rename to FMOD Project/Assets/neuro logs/love vedal/lovevedal-02.ogg diff --git a/FMOD Project/Assets/lovevedal-03.ogg b/FMOD Project/Assets/neuro logs/love vedal/lovevedal-03.ogg similarity index 100% rename from FMOD Project/Assets/lovevedal-03.ogg rename to FMOD Project/Assets/neuro logs/love vedal/lovevedal-03.ogg diff --git a/FMOD Project/Assets/lovevedal-04.ogg b/FMOD Project/Assets/neuro logs/love vedal/lovevedal-04.ogg similarity index 100% rename from FMOD Project/Assets/lovevedal-04.ogg rename to FMOD Project/Assets/neuro logs/love vedal/lovevedal-04.ogg diff --git a/FMOD Project/Assets/lovevedal-05.ogg b/FMOD Project/Assets/neuro logs/love vedal/lovevedal-05.ogg similarity index 100% rename from FMOD Project/Assets/lovevedal-05.ogg rename to FMOD Project/Assets/neuro logs/love vedal/lovevedal-05.ogg diff --git a/FMOD Project/Assets/lovevedal-06.ogg b/FMOD Project/Assets/neuro logs/love vedal/lovevedal-06.ogg similarity index 100% rename from FMOD Project/Assets/lovevedal-06.ogg rename to FMOD Project/Assets/neuro logs/love vedal/lovevedal-06.ogg diff --git a/FMOD Project/Assets/lovevedal-07.ogg b/FMOD Project/Assets/neuro logs/love vedal/lovevedal-07.ogg similarity index 100% rename from FMOD Project/Assets/lovevedal-07.ogg rename to FMOD Project/Assets/neuro logs/love vedal/lovevedal-07.ogg diff --git a/FMOD Project/Metadata/Asset/{19d1452c-b977-4ac6-95e5-eb91a3d88fee}.xml b/FMOD Project/Metadata/Asset/{19d1452c-b977-4ac6-95e5-eb91a3d88fee}.xml new file mode 100644 index 00000000..b03c143c --- /dev/null +++ b/FMOD Project/Metadata/Asset/{19d1452c-b977-4ac6-95e5-eb91a3d88fee}.xml @@ -0,0 +1,11 @@ + + + + + jukebox/ + + + {ed559c48-6dff-4cc2-8829-33aeecf805d3} + + + diff --git a/FMOD Project/Metadata/Asset/{3d15c50c-53bc-4436-9fcf-4974e03be120}.xml b/FMOD Project/Metadata/Asset/{3d15c50c-53bc-4436-9fcf-4974e03be120}.xml new file mode 100644 index 00000000..caa68ded --- /dev/null +++ b/FMOD Project/Metadata/Asset/{3d15c50c-53bc-4436-9fcf-4974e03be120}.xml @@ -0,0 +1,11 @@ + + + + + neuro logs/love vedal/ + + + {ed559c48-6dff-4cc2-8829-33aeecf805d3} + + + diff --git a/FMOD Project/Metadata/Asset/{7d02f929-84d8-409e-9ddd-0922fa17f344}.xml b/FMOD Project/Metadata/Asset/{7d02f929-84d8-409e-9ddd-0922fa17f344}.xml new file mode 100644 index 00000000..6548041f --- /dev/null +++ b/FMOD Project/Metadata/Asset/{7d02f929-84d8-409e-9ddd-0922fa17f344}.xml @@ -0,0 +1,11 @@ + + + + + neuro logs/ + + + {ed559c48-6dff-4cc2-8829-33aeecf805d3} + + + diff --git a/FMOD Project/Metadata/Asset/{82a41305-c31b-4be9-bd31-79772ffbea59}.xml b/FMOD Project/Metadata/Asset/{82a41305-c31b-4be9-bd31-79772ffbea59}.xml new file mode 100644 index 00000000..349cf50c --- /dev/null +++ b/FMOD Project/Metadata/Asset/{82a41305-c31b-4be9-bd31-79772ffbea59}.xml @@ -0,0 +1,11 @@ + + + + + neuro logs/hate vedal/ + + + {ed559c48-6dff-4cc2-8829-33aeecf805d3} + + + diff --git a/FMOD Project/Metadata/AudioFile/{21bfa9d0-a16a-4e7c-a28c-112b0f4fac90}.xml b/FMOD Project/Metadata/AudioFile/{21bfa9d0-a16a-4e7c-a28c-112b0f4fac90}.xml index 3560fdab..36db3f3e 100644 --- a/FMOD Project/Metadata/AudioFile/{21bfa9d0-a16a-4e7c-a28c-112b0f4fac90}.xml +++ b/FMOD Project/Metadata/AudioFile/{21bfa9d0-a16a-4e7c-a28c-112b0f4fac90}.xml @@ -2,7 +2,7 @@ - lovevedal-02.ogg + neuro logs/love vedal/lovevedal-02.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{2be3055a-d3ef-409e-8c43-5cb6b59355e3}.xml b/FMOD Project/Metadata/AudioFile/{2be3055a-d3ef-409e-8c43-5cb6b59355e3}.xml new file mode 100644 index 00000000..7ed5e9cd --- /dev/null +++ b/FMOD Project/Metadata/AudioFile/{2be3055a-d3ef-409e-8c43-5cb6b59355e3}.xml @@ -0,0 +1,23 @@ + + + + + jukebox/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3 + + + true + + + 48 + + + 2 + + + 206.328 + + + {ed559c48-6dff-4cc2-8829-33aeecf805d3} + + + diff --git a/FMOD Project/Metadata/AudioFile/{4f72d2fc-acda-4837-9930-04937b931d3e}.xml b/FMOD Project/Metadata/AudioFile/{4f72d2fc-acda-4837-9930-04937b931d3e}.xml index f0ba7e3f..9d1429a9 100644 --- a/FMOD Project/Metadata/AudioFile/{4f72d2fc-acda-4837-9930-04937b931d3e}.xml +++ b/FMOD Project/Metadata/AudioFile/{4f72d2fc-acda-4837-9930-04937b931d3e}.xml @@ -2,7 +2,7 @@ - hatevedal-07.ogg + neuro logs/hate vedal/hatevedal-07.ogg 24 diff --git a/FMOD Project/Metadata/AudioFile/{55214acb-12a4-461d-b691-779411fb3fe4}.xml b/FMOD Project/Metadata/AudioFile/{55214acb-12a4-461d-b691-779411fb3fe4}.xml index 06f468a5..4fe716e2 100644 --- a/FMOD Project/Metadata/AudioFile/{55214acb-12a4-461d-b691-779411fb3fe4}.xml +++ b/FMOD Project/Metadata/AudioFile/{55214acb-12a4-461d-b691-779411fb3fe4}.xml @@ -2,7 +2,7 @@ - lovevedal-04.ogg + neuro logs/love vedal/lovevedal-04.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{5b3c7561-0894-4652-9fe3-dfe0e3f53863}.xml b/FMOD Project/Metadata/AudioFile/{5b3c7561-0894-4652-9fe3-dfe0e3f53863}.xml index 1c890cde..8afac2ab 100644 --- a/FMOD Project/Metadata/AudioFile/{5b3c7561-0894-4652-9fe3-dfe0e3f53863}.xml +++ b/FMOD Project/Metadata/AudioFile/{5b3c7561-0894-4652-9fe3-dfe0e3f53863}.xml @@ -2,7 +2,7 @@ - lovevedal-01.ogg + neuro logs/love vedal/lovevedal-01.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{7332095b-7f97-4afa-8a6e-f53c429e3938}.xml b/FMOD Project/Metadata/AudioFile/{7332095b-7f97-4afa-8a6e-f53c429e3938}.xml index d436fec4..57dddd1f 100644 --- a/FMOD Project/Metadata/AudioFile/{7332095b-7f97-4afa-8a6e-f53c429e3938}.xml +++ b/FMOD Project/Metadata/AudioFile/{7332095b-7f97-4afa-8a6e-f53c429e3938}.xml @@ -2,7 +2,7 @@ - hatevedal-01.ogg + neuro logs/hate vedal/hatevedal-01.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{7374f9bf-bbc5-488b-9e53-23191092a74a}.xml b/FMOD Project/Metadata/AudioFile/{7374f9bf-bbc5-488b-9e53-23191092a74a}.xml index 45c1d363..c24c2d1a 100644 --- a/FMOD Project/Metadata/AudioFile/{7374f9bf-bbc5-488b-9e53-23191092a74a}.xml +++ b/FMOD Project/Metadata/AudioFile/{7374f9bf-bbc5-488b-9e53-23191092a74a}.xml @@ -2,7 +2,7 @@ - hatevedal-05.ogg + neuro logs/hate vedal/hatevedal-05.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{aaf68db3-8bd8-4ebf-9c1b-97b12191dd5b}.xml b/FMOD Project/Metadata/AudioFile/{aaf68db3-8bd8-4ebf-9c1b-97b12191dd5b}.xml index 012a3d91..9dd5632a 100644 --- a/FMOD Project/Metadata/AudioFile/{aaf68db3-8bd8-4ebf-9c1b-97b12191dd5b}.xml +++ b/FMOD Project/Metadata/AudioFile/{aaf68db3-8bd8-4ebf-9c1b-97b12191dd5b}.xml @@ -2,7 +2,7 @@ - hatevedal-02.ogg + neuro logs/hate vedal/hatevedal-02.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{b9676ab5-adf3-4f89-9cc8-5363ed7726e5}.xml b/FMOD Project/Metadata/AudioFile/{b9676ab5-adf3-4f89-9cc8-5363ed7726e5}.xml index 74f0b256..dcde61ea 100644 --- a/FMOD Project/Metadata/AudioFile/{b9676ab5-adf3-4f89-9cc8-5363ed7726e5}.xml +++ b/FMOD Project/Metadata/AudioFile/{b9676ab5-adf3-4f89-9cc8-5363ed7726e5}.xml @@ -2,7 +2,7 @@ - hatevedal-06.ogg + neuro logs/hate vedal/hatevedal-06.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{c0703bc1-c02c-4dda-bb98-f72bed727e7b}.xml b/FMOD Project/Metadata/AudioFile/{c0703bc1-c02c-4dda-bb98-f72bed727e7b}.xml index 0d1f9d68..00a75ae9 100644 --- a/FMOD Project/Metadata/AudioFile/{c0703bc1-c02c-4dda-bb98-f72bed727e7b}.xml +++ b/FMOD Project/Metadata/AudioFile/{c0703bc1-c02c-4dda-bb98-f72bed727e7b}.xml @@ -2,7 +2,7 @@ - hatevedal-03.ogg + neuro logs/hate vedal/hatevedal-03.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{c153b7eb-f7db-4828-b163-69b4269c5c65}.xml b/FMOD Project/Metadata/AudioFile/{c153b7eb-f7db-4828-b163-69b4269c5c65}.xml index 0a08c5d5..80abd2e5 100644 --- a/FMOD Project/Metadata/AudioFile/{c153b7eb-f7db-4828-b163-69b4269c5c65}.xml +++ b/FMOD Project/Metadata/AudioFile/{c153b7eb-f7db-4828-b163-69b4269c5c65}.xml @@ -2,7 +2,7 @@ - lovevedal-05.ogg + neuro logs/love vedal/lovevedal-05.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{c1a024a7-a93c-44b3-92a8-d313b6bb993e}.xml b/FMOD Project/Metadata/AudioFile/{c1a024a7-a93c-44b3-92a8-d313b6bb993e}.xml index cda5058b..77ed5da5 100644 --- a/FMOD Project/Metadata/AudioFile/{c1a024a7-a93c-44b3-92a8-d313b6bb993e}.xml +++ b/FMOD Project/Metadata/AudioFile/{c1a024a7-a93c-44b3-92a8-d313b6bb993e}.xml @@ -2,7 +2,7 @@ - lovevedal-03.ogg + neuro logs/love vedal/lovevedal-03.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{c789a2e7-f20f-491a-9350-a970ea52be6b}.xml b/FMOD Project/Metadata/AudioFile/{c789a2e7-f20f-491a-9350-a970ea52be6b}.xml index 005471a9..70fceed4 100644 --- a/FMOD Project/Metadata/AudioFile/{c789a2e7-f20f-491a-9350-a970ea52be6b}.xml +++ b/FMOD Project/Metadata/AudioFile/{c789a2e7-f20f-491a-9350-a970ea52be6b}.xml @@ -2,7 +2,7 @@ - lovevedal-06.ogg + neuro logs/love vedal/lovevedal-06.ogg true diff --git a/FMOD Project/Metadata/AudioFile/{c9f6b52b-b1a4-406d-87ca-7334e153f66f}.xml b/FMOD Project/Metadata/AudioFile/{c9f6b52b-b1a4-406d-87ca-7334e153f66f}.xml index 5cc146ae..35a3d453 100644 --- a/FMOD Project/Metadata/AudioFile/{c9f6b52b-b1a4-406d-87ca-7334e153f66f}.xml +++ b/FMOD Project/Metadata/AudioFile/{c9f6b52b-b1a4-406d-87ca-7334e153f66f}.xml @@ -2,7 +2,7 @@ - lovevedal-07.ogg + neuro logs/love vedal/lovevedal-07.ogg 24 diff --git a/FMOD Project/Metadata/AudioFile/{e316810c-0b86-4079-afe3-ab6efc48d10d}.xml b/FMOD Project/Metadata/AudioFile/{e316810c-0b86-4079-afe3-ab6efc48d10d}.xml index 6e2c143c..4c374ab0 100644 --- a/FMOD Project/Metadata/AudioFile/{e316810c-0b86-4079-afe3-ab6efc48d10d}.xml +++ b/FMOD Project/Metadata/AudioFile/{e316810c-0b86-4079-afe3-ab6efc48d10d}.xml @@ -2,7 +2,7 @@ - hatevedal-04.ogg + neuro logs/hate vedal/hatevedal-04.ogg true diff --git a/FMOD Project/Metadata/Event/{d401bd90-2cc7-4357-94fd-85ac0b808c72}.xml b/FMOD Project/Metadata/Event/{d401bd90-2cc7-4357-94fd-85ac0b808c72}.xml new file mode 100644 index 00000000..f5309712 --- /dev/null +++ b/FMOD Project/Metadata/Event/{d401bd90-2cc7-4357-94fd-85ac0b808c72}.xml @@ -0,0 +1,130 @@ + + + + + SeishunComplex + + + 2 + + + {9e27e85a-2e27-443b-8e16-675f4b2735b9} + + + {90d710b9-1291-4406-b856-75e3d9d4523f} + + + {2c269955-7d4f-452f-bd5b-c56d79d3bfb3} + + + {58c82f29-8969-4b1e-9458-1b5721054403} + + + {ec8cd690-cbf3-464a-91e6-42be7c83831a} + + + {a94b3134-5706-4e71-8cbe-0f7d2444c23b} + + + {d1db81e5-fa53-4d74-80d6-d31b6a9aec7b} + + + {0ef0c190-6741-4dca-9cc3-b3165a706f43} + + + {6f6c823e-9073-439e-9503-3b2b490ddbfb} + + + + + {0a92808f-7fb3-438b-a7ef-c01a02372d39} + + + + + {0a92808f-7fb3-438b-a7ef-c01a02372d39} + + + + + {1f34ed1d-16da-4b0c-8ed7-ea4ace041885} + + + {35283c3c-7604-4d20-a8d6-c05c88867099} + + + {f5cd1372-6a56-4fef-bd4b-b33143d09538} + + + + + + + {ab103dec-3701-4c02-b5d9-44e2ea0b2365} + + + {bf4d2aad-6f69-4a2c-acef-4a13e8b38ca7} + + + + + {ab103dec-3701-4c02-b5d9-44e2ea0b2365} + + + + + {6fcadf66-e663-499d-8f45-b7554d29b74b} + + + {8b846630-8bcf-433a-88bf-263e2c979c62} + + + {90d710b9-1291-4406-b856-75e3d9d4523f} + + + + + {ba47c9b7-22f0-41e0-8808-5e236e3ee462} + + + + + + 206.328 + + + {2be3055a-d3ef-409e-8c43-5cb6b59355e3} + + + + + Audio 1 + + + {7ced503d-736f-464b-a955-f2824a6e2fae} + + + {395a1567-6846-4be3-a7e8-cd304f7132a0} + + + {0a92808f-7fb3-438b-a7ef-c01a02372d39} + + + + + {b2436bf4-3272-4cf4-a3f1-9058ff841a18} + {fe0c2bdb-4385-407c-9b54-a7c82367c429} + + + + + + + {98327059-691e-4d04-8f7a-e15cfc9f8aa5} + + + + + + + diff --git a/FMOD Project/Metadata/EventFolder/{9e27e85a-2e27-443b-8e16-675f4b2735b9}.xml b/FMOD Project/Metadata/EventFolder/{9e27e85a-2e27-443b-8e16-675f4b2735b9}.xml new file mode 100644 index 00000000..b0786bde --- /dev/null +++ b/FMOD Project/Metadata/EventFolder/{9e27e85a-2e27-443b-8e16-675f4b2735b9}.xml @@ -0,0 +1,11 @@ + + + + + jukebox + + + {b1cc6170-82f0-4087-b202-f3bffb8cbc9b} + + + diff --git a/SCHIZO/Items/PDAJournal.cs b/SCHIZO/Items/PDAJournal.cs index fcdd71f3..5d575a1a 100644 --- a/SCHIZO/Items/PDAJournal.cs +++ b/SCHIZO/Items/PDAJournal.cs @@ -2,7 +2,6 @@ using Nautilus.Assets; using Nautilus.Assets.Gadgets; using Nautilus.Assets.PrefabTemplates; -using Nautilus.Handlers; using SCHIZO.Helpers; namespace SCHIZO.Items; @@ -56,7 +55,7 @@ public static void Register(PDAJournal journal) { if (Prefabs.ContainsKey(journal.key)) { - LOGGER.LogWarning($"Dupe PDAJournalPrefab {journal.key}"); + LOGGER.LogWarning($"Duplicate PDAJournal key {journal.key}"); return; } Prefabs[journal.key] = new PDAJournalPrefab(journal); diff --git a/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs b/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs index 6136b2d7..192ba007 100644 --- a/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs +++ b/SCHIZO/Jukebox/CustomJukeboxDisk.BelowZero.cs @@ -15,9 +15,7 @@ public sealed class CustomJukeboxDisk : JukeboxDisk { if (track == default) LOGGER.LogWarning($"Jukebox disk {name} at {transform.position} was not assigned a track"); - // the lore is that when you pick up a disk, AL-AN plays a snippet of it in your head - // if (unlockSound && Story.StoryGoalManager.main!?.GetAlanActor() == Actor.AlAn) - if (unlockSound) // temp for development/testing // Alex's PR comment: uuh + if (unlockSound) { int soundLenHash = unlockSound.samples.GetHashCode(); int soundNameHash = unlockSound.name.GetHashCode(); diff --git a/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs b/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs index 2fe545c4..4f3a4b96 100644 --- a/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs +++ b/SCHIZO/Jukebox/CustomJukeboxTrack.BelowZero.cs @@ -15,7 +15,10 @@ public sealed partial class CustomJukeboxTrack public int LoadFailCount { get; private set; } public void OnLoadFail() => LoadFailCount++; public void OnPlay() => LoadFailCount = 0; - public bool ShouldRetryLoad => LoadFailCount < (IsLocal ? 5 : 3); + public bool IsRemote => source == Source.Internet; + public bool ShouldRetryLoad => LoadFailCount < (IsRemote ? 3 : 5); + private string _jukeboxId; + public string JukeboxIdentifier => _jukeboxId ??= (source == Source.FMODEvent ? fmodEvent : identifier); public bool IsSoundValid(out OPENSTATE state) { @@ -78,14 +81,16 @@ protected override void Register() internal void RegisterInJukebox(BZJukebox jukebox) { - BZJukebox.unlockableMusic[this] = identifier; - if (jukebox) jukebox._info[identifier] = ToTrackInfo(false); + BZJukebox.unlockableMusic[this] = JukeboxIdentifier; + BZJukebox.musicLabels[JukeboxIdentifier] = trackLabel; + + if (jukebox) jukebox._info[JukeboxIdentifier] = ToTrackInfo(false); } public static bool TryGetCustomTrack(string identifier, out CustomJukeboxTrack track) { track = null; - + // this will not find event tracks (which is intended) return identifier is not null && EnumHandler.TryGetValue(identifier, out BZJukebox.UnlockableTrack trackId) && TryGetCustomTrack(trackId, out track); @@ -94,10 +99,13 @@ public static bool TryGetCustomTrack(string identifier, out CustomJukeboxTrack t public static bool TryGetCustomTrack(BZJukebox.UnlockableTrack trackId, out CustomJukeboxTrack track) => CustomJukeboxTrackPatches.customTracks.TryGetValue(trackId, out track); - internal void SetupUnlock(BZJukebox.UnlockableTrack trackId = BZJukebox.UnlockableTrack.None) + public static bool IsTrackCustom(BZJukebox.UnlockableTrack trackId) + => trackId is < BZJukebox.UnlockableTrack.None + or > BZJukebox.UnlockableTrack.Track9; + + internal void SetupUnlock() { - if (trackId == default) - trackId = this; + BZJukebox.UnlockableTrack trackId = this; if (!Player.main || !GameModeManager.HaveGameOptionsSet) { @@ -108,7 +116,7 @@ internal void SetupUnlock(BZJukebox.UnlockableTrack trackId = BZJukebox.Unlockab if (unlockedOnStart || !GameModeManager.GetOption(GameOption.Story)) { BZJukebox.Unlock(trackId, false); - BZJukebox.main.SetInfo(identifier, ToTrackInfo(false)); + BZJukebox.main.SetInfo(JukeboxIdentifier, ToTrackInfo(false)); } else { diff --git a/SCHIZO/Jukebox/CustomJukeboxTrackPatches.BelowZero.cs b/SCHIZO/Jukebox/CustomJukeboxTrackPatches.BelowZero.cs index cf980be6..29482d09 100644 --- a/SCHIZO/Jukebox/CustomJukeboxTrackPatches.BelowZero.cs +++ b/SCHIZO/Jukebox/CustomJukeboxTrackPatches.BelowZero.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using System.IO; using FMOD; using FMODUnity; @@ -61,11 +60,8 @@ public static void ClearCustomTracks() [HarmonyPostfix] public static void AddCustomTracks(BZJukebox __instance) { - foreach (KeyValuePair pair in customTracks) - { - CustomJukeboxTrack track = pair.Value; + foreach (CustomJukeboxTrack track in customTracks.Values) track.RegisterInJukebox(__instance); - } } } @@ -88,7 +84,7 @@ public static void EnableRichText(object __instance) public static void SetupUnlocksForCustomTracks() { // duplicate disks are not a problem - they self-destruct on Start if already unlocked - customTracks.ForEach(pair => pair.Value.SetupUnlock(pair.Key)); + customTracks.ForEach(pair => pair.Value.SetupUnlock()); } [HarmonyPatch(typeof(BZJukebox), nameof(BZJukebox.ScanInternal))] @@ -101,7 +97,7 @@ public static void RestoreCustomTrackInfoAfterScan(BZJukebox __instance) foreach (CustomJukeboxTrack track in customTracks.Values) { - __instance._info[track.identifier] = track.ToTrackInfo(); + __instance._info[track.JukeboxIdentifier] = track.ToTrackInfo(); } } @@ -173,7 +169,7 @@ public static bool DisplayInfoForCustomTracks(BZJukebox __instance) bool hasInfo = __instance._info.TryGetValue(track.identifier, out BZJukebox.TrackInfo info); // streams can have their info change during playback - bool assignOnce = track.IsLocal || track.overrideTrackLabel; + bool assignOnce = !track.IsRemote || track.overrideTrackLabel; if (hasInfo && assignOnce) return true; BZJukebox.TrackInfo newInfo = track.ToTrackInfo(true); @@ -259,12 +255,12 @@ dinkDonk Developer! You forgor a {track.identifier}! public static class JukeboxExtensions { public static bool IsTrackCustom(this BZJukebox jukebox, out CustomJukeboxTrack track) - => CustomJukeboxTrack.TryGetCustomTrack(jukebox._file, out track); + => CustomJukeboxTrack.TryGetCustomTrack(jukebox._file, out track) && track.source != CustomJukeboxTrack.Source.FMODEvent; public static bool IsTrackCustom(this JukeboxInstance jukebox, out CustomJukeboxTrack track) - => CustomJukeboxTrack.TryGetCustomTrack(jukebox._file, out track); + => CustomJukeboxTrack.TryGetCustomTrack(jukebox._file, out track) && track.source != CustomJukeboxTrack.Source.FMODEvent; public static bool IsPlayingStream(this BZJukebox jukebox, out CustomJukeboxTrack track) - => IsTrackCustom(jukebox, out track) && track.isStream; + => IsTrackCustom(jukebox, out track) && track.IsRemote && track.isStream; public static bool IsPlayingStream(this JukeboxInstance jukebox, out CustomJukeboxTrack track) - => IsTrackCustom(jukebox, out track) && track.isStream; + => IsTrackCustom(jukebox, out track) && track.IsRemote && track.isStream; } diff --git a/SCHIZO/Jukebox/TruckersFMUnlockSignal.BelowZero.cs b/SCHIZO/Jukebox/TruckersFMUnlockSignal.BelowZero.cs index af4938f3..bc749508 100644 --- a/SCHIZO/Jukebox/TruckersFMUnlockSignal.BelowZero.cs +++ b/SCHIZO/Jukebox/TruckersFMUnlockSignal.BelowZero.cs @@ -47,7 +47,7 @@ public void OnTrackUnlocked(TrackId trackId) } if (signal) return; - if (customOnly && !CustomJukeboxTrack.TryGetCustomTrack(trackId, out CustomJukeboxTrack _)) return; + if (customOnly && !CustomJukeboxTrack.IsTrackCustom(trackId)) return; unlockedTracks++; if (unlockedTracks >= requiredTracks) diff --git a/SCHIZO/Resources/FMODBanks/SCHIZO.bank b/SCHIZO/Resources/FMODBanks/SCHIZO.bank index 50da8b18..3e5bcdf9 100644 Binary files a/SCHIZO/Resources/FMODBanks/SCHIZO.bank and b/SCHIZO/Resources/FMODBanks/SCHIZO.bank differ diff --git a/SCHIZO/Resources/FMODBanks/SCHIZO.strings.bank b/SCHIZO/Resources/FMODBanks/SCHIZO.strings.bank index 86500728..58632cd7 100644 Binary files a/SCHIZO/Resources/FMODBanks/SCHIZO.strings.bank and b/SCHIZO/Resources/FMODBanks/SCHIZO.strings.bank differ diff --git a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex.asset b/Unity/Assets/Mod/Jukebox/Seishun Complex.asset similarity index 92% rename from Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex.asset rename to Unity/Assets/Mod/Jukebox/Seishun Complex.asset index 8bc0de6a..f1d5ad3c 100644 --- a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex.asset +++ b/Unity/Assets/Mod/Jukebox/Seishun Complex.asset @@ -13,8 +13,9 @@ MonoBehaviour: m_Name: Seishun Complex m_EditorClassIdentifier: identifier: SeishunComplex - source: 0 + source: 1 audioClip: {fileID: 8300000, guid: c432a6b3a5c9a6543b0f23667c4af264, type: 3} + fmodEvent: event:/SCHIZO/jukebox/SeishunComplex url: isStream: 0 streamLabelFormat: diff --git a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex.asset.meta b/Unity/Assets/Mod/Jukebox/Seishun Complex.asset.meta similarity index 100% rename from Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex.asset.meta rename to Unity/Assets/Mod/Jukebox/Seishun Complex.asset.meta diff --git a/Unity/Assets/Mod/Jukebox/Seishun Complex.meta b/Unity/Assets/Mod/Jukebox/Seishun Complex.meta deleted file mode 100644 index b0530edf..00000000 --- a/Unity/Assets/Mod/Jukebox/Seishun Complex.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c9fe24fc1582dae44a75393d817c57a0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3.meta b/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3.meta deleted file mode 100644 index e9a8fb7b..00000000 --- a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex - Neuro-sama Cover Animation ft. anny [nGmwH2ZYlP4].mp3.meta +++ /dev/null @@ -1,22 +0,0 @@ -fileFormatVersion: 2 -guid: c432a6b3a5c9a6543b0f23667c4af264 -AudioImporter: - externalObjects: {} - serializedVersion: 6 - defaultSettings: - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - preloadAudioData: 1 - loadInBackground: 1 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex unlock sound.mp3 b/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex unlock sound.mp3 deleted file mode 100644 index 01cd9e82..00000000 Binary files a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex unlock sound.mp3 and /dev/null differ diff --git a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex unlock sound.mp3.meta b/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex unlock sound.mp3.meta deleted file mode 100644 index 34b45770..00000000 --- a/Unity/Assets/Mod/Jukebox/Seishun Complex/Seishun Complex unlock sound.mp3.meta +++ /dev/null @@ -1,22 +0,0 @@ -fileFormatVersion: 2 -guid: 005268b15c059594891b6c1757b0181f -AudioImporter: - externalObjects: {} - serializedVersion: 6 - defaultSettings: - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - preloadAudioData: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity/Assets/Mod/Jukebox/TruckersFM/TruckersFM.asset b/Unity/Assets/Mod/Jukebox/TruckersFM/TruckersFM.asset index 43d0140f..58d2c6fc 100644 --- a/Unity/Assets/Mod/Jukebox/TruckersFM/TruckersFM.asset +++ b/Unity/Assets/Mod/Jukebox/TruckersFM/TruckersFM.asset @@ -13,8 +13,9 @@ MonoBehaviour: m_Name: TruckersFM m_EditorClassIdentifier: identifier: TruckersFM - source: 1 + source: 2 audioClip: {fileID: 0} + fmodEvent: event:/SCHIZO/jukebox/TruckersFM url: http://radio.truckers.fm isStream: 1 streamLabelFormat: 'TruckersFM diff --git a/Unity/Assets/Scripts/SCHIZO/Jukebox/CustomJukeboxTrack.cs b/Unity/Assets/Scripts/SCHIZO/Jukebox/CustomJukeboxTrack.cs index e141c2ab..443e5302 100644 --- a/Unity/Assets/Scripts/SCHIZO/Jukebox/CustomJukeboxTrack.cs +++ b/Unity/Assets/Scripts/SCHIZO/Jukebox/CustomJukeboxTrack.cs @@ -4,6 +4,7 @@ using SCHIZO.Registering; using UnityEngine; using SCHIZO.Spawns; +using FMODUnity; namespace SCHIZO.Jukebox { @@ -12,42 +13,45 @@ namespace SCHIZO.Jukebox [DeclareBoxGroup("unlock", Title = "Unlock")] public sealed partial class CustomJukeboxTrack : ModRegistryItem { - private enum Source + public enum Source { Asset, + FMODEvent, Internet } [Careful, Required] public string identifier; - [SerializeField] - private Source source; + public Source source; - [HideIf(nameof(IsRemote))] + [ShowIf(nameof(source), Source.Asset)] + [InfoBox("Audio clips are obsolete, prefer FMOD events for local audio instead", TriMessageType.Warning)] public AudioClip audioClip; - [ShowIf(nameof(IsRemote)), ValidateInput(nameof(Validate_urlIsHttp)), LabelText("URL")] + [ShowIf(nameof(source), Source.FMODEvent)] + [EventRef] + public string fmodEvent; + + [ShowIf(nameof(source), Source.Internet), ValidateInput(nameof(Validate_urlIsHttp)), LabelText("URL")] public string url; - [ShowIf(nameof(IsRemote))] + [ShowIf(nameof(source), Source.Internet)] [Tooltip("Whether to handle the audio like an endless stream, e.g. internet radio.\nIn-game, this will hide duration and disable seeking.")] public bool isStream; [GroupNext("track")] - - [ShowIf(nameof(isStream))] + [ShowIf(nameof(source), Source.Internet), ShowIf(nameof(isStream))] [Multiline, InfoBox("Use {0} as a placeholder for the track label.\nTextMeshPro rich text tags are supported.")] public string streamLabelFormat; - [ShowIf(nameof(IsRemote))] + [ShowIf(nameof(source), Source.Internet)] [Tooltip("If not overridden, the remote file or stream's metadata (if any) will be used.")] public bool overrideTrackLabel; public string trackLabel; [GroupNext("unlock")] - public bool unlockedOnStart = true; [HideIf(nameof(unlockedOnStart)), UsedImplicitly] @@ -60,9 +64,6 @@ private enum Source [HideIf(nameof(unlockedOnStart)), UsedImplicitly] public AudioClip unlockSound; - public bool IsLocal => source == Source.Asset; - public bool IsRemote => source == Source.Internet; - private TriValidationResult Validate_urlIsHttp() { if (string.IsNullOrEmpty(url)) return TriValidationResult.Error("URL cannot be empty");