Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/launcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -1088,8 +1088,10 @@ starts every update): downloads run side by side, and the checkout operations wa
one at a time. Installs, uninstalls and builds waiting together run as one operation of their kind: one save backup, and the builds
in parallel. A failed one opens the operation log.

Clicking a row opens the mod's page: its README (Overview, drawn as GitHub-flavoured Markdown with Markdig; images
show their alt text, HTML is left out, relative links open the mod's folder on GitHub), its shared settings editor
Mod names, descriptions and settings labels use the selected interface language when a translation exists. Search
matches both the manifest text and its translation. Clicking a row opens the mod's page: its README (Overview,
drawn as GitHub-flavoured Markdown with Markdig; images show their alt text, HTML is left out, relative links open
the mod's folder on GitHub), its shared settings editor
(all declared types below; written to `data/mods/<id>.json`, which holds only what differs from the defaults,
and a running Gateway reloads the mod), and its releases (Versions, each installable). The page scrolls as one, its heading
and tabs with it; the back button stays above it, and the settings' Save bar below it on the Settings tab. Right-clicking a
Expand Down
16 changes: 8 additions & 8 deletions src/Launcher.Core/ModSettingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,18 @@ public static string Show(JsonNode? value, ModSetting? setting = null)
{
string text = (input as string ?? "").Trim().Replace(',', '.');
if (!double.TryParse(text, NumberStyles.Float, CultureInfo.InvariantCulture, out double number) || !double.IsFinite(number))
{ error = L.Text("{0}: not a number", setting.Title); return null; }
{ error = L.Text("{0}: not a number", L.Text(setting.Title)); return null; }
if (setting.IsPercent) number /= 100;
if (setting.Type == "integer" && number != Math.Floor(number)) { error = L.Text("{0}: not a whole number", setting.Title); return null; }
if (setting.Type == "integer" && number != Math.Floor(number)) { error = L.Text("{0}: not a whole number", L.Text(setting.Title)); return null; }
if (number < setting.Min || number > setting.Max)
{ error = L.Text("{0}: from {1} to {2}", setting.Title, Show(JsonValue.Create(setting.Min ?? double.MinValue), setting), Show(JsonValue.Create(setting.Max ?? double.MaxValue), setting)); return null; }
{ error = L.Text("{0}: from {1} to {2}", L.Text(setting.Title), Show(JsonValue.Create(setting.Min ?? double.MinValue), setting), Show(JsonValue.Create(setting.Max ?? double.MaxValue), setting)); return null; }
return JsonValue.Create(number);
}
case "text":
{
string text = input as string ?? "";
if (text.Length < (setting.MinLength ?? 0) || text.Length > (setting.MaxLength ?? int.MaxValue))
{ error = L.Text("{0}: from {1} to {2} characters", setting.Title, setting.MinLength ?? 0, setting.MaxLength ?? int.MaxValue); return null; }
{ error = L.Text("{0}: from {1} to {2} characters", L.Text(setting.Title), setting.MinLength ?? 0, setting.MaxLength ?? int.MaxValue); return null; }
return JsonValue.Create(text);
}
case "choice":
Expand All @@ -181,7 +181,7 @@ public static string Show(JsonNode? value, ModSetting? setting = null)
var option = setting.Options.FirstOrDefault(o => Show(o.Value) == text || o.Label == text);
if (option.Value is not null) return option.Value.DeepClone();
if (setting.Source.Length > 0 && text.Length > 0) return JsonValue.Create(text);
error = L.Text("{0}: choose one of its options", setting.Title);
error = L.Text("{0}: choose one of its options", L.Text(setting.Title));
return null;
}
case "choices":
Expand All @@ -190,18 +190,18 @@ public static string Show(JsonNode? value, ModSetting? setting = null)
.Select(t => (JsonNode)JsonValue.Create(t));
var list = new JsonArray(values.Select(v => v.DeepClone()).ToArray());
if (list.Count < (setting.MinItems ?? 0) || list.Count > (setting.MaxItems ?? int.MaxValue))
{ error = L.Text("{0}: choose from {1} to {2}", setting.Title, setting.MinItems ?? 0, setting.MaxItems ?? list.Count); return null; }
{ error = L.Text("{0}: choose from {1} to {2}", L.Text(setting.Title), setting.MinItems ?? 0, setting.MaxItems ?? list.Count); return null; }
return list;
}
default:
error = L.Text("{0}: edit this setting in the file", setting.Title);
error = L.Text("{0}: edit this setting in the file", L.Text(setting.Title));
return null;
}
}

public static string? Validate(ModSetting setting, JsonNode? value)
{
string? Invalid() => L.Text("{0}: the value does not match its declaration", setting.Title);
string? Invalid() => L.Text("{0}: the value does not match its declaration", L.Text(setting.Title));
if (value is null) return Invalid();
var kind = value.GetValueKind();
double Num(JsonNode n) => double.Parse(n.ToJsonString(), CultureInfo.InvariantCulture);
Expand Down
57 changes: 57 additions & 0 deletions src/Launcher.Core/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
<data name="Text_035485f7a61d" xml:space="preserve">
<value>Pinned:</value>
</data>
<data name="Text_035932cad9ff" xml:space="preserve">
<value>Common currency preset</value>
</data>
<data xml:space="preserve" name="Text_0397d2f08fb2">
<value>Built files and confirmed runtime status are separate. LocalExile watches mod files independently of Gateway code hot reload. Building or reloading resets the mod’s in-memory state and can reload dependents. Disabling a dependency can unload other mods. Changes affect every character on this Gateway.</value>
</data>
Expand Down Expand Up @@ -663,6 +666,9 @@
<data name="Text_11d3f9b625c9" xml:space="preserve">
<value>Ready to capture newly loaded areas.</value>
</data>
<data name="Text_11d4bf8985f6" xml:space="preserve">
<value>Worn pets collect selected currency with per-character filters and an immediate pause switch.</value>
</data>
<data name="Text_11e940a84add" xml:space="preserve">
<value>Closes the game; the servers keep running</value>
</data>
Expand Down Expand Up @@ -795,6 +801,9 @@
<data name="Text_15cf2239e4e8" xml:space="preserve">
<value>Set up LocalExile</value>
</data>
<data name="Text_15d99b7ac4b9" xml:space="preserve">
<value>An optional native 20-slot extra backpack for every character class.</value>
</data>
<data name="Text_15e11dada9d7" xml:space="preserve">
<value>{0} is not a mod id Waypoint can use</value>
</data>
Expand Down Expand Up @@ -2082,6 +2091,9 @@ This checkout has modified tracked files.</value>
<data name="Text_380c1a7758d9" xml:space="preserve">
<value>Friendship</value>
</data>
<data name="Text_381e879da6e3" xml:space="preserve">
<value>Only the 20 currencies listed in the README; explicit rules override it.</value>
</data>
<data name="Text_381f5c69d6b1" xml:space="preserve">
<value>Could not open Waypoint</value>
</data>
Expand Down Expand Up @@ -2290,6 +2302,9 @@ This checkout has modified tracked files.</value>
<data xml:space="preserve" name="Text_3d246cebf3ac">
<value>Switch completed.</value>
</data>
<data name="Text_3d27f72b9265" xml:space="preserve">
<value>Pet movement speed</value>
</data>
<data name="Text_3d31dc6f3ec1" xml:space="preserve">
<value>This name is unused by your current leagues.</value>
</data>
Expand Down Expand Up @@ -3181,6 +3196,9 @@ This checkout has modified tracked files.</value>
<data xml:space="preserve" name="Text_56e170d33d20">
<value>Red–green friendly</value>
</data>
<data name="Text_57104c57fbe0" xml:space="preserve">
<value>cells</value>
</data>
<data name="Text_5726606d5e2a" xml:space="preserve">
<value>release {0} has no {1} with its .sha256</value>
</data>
Expand Down Expand Up @@ -3327,6 +3345,9 @@ Current saves are unchanged. This backup will no longer be available to restore.
<data xml:space="preserve" name="Text_5c412a262086">
<value>Game</value>
</data>
<data name="Text_5c41787dc15a" xml:space="preserve">
<value>Character profiles</value>
</data>
<data name="Text_5c4824060366" xml:space="preserve">
<value>You can delete the folder yourself: {0}</value>
</data>
Expand Down Expand Up @@ -3369,6 +3390,9 @@ Current saves are unchanged. This backup will no longer be available to restore.
<data name="Text_5de68a8da4e2" xml:space="preserve">
<value>Not signed in to Steam.</value>
</data>
<data name="Text_5e1858ba70e7" xml:space="preserve">
<value>Item overrides</value>
</data>
<data name="Text_5e72e95aaebe" xml:space="preserve">
<value>Mod choices apply across all leagues. Saved choices do not confirm live load status.</value>
</data>
Expand Down Expand Up @@ -3601,6 +3625,9 @@ Search limits reached; other checkouts may exist. Browse to any location.</value
<data name="Text_6425c4d51b31" xml:space="preserve">
<value>· not made here</value>
</data>
<data name="Text_642963da89e7" xml:space="preserve">
<value>Pickup radius</value>
</data>
<data name="Text_6443a33bc8c7" xml:space="preserve">
<value>It also deletes the {0:0.#} GB already downloaded.</value>
</data>
Expand Down Expand Up @@ -4146,6 +4173,9 @@ Switching to it builds and runs that code on this computer with your rights, liv
<data name="Text_7449e55272e4" xml:space="preserve">
<value>Crafting and trade</value>
</data>
<data name="Text_748f3ab24141" xml:space="preserve">
<value>Pet Loot</value>
</data>
<data xml:space="preserve" name="Text_74a883a037bc">
<value>Settings</value>
</data>
Expand Down Expand Up @@ -4335,6 +4365,9 @@ Switching to it builds and runs that code on this computer with your rights, liv
<data name="Text_7a5198f98ec2" xml:space="preserve">
<value>This LocalExile folder already has a game client, so nothing needs copying.</value>
</data>
<data name="Text_7a530e69bd36" xml:space="preserve">
<value>Stackable divination cards</value>
</data>
<data name="Text_7a72f4199ba7" xml:space="preserve">
<value>Loading areas …</value>
</data>
Expand Down Expand Up @@ -5336,6 +5369,9 @@ Dependencies: {3}
<data name="Text_96cedcf686b0" xml:space="preserve">
<value>Characters on selected account</value>
</data>
<data name="Text_96deeebf9888" xml:space="preserve">
<value>Pickup enabled</value>
</data>
<data xml:space="preserve" name="Text_9701a68fede6">
<value>Search branches and pull requests</value>
</data>
Expand Down Expand Up @@ -5538,6 +5574,9 @@ Owned servers will stop. Automatic backup is {2}. Source, client and login keys
<data name="Text_9bf4d9a05005" xml:space="preserve">
<value>{0}: {1} modifiers. {2} lines are left out (red): the crafter has no modifier worded so.</value>
</data>
<data name="Text_9c0a55369f3f" xml:space="preserve">
<value>All stackable currency</value>
</data>
<data name="Text_9c0f7a91cfa6" xml:space="preserve">
<value>game settings are shared with your normal game</value>
</data>
Expand Down Expand Up @@ -6360,6 +6399,9 @@ Owned servers will stop. Automatic backup is {2}. Source, client and login keys
<data name="Text_b28731b86735" xml:space="preserve">
<value>More mod actions</value>
</data>
<data name="Text_b2879dfbe9a4" xml:space="preserve">
<value>Multiplier for following, collecting and returning; 1 is normal speed, 2 is double speed.</value>
</data>
<data name="Text_b291f6978e5e" xml:space="preserve">
<value>Default sockets; e.g. RRGB a 4-link, RR GB two pairs</value>
</data>
Expand Down Expand Up @@ -6561,6 +6603,9 @@ Owned servers will stop. Automatic backup is {2}. Source, client and login keys
<data name="Text_b85f5fabf97d" xml:space="preserve">
<value>Tree</value>
</data>
<data name="Text_b8612a2b9663" xml:space="preserve">
<value>Exact item name or metadata id: 0 blocks, 1-65535 is the minimum ground stack.</value>
</data>
<data name="Text_b86414f34662" xml:space="preserve">
<value>Rare pack anchor</value>
</data>
Expand Down Expand Up @@ -6633,6 +6678,9 @@ Owned servers will stop. Automatic backup is {2}. Source, client and login keys
<data name="Text_ba89783a339f" xml:space="preserve">
<value>Select an account</value>
</data>
<data name="Text_ba9068ab94ec" xml:space="preserve">
<value>Extra Backpack</value>
</data>
<data name="Text_baaddf70fb5d" xml:space="preserve">
<value>Type</value>
</data>
Expand Down Expand Up @@ -6831,6 +6879,9 @@ Owned servers will stop. Automatic backup is {2}. Source, client and login keys
<data name="Text_c0fa1dcd67a3" xml:space="preserve">
<value>What is finished stays finished, and a partial copy is kept. Continue picks up from here, now or another day.</value>
</data>
<data name="Text_c11b0d3fa16e" xml:space="preserve">
<value>Pet gold pickup</value>
</data>
<data name="Text_c11c363d0402" xml:space="preserve">
<value>the release would overwrite {0}, which holds your own data; nothing was changed</value>
</data>
Expand Down Expand Up @@ -7150,6 +7201,9 @@ Last reported Gateway event. Open Gateway output for details.</value>
<data xml:space="preserve" name="Text_ca1844969742">
<value>Unavailable</value>
</data>
<data name="Text_ca3ab32507c1" xml:space="preserve">
<value>Default for characters without a saved profile.</value>
</data>
<data xml:space="preserve" name="Text_ca4e5268289a">
<value>{0} backups for {1}</value>
</data>
Expand Down Expand Up @@ -8812,6 +8866,9 @@ Mods at backup: </value>
<data name="Text_f95b3eb4bed4" xml:space="preserve">
<value>Generate map</value>
</data>
<data name="Text_f97f4364e0c1" xml:space="preserve">
<value>Stackable map fragments</value>
</data>
<data name="Text_f9a56c85fda5" xml:space="preserve">
<value>Game status</value>
</data>
Expand Down
Loading