@maka/maka-cli 5.177.0 → 5.178.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/commands/say.js +8 -1
- package/bundle/typescript/src/commands/game/sideQuest/headless.js +4 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +13 -2
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +5 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.178.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 3.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 3.x applications using React.",
|
|
@@ -100,7 +100,14 @@ export class SayCommand extends Command {
|
|
|
100
100
|
// comms visually reads as a different "space" than in-person speech.
|
|
101
101
|
const inCall = !!currentPlayer.activeCallPartner || !!currentPlayer.crewChannel;
|
|
102
102
|
const prefix = inCall ? `${CALL_ICON} ` : '';
|
|
103
|
-
|
|
103
|
+
const speech = {
|
|
104
|
+
speaker: currentPlayer.name,
|
|
105
|
+
text: message,
|
|
106
|
+
self: true,
|
|
107
|
+
...(inCall ? { comms: true } : {}),
|
|
108
|
+
...(currentPlayer.gender ? { gender: currentPlayer.gender } : {}),
|
|
109
|
+
};
|
|
110
|
+
this.logger.logWithColor(`${prefix}${message}`, inCall ? CALL_COLOR : 'yellow', { actor: currentPlayer.name }, { speech });
|
|
104
111
|
}
|
|
105
112
|
// "say" and "call" are deliberately similar -- once a call connects
|
|
106
113
|
// (see call.ts), the two ends keep talking with the same "say" command
|
|
@@ -84,13 +84,14 @@ export class EmitterLogger extends Logger {
|
|
|
84
84
|
const actor = g?.scene.getPlayerByName(d.actorName);
|
|
85
85
|
return actor?.currentLocation ? { room: actor.currentLocation.name } : { actor: d.actorName };
|
|
86
86
|
}
|
|
87
|
-
log(message, scope) {
|
|
87
|
+
log(message, scope, data) {
|
|
88
88
|
this.emit('log', message, scope ?? this.ambient('log'), {
|
|
89
89
|
actor: currentSession()?.dispatch?.actorName,
|
|
90
|
+
...(data ? { data } : {}),
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
|
-
logWithColor(message, color = 'white', scope) {
|
|
93
|
-
this.log(`{${color}-fg}${message}{/${color}-fg}`, scope);
|
|
93
|
+
logWithColor(message, color = 'white', scope, data) {
|
|
94
|
+
this.log(`{${color}-fg}${message}{/${color}-fg}`, scope, data);
|
|
94
95
|
}
|
|
95
96
|
meta(message, color, scope) {
|
|
96
97
|
const text = color ? `{${color}-fg}${message}{/${color}-fg}` : message;
|
|
@@ -766,7 +766,8 @@ export class NPC extends Player {
|
|
|
766
766
|
// SPEECH STAYS IN THE STORY. Someone on the other end of the bond
|
|
767
767
|
// talking to you is fiction, and burying it in the Mechanics
|
|
768
768
|
// ticker would mean missing "Rattle's not budging, need your call".
|
|
769
|
-
this.
|
|
769
|
+
const speech = { speaker: this.name, text: spoken, link: true, ...(this.gender ? { gender: this.gender } : {}) };
|
|
770
|
+
this.logger.logWithColor(`${style.icon} ${this.name}: "${spoken}"`, style.color, undefined, { speech });
|
|
770
771
|
}
|
|
771
772
|
else {
|
|
772
773
|
// TELEMETRY GOES TO MECHANICS (player ruling 2026-08-25: the
|
|
@@ -2821,11 +2821,22 @@ export class Player extends AbstractPlayer {
|
|
|
2821
2821
|
// room -- a cross-room say over a call would render to the wrong
|
|
2822
2822
|
// side, and two humans sharing a room would each see the line
|
|
2823
2823
|
// twice. Solo Logger ignores the scope (inert third arg).
|
|
2824
|
+
// SPOKEN LINES AS DATA (emitter.ts SpeechData): the words ride beside
|
|
2825
|
+
// the text so the browser can hand them to a voice. Inert solo.
|
|
2826
|
+
const speech = (comms) => ({
|
|
2827
|
+
speech: {
|
|
2828
|
+
speaker: actor.name,
|
|
2829
|
+
text: message,
|
|
2830
|
+
...(actor === this ? { self: true } : {}),
|
|
2831
|
+
...(comms ? { comms: true } : {}),
|
|
2832
|
+
...(actor.gender ? { gender: actor.gender } : {}),
|
|
2833
|
+
},
|
|
2834
|
+
});
|
|
2824
2835
|
if (this.activeCallPartner === actor && actor.currentLocation !== this.currentLocation) {
|
|
2825
|
-
this.logger.logWithColor(`${CALL_ICON} ${actor.name} (over comms): ${message}`, CALL_COLOR, { actor: this.name });
|
|
2836
|
+
this.logger.logWithColor(`${CALL_ICON} ${actor.name} (over comms): ${message}`, CALL_COLOR, { actor: this.name }, speech(true));
|
|
2826
2837
|
return;
|
|
2827
2838
|
}
|
|
2828
|
-
this.logger.logWithColor(`{white-fg}${actor.name}:{/white-fg} ${message}`, (actor === this) ? 'yellow' : 'green', { actor: this.name });
|
|
2839
|
+
this.logger.logWithColor(`{white-fg}${actor.name}:{/white-fg} ${message}`, (actor === this) ? 'yellow' : 'green', { actor: this.name }, speech(false));
|
|
2829
2840
|
}
|
|
2830
2841
|
see(actor, verb, details, quiet) {
|
|
2831
2842
|
if (actor !== this && this.canPerceive(actor)) {
|
|
@@ -88,7 +88,7 @@ export class Logger {
|
|
|
88
88
|
// solo screen shows the local player everything its callers already
|
|
89
89
|
// gated for. A headless session's EmitterLogger reads it (or applies
|
|
90
90
|
// the ambient dispatch default) to stamp per-player visibility.
|
|
91
|
-
log(message, _scope) {
|
|
91
|
+
log(message, _scope, _data) {
|
|
92
92
|
const logBox = this.screen?.children.find(child => child.type === 'box' && child.options.id === 'logBox');
|
|
93
93
|
if (logBox) {
|
|
94
94
|
logBox.insertBottom(message); // Supports color tags
|
|
@@ -106,9 +106,11 @@ export class Logger {
|
|
|
106
106
|
// not the system log (player request: two files).
|
|
107
107
|
this.transcript(message);
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
// `data` rides the same way as `scope`: inert on the solo screen, stamped
|
|
110
|
+
// onto the event by a headless session's EmitterLogger (GameEvent.data).
|
|
111
|
+
logWithColor(message, color = 'white', scope, data) {
|
|
110
112
|
const coloredMessage = `{${color}-fg}${message}{/${color}-fg}`;
|
|
111
|
-
this.log(coloredMessage, scope);
|
|
113
|
+
this.log(coloredMessage, scope, data);
|
|
112
114
|
}
|
|
113
115
|
/**
|
|
114
116
|
* The MECHANICS ticker (readability pass): dice anatomy and resource
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.178.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 3.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 3.x applications using React.",
|