@maka/maka-cli 5.1.31 → 5.1.33

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 (97) hide show
  1. package/bundle/typescript/package.json +1 -1
  2. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +1 -1
  3. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +2 -2
  4. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +1 -1
  5. package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +2 -2
  6. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.d.ts +1 -1
  7. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +8 -5
  8. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
  9. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +1 -1
  10. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +44 -9
  11. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
  12. package/bundle/typescript/src/commands/game/sideQuest/commands/give.d.ts +1 -1
  13. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +10 -3
  14. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
  15. package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +1 -1
  16. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +5 -2
  17. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
  18. package/bundle/typescript/src/commands/game/sideQuest/commands/kill.d.ts +6 -0
  19. package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js +36 -0
  20. package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js.map +1 -0
  21. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.d.ts +2 -1
  22. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +54 -18
  23. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
  24. package/bundle/typescript/src/commands/game/sideQuest/commands/look.d.ts +2 -1
  25. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +58 -6
  26. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
  27. package/bundle/typescript/src/commands/game/sideQuest/commands/read.d.ts +6 -0
  28. package/bundle/typescript/src/commands/game/sideQuest/commands/read.js +26 -0
  29. package/bundle/typescript/src/commands/game/sideQuest/commands/read.js.map +1 -0
  30. package/bundle/typescript/src/commands/game/sideQuest/commands/say.d.ts +1 -1
  31. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +12 -16
  32. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
  33. package/bundle/typescript/src/commands/game/sideQuest/commands/search.d.ts +1 -1
  34. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +15 -11
  35. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
  36. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.d.ts +1 -1
  37. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +1 -1
  38. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
  39. package/bundle/typescript/src/commands/game/sideQuest/commands/store.d.ts +1 -1
  40. package/bundle/typescript/src/commands/game/sideQuest/commands/store.js +1 -1
  41. package/bundle/typescript/src/commands/game/sideQuest/commands/store.js.map +1 -1
  42. package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +1 -1
  43. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +6 -4
  44. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
  45. package/bundle/typescript/src/commands/game/sideQuest/commands/talk.d.ts +1 -1
  46. package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +4 -2
  47. package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
  48. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.d.ts +1 -1
  49. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +1 -1
  50. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
  51. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.d.ts +1 -1
  52. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +2 -2
  53. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
  54. package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +1 -1
  55. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +1 -1
  56. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
  57. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
  58. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
  59. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +22 -11
  60. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
  61. package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +17 -4
  62. package/bundle/typescript/src/commands/game/sideQuest/game.js +195 -4
  63. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  64. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +1 -0
  65. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +19 -6
  66. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -1
  67. package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +5 -1
  68. package/bundle/typescript/src/commands/game/sideQuest/models/item.js +20 -0
  69. package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
  70. package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +11 -2
  71. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +302 -96
  72. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
  73. package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +6 -2
  74. package/bundle/typescript/src/commands/game/sideQuest/models/player.js +142 -19
  75. package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
  76. package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +2 -1
  77. package/bundle/typescript/src/commands/game/sideQuest/models/room.js +24 -18
  78. package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
  79. package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +6 -1
  80. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +28 -2
  81. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
  82. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +114 -0
  83. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +323 -116
  84. package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.d.ts +16 -5
  85. package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
  86. package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +2 -0
  87. package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +4 -0
  88. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +47 -12
  89. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +53 -11
  90. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
  91. package/bundle/typescript/src/commands/game/sideQuest/ui.js +17 -161
  92. package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
  93. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +5 -2
  94. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
  95. package/bundle/typescript/src/templates/meteor/api/api.js +1 -1
  96. package/bundle/typescript/src/templates/meteor/api/api.js.ts +1 -1
  97. package/package.json +1 -1
@@ -2,42 +2,53 @@ import { Item } from '../models/item.js';
2
2
  export type Inventory = Item[];
3
3
  export type HeadEquipment = {
4
4
  eyes: Item | null;
5
- skull: Item | null;
6
5
  ears: Item | null;
6
+ skull: Item | null;
7
7
  mouth: Item | null;
8
8
  nose: Item | null;
9
+ commlink: Item | null;
9
10
  };
10
11
  export type TorsoEquipment = {
12
+ armorVest: Item | null;
13
+ armorCoat: Item | null;
11
14
  backpack: Item | null;
15
+ tacticalRig: Item | null;
12
16
  leftShoulder: Item | null;
13
17
  rightShoulder: Item | null;
14
18
  bandolier: Item | null;
15
19
  };
16
20
  export type LegEquipment = {
21
+ pants: Item | null;
22
+ thighRig: Item | null;
17
23
  leftHip: Item | null;
18
24
  rightHip: Item | null;
19
- leftThigh: Item | null;
20
- rightThigh: Item | null;
21
25
  };
22
26
  export type FeetEquipment = {
27
+ boots: Item | null;
23
28
  leftAnkle: Item | null;
24
29
  rightAnkle: Item | null;
25
30
  };
26
31
  export type ArmsEquipment = {
27
- leftBicept: Item | null;
28
- rightBicept: Item | null;
29
32
  leftForearm: Item | null;
30
33
  rightForearm: Item | null;
34
+ leftBicept: Item | null;
35
+ rightBicept: Item | null;
36
+ cyberware: Item | null;
31
37
  };
32
38
  export type GlovesEquipment = {
33
39
  leftWrist: Item | null;
34
40
  rightWrist: Item | null;
35
41
  };
36
42
  export type LeftHandEquipment = {
43
+ weapon: Item | null;
44
+ shield: Item | null;
37
45
  ring: Item | null;
46
+ device: Item | null;
38
47
  };
39
48
  export type RightHandEquipment = {
49
+ weapon: Item | null;
40
50
  ring: Item | null;
51
+ device: Item | null;
41
52
  };
42
53
  export type PlayerEquipment = {
43
54
  head: HeadEquipment | null;
@@ -19,4 +19,5 @@ export interface IItemSeedJson {
19
19
  room?: string;
20
20
  heldBy?: string;
21
21
  owner?: string;
22
+ transferable?: boolean;
22
23
  }
@@ -1,6 +1,8 @@
1
1
  import { LifestyleChoice } from './lifestyle-seed.js';
2
+ import { IItemSeedJson } from './item-seed.js';
2
3
  export interface IPlayerSeedJson {
3
4
  name: string;
4
5
  startLocation: string;
5
6
  lifestyleChoices: LifestyleChoice[];
7
+ startingItems?: IItemSeedJson[];
6
8
  }
@@ -2,6 +2,7 @@ import { IRoomSeedJson } from './room-seed.js';
2
2
  import { INPCSeedJson } from './npc-seed.js';
3
3
  import { IItemSeedJson } from './item-seed.js';
4
4
  import { IPuzzleSeedJson } from './puzzle-seed.js';
5
+ import { IPlayerSeedJson } from './player-seed.js';
5
6
  export interface ISceneSeedJson {
6
7
  name: string;
7
8
  currency: {
@@ -13,4 +14,7 @@ export interface ISceneSeedJson {
13
14
  items: IItemSeedJson[];
14
15
  puzzles: IPuzzleSeedJson[];
15
16
  residenceTiers: string[];
17
+ story: string;
18
+ /** The logging-in player who will be actively controlled */
19
+ player: IPlayerSeedJson;
16
20
  }
@@ -14,21 +14,56 @@ export declare enum Rating {
14
14
  }
15
15
  export declare enum Category {
16
16
  Weapon = "weapon",
17
+ MeleeWeapon = "melee weapon",
18
+ RangedWeapon = "ranged weapon",
19
+ Ammunition = "ammunition",
20
+ Explosive = "explosive",
21
+ BodyArmor = "body armor",
22
+ Armor = "armor",
17
23
  Shield = "shield",
18
- Key = "key",
19
- Gloves = "gloves",
20
24
  Helmet = "helmet",
21
- Hat = "hat",
22
- Boots = "boots",
23
- LegArmor = "leg armor",
24
25
  ArmArmor = "arm armor",
25
- BodyArmor = "body armor",
26
- Book = "book",
27
- Cup = "cup",
28
- Unknown = "unknown",
29
- CurrencyContainer = "currency container",
26
+ LegArmor = "leg armor",
27
+ Boots = "boots",
28
+ Gloves = "gloves",
29
+ Cyberware = "cyberware",
30
+ Bioware = "bioware",
31
+ Nanoware = "nanoware",
32
+ Geneware = "geneware",
33
+ Commlink = "commlink",
34
+ Cyberdeck = "cyberdeck",
35
+ RCC = "rcc",// Rigger Command Console
36
+ Drone = "drone",
37
+ Software = "software",
38
+ Electronics = "electronics",
39
+ EyeCyberwere = "eyewear",
40
+ Focus = "focus",
41
+ SpellFormula = "spell formula",
42
+ AlchemicalItem = "alchemical item",
43
+ MagicalReagent = "magical reagent",
44
+ Fetish = "fetish",
45
+ Grimoire = "grimoire",
46
+ Clothing = "clothing",
47
+ ArmorClothing = "armor clothing",
30
48
  Medical = "medical",
31
- Consumable = "consumable",
32
49
  Tool = "tool",
33
- Vice = "vice"
50
+ Consumable = "consumable",
51
+ Sensor = "sensor",
52
+ SlapPatch = "slap patch",
53
+ BiometricScanner = "biometric scanner",
54
+ Hat = "hat",
55
+ Glasses = "glasses",
56
+ SIN = "sin",
57
+ FakeSIN = "fake sin",
58
+ License = "license",
59
+ CurrencyContainer = "currency container",
60
+ Credstick = "credstick",
61
+ Vice = "vice",
62
+ Book = "book",
63
+ Key = "key",
64
+ Trinket = "trinket",
65
+ Document = "document",
66
+ Datachip = "datachip",
67
+ Badge = "badge",
68
+ Unknown = "unknown"
34
69
  }
@@ -16,23 +16,65 @@ export var Rating;
16
16
  })(Rating || (Rating = {}));
17
17
  export var Category;
18
18
  (function (Category) {
19
+ // Combat
19
20
  Category["Weapon"] = "weapon";
21
+ Category["MeleeWeapon"] = "melee weapon";
22
+ Category["RangedWeapon"] = "ranged weapon";
23
+ Category["Ammunition"] = "ammunition";
24
+ Category["Explosive"] = "explosive";
25
+ Category["BodyArmor"] = "body armor";
26
+ Category["Armor"] = "armor";
20
27
  Category["Shield"] = "shield";
21
- Category["Key"] = "key";
22
- Category["Gloves"] = "gloves";
23
28
  Category["Helmet"] = "helmet";
24
- Category["Hat"] = "hat";
25
- Category["Boots"] = "boots";
26
- Category["LegArmor"] = "leg armor";
27
29
  Category["ArmArmor"] = "arm armor";
28
- Category["BodyArmor"] = "body armor";
29
- Category["Book"] = "book";
30
- Category["Cup"] = "cup";
31
- Category["Unknown"] = "unknown";
32
- Category["CurrencyContainer"] = "currency container";
30
+ Category["LegArmor"] = "leg armor";
31
+ Category["Boots"] = "boots";
32
+ Category["Gloves"] = "gloves";
33
+ // Cyberware / Bioware / Augmentations
34
+ Category["Cyberware"] = "cyberware";
35
+ Category["Bioware"] = "bioware";
36
+ Category["Nanoware"] = "nanoware";
37
+ Category["Geneware"] = "geneware";
38
+ // Electronics and Matrix
39
+ Category["Commlink"] = "commlink";
40
+ Category["Cyberdeck"] = "cyberdeck";
41
+ Category["RCC"] = "rcc";
42
+ Category["Drone"] = "drone";
43
+ Category["Software"] = "software";
44
+ Category["Electronics"] = "electronics";
45
+ Category["EyeCyberwere"] = "eyewear";
46
+ // Magic
47
+ Category["Focus"] = "focus";
48
+ Category["SpellFormula"] = "spell formula";
49
+ Category["AlchemicalItem"] = "alchemical item";
50
+ Category["MagicalReagent"] = "magical reagent";
51
+ Category["Fetish"] = "fetish";
52
+ Category["Grimoire"] = "grimoire";
53
+ // Gear and Utility
54
+ Category["Clothing"] = "clothing";
55
+ Category["ArmorClothing"] = "armor clothing";
33
56
  Category["Medical"] = "medical";
34
- Category["Consumable"] = "consumable";
35
57
  Category["Tool"] = "tool";
58
+ Category["Consumable"] = "consumable";
59
+ Category["Sensor"] = "sensor";
60
+ Category["SlapPatch"] = "slap patch";
61
+ Category["BiometricScanner"] = "biometric scanner";
62
+ Category["Hat"] = "hat";
63
+ Category["Glasses"] = "glasses";
64
+ // Economy & Identity
65
+ Category["SIN"] = "sin";
66
+ Category["FakeSIN"] = "fake sin";
67
+ Category["License"] = "license";
68
+ Category["CurrencyContainer"] = "currency container";
69
+ Category["Credstick"] = "credstick";
70
+ // Misc and World
36
71
  Category["Vice"] = "vice";
72
+ Category["Book"] = "book";
73
+ Category["Key"] = "key";
74
+ Category["Trinket"] = "trinket";
75
+ Category["Document"] = "document";
76
+ Category["Datachip"] = "datachip";
77
+ Category["Badge"] = "badge";
78
+ Category["Unknown"] = "unknown";
37
79
  })(Category || (Category = {}));
38
80
  //# sourceMappingURL=item-enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"item-enum.js","sourceRoot":"","sources":["../../../../../../../../src/commands/game/sideQuest/types/shared/item-enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,IAMX;AAND,WAAY,IAAI;IACd,qBAAa,CAAA;IACX,uBAAe,CAAA;IACf,yBAAiB,CAAA;IACjB,uBAAe,CAAA;IACf,gCAAwB,CAAA;AAC5B,CAAC,EANW,IAAI,KAAJ,IAAI,QAMf;AAED,MAAM,CAAN,IAAY,MAMX;AAND,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACf,+BAAqB,CAAA;IACrB,uBAAa,CAAA;IACb,iCAAuB,CAAA;IACvB,0CAAgC,CAAA;AACpC,CAAC,EANW,MAAM,KAAN,MAAM,QAMjB;AAED,MAAM,CAAN,IAAY,QAmBX;AAnBD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACf,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,2BAAe,CAAA;IACf,kCAAsB,CAAA;IACtB,kCAAsB,CAAA;IACtB,oCAAwB,CAAA;IACxB,yBAAa,CAAA;IACb,uBAAW,CAAA;IACX,+BAAmB,CAAA;IACnB,oDAAwC,CAAA;IACxC,+BAAmB,CAAA;IACnB,qCAAyB,CAAA;IACzB,yBAAa,CAAA;IACb,yBAAa,CAAA;AACjB,CAAC,EAnBW,QAAQ,KAAR,QAAQ,QAmBnB"}
1
+ {"version":3,"file":"item-enum.js","sourceRoot":"","sources":["../../../../../../../../src/commands/game/sideQuest/types/shared/item-enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,IAMX;AAND,WAAY,IAAI;IACd,qBAAa,CAAA;IACX,uBAAe,CAAA;IACf,yBAAiB,CAAA;IACjB,uBAAe,CAAA;IACf,gCAAwB,CAAA;AAC5B,CAAC,EANW,IAAI,KAAJ,IAAI,QAMf;AAED,MAAM,CAAN,IAAY,MAMX;AAND,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACf,+BAAqB,CAAA;IACrB,uBAAa,CAAA;IACb,iCAAuB,CAAA;IACvB,0CAAgC,CAAA;AACpC,CAAC,EANW,MAAM,KAAN,MAAM,QAMjB;AAED,MAAM,CAAN,IAAY,QAmEX;AAnED,WAAY,QAAQ;IAClB,SAAS;IACT,6BAAiB,CAAA;I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from 'change-case';
3
3
  import Game from './game.js';
4
- import { Player, Room } from './models/_index.js';
4
+ import { Player, Room, } from './models/_index.js';
5
5
  import { Logger } from './utilities/logger.js';
6
6
  export async function main(playerName, sceneSeed, options) {
7
7
  // Create a screen object
@@ -9,156 +9,12 @@ export async function main(playerName, sceneSeed, options) {
9
9
  smartCSR: true,
10
10
  title: 'Side Quest Adventure Game',
11
11
  });
12
+ screen.key(['C-c'], async () => {
13
+ process.exit(0);
14
+ });
12
15
  // Initialize Logger
13
16
  const gameLog = Logger.getInstance(options.logFilePath, screen);
14
17
  try {
15
- const inventoryBox = blessed.box({
16
- top: '0%',
17
- left: '75%',
18
- width: '25%',
19
- height: '45%',
20
- border: {
21
- type: 'line'
22
- },
23
- label: ' Inventory ',
24
- content: 'Your items will be listed here...',
25
- tags: true, // Enable formatting tags in content
26
- scrollable: true, // Enable scrolling if the content overflows
27
- scrollbar: {
28
- ch: ' ',
29
- track: {
30
- bg: 'yellow'
31
- },
32
- style: {
33
- inverse: true
34
- }
35
- },
36
- keys: true,
37
- mouse: true,
38
- });
39
- // Function to update the inventory
40
- const updateInventory = (playerInventory, currencyName = 'currency') => {
41
- const items = playerInventory.getAllItems();
42
- let currencyTotal = 0;
43
- const itemLines = [];
44
- for (const item of items) {
45
- let line = item.name;
46
- if (item.isCurrencyCarrier?.() && item.currencyAmount > 0) {
47
- line += ` [${item.currencyAmount}]`;
48
- currencyTotal += item.currencyAmount;
49
- }
50
- itemLines.push(line);
51
- }
52
- itemLines.unshift(`{bold}Total ${currencyName}:{/bold} ${currencyTotal}\n`);
53
- inventoryBox.setContent(itemLines.join('\n'));
54
- screen.render();
55
- };
56
- // Append the inventory box to the screen
57
- screen.append(inventoryBox);
58
- const equipmentBox = blessed.box({
59
- top: '45%',
60
- left: '75%',
61
- width: '25%',
62
- height: '25%',
63
- border: {
64
- type: 'line'
65
- },
66
- label: ' Equipment ',
67
- content: 'Your equipped items will be listed here...',
68
- tags: true,
69
- scrollable: true,
70
- scrollbar: {
71
- ch: ' ',
72
- track: {
73
- bg: 'yellow'
74
- },
75
- style: {
76
- inverse: true
77
- }
78
- },
79
- keys: true,
80
- mouse: true,
81
- });
82
- // Append the equipment box to the screen
83
- screen.append(equipmentBox);
84
- const updateEquipment = (playerEquipment) => {
85
- const sections = [];
86
- const renderSlotGroup = (label, group) => {
87
- if (!group) {
88
- sections.push(`{bold}${label}:{/bold} None`);
89
- return;
90
- }
91
- const equipped = Object.entries(group)
92
- .filter(([_, item]) => item !== null)
93
- .map(([slot, item]) => ` ${slot}: ${item.name}`);
94
- if (equipped.length > 0) {
95
- sections.push(`{bold}${label}:{/bold}`);
96
- sections.push(...equipped);
97
- }
98
- else {
99
- sections.push(`{bold}${label}:{/bold} None`);
100
- }
101
- };
102
- renderSlotGroup("Head", playerEquipment.head);
103
- renderSlotGroup("Torso", playerEquipment.torso);
104
- renderSlotGroup("Legs", playerEquipment.legs);
105
- renderSlotGroup("Feet", playerEquipment.feet);
106
- renderSlotGroup("Arms", playerEquipment.arms);
107
- renderSlotGroup("Gloves", playerEquipment.gloves);
108
- renderSlotGroup("Left Hand", playerEquipment.leftHand);
109
- renderSlotGroup("Right Hand", playerEquipment.rightHand);
110
- equipmentBox.setContent(sections.join('\n'));
111
- screen.render();
112
- };
113
- // Create a log box to display game output
114
- const logBox = blessed.box({
115
- id: 'logBox',
116
- top: '0%',
117
- left: '0%',
118
- width: '75%',
119
- height: '90%',
120
- border: {
121
- type: 'line'
122
- },
123
- label: ' Game Log ',
124
- scrollable: true, // Enable scrolling
125
- alwaysScroll: true,
126
- scrollbar: {
127
- ch: ' ',
128
- track: {
129
- bg: 'yellow'
130
- },
131
- style: {
132
- inverse: true
133
- }
134
- },
135
- keys: true, // Enable keyboard input
136
- mouse: true, // Enable mouse input
137
- tags: true // Intercept tags
138
- });
139
- logBox.removeAllListeners('mousemove');
140
- screen.append(logBox);
141
- // Create an input box for user commands
142
- const inputBox = blessed.textbox({
143
- bottom: 0,
144
- left: 0,
145
- width: '100%',
146
- height: '10%',
147
- tags: true,
148
- border: { type: 'line' },
149
- style: { fg: 'white', border: { fg: 'cyan' } },
150
- keys: true, // Enable keyboard input
151
- mouse: true, // Enable mouse input
152
- inputOnFocus: true, // Focus the text input when clicked,
153
- vi: true
154
- });
155
- screen.append(inputBox);
156
- // Key bindings
157
- screen.key(['escape', 'C-c'], () => process.exit(0));
158
- // Focus on the input box by default
159
- inputBox.focus();
160
- // Render the screen
161
- screen.render();
162
18
  gameLog.write(`----->>>>>> Initializing Game`);
163
19
  const nexus = new Room({
164
20
  name: 'Nexus',
@@ -170,25 +26,25 @@ export async function main(playerName, sceneSeed, options) {
170
26
  const game = await Game.getInstance(player, sceneSeed);
171
27
  const ready = await game.init(options, screen);
172
28
  // Print welcome message or initial room description
173
- logBox.setContent(ready); // getWelcomeMessage should return the initial game introduction or room description
174
- updateEquipment(game.player.equipment);
175
- updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
29
+ game.logBox.setContent(ready); // getWelcomeMessage should return the initial game introduction or room description
30
+ game.updateEquipment(game.player.equipment);
31
+ game.updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
176
32
  game.updateExits(game.player.currentLocation);
177
- inputBox.key(['enter'], async () => {
178
- const input = inputBox.getValue();
179
- const response = game.handleInput(input); // handleInput is the method that processes commands
33
+ game.inputBox.key(['enter'], async () => {
34
+ const input = game.inputBox.getValue();
35
+ const response = await game.handleInput(input); // handleInput is the method that processes commands
180
36
  // eslint-disable-next-line no-constant-condition
181
37
  if (input.split(' ')[0] === 'take' || 'equip' || 'unequip') {
182
38
  // Example usage: update the inventory with a new list of items
183
- updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
184
- updateEquipment(game.player.equipment);
39
+ game.updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
40
+ game.updateEquipment(game.player.equipment);
185
41
  }
186
42
  // eslint-disable-next-line no-constant-condition
187
43
  if (input.split(' ')[0] === 'go' || 'lock' || 'unlock') {
188
44
  game.updateExits(game.player.currentLocation);
189
45
  }
190
46
  if (input.split(' ')[0] === 'clear') {
191
- logBox.setContent('');
47
+ game.logBox.setContent('');
192
48
  }
193
49
  gameLog.write(`Input response: ${response}`);
194
50
  if (response === null) {
@@ -196,10 +52,10 @@ export async function main(playerName, sceneSeed, options) {
196
52
  gameLog.write(`<<<<<<<<--------- Terminating game`);
197
53
  process.exit(0); // Exit the game
198
54
  }
199
- logBox.pushLine(response);
200
- logBox.scroll(1);
201
- inputBox.clearValue();
202
- inputBox.focus();
55
+ game.logBox.pushLine(response);
56
+ game.logBox.scroll(1);
57
+ game.inputBox.clearValue();
58
+ game.inputBox.focus();
203
59
  screen.render();
204
60
  });
205
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../../../../src/commands/game/sideQuest/ui.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,OAAO,EACL,MAAM,EAIN,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAU/C,MAAM,CAAC,KAAK,UAAU,IAAI,CACxB,UAAkB,EAClB,SAAyB,EACzB,OAAwB;IAExB,yBAAyB;IACzB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC5B,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,2BAA2B;KACnC,CAAC,CAAC;IAEH,oBAAoB;IACpB,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAEhE,IAAI,CAAC;QAEH,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC;YAC/B,GAAG,EAAE,IAAI;YACT,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KA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AE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -35,8 +35,8 @@ Command.create({
35
35
  message: 'Which Run would you like to play?',
36
36
  name: 'sideQuestAnswer',
37
37
  choices: [
38
- { name: 'Seattle Underground', value: shadowrunConfig1 },
39
- { name: 'Shadows Over Touristville', value: shadowrunConfig2 },
38
+ { name: shadowrunConfig1.name, value: shadowrunConfig1 },
39
+ { name: shadowrunConfig2.name, value: shadowrunConfig2 },
40
40
  ]
41
41
  });
42
42
  if (playerName && sideQuestAnswer) {
@@ -52,6 +52,9 @@ Command.create({
52
52
  if (code === 0) {
53
53
  Log.bright(`Thanks for playing!`);
54
54
  }
55
+ else if (code === 2) {
56
+ Log.bright(`You died! Thanks for playing!`);
57
+ }
55
58
  else {
56
59
  Log.error(`Side quest exited with code ${code} or signal ${signal}`);
57
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sideQuest.sub.cmd.js","sourceRoot":"","sources":["../../../../../src/commands/game/sideQuest.sub.cmd.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAEnD,MAAM,gBAAgB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AACnE,MAAM,gBAAgB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAMnE,OAAO,EAAE,aAAa,EAAE,MAAM,KAA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C,CAAC;IACrB,CAAC;AAEH,CAAC,EAAE,WAAW,CAAC,CAAC"}
@@ -6,7 +6,7 @@ const <%= name %>Api = new MakaRest({
6
6
  version: '<%= apiVersion %>',
7
7
  prettyJson: Meteor.isDevelopment,
8
8
  rateLimitOptions: {
9
- useRedits: false,
9
+ useRedis: false,
10
10
  points: 2,
11
11
  duration: 5, // seconds
12
12
  }
@@ -6,7 +6,7 @@ const <%= name %>Api = new MakaRest({
6
6
  version: '<%= apiVersion %>',
7
7
  prettyJson: Meteor.isDevelopment,
8
8
  rateLimitOptions: {
9
- useRedits: false,
9
+ useRedis: false,
10
10
  points: 2,
11
11
  duration: 5, // seconds
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maka/maka-cli",
3
- "version": "5.1.31",
3
+ "version": "5.1.33",
4
4
  "type": "module",
5
5
  "summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
6
6
  "description": "A command line tool for scaffolding Meteor 2.x applications using React.",