@aephia/atlas-kit 0.8.0-next.13 → 0.8.0-next.15
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/dist/client/deployments.d.ts +1 -1
- package/dist/client/deployments.js +1 -1
- package/dist/crafting/actions/habs.d.ts +133 -0
- package/dist/crafting/actions/habs.d.ts.map +1 -1
- package/dist/crafting/actions/habs.js +498 -10
- package/dist/crafting/actions/habs.js.map +1 -1
- package/dist/crafting/actions/index.d.ts +1 -1
- package/dist/crafting/actions/index.d.ts.map +1 -1
- package/dist/crafting/actions/index.js +1 -1
- package/dist/crafting/actions/index.js.map +1 -1
- package/dist/internal/c4/crafting-hab-storage.d.ts +13 -0
- package/dist/internal/c4/crafting-hab-storage.d.ts.map +1 -1
- package/dist/internal/c4/crafting-hab-storage.js +47 -1
- package/dist/internal/c4/crafting-hab-storage.js.map +1 -1
- package/dist/internal/c4/discriminators.d.ts +3 -0
- package/dist/internal/c4/discriminators.d.ts.map +1 -1
- package/dist/internal/c4/discriminators.js +7 -1
- package/dist/internal/c4/discriminators.js.map +1 -1
- package/dist/internal/c4/runtime-bindings.d.ts +1 -1
- package/dist/internal/c4/runtime-bindings.d.ts.map +1 -1
- package/dist/internal/c4/runtime-bindings.js +1 -1
- package/dist/internal/c4/runtime-bindings.js.map +1 -1
- package/dist/internal/planning/authorization-adapter.d.ts +36 -0
- package/dist/internal/planning/authorization-adapter.d.ts.map +1 -1
- package/dist/internal/planning/authorization-adapter.js +62 -1
- package/dist/internal/planning/authorization-adapter.js.map +1 -1
- package/dist/internal/planning/crafting-hab-storage-actions.d.ts +6 -6
- package/dist/internal/planning/crafting-hab-storage-actions.d.ts.map +1 -1
- package/dist/internal/planning/crafting-hab-storage-actions.js +22 -7
- package/dist/internal/planning/crafting-hab-storage-actions.js.map +1 -1
- package/dist/internal/planning/profile-storage-funding-guard.d.ts +1 -1
- package/dist/internal/planning/profile-storage-funding-guard.d.ts.map +1 -1
- package/dist/internal/planning/profile-storage-funding-guard.js +8 -1
- package/dist/internal/planning/profile-storage-funding-guard.js.map +1 -1
- package/dist/internal/planning/runtime-guards.d.ts.map +1 -1
- package/dist/internal/planning/runtime-guards.js +30 -2
- package/dist/internal/planning/runtime-guards.js.map +1 -1
- package/dist/internal/planning/storage-action-readers.d.ts.map +1 -1
- package/dist/internal/planning/storage-action-readers.js +1 -0
- package/dist/internal/planning/storage-action-readers.js.map +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ export declare const ZINK_PTR_PROGRAM_ADDRESSES: SageProgramAddresses;
|
|
|
25
25
|
* ctx.selectedReferenceRelease === ZINK_PTR_SELECTED_REFERENCE_RELEASE;
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export declare const ZINK_PTR_SELECTED_REFERENCE_RELEASE = "
|
|
28
|
+
export declare const ZINK_PTR_SELECTED_REFERENCE_RELEASE = "7587ebd8e265b1702b16b97d1216c8d86cca658f470252bd62073acbbd85b368";
|
|
29
29
|
/** Mints of the Game's token resources on z.ink PTR. They never change on PTR;
|
|
30
30
|
* another deployment uses its own mints. Find the matching cargo definition by
|
|
31
31
|
* `mint`, as cargo ids are Game definition rows.
|
|
@@ -28,7 +28,7 @@ export const ZINK_PTR_PROGRAM_ADDRESSES = Object.freeze({
|
|
|
28
28
|
* ctx.selectedReferenceRelease === ZINK_PTR_SELECTED_REFERENCE_RELEASE;
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export const ZINK_PTR_SELECTED_REFERENCE_RELEASE = '
|
|
31
|
+
export const ZINK_PTR_SELECTED_REFERENCE_RELEASE = '7587ebd8e265b1702b16b97d1216c8d86cca658f470252bd62073acbbd85b368';
|
|
32
32
|
/** Mints of the Game's token resources on z.ink PTR. They never change on PTR;
|
|
33
33
|
* another deployment uses its own mints. Find the matching cargo definition by
|
|
34
34
|
* `mint`, as cargo ids are Game definition rows.
|
|
@@ -182,5 +182,138 @@ export declare function planTopUpCraftingHabRent(ctx: SageContext, hab: Crafting
|
|
|
182
182
|
* ```
|
|
183
183
|
*/
|
|
184
184
|
export declare function planDeconstructCraftingHab(ctx: SageContext, hab: CraftingHabSnapshot, input: PlanDeconstructCraftingHabOptions): Promise<Plan>;
|
|
185
|
+
/** One building addition or removal in a Crafting Hab design.
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* const change: CraftingHabBuildingChange = {
|
|
189
|
+
* buildingId: 3,
|
|
190
|
+
* kind: 'add',
|
|
191
|
+
* quantity: 1,
|
|
192
|
+
* };
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
export interface CraftingHabBuildingChange {
|
|
196
|
+
readonly buildingId: number;
|
|
197
|
+
readonly kind: 'add' | 'remove';
|
|
198
|
+
/** A positive count of buildings to add or remove. */
|
|
199
|
+
readonly quantity: number;
|
|
200
|
+
}
|
|
201
|
+
/** Inputs for recording building changes in a Crafting Hab's design.
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* declare const authorization: PlanAuthorization;
|
|
205
|
+
* declare const starbasePlayer: CraftingHabStarbasePlayer;
|
|
206
|
+
* const options: PlanCraftingHabBuildingChangesOptions = {
|
|
207
|
+
* authorization,
|
|
208
|
+
* starbasePlayer,
|
|
209
|
+
* buildingChanges: [{ buildingId: 3, kind: 'add', quantity: 1 }],
|
|
210
|
+
* };
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
export interface PlanCraftingHabBuildingChangesOptions {
|
|
214
|
+
readonly authorization: PlanAuthorization;
|
|
215
|
+
/** The authorization Profile's Starbase Player in the Hab's System. */
|
|
216
|
+
readonly starbasePlayer: CraftingHabStarbasePlayer;
|
|
217
|
+
/** A non-empty list with one change per building id. */
|
|
218
|
+
readonly buildingChanges: readonly CraftingHabBuildingChange[];
|
|
219
|
+
}
|
|
220
|
+
/** Inputs for finalizing a Crafting Hab's building design.
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* declare const authorization: PlanAuthorization;
|
|
224
|
+
* declare const starbasePlayer: CraftingHabStarbasePlayer;
|
|
225
|
+
* const options: PlanFinalizeCraftingHabBuildingChangesOptions = {
|
|
226
|
+
* authorization,
|
|
227
|
+
* starbasePlayer,
|
|
228
|
+
* };
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
export interface PlanFinalizeCraftingHabBuildingChangesOptions {
|
|
232
|
+
readonly authorization: PlanAuthorization;
|
|
233
|
+
/** The authorization Profile's Starbase Player in the Hab's System, which
|
|
234
|
+
* supplies construction cargo and crew and receives refunds. */
|
|
235
|
+
readonly starbasePlayer: CraftingHabStarbasePlayer;
|
|
236
|
+
}
|
|
237
|
+
/** Inputs for cancelling a Crafting Hab's pending building design.
|
|
238
|
+
* @example
|
|
239
|
+
* ```ts
|
|
240
|
+
* declare const authorization: PlanAuthorization;
|
|
241
|
+
* declare const starbasePlayer: CraftingHabStarbasePlayer;
|
|
242
|
+
* const options: PlanCancelCraftingHabBuildingChangesOptions = {
|
|
243
|
+
* authorization,
|
|
244
|
+
* starbasePlayer,
|
|
245
|
+
* };
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
export interface PlanCancelCraftingHabBuildingChangesOptions {
|
|
249
|
+
readonly authorization: PlanAuthorization;
|
|
250
|
+
/** The authorization Profile's Starbase Player in the Hab's System. */
|
|
251
|
+
readonly starbasePlayer: CraftingHabStarbasePlayer;
|
|
252
|
+
}
|
|
253
|
+
/** Plans recording building additions and removals in a Crafting Hab's design.
|
|
254
|
+
*
|
|
255
|
+
* An Active Hab enters Design; a Hab already in Design adds these changes to
|
|
256
|
+
* the ones it records. The game records the changes without checking them and
|
|
257
|
+
* applies its building rules only at finalization, so the planner refuses a
|
|
258
|
+
* design that could never finalize: an unknown building, a removal beyond the
|
|
259
|
+
* buildings placed, a building above the Hab's tier, a second hub type or one
|
|
260
|
+
* that does not match the Hab's, a building tag nothing provides, or more
|
|
261
|
+
* slots than the Hab has. It warns instead about what the Profile can still
|
|
262
|
+
* fix before finalizing: research the Character lacks, and the crew and
|
|
263
|
+
* construction cargo the Starbase Player must hold. The game accepts several
|
|
264
|
+
* copies of the matching hub, so adding one warns rather than refuses.
|
|
265
|
+
*
|
|
266
|
+
* The Hab must not be under construction or running Crafting Processes, and
|
|
267
|
+
* its rent must be current. The Profile funds the design's storage growth.
|
|
268
|
+
* Concurrent design changes remain chain-authoritative.
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```ts
|
|
272
|
+
* declare const ctx: SageContext;
|
|
273
|
+
* declare const hab: CraftingHabSnapshot;
|
|
274
|
+
* declare const options: PlanCraftingHabBuildingChangesOptions;
|
|
275
|
+
* const plan = await planCraftingHabBuildingChanges(ctx, hab, options);
|
|
276
|
+
* console.log(plan.describe());
|
|
277
|
+
* ```
|
|
278
|
+
*/
|
|
279
|
+
export declare function planCraftingHabBuildingChanges(ctx: SageContext, hab: CraftingHabSnapshot, input: PlanCraftingHabBuildingChangesOptions): Promise<Plan>;
|
|
280
|
+
/** Plans finalizing a Crafting Hab's building design.
|
|
281
|
+
*
|
|
282
|
+
* The game applies the design: it checks the final layout's tier, hub type,
|
|
283
|
+
* building tags and slots and the Character's research for every building in
|
|
284
|
+
* it, takes construction cargo from the Starbase Player and returns removed
|
|
285
|
+
* buildings' refunds to it, reserves or releases the crew the layout needs,
|
|
286
|
+
* and starts construction. The planner
|
|
287
|
+
* refuses any of those the game would refuse, and a crew or cargo shortfall
|
|
288
|
+
* it can see; a Building Legacy rank discounts construction cargo, so a
|
|
289
|
+
* shortfall against the full cost only warns when the Character holds one.
|
|
290
|
+
*
|
|
291
|
+
* The Hab must be in Design, running no Crafting Processes, and its rent
|
|
292
|
+
* current. Finalization can draw Profile storage this Plan does not bound: a
|
|
293
|
+
* refund can open a Starbase Player cargo line, and new buildings grow the
|
|
294
|
+
* Hab, which the program funds from the Profile vault, so simulate before
|
|
295
|
+
* signing.
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```ts
|
|
299
|
+
* declare const ctx: SageContext;
|
|
300
|
+
* declare const hab: CraftingHabSnapshot;
|
|
301
|
+
* declare const options: PlanFinalizeCraftingHabBuildingChangesOptions;
|
|
302
|
+
* const plan = await planFinalizeCraftingHabBuildingChanges(ctx, hab, options);
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
export declare function planFinalizeCraftingHabBuildingChanges(ctx: SageContext, hab: CraftingHabSnapshot, input: PlanFinalizeCraftingHabBuildingChangesOptions): Promise<Plan>;
|
|
306
|
+
/** Plans cancelling a Crafting Hab's pending building design, returning the
|
|
307
|
+
* Hab to Active with its buildings unchanged. Its rent must be current.
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```ts
|
|
311
|
+
* declare const ctx: SageContext;
|
|
312
|
+
* declare const hab: CraftingHabSnapshot;
|
|
313
|
+
* declare const options: PlanCancelCraftingHabBuildingChangesOptions;
|
|
314
|
+
* const plan = await planCancelCraftingHabBuildingChanges(ctx, hab, options);
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
317
|
+
export declare function planCancelCraftingHabBuildingChanges(ctx: SageContext, hab: CraftingHabSnapshot, input: PlanCancelCraftingHabBuildingChangesOptions): Promise<Plan>;
|
|
185
318
|
export {};
|
|
186
319
|
//# sourceMappingURL=habs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"habs.d.ts","sourceRoot":"","sources":["../../../src/crafting/actions/habs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAkBzE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AAMpC,OAAO,
|
|
1
|
+
{"version":3,"file":"habs.d.ts","sourceRoot":"","sources":["../../../src/crafting/actions/habs.ts"],"names":[],"mappings":"AAAA,OAAO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