Compare commits

...

3 Commits

Author SHA1 Message Date
fdd95af287 Merge pull request 'fix: suppress non-ReCKoning projects during endgame (#128, #130)' (#189) from fix/endgame-project-suppression-v2 into main 2026-04-15 10:47:13 +00:00
673c09f0a7 fix: suppress non-ReCKoning projects during endgame (#128, #130)
Some checks are pending
Accessibility Checks / a11y-audit (pull_request) Waiting to run
Smoke Test / smoke (pull_request) Waiting to run
- Add isEndgame() helper to detect endgame conditions
- Skip non-ReCKoning project activation in checkProjects() during endgame
- Filter out non-ReCKoning projects in renderProjects() during endgame

Closes #128, closes #130
2026-04-15 10:45:41 +00:00
9375a4c07e Merge pull request 'polish: add building/project descriptions to tooltip system' (#187) from beacon/polish-tooltip-descriptions into main
Merged tooltip descriptions
2026-04-15 08:46:46 +00:00

View File

@@ -111,6 +111,15 @@ function updateRates() {
}
// === CORE FUNCTIONS ===
/**
* Check if player has reached the ReCKoning endgame.
* Conditions: totalRescues >= 100000, pactFlag === 1, harmony > 50
*/
function isEndgame() {
return G.totalRescues >= 100000 && G.pactFlag === 1 && G.harmony > 50;
}
/**
* Main game loop tick, called every 100ms.
*/
@@ -337,6 +346,11 @@ function checkMilestones() {
function checkProjects() {
// Check for new project triggers
for (const pDef of PDEFS) {
// Skip non-ReCKoning projects during endgame
if (isEndgame() && !pDef.id.startsWith('p_reckoning_')) {
continue;
}
const alreadyPurchased = G.completedProjects && G.completedProjects.includes(pDef.id);
if (!alreadyPurchased && !G.activeProjects) G.activeProjects = [];
@@ -1173,7 +1187,12 @@ function renderProjects() {
// Show available projects
if (G.activeProjects) {
for (const id of G.activeProjects) {
// Filter out non-ReCKoning projects during endgame
const projectsToShow = isEndgame()
? G.activeProjects.filter(id => id.startsWith('p_reckoning_'))
: G.activeProjects;
for (const id of projectsToShow) {
const pDef = PDEFS.find(p => p.id === id);
if (!pDef) continue;