mirror of
https://git.triforceproject.com/triforce/source
synced 2026-12-01 05:18:50 -04:00
Triforce v0.9.0
Character tab, faster renderer defaults, HD rumble shipped, and the 11-30 bug pass: ending softlock below 60 fps, adult first-night lock, Intel Arc robust buffers, adult map, randomizer load order.
This commit is contained in:
@@ -229,8 +229,10 @@ public sealed class ModManager
|
||||
|
||||
// ---- on and off ----
|
||||
|
||||
/// <summary>Switches a mod on or off by its folder's name: "-" in front of it, or no - and _ there. Returns its folder now.</summary>
|
||||
public string SetOn(string mods, Mod mod, bool on)
|
||||
/// <summary>Switches a mod on or off by its folder's name: "-" in front of it, or no - and _ there. Returns its folder now.
|
||||
/// onName: switched on, the folder takes this name in place of its own without the switch (the Randomizer's seeds, which
|
||||
/// must sort after the other mods: Randomizer.OnName).</summary>
|
||||
public string SetOn(string mods, Mod mod, bool on, string? onName = null)
|
||||
{
|
||||
Refuse(mods);
|
||||
if (!Directory.Exists(mod.Path)) throw new ModsException(mod.Name + " is no longer in the mods folder.");
|
||||
@@ -238,7 +240,9 @@ public sealed class ModManager
|
||||
if (on && mod.OffAbove != null)
|
||||
throw new ModsException(mod.Name + " is inside the folder " + mod.OffAbove + ", whose name switches off everything in it. Take the - or _ off that folder's name.");
|
||||
if (on == !off) return mod.Path;
|
||||
var name = on ? mod.Folder.TrimStart('-', '_') : "-" + mod.Folder;
|
||||
// (an onName that would be off, or is no plain folder name, is not taken)
|
||||
var own = onName is { Length: > 0 } n && n[0] != '-' && n[0] != '_' && n.IndexOfAny(new[] { '/', '\\' }) < 0 ? n : null;
|
||||
var name = on ? own ?? mod.Folder.TrimStart('-', '_') : "-" + mod.Folder;
|
||||
if (name.Length == 0 || name[0] == '.') throw new ModsException("Without the " + mod.Folder[0] + " in front, the folder " + mod.Folder + " has no name the game looks at. Rename it by hand.");
|
||||
var target = Path.Combine(Path.GetDirectoryName(mod.Path)!, name);
|
||||
if (Directory.Exists(target) || File.Exists(target))
|
||||
|
||||
Reference in New Issue
Block a user