Skip to content

Commit 2eb8277

Browse files
committed
bump version to 1.0.529 and enhance power reporting functionality in space explorer
1 parent 4436d8d commit 2eb8277

4 files changed

Lines changed: 24 additions & 7 deletions

File tree

assets/js/version.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "idlegames",
3-
"version": "1.0.528",
3+
"version": "1.0.529",
44
"description": "IdleGames PWA build tooling and deployment scripts.",
55
"author": "Timeless Prototype",
66
"license": "MIT",

space-explorer-v2.html

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,6 +2903,18 @@ <h2 id="gameMenuTitle">GAME MENU</h2>
29032903
return gain;
29042904
}
29052905

2906+
function powerTotalValue() {
2907+
return safeNumber(state.power, 0) * powerCoreCount();
2908+
}
2909+
2910+
function formatPowerReportLine() {
2911+
const perCorePct = Math.round(safeNumber(state.power, 0));
2912+
const cores = powerCoreCount();
2913+
const total = Math.round(powerTotalValue());
2914+
if (cores <= 1) return `Power: ${perCorePct}%`;
2915+
return `Power: ${total}% total (${perCorePct}% per core x${cores})`;
2916+
}
2917+
29062918
function boostPower(showPanel = false) {
29072919
const gain = applyPowerCharge(15, 120);
29082920
markDirty();
@@ -4919,7 +4931,9 @@ <h2 id="gameMenuTitle">GAME MENU</h2>
49194931
},
49204932
anomalyTarget,
49214933
systems: {
4922-
power: Math.round(state.power),
4934+
power: Math.round(powerTotalValue()),
4935+
powerPerCorePct: Math.round(state.power),
4936+
powerCoreCount: powerCoreCount(),
49234937
oxygen: Math.round(state.oxygen),
49244938
hull: Math.round(state.hull),
49254939
heat: Math.round(state.heat),
@@ -5250,6 +5264,7 @@ <h2 id="gameMenuTitle">GAME MENU</h2>
52505264
'- use_station_action requires args.action_key (example: cargo.sell.rations).',
52515265
'- Elevators: action use_elevator with direction up/down to move between decks.',
52525266
'- Throttle: use set_throttle with args.percent (0-100). Engine must be online to gain speed.',
5267+
'- Power reporting: State.systems.power is the summed total across all Power Cores; State.systems.powerPerCorePct is the per-core percentage.',
52535268
'- Layout: build_module adds a module at the end of a corridor; requires args.module_type + args.corridor_key (pick from “Valid corridor_key values”).',
52545269
'- build_module: module_type must be from “Module types”; non-structural modules require a Fabricator and an unlocked blueprint.',
52555270
'- build_module: if the module is locked, run sensors_deep_scan to unlock; if you need a second copy, set args.allow_duplicate=true.',
@@ -12578,7 +12593,9 @@ <h2 id="gameMenuTitle">GAME MENU</h2>
1257812593
inventory: state.inventory,
1257912594
powerProfile: state.powerProfile,
1258012595
stats: {
12581-
power: state.power,
12596+
power: powerTotalValue(),
12597+
powerPerCorePct: state.power,
12598+
powerCoreCount: powerCoreCount(),
1258212599
oxygen: state.oxygen,
1258312600
heat: state.heat,
1258412601
hull: state.hull,
@@ -12813,7 +12830,7 @@ <h2 id="gameMenuTitle">GAME MENU</h2>
1281312830

1281412831
function shipStatusReport() {
1281512832
const lines = [
12816-
`Power: ${Math.round(state.power)}%`,
12833+
formatPowerReportLine(),
1281712834
`Oxygen: ${Math.round(state.oxygen)}%`,
1281812835
`Hull: ${Math.round(state.hull)}/${Math.round(state.hullMax)}`,
1281912836
`Heat: ${Math.round(state.heat)}%`,

0 commit comments

Comments
 (0)