@maka/maka-cli 5.105.0 → 5.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +71 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/deck.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/deck.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/download.d.ts +46 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/download.js +128 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/download.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +3 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/device.d.ts +58 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/device.js +66 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/device.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +22 -5
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +37 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.js +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/condition-report.js +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/condition-report.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grid-view.js +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grid-view.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { hint } from '../utilities/hints.js';
|
|
3
|
+
import { Category } from '../types/shared/item-enum.js';
|
|
4
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
5
|
+
import { fileReach, planeTintItemName } from '../utilities/planes.js';
|
|
6
|
+
/**
|
|
7
|
+
* "download" -- WRITE A FILE OUT OF THE GRID AND ONTO SOMETHING YOU CAN
|
|
8
|
+
* HAND OVER.
|
|
9
|
+
*
|
|
10
|
+
* Two reports, one hole:
|
|
11
|
+
*
|
|
12
|
+
* aNeh5TELvdgeS2vpg (Deditri): "paydata in this run is stuck with the
|
|
13
|
+
* sprite, It won't give it to me and there is not way to get it to
|
|
14
|
+
* Marrow."
|
|
15
|
+
*
|
|
16
|
+
* MxiKYFGeStiyvibJN (Maka): "there needs to be a way to move data from
|
|
17
|
+
* matrix to meatworld in the form of 'download'."
|
|
18
|
+
*
|
|
19
|
+
* THE CONVERSION ALREADY EXISTED AND HAD NO NAME. take.ts has flipped a
|
|
20
|
+
* matrix-plane file to `meat` and re-categorised it as a Datachip for a
|
|
21
|
+
* while now -- "pulled down ... written to a chip". So the mechanic was
|
|
22
|
+
* built; what was missing was a VERB anybody would think to type, and a
|
|
23
|
+
* source other than the floor.
|
|
24
|
+
*
|
|
25
|
+
* THE SPRITE IS THE CASE THAT HAD NO ROUTE AT ALL. `take` reads the
|
|
26
|
+
* ROOM's inventory, and Deditri's chip was in a compiled sprite's hands.
|
|
27
|
+
* `give` was no help from either end: it refuses whenever an actor is off
|
|
28
|
+
* the meat plane, and a sprite is `plane: 'matrix'` by construction, so
|
|
29
|
+
* "order sprite give me the chip" could never work. The only route left
|
|
30
|
+
* was `decompile` -- destroying your own sprite to make it drop the
|
|
31
|
+
* loot -- which is exactly the "hidden, non-obvious solution" the vetting
|
|
32
|
+
* described. It is also a lousy trade the player has no way to know they
|
|
33
|
+
* are making.
|
|
34
|
+
*
|
|
35
|
+
* SO THIS VERB READS BOTH SOURCES: files loose on the grid where you are
|
|
36
|
+
* standing, and files carried by YOUR OWN compiled sprites. Somebody
|
|
37
|
+
* else's sprite is not a shelf you may take from -- that is a hack, and
|
|
38
|
+
* hack.ts owns it.
|
|
39
|
+
*
|
|
40
|
+
* DELIBERATELY NOT A TEST. Pulling a file you already have reach on is
|
|
41
|
+
* not an opposed action in this engine -- `take` does not roll for it
|
|
42
|
+
* either, and getting past whatever GUARDED the file is what the host
|
|
43
|
+
* crack and the mark already charged for. Adding dice here would price
|
|
44
|
+
* the same obstacle twice.
|
|
45
|
+
*/
|
|
46
|
+
export class DownloadCommand extends Command {
|
|
47
|
+
static verb = 'download';
|
|
48
|
+
static description = 'Write a file out of the Matrix onto a chip you carry -- "download <file>". Reads data loose on the grid where you stand AND data your own sprites are holding, which is the one place nothing else could reach it. A downloaded file is ordinary meat-world cargo: you can carry it, stash it, or hand it to somebody.';
|
|
49
|
+
async execute(args = []) {
|
|
50
|
+
const actor = this.actor;
|
|
51
|
+
const room = actor.currentLocation;
|
|
52
|
+
// WHAT IS IN REACH, from both sources.
|
|
53
|
+
//
|
|
54
|
+
// The room's own files honour fileReach (utilities/planes.ts) -- a
|
|
55
|
+
// host's contents are inside the host and an offline server wants a
|
|
56
|
+
// body in the room -- because a download that ignored the boundary
|
|
57
|
+
// would be a way to read a sealed host from the street, which is the
|
|
58
|
+
// very thing eJANPpm7qCaCAJBJw was filed about.
|
|
59
|
+
const reach = fileReach(actor, room);
|
|
60
|
+
const loose = reach === 'open'
|
|
61
|
+
? room.inventory.getAllItems().filter(i => i.plane === 'matrix')
|
|
62
|
+
: [];
|
|
63
|
+
// YOUR sprites, not everyone's. `compiledBy` is not modelled on the
|
|
64
|
+
// shell, so ownership is "it is in YOUR companion list" -- which is
|
|
65
|
+
// the same thing the order/decompile verbs already mean by it.
|
|
66
|
+
const mine = (this.game?.companions ?? []).filter(c => c.kind === 'sprite');
|
|
67
|
+
const carried = [];
|
|
68
|
+
for (const entry of mine) {
|
|
69
|
+
for (const item of entry.npc.inventory.getAllItems()) {
|
|
70
|
+
if (item.plane === 'matrix')
|
|
71
|
+
carried.push({ npc: entry.npc, item });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (loose.length === 0 && carried.length === 0) {
|
|
75
|
+
return `Nothing to pull down -- no data on the grid here, and nothing your sprites are carrying.${reach === 'enter' ? hint(` (This room's files live INSIDE its host -- "enter" first.)`) : ''}`;
|
|
76
|
+
}
|
|
77
|
+
// Bare "download" is the LIST. A verb whose whole reason for existing
|
|
78
|
+
// is that nobody could find the file should say what it can see.
|
|
79
|
+
const query = args.join(' ').trim();
|
|
80
|
+
if (query.length === 0) {
|
|
81
|
+
const lines = [`{cyan-fg}Within reach to pull down:{/cyan-fg}`];
|
|
82
|
+
for (const i of loose)
|
|
83
|
+
lines.push(` ${planeTintItemName(i, actor.plane)} -- loose on the grid here`);
|
|
84
|
+
for (const c of carried)
|
|
85
|
+
lines.push(` ${planeTintItemName(c.item, actor.plane)} -- held by ${c.npc.name}`);
|
|
86
|
+
lines.push(hint(`("download <file>" writes it to a chip you carry.)`));
|
|
87
|
+
return lines.join('\n');
|
|
88
|
+
}
|
|
89
|
+
const names = [...loose.map(i => i.name), ...carried.map(c => c.item.name)];
|
|
90
|
+
const picked = fuzzyPickName(query, names);
|
|
91
|
+
if (!picked) {
|
|
92
|
+
return `No file called "${query}" within reach.${hint(` ("download" on its own lists what is.)`)}`;
|
|
93
|
+
}
|
|
94
|
+
const fromSprite = carried.find(c => c.item.name === picked);
|
|
95
|
+
const item = fromSprite ? fromSprite.item : loose.find(i => i.name === picked);
|
|
96
|
+
// THE CONVERSION, identical to take.ts's. Same two fields, because a
|
|
97
|
+
// file that came down by one verb and a file that came down by the
|
|
98
|
+
// other must be the same object afterwards -- a chip you can `give`.
|
|
99
|
+
try {
|
|
100
|
+
actor.addInventory(item);
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return `You can't carry any more -- ${item.name} stays where it is.`;
|
|
104
|
+
}
|
|
105
|
+
if (fromSprite) {
|
|
106
|
+
fromSprite.npc.inventory.removeItem(item.name);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
room.inventory.removeItem(item.name);
|
|
110
|
+
room.plainSightItems.delete(item.name.toLowerCase());
|
|
111
|
+
}
|
|
112
|
+
item.plane = 'meat';
|
|
113
|
+
item.category = Category.Datachip;
|
|
114
|
+
actor.performAction('pulls a file down', `${item.name} writing to a chip`);
|
|
115
|
+
this.logger.write(`${actor.name} downloaded "${item.name}"${fromSprite ? ` from ${fromSprite.npc.name}` : ` from ${room.name}`}.`);
|
|
116
|
+
this.scene.updateStatus();
|
|
117
|
+
return fromSprite
|
|
118
|
+
? [
|
|
119
|
+
`{cyan-fg}${fromSprite.npc.name} opens its hands and the data pours out of them.{/cyan-fg}`,
|
|
120
|
+
`You pull {bold}{underline}${item.name}{/underline}{/bold} down onto a chip -- meat-world cargo now.${hint(` (You can "give ${item.name}" to somebody standing in front of you.)`)}`,
|
|
121
|
+
].join('\n')
|
|
122
|
+
: [
|
|
123
|
+
`{cyan-fg}You pull {bold}{underline}${item.name}{/underline}{/bold} down off the grid -- written to a chip.{/cyan-fg}`,
|
|
124
|
+
hint(`(Meat-world cargo now: carry it, stash it, or "give" it to somebody.)`),
|
|
125
|
+
].join('\n');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,O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M,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,gBAAgB,IAAI,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACnI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,OAAO,UAAU;YACf,CAAC,CAAC;gBACA,YAAY,UAAU,CAAC,GAAG,CAAC,IAAI,4DAA4D;gBAC3F,6BAA6B,IAAI,CAAC,IAAI,gEAAgE,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,0CAA0C,CAAC,EAAE;aACrL,CAAC,IAAI,CAAC,IAAI,CAAC;YACZ,CAAC,CAAC;gBACA,sCAAsC,IAAI,CAAC,IAAI,uEAAuE;gBACtH,IAAI,CAAC,uEAAuE,CAAC;aAC9E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC"}
|
|
@@ -30,6 +30,7 @@ import { currentSession } from './utilities/session-context.js';
|
|
|
30
30
|
import { PlayersCommand } from './commands/players.js';
|
|
31
31
|
import { LookCommand } from './commands/look.js';
|
|
32
32
|
import { TakeCommand } from './commands/take.js';
|
|
33
|
+
import { DownloadCommand } from './commands/download.js';
|
|
33
34
|
import { LootCommand } from './commands/loot.js';
|
|
34
35
|
import { NoteCommand } from './commands/note.js';
|
|
35
36
|
import { BacklogCommand } from './commands/backlog.js';
|
|
@@ -2205,6 +2206,7 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
|
|
|
2205
2206
|
CommandFactory.registerCommand('follow', FollowCommand);
|
|
2206
2207
|
CommandFactory.registerCommand('unfollow', UnfollowCommand);
|
|
2207
2208
|
CommandFactory.registerCommand('take', TakeCommand);
|
|
2209
|
+
CommandFactory.registerCommand('download', DownloadCommand);
|
|
2208
2210
|
CommandFactory.registerCommand('loot', LootCommand);
|
|
2209
2211
|
CommandFactory.registerCommand('note', NoteCommand);
|
|
2210
2212
|
CommandFactory.registerCommand('backlog', BacklogCommand);
|
|
@@ -5409,7 +5411,7 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
|
|
|
5409
5411
|
// players" / "crew street"); the bare verb still answers quietly.
|
|
5410
5412
|
{ title: 'party', entries: [['crew', 'party'], ['hire'], ['dismiss'], ['train'], ['order'], ['lead'], ['command'], ['deploy'], ['recall']] },
|
|
5411
5413
|
{ title: 'magic', entries: [['spells'], ['cast'], ['summon', 'conjure'], ['project', 'astral'], ['return'], ['assense']] },
|
|
5412
|
-
{ title: 'matrix', entries: [['jack'], ['jackpoint'], ['deck'], ['load'], ['unload'], ['hack'], ['mark'], ['enter'], ['exit-host'], ['tap', 'splice'], ['snoop'], ['overwatch', 'os'], ['pan'], ['ar'], ['aros'], ['silent'], ['reboot'], ['agent'], ['drone'], ['jump', 'rig']] },
|
|
5414
|
+
{ title: 'matrix', entries: [['jack'], ['jackpoint'], ['deck'], ['load'], ['unload'], ['hack'], ['mark'], ['download'], ['enter'], ['exit-host'], ['tap', 'splice'], ['snoop'], ['overwatch', 'os'], ['pan'], ['ar'], ['aros'], ['silent'], ['reboot'], ['agent'], ['drone'], ['jump', 'rig']] },
|
|
5413
5415
|
// The Emerged get their own shelf (player request: "there MUST be
|
|
5414
5416
|
// resonance" -- matrix is the place, Resonance is the talent).
|
|
5415
5417
|
// `sustain` shelves here and not under magic: the command is
|