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.
Files changed (151) hide show
  1. package/README.md +9 -1
  2. package/dist/brickadia/config.js +23 -12
  3. package/dist/brickadia/config.js.map +1 -1
  4. package/dist/brickadia/presets.d.ts +2 -2
  5. package/dist/brickadia/server.d.ts +0 -1
  6. package/dist/brickadia/server.js +68 -23
  7. package/dist/brickadia/server.js.map +1 -1
  8. package/dist/cli/auth.d.ts +8 -2
  9. package/dist/cli/auth.js +97 -16
  10. package/dist/cli/auth.js.map +1 -1
  11. package/dist/cli/config.d.ts +1 -1
  12. package/dist/cli/config.js.map +1 -1
  13. package/dist/cli/index.d.ts +10 -5
  14. package/dist/cli/installer.js.map +1 -1
  15. package/dist/cli/plugin.js +22 -24
  16. package/dist/cli/plugin.js.map +1 -1
  17. package/dist/cli/terminal.d.ts +0 -1
  18. package/dist/cli/terminal.js +185 -4
  19. package/dist/cli/terminal.js.map +1 -1
  20. package/dist/config/authorizer.js.map +1 -1
  21. package/dist/config/index.js +0 -1
  22. package/dist/config/index.js.map +1 -1
  23. package/dist/config/types.d.ts +12 -4
  24. package/dist/config/validator.js +5 -2
  25. package/dist/config/validator.js.map +1 -1
  26. package/dist/index.js +17 -7
  27. package/dist/index.js.map +1 -1
  28. package/dist/info/default_commands.json +20 -19
  29. package/dist/logger.js +1 -5
  30. package/dist/logger.js.map +1 -1
  31. package/dist/main.js +196 -50
  32. package/dist/main.js.map +1 -1
  33. package/dist/omegga/auth.d.ts +5 -3
  34. package/dist/omegga/auth.js +39 -16
  35. package/dist/omegga/auth.js.map +1 -1
  36. package/dist/omegga/commandInjector.d.ts +1 -1
  37. package/dist/omegga/commandInjector.js +4 -4
  38. package/dist/omegga/commandInjector.js.map +1 -1
  39. package/dist/omegga/index.js +17 -7
  40. package/dist/omegga/index.js.map +1 -1
  41. package/dist/omegga/logWrangler.d.ts +1 -1
  42. package/dist/omegga/logWrangler.js +19 -12
  43. package/dist/omegga/logWrangler.js.map +1 -1
  44. package/dist/omegga/matchers/auth.d.ts +1 -0
  45. package/dist/omegga/matchers/auth.js +5 -5
  46. package/dist/omegga/matchers/auth.js.map +1 -1
  47. package/dist/omegga/matchers/chat.d.ts +1 -0
  48. package/dist/omegga/matchers/chat.js +13 -7
  49. package/dist/omegga/matchers/chat.js.map +1 -1
  50. package/dist/omegga/matchers/command.js +1 -1
  51. package/dist/omegga/matchers/command.js.map +1 -1
  52. package/dist/omegga/matchers/init.js.map +1 -1
  53. package/dist/omegga/matchers/interact.js.map +1 -1
  54. package/dist/omegga/matchers/join.js +12 -10
  55. package/dist/omegga/matchers/join.js.map +1 -1
  56. package/dist/omegga/matchers/leave.js.map +1 -1
  57. package/dist/omegga/matchers/mapChange.js.map +1 -1
  58. package/dist/omegga/matchers/minigameJoin.js.map +1 -1
  59. package/dist/omegga/matchers/types.d.ts +1 -1
  60. package/dist/omegga/matchers/types.js +0 -4
  61. package/dist/omegga/matchers/types.js.map +1 -1
  62. package/dist/omegga/matchers/version.js +36 -30
  63. package/dist/omegga/matchers/version.js.map +1 -1
  64. package/dist/omegga/player.d.ts +4 -2
  65. package/dist/omegga/player.js +50 -66
  66. package/dist/omegga/player.js.map +1 -1
  67. package/dist/omegga/plugin/plugin_jsonrpc_stdio.js +15 -16
  68. package/dist/omegga/plugin/plugin_jsonrpc_stdio.js.map +1 -1
  69. package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.d.ts +13 -1
  70. package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js +34 -1
  71. package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js.map +1 -1
  72. package/dist/omegga/plugin/plugin_node_safe/worker.js +3 -4
  73. package/dist/omegga/plugin/plugin_node_safe/worker.js.map +1 -1
  74. package/dist/omegga/plugin/plugin_node_safe.d.ts +0 -1
  75. package/dist/omegga/plugin/plugin_node_safe.js +15 -16
  76. package/dist/omegga/plugin/plugin_node_safe.js.map +1 -1
  77. package/dist/omegga/plugin/plugin_node_unsafe.js +17 -8
  78. package/dist/omegga/plugin/plugin_node_unsafe.js.map +1 -1
  79. package/dist/omegga/plugin.d.ts +1 -1
  80. package/dist/omegga/plugin.js +14 -10
  81. package/dist/omegga/plugin.js.map +1 -1
  82. package/dist/omegga/server.d.ts +13 -0
  83. package/dist/omegga/server.js +103 -11
  84. package/dist/omegga/server.js.map +1 -1
  85. package/dist/omegga/types.d.ts +3 -3
  86. package/dist/omegga/wrapper.d.ts +0 -1
  87. package/dist/omegga/wrapper.js +2 -1
  88. package/dist/omegga/wrapper.js.map +1 -1
  89. package/dist/plugin.d.ts +61 -16
  90. package/dist/plugin.js.map +1 -1
  91. package/dist/softconfig.d.ts +15 -0
  92. package/dist/softconfig.js +23 -1
  93. package/dist/softconfig.js.map +1 -1
  94. package/dist/tsconfig.tsbuildinfo +1 -0
  95. package/dist/util/brick/checkBounds.js +1 -2
  96. package/dist/util/brick/checkBounds.js.map +1 -1
  97. package/dist/util/brick/constants.js +1 -0
  98. package/dist/util/brick/constants.js.map +1 -1
  99. package/dist/util/brick/displayName.d.ts +1 -1
  100. package/dist/util/brick/displayName.js +2 -2
  101. package/dist/util/brick/displayName.js.map +1 -1
  102. package/dist/util/brick/getBounds.js +2 -3
  103. package/dist/util/brick/getBounds.js.map +1 -1
  104. package/dist/util/brick/getBrickSize.js +1 -2
  105. package/dist/util/brick/getBrickSize.js.map +1 -1
  106. package/dist/util/brick/getScaleAxis.js +1 -2
  107. package/dist/util/brick/getScaleAxis.js.map +1 -1
  108. package/dist/util/brick/rotate.js +6 -6
  109. package/dist/util/brick/rotate.js.map +1 -1
  110. package/dist/util/brick/setOwnership.js +5 -3
  111. package/dist/util/brick/setOwnership.js.map +1 -1
  112. package/dist/util/chat.d.ts +1 -1
  113. package/dist/util/color.js +2 -2
  114. package/dist/util/color.js.map +1 -1
  115. package/dist/util/file.js +5 -6
  116. package/dist/util/file.js.map +1 -1
  117. package/dist/util/index.d.ts +6 -7
  118. package/dist/util/index.js +19 -8
  119. package/dist/util/index.js.map +1 -1
  120. package/dist/util/map.js +3 -3
  121. package/dist/util/map.js.map +1 -1
  122. package/dist/util/time.js +8 -8
  123. package/dist/util/time.js.map +1 -1
  124. package/dist/util/wsl.d.ts +1 -1
  125. package/dist/util/wsl.js +8 -6
  126. package/dist/util/wsl.js.map +1 -1
  127. package/dist/webserver/backend/api.js +51 -22
  128. package/dist/webserver/backend/api.js.map +1 -1
  129. package/dist/webserver/backend/database.d.ts +0 -1
  130. package/dist/webserver/backend/database.js +67 -32
  131. package/dist/webserver/backend/database.js.map +1 -1
  132. package/dist/webserver/backend/index.d.ts +0 -1
  133. package/dist/webserver/backend/index.js +18 -9
  134. package/dist/webserver/backend/index.js.map +1 -1
  135. package/dist/webserver/backend/metrics.js +6 -3
  136. package/dist/webserver/backend/metrics.js.map +1 -1
  137. package/dist/webserver/backend/types.d.ts +2 -3
  138. package/dist/webserver/backend/util.js +2 -3
  139. package/dist/webserver/backend/util.js.map +1 -1
  140. package/omegga-config.yml +7 -0
  141. package/package.json +11 -10
  142. package/public/app.bundle.js +31209 -25722
  143. package/public/app.bundle.js.map +1 -1
  144. package/public/app.css +2 -2
  145. package/public/auth.bundle.js +12762 -13651
  146. package/public/auth.bundle.js.map +1 -1
  147. package/public/auth.css +2 -2
  148. package/templates/safe-ts/omegga.d.ts +109 -25
  149. package/tools/install_launcher.sh +0 -5
  150. package/tools/install_steamcmd.sh +88 -0
  151. 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-data-v-7c51ac40 2s infinite linear;
247
+ animation: rotating-7c51ac40 2s infinite linear;
248
248
  }
249
- @keyframes rotating-data-v-7c51ac40 {
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 declare type Preset<T extends string, D> = {
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 declare type EnvironmentPreset = Preset<"Environment", {
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 declare type IMinigameList = {
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 declare type IPlayerPositions = {
142
+ export type IPlayerPositions = {
141
143
  player: OmeggaPlayer;
142
144
  pawn: string;
143
145
  pos: number[];
144
146
  isDead: boolean;
145
147
  }[];
146
- export declare type ILogMinigame = {
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 UnrealType = UnrealClass | UnrealObject | UnrealBoolean | UnrealFloat | UnrealColor | UnrealByte | UnrealRotator | UnrealString;
182
- 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 : UnrealType;
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 Owner extends User {
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: Owner[];
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 ReadSaveObject = BrsV1 | BrsV2 | BrsV3 | BrsV4 | BrsV8 | BrsV9 | BrsV10;
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: (<T_1 extends (...args: any) => any>(func: T_1, wait: number, options?: DebounceSettingsLeading) => DebouncedFuncLeading<T_1>) | (<T_2 extends (...args: any) => any>(func: T_2, wait?: number, options?: DebounceSettings) => DebouncedFunc<T_2>);
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; /** player name */
626
+ MAGIC: Uint8Array;
594
627
  LATEST_VERSION: number;
595
628
  MAX_INT: number;
596
- DEFAULT_UUID: string;
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 declare type OL = OmeggaLike;
606
- export declare type OP = OmeggaPlugin;
607
- export declare type PC<T extends Record<string, unknown> = Record<string, unknown>> = PluginConfig<T>;
608
- export declare type PS<T extends Record<string, unknown> = Record<string, unknown>> = PluginStore<T>;
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 declare type AutoRestartConfig = {
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 declare type PluginConfig<T extends Record<string, unknown> = Record<string, unknown>> = T;
1379
+ export type PluginConfig<T extends Record<string, unknown> = Record<string, unknown>> = T;
1300
1380
  /** An omegga plugin */
1301
- export default abstract class OmeggaPlugin<Config extends Record<string, unknown> = Record<string, unknown>, Storage extends Record<string, unknown> = Record<string, unknown>> {
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 declare type WatcherPattern<T> = (line: string, match: RegExpMatchArray) => T | RegExpMatchArray | "[OMEGGA_WATCHER_DONE]";
1345
- export declare type IMatcher<T> = {
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 declare type IWatcher<T> = {
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 declare 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";
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
- }