@shipload/sdk 1.0.0-next.47 → 1.0.0-next.48
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/lib/shipload.d.ts +29 -3
- package/lib/shipload.js +226 -194
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +226 -195
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.d.ts +9 -0
- package/lib/testing.js +43 -13
- package/lib/testing.js.map +1 -1
- package/lib/testing.m.js +43 -13
- package/lib/testing.m.js.map +1 -1
- package/package.json +1 -1
- package/src/contracts/server.ts +28 -1
- package/src/data/items.json +11 -11
- package/src/data/kind-registry.json +1 -1
- package/src/data/metadata.ts +1 -1
- package/src/data/recipes-runtime.ts +1 -0
- package/src/data/recipes.json +154 -180
- package/src/derivation/crafting.ts +1 -1
- package/src/derivation/index.ts +1 -0
- package/src/derivation/upgrades.ts +14 -0
- package/src/index-module.ts +2 -0
- package/src/managers/actions.ts +19 -0
- package/src/nft/description.ts +1 -1
- package/src/types.ts +3 -0
package/src/managers/actions.ts
CHANGED
|
@@ -447,6 +447,25 @@ export class ActionsManager extends BaseManager {
|
|
|
447
447
|
})
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
+
upgrade(
|
|
451
|
+
builderId: UInt64Type,
|
|
452
|
+
targetId: UInt64Type,
|
|
453
|
+
targetItemId: UInt16Type,
|
|
454
|
+
inputs: ServerContract.ActionParams.Type.cargo_item[],
|
|
455
|
+
slot?: UInt8Type
|
|
456
|
+
): Action {
|
|
457
|
+
const params: ServerContract.ActionParams.upgrade = {
|
|
458
|
+
builder_id: UInt64.from(builderId),
|
|
459
|
+
target_id: UInt64.from(targetId),
|
|
460
|
+
target_item_id: UInt16.from(targetItemId),
|
|
461
|
+
inputs,
|
|
462
|
+
}
|
|
463
|
+
if (slot !== undefined) {
|
|
464
|
+
params.slot = UInt8.from(slot)
|
|
465
|
+
}
|
|
466
|
+
return this.server.action('upgrade', params)
|
|
467
|
+
}
|
|
468
|
+
|
|
450
469
|
claimplot(entityId: UInt64Type, targetItemId: UInt16Type, slot: ClusterSlotType): Action {
|
|
451
470
|
return this.server.action('claimplot', {
|
|
452
471
|
builder_id: UInt64.from(entityId),
|
package/src/nft/description.ts
CHANGED
|
@@ -104,7 +104,7 @@ export const computeBatteryBankCapacity = (
|
|
|
104
104
|
export function entityDisplayName(itemId: number): string {
|
|
105
105
|
switch (itemId) {
|
|
106
106
|
case ITEM_SHIP_T1_PACKED:
|
|
107
|
-
return '
|
|
107
|
+
return 'Roustabout'
|
|
108
108
|
case ITEM_WAREHOUSE_T1_PACKED:
|
|
109
109
|
return 'Warehouse'
|
|
110
110
|
case ITEM_EXTRACTOR_T1_PACKED:
|
package/src/types.ts
CHANGED
|
@@ -64,6 +64,8 @@ export enum TaskType {
|
|
|
64
64
|
DEMOLISH = 13,
|
|
65
65
|
CLAIMPLOT = 14,
|
|
66
66
|
BUILDPLOT = 15,
|
|
67
|
+
CHARGE = 16,
|
|
68
|
+
UPGRADE = 17,
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
export enum HoldKind {
|
|
@@ -71,6 +73,7 @@ export enum HoldKind {
|
|
|
71
73
|
PUSH = 2,
|
|
72
74
|
GATHER = 3,
|
|
73
75
|
BUILD = 4,
|
|
76
|
+
UPGRADE = 6,
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
export enum LocationType {
|