Skip to content

Commit c546134

Browse files
committed
feat(preference): update preference keys for clarity and add lich enabled option
1 parent 7662012 commit c546134

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

electron/main/preference/types.ts

+14-9
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,41 @@ export enum PreferenceKey {
4040
*/
4141
GAME_COMMAND_HISTORY_MIN_LENGTH = 'game.command.historyMinLength',
4242
/**
43-
* Absolute path to the Ruby executable.
43+
* Absolute path to a Ruby executable supported by Lich.
4444
* Windows Example: "C:\path\to\Ruby4Lich\bin\ruby.exe"
4545
* macOS Example: "/path/to/.rbenv/shims/ruby"
4646
*/
47-
RUBY_PATH = 'lich.rubyPath',
47+
LICH_RUBY_PATH = 'lich.rubyPath',
4848
/**
4949
* Absolute path to the Lich executable.
5050
* Windows Example: "C:\path\to\lich\lich.rbw"
5151
* macOS Example: "/path/to/lich.rbw"
5252
*/
53-
LICH_PATH = 'lich.lichPath',
53+
LICH_PATH = 'lich.path',
5454
/**
5555
* The arguments to pass to Lich when starting it.
5656
* Example: "--dragonrealms"
5757
*/
58-
LICH_ARGS = 'lich.lichArgs',
58+
LICH_ARGS = 'lich.args',
5959
/**
6060
* The host to connect to when starting Lich.
6161
* Example: "localhost"
6262
*/
63-
LICH_HOST = 'lich.lichHost',
63+
LICH_HOST = 'lich.host',
6464
/**
6565
* The port to connect to when starting Lich.
6666
* Example: 11024
6767
*/
68-
LICH_PORT = 'lich.lichPort',
68+
LICH_PORT = 'lich.port',
6969
/**
7070
* The number of seconds to wait after starting Lich before
7171
* attempting to connect to it.
7272
*/
73-
LICH_WAIT = 'lich.startWait',
73+
LICH_START_WAIT = 'lich.startWait',
74+
/**
75+
* Should the app auto start and connect to Lich when playing a character?
76+
*/
77+
LICH_ENABLED = 'lich.enabled',
7478
}
7579

7680
export type PreferenceKeyToTypeMap = {
@@ -80,12 +84,13 @@ export type PreferenceKeyToTypeMap = {
8084
[PreferenceKey.GAME_WINDOW_PROMPT]: string;
8185
[PreferenceKey.GAME_COMMAND_SEPARATOR]: string;
8286
[PreferenceKey.GAME_COMMAND_HISTORY_MIN_LENGTH]: number;
83-
[PreferenceKey.RUBY_PATH]: string;
87+
[PreferenceKey.LICH_RUBY_PATH]: string;
8488
[PreferenceKey.LICH_PATH]: string;
8589
[PreferenceKey.LICH_ARGS]: string;
8690
[PreferenceKey.LICH_HOST]: string;
8791
[PreferenceKey.LICH_PORT]: number;
88-
[PreferenceKey.LICH_WAIT]: number;
92+
[PreferenceKey.LICH_START_WAIT]: number;
93+
[PreferenceKey.LICH_ENABLED]: boolean;
8994
};
9095

9196
export interface PreferenceService {

0 commit comments

Comments
 (0)