diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df16e71..9192b67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,8 +2,6 @@ name: CI on: pull_request: - types: - - opened workflow_dispatch: jobs: @@ -66,8 +64,8 @@ jobs: uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # Dotnet 4.0.2 with: dotnet-version: 10.0.x - + cache: true - name: Restore dependencies - run: dotnet restore + run: dotnet restore --locked-mode - name: Format run: dotnet format --verify-no-changes Rhythia.csproj diff --git a/Rhythia.csproj b/Rhythia.csproj index bf10e04..7deaa66 100644 --- a/Rhythia.csproj +++ b/Rhythia.csproj @@ -1,19 +1,23 @@  - - net10.0 - net10.0 - true - preview - - - - - - - - - - - - - \ No newline at end of file + + net10.0 + net10.0 + true + preview + + + + + + true + + + + + + + + + + + diff --git a/Rhythia.sln b/Rhythia.sln deleted file mode 100644 index ba325cb..0000000 --- a/Rhythia.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhythia", "Rhythia.csproj", "{3CFCDE01-20E3-4563-A784-EBBBB5A35D6E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - ExportDebug|Any CPU = ExportDebug|Any CPU - ExportRelease|Any CPU = ExportRelease|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3CFCDE01-20E3-4563-A784-EBBBB5A35D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3CFCDE01-20E3-4563-A784-EBBBB5A35D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3CFCDE01-20E3-4563-A784-EBBBB5A35D6E}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU - {3CFCDE01-20E3-4563-A784-EBBBB5A35D6E}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU - {3CFCDE01-20E3-4563-A784-EBBBB5A35D6E}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU - {3CFCDE01-20E3-4563-A784-EBBBB5A35D6E}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU - EndGlobalSection -EndGlobal diff --git a/Rhythia.slnx b/Rhythia.slnx new file mode 100644 index 0000000..f9f7b8f --- /dev/null +++ b/Rhythia.slnx @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages.lock.json b/packages.lock.json new file mode 100644 index 0000000..6bdca5b --- /dev/null +++ b/packages.lock.json @@ -0,0 +1,118 @@ +{ + "version": 1, + "dependencies": { + "net10.0": { + "DiscordRichPresence": { + "type": "Direct", + "requested": "[1.6.1.70, )", + "resolved": "1.6.1.70", + "contentHash": "yho1fdhbsedICHdfHe/Tu3IX6a5oj4fiPFL0keZStlsh7T/FrdjcwZZ7C1uC2HUvcXbFh+VEJvcbo1W66QtkUg==", + "dependencies": { + "Newtonsoft.Json": "13.0.1" + } + }, + "Godot.NET.Sdk": { + "type": "Direct", + "requested": "[4.5.0, )", + "resolved": "4.5.0", + "contentHash": "PYPVsaq5knx4qj2dbvdnnHE7qva9Of1ALM1Y3EuiBEV/9ZmNeApE/J/eobI7WNbc6OZ/SKRLiPgglw59QbSj9w==" + }, + "Godot.SourceGenerators": { + "type": "Direct", + "requested": "[4.6.2, )", + "resolved": "4.6.2", + "contentHash": "CqSn9E38CqCvHARIpZXzYw/KkDKkrGjCYjRrKq3kTAIsDGOOZ/W9wiVnfbvmTpER7gbbrFKAd6WA201ELBynQw==" + }, + "GodotSharp": { + "type": "Direct", + "requested": "[4.6.2, )", + "resolved": "4.6.2", + "contentHash": "yWYaxRtawrYOQ6TZqKovkw6IN3jNWLTjfrL+pvoGdprvGT7LOYdBCwy0OU7rSfzTn48Rr4IuyuZoSuC0Cp2JeA==" + }, + "GodotSharpEditor": { + "type": "Direct", + "requested": "[4.6.2, )", + "resolved": "4.6.2", + "contentHash": "WbxolK7BIzSl7d8jhTQQSwZ7JEf+6RHeaZWa6aw7f/qXsN/hXzFSgQvpKxGrLo0icQlowjvF0NomnYO5owMG7w==", + "dependencies": { + "GodotSharp": "4.6.2" + } + }, + "Semver": { + "type": "Direct", + "requested": "[3.0.0, )", + "resolved": "3.0.0", + "contentHash": "9jZCicsVgTebqkAujRWtC9J1A5EQVlu0TVKHcgoCuv345ve5DYf4D1MjhKEnQjdRZo6x/vdv6QQrYFs7ilGzLA==", + "dependencies": { + "Microsoft.Extensions.Primitives": "5.0.1" + } + }, + "sqlite-net-pcl": { + "type": "Direct", + "requested": "[1.9.172, )", + "resolved": "1.9.172", + "contentHash": "go533+huyvg5bOMmCpX+DyvLrcVRiEBIpqEiDHgXRijWIBBNkWnyMr/w+5ZzrUArKY+4ApucsbBnFtP3QITrJg==", + "dependencies": { + "SQLitePCLRaw.bundle_green": "2.1.2" + } + }, + "Tomlyn": { + "type": "Direct", + "requested": "[0.20.0, )", + "resolved": "0.20.0", + "contentHash": "Z8TmFcz6oeULVSVGDvbF1h+gnCoy/6NbWrlsQg9f2i+lzqXtUoU4+2RJIm8/s/14uSu0OqTv6JcSngTw3tlkTQ==" + }, + "Updatum": { + "type": "Direct", + "requested": "[1.3.2, )", + "resolved": "1.3.2", + "contentHash": "P10SUrVLzZ0u2X9sYLsAzIDpK73HuXyu6saUWWgoWM+hL2gbHXId6/APwd1Lwz59q/sKPhaZzMRZqDtgcOxbow==", + "dependencies": { + "Octokit": "14.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "5.0.1", + "contentHash": "5WPSmL4YeP7eW+Vc8XZ4DwjYWBAiSwDV9Hm63JJWcz1Ie3Xjv4KuJXzgCstj48LkLfVCYa7mLcx7y+q6yqVvtw==" + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.1", + "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + }, + "Octokit": { + "type": "Transitive", + "resolved": "14.0.0", + "contentHash": "jGOuTH1l+TCpJH+fwYOp7USzHDuGfN1jKbLz3J2COwyn+wL08eynvpnM6rY2qkzIEXum3PN2p2QkP3BW/p9Qcw==" + }, + "SQLitePCLRaw.bundle_green": { + "type": "Transitive", + "resolved": "2.1.2", + "contentHash": "e2FRX87YHoSer+tLFX9P/povHLK0uH7UcdimHRPnfTSam+NZChVVXjBxe1MYnyBGlwX5dSs5sTlDg/yZBM7iVw==", + "dependencies": { + "SQLitePCLRaw.lib.e_sqlite3": "2.1.2", + "SQLitePCLRaw.provider.e_sqlite3": "2.1.2" + } + }, + "SQLitePCLRaw.core": { + "type": "Transitive", + "resolved": "2.1.2", + "contentHash": "A8EBepVqY2lnAp3a8jnhbgzF2tlj2S3HcJQGANTYg/TbYbKa8Z5cM1h74An/vy0svhfzT7tVY0sFmUglLgv+2g==" + }, + "SQLitePCLRaw.lib.e_sqlite3": { + "type": "Transitive", + "resolved": "2.1.2", + "contentHash": "zibGtku8M4Eea1R3ZCAxc86QbNvyEN17mAcQkvWKBuHvRpMiK2g5anG4R5Be7cWKSd1i6baYz8y4dMMAKcXKPg==" + }, + "SQLitePCLRaw.provider.e_sqlite3": { + "type": "Transitive", + "resolved": "2.1.2", + "contentHash": "lxCZarZdvAsMl2zw9bXHrXK6RxVhB4b23iTFhCOdHFhxfbsxLxWf+ocvswJwR/9Wh/E//ddMi+wJGqUKV7VwoA==", + "dependencies": { + "SQLitePCLRaw.core": "2.1.2" + } + } + } + } +} diff --git a/scripts/FileInitializer.cs b/scripts/FileInitializer.cs index f29423c..2a67c14 100644 --- a/scripts/FileInitializer.cs +++ b/scripts/FileInitializer.cs @@ -13,13 +13,13 @@ public override void _Ready() objExporter = new Node(); AddChild(objExporter); objExporter.SetScript(script); - + // Temporary for 0.1.2 as the mesh's faces were fixed if (File.Exists($"{Constants.USER_FOLDER}/meshes/squircle.obj")) { File.Delete($"{Constants.USER_FOLDER}/meshes/squircle.obj"); } - + deepCopy(); } diff --git a/scripts/map/Map.cs b/scripts/map/Map.cs index 26683df..30f246f 100644 --- a/scripts/map/Map.cs +++ b/scripts/map/Map.cs @@ -92,7 +92,7 @@ public Note[] TryParseNotes() return []; } } - + private Texture2D getCover() { string path = $"{MapUtil.MapsCacheFolder}/{Name}"; diff --git a/scripts/scenes/LegacyRunner.cs b/scripts/scenes/LegacyRunner.cs index d98a896..c671021 100644 --- a/scripts/scenes/LegacyRunner.cs +++ b/scripts/scenes/LegacyRunner.cs @@ -918,7 +918,7 @@ public override void _Process(double delta) { return; } - + if (isPauseRampActive()) { updatePauseStateEachFrame(delta); @@ -926,7 +926,7 @@ public override void _Process(double delta) else if (CurrentAttempt.Progress > 0 && CurrentAttempt.Progress < MapLength && !CurrentAttempt.Stopped) { double audioDelay = CurrentAttempt.Progress - 1000 * (SoundManager.Song.GetPlaybackPosition() + AudioServer.GetTimeSinceLastMix()); - + if (Math.Abs(audioDelay / CurrentAttempt.Speed) > Math.Max(40, delta)) { SoundManager.Song.PitchScale = (float)Math.Clamp(CurrentAttempt.Speed + audioDelay / 1000, Math.Max(0.01, CurrentAttempt.Speed - 0.5), CurrentAttempt.Speed + 0.5); @@ -1635,7 +1635,7 @@ private static void updatePauseStateEachFrame(double delta) pauseHoldTime += (float)delta; pauseState = Math.Max(0, pauseState - (float)(delta / pauseHoldDuration)); pauseHudControl.SetProgress(Math.Clamp(1f - pauseState, 0f, 1f)); - + if (CurrentAttempt.Map.AudioBuffer != null && musicStarted && SoundManager.Song.Playing && getTargetMusicVolumeDb() > float.NegativeInfinity) { SoundManager.Song.VolumeDb = Mathf.Lerp(getTargetMusicVolumeDb() - 60, getTargetMusicVolumeDb(), 1 - pauseState); diff --git a/scripts/skinning/SkinManager.cs b/scripts/skinning/SkinManager.cs index 84b9816..fb8acc4 100644 --- a/scripts/skinning/SkinManager.cs +++ b/scripts/skinning/SkinManager.cs @@ -218,7 +218,7 @@ private static Shader loadShader(string skinPath) private static ArrayMesh loadMesh(string path) { bool exists = ResourceLoader.Exists(path) || Godot.FileAccess.FileExists(path); - + return exists ? Util.Misc.OBJParser.Call("load_obj", path).As() : GD.Load("res://user/meshes/squircle.obj"); } diff --git a/scripts/spaces/Tunnel.cs b/scripts/spaces/Tunnel.cs index 07532b8..046e082 100644 --- a/scripts/spaces/Tunnel.cs +++ b/scripts/spaces/Tunnel.cs @@ -4,36 +4,36 @@ namespace Spaces; public partial class Tunnel : BaseSpace { - private SettingsProfile settings; - private StandardMaterial3D tileMaterial; - private StandardMaterial3D ringMaterialA; - private StandardMaterial3D ringMaterialB; - private Node3D rings; - - private const float ring_loop_end = 52.5f; - - public override void _Ready() - { - base._Ready(); - - settings = SettingsManager.Instance.Settings; - rings = GetNode("Rings"); - - tileMaterial = (GetNode("Road").Mesh as PlaneMesh).Material as StandardMaterial3D; - ringMaterialA = (rings.GetChild(0).Mesh as PlaneMesh).Material as StandardMaterial3D; - ringMaterialB = (rings.GetChild(1).Mesh as PlaneMesh).Material as StandardMaterial3D; - } - - public override void _Process(double delta) - { - base._Process(delta); - - // Ring movement - rings.Position = Vector3.Back * (float)(Time.GetTicksMsec() / 1000f * settings.ApproachRate / 2) % ring_loop_end; - - // Hit FX - tileMaterial.AlbedoColor = NoteHitColor; - ringMaterialA.AlbedoColor = NoteHitColor; - ringMaterialB.AlbedoColor = NoteHitColor; - } + private SettingsProfile settings; + private StandardMaterial3D tileMaterial; + private StandardMaterial3D ringMaterialA; + private StandardMaterial3D ringMaterialB; + private Node3D rings; + + private const float ring_loop_end = 52.5f; + + public override void _Ready() + { + base._Ready(); + + settings = SettingsManager.Instance.Settings; + rings = GetNode("Rings"); + + tileMaterial = (GetNode("Road").Mesh as PlaneMesh).Material as StandardMaterial3D; + ringMaterialA = (rings.GetChild(0).Mesh as PlaneMesh).Material as StandardMaterial3D; + ringMaterialB = (rings.GetChild(1).Mesh as PlaneMesh).Material as StandardMaterial3D; + } + + public override void _Process(double delta) + { + base._Process(delta); + + // Ring movement + rings.Position = Vector3.Back * (float)(Time.GetTicksMsec() / 1000f * settings.ApproachRate / 2) % ring_loop_end; + + // Hit FX + tileMaterial.AlbedoColor = NoteHitColor; + ringMaterialA.AlbedoColor = NoteHitColor; + ringMaterialB.AlbedoColor = NoteHitColor; + } }