1
0
Fork 0

Compare commits

..

4 Commits

Author SHA1 Message Date
ivan tkachenko 8942b2ee37 Implement a better way to disable tracks while keeping them in JSON 2026-01-23 15:32:33 +02:00
ivan tkachenko f20a500992 Show Artist & Song metadata in config 2026-01-23 14:34:37 +02:00
ivan tkachenko 6a71ed578b Include Artist & Song metadata in the track info 2026-01-23 14:19:34 +02:00
ivan tkachenko 3490b1c2f3 Bump version 2026-01-23 14:01:00 +02:00
6 changed files with 91 additions and 5 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## MuzikaGromche 1337.9001.69
- Show real Artist & Song info in the config.
## MuzikaGromche 1337.9001.68 - LocalHost hotfix
- Fixed occasionally broken playback of v1337.9001.67, sorry about that.

View File

@ -54,7 +54,10 @@ namespace MuzikaGromche
{
var obj = new Dictionary<string, object?>
{
["Enabled"] = selectableTrack.Enabled,
["Name"] = audioTrack.Name, // may be different from selectableTrack.Name, if selectable track is a group
["Artist"] = selectableTrack.Artist,
["Song"] = selectableTrack.Song,
["IsExplicit"] = selectableTrack.IsExplicit,
["Season"] = selectableTrack.Season?.Name,
["Language"] = selectableTrack.Language.Full,

View File

@ -35,6 +35,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "MuzikaGromche",
Artist = "Пошлая Молли",
Song = "Нон стоп",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 46.3f,
@ -78,6 +80,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "VseVZale",
Artist = "Дискотека Авария",
Song = " Х.Х.Х.И.Р.Н.Р.",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 38.28f,
@ -113,6 +117,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "DeployDestroy",
Artist = "Noize MC",
Song = "Устрой дестрой",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 40.68f,
@ -159,6 +165,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "MoyaZhittya",
Artist = "Bon Jovi",
Song = "It's My Life",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 34.53f,
@ -210,6 +218,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Gorgorod",
Artist = "Oxxxymiron",
Song = "Город под подошвой",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 43.2f,
@ -228,6 +238,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Durochka",
Artist = "Би-2",
Song = "Дурочка",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 37.0f,
@ -246,6 +258,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "ZmeiGorynich",
Artist = "aespa",
Song = "Black Mamba",
AudioType = AudioType.OGGVORBIS,
Language = Language.KOREAN,
WindUpTimer = 46.13f,
@ -265,6 +279,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "GodMode",
Artist = "Fall Out Boy",
Song = "Immortals",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 40.38f,
@ -287,6 +303,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "RiseAndShine",
Artist = "Fall Out Boy",
Song = "The Phoenix",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 59.87f,
@ -309,6 +327,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Song2",
Artist = "Витас",
Song = "Опера #2",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 38.63f,
@ -327,6 +347,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Peretasovka",
Artist = "LMFAO",
Song = "Party Rock Anthem",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 39.68f,
@ -342,10 +364,12 @@ public static class Library
FlickerLightsTimeSeries = [-8, 31],
Lyrics = [],
},
#if DEBUG // No one knows it, and it's a bit out of place with a long 52 seconds intro
new SelectableAudioTrack
{
Enabled = false, // No one knows it, and it's a bit out of place with a long 52 seconds intro
Name = "Yalgaar",
Artist = "Ajey Nagar and Wily Frenzy",
Song = "Yalgaar",
AudioType = AudioType.OGGVORBIS,
Language = Language.HINDI,
WindUpTimer = 52.17f,
@ -361,10 +385,11 @@ public static class Library
FlickerLightsTimeSeries = [-5],
Lyrics = [],
},
#endif
new SelectableAudioTrack
{
Name = "Chereshnya",
Artist = "Дискотека Авария",
Song = "Малинки",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 45.48f,
@ -386,6 +411,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "PWNED",
Artist = "CYBEЯIA",
Song = "Russian Hackers",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
IsExplicit = true,
@ -462,6 +489,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Kach",
Artist = "Black Eyed Peas",
Song = "Pump It",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 47.30f,
@ -487,6 +516,8 @@ public static class Library
new SelectableTracksGroup
{
Name = "BeefLiver",
Artist = "Imagine Dragons",
Song = "Believer",
Language = Language.ENGLISH,
Tracks =
[
@ -603,6 +634,8 @@ public static class Library
new SelectableTracksGroup
{
Name = "Beha",
Artist = "Ленинград ft. Глюк'oZа ft. ST",
Song = "Жу-Жу",
Language = Language.RUSSIAN,
IsExplicit = true,
Tracks =
@ -672,6 +705,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "OnePartiyaUdar",
Artist = "One-Punch Man",
Song = "Opening",
AudioType = AudioType.OGGVORBIS,
Language = Language.JAPANESE,
WindUpTimer = 41.27f,
@ -692,6 +727,8 @@ public static class Library
new SelectableTracksGroup
{
Name = "AttentionPls",
Artist = "Отпетые Мошенники",
Song = "Обратите внимание",
Language = Language.RUSSIAN,
IsExplicit = true,
Tracks =
@ -741,6 +778,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "BbIXODaHET",
Artist = "Сплин",
Song = "Выхода нет",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
WindUpTimer = 40.85f,
@ -764,6 +803,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Whistle",
Artist = "Flo Rida",
Song = "Whistle",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 41.27f,
@ -812,6 +853,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "ReelGoon",
Artist = "John Shanks and Sheryl Crow",
Song = "Real Gone",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 45.15f,
@ -837,6 +880,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "HighLow",
Artist = "Nirvana",
Song = "Smells Like Teen Spirit",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 37.12f,
@ -866,6 +911,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "IkWilJe",
Artist = "My Chemical Romance",
Song = "All I Want for Christmas Is You",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
Season = Season.NewYear,
@ -892,6 +939,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Paarden",
Artist = "Элизиум",
Song = "Три белых коня",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
Season = Season.NewYear,
@ -918,6 +967,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "DiscoKapot",
Artist = "Дискотека Авария",
Song = "Новогодняя",
AudioType = AudioType.OGGVORBIS,
Language = Language.RUSSIAN,
Season = Season.NewYear,
@ -944,6 +995,8 @@ public static class Library
new SelectableTracksGroup
{
Name = "PickUpSticks",
Artist = "t.A.T.u.",
Song = "Show Me Love",
Language = Language.ENGLISH,
Tracks =
[
@ -994,6 +1047,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "TwoFastTuFurious",
Artist = "t.A.T.u.",
Song = "Not Gonna Get Us / Нас не догонят",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 36.08f,
@ -1037,6 +1092,8 @@ public static class Library
new SelectableAudioTrack
{
Name = "Arcane",
Artist = "Imagine Dragons & J.I.D",
Song = "Enemy",
AudioType = AudioType.OGGVORBIS,
Language = Language.ENGLISH,
WindUpTimer = 38.28f,

View File

@ -8,7 +8,7 @@
<AssemblyName>Ratijas.MuzikaGromche</AssemblyName>
<Product>Muzika Gromche</Product>
<Description>Add some content to your inverse teleporter experience on Titan!</Description>
<Version>1337.9001.68</Version>
<Version>1337.9001.69</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

View File

@ -53,6 +53,7 @@ namespace MuzikaGromche
{
tracksEnumerable = tracksEnumerable.Where(track => !track.IsExplicit);
}
tracksEnumerable = tracksEnumerable.Where(track => track.Enabled);
var tracks = tracksEnumerable.ToArray();
return (tracks, season);
}
@ -324,9 +325,17 @@ namespace MuzikaGromche
// can be selected using weighted random from a list of selectable tracks.
public interface ISelectableTrack : ISeasonalContent
{
// Provide means to disable the track and hide it from user-facing config, while keeping it around in code and still exporting to JSON.
public bool Enabled { get; init; }
// Name of the track, as shown in config entry UI; also used for default file names.
public string Name { get; init; }
// Artist and Song metadata, shown in config description.
public string Artist { get; init; }
public string Song { get; init; }
// Language of the track's lyrics.
public Language Language { get; init; }
@ -570,6 +579,10 @@ namespace MuzikaGromche
// Standalone, top-level, selectable audio track
public class SelectableAudioTrack : CoreAudioTrack, ISelectableTrack
{
public bool Enabled { get; init; } = true;
public /* required */ string Artist { get; init; } = "";
public /* required */ string Song { get; init; } = "";
public /* required */ Language Language { get; init; }
public bool IsExplicit { get; init; } = false;
public Season? Season { get; init; } = null;
@ -587,7 +600,11 @@ namespace MuzikaGromche
public class SelectableTracksGroup : ISelectableTrack
{
public bool Enabled { get; init; } = true;
public /* required */ string Name { get; init; } = "";
public /* required */ string Artist { get; init; } = "";
public /* required */ string Song { get; init; } = "";
public /* required */ Language Language { get; init; }
public bool IsExplicit { get; init; } = false;
public Season? Season { get; init; } = null;
@ -1603,6 +1620,11 @@ namespace MuzikaGromche
foreach (var track in Plugin.Tracks)
{
if (!track.Enabled)
{
// hide disabled tracks from user-facing config
continue;
}
var language = track.Language;
string section = $"Tracks.{language.Short}";
@ -1629,7 +1651,7 @@ namespace MuzikaGromche
// Create slider entry for track
var seasonal = track.Season is Season season ? $"This is seasonal content for {season.Name}.\n\n" : "";
string warning = track.IsExplicit ? "Explicit Content/Lyrics!\n\n" : "";
string description = $"Language: {language.Full}\n\n{seasonal}{warning}Random (relative) chance of selecting this track.\n\nSet to zero to effectively disable the track.";
string description = $"Song: {track.Song} by {track.Artist}\n\nLanguage: {language.Full}\n\n{seasonal}{warning}Random (relative) chance of selecting this track.\n\nSet to zero to effectively disable the track.";
track.Weight = configFile.Bind(
new ConfigDefinition(section, track.Name),
50,

View File

@ -1,6 +1,6 @@
{
"name": "MuzikaGromche",
"version_number": "1337.9001.68",
"version_number": "1337.9001.69",
"author": "Ratijas",
"description": "Add some content to your inverse teleporter experience on Titan!",
"website_url": "https://git.vilunov.me/ratijas/muzika-gromche",