mirror of
https://github.com/k1tbyte/Wand-Enhancer.git
synced 2026-08-30 22:01:23 +00:00
6716da5c80
Anchor each patch on a stable string (API endpoint, IPC channel, method name) and walk the delimiter structure via JsCursor to the edit site, reading minified identifiers out of the located region. Move injected JavaScript into WandEnhancer/Patches/*.js as embedded resources. Declare patches as PatchEntry rows in EnhancerConfig with CandidateFileNames, SearchHints and optional CapabilityHints. Recognise keyword-preceded regex literals in JsCursor so `return/re/.test(x)` no longer desynchronises the scan. Require the remote setValue anchor to match exactly once; Wand ships sibling call sites for other sources. Require both backup halves in IsPatched so a partial backup no longer blocks patch and restore at the same time. Chain inner exceptions when unpack or pack fails. Rename Common to ProcessTerminator and Utils.Extensions to WeModInstalls.
23 lines
592 B
C#
23 lines
592 B
C#
using System.Collections.Generic;
|
|
|
|
namespace WandEnhancer.Models
|
|
{
|
|
public enum EPatchType
|
|
{
|
|
ActivatePro = 1,
|
|
DisableUpdates = 2,
|
|
DevToolsOnF12 = 8,
|
|
RemoteWebPanelPreview = 16
|
|
}
|
|
|
|
public sealed class PatchConfig
|
|
{
|
|
public HashSet<EPatchType> PatchTypes { get; set; }
|
|
|
|
public List<string> CustomScriptPaths { get; set; } = new List<string>();
|
|
|
|
/// <summary>When set, the patch selection is saved so the launcher re-applies it after a Wand update.</summary>
|
|
public bool AutoApplyAfterUpdate { get; set; }
|
|
}
|
|
}
|