@maka/maka-cli 5.1.29 → 5.1.31

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 (166) hide show
  1. package/bundle/typescript/package.json +1 -1
  2. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +9 -0
  3. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +26 -0
  4. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +1 -0
  5. package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +13 -7
  6. package/bundle/typescript/src/commands/game/sideQuest/commands/command.js +1 -1
  7. package/bundle/typescript/src/commands/game/sideQuest/commands/command.js.map +1 -1
  8. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.d.ts +1 -2
  9. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +2 -1
  10. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
  11. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +1 -2
  12. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +1 -0
  13. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
  14. package/bundle/typescript/src/commands/game/sideQuest/commands/give.d.ts +7 -0
  15. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +51 -0
  16. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -0
  17. package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +1 -2
  18. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +3 -0
  19. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
  20. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.d.ts +1 -2
  21. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +1 -0
  22. package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
  23. package/bundle/typescript/src/commands/game/sideQuest/commands/look.d.ts +1 -2
  24. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +2 -1
  25. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
  26. package/bundle/typescript/src/commands/game/sideQuest/commands/say.d.ts +3 -11
  27. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +7 -32
  28. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
  29. package/bundle/typescript/src/commands/game/sideQuest/commands/search.d.ts +1 -2
  30. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +1 -0
  31. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
  32. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.d.ts +1 -2
  33. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +1 -0
  34. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
  35. package/bundle/typescript/src/commands/game/sideQuest/commands/store.d.ts +1 -2
  36. package/bundle/typescript/src/commands/game/sideQuest/commands/store.js +1 -0
  37. package/bundle/typescript/src/commands/game/sideQuest/commands/store.js.map +1 -1
  38. package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +1 -2
  39. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +1 -0
  40. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
  41. package/bundle/typescript/src/commands/game/sideQuest/commands/talk.d.ts +3 -4
  42. package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
  43. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.d.ts +1 -2
  44. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +1 -0
  45. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
  46. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.d.ts +1 -2
  47. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +34 -24
  48. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
  49. package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +1 -2
  50. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +1 -0
  51. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
  52. package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.d.ts +9 -0
  53. package/bundle/typescript/src/commands/game/sideQuest/factories/{commandF.js → command-factory.js} +1 -1
  54. package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.js.map +1 -0
  55. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.d.ts +5 -0
  56. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +24 -0
  57. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -0
  58. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.d.ts +10 -0
  59. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js +36 -0
  60. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js.map +1 -0
  61. package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.d.ts +6 -0
  62. package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +24 -0
  63. package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +1 -0
  64. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.d.ts +6 -0
  65. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +19 -0
  66. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -0
  67. package/bundle/typescript/src/commands/game/sideQuest/factories/{sceneSynthesizer.d.ts → scene-factory.d.ts} +2 -2
  68. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +115 -0
  69. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -0
  70. package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +11 -5
  71. package/bundle/typescript/src/commands/game/sideQuest/game.js +102 -10
  72. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  73. package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +7 -3
  74. package/bundle/typescript/src/commands/game/sideQuest/models/door.js +1 -2
  75. package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +1 -1
  76. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +1 -1
  77. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +1 -1
  78. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -1
  79. package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +26 -4
  80. package/bundle/typescript/src/commands/game/sideQuest/models/item.js +36 -4
  81. package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
  82. package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +22 -14
  83. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +141 -49
  84. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
  85. package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +16 -4
  86. package/bundle/typescript/src/commands/game/sideQuest/models/player.js +85 -57
  87. package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
  88. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +11 -2
  89. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +2 -2
  90. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
  91. package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +29 -6
  92. package/bundle/typescript/src/commands/game/sideQuest/models/room.js +79 -7
  93. package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
  94. package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +29 -18
  95. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +82 -69
  96. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
  97. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +93 -114
  98. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +130 -151
  99. package/bundle/typescript/src/commands/game/sideQuest/types/enums.d.ts +13 -7
  100. package/bundle/typescript/src/commands/game/sideQuest/types/enums.js +12 -6
  101. package/bundle/typescript/src/commands/game/sideQuest/types/enums.js.map +1 -1
  102. package/bundle/typescript/src/commands/game/sideQuest/types/{types.d.ts → player-equipment.d.ts} +8 -10
  103. package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js +2 -0
  104. package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js.map +1 -0
  105. package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +6 -0
  106. package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js +2 -0
  107. package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js.map +1 -0
  108. package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +22 -0
  109. package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js +2 -0
  110. package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js.map +1 -0
  111. package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.d.ts +22 -0
  112. package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js +2 -0
  113. package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js.map +1 -0
  114. package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.d.ts +6 -0
  115. package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js +2 -0
  116. package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js.map +1 -0
  117. package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +6 -0
  118. package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js +2 -0
  119. package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js.map +1 -0
  120. package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +11 -0
  121. package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js +2 -0
  122. package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js.map +1 -0
  123. package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +16 -0
  124. package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js +2 -0
  125. package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js.map +1 -0
  126. package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +16 -0
  127. package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js +2 -0
  128. package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js.map +1 -0
  129. package/bundle/typescript/src/commands/game/sideQuest/types/{abstracts.d.ts → shared/abstracts.d.ts} +12 -9
  130. package/bundle/typescript/src/commands/game/sideQuest/types/{abstracts.js → shared/abstracts.js} +7 -2
  131. package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +1 -0
  132. package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.d.ts +8 -0
  133. package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js +10 -0
  134. package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js.map +1 -0
  135. package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.d.ts +25 -0
  136. package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js +27 -0
  137. package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js.map +1 -0
  138. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +34 -0
  139. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +38 -0
  140. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -0
  141. package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +6 -2
  142. package/bundle/typescript/src/commands/game/sideQuest/ui.js +48 -79
  143. package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
  144. package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +4 -2
  145. package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +8 -4
  146. package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +1 -1
  147. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +20 -13
  148. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
  149. package/bundle/typescript/src/tools/https/https.class.d.ts +1 -0
  150. package/bundle/typescript/src/tools/https/https.class.js +49 -1
  151. package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
  152. package/package.json +1 -1
  153. package/bundle/typescript/src/commands/game/sideQuest/factories/commandF.d.ts +0 -10
  154. package/bundle/typescript/src/commands/game/sideQuest/factories/commandF.js.map +0 -1
  155. package/bundle/typescript/src/commands/game/sideQuest/factories/roomsF.d.ts +0 -6
  156. package/bundle/typescript/src/commands/game/sideQuest/factories/roomsF.js +0 -18
  157. package/bundle/typescript/src/commands/game/sideQuest/factories/roomsF.js.map +0 -1
  158. package/bundle/typescript/src/commands/game/sideQuest/factories/sceneSynthesizer.js +0 -77
  159. package/bundle/typescript/src/commands/game/sideQuest/factories/sceneSynthesizer.js.map +0 -1
  160. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene3.json +0 -380
  161. package/bundle/typescript/src/commands/game/sideQuest/types/abstracts.js.map +0 -1
  162. package/bundle/typescript/src/commands/game/sideQuest/types/interfaces.d.ts +0 -197
  163. package/bundle/typescript/src/commands/game/sideQuest/types/interfaces.js +0 -2
  164. package/bundle/typescript/src/commands/game/sideQuest/types/interfaces.js.map +0 -1
  165. package/bundle/typescript/src/commands/game/sideQuest/types/types.js +0 -2
  166. package/bundle/typescript/src/commands/game/sideQuest/types/types.js.map +0 -1
@@ -1,63 +1,74 @@
1
1
  import { Logger } from '../utilities/logger.js';
2
- import { Direction, Size } from '../types/enums.js';
3
- import { AbstractScene } from '../types/abstracts.js';
4
- import { RoomFactory } from '../factories/roomsF.js';
2
+ import { Category } from '../types/shared/item-enum.js';
3
+ import { AbstractScene } from '../types/shared/abstracts.js';
5
4
  export class Scene extends AbstractScene {
6
- rooms;
5
+ name;
7
6
  player;
8
7
  logger;
9
8
  actors;
9
+ game;
10
10
  characterLocations = new Map();
11
- roomFactory;
12
11
  _residenceTiers = [];
12
+ rooms = {};
13
+ roomOwnership = new Map(); // Room name → owner name
14
+ itemOwnership = new Map(); // Item name → owner name
13
15
  currency;
14
16
  constructor(config) {
15
17
  super();
16
- this.roomFactory = new RoomFactory();
17
18
  this.player = config.player;
18
- this.rooms = this.generateRoomsFromConfig(config.roomConfiguration);
19
19
  this.logger = Logger.getInstance();
20
20
  this.actors = new Map();
21
21
  this.currency = config.currency ?? {
22
22
  type: 'nuyen',
23
- carrierItemSizes: [Size.Small, Size.Medium, Size.Large],
24
23
  authorityRoomTags: ['Bank'],
25
24
  };
26
25
  this.residenceTiers = config.residenceTiers ?? [];
27
- this.createExitsFromConfig(config.roomConfiguration);
28
- this.logger.write(`Scene initialized with rooms: ${Object.keys(this.rooms).join(", ")}`);
26
+ this.logger.write(`Scene initialized.`);
29
27
  this.validateLifestyleSupport();
30
28
  this.validatePuzzleRequirements(config.puzzles ?? [], config.items ?? []);
31
29
  }
32
- initialize() {
30
+ initialize(game) {
33
31
  this.player.currentLocation = this.determineStartRoom();
32
+ this.game = game;
34
33
  }
35
- generateRoomsFromConfig(roomsConfig) {
36
- if (!this.roomFactory) {
37
- throw new Error(`Room Factory was not correctly initialized`);
34
+ updateExits(room) {
35
+ this.game.updateExits(room);
36
+ }
37
+ setOwner(entity, owner) {
38
+ if ('addItem' in entity) {
39
+ // It's a Room
40
+ this.roomOwnership.set(entity.name, owner);
41
+ entity.owner = owner;
42
+ this.logger.write(`Set owner of room "${entity.name}" to "${owner}"`);
43
+ }
44
+ else {
45
+ // It's an Item
46
+ this.itemOwnership.set(entity.name, owner);
47
+ entity.owner = owner;
48
+ this.logger.write(`Set owner of item "${entity.name}" to "${owner}"`);
49
+ }
50
+ }
51
+ getOwner(entity) {
52
+ if ('addItem' in entity) {
53
+ return this.roomOwnership.get(entity.name);
38
54
  }
39
- const generatedRooms = {};
40
- for (const roomConfig of roomsConfig) {
41
- const room = this.roomFactory.createRoom(roomConfig);
42
- generatedRooms[roomConfig.name] = room;
55
+ else {
56
+ return this.itemOwnership.get(entity.name);
43
57
  }
44
- return generatedRooms;
45
- }
46
- createExitsFromConfig(roomsConfig) {
47
- for (const roomConfig of roomsConfig) {
48
- const room = this.rooms[roomConfig.name];
49
- if (roomConfig.exits) {
50
- for (const exit of roomConfig.exits) {
51
- const exitDirection = exit.direction.toUpperCase();
52
- const exitTargetName = exit.targetRoom;
53
- const keyOrSolution = exit.keyRequired;
54
- const targetRoom = this.rooms[exitTargetName];
55
- if (targetRoom) {
56
- room.addExit(Direction[exitDirection], targetRoom, keyOrSolution);
57
- }
58
+ }
59
+ getOwnedItemsBy(owner) {
60
+ const items = [];
61
+ for (const room of Object.values(this.rooms)) {
62
+ for (const item of room.inventory.getAllItems()) {
63
+ if (this.itemOwnership.get(item.name) === owner) {
64
+ items.push(item);
58
65
  }
59
66
  }
60
67
  }
68
+ return items;
69
+ }
70
+ getOwnedRoomsBy(owner) {
71
+ return Object.values(this.rooms).filter(room => this.roomOwnership.get(room.name) === owner);
61
72
  }
62
73
  addActor(actor) {
63
74
  if (this.actors.has(actor.name)) {
@@ -81,13 +92,16 @@ export class Scene extends AbstractScene {
81
92
  getActorsInRoom(room) {
82
93
  return this.allActors.filter(actor => actor.currentLocation === room);
83
94
  }
95
+ normalize(input) {
96
+ return input.normalize('NFKD').replace(/[’']/g, "'").trim().toLowerCase();
97
+ }
84
98
  addRoom(room) {
85
- this.rooms[room.name] = room;
99
+ this.rooms[this.normalize(room.name)] = room;
86
100
  this.logger.write(`Added room to scene: ${room.name}`);
87
101
  }
88
102
  removeRoom(roomName) {
89
- if (this.rooms[roomName]) {
90
- delete this.rooms[roomName];
103
+ if (this.getRoom(roomName)) {
104
+ delete this.rooms[this.normalize(roomName)];
91
105
  this.logger.write(`Removed room from scene: ${roomName}`);
92
106
  return true;
93
107
  }
@@ -97,7 +111,7 @@ export class Scene extends AbstractScene {
97
111
  }
98
112
  }
99
113
  addItemToRoom(item, roomName) {
100
- const room = this.rooms[roomName];
114
+ const room = this.getRoom(roomName);
101
115
  if (room) {
102
116
  room.addItem(item);
103
117
  this.logger.write(`Added item ${item.name} to room ${room.name}`);
@@ -107,7 +121,7 @@ export class Scene extends AbstractScene {
107
121
  }
108
122
  }
109
123
  addPuzzleToRoom(puzzle, roomName) {
110
- const room = this.rooms[roomName];
124
+ const room = this.getRoom(roomName);
111
125
  if (room) {
112
126
  room.setPuzzle(puzzle);
113
127
  this.logger.write(`Added puzzle to room ${room.name}`);
@@ -117,14 +131,21 @@ export class Scene extends AbstractScene {
117
131
  }
118
132
  }
119
133
  setCharacterLocation(character, roomName) {
120
- const room = this.rooms[roomName];
134
+ const room = this.getRoom(roomName);
121
135
  if (room) {
122
136
  this.characterLocations.set(character.name, room);
123
- character.currentLocation = room; // FIXED LINE
137
+ // Remove from old room first, if needed
138
+ const currentRoom = character.currentLocation;
139
+ if (currentRoom && currentRoom !== room) {
140
+ currentRoom.removeActor(character);
141
+ }
142
+ // Add to new room
143
+ room.addActor(character);
144
+ character.currentLocation = room;
124
145
  this.logger.write(`${character.name} is now in room ${room.name}`);
125
146
  }
126
147
  else {
127
- this.logger.write(`Failed to set ${character.name}'s location. Room ${roomName} not found in scene.`);
148
+ this.logger.error(`Failed to set ${character.name}'s location. Room ${roomName} not found in scene.`);
128
149
  }
129
150
  }
130
151
  getCharacterLocation(character) {
@@ -134,7 +155,7 @@ export class Scene extends AbstractScene {
134
155
  const startRoomCandidates = [];
135
156
  for (const roomName in this.rooms) {
136
157
  if (this.rooms.hasOwnProperty(roomName)) {
137
- const room = this.rooms[roomName];
158
+ const room = this.getRoom(roomName);
138
159
  if (room.isStartRoom) {
139
160
  startRoomCandidates.push(room);
140
161
  }
@@ -151,7 +172,7 @@ export class Scene extends AbstractScene {
151
172
  throw new Error("No rooms have been defined in the game.");
152
173
  }
153
174
  console.warn("No starting room designated. Defaulting to the first room.");
154
- return this.rooms[roomNames[0]];
175
+ return this.getRoom(roomNames[0]);
155
176
  }
156
177
  getPlayer() {
157
178
  return this.player;
@@ -159,9 +180,21 @@ export class Scene extends AbstractScene {
159
180
  getRooms() {
160
181
  return this.rooms;
161
182
  }
183
+ listRooms() {
184
+ return Object.keys(this.rooms).sort();
185
+ }
186
+ getRoom(roomName) {
187
+ const rooms = this.getRooms();
188
+ const room = rooms[this.normalize(roomName?.toLowerCase())];
189
+ if (!room) {
190
+ this.logger.error(`Could not find room ${roomName} in scene`);
191
+ throw new Error(`Room not found: ${roomName}`);
192
+ }
193
+ return room;
194
+ }
162
195
  connectRooms(roomNameA, direction, roomNameB, keyItemOrSolution) {
163
- const roomA = this.rooms[roomNameA];
164
- const roomB = this.rooms[roomNameB];
196
+ const roomA = this.getRoom(roomNameA);
197
+ const roomB = this.getRoom(roomNameB);
165
198
  if (!roomA) {
166
199
  throw new Error(`Room "${roomNameA}" does not exist.`);
167
200
  }
@@ -176,18 +209,9 @@ export class Scene extends AbstractScene {
176
209
  hasRoomSupportingEmployment(role) {
177
210
  return Object.values(this.rooms).some(room => room.supportsEmployment?.(role));
178
211
  }
179
- hasRoomSupportingHabit(habit) {
180
- return Object.values(this.rooms).some(room => room.supportsHabit?.(habit));
181
- }
182
212
  hasItemSupportingAddiction(addiction) {
183
213
  return Object.values(this.rooms).some(room => room.inventory.getAllItems().some(item => item.satisfiesLifestyle?.addictionTypes?.includes(addiction)));
184
214
  }
185
- hasItemSupportingHabit(habit) {
186
- return Object.values(this.rooms).some(room => room.inventory.getAllItems().some(item => item.satisfiesLifestyle?.habitTags?.includes(habit)));
187
- }
188
- hasPuzzleSupportingHobby(hobby) {
189
- return Object.values(this.rooms).some(room => room.puzzle?.hobbyTags?.includes(hobby));
190
- }
191
215
  validateLifestyleSupport() {
192
216
  const allActors = [this.player, ...this.allActors];
193
217
  for (const actor of allActors) {
@@ -196,14 +220,13 @@ export class Scene extends AbstractScene {
196
220
  const residence = lifestyle.find(l => l.type === 'residence')?.metadata;
197
221
  const employment = lifestyle.find(l => l.type === 'employment')?.metadata;
198
222
  const vices = lifestyle.find(l => l.type === 'vice')?.metadata;
199
- const hobbies = lifestyle.filter(l => l.type === 'hobby').map(l => l.metadata);
200
- if (residence?.lifestyle && !this.hasRoomSupportingResidence(residence.lifestyle)) {
201
- throw new Error(`No room supports residence lifestyle '${residence.lifestyle}' for ${name}`);
223
+ if (residence?.location && !this.hasRoomSupportingResidence(residence.location)) {
224
+ throw new Error(`No room supports residence lifestyle '${residence.location}' for ${name}`);
202
225
  }
203
226
  if (residence) {
204
227
  const validTiers = this._residenceTiers ?? [];
205
- if (!validTiers.includes(residence.lifestyle)) {
206
- throw new Error(`${actor.name} has an invalid residence lifestyle tier '${residence.lifestyle}'`);
228
+ if (!validTiers.includes(residence.tier)) {
229
+ throw new Error(`${actor.name} has an invalid residence lifestyle tier '${residence.tier}'`);
207
230
  }
208
231
  }
209
232
  if (employment?.jobTitle && !this.hasRoomSupportingEmployment(employment.jobTitle)) {
@@ -214,16 +237,6 @@ export class Scene extends AbstractScene {
214
237
  throw new Error(`No item supports addiction '${addiction}' for ${name}`);
215
238
  }
216
239
  }
217
- for (const habit of vices?.habits ?? []) {
218
- if (!this.hasRoomSupportingHabit(habit) && !this.hasItemSupportingHabit(habit)) {
219
- throw new Error(`No room or item supports habit '${habit}' for ${name}`);
220
- }
221
- }
222
- for (const hobby of hobbies) {
223
- if (!this.hasPuzzleSupportingHobby(hobby)) {
224
- throw new Error(`No puzzle supports hobby '${hobby}' for ${name}`);
225
- }
226
- }
227
240
  }
228
241
  this.logger.write("Scene passed lifestyle support validation.");
229
242
  }
@@ -242,7 +255,7 @@ export class Scene extends AbstractScene {
242
255
  return this.currency.type;
243
256
  }
244
257
  isValidCurrencyCarrier(item) {
245
- return this.currency.carrierItemSizes.includes(item.size);
258
+ return item.category === Category.CurrencyContainer;
246
259
  }
247
260
  getCurrencyAggregationByTag() {
248
261
  const result = {};
@@ -1 +1 @@
1
- {"version":3,"file":"scene.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/models/scene.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,MAAM,OAAO,KAAM,SAAQ,aAAa;IAC5B,KAAK,CAAS;IACd,MAAM,CAAS;IACf,MAAM,CAAS;IACf,MAAM,CAA8B;IACpC,kBAAkB,GAAsB,IAAI,GAAG,EAAE,CAAC;IAEpD,WAAW,CAAc;IAEzB,eAAe,GAAa,EAAE,CAAC;IAEhC,QAAQ,CAIb;IAEF,YAAY,MAA+B;QACzC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI;YACjC,IAAI,EAAE,OAAO;YACb,gBAAgB,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;YACvD,iBAAiB,EAAE,CAAC,MAAM,CAAC;SAC5B,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,MAA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UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,WAAW,CAAC;gBACzE,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAI,cAAc,CAAC,KAAe;QAChC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,oBAAoB,CAAC,IAAY;QAC/B,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -1,57 +1,59 @@
1
1
  {
2
2
  "name": "Seattle Underground",
3
3
  "residenceTiers": [
4
- "Redmond Safehouse",
5
- "Street Squatter",
6
- "Capsule Hotel",
7
- "Barrens Apartment",
8
- "Puyallup Loft"
4
+ "Street",
5
+ "Squatter",
6
+ "Low",
7
+ "Middle",
8
+ "High",
9
+ "Luxury"
9
10
  ],
10
11
  "currency": {
11
12
  "type": "nuyen",
12
13
  "carrier": "credstick",
13
- "carrierItemSizes": [
14
- "Small",
15
- "Medium"
16
- ],
17
- "authorityRoomTags": [
18
- "Bank"
19
- ]
14
+ "authorityRoomTags": ["Bank"]
20
15
  },
21
16
  "rooms": [
22
17
  {
23
- "name": "Redmond Safehouse",
24
- "description": "A hidden bolthole in the Redmond Barrens.",
25
- "tags": [
26
- "residence"
27
- ],
18
+ "name": "Barrens Apartment",
19
+ "description": "A grimy studio in the heart of the Redmond Barrens. The synth-leather couch sags, and the flickering AR ads outside the window never stop.",
20
+ "tags": ["residence"],
28
21
  "supportedLifestyles": {
29
- "residenceTiers": [
30
- "Redmond Safehouse"
31
- ]
22
+ "residenceTiers": ["Street", "Squatter"]
32
23
  },
33
24
  "exits": [
34
25
  {
35
26
  "direction": "north",
36
- "targetRoom": "Krow\u2019s Den"
27
+ "targetRoom": "Redmond Safehouse"
37
28
  }
38
29
  ],
39
30
  "isStartRoom": true
40
31
  },
32
+
41
33
  {
42
- "name": "Krow\u2019s Den",
43
- "description": "The fixer\u2019s office. Smells like cigars and secrets.",
44
- "tags": [
45
- "employment",
46
- "gun-mods"
47
- ],
34
+ "name": "Redmond Safehouse",
35
+ "description": "A hidden bolthole in the Redmond Barrens.",
36
+ "tags": ["residence"],
48
37
  "supportedLifestyles": {
49
- "employmentRoles": [
50
- "Fixer"
51
- ],
52
- "hobbyTags": [
53
- "Gun Collecting"
54
- ]
38
+ "residenceTiers": ["Low"]
39
+ },
40
+ "exits": [
41
+ {
42
+ "direction": "north",
43
+ "targetRoom": "Krow’s Den"
44
+ },
45
+ {
46
+ "direction": "south",
47
+ "targetRoom": "Barrens Apartment"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "name": "Krow’s Den",
53
+ "description": "The fixer’s office. Smells like cigars and secrets.",
54
+ "owner": "Mr. Krow",
55
+ "supportedLifestyles": {
56
+ "employmentRoles": ["Fixer"]
55
57
  },
56
58
  "exits": [
57
59
  {
@@ -60,58 +62,51 @@
60
62
  },
61
63
  {
62
64
  "direction": "east",
63
- "targetRoom": "Lucky Chummer"
65
+ "targetRoom": "Lucky Chummer",
66
+ "keyRequired": "Krow's Datachip"
64
67
  }
65
68
  ]
66
69
  },
67
70
  {
68
71
  "name": "Lucky Chummer",
69
72
  "description": "A neon casino buzzing with illicit energy.",
70
- "tags": [
71
- "entertainment"
72
- ],
73
73
  "supportedLifestyles": {
74
- "habitTags": [
75
- "Gambling"
76
- ]
74
+ "habitTags": ["Gambling"]
77
75
  }
78
76
  }
79
77
  ],
80
78
  "npcs": [
81
79
  {
82
- "name": "Mr. Krow",
83
80
  "dialogue": [
84
- "I've got what you need \u2014 if you can pay.",
81
+ "I've got what you need if you can pay.",
85
82
  "Never trust a smiling ork.",
86
83
  "The shadows don't lie, chummer."
87
84
  ],
88
- "lifestyleChoices": [
89
- {
90
- "type": "residence",
91
- "metadata": {
92
- "lifestyle": "Redmond Safehouse"
85
+ "player": {
86
+ "name": "Mr. Krow",
87
+ "startLocation": "Krow's Den",
88
+ "lifestyleChoices": [
89
+ {
90
+ "type": "residence",
91
+ "metadata": {
92
+ "tier": "Medium",
93
+ "location": "Redmond Safehouse"
94
+ }
95
+ },
96
+ {
97
+ "type": "employment",
98
+ "metadata": {
99
+ "jobTitle": "Fixer"
100
+ }
101
+ },
102
+ {
103
+ "type": "vice",
104
+ "metadata": {
105
+ "addictions": ["Cigars"]
106
+ }
93
107
  }
94
- },
95
- {
96
- "type": "employment",
97
- "metadata": {
98
- "jobTitle": "Fixer"
99
- }
100
- },
101
- {
102
- "type": "vice",
103
- "metadata": {
104
- "habits": [
105
- "Cigars"
106
- ]
107
- }
108
- },
109
- {
110
- "type": "hobby",
111
- "metadata": "Gun Collecting"
112
- }
113
- ],
114
- "startRoom": "Redmond Safehouse"
108
+ ]
109
+ }
115
110
  }
116
111
  ],
117
112
  "items": [
@@ -126,62 +121,46 @@
126
121
  "rating": "Standard",
127
122
  "weight": 0.2,
128
123
  "currencyAmount": 500,
129
- "room": "Redmond Safehouse"
124
+ "room": "Krow's Den",
125
+ "owner": "Mr. Krow"
126
+ },
127
+ {
128
+ "name": "Krow's Datachip",
129
+ "description": "An encrypted datachip that grants access to the Lucky Chummer. Its casing is etched with the Krow Industries logo.",
130
+ "size": "Tiny",
131
+ "category": "Key",
132
+ "shape": "Square",
133
+ "color": "Black",
134
+ "texture": "Glossy",
135
+ "rating": "Common",
136
+ "weight": 0.05,
137
+ "heldBy": "Mr. Krow",
138
+ "owner": "Mr. Krow"
130
139
  },
131
140
  {
132
141
  "name": "Cuban Cigar",
133
- "description": "Hand-rolled and smuggled from Amazonia.",
142
+ "description": "Hard to find, but delicious.",
134
143
  "size": "Tiny",
135
- "category": "Consumable",
136
- "shape": "Cylinder",
144
+ "category": "Vice",
145
+ "shape": "Rectangle",
137
146
  "color": "Brown",
138
- "texture": "Rough",
139
- "rating": "Standard",
147
+ "texture": "Smooth",
148
+ "rating": "Rare",
140
149
  "weight": 0.1,
141
- "satisfiesLifestyle": {
142
- "habitTags": [
143
- "Cigars"
144
- ]
145
- },
146
- "room": "Krow\u2019s Den"
147
- },
148
- {
149
- "name": "Wrench",
150
- "description": "Heavy-duty adjustable wrench, perfect for recalibration work.",
151
- "size": "Medium",
152
- "category": "Tool",
153
- "shape": "L",
154
- "color": "Steel",
155
- "texture": "Rough",
156
- "rating": "Standard",
157
- "weight": 1.5,
158
- "room": "Krow\u2019s Den"
159
- },
160
- {
161
- "name": "Ares Predator V",
162
- "description": "A popular heavy pistol with built-in smartgun system.",
163
- "size": "Medium",
164
- "category": "Weapon",
165
- "shape": "Pistol",
166
- "color": "Black",
167
- "texture": "Matte",
168
- "rating": "MilitaryGrade",
169
- "weight": 2.2
150
+ "currencyAmount": 0,
151
+ "room": "Barrens Apartment"
170
152
  }
171
153
  ],
172
154
  "puzzles": [
173
155
  {
174
- "name": "pistol puzzle",
175
- "requiredItem": "Wrench",
176
- "requiredPhrase": "recalibrate",
177
- "riddle": "What fires but has no flame?",
178
- "successMessage": "You fine-tuned the gun into a masterpiece.",
179
- "failureMessage": "You lack the tools or insight to fix this weapon.",
180
- "hobbyTags": [
181
- "Gun Collecting"
182
- ],
183
- "room": "Krow\u2019s Den",
184
- "rewardItem": "Ares Predator V"
156
+ "name": "Cigar Puzzle",
157
+ "rewardItem": "Cuban Cigar",
158
+ "requiredPhrase": "stack the deck",
159
+ "riddle": "I burn through fortunes with the flick of a wrist, leave some elated, others pissed. What am I?",
160
+ "successMessage": "You shuffle with style and stack the odds in your favor. The pit boss slides you a reward with a knowing smirk.",
161
+ "failureMessage": "Your hands fumble the cards. A dealer laughs and the moment slips away.",
162
+ "hobbyTags": ["Gambling", "Card Tricks"],
163
+ "room": "Lucky Chummer"
185
164
  }
186
165
  ]
187
166
  }