@shipload/sdk 1.0.0-next.22 → 1.0.0-next.23
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/package.json
CHANGED
|
@@ -18,5 +18,5 @@ export function calc_craft_duration(speed: number, totalInputMass: number): UInt
|
|
|
18
18
|
|
|
19
19
|
export function calc_craft_energy(drain: number, totalInputMass: number): UInt16 {
|
|
20
20
|
const raw = Math.floor((totalInputMass * drain) / CRAFT_ENERGY_DIVISOR)
|
|
21
|
-
return UInt16.from(Math.min(raw, 65535))
|
|
21
|
+
return UInt16.from(Math.min(Math.max(raw, 1), 65535))
|
|
22
22
|
}
|
|
@@ -23,7 +23,7 @@ export function computeEngineCapabilities(stats: Record<string, number>): {
|
|
|
23
23
|
|
|
24
24
|
return {
|
|
25
25
|
thrust: 400 + Math.floor((vol * 3) / 4),
|
|
26
|
-
drain: Math.max(30, 50 - Math.floor(thm / 70)),
|
|
26
|
+
drain: 2 * Math.max(30, 50 - Math.floor(thm / 70)),
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -35,8 +35,8 @@ export function computeGeneratorCapabilities(stats: Record<string, number>): {
|
|
|
35
35
|
const ref = stats.reflectivity
|
|
36
36
|
|
|
37
37
|
return {
|
|
38
|
-
capacity:
|
|
39
|
-
recharge: 1 + Math.floor((ref * 3) / 1000),
|
|
38
|
+
capacity: 950 + Math.floor(res / 2),
|
|
39
|
+
recharge: 2 * (1 + Math.floor((ref * 3) / 1000)),
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -82,7 +82,7 @@ export function computeGathererCapabilities(
|
|
|
82
82
|
|
|
83
83
|
return {
|
|
84
84
|
yield: 200 + str,
|
|
85
|
-
drain: Math.max(250, 1250 - Math.floor((con * 25) / 20)),
|
|
85
|
+
drain: 2 * Math.max(250, 1250 - Math.floor((con * 25) / 20)),
|
|
86
86
|
depth: gathererDepthForTier(tol, tier),
|
|
87
87
|
}
|
|
88
88
|
}
|
package/src/nft/description.ts
CHANGED
|
@@ -48,12 +48,12 @@ export function computeBaseCapacityWarehouse(stats: bigint): number {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export const computeEngineThrust = (vol: number): number => 400 + idiv(vol * 3, 4)
|
|
51
|
-
export const computeEngineDrain = (thm: number): number => Math.max(30, 50 - idiv(thm, 70))
|
|
52
|
-
export const computeGeneratorCap = (com: number): number =>
|
|
53
|
-
export const computeGeneratorRech = (fin: number): number => 1 + idiv(fin * 3, 1000)
|
|
51
|
+
export const computeEngineDrain = (thm: number): number => 2 * Math.max(30, 50 - idiv(thm, 70))
|
|
52
|
+
export const computeGeneratorCap = (com: number): number => 950 + idiv(com, 2)
|
|
53
|
+
export const computeGeneratorRech = (fin: number): number => 2 * (1 + idiv(fin * 3, 1000))
|
|
54
54
|
export const computeGathererYield = (str: number): number => 200 + str
|
|
55
55
|
export const computeGathererDrain = (con: number): number =>
|
|
56
|
-
Math.max(250, 1250 - idiv(con * 25, 20))
|
|
56
|
+
2 * Math.max(250, 1250 - idiv(con * 25, 20))
|
|
57
57
|
export const computeGathererDepth = (tol: number, tier: number): number =>
|
|
58
58
|
gathererDepthForTier(tol, tier)
|
|
59
59
|
export const computeLoaderMass = (ins: number): number => Math.max(200, 2000 - ins * 2)
|