@maka/maka-cli 5.63.0 → 5.64.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/ar.js +29 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/ar.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.d.ts +42 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +86 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +29 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +22 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/jobs.js +16 -9
- package/bundle/typescript/src/commands/game/sideQuest/commands/jobs.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/journal.d.ts +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/journal.js +136 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/journal.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.d.ts +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +99 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/players.js +8 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/players.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +27 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +30 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js +11 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.d.ts +47 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +91 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/time.d.ts +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/time.js +61 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/time.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +45 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +150 -9
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +104 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +257 -11
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/headless-harness.d.ts +78 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless-harness.js +188 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless-harness.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless.d.ts +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless.js +54 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +62 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +121 -9
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +28 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +67 -7
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +116 -19
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.js +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-dump.js +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-dump.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js +30 -5
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/playtester.d.ts +50 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/playtester.js +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/playtester.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.d.ts +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.js +42 -28
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js +66 -8
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.d.ts +45 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +41 -6
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/world-clock.d.ts +83 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/world-clock.js +106 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/world-clock.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE WORLD CLOCK (backlog wave 2, item B: "Mr. Moss said 'after
|
|
3
|
+
* midnight', let's implement a world clock -- it should be the same
|
|
4
|
+
* timezone as the server").
|
|
5
|
+
*
|
|
6
|
+
* WHY REAL TIME, AND WHY EXACTLY ONE OF IT. The second clause is the
|
|
7
|
+
* whole design. A purely fictional clock has no timezone -- you only
|
|
8
|
+
* say "timezone" about real time -- and a deadline like "after
|
|
9
|
+
* midnight" is only a deadline if every runner at the table agrees on
|
|
10
|
+
* when it falls.
|
|
11
|
+
*
|
|
12
|
+
* The first cut said "the wall clock of the machine the ENGINE is on"
|
|
13
|
+
* and called the solo case degenerate. That was wrong, and it is worth
|
|
14
|
+
* keeping the error visible: in a shared run the engine host is the
|
|
15
|
+
* server, but in a SOLO run it is the player's own laptop. So solo read
|
|
16
|
+
* one zone and shared read another, which is the precise divergence
|
|
17
|
+
* this file was written to prevent, reintroduced by the sentence that
|
|
18
|
+
* claimed to prevent it. See the UTC ruling below.
|
|
19
|
+
*
|
|
20
|
+
* What holds regardless of zone: nothing outside the engine may format
|
|
21
|
+
* world time. A client rendering `new Date()` for itself is how a table
|
|
22
|
+
* ends up disagreeing about what day it is; ask here instead.
|
|
23
|
+
*
|
|
24
|
+
* WHAT THIS DELIBERATELY DOES NOT TOUCH. The game already has a clock,
|
|
25
|
+
* and it is not this one: the JOB CYCLE. Lifestyle upkeep, DocWagon
|
|
26
|
+
* ticks, procurement deliveries, rest, the edge refresh and the hunger
|
|
27
|
+
* and sleep needs all advance at homecoming and departure, in discrete
|
|
28
|
+
* steps (Game.applyDepartureNeeds, returnToHub). That is an economy,
|
|
29
|
+
* balanced in cycles, and re-plumbing it onto real seconds would change
|
|
30
|
+
* every one of those numbers. The two stay separate on purpose: the job
|
|
31
|
+
* cycle is how the WORLD advances, and the world clock is what the
|
|
32
|
+
* clock on the wall says while it does. This module is a READ surface
|
|
33
|
+
* and a gate for fiction ("after midnight"), not a second economy.
|
|
34
|
+
*
|
|
35
|
+
* `now` is injectable throughout so the behaviour is testable without
|
|
36
|
+
* waiting for actual midnight.
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* THE WORLD KEEPS UTC. THE ENGINE HOST'S LOCAL TIME IS NEVER THE
|
|
40
|
+
* WORLD'S TIME (ruling 2026-08-27).
|
|
41
|
+
*
|
|
42
|
+
* This module originally read the wall clock of "the machine the engine
|
|
43
|
+
* is on", which is right for a shared run -- the server -- and wrong for
|
|
44
|
+
* a solo one, where the engine host is the PLAYER'S OWN LAPTOP. So solo
|
|
45
|
+
* showed the player's zone, shared showed the server's, and the two
|
|
46
|
+
* silently disagreed. The item that asked for this clock asked for "the
|
|
47
|
+
* same timezone as the server", and reading local time never delivered
|
|
48
|
+
* it; two players at one table in different zones read different clocks,
|
|
49
|
+
* which is exactly the case a world clock exists to prevent. "After
|
|
50
|
+
* midnight" cannot gate anything until every seat agrees when midnight
|
|
51
|
+
* is.
|
|
52
|
+
*
|
|
53
|
+
* UTC is that agreement, and it is the one zone no machine has to be
|
|
54
|
+
* configured for. Every reader below therefore uses the getUTC*
|
|
55
|
+
* accessors -- getHours() and friends would reintroduce the bug one
|
|
56
|
+
* function at a time.
|
|
57
|
+
*/
|
|
58
|
+
export function worldNow(now = new Date()) {
|
|
59
|
+
return now;
|
|
60
|
+
}
|
|
61
|
+
/** Named plainly rather than resolved: there is nothing to resolve, and
|
|
62
|
+
* a runner in Seattle should be told which clock they are reading
|
|
63
|
+
* rather than left to assume it is theirs. */
|
|
64
|
+
export function worldZone(_now = new Date()) {
|
|
65
|
+
return 'UTC';
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Which stretch of the day it is, in the words the street uses. The
|
|
69
|
+
* boundaries are drawn for a game about night work: midnight to five is
|
|
70
|
+
* its own country ("the small hours") rather than a wing of night,
|
|
71
|
+
* because that is the window jobs keep getting set in.
|
|
72
|
+
*/
|
|
73
|
+
export function partOfDay(now = new Date()) {
|
|
74
|
+
const h = now.getUTCHours();
|
|
75
|
+
if (h < 5)
|
|
76
|
+
return 'small hours';
|
|
77
|
+
if (h < 12)
|
|
78
|
+
return 'morning';
|
|
79
|
+
if (h < 17)
|
|
80
|
+
return 'afternoon';
|
|
81
|
+
if (h < 21)
|
|
82
|
+
return 'evening';
|
|
83
|
+
return 'night';
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* AFTER MIDNIGHT, as a runner means it (the item's own example). Not
|
|
87
|
+
* "the calendar date rolled over" -- a job that says after midnight
|
|
88
|
+
* means the small hours, the dead stretch before the city wakes. 00:00
|
|
89
|
+
* to 04:59 is inside it; 23:59 and 05:00 are not.
|
|
90
|
+
*/
|
|
91
|
+
export function isAfterMidnight(now = new Date()) {
|
|
92
|
+
return now.getUTCHours() < 5;
|
|
93
|
+
}
|
|
94
|
+
/** 24-hour, zero-padded -- the way a runner's display would show it. */
|
|
95
|
+
export function clockTime(now = new Date()) {
|
|
96
|
+
return `${String(now.getUTCHours()).padStart(2, '0')}:${String(now.getUTCMinutes()).padStart(2, '0')}`;
|
|
97
|
+
}
|
|
98
|
+
/** Weekday and date, for the times the day itself matters. */
|
|
99
|
+
export function clockDate(now = new Date()) {
|
|
100
|
+
return now.toLocaleDateString('en-US', { weekday: 'long', month: 'short', day: 'numeric', timeZone: 'UTC' });
|
|
101
|
+
}
|
|
102
|
+
/** The full read, as the `time` command and the HUD both want it. */
|
|
103
|
+
export function worldTimeLabel(now = new Date()) {
|
|
104
|
+
return `${clockTime(now)} -- ${partOfDay(now)}`;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=world-clock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"world-clock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/world-clock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAIH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAY,IAAI,IAAI,EAAE;IAC7C,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;+CAE+C;AAC/C,MAAM,UAAU,SAAS,CAAC,OAAa,IAAI,IAAI,EAAE;IAC/C,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,MAAY,IAAI,IAAI,EAAE;IAC9C,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;IAC5B,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,aAAa,CAAC;IAChC,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,SAAS,CAAC;IAC7B,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,WAAW,CAAC;IAC/B,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,SAAS,CAAC;IAC7B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,MAAY,IAAI,IAAI,EAAE;IACpD,OAAO,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,SAAS,CAAC,MAAY,IAAI,IAAI,EAAE;IAC9C,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACzG,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,SAAS,CAAC,MAAY,IAAI,IAAI,EAAE;IAC9C,OAAO,GAAG,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/G,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,cAAc,CAAC,MAAY,IAAI,IAAI,EAAE;IACnD,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;AAClD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.64.0",
|
|
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.",
|