omegga 1.0.39 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/dist/brickadia/config.js +23 -12
- package/dist/brickadia/config.js.map +1 -1
- package/dist/brickadia/presets.d.ts +2 -2
- package/dist/brickadia/server.d.ts +0 -1
- package/dist/brickadia/server.js +68 -23
- package/dist/brickadia/server.js.map +1 -1
- package/dist/cli/auth.d.ts +8 -2
- package/dist/cli/auth.js +97 -16
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/config.d.ts +1 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/index.d.ts +10 -5
- package/dist/cli/installer.js.map +1 -1
- package/dist/cli/plugin.js +22 -24
- package/dist/cli/plugin.js.map +1 -1
- package/dist/cli/terminal.d.ts +0 -1
- package/dist/cli/terminal.js +185 -4
- package/dist/cli/terminal.js.map +1 -1
- package/dist/config/authorizer.js.map +1 -1
- package/dist/config/index.js +0 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/types.d.ts +12 -4
- package/dist/config/validator.js +5 -2
- package/dist/config/validator.js.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/info/default_commands.json +20 -19
- package/dist/logger.js +1 -5
- package/dist/logger.js.map +1 -1
- package/dist/main.js +196 -50
- package/dist/main.js.map +1 -1
- package/dist/omegga/auth.d.ts +5 -3
- package/dist/omegga/auth.js +39 -16
- package/dist/omegga/auth.js.map +1 -1
- package/dist/omegga/commandInjector.d.ts +1 -1
- package/dist/omegga/commandInjector.js +4 -4
- package/dist/omegga/commandInjector.js.map +1 -1
- package/dist/omegga/index.js +17 -7
- package/dist/omegga/index.js.map +1 -1
- package/dist/omegga/logWrangler.d.ts +1 -1
- package/dist/omegga/logWrangler.js +19 -12
- package/dist/omegga/logWrangler.js.map +1 -1
- package/dist/omegga/matchers/auth.d.ts +1 -0
- package/dist/omegga/matchers/auth.js +5 -5
- package/dist/omegga/matchers/auth.js.map +1 -1
- package/dist/omegga/matchers/chat.d.ts +1 -0
- package/dist/omegga/matchers/chat.js +13 -7
- package/dist/omegga/matchers/chat.js.map +1 -1
- package/dist/omegga/matchers/command.js +1 -1
- package/dist/omegga/matchers/command.js.map +1 -1
- package/dist/omegga/matchers/init.js.map +1 -1
- package/dist/omegga/matchers/interact.js.map +1 -1
- package/dist/omegga/matchers/join.js +12 -10
- package/dist/omegga/matchers/join.js.map +1 -1
- package/dist/omegga/matchers/leave.js.map +1 -1
- package/dist/omegga/matchers/mapChange.js.map +1 -1
- package/dist/omegga/matchers/minigameJoin.js.map +1 -1
- package/dist/omegga/matchers/types.d.ts +1 -1
- package/dist/omegga/matchers/types.js +0 -4
- package/dist/omegga/matchers/types.js.map +1 -1
- package/dist/omegga/matchers/version.js +36 -30
- package/dist/omegga/matchers/version.js.map +1 -1
- package/dist/omegga/player.d.ts +4 -2
- package/dist/omegga/player.js +50 -66
- package/dist/omegga/player.js.map +1 -1
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.js +15 -16
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.js.map +1 -1
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.d.ts +13 -1
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js +34 -1
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js.map +1 -1
- package/dist/omegga/plugin/plugin_node_safe/worker.js +3 -4
- package/dist/omegga/plugin/plugin_node_safe/worker.js.map +1 -1
- package/dist/omegga/plugin/plugin_node_safe.d.ts +0 -1
- package/dist/omegga/plugin/plugin_node_safe.js +15 -16
- package/dist/omegga/plugin/plugin_node_safe.js.map +1 -1
- package/dist/omegga/plugin/plugin_node_unsafe.js +17 -8
- package/dist/omegga/plugin/plugin_node_unsafe.js.map +1 -1
- package/dist/omegga/plugin.d.ts +1 -1
- package/dist/omegga/plugin.js +14 -10
- package/dist/omegga/plugin.js.map +1 -1
- package/dist/omegga/server.d.ts +13 -0
- package/dist/omegga/server.js +103 -11
- package/dist/omegga/server.js.map +1 -1
- package/dist/omegga/types.d.ts +3 -3
- package/dist/omegga/wrapper.d.ts +0 -1
- package/dist/omegga/wrapper.js +2 -1
- package/dist/omegga/wrapper.js.map +1 -1
- package/dist/plugin.d.ts +61 -16
- package/dist/plugin.js.map +1 -1
- package/dist/softconfig.d.ts +15 -0
- package/dist/softconfig.js +23 -1
- package/dist/softconfig.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/util/brick/checkBounds.js +1 -2
- package/dist/util/brick/checkBounds.js.map +1 -1
- package/dist/util/brick/constants.js +1 -0
- package/dist/util/brick/constants.js.map +1 -1
- package/dist/util/brick/displayName.d.ts +1 -1
- package/dist/util/brick/displayName.js +2 -2
- package/dist/util/brick/displayName.js.map +1 -1
- package/dist/util/brick/getBounds.js +2 -3
- package/dist/util/brick/getBounds.js.map +1 -1
- package/dist/util/brick/getBrickSize.js +1 -2
- package/dist/util/brick/getBrickSize.js.map +1 -1
- package/dist/util/brick/getScaleAxis.js +1 -2
- package/dist/util/brick/getScaleAxis.js.map +1 -1
- package/dist/util/brick/rotate.js +6 -6
- package/dist/util/brick/rotate.js.map +1 -1
- package/dist/util/brick/setOwnership.js +5 -3
- package/dist/util/brick/setOwnership.js.map +1 -1
- package/dist/util/chat.d.ts +1 -1
- package/dist/util/color.js +2 -2
- package/dist/util/color.js.map +1 -1
- package/dist/util/file.js +5 -6
- package/dist/util/file.js.map +1 -1
- package/dist/util/index.d.ts +6 -7
- package/dist/util/index.js +19 -8
- package/dist/util/index.js.map +1 -1
- package/dist/util/map.js +3 -3
- package/dist/util/map.js.map +1 -1
- package/dist/util/time.js +8 -8
- package/dist/util/time.js.map +1 -1
- package/dist/util/wsl.d.ts +1 -1
- package/dist/util/wsl.js +8 -6
- package/dist/util/wsl.js.map +1 -1
- package/dist/webserver/backend/api.js +51 -22
- package/dist/webserver/backend/api.js.map +1 -1
- package/dist/webserver/backend/database.d.ts +0 -1
- package/dist/webserver/backend/database.js +67 -32
- package/dist/webserver/backend/database.js.map +1 -1
- package/dist/webserver/backend/index.d.ts +0 -1
- package/dist/webserver/backend/index.js +18 -9
- package/dist/webserver/backend/index.js.map +1 -1
- package/dist/webserver/backend/metrics.js +6 -3
- package/dist/webserver/backend/metrics.js.map +1 -1
- package/dist/webserver/backend/types.d.ts +2 -3
- package/dist/webserver/backend/util.js +2 -3
- package/dist/webserver/backend/util.js.map +1 -1
- package/omegga-config.yml +7 -0
- package/package.json +11 -10
- package/public/app.bundle.js +31209 -25722
- package/public/app.bundle.js.map +1 -1
- package/public/app.css +2 -2
- package/public/auth.bundle.js +12762 -13651
- package/public/auth.bundle.js.map +1 -1
- package/public/auth.css +2 -2
- package/templates/safe-ts/omegga.d.ts +109 -25
- package/tools/install_launcher.sh +0 -5
- package/tools/install_steamcmd.sh +88 -0
- package/templates/rust/src/main.rs +0 -25
package/public/auth.css
CHANGED
|
@@ -244,9 +244,9 @@
|
|
|
244
244
|
}
|
|
245
245
|
.loader-icon[data-v-7c51ac40] {
|
|
246
246
|
color: white;
|
|
247
|
-
animation: rotating-
|
|
247
|
+
animation: rotating-7c51ac40 2s infinite linear;
|
|
248
248
|
}
|
|
249
|
-
@keyframes rotating-
|
|
249
|
+
@keyframes rotating-7c51ac40 {
|
|
250
250
|
0% {
|
|
251
251
|
transform: rotate(0);
|
|
252
252
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { randomUUID as random } from 'crypto';
|
|
2
|
+
|
|
1
3
|
export interface BRColor {
|
|
2
4
|
r: number;
|
|
3
5
|
b: number;
|
|
@@ -43,13 +45,13 @@ export interface BRRoleAssignments {
|
|
|
43
45
|
export interface BRPlayerNameCache {
|
|
44
46
|
savedPlayerNames: Record<string, string>;
|
|
45
47
|
}
|
|
46
|
-
export
|
|
48
|
+
export type Preset<T extends string, D> = {
|
|
47
49
|
formatVersion?: "1";
|
|
48
50
|
presetVersion?: "1";
|
|
49
51
|
type?: T;
|
|
50
52
|
data?: D;
|
|
51
53
|
};
|
|
52
|
-
export
|
|
54
|
+
export type EnvironmentPreset = Preset<"Environment", {
|
|
53
55
|
groups?: {
|
|
54
56
|
Sky?: {
|
|
55
57
|
timeOfDay?: number;
|
|
@@ -128,7 +130,7 @@ export interface IServerStatus {
|
|
|
128
130
|
id: string;
|
|
129
131
|
}[];
|
|
130
132
|
}
|
|
131
|
-
export
|
|
133
|
+
export type IMinigameList = {
|
|
132
134
|
index: number;
|
|
133
135
|
name: string;
|
|
134
136
|
numMembers: number;
|
|
@@ -137,13 +139,13 @@ export declare type IMinigameList = {
|
|
|
137
139
|
id: string;
|
|
138
140
|
};
|
|
139
141
|
}[];
|
|
140
|
-
export
|
|
142
|
+
export type IPlayerPositions = {
|
|
141
143
|
player: OmeggaPlayer;
|
|
142
144
|
pawn: string;
|
|
143
145
|
pos: number[];
|
|
144
146
|
isDead: boolean;
|
|
145
147
|
}[];
|
|
146
|
-
export
|
|
148
|
+
export type ILogMinigame = {
|
|
147
149
|
name: string;
|
|
148
150
|
ruleset: string;
|
|
149
151
|
index: number;
|
|
@@ -165,6 +167,8 @@ export declare type UnrealClass = string;
|
|
|
165
167
|
export declare type UnrealObject = string;
|
|
166
168
|
export declare type UnrealBoolean = boolean;
|
|
167
169
|
export declare type UnrealFloat = number;
|
|
170
|
+
export declare type UnrealInteger = number;
|
|
171
|
+
export declare type UnrealInteger64 = number;
|
|
168
172
|
export declare type UnrealColor = [
|
|
169
173
|
number,
|
|
170
174
|
number,
|
|
@@ -178,15 +182,29 @@ export declare type UnrealRotator = [
|
|
|
178
182
|
number
|
|
179
183
|
];
|
|
180
184
|
export declare type UnrealString = string;
|
|
181
|
-
export declare type
|
|
182
|
-
|
|
185
|
+
export declare type WireGraphVariant = {
|
|
186
|
+
number: number;
|
|
187
|
+
} | {
|
|
188
|
+
integer: number;
|
|
189
|
+
} | {
|
|
190
|
+
bool: boolean;
|
|
191
|
+
} | {
|
|
192
|
+
exec: true;
|
|
193
|
+
} | {
|
|
194
|
+
object: true;
|
|
195
|
+
};
|
|
196
|
+
export declare type UnrealType = UnrealClass | UnrealObject | UnrealBoolean | UnrealFloat | UnrealColor | UnrealByte | UnrealRotator | UnrealString | WireGraphVariant | UnrealInteger64;
|
|
197
|
+
export declare type UnrealTypeFromString<T> = T extends "Class" ? UnrealClass : T extends "Object" ? UnrealObject : T extends "Boolean" ? UnrealBoolean : T extends "Float" ? UnrealFloat : T extends "Color" ? UnrealColor : T extends "Byte" ? UnrealByte : T extends "Rotator" ? UnrealRotator : T extends "String" ? UnrealString : T extends "WireGraphVariant" ? WireGraphVariant : T extends "WireGraphPrimMathVariant" ? WireGraphVariant : T extends "Integer" ? UnrealInteger : T extends "Integer64" ? UnrealInteger64 : UnrealType;
|
|
183
198
|
export interface User {
|
|
184
199
|
id: Uuid;
|
|
185
200
|
name: string;
|
|
186
201
|
}
|
|
187
|
-
export interface
|
|
202
|
+
export interface LegacyOwner extends User {
|
|
188
203
|
bricks: number;
|
|
189
204
|
}
|
|
205
|
+
export interface Owner extends LegacyOwner {
|
|
206
|
+
display_name: string;
|
|
207
|
+
}
|
|
190
208
|
declare enum Direction {
|
|
191
209
|
XPositive = 0,
|
|
192
210
|
XNegative = 1,
|
|
@@ -211,6 +229,7 @@ export interface Collision {
|
|
|
211
229
|
weapon: boolean;
|
|
212
230
|
interaction: boolean;
|
|
213
231
|
tool: boolean;
|
|
232
|
+
physics: boolean;
|
|
214
233
|
}
|
|
215
234
|
export interface AppliedComponent {
|
|
216
235
|
[property: string]: UnrealType;
|
|
@@ -310,6 +329,15 @@ export declare type Vector = [
|
|
|
310
329
|
number,
|
|
311
330
|
number
|
|
312
331
|
];
|
|
332
|
+
export declare type WirePort = {
|
|
333
|
+
brick_index: number;
|
|
334
|
+
component: string;
|
|
335
|
+
port: string;
|
|
336
|
+
};
|
|
337
|
+
export declare type Wire = {
|
|
338
|
+
source: WirePort;
|
|
339
|
+
target: WirePort;
|
|
340
|
+
};
|
|
313
341
|
export interface BrickV1 {
|
|
314
342
|
asset_name_index: number;
|
|
315
343
|
size: Vector;
|
|
@@ -365,7 +393,7 @@ export declare type BrsV4 = Modify<BrsV3, {
|
|
|
365
393
|
export declare type BrsV8 = Modify<BrsV4, {
|
|
366
394
|
version: 8;
|
|
367
395
|
host: User;
|
|
368
|
-
brick_owners:
|
|
396
|
+
brick_owners: LegacyOwner[];
|
|
369
397
|
preview?: Bytes;
|
|
370
398
|
game_version: number;
|
|
371
399
|
bricks: BrickV8[];
|
|
@@ -380,7 +408,11 @@ export declare type BrsV10 = Modify<BrsV9, {
|
|
|
380
408
|
version: 10;
|
|
381
409
|
bricks: BrickV10[];
|
|
382
410
|
}>;
|
|
383
|
-
export declare type
|
|
411
|
+
export declare type BrsV14 = Modify<BrsV10, {
|
|
412
|
+
version: 14;
|
|
413
|
+
wires: Wire[];
|
|
414
|
+
}>;
|
|
415
|
+
export declare type ReadSaveObject = BrsV1 | BrsV2 | BrsV3 | BrsV4 | BrsV8 | BrsV9 | BrsV10 | BrsV14;
|
|
384
416
|
export interface Brick {
|
|
385
417
|
asset_name_index?: number;
|
|
386
418
|
size: Vector;
|
|
@@ -412,6 +444,7 @@ export interface WriteSaveObject {
|
|
|
412
444
|
bricks: Brick[];
|
|
413
445
|
save_time?: ArrayLike<number>;
|
|
414
446
|
components?: DefinedComponents;
|
|
447
|
+
wires?: Wire[];
|
|
415
448
|
}
|
|
416
449
|
declare function hsv(h: number | {
|
|
417
450
|
h: number;
|
|
@@ -487,7 +520,7 @@ export declare const _OMEGGA_UTILS_IMPORT: {
|
|
|
487
520
|
EMOTES: string[];
|
|
488
521
|
sanitize: (str: string) => string;
|
|
489
522
|
parseLinks: (message: string) => string;
|
|
490
|
-
attr: (attr: string, param?: string) => (message: string) => string;
|
|
523
|
+
attr: (attr: string, param?: string) => ((message: string) => string);
|
|
491
524
|
attrParam: <T = string>(attr: string) => (message: string, param: T) => string;
|
|
492
525
|
color: (message: string, param: string) => string;
|
|
493
526
|
bold: (message: string) => string;
|
|
@@ -534,7 +567,7 @@ export declare const _OMEGGA_UTILS_IMPORT: {
|
|
|
534
567
|
time: {
|
|
535
568
|
parseDuration: typeof parseDuration;
|
|
536
569
|
parseBrickadiaTime: typeof parseBrickadiaTime;
|
|
537
|
-
debounce: (<
|
|
570
|
+
debounce: (<T extends (... /** Player information, id, name, controller, and pawn */args: any) => any>(func: T, wait: number | undefined, options?: DebounceSettingsLeading) => DebouncedFuncLeading<T>) | (<T extends (...args: any) => any>(func: T, wait?: number, options?: DebounceSettings) => DebouncedFunc<T>);
|
|
538
571
|
};
|
|
539
572
|
map: {
|
|
540
573
|
DEFAULT_MAPS: {
|
|
@@ -590,10 +623,10 @@ export declare const _OMEGGA_UTILS_IMPORT: {
|
|
|
590
623
|
}): Uint8Array;
|
|
591
624
|
utils: any;
|
|
592
625
|
constants: {
|
|
593
|
-
MAGIC: Uint8Array;
|
|
626
|
+
MAGIC: Uint8Array;
|
|
594
627
|
LATEST_VERSION: number;
|
|
595
628
|
MAX_INT: number;
|
|
596
|
-
DEFAULT_UUID:
|
|
629
|
+
DEFAULT_UUID: Uuid;
|
|
597
630
|
};
|
|
598
631
|
};
|
|
599
632
|
};
|
|
@@ -602,10 +635,10 @@ declare global {
|
|
|
602
635
|
export var Player: StaticPlayer;
|
|
603
636
|
export var OMEGGA_UTIL: typeof _OMEGGA_UTILS_IMPORT;
|
|
604
637
|
}
|
|
605
|
-
export
|
|
606
|
-
export
|
|
607
|
-
export
|
|
608
|
-
export
|
|
638
|
+
export type OL = OmeggaLike;
|
|
639
|
+
export type OP = OmeggaPlugin;
|
|
640
|
+
export type PC<T extends Record<string, unknown> = Record<string, unknown>> = PluginConfig<T>;
|
|
641
|
+
export type PS<T extends Record<string, unknown> = Record<string, unknown>> = PluginStore<T>;
|
|
609
642
|
export interface BrickBounds {
|
|
610
643
|
minBound: [
|
|
611
644
|
number,
|
|
@@ -658,7 +691,7 @@ export interface BrickInteraction {
|
|
|
658
691
|
error: boolean;
|
|
659
692
|
}
|
|
660
693
|
/** AutoRestart options */
|
|
661
|
-
export
|
|
694
|
+
export type AutoRestartConfig = {
|
|
662
695
|
players: boolean;
|
|
663
696
|
bricks: boolean;
|
|
664
697
|
minigames: boolean;
|
|
@@ -668,6 +701,8 @@ export declare type AutoRestartConfig = {
|
|
|
668
701
|
export interface OmeggaPlayer {
|
|
669
702
|
/** player name */
|
|
670
703
|
name: string;
|
|
704
|
+
/** player display name */
|
|
705
|
+
displayName: string;
|
|
671
706
|
/** player uuid */
|
|
672
707
|
id: string;
|
|
673
708
|
/** player controller id */
|
|
@@ -689,6 +724,7 @@ export interface OmeggaPlayer {
|
|
|
689
724
|
string,
|
|
690
725
|
string,
|
|
691
726
|
string,
|
|
727
|
+
string,
|
|
692
728
|
string
|
|
693
729
|
];
|
|
694
730
|
/**
|
|
@@ -990,6 +1026,8 @@ export interface OmeggaLike extends OmeggaCore, LogWrangling, InjectedCommands,
|
|
|
990
1026
|
configPath: string;
|
|
991
1027
|
/** path to saves */
|
|
992
1028
|
savePath: string;
|
|
1029
|
+
/** path to worlds */
|
|
1030
|
+
worldPath: string;
|
|
993
1031
|
/** path to presets */
|
|
994
1032
|
presetPath: string;
|
|
995
1033
|
/** get a plugin's name, documentation, and loaded status
|
|
@@ -1206,6 +1244,48 @@ export interface OmeggaCore {
|
|
|
1206
1244
|
* @return Path to string
|
|
1207
1245
|
*/
|
|
1208
1246
|
getSavePath(saveName: string): string;
|
|
1247
|
+
/**
|
|
1248
|
+
* Get all worlds in the worlds folder and child folders
|
|
1249
|
+
*/
|
|
1250
|
+
getWorlds(): string[];
|
|
1251
|
+
/**
|
|
1252
|
+
* Checks if a world exists and returns an absolute path
|
|
1253
|
+
* @param worldName World name
|
|
1254
|
+
* @return Path to string
|
|
1255
|
+
*/
|
|
1256
|
+
getWorldPath(worldName: string): string;
|
|
1257
|
+
/**
|
|
1258
|
+
* Get a list of revisions for a world
|
|
1259
|
+
* @param worldName World name
|
|
1260
|
+
*/
|
|
1261
|
+
getWorldRevisions(worldName: string): Promise<{
|
|
1262
|
+
index: number;
|
|
1263
|
+
date: Date;
|
|
1264
|
+
note: string;
|
|
1265
|
+
}[]>;
|
|
1266
|
+
/**
|
|
1267
|
+
* Load a world by its name
|
|
1268
|
+
* @param worldName World name
|
|
1269
|
+
*/
|
|
1270
|
+
loadWorld(worldName: string): void;
|
|
1271
|
+
/**
|
|
1272
|
+
* Load a world at a specific revision
|
|
1273
|
+
* @param worldName World name
|
|
1274
|
+
*/
|
|
1275
|
+
loadWorldRevision(worldName: string, revision: number): void;
|
|
1276
|
+
/**
|
|
1277
|
+
* Save a world as a new name
|
|
1278
|
+
* @param worldName World name
|
|
1279
|
+
*/
|
|
1280
|
+
saveWorldAs(worldName: string): void;
|
|
1281
|
+
/**
|
|
1282
|
+
* Save the current world
|
|
1283
|
+
*/
|
|
1284
|
+
saveWorld(): void;
|
|
1285
|
+
/**
|
|
1286
|
+
* Create an empty world with the given name
|
|
1287
|
+
*/
|
|
1288
|
+
createEmptyWorld(worldName: string): void;
|
|
1209
1289
|
/**
|
|
1210
1290
|
* unsafely load save data (wrap in try/catch)
|
|
1211
1291
|
* @param saveName save file name
|
|
@@ -1296,9 +1376,9 @@ export interface PluginStore<Storage extends Record<string, unknown> = Record<st
|
|
|
1296
1376
|
keys(): Promise<(keyof Storage)[]>;
|
|
1297
1377
|
}
|
|
1298
1378
|
/** A config representative of the config outlined in doc.json */
|
|
1299
|
-
export
|
|
1379
|
+
export type PluginConfig<T extends Record<string, unknown> = Record<string, unknown>> = T;
|
|
1300
1380
|
/** An omegga plugin */
|
|
1301
|
-
export
|
|
1381
|
+
export declare abstract class OmeggaPlugin<Config extends Record<string, unknown> = Record<string, unknown>, Storage extends Record<string, unknown> = Record<string, unknown>> {
|
|
1302
1382
|
omegga: OmeggaLike;
|
|
1303
1383
|
config: PluginConfig<Config>;
|
|
1304
1384
|
store: PluginStore<Storage>;
|
|
@@ -1341,15 +1421,15 @@ export interface LogWrangling {
|
|
|
1341
1421
|
members: Member[];
|
|
1342
1422
|
}[]>;
|
|
1343
1423
|
}
|
|
1344
|
-
export
|
|
1345
|
-
export
|
|
1424
|
+
export type WatcherPattern<T> = (line: string, match: RegExpMatchArray) => T | RegExpMatchArray | "[OMEGGA_WATCHER_DONE]";
|
|
1425
|
+
export type IMatcher<T> = {
|
|
1346
1426
|
pattern: RegExp;
|
|
1347
1427
|
callback: (match: RegExpMatchArray) => boolean;
|
|
1348
1428
|
} | {
|
|
1349
1429
|
pattern: (line: string, match: RegExpMatchArray) => T;
|
|
1350
1430
|
callback: (match: RegExpMatchArray) => T;
|
|
1351
1431
|
};
|
|
1352
|
-
export
|
|
1432
|
+
export type IWatcher<T> = {
|
|
1353
1433
|
bundle: boolean;
|
|
1354
1434
|
debounce: boolean;
|
|
1355
1435
|
timeoutDelay: number;
|
|
@@ -1425,6 +1505,10 @@ export interface PluginInterop {
|
|
|
1425
1505
|
loaded: boolean;
|
|
1426
1506
|
emitPlugin?(event: string, args: any[]): Promise<any>;
|
|
1427
1507
|
}
|
|
1428
|
-
export
|
|
1508
|
+
export type WeaponClass = "Weapon_AntiMaterielRifle" | "Weapon_ArmingSword" | "Weapon_AssaultRifle" | "Weapon_AutoShotgun" | "Weapon_Battleaxe" | "Weapon_Bazooka" | "Weapon_Bow" | "Weapon_BullpupRifle" | "Weapon_BullpupSMG" | "Weapon_ChargedLongsword" | "Weapon_CrystalKalis" | "Weapon_Derringer" | "Weapon_FlintlockPistol" | "Weapon_GrenadeLauncher" | "Weapon_Handaxe" | "Weapon_HealthPotion" | "Weapon_HeavyAssaultRifle" | "Weapon_HeavySMG" | "Weapon_HeroSword" | "Weapon_HighPowerPistol" | "Weapon_HoloBlade" | "Weapon_HuntingShotgun" | "Weapon_Ikakalaka" | "Weapon_ImpactGrenade" | "Weapon_ImpactGrenadeLauncher" | "Weapon_ImpulseGrenade" | "Weapon_Khopesh" | "Weapon_Knife" | "Weapon_LeverActionRifle" | "Weapon_LightMachineGun" | "Weapon_LongSword" | "Weapon_MagnumPistol" | "Weapon_MicroSMG" | "Weapon_Minigun" | "Weapon_Pistol" | "Weapon_PulseCarbine" | "Weapon_QuadLauncher" | "Weapon_Revolver" | "Weapon_RocketJumper" | "Weapon_RocketLauncher" | "Weapon_Sabre" | "Weapon_SemiAutoRifle" | "Weapon_ServiceRifle" | "Weapon_Shotgun" | "Weapon_SlugShotgun" | "Weapon_Sniper" | "Weapon_Spatha" | "Weapon_StandardSubmachineGun" | "Weapon_StickGrenade" | "Weapon_SubmachineGun" | "Weapon_SuperShotgun" | "Weapon_SuppressedAssaultRifle" | "Weapon_SuppressedBullpupSMG" | "Weapon_SuppressedPistol" | "Weapon_SuppressedServiceRifle" | "Weapon_TacticalShotgun" | "Weapon_TacticalSMG" | "Weapon_Tomahawk" | "Weapon_TwinCannon" | "Weapon_TypewriterSMG" | "Weapon_Zweihander";
|
|
1509
|
+
|
|
1510
|
+
export {
|
|
1511
|
+
OmeggaPlugin as default,
|
|
1512
|
+
};
|
|
1429
1513
|
|
|
1430
1514
|
export {};
|
|
@@ -15,11 +15,6 @@ if ! [[ $(which tar) && $(which wget) && $(which xz) ]]; then
|
|
|
15
15
|
exit 1
|
|
16
16
|
fi;
|
|
17
17
|
|
|
18
|
-
if ! [[ $(which omegga) ]]; then
|
|
19
|
-
echo ">! how on earth are you running this without omegga" >&2
|
|
20
|
-
exit 1
|
|
21
|
-
fi;
|
|
22
|
-
|
|
23
18
|
if [[ -f $BINARY_PATH ]]; then
|
|
24
19
|
echo ">> Launcher already installed!"
|
|
25
20
|
exit 0
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# This file automatically downloads steamcmd
|
|
4
|
+
|
|
5
|
+
TAR_FILE=steamcmd_linux.tar.gz
|
|
6
|
+
STEAMCMD_URL=https://steamcdn-a.akamaihd.net/client/installer/$TAR_FILE
|
|
7
|
+
STEAMCMD_PATH=$HOME/.config/omegga/steam
|
|
8
|
+
FILE=$STEAMCMD_PATH/$TAR_FILE
|
|
9
|
+
STEAMCMD=$STEAMCMD_PATH/steamcmd.sh
|
|
10
|
+
|
|
11
|
+
has_global_steamcmd=$(which steamcmd 2>/dev/null)
|
|
12
|
+
if [[ -f $has_global_steamcmd ]]; then
|
|
13
|
+
# create a steamcmd.sh that runs the global steamcmd
|
|
14
|
+
mkdir -p $STEAMCMD_PATH
|
|
15
|
+
# check if STEAMCMD already exists
|
|
16
|
+
if [[ -f $STEAMCMD ]]; then
|
|
17
|
+
echo ">> Steamcmd already exists at $STEAMCMD, skipping global steamcmd setup"
|
|
18
|
+
exit 0
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
# use a heredoc
|
|
22
|
+
cat <<'EOF' > $STEAMCMD
|
|
23
|
+
#!/usr/bin/env bash
|
|
24
|
+
exec steamcmd "$@"
|
|
25
|
+
EOF
|
|
26
|
+
chmod +x $STEAMCMD
|
|
27
|
+
echo ">> Using global steamcmd at $has_global_steamcmd"
|
|
28
|
+
exit 0
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
has_tar=$(which tar)
|
|
32
|
+
has_wget=$(which wget)
|
|
33
|
+
has_lib32gcc="yes" # sorry anyone not running arch/debian
|
|
34
|
+
lib32gcc_dep="lib32gcc-s1"
|
|
35
|
+
pkg_manager="apt-get install"
|
|
36
|
+
|
|
37
|
+
# check if lib32-gcc-libs is installed in arch linux
|
|
38
|
+
if [[ -f /etc/arch-release ]]; then
|
|
39
|
+
lib32gcc_dep="lib32-gcc-libs"
|
|
40
|
+
pkg_manager="pacman -S"
|
|
41
|
+
has_lib32gcc=$(dpkg -s lib32-gcc-libs >/dev/null 2>&1 && echo "yes" || echo "no")
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
# check if lib32gcc-s1 exists in debian/ubuntu
|
|
45
|
+
if [[ -f /etc/debian_version ]] || [[ -f /etc/lsb-release ]]; then
|
|
46
|
+
lib32gcc_dep="lib32gcc-s1"
|
|
47
|
+
pkg_manager="apt-get install"
|
|
48
|
+
has_lib32gcc=$(dpkg -s lib32gcc-s1 >/dev/null 2>&1 && echo "yes" || echo "no")
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if ! [[ $has_tar && $has_wget && $has_lib32gcc == "yes" ]]; then
|
|
53
|
+
wget_dep="wget "
|
|
54
|
+
tar_dep="tar "
|
|
55
|
+
if [[ $has_tar ]]; then tar_dep=""; fi
|
|
56
|
+
if [[ $has_wget ]]; then wget_dep=""; fi
|
|
57
|
+
if [[ $has_lib32gcc == "yes" ]]; then lib32gcc_dep=""; fi
|
|
58
|
+
|
|
59
|
+
echo ">! Missing dependencies, please run:" >&2
|
|
60
|
+
echo " sudo $pkg_manager $wget_dep$tar_dep_$lib32gcc_dep" >&2
|
|
61
|
+
echo
|
|
62
|
+
exit 1
|
|
63
|
+
fi;
|
|
64
|
+
|
|
65
|
+
if [[ -f $STEAMCMD ]]; then
|
|
66
|
+
echo ">> Steamcmd already installed, checking for updates..."
|
|
67
|
+
$STEAMCMD +login anonymous +quit
|
|
68
|
+
exit 0
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
mkdir -p $STEAMCMD_PATH
|
|
72
|
+
|
|
73
|
+
if [[ -f $FILE ]]; then
|
|
74
|
+
echo ">> Steamcmd tar already downloaded!"
|
|
75
|
+
else
|
|
76
|
+
echo ">> Downloading steamcmd tar"
|
|
77
|
+
wget $STEAMCMD_URL -P $STEAMCMD_PATH
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
if [[ -f $STEAMCMD ]]; then
|
|
81
|
+
echo ">> Steamcmd already installed!"
|
|
82
|
+
else
|
|
83
|
+
echo ">> Extracting steamcmd tar"
|
|
84
|
+
tar xf $FILE -C $STEAMCMD_PATH
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
echo ">> Checking steamcmd for updates..."
|
|
88
|
+
$STEAMCMD +login anonymous +quit
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
use omegga::{events::Event, Omegga};
|
|
2
|
-
|
|
3
|
-
#[tokio::main]
|
|
4
|
-
async fn main() {
|
|
5
|
-
let omegga = Omegga::new();
|
|
6
|
-
let mut events = omegga.spawn();
|
|
7
|
-
|
|
8
|
-
// Write your plugin!
|
|
9
|
-
while let Some(event) = events.recv().await {
|
|
10
|
-
match event {
|
|
11
|
-
// Handle init/stop...
|
|
12
|
-
Event::Init { id, .. } => omegga.register_commands(id, &["test"]),
|
|
13
|
-
Event::Stop { id, .. } => omegga.write_response(id, None, None),
|
|
14
|
-
|
|
15
|
-
// Listen for any commands we care about...
|
|
16
|
-
Event::Command {
|
|
17
|
-
player, command, ..
|
|
18
|
-
} => match command.as_str() {
|
|
19
|
-
"test" => omegga.broadcast(format!("Hello, {player}!")),
|
|
20
|
-
_ => (),
|
|
21
|
-
},
|
|
22
|
-
_ => (),
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|