Spaces:
Running
Running
v1.32.51 — campaign missions borrow the whole deployment plan
Browse files- src/main.js +18 -4
- src/story.js +41 -9
- src/updater.js +1 -1
- update.json +6 -6
src/main.js
CHANGED
|
@@ -1194,14 +1194,28 @@ function wire(){
|
|
| 1194 |
mfBindTap($('warBack'),()=>{ sfx('ui');
|
| 1195 |
renderMetaHead(); showFrontScreen('startScreen'); });
|
| 1196 |
mfBindTap($('setupBack'),()=>{ sfx('ui');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1197 |
if(typeof renderWarRoom==='function') renderWarRoom();
|
| 1198 |
showFrontScreen('warScr'); });
|
| 1199 |
mfBindTap($('setupStart'),()=>{
|
| 1200 |
initAudio();
|
| 1201 |
-
|
| 1202 |
-
|
| 1203 |
-
|
| 1204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1205 |
hideFrontScreens(); sfx('ui');
|
| 1206 |
// terrain generation is heavy at this resolution — show it, don't freeze on it
|
| 1207 |
$('loadScr').style.display='flex';
|
|
|
|
| 1194 |
mfBindTap($('warBack'),()=>{ sfx('ui');
|
| 1195 |
renderMetaHead(); showFrontScreen('startScreen'); });
|
| 1196 |
mfBindTap($('setupBack'),()=>{ sfx('ui');
|
| 1197 |
+
/* Battle Setup doubles as an authored mission's brief. Backing out of it is
|
| 1198 |
+
DECLINING the mission, so the borrowed plan comes back here — otherwise
|
| 1199 |
+
the player's next ordinary skirmish quietly ran the mission's map, theme,
|
| 1200 |
+
difficulty and AI slots, and the menu diorama stayed in its biome. */
|
| 1201 |
+
if(typeof storyCampaignRestoreMods==='function'&&storyCampaignRestoreMods()
|
| 1202 |
+
&&typeof storyCampaignSyncSetup==='function') storyCampaignSyncSetup();
|
| 1203 |
if(typeof renderWarRoom==='function') renderWarRoom();
|
| 1204 |
showFrontScreen('warScr'); });
|
| 1205 |
mfBindTap($('setupStart'),()=>{
|
| 1206 |
initAudio();
|
| 1207 |
+
/* "Remember loadout" means the PLAYER'S loadout. An authored campaign
|
| 1208 |
+
mission borrows every field below for the length of its run, so saving
|
| 1209 |
+
here while a preset was on loan wrote the mission's plan over the
|
| 1210 |
+
player's own — permanently, across restarts. That is how one prologue
|
| 1211 |
+
mission authored on theme:'arctic' made the snow biome the saved
|
| 1212 |
+
default and the menu diorama came up in it every launch. */
|
| 1213 |
+
if(!(typeof storyCampaignPlanBorrowed==='function'&&storyCampaignPlanBorrowed())){
|
| 1214 |
+
META.setup={d:difficulty,t:curTheme,m:curMap,f:aiFactionSel,pf:playerFaction,bs:battlefieldPreset,
|
| 1215 |
+
g:goalSel,tl:timeLimit,rp:resPace,cr:crateRate,
|
| 1216 |
+
ps:playerStartZone,ais:aiSlots.map(A=>({on:!!A.on,diff:A.diff|0,zone:A.zone})),
|
| 1217 |
+
df:defenseFocus,inf:infestationOn?1:0}; metaSave(); // remember loadout
|
| 1218 |
+
}
|
| 1219 |
hideFrontScreens(); sfx('ui');
|
| 1220 |
// terrain generation is heavy at this resolution — show it, don't freeze on it
|
| 1221 |
$('loadScr').style.display='flex';
|
src/story.js
CHANGED
|
@@ -767,9 +767,13 @@ function storyCampaignOpenMission(missionId){
|
|
| 767 |
skirmishes — so an authored prologue mission quietly ran with Brittle
|
| 768 |
Frames or Iron Enemy attached and nothing on the card admitted it. An
|
| 769 |
authored mission is authored: it brings its own modifiers or none. */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 770 |
difficulty=m.diff; defenseFocus=m.defense?1:0; infestationOn=!!m.inf; wcChoice=0;
|
| 771 |
-
if(typeof storyCampaignPrevMods==='undefined'||storyCampaignPrevMods===null)
|
| 772 |
-
storyCampaignPrevMods=Object.assign({},META.opmods||{});
|
| 773 |
META.opmods=Object.assign({},m.mods||{});
|
| 774 |
goalSel=m.goal; timeLimit=m.time; resPace=1; crateRate=crateRateBase=1;
|
| 775 |
curMap=m.map; curTheme=m.theme; battlefieldPreset=m.scale;
|
|
@@ -784,16 +788,44 @@ function storyCampaignOpenMission(missionId){
|
|
| 784 |
if(typeof toast==='function') toast(m.code+' · '+m.ttl+' — deployment preset loaded');
|
| 785 |
}
|
| 786 |
|
| 787 |
-
/*
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 794 |
if(typeof metaSave==='function') metaSave();
|
|
|
|
|
|
|
|
|
|
| 795 |
return true;
|
| 796 |
}
|
|
|
|
|
|
|
|
|
|
| 797 |
/* story.js loads after endgame.js, so the wrapper is installed before initOps
|
| 798 |
binds its tab listener. tutorial.js later wraps this wrapper in turn; both
|
| 799 |
additions therefore survive without either feature editing the other. */
|
|
|
|
| 767 |
skirmishes — so an authored prologue mission quietly ran with Brittle
|
| 768 |
Frames or Iron Enemy attached and nothing on the card admitted it. An
|
| 769 |
authored mission is authored: it brings its own modifiers or none. */
|
| 770 |
+
/* Borrow the WHOLE plan before writing any of it. Only META.opmods used to be
|
| 771 |
+
held, so the other fourteen fields below were a permanent clobber of the
|
| 772 |
+
player's own skirmish setup — and one prologue mission is authored on
|
| 773 |
+
theme:'arctic', which is how a player who opened it once found every
|
| 774 |
+
later battle and the menu diorama frozen in the snow biome. */
|
| 775 |
+
storyCampaignBorrowPlan();
|
| 776 |
difficulty=m.diff; defenseFocus=m.defense?1:0; infestationOn=!!m.inf; wcChoice=0;
|
|
|
|
|
|
|
| 777 |
META.opmods=Object.assign({},m.mods||{});
|
| 778 |
goalSel=m.goal; timeLimit=m.time; resPace=1; crateRate=crateRateBase=1;
|
| 779 |
curMap=m.map; curTheme=m.theme; battlefieldPreset=m.scale;
|
|
|
|
| 788 |
if(typeof toast==='function') toast(m.code+' · '+m.ttl+' — deployment preset loaded');
|
| 789 |
}
|
| 790 |
|
| 791 |
+
/* THE PLAYER'S OWN DEPLOYMENT PLAN, held while an authored mission borrows it.
|
| 792 |
+
These are all top-level `let` bindings in the shared scope, not window
|
| 793 |
+
properties, so the snapshot has to name them one at a time — a loop over
|
| 794 |
+
string keys silently reads undefined and hands back a wiped plan. */
|
| 795 |
+
let storyCampaignPrevPlan=null;
|
| 796 |
+
function storyCampaignBorrowPlan(){
|
| 797 |
+
if(storyCampaignPrevPlan) return false; // already borrowed; don't re-snapshot a mission
|
| 798 |
+
storyCampaignPrevPlan={
|
| 799 |
+
difficulty:difficulty, defenseFocus:defenseFocus, infestationOn:infestationOn,
|
| 800 |
+
wcChoice:wcChoice, goalSel:goalSel, timeLimit:timeLimit,
|
| 801 |
+
resPace:resPace, crateRate:crateRate, crateRateBase:crateRateBase,
|
| 802 |
+
curMap:curMap, curTheme:curTheme, battlefieldPreset:battlefieldPreset,
|
| 803 |
+
aiFactionSel:aiFactionSel, playerStartZone:playerStartZone, spawnPick:spawnPick,
|
| 804 |
+
aiSlots:aiSlots.map(A=>({on:A.on,diff:A.diff,zone:A.zone})),
|
| 805 |
+
opmods:Object.assign({},META.opmods||{})
|
| 806 |
+
};
|
| 807 |
+
return true;
|
| 808 |
+
}
|
| 809 |
+
function storyCampaignRestorePlan(){
|
| 810 |
+
const p=storyCampaignPrevPlan;
|
| 811 |
+
if(!p) return false;
|
| 812 |
+
storyCampaignPrevPlan=null;
|
| 813 |
+
difficulty=p.difficulty; defenseFocus=p.defenseFocus; infestationOn=p.infestationOn;
|
| 814 |
+
wcChoice=p.wcChoice; goalSel=p.goalSel; timeLimit=p.timeLimit;
|
| 815 |
+
resPace=p.resPace; crateRate=p.crateRate; crateRateBase=p.crateRateBase;
|
| 816 |
+
curMap=p.curMap; curTheme=p.curTheme; battlefieldPreset=p.battlefieldPreset;
|
| 817 |
+
aiFactionSel=p.aiFactionSel; playerStartZone=p.playerStartZone; spawnPick=p.spawnPick;
|
| 818 |
+
aiSlots.forEach((A,n)=>{ const s=p.aiSlots[n]; if(s){ A.on=s.on; A.diff=s.diff; A.zone=s.zone; } });
|
| 819 |
+
META.opmods=p.opmods;
|
| 820 |
if(typeof metaSave==='function') metaSave();
|
| 821 |
+
/* The menu diorama caches the built theme, so handing curTheme back is not
|
| 822 |
+
enough on its own — the backdrop has to be told to rebuild. */
|
| 823 |
+
if(typeof applyTheme==='function') applyTheme();
|
| 824 |
return true;
|
| 825 |
}
|
| 826 |
+
/* Kept as the name main.js's return-to-menu hook already calls. */
|
| 827 |
+
function storyCampaignRestoreMods(){ return storyCampaignRestorePlan(); }
|
| 828 |
+
function storyCampaignPlanBorrowed(){ return !!storyCampaignPrevPlan; }
|
| 829 |
/* story.js loads after endgame.js, so the wrapper is installed before initOps
|
| 830 |
binds its tab listener. tutorial.js later wraps this wrapper in turn; both
|
| 831 |
additions therefore survive without either feature editing the other. */
|
src/updater.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
| 29 |
============================================================================ */
|
| 30 |
|
| 31 |
/* Bumped by the release script. Compared against the manifest's `version`. */
|
| 32 |
-
const APP_VERSION = '1.32.
|
| 33 |
|
| 34 |
/* Release notes for the PACKAGED build, bumped by the release script beside
|
| 35 |
APP_VERSION and PACKAGED_REV. A device that has never taken an OTA has no
|
|
|
|
| 29 |
============================================================================ */
|
| 30 |
|
| 31 |
/* Bumped by the release script. Compared against the manifest's `version`. */
|
| 32 |
+
const APP_VERSION = '1.32.51';
|
| 33 |
|
| 34 |
/* Release notes for the PACKAGED build, bumped by the release script beside
|
| 35 |
APP_VERSION and PACKAGED_REV. A device that has never taken an OTA has no
|
update.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
{
|
| 2 |
-
"notes": "
|
| 3 |
"files": [
|
| 4 |
{
|
| 5 |
-
"path": "MASSFRONT-v1.32.
|
| 6 |
-
"url": "https://huggingface.co/datasets/CREATORJD/massfront-releases/resolve/
|
| 7 |
-
"size":
|
| 8 |
-
"sha256": "
|
| 9 |
}
|
| 10 |
],
|
| 11 |
"base": "",
|
| 12 |
-
"version": "1.32.
|
| 13 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"notes": "The biome that would not leave \u2014 root cause. Opening an authored campaign mission wrote FIFTEEN fields of your own deployment plan (map, biome, difficulty, goal, time limit, AI faction and slots, start zone, spawn pick, scale, defence focus, infestation) and handed back exactly one of them. One prologue mission is authored on the arctic theme, so opening it once made the snow biome yours forever \u2014 and pressing START persisted it into the saved loadout, so it survived restarts. Missions now borrow the whole plan and give every field back by all three exits: declining the brief, quitting the run, finishing it. Remember-loadout no longer saves a plan that is on loan, and the menu diorama is rebuilt for the restored biome instead of staying cached in the mission's. New gate verifytheme.mjs.",
|
| 3 |
"files": [
|
| 4 |
{
|
| 5 |
+
"path": "MASSFRONT-v1.32.51-update.js",
|
| 6 |
+
"url": "https://huggingface.co/datasets/CREATORJD/massfront-releases/resolve/1942769a564230974ce1b4f5e51289bb88ae0580/MASSFRONT-v1.32.51-update.js?download=true",
|
| 7 |
+
"size": 26976357,
|
| 8 |
+
"sha256": "a2b0882f7d146b4642fc6fdcb9f43878567f8d15bef84b954b3b6f2f7724f81b"
|
| 9 |
}
|
| 10 |
],
|
| 11 |
"base": "",
|
| 12 |
+
"version": "1.32.51"
|
| 13 |
}
|