@maka/maka-cli 5.1.28 → 5.1.30
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/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/_index.d.ts +1 -0
- package/bundle/typescript/src/commands/_index.js +1 -1
- package/bundle/typescript/src/commands/_index.js.map +1 -1
- package/bundle/typescript/src/commands/ai.js +0 -1
- package/bundle/typescript/src/commands/ai.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +12 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.d.ts +3 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +5 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +52 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/{commandF.js → command-factory.js} +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.d.ts +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js +33 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/{sceneSynthesizer.d.ts → scene-factory.d.ts} +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +116 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +7 -5
- package/bundle/typescript/src/commands/game/sideQuest/game.js +40 -10
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +7 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js +1 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +25 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +27 -13
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +15 -12
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +97 -29
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +16 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +85 -56
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +11 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +29 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +78 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +25 -17
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +76 -68
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +55 -108
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +131 -151
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.d.ts +16 -7
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.js +15 -6
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/{types.d.ts → player-equipment.d.ts} +8 -10
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/{abstracts.d.ts → shared/abstracts.d.ts} +13 -9
- package/bundle/typescript/src/commands/game/sideQuest/types/{abstracts.js → shared/abstracts.js} +7 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js +27 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +38 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +6 -2
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +47 -25
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +4 -2
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +8 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +19 -12
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.class.d.ts +4 -1
- package/bundle/typescript/src/tools/https/https.class.js +67 -12
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.interface.d.ts +2 -1
- package/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/commandF.d.ts +0 -10
- package/bundle/typescript/src/commands/game/sideQuest/factories/commandF.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/roomsF.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/factories/roomsF.js +0 -18
- package/bundle/typescript/src/commands/game/sideQuest/factories/roomsF.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/sceneSynthesizer.js +0 -77
- package/bundle/typescript/src/commands/game/sideQuest/factories/sceneSynthesizer.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene3.json +0 -380
- package/bundle/typescript/src/commands/game/sideQuest/types/abstracts.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/interfaces.d.ts +0 -197
- package/bundle/typescript/src/commands/game/sideQuest/types/interfaces.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/interfaces.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/types.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/types.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.30",
|
|
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.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_index.js","sourceRoot":"","sources":["../../../../src/commands/_index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,eAAe,CAAC;AACvB,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC;AACtB,OAAO,WAAW,CAAC;AACnB,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AACxB,sBAAsB;AACtB,
|
|
1
|
+
{"version":3,"file":"_index.js","sourceRoot":"","sources":["../../../../src/commands/_index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,eAAe,CAAC;AACvB,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC;AACtB,OAAO,WAAW,CAAC;AACnB,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AACxB,sBAAsB;AACtB,OAAO,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../../src/commands/ai.ts"],"names":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AC,IAAI,CAAC,EAAE,CAAC;gBACvC,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,MAAM,GAAG,CAAC,KAAK,CAAC,wFAAwF,UAAU,EAAE,CAAC,CAAC;YACxH,CAAC;QACH,CAAC;QAED,IAAI,UAAU,GAAG,EAAE,CAAC;QACpB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YAC7B,GAAG,CAAC,MAAM,CAAC,oBAAoB,UAAU,EAAE,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;YAC/B,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,8BAA8B,CAAC,CAAC;QAC3C,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,EAAE,CAAC;YAEN,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import { Direction } from '../types/
|
|
2
|
-
import { Player, Scene } from '../models/_index.js';
|
|
3
|
-
import { IRooms } from '../types/interfaces.js';
|
|
1
|
+
import { Direction } from '../types/shared/direction-enum.js';
|
|
2
|
+
import { Player, Scene, Room } from '../models/_index.js';
|
|
4
3
|
import { Logger } from '../utilities/logger.js';
|
|
5
|
-
|
|
4
|
+
export interface ICommand {
|
|
5
|
+
execute(args: string[]): string;
|
|
6
|
+
}
|
|
7
|
+
export interface ICommandConstructor {
|
|
8
|
+
actor: Player;
|
|
9
|
+
scene: Scene;
|
|
10
|
+
rooms?: Record<string, Room>;
|
|
11
|
+
}
|
|
6
12
|
export declare abstract class Command {
|
|
7
13
|
protected static verb: string;
|
|
8
14
|
protected static description: string;
|
|
9
15
|
protected actor: Player;
|
|
10
|
-
protected rooms?:
|
|
16
|
+
protected rooms?: Record<string, Room>;
|
|
11
17
|
protected logger: Logger;
|
|
12
18
|
protected scene: Scene;
|
|
13
|
-
constructor(context:
|
|
19
|
+
constructor(context: ICommandConstructor);
|
|
14
20
|
abstract execute(args?: string[]): string;
|
|
15
21
|
protected isValidDirection(value: string): value is Direction;
|
|
16
22
|
static getDescription(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAYhD,MAAM,OAAgB,OAAO;IACjB,MAAM,CAAC,IAAI,CAAS;IACpB,MAAM,CAAC,WAAW,CAAS,CAAE,mBAAmB;IAChD,KAAK,CAAS;IACd,KAAK,CAAwB;IAC7B,MAAM,CAAS;IACf,KAAK,CAAQ;IAEvB,YAAY,OAA4B;QACtC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC7B,CAAC;IAIS,gBAAgB,CAAC,KAAa;QACtC,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAkB,CAAC,CAAC;IAC/D,CAAC;IAED,gDAAgD;IAChD,MAAM,CAAC,cAAc;QACnB,OAAO,IAAI,CAAC,WAAW,IAAI,2BAA2B,CAAC,CAAE,yDAAyD;IACpH,CAAC;CACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class DropCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -22,7 +22,8 @@ export class DropCommand extends Command {
|
|
|
22
22
|
// Remove the item from player's inventory and add it to the current room's inventory
|
|
23
23
|
this.actor.inventory.removeItem(itemName);
|
|
24
24
|
this.actor.currentLocation.inventory.addItem(itemToDrop);
|
|
25
|
-
this.logger.write(`${this.actor.name} has successfully dropped "${itemName}" from inventory to
|
|
25
|
+
this.logger.write(`${this.actor.name} has successfully dropped "${itemName}" from inventory to ${this.actor.currentLocation.name} during 'Drop' command.`);
|
|
26
|
+
this.actor.performAction('drop', itemName);
|
|
26
27
|
return `You dropped ${itemName}.`;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drop.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/drop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"drop.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/drop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,mCAAmC,CAAC;IA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K,CAAC,eAAe,CAAC,IAAI,yBAAyB,CAAC,CAAC;QAE3J,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC3C,OAAO,eAAe,QAAQ,GAAG,CAAC;IACpC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class EquipCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -25,6 +25,7 @@ export class EquipCommand extends Command {
|
|
|
25
25
|
return `You don't have ${itemName} in your inventory, and it's not in this room.`;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
this.actor.performAction('equip', itemToEquip.name);
|
|
28
29
|
const equipResponse = this.actor.equip(itemToEquip);
|
|
29
30
|
this.logger.write(`EquipCommand: ${equipResponse}`);
|
|
30
31
|
return equipResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equip.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/equip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"equip.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/equip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAEhD,OAAO,CAAC,IAAc;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAEO,KAAK,CAAC,IAAc;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,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
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class GoCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -30,6 +30,7 @@ export class GoCommand extends Command {
|
|
|
30
30
|
// If it's a Door, determine the target room
|
|
31
31
|
if (exit instanceof Door) {
|
|
32
32
|
if (exit.checkIfLocked()) {
|
|
33
|
+
this.actor.performAction('is prevented by locked door', currentRoom.name);
|
|
33
34
|
return `The door in the direction "${direction}" is locked.`;
|
|
34
35
|
}
|
|
35
36
|
// Get the other side of the door (the room the player should move to)
|
|
@@ -39,6 +40,7 @@ export class GoCommand extends Command {
|
|
|
39
40
|
return 'There seems to be an error with the door you\'re trying to go through.';
|
|
40
41
|
}
|
|
41
42
|
this.actor.currentLocation = targetRoom; // Update player's location
|
|
43
|
+
this.actor.performAction('enters', targetRoom.name);
|
|
42
44
|
}
|
|
43
45
|
else {
|
|
44
46
|
// If it's a room name (string)
|
|
@@ -48,6 +50,7 @@ export class GoCommand extends Command {
|
|
|
48
50
|
return 'There seems to be an error with the room you\'re trying to go to.';
|
|
49
51
|
}
|
|
50
52
|
this.actor.currentLocation = nextRoom;
|
|
53
|
+
this.actor.performAction('enters', nextRoom.name);
|
|
51
54
|
}
|
|
52
55
|
this.logger.write(`${this.actor.name} moved to room: ${this.actor.currentLocation.name || 'Unnamed room'}.`);
|
|
53
56
|
// Use the LookCommand to get the description of the new room
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/go.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"go.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/go.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,E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AAC;YACtC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,mBAAmB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,IAAI,cAAc,GAAG,CAAC,CAAC;QAE7G,6DAA6D;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,WAAW,CAAC;IAChD,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class LockCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -21,6 +21,7 @@ export class LockCommand extends Command {
|
|
|
21
21
|
if (requiredKeyOrSolution && this.actor.inventory.hasItem(requiredKeyOrSolution)) {
|
|
22
22
|
door.isLocked = true;
|
|
23
23
|
this.logger.write(`LockCommand: ${this.actor.name} Locked the ${target} door.`);
|
|
24
|
+
this.actor.performAction('lock', target);
|
|
24
25
|
return `You locked the door named "${target}".`;
|
|
25
26
|
}
|
|
26
27
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/lock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/lock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,cA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AC,KAAK,CAAC,IAAI,wCAAwC,MAAM,GAAG,CAAC,CAAC;gBACpG,OAAO,2CAA2C,CAAC;YACrD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,MAAM,oCAAoC,CAAC,CAAC;YAC9E,OAAO,0BAA0B,MAAM,SAAS,CAAC;QACnD,CAAC;IACH,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class LookCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -25,6 +25,7 @@ export class LookCommand extends Command {
|
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
this.logger.write(`${this.actor.name} is looking around the current room.`);
|
|
28
|
+
this.actor.performAction('looks', `around ${this.actor.currentLocation.name}`);
|
|
28
29
|
return this.look();
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -34,7 +35,7 @@ export class LookCommand extends Command {
|
|
|
34
35
|
this.logger.error(`${this.actor.name} is not in a valid room during 'Look' command execution.`);
|
|
35
36
|
return "You're not in a valid room.";
|
|
36
37
|
}
|
|
37
|
-
let description = room.description;
|
|
38
|
+
let description = (room.details) ? room.details : room.description;
|
|
38
39
|
const otherActors = this.scene
|
|
39
40
|
.getActorsInRoom(room)
|
|
40
41
|
.filter(a => a !== this.actor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/look.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAIzC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/look.ts"],"names":[],"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AAqG;QACrG,OAAO,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,IAAI,uBAAuB,QAAQ,GAAG,CAAC;IAChF,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommandContext } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommandConstructor } from './command.js';
|
|
3
2
|
export declare class SayCommand extends Command {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
6
|
-
protected context:
|
|
7
|
-
constructor(context:
|
|
5
|
+
protected context: ICommandConstructor;
|
|
6
|
+
constructor(context: ICommandConstructor);
|
|
8
7
|
execute(args: string[]): string;
|
|
9
8
|
}
|
|
@@ -20,10 +20,12 @@ export class SayCommand extends Command {
|
|
|
20
20
|
return "An error occurred.";
|
|
21
21
|
}
|
|
22
22
|
const roomActors = scene.allActors.filter(actor => actor.currentLocation === currentPlayer.currentLocation);
|
|
23
|
+
this.logger.logWithColor(`${currentPlayer.name} says "${message}"`, 'yellow');
|
|
23
24
|
for (const actor of roomActors) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
if (actor == currentPlayer) {
|
|
26
|
+
this.actor.currentLocation.say(actor, message);
|
|
27
|
+
}
|
|
28
|
+
actor.hear(currentPlayer, message);
|
|
27
29
|
}
|
|
28
30
|
return ``;
|
|
29
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"say.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/say.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"say.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/say.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAC;AAE5D,MAAM,OAAO,UAAW,SAAQ,OAAO;IACrC,6DAA6D;IACnD,MAAM,CAAC,IAAI,GA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-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class SearchCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -13,6 +13,7 @@ export class SearchCommand extends Command {
|
|
|
13
13
|
// If items are present, list them and log the action
|
|
14
14
|
const itemsList = roomItems.join(', ');
|
|
15
15
|
this.logger.write(`SearchCommand: ${this.actor.name} found the following items: ${itemsList}`);
|
|
16
|
+
this.actor.performAction('search', itemsList);
|
|
16
17
|
return `You search the area and find: ${itemsList}`;
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,+BAA+B,CAAC;IAE/D,OAAO;QACL,0FAA0F;QAC1F,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QAEnE,oDAAoD;QACpD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,IAAI,CAAC,KAAK,CAAC,IAAI,uCAAuC,CAAC,CAAC;YAC5F,OAAO,sEAAsE,CAAC;QAChF,CAAC;QAED,qDAAqD;QACrD,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,IAAI,CAAC,KAAK,CAAC,IAAI,+BAA+B,SAAS,EAAE,CAAC,CAAC;QAC/F,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAC9C,OAAO,iCAAiC,SAAS,EAAE,CAAC;IACtD,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class SolveCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -16,6 +16,7 @@ export class SolveCommand extends Command {
|
|
|
16
16
|
this.logger.write(`${this.actor.name} has solved ${room.puzzle.name}`);
|
|
17
17
|
}
|
|
18
18
|
this.logger.write(`SolveCommand: ${result.message}`);
|
|
19
|
+
this.actor.performAction('solve', result.message);
|
|
19
20
|
return result.message;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solve.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/solve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"solve.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/solve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,4BAA4B,CAAC;IAE5D,OAAO,CAAC,IAAc;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QAExC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAC1G,OAAO,mDAAmD,CAAC;QAC7D,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC/D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,uBAAuB,IAAI,CAAC,MAAM,CAAC,IAAI,gBAAgB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7G,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;YAC7C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACrD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,eAAe,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACzE,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class StoreCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -22,6 +22,7 @@ export class StoreCommand extends Command {
|
|
|
22
22
|
const itemStored = this.actor.currentLocation.storeItemFromActor(this.actor, itemToStore);
|
|
23
23
|
if (itemStored) {
|
|
24
24
|
this.actor.inventory.removeItem(itemName);
|
|
25
|
+
this.actor.performAction('solve', itemName);
|
|
25
26
|
return `You stored ${itemName}.`;
|
|
26
27
|
}
|
|
27
28
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,gEAAgE,CAAC;IAEhG,OAAO,CAAC,IAAc;QACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,6CAA6C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACnG,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAEO,KAAK,CAAC,IAAc;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,+BAA+B;QAE9E,qDAAqD;QACrD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,QAAQ,kBAAkB,IAAI,CAAC,KAAK,CAAC,IAAI,sCAAsC,CAAC,CAAC;YAC5G,OAAO,kBAAkB,QAAQ,qBAAqB,CAAC;QACzD,CAAC;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE3D,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,QAAQ,iCAAiC,IAAI,CAAC,KAAK,CAAC,IAAI,sCAAsC,CAAC,CAAC;YAC3H,OAAO,kBAAkB,QAAQ,qBAAqB,CAAC;QACzD,CAAC;QAED,6EAA6E;QAC7E,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC1F,IAAG,UAAU,EAAE,CAAC;YACd,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC5C,OAAO,cAAc,QAAQ,GAAG,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,OAAO,wCAAwC,QAAQ,GAAG,CAAC;QAC7D,CAAC;IAEH,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class TakeCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -22,6 +22,7 @@ export class TakeCommand extends Command {
|
|
|
22
22
|
}
|
|
23
23
|
// Try adding the item to the player's inventory
|
|
24
24
|
try {
|
|
25
|
+
this.actor.performAction('take', itemName);
|
|
25
26
|
this.actor.addInventory(item);
|
|
26
27
|
this.logger.write(`Successfully added "${itemName}" to ${this.actor.name}'s inventory during 'Take' command.`);
|
|
27
28
|
// Remove item from room's inventory
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAElD,OAAO,CAAC,IAAc;QACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAEO,IAAI,CAAC,IAAc;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QAExC,mDAAmD;QACnD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,QAAQ,kBAAkB,IAAI,CAAC,IAAI,yBAAyB,CAAC,CAAC;YACzF,OAAO,qBAAqB,QAAQ,iBAAiB,CAAC;QACxD,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,gDAAgD;QAChD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,QAAQ,wBAAwB,IAAI,CAAC,IAAI,0CAA0C,CAAC,CAAC;YAChH,OAAO,qBAAqB,QAAQ,iBAAiB,CAAC;QACxD,CAAC;QAED,gDAAgD;QAChD,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC3C,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,QAAQ,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,qCAAqC,CAAC,CAAC;YAE/G,oCAAoC;YACpC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,QAAQ,UAAU,IAAI,CAAC,IAAI,0CAA0C,CAAC,CAAC;YAElH,OAAO,sBAAsB,QAAQ,GAAG,CAAC;QAE3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACnE,OAAO,aAAa,QAAQ,0BAA0B,CAAC;QACzD,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command, ICommandConstructor } from './command.js';
|
|
2
|
+
export declare function parseArgsWithQuotes(input: string): string[];
|
|
3
|
+
export declare class TalkCommand extends Command {
|
|
4
|
+
protected static verb: string;
|
|
5
|
+
protected static description: string;
|
|
6
|
+
protected context: ICommandConstructor;
|
|
7
|
+
constructor(context: ICommandConstructor);
|
|
8
|
+
execute(args: string[]): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
export function parseArgsWithQuotes(input) {
|
|
3
|
+
const regex = /"([^"]+)"|(\S+)/g;
|
|
4
|
+
const args = [];
|
|
5
|
+
let match;
|
|
6
|
+
while ((match = regex.exec(input)) !== null) {
|
|
7
|
+
if (match[1]) {
|
|
8
|
+
args.push(match[1]);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
args.push(match[2]);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return args;
|
|
15
|
+
}
|
|
16
|
+
export class TalkCommand extends Command {
|
|
17
|
+
static verb = "talk-to";
|
|
18
|
+
static description = "Speak privately to a person in the room.";
|
|
19
|
+
context;
|
|
20
|
+
constructor(context) {
|
|
21
|
+
super(context);
|
|
22
|
+
this.context = context;
|
|
23
|
+
}
|
|
24
|
+
execute(args) {
|
|
25
|
+
const parsedArgs = parseArgsWithQuotes(args.join(' '));
|
|
26
|
+
if (parsedArgs.length < 2) {
|
|
27
|
+
return "Usage: talk-to <name> <message>";
|
|
28
|
+
}
|
|
29
|
+
const [targetName, ...messageParts] = parsedArgs;
|
|
30
|
+
const message = messageParts.join(' ');
|
|
31
|
+
const speaker = this.actor;
|
|
32
|
+
const room = speaker.currentLocation;
|
|
33
|
+
if (!room) {
|
|
34
|
+
return "You are not in a valid room.";
|
|
35
|
+
}
|
|
36
|
+
const scene = this.context.scene; // Assuming you have scene in ICommandContext
|
|
37
|
+
const roomActors = scene.allActors.filter(actor => actor.currentLocation === speaker.currentLocation);
|
|
38
|
+
const possibleTargets = roomActors;
|
|
39
|
+
const target = possibleTargets.find(actor => actor.name.toLowerCase() === targetName.toLowerCase());
|
|
40
|
+
if (!target) {
|
|
41
|
+
return `You don’t see anyone named "${targetName}" here.`;
|
|
42
|
+
}
|
|
43
|
+
if (target === speaker) {
|
|
44
|
+
return "You can't talk to yourself (try 'say' instead).";
|
|
45
|
+
}
|
|
46
|
+
// Private communication
|
|
47
|
+
speaker.hear(speaker, `(to ${target.name}) ${message}`);
|
|
48
|
+
target.hear(speaker, `(privately) ${message}`);
|
|
49
|
+
return `You talk to ${target.name} privately: "${message}"`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=talk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"talk.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/talk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAC;AAG5D,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,MAAM,KAAK,GAAG,kBAAkB,CAAC;IACjC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,KAAK,CAAC;IACV,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC5C,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,MAAM,CAAC,WAAW,GAAG,0CAA0C,CAAC;IAChE,OAAO,CAAsB;IAEvC,YAAY,OAA4B;QACtC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,OAAO,CAAC,IAAc;QACpB,MAAM,UAAU,GAAG,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAEvD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,OAAO,iCAAiC,CAAC;QAC3C,CAAC;QAED,MAAM,CAAC,UAAU,EAAE,GAAG,YAAY,CAAC,GAAG,UAAU,CAAC;QACjD,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAe,CAAC;QACrC,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC;QAErC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,8BAA8B,CAAC;QACxC,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,6CAA6C;QAE/E,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;QAEtG,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAC1C,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,WAAW,EAAE,CACtD,CAAC;QAEF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,+BAA+B,UAAU,SAAS,CAAC;QAC5D,CAAC;QAED,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YACvB,OAAO,iDAAiD,CAAC;QAC3D,CAAC;QAED,wBAAwB;QACxB,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,OAAO,EAAE,CAAC,CAAC;QAE/C,OAAO,eAAe,MAAM,CAAC,IAAI,gBAAgB,OAAO,GAAG,CAAC;IAC9D,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class UnequipCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -6,6 +6,7 @@ export class UnequipCommand extends Command {
|
|
|
6
6
|
const slotName = args.join(' ').toLowerCase();
|
|
7
7
|
const response = this.actor.unequip(slotName);
|
|
8
8
|
this.logger.write(`UnequipCommand: ${this.actor.name} unqeuiped ${response}`);
|
|
9
|
+
this.actor.performAction('unqeuip', response);
|
|
9
10
|
return response;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unequip.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unequip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"unequip.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unequip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,MAAM,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAElD,OAAO,CAAC,IAAc;QACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,IAAI,CAAC,KAAK,CAAC,IAAI,cAAc,QAAQ,EAAE,CAAC,CAAC;QAC9E,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAE9C,OAAO,QAAQ,CAAC;IAClB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class UnlockCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -23,6 +23,7 @@ export class UnlockCommand extends Command {
|
|
|
23
23
|
if (key) {
|
|
24
24
|
const unlockMessage = room.attemptUnlockExit(target, key.name);
|
|
25
25
|
this.logger.write(`UnlockCommand: ${this.actor.name} is attempted to unlock ${target}. Result: ${unlockMessage}`);
|
|
26
|
+
this.actor.performAction('unlock', unlockMessage);
|
|
26
27
|
return unlockMessage;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"unlock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAEhD,OAAO,CAAC,IAAc;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAEO,MAAM,CAAC,IAAc;QAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;YACzD,OAAO,+CAA+C,CAAC;QACzD,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,IAAI,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S,CAAC;YACnD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,MAAM,2BAA2B,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;YACnF,OAAO,0BAA0B,MAAM,SAAS,CAAC;QACnD,CAAC;IACH,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from './command.js';
|
|
2
|
-
import { ICommand } from '../types/interfaces.js';
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
3
2
|
export declare class UseCommand extends Command implements ICommand {
|
|
4
3
|
protected static verb: string;
|
|
5
4
|
protected static description: string;
|
|
@@ -22,6 +22,7 @@ export class UseCommand extends Command {
|
|
|
22
22
|
if (typeof itemToUse.use === 'function') {
|
|
23
23
|
const result = itemToUse.use();
|
|
24
24
|
this.logger.write(`UseCommand: ${this.actor.name} used ${itemName}.`);
|
|
25
|
+
this.actor.performAction('use', result);
|
|
25
26
|
return result;
|
|
26
27
|
}
|
|
27
28
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/use.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/use.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,UAAW,SAAQ,OAAO;IAC3B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,cAAc,CAAC;IAE9C,OAAO,CAAC,IAAc;QACpB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAEO,GAAG,CAAC,IAAc;QACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAE9C,qDAAqD;QACrD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,IAAI,qBAAqB,QAAQ,oCAAoC,CAAC,CAAC;YACnH,OAAO,sBAAsB,QAAQ,UAAU,CAAC;QAClD,CAAC;QAED,uCAAuC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEzD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,QAAQ,uBAAuB,IAAI,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,CAAC;YAChG,OAAO,sBAAsB,QAAQ,UAAU,CAAC;QAClD,CAAC;QAED,oFAAoF;QACpF,IAAI,OAAO,SAAS,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;YACxC,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS,QAAQ,GAAG,CAAC,CAAC;YACtE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YACxC,OAAO,MAAM,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,QAAQ,6BAA6B,CAAC,CAAC;YACxE,OAAO,qBAAqB,QAAQ,eAAe,CAAC;QACtD,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command, ICommandConstructor } from '../commands/command.js';
|
|
2
|
+
export declare class CommandFactory {
|
|
3
|
+
private static commandMap;
|
|
4
|
+
static registerCommand(verb: string, commandClass: new (context: ICommandConstructor) => Command): void;
|
|
5
|
+
static createCommand(verb: string, context: ICommandConstructor): Command | null;
|
|
6
|
+
static getAllRegisteredCommands(): {
|
|
7
|
+
[key: string]: new (context: ICommandConstructor) => Command;
|
|
8
|
+
};
|
|
9
|
+
}
|