Triforce v0.8.5

A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-28 10:54:41 -06:00
parent 2df08c751e
commit b527e29adb
203 changed files with 18821 additions and 2051 deletions

View File

@@ -127,7 +127,8 @@ public sealed class GameBananaInstaller
{
var name = Path.GetFileName(d);
if (name.StartsWith('.')) continue;
if (ModManager.ReadInfo(d) is not { } info || info.GameBananaId != m.Id) continue;
// ((Triforce, 11-26) the same id and the same kind: GameBanana's mods and works in progress are numbered apart)
if (ModManager.ReadInfo(d) is not { } info || info.GameBananaId != m.Id || info.Wip != m.Wip) continue;
if (old.Count == 0)
{
var (off, num, _) = Mods.Parse(name);
@@ -137,10 +138,20 @@ public sealed class GameBananaInstaller
old.Add(d);
}
var aside = new List<(string Was, string Gone)>();
for (var k = 0; k < old.Count; k++) // (out of the way first: removed once the new one is in, put back if it fails)
// ((Triforce, 11-26) out of the way first, into mods\.removed as the Mods page's Remove does: kept there once the new one
// is in (a copy the player made and edited is never lost), put back if it fails)
var bin = Path.Combine(root, Mods.Removed);
for (var k = 0; k < old.Count; k++)
{
var gone = Path.Combine(stage, "old-" + k);
try { Directory.Move(old[k], gone); aside.Add((old[k], gone)); } catch (Exception e) { ctx.Log.Write("mods: the old " + old[k] + " could not be moved aside: " + e.Message); }
try
{
Directory.CreateDirectory(bin);
var gone = ModManager.Free(bin, Path.GetFileName(old[k]).TrimStart('-', '_') is { Length: > 0 } n ? n : "mod");
ctx.Require(gone);
Directory.Move(old[k], gone);
aside.Add((old[k], gone));
}
catch (Exception e) { ctx.Log.Write("mods: the old " + old[k] + " could not be moved aside: " + e.Message); }
}
var label0 = SafeName(m.Name);
if (number == 0) number = NextNumber(root);
@@ -168,6 +179,10 @@ public sealed class GameBananaInstaller
ctx.Log.Write("mods: installed " + m.Name + " (" + m.Id + ") into " + placed.Count + " folder(s), the first " + placed[0]);
var msg = "Installed into mods" + Path.DirectorySeparatorChar + Path.GetFileName(placed[0]) + ".";
if (placed.Count > 1) msg += " It came with " + placed.Count + " options: the first is on, the others are off. Choose on the Mods page.";
if (aside.Count > 0) msg += " The version before is kept in mods" + Path.DirectorySeparatorChar + Mods.Removed + ".";
// (code patches are built into the game: said, so a player knows what this one changes and when)
if (placed.Any(p => Directory.Exists(Path.Combine(p, "exefs")) && Directory.EnumerateFileSystemEntries(Path.Combine(p, "exefs")).Any()))
msg += " It changes the game's code (exefs): build the game again to apply it.";
return msg;
}
finally { Partial.Remove(stage); }
@@ -184,8 +199,10 @@ public sealed class GameBananaInstaller
ctx.Log.Write("mods: installing " + m.Name + " (" + m.Id + "), file " + f.Name + " (" + f.Bytes + " bytes) from " + f.Url);
try
{
// (the size the server names: GameBanana's listed size is not trusted to the byte)
await new Downloader(ctx).ToFileAsync(http, f.Url, archive, 0, progress, token).ConfigureAwait(false);
// (the size the server names: GameBanana's listed size is not trusted to the byte, but a server that offers or sends far
// more than it lists is refused, before the disk fills)
var most = f.Bytes > 0 ? f.Bytes * 2 + (256L << 20) : 16L << 30;
await new Downloader(ctx).ToFileAsync(http, f.Url, archive, 0, progress, token, most).ConfigureAwait(false);
var unpacked = Path.Combine(stage, "unpacked");
await Task.Run(() => mods.Unpack(within, archive, unpacked, null), token).ConfigureAwait(false);
return unpacked;