Pie in the Sky: government money for rocket companies

A Gov tab in Pie Control with three state programmes:

- Rural Digital Pie Fund: reverse auctions for towns only orbit reaches
  (a cut-off POP on backhaul, or a small town of your terminals). Ask
  90%, 70% or 50% of the reserve against a rival; the lower ask is paid
  monthly for five years while the town stays 70% served (monthly
  average) from a 90-day deadline. One bad month warns, two revoke the
  award and claw back half of the last year's support.
- Ex-Im Pie Bank: a BANKS loan of half the value of the pies flying and
  booked (at most 20% of a full Shortcrust, counted by O7), 1.5-2.5%
  over 60 months, never offered by the usual banks. Space covenants:
  launch n pies in a year, keep a pie dish in the lending country. A
  breach brings the bank's penalty, +3 points, a new launch deadline
  and, with chaos on, a "data stays home" or landing-rights spat there.
- Pitcairn: served from orbit (backhaul or home terminals) at 90% of its
  demand, latency forgiven, the UK pays a $120k/mo satellite grant.

Subsidies count in the orbit's books. tests/pie-gov.test.js covers the
features; pie-balance.test.js gains a run with government money, which
must pay back sooner by at most two years.
This commit is contained in:
Frederic Jung 2026-11-04 11:12:49 +01:00
parent 1de0723c35
commit 8b92adcaa8
No known key found for this signature in database
23 changed files with 719 additions and 27 deletions

View file

@ -18,6 +18,8 @@ const BANKS={
ppp:{name:'Peer Pressure Partners',col:'#00897B',min:'B',amt:[2,5],term:[24,36],covs:['nocache'],model:'transit',blurb:tr('banks.you_repay_with_30_of_your')},
astro:{name:'Horoscope Holdings',col:'#5E35B1',min:'CCC',apr:[.02,.3],amt:[1,4],term:[12,24],covs:['friday','nobude'],model:'astro',blurb:tr('banks.your_rate_is_set_by_the')},
pizza:{name:'Papa Pizza Capital',col:'#FF7043',min:'BB',apr:[.03,.05],amt:[1,3],term:[12,24],covs:['pizza'],blurb:tr('banks.the_cheapest_money_in_town_there')},
// The rocket company's state lender: never calls on its own, offered in Pie Control (99-pie-subsidies.js), sized there.
exim:{name:'Ex-Im Pie Bank',col:'#1565C0',min:'C',apr:[.015,.025],amt:[0,0],term:[60,60],covs:['pielaunch','piedish'],pie:true,blurb:tr('banks.exim_blurb')},
shark:{name:'Loan Shark Telecom Finance',col:'#37474F',min:'C',apr:[.6,.9],amt:[1,2],term:[4,8],covs:[],shark:true,blurb:tr('banks.always_open_ask_no_questions_do')},
};
const RATINGS=['C','CCC','B','BB','BBB','A','AA','AAA'];
@ -49,10 +51,13 @@ const COVS={
nephew:{l:tr('banks.give_our_ceo_s_nephew_a'),fee:3000,ok:()=>true},
yacht:{l:tr('banks.our_chairman_needs_a_yacht_for'),fee:8000,ok:()=>true},
pizza:{l:tr('banks.pizza_for_the_whole_noc_after'),each:400,ok:()=>true},
// The Ex-Im Pie Bank's space covenants: their numbers live on the loan (l.pie).
pielaunch:{l:l=>l&&l.pie?tr('banks.exim_launch_n_pies_by',{n:l.pie.n,d:dateStr(l.pie.by),f:Math.min(l.pie.flown,l.pie.n)}):tr('banks.exim_launch_pies'),ok:l=>pieEximLaunchOk(l)},
piedish:{l:l=>tr('banks.exim_keep_a_dish_in',{a:l&&l.pie?pieLicCountry(l.pie.cc):'?'}),ok:l=>pieEximDishOk(l)},
blitz:{l:tr('banks.open_a_new_pop_at_least'),ok:l=>S.day-Math.max(l.start,...Object.values(S.pops).map(p=>p.day||0))<=90},
};
// Conditions read with their price filled in; some cost money every month, one costs money per incident.
const covLabel=c=>COVS[c]?COVS[c].l.replace('{price}',fmt$(COVS[c].fee||COVS[c].each||0)):c;
const covLabel=(c,l)=>{const C=COVS[c];return !C?c:typeof C.l==='function'?C.l(l):C.l.replace('{price}',fmt$(C.fee||C.each||0));};
const loanFees=l=>(l.covs||[]).reduce((a,c)=>a+((COVS[c]&&COVS[c].fee)||0),0);
// Good terms are for good credit: every notch below AAA adds to the rate.
const RATE_PREM={AAA:0,AA:.005,A:.01,BBB:.02,BB:.04,B:.07,CCC:.12,C:.2};
@ -67,7 +72,7 @@ function rating(){if(!S)return 'BB';const rev=R.revMo||0,pay=(R.cost&&R.cost.loa
const rIdx=r=>RATINGS.indexOf(r);
function annuity(P,apr,n){const r=apr/12;return r?P*r/(1-Math.pow(1+r,-n)):P/n;}
function spawnLoanOffer(emergency){
const rt=rating(),keys=Object.keys(BANKS).filter(k=>rIdx(rt)>=rIdx(BANKS[k].min)&&!S.loanOffers.some(o=>o.bank===k)&&!(BANKS[k].equity&&S.loans.some(l=>l.bank===k)));
const rt=rating(),keys=Object.keys(BANKS).filter(k=>rIdx(rt)>=rIdx(BANKS[k].min)&&!S.loanOffers.some(o=>o.bank===k)&&!(BANKS[k].equity&&S.loans.some(l=>l.bank===k))&&!BANKS[k].pie);
let pool=emergency?keys.filter(k=>['shark','gov','crypto','vult','rev','spk','astro','balloon'].includes(k)):keys.filter(k=>k!=='shark');if(!pool.length)pool=keys;if(!pool.length)return;
const k=pick(pool),B=BANKS[k],base=Math.max(60000,R.revMo||0),ra=(a)=>a[0]+Math.random()*(a[1]-a[0]);
const amount=niceAmt(base*ra(B.amt)*(emergency?0.6:1)),o={id:uid(),bank:k,amount,exp:S.day+(emergency?10:25),covs:B.covs.slice()};
@ -105,10 +110,10 @@ function loanTick(d){
const broken=l.covs.filter(c=>COVS[c]&&!COVS[c].ok(l));
if(d-l.start<15||!broken.length){l.breach=0;continue;}
l.breach=(l.breach||0)+1;
if(l.breach===1)toast(tr('banks.bank_is_unhappy_you_broke_a',{bank:esc(B.name),cond:esc(covLabel(broken[0]))}),'bad',[{l:tr('common.open_bank'),act:'bank',args:{}}]);
if(l.breach===1)toast(tr('banks.bank_is_unhappy_you_broke_a',{bank:esc(B.name),cond:esc(covLabel(broken[0],l))}),'bad',[{l:tr('common.open_bank'),act:'bank',args:{}}]);
if(l.breach===10||(l.breach>10&&(l.breach-10)%30===0)){
if(B.equity){l.share=+(l.share+0.02).toFixed(3);toast(tr('banks.bank_are_circling_they_now_take',{bank:esc(B.name),pct:pct(l.share)}),'bad');}
else{const fee=Math.round(l.bal*0.05);l.bal+=fee;l.pay=Math.round(annuity(l.bal,l.apr,Math.max(1,l.left)));S.loanStrikes=(S.loanStrikes||0)+1;toast(tr('banks.penalty_from_bank_fee_added_to',{bank:esc(B.name),fee:fmt$(fee),pay:fmt$(l.pay)}),'bad');}
else{const fee=Math.round(l.bal*0.05);l.bal+=fee;l.pay=Math.round(annuity(l.bal,l.apr,Math.max(1,l.left)));S.loanStrikes=(S.loanStrikes||0)+1;toast(tr('banks.penalty_from_bank_fee_added_to',{bank:esc(B.name),fee:fmt$(fee),pay:fmt$(l.pay)}),'bad');if(B.pie)pieEximBreach(l,broken);}
sfx('err');}}
// monthly statement: payments already leave your cash daily as part of costs
for(const l of S.loans.slice()){const B0=BANKS[l.bank];if(B0.equity||!monthiversary(l.start,d))continue;

View file

@ -2,4 +2,11 @@
islanders are online through you: a POP with broadband, up and nearly fully served. */
const GRANT_MO=300000;
const grantOn=r=>!!(S&&S.pops.pcn&&S.pops.pcn.bb&&!(S.pops.pcn.down>S.day)&&sfOf(r,'pcn')>=0.9);
function grantFact(c){if(c!=='pcn')return '';const on=grantOn(R);return `<span class="fact${on?' mine':''}">${on?tr('pitcairn.uk_grant_mo',{mo:fmt$(GRANT_MO)}):tr('pitcairn.uk_grant_mo_once_islanders',{mo:fmt$(GRANT_MO)})}</span>`;}
/* Satellite tier: Pitcairn online through your pies (its POP on backhaul, or home terminals there) is good enough for the
UK at a lower bar, orbit's latency forgiven (sfOf() counts it, so the fiber grant never comes), for less money. */
const GRANT_SKY_MO=120000,GRANT_SKY_Q=0.9;
function grantSky(r){if(!S||!S.pie||!r||!r.pie||grantOn(r))return false;const p=S.pops.pcn;
if(p&&p.bb&&!(p.down>S.day)&&r.pie.bh.some(b=>b.city==='pcn'&&b.g>0)){const d=r.cityDem.pcn||0;if(d>1e-6&&(r.citySrv.pcn||0)/d>=GRANT_SKY_Q)return true;}
return S.biz.some(b=>b.city==='pcn'&&b.type==='pizza'&&(r.pie.sf[b.id]||0)>=GRANT_SKY_Q);}
function grantFact(c){if(c!=='pcn')return '';const on=grantOn(R),sky=!on&&grantSky(R);
return `<span class="fact${on||sky?' mine':''}">${on?tr('pitcairn.uk_grant_mo',{mo:fmt$(GRANT_MO)}):sky?tr('pitcairn.uk_sky_grant_mo',{mo:fmt$(GRANT_SKY_MO),full:fmt$(GRANT_MO)}):tr('pitcairn.uk_grant_mo_once_islanders',{mo:fmt$(GRANT_MO)})}</span>`;}

View file

@ -18,7 +18,7 @@
- book.earned: revenue from orbit, for the customers that come with routing. */
function pieBlank(day){const crusts={};for(const id in CRUSTS)crusts[id]={cohorts:[],queued:0};
return {born:day,co:null,fac:false,stock:0,rd:{reuse:false,heavy:false,heavyTests:0},pads:[],crusts,dishes:[],lic:{},q:[],
founder:{posts:[],promises:0,broken:0,due:[]},book:{spent:0,earned:0,wouldHave:0},spat:{},safe:false};}
founder:{posts:[],promises:0,broken:0,due:[]},book:{spent:0,earned:0,wouldHave:0},spat:{},safe:false,gov:pieGovBlank()};}
function pieInit(){if(!S.pie)S.pie=pieBlank(S.day);return S.pie;}
// The unlock: only on the Tier 1 transition of a save of this version, and only in a normal game.
function pieUnlock(){if(S.pie||!(S.pieV>=1)||S.mode!=='normal'||S.scn)return;pieInit();track('pie_unlock');
@ -107,7 +107,7 @@ function pieDay(d){const P=S.pie;if(!P)return;
function pieTier(){const P=S.pie,t1=pieT1();if(P.t1&&!t1&&P.q.length&&!S.stats.pieTour){S.stats.pieTour=1;pieFounder(N_('pie.fp_tour'));}P.t1=t1;}
/* The save gate for S.pie: everything clamped, unknown crusts, rockets and cities dropped, pads and dishes only where a
POP is. A save without pieV (older versions) never unlocks it; puzzles, scenarios and the Architect never have it. */
function pieSanitize(s){s.pieV=int(s.pieV,0,1,0);const p=s.pie,ob=x=>x&&typeof x==='object'&&!Array.isArray(x);
function pieSanitize(s){s.pieV=int(s.pieV,0,1,0);pieEximFix(s);const p=s.pie,ob=x=>x&&typeof x==='object'&&!Array.isArray(x);
if(!ob(p)||(s.pieV<1&&s.mode!=='sandbox')||s.scn||s.mode==='puzzle'){s.pie=null;return;}
const o=pieBlank(int(p.born,0,s.day,s.day)),day=s.day,n=(v,hi)=>int(v,0,hi,0),m=(v,hi)=>clamp(num(v,0),0,hi);
if(ob(p.co)){const nm=p.co.name;o.co={name:typeof nm==='string'&&nm.trim()?(PIE_NAMES.includes(nm)?nm:nm.replace(/\s+/g,' ').trim().slice(0,40)):PIE_NAMES[0]};}
@ -132,5 +132,6 @@ function pieSanitize(s){s.pieV=int(s.pieV,0,1,0);const p=s.pie,ob=x=>x&&typeof x
o.founder.due=(Array.isArray(F.due)?F.due:[]).map(v=>int(v,0,day+720,day)).sort((a,b)=>a-b).slice(-8);}
if(ob(p.book))for(const k of ['spent','earned','wouldHave'])o.book[k]=m(p.book[k],1e15);
if(ob(p.spat))for(const k of Object.keys(p.spat)){const D=PIE_SPATS[k];if(!D||!ob(p.spat[k]))continue;const v=D.fix?D.fix(p.spat[k],s):null;if(v)o.spat[k]=v;}
o.gov=pieGovFix(p.gov,s);
s.pie=o;}
const sid0=v=>typeof v==='string'&&v&&v.length<=40?v:uid();

View file

@ -0,0 +1,117 @@
/* ---------- Pie in the Sky: government money (docs/plans/pie-in-the-sky.md) ----------
Two state programmes for a rocket company, kept in S.pie.gov (pieBlank(), repaired by pieGovFix()):
- The Rural Digital Pie Fund: reverse auctions for support of a remote town that only orbit reaches (a cut-off POP on
backhaul, or a town of your terminal customers with no POP of yours). The lowest ask wins; a rival bids too. A win
pays a monthly subsidy (V.gov in compute()) for PIE_RDF_TERM days, while the town's service, averaged over each
month, stays at PIE_RDF_NEED from the deadline on. A month below it is a warning; two in a row revoke the award, and
PIE_RDF_CLAW of the last year's support goes back.
- The Ex-Im Pie Bank: a cheap state loan sized to the constellation (a BANKS entry, so it bills and shows like any
loan), with space covenants: launch n pies by a day, keep a pie dish in the lending country. A breach is a loan
breach (the bank's penalty), plus tighter terms (PIE_EXIM_PEN on the rate, the launch target rescheduled) and, with
chaos on (rule O5), a geopolitical spat in the lending country.
Pitcairn's satellite tier of the UK grant is in 85-pitcairn.js. Subsidies count in the orbit's books (book.earned). */
const PIE_RDF_MO=5e6,PIE_RDF_P=30,PIE_RDF_TERM=1800,PIE_RDF_DUE=90,PIE_RDF_NEED=0.7,PIE_RDF_CLAW=0.5,PIE_RDF_MAX=6,
PIE_RDF_DAYS=20,PIE_RDF_RATE=1/45,PIE_RDF_FAR=60,PIE_RDF_BIDS=[0.9,0.7,0.5],PIE_RDF_RIV=0.4,
PIE_EXIM_SHARE=0.5,PIE_EXIM_MIN=250e6,PIE_EXIM_CAPF=0.2,PIE_EXIM_APR=0.015,PIE_EXIM_TERM=60,PIE_EXIM_BY=360,PIE_EXIM_PEN=0.03,
PIE_EXIM_RESCHED=180,PIE_EXIM_EVERY=90;
// Rival bidders: the old satellite crowd and the local co-op.
const PIE_RIVALS=[N_('pie_gov.rival_viasad'),N_('pie_gov.rival_hugsnet'),N_('pie_gov.rival_coop')];
const pieGovBlank=()=>({auc:[],aw:[],ex:null,told:0});
// A town's service today, from the last compute: a POP's share of its demand served (orbit's latency is accepted: the
// fund pays for coverage), or the share its terminal customers get.
function pieRdfSrv(c){if(!R||!R.pie)return 0;if(S.pops[c]){const d=R.cityDem[c]||0;return d>1e-6?clamp((R.citySrv[c]||0)/d,0,1):0;}
let w=0,g=0;for(const b of S.biz)if(b.city===c&&BIZ_T[b.type].orbit){w+=b.bw;g+=b.bw*Math.min(1,R.pie.sf[b.id]||0);}return w>0?g/w:0;}
// Towns the fund will auction: cut-off POPs with home broadband on backhaul, and small towns with no POP of yours where
// your terminals are, that are not up for auction or awarded already.
function pieRdfCands(){if(!R||!R.pie||!R.pie.hubs.length)return [];const G=S.pie.gov,busy=new Set([...G.auc,...G.aw].map(x=>x.city)),o=new Set();
for(const b of R.pie.bh)if(b.land&&S.pops[b.city]&&S.pops[b.city].bb)o.add(b.city);
for(const b of S.biz)if(BIZ_T[b.type].orbit&&!S.pops[b.city]&&CITY[b.city].P<=PIE_RDF_FAR)o.add(b.city);
return [...o].filter(c=>!busy.has(c)&&!CITY[c].cn).sort();}
// The reserve grows with the town, up to a small one's worth: the fund is for the last mile, not for cities.
const pieRdfAsk=c=>Math.round(PIE_RDF_MO*(1+Math.min(CITY[c].P,PIE_RDF_FAR)/PIE_RDF_P)/1e5)*1e5;
function pieRdfOpen(c){const G=S.pie.gov,a={id:uid(),city:c,ask:pieRdfAsk(c),close:S.day+PIE_RDF_DAYS,riv:+(PIE_RDF_RIV+(1-PIE_RDF_RIV)*Math.random()).toFixed(3),rv:Math.floor(Math.random()*PIE_RIVALS.length)%PIE_RIVALS.length,bid:0};
G.auc.push(a);toast(`<b>🏛️ ${tr('pie_gov.t_auction_title')}</b><br>${tr('pie_gov.t_auction',{city:esc(CITY[c].name),mo:fmt$(a.ask),y:PIE_RDF_TERM/360,d:dateStr(a.close)})}`,'goal',[{l:tr('pie_gov.bid'),act:'pieGovOpen',args:{}}]);}
// Bids close: the lower ask wins. Silent when you did not bid.
function pieRdfClose(a){const G=S.pie.gov,c=esc(CITY[a.city].name);if(!a.bid)return;
if(a.bid<=a.riv&&G.aw.length<PIE_RDF_MAX){const d=S.day,w={id:a.id,city:a.city,mo:Math.round(a.ask*a.bid),start:d,due:d+PIE_RDF_DUE,end:d+PIE_RDF_TERM,s:0,n:0,k:0,paid:0};G.aw.push(w);
S.stats.pieRdf=(S.stats.pieRdf||0)+1;toast(tr('pie_gov.t_won',{city:c,mo:fmt$(w.mo),p:pct(PIE_RDF_NEED),d:dateStr(w.due)}),'goal',[{l:tr('pie_gov.open'),act:'pieGovOpen',args:{}}]);sfx('coin');}
else toast(tr('pie_gov.t_lost',{city:c,rival:tr(PIE_RIVALS[a.rv]),mo:fmt$(Math.round(a.ask*a.riv))}),'bad');}
// Revoked: the award ends and part of what it paid goes back (the sandbox only keeps count).
function pieRdfRevoke(w,avg){const P=S.pie,G=P.gov,claw=Math.round(Math.min(w.paid,12*w.mo)*PIE_RDF_CLAW);G.aw=G.aw.filter(x=>x!==w);
if(!pieSand())S.cash-=claw;P.book.earned=Math.max(0,P.book.earned-claw);S.stats.pieRdfLost=(S.stats.pieRdfLost||0)+1;
toast(tr('pie_gov.t_revoked',{city:esc(CITY[w.city].name),p:pct(avg),need:pct(PIE_RDF_NEED),amt:fmt$(claw)}),'bad',[{l:tr('pie_gov.open'),act:'pieGovOpen',args:{}}]);sfx('err');}
// What the fund pays this month: every award in force (compute()).
function pieGovMo(){const G=S.pie&&S.pie.gov;if(!G)return 0;let v=0;for(const w of G.aw)v+=w.mo;return v;}
/* ---- The Ex-Im Pie Bank ---- */
// What a pie in orbit is worth to a lender: the pie, its laser and its seat on the cheapest rocket.
const pieEximUnit=()=>piePrice(PIE_PIE+PIE_LAS)+piePrice(ROCKETS.falcon.cost)/ROCKETS.falcon.pies;
// The most it lends: a share of the cheapest full Shortcrust (rule O7 counts it).
const pieEximCap=()=>Math.round(pieFullCost('short')*PIE_EXIM_CAPF/50e6)*50e6;
// Sized to the constellation: half the value of the pies flying and booked, between PIE_EXIM_MIN and the cap.
function pieEximAmt(){const P=S.pie;let n=pieLiveAll();for(const id in CRUSTS)n+=P.crusts[id].queued;return clamp(Math.round(n*pieEximUnit()*PIE_EXIM_SHARE/50e6)*50e6,PIE_EXIM_MIN,pieEximCap());}
const pieEximLoan=()=>(S.loans||[]).find(l=>l.bank==='exim')||null;
// The covenants (COVS.pielaunch / COVS.piedish, 10-banks.js).
function pieEximLaunchOk(l){const q=l&&l.pie;return !q||S.day<q.by||q.flown>=q.n;}
function pieEximDishOk(l){const q=l&&l.pie;return !q||!!S.pie&&S.pie.dishes.some(x=>S.pops[x.city]&&CITY[x.city].cc===q.cc);}
// A fresh offer every PIE_EXIM_EVERY days, from a country you have a POP in, while you have a factory and no Ex-Im loan.
function pieEximOffer(d){const P=S.pie,G=P.gov;if(!P.fac||pieEximLoan()||!pieCanBuild()){if(G.ex&&pieEximLoan())G.ex=null;return;}if(G.ex&&G.ex.exp>d)return;
const ccs=piePopCc();if(!ccs.length)return;const amt=pieEximAmt();
G.ex={cc:pick(ccs),amt,apr:+(PIE_EXIM_APR+0.01*Math.random()).toFixed(3),term:PIE_EXIM_TERM,n:Math.ceil(amt/pieEximUnit()/20)*20,exp:d+PIE_EXIM_EVERY};
if(!G.told){G.told=1;toast(`<b>🏦 ${tr('pie_gov.t_exim_title')}</b><br>${tr('pie_gov.t_exim',{amt:fmt$(amt),a:esc(pieLicCountry(G.ex.cc))})}`,'goal',[{l:tr('pie_gov.open'),act:'pieGovOpen',args:{}}]);}}
// Taking it: a loan like any other, plus its space covenants.
function pieEximTake(){const P=S.pie,o=P.gov.ex;if(!o||pieEximLoan())return false;const pay=Math.round(annuity(o.amt,o.apr,o.term));
S.cash+=o.amt;S.stats.loans=(S.stats.loans||0)+1;
S.loans.push({id:uid(),bank:'exim',start:S.day,amount:o.amt,got:o.amt,bal:o.amt,apr:o.apr,apr0:o.apr,pay,left:o.term,term:o.term,share:0,covs:['pielaunch','piedish'],base:{sub:S.links.filter(x=>x.sub).length},
pie:{cc:o.cc,n:o.n,by:S.day+PIE_EXIM_BY,flown:0,br:0}});
P.gov.ex=null;track('loan_taken');return true;}
// A breach (loanTick(), after the bank's own penalty): tighter terms, the launch target rescheduled, and a spat.
function pieEximBreach(l,broken){const q=l.pie;if(!q)return;q.br=(q.br||0)+1;l.apr=+(l.apr+PIE_EXIM_PEN).toFixed(3);l.pay=Math.round(annuity(l.bal,l.apr,Math.max(1,l.left)));
if(broken.includes('pielaunch'))q.by=S.day+PIE_EXIM_RESCHED;
let sp='';if(S.pie&&pieChaos()){const ids=broken.includes('piedish')?['home','lic']:['lic','home'];for(const id of ids)if(!S.pie.spat[id]&&pieSpatStart(id,q.cc)){sp=id;break;}}
toast(tr('pie_gov.t_breach',{a:esc(pieLicCountry(q.cc)),apr:(l.apr*100).toFixed(1)})+(sp?' '+tr('pie_gov.t_breach_spat'):''),'bad');}
/* ---- The day ---- */
function pieGovDay(d){const P=S.pie;if(!P.co)return;const G=P.gov;
if(G.auc.length)for(const a of G.auc.slice())if(d>=a.close){G.auc=G.auc.filter(x=>x!==a);pieRdfClose(a);}
for(const w of G.aw.slice()){if(w.start===d)continue;if(d>=w.end){G.aw=G.aw.filter(x=>x!==w);toast(tr('pie_gov.t_done',{city:esc(CITY[w.city].name),amt:fmt$(w.paid)}),'good');continue;}
w.paid+=w.mo/30;w.s+=pieRdfSrv(w.city);w.n++;
if(w.n>=30){const avg=w.s/w.n;w.s=0;w.n=0;if(d<w.due||avg>=PIE_RDF_NEED){w.k=0;continue;}
if(w.k){pieRdfRevoke(w,avg);continue;}w.k=1;toast(tr('pie_gov.t_warn',{city:esc(CITY[w.city].name),p:pct(avg),need:pct(PIE_RDF_NEED)}),'bad',[{l:tr('pie_gov.open'),act:'pieGovOpen',args:{}}]);}}
if(!G.auc.length&&G.aw.length<PIE_RDF_MAX&&Math.random()<PIE_RDF_RATE){const cs=pieRdfCands();if(cs.length)pieRdfOpen(pick(cs));}
pieEximOffer(d);
// The books: the fund and Pitcairn's satellite grant, as compute() counted them.
if(R&&R.pie&&R.pie.gov){const v=R.pie.gov.rdf+R.pie.gov.sky;if(v>0)P.book.earned+=v/30;}}
PIE_ON.day.push(pieGovDay);
// Pies launched count towards the Ex-Im target.
PIE_ON.launch.push((L,ok)=>{const l=ok&&!L.test&&pieEximLoan();if(l&&l.pie)l.pie.flown+=L.n;});
/* ---- The save gate ---- */
function pieGovFix(g,s){const o=pieGovBlank(),day=s.day,ob=x=>x&&typeof x==='object'&&!Array.isArray(x);if(!ob(g))return o;
const ccs=new Set(CITIES.map(c=>c.cc)),seen=new Set(),one=x=>isCity(x.city)&&!seen.has(x.city)&&seen.add(x.city),mx=PIE_RDF_MO*20;
o.auc=(Array.isArray(g.auc)?g.auc:[]).filter(a=>ob(a)&&one(a)).slice(0,1).map(a=>({id:sid0(a.id),city:a.city,ask:clamp(num(a.ask,0),0,mx),close:int(a.close,0,day+PIE_RDF_DAYS,day),
riv:clamp(num(a.riv,1),PIE_RDF_RIV,1),rv:int(a.rv,0,PIE_RIVALS.length-1,0),bid:PIE_RDF_BIDS.includes(a.bid)?a.bid:0}));
o.aw=(Array.isArray(g.aw)?g.aw:[]).filter(w=>ob(w)&&one(w)).slice(0,PIE_RDF_MAX).map(w=>{const st=int(w.start,0,day,day);
return {id:sid0(w.id),city:w.city,mo:clamp(num(w.mo,0),0,mx),start:st,due:int(w.due,st,st+PIE_RDF_DUE,st+PIE_RDF_DUE),end:int(w.end,st,st+PIE_RDF_TERM,st+PIE_RDF_TERM),
s:clamp(num(w.s,0),0,30),n:int(w.n,0,29,0),k:w.k?1:0,paid:clamp(num(w.paid,0),0,mx*PIE_RDF_TERM/30)};}).map(w=>(w.s=Math.min(w.s,w.n),w));
if(ob(g.ex)&&ccs.has(g.ex.cc)){const x=g.ex;o.ex={cc:x.cc,amt:clamp(num(x.amt,PIE_EXIM_MIN),0,pieEximCap()),apr:clamp(num(x.apr,PIE_EXIM_APR),0,0.2),term:PIE_EXIM_TERM,n:int(x.n,0,1e5,0),exp:int(x.exp,0,day+PIE_EXIM_EVERY,day)};}
o.told=g.told?1:0;return o;}
// Ex-Im loans live in S.loans (sanitized there); their covenants' numbers are repaired here, or reset when unreadable.
function pieEximFix(s){const ccs=new Set(CITIES.map(c=>c.cc)),home=isCity(s.home)?CITY[s.home].cc:CITIES[0].cc;
for(const l of s.loans||[]){if(l.bank!=='exim')continue;const q=l.pie&&typeof l.pie==='object'?l.pie:{};
l.pie={cc:ccs.has(q.cc)?q.cc:home,n:int(q.n,0,1e5,0),by:int(q.by,0,s.day+PIE_EXIM_BY,0),flown:int(q.flown,0,1e6,0),br:int(q.br,0,1e4,0)};l.covs=['pielaunch','piedish'];}}
/* ---- Pie Control: the Gov tab ---- */
function pieGovHtml(){const P=S.pie,G=P.gov,can=pieCanBuild();let h=`<div class="ops-o"><div class="nm">🏛️ ${tr('pie_gov.rdf')}</div><p class="meta">${tr('pie_gov.rdf_note',{y:PIE_RDF_TERM/360,p:pct(PIE_RDF_NEED),c:pct(PIE_RDF_CLAW)})}</p>`;
for(const a of G.auc)h+=`<div class="kv"><span>${esc(CITY[a.city].name)} · ${tr('pie_gov.up_to',{mo:fmt$(a.ask)})}</span><b>${tr('pie_gov.closes',{d:dateStr(a.close)})}</b></div>
<div class="ops-p">${PIE_RDF_BIDS.map(f=>btn(tr('pie_gov.ask',{mo:fmt$(Math.round(a.ask*f))}),'pieBid',{id:a.id,f},a.bid===f?'pink sm':'ghost sm',!can)).join('')}</div>`;
if(!G.auc.length)h+=`<p class="meta">${tr('pie_gov.no_auction')}</p>`;
for(const w of G.aw){const s=pieRdfSrv(w.city),ok=s>=PIE_RDF_NEED;
h+=`<div class="kv"><span>${esc(CITY[w.city].name)} · ${tr('common.price_mo',{price:fmt$(w.mo)})}</span><b style="color:${ok?'var(--eye)':'var(--bad)'}">${tr('pie_gov.served',{p:pct(s)})}</b></div>
<div class="meta">${S.day<w.due?tr('pie_gov.due',{p:pct(PIE_RDF_NEED),d:dateStr(w.due)}):tr('pie_gov.until',{d:dateStr(w.end)})}${w.k?' · <b style="color:var(--bad)">'+tr('pie_gov.warned')+'</b>':''}</div>`;}
h+=`</div><div class="ops-o"><div class="nm">🇵🇳 ${tr('pie_gov.pitcairn')}</div><p class="meta">${tr('pie_gov.pitcairn_note',{mo:fmt$(GRANT_MO),sky:fmt$(GRANT_SKY_MO)})}</p>${grantFact('pcn')}</div>`;
const l=pieEximLoan(),o=G.ex;h+=`<div class="ops-o"><div class="nm">🏦 ${tr('pie_gov.exim')}</div>`;
if(l){const q=l.pie;h+=`<div class="kv"><span>${tr('common.still_owed')}</span><b>${fmt$(l.bal)}</b></div><div class="meta">${loanLine(l)}</div>
<div class="meta"><b style="color:${pieEximLaunchOk(l)?'var(--eye)':'var(--bad)'}">${pieEximLaunchOk(l)?'✓':'✗'}</b> ${esc(covLabel('pielaunch',l))}</div>
<div class="meta"><b style="color:${pieEximDishOk(l)?'var(--eye)':'var(--bad)'}">${pieEximDishOk(l)?'✓':'✗'}</b> ${esc(covLabel('piedish',l))}</div>`;}
else if(o){const pay=Math.round(annuity(o.amt,o.apr,o.term));h+=`<p class="meta">${tr('pie_gov.exim_offer',{amt:fmt$(o.amt),apr:(o.apr*100).toFixed(1),n:o.term,pay:fmt$(pay)})}</p>
<div class="meta">• ${tr('pie_gov.cov_launch',{n:o.n,d:dateStr(S.day+PIE_EXIM_BY)})}</div><div class="meta">• ${tr('pie_gov.cov_dish',{a:esc(pieLicCountry(o.cc))})}</div>
<p class="meta">${tr('pie_gov.exim_breach',{apr:(PIE_EXIM_PEN*100).toFixed(0)})}</p><div class="btns">${btn(tr('bank.take_the_money'),'pieExim',{},'pink sm',!can)}</div>`;}
else h+=`<p class="meta">${tr('pie_gov.exim_none')}</p>`;
return h+'</div>';}

View file

@ -370,12 +370,14 @@ function computeMoney(R2,PX=null){
C.loans=(S.loans||[]).reduce((a,l)=>a+(BANKS[l.bank].equity?0:l.model==='transit'?Math.round((C.transit||0)*(l.cut||0.3)):l.pay)+loanFees(l),0);
C.extras=(S.cnLic&&S.cnLic.state==='ok'?CN_JV_MO:0)+scrubMo()+Object.keys(S.pops).filter(ruCity).length*RU_BOX_MO+Object.values(S.pops).filter(p=>p.site2).length*SITE2_MO+(S.te?TE_MO:0)+(S.ops&&S.ops.intern?INTERN_MO:0)+salesMo();
if(S.pie&&S.mode!=='sandbox')C.pie=pieMo();
V.eyeballs=0;V.business=0;V.ix=0;V.grant=grantOn(R2)?GRANT_MO:0;
V.eyeballs=0;V.business=0;V.ix=0;
C.wholesale=0;C.levy=0;const lev=scnRule('levy');for(const c in S.pops){const sf=sfOf(R2,c)*(R2.bbF[c]??1),v=R2.cityEye[c]*sf*EYE_RATE*arpuOf(c);V.eyeballs+=v;if(CITY[c].au){if(lev)C.levy+=v*AU_LEVY;else C.wholesale+=v*AU_WHOLESALE;}}
const ids=linkIds();for(const b of S.biz){if(capPend(b)||BIZ_T[b.type].orbit)continue;const sf=BIZ_T[b.type].fiber?(fiberOk(b,ids)?1:0):BIZ_T[b.type].l2?clamp((R2.l2[b.id]||0)/b.bw,0,1):sfOf(R2,b.city)*(R2.tgtF[b.id]??1);V.business+=b.bw*b.rate*Math.min(1,sf/0.95);}
for(const c in S.myIx)V.ix+=S.myIx[c].members.length*MYIX_FEE;
if(PX)pieMoney(PX,R2,V);
// The UK grant for Pitcairn, its satellite tier once orbit is known; the Rural Digital Pie Fund (99-pie-subsidies.js).
{const on=grantOn(R2),sky=!on&&!!PX&&grantSky(R2);V.grant=on?GRANT_MO:sky?GRANT_SKY_MO:0;V.gov=PX?pieGovMo():0;if(PX)R2.pie.gov={rdf:V.gov,sky:sky?GRANT_SKY_MO:0};}
C.revshare=(S.loans||[]).reduce((a,l)=>a+(BANKS[l.bank].equity||l.bal>0?l.share||0:0),0)*(V.eyeballs+V.business+V.ix+(V.orbit||0));
R2.costMo=Object.values(C).reduce((a,b)=>a+b,0);
R2.revMo=V.eyeballs+V.business+V.ix+V.grant+(V.orbit||0);
R2.revMo=V.eyeballs+V.business+V.ix+V.grant+V.gov+(V.orbit||0);
}

View file

@ -102,11 +102,11 @@ function pieSpatFix(id,o,s){const D=PIE_SPAT_DEF[id],A=pieCcAll(),day=s.day,cc=v
// The day: an unanswered spat decides itself on its deadline.
function pieSpatTick(id,o,d){const D=PIE_SPAT_DEF[id];if(o.st==='ask'&&d>=o.ask){pieSpatChoose(id,D.def,true);return;}if(D.day)D.day(o,d);}
for(const id of PIE_SPAT_KEYS)PIE_SPATS[id]={fix:(o,s)=>pieSpatFix(id,o,s),day:(o,d)=>pieSpatTick(id,o,d),end:o=>{const D=PIE_SPAT_DEF[id];if(D.end)D.end(o);pieRelease(o);}};
// Starts one (id forces which, for tests and the astronomers); true when it did.
function pieSpatStart(id){const P=S.pie;if(!P||!P.co)return false;
// Starts one (id forces which, for tests, the astronomers and the Ex-Im Pie Bank; cc which country); true when it did.
function pieSpatStart(id,cc){const P=S.pie;if(!P||!P.co)return false;
if(!id){const ok=PIE_SPAT_KEYS.filter(k=>k!=='astro'&&!P.spat[k]&&PIE_SPAT_DEF[k].can().length);if(!ok.length)return false;id=pick(ok);}
const D=PIE_SPAT_DEF[id];if(!D||P.spat[id])return false;const cs=D.can();if(!cs.length)return false;
const o={st:'ask',ask:S.day+PIE_SPAT_ASK,c:-1};D.start(o,pick(cs));if(!o.until)o.until=o.ask+1;P.spat[id]=o;
if(cc&&!cs.includes(cc))return false;const o={st:'ask',ask:S.day+PIE_SPAT_ASK,c:-1};D.start(o,cc||pick(cs));if(!o.until)o.until=o.ask+1;P.spat[id]=o;
S.stats.incidents++;S.stats.pieSpat=(S.stats.pieSpat||0)+1;pieFounder(N_('pie.fp_spat'));
const t=D.txt(o);toast(`<b>🌍 ${t.t}</b><br>${t.b}`,'bad',[{l:tr('pie_spat.decide'),act:'pieSpatOpen',args:{id}}]);sfx('alert');return true;}
// The answer: what it costs (sandbox keeps count), what happens, and the press office's line.

View file

@ -28,6 +28,12 @@ Object.assign(ACT,{
pieSafe:()=>{const P=pieGet();if(!P||!P.co)return;P.safe=!P.safe;sfx('click');pieRe();},
pieName:()=>{const P=pieGet();if(!P||!P.co)return;const i=PIE_NAMES.indexOf(P.co.name);P.co.name=PIE_NAMES[(i+1)%PIE_NAMES.length];pieFounder(N_('pie.fp_rename'));pieRe();},
pieRename:()=>{const P=pieGet(),el=$('pieNm');if(!P||!P.co||!el)return;const v=el.value.replace(/\s+/g,' ').trim().slice(0,40);if(!v)return;P.co.name=v;pieFounder(N_('pie.fp_rename'));pieRe();},
// Government money (60-features/99-pie-subsidies.js): Pie Control's Gov tab, a bid, the Ex-Im loan.
pieGovOpen:()=>{if(!S||pzOn()||!pieOn())return;UI.pieTab='gov';UI.confirm=null;pieModal();},
pieBid:({id,f})=>{const P=pieGet();f=+f;const a=P&&P.gov.auc.find(x=>x.id===id);if(!a||!PIE_RDF_BIDS.includes(f))return;if(!pieCanBuild())return pieNo(tr('pie.why_not_t1'));
a.bid=f;toast(tr('pie_gov.t_bid',{city:esc(CITY[a.city].name),mo:fmt$(Math.round(a.ask*f)),d:dateStr(a.close)}),'good');sfx('click');pieRe();},
pieExim:()=>{const P=pieGet();if(!P||!P.co)return;if(!pieCanBuild())return pieNo(tr('pie.why_not_t1'));if(!pieEximTake())return pieRe();
const l=pieEximLoan();toast(`<b>${tr('interface.amt_from_bank_has_landed',{amt:fmt$(l.amount),bank:esc(BANKS.exim.name)})}</b><br>${loanSummary(l)}`,'good');sfx('coin');pieRe();},
pieTab:({t})=>{if(!PIE_TABS.includes(t))return;UI.pieTab=t;pieModal();},
pieHi:({id})=>{if(typeof id!=='string')return;sfx('click');pieHiSet(id);},
pieCity:({v})=>{if(!S||!S.pops[v])return;UI.pieCity=v;pieModal();},

View file

@ -4,7 +4,7 @@ function pieLicCountry(cc){try{PIE_CCN=PIE_CCN&&PIE_CCN.l===LANG?PIE_CCN:{l:LANG
function pieCard(){if(!pieOn())return '';const P=S.pie;
return `<div class="ops-card pie-card"><div class="nm">🥧 ${tr('pie.pie_in_the_sky')}</div><div class="meta">${P&&P.co?esc(pieCoName())+' · '+tr('pie.card_live',{n:Object.keys(CRUSTS).reduce((a,id)=>a+pieLive(id),0),q:P.q.length}):tr('pie.card_pitch')}</div>
${pieSpatCard()}<div class="btns">${btn(tr('pie.open_pie_control'),'pieOpen',{},P&&P.co?'sm':'pink sm')}</div></div>`;}
const PIE_TABS=['traffic','co','fly','dish','book'];
const PIE_TABS=['traffic','co','fly','dish','gov','book'];
const pieTag=(t,on)=>`<span class="tag ${on?'open':'selective'}">${t}</span>`;
function pieModal(){if(!S||!pieOn())return;const P=S.pie||pieBlank(S.day),can=pieCanBuild(),T=PIE_TABS.includes(UI.pieTab)?UI.pieTab:'traffic';
let h=`<div style="display:flex;align-items:center"><div class="grow"><div class="eyebrow">${tr('pie.pie_in_the_sky')}</div><h2 style="font-size:24px">${P.co?esc(pieCoName()):tr('pie.pie_control')}</h2></div><button class="x" data-act="closeModal" aria-label="${tr('common.close')}">×</button></div>`;
@ -13,7 +13,7 @@ function pieModal(){if(!S||!pieOn())return;const P=S.pie||pieBlank(S.day),can=pi
if(!P.co){h+=`<p class="lead">${tr('pie.found_pitch')}</p><div class="btns">${btn(tr('pie.found_price',{price:fmt$(piePrice(PIE_CO)),mo:fmt$(PIE_CO_MO)}),'pieFound',{},'pink',!can)}</div>`;openModal(h,'pie');return;}
const tab=(k,l)=>`<button class="b sm ${T===k?'pink':'ghost'}" data-act="pieTab" data-args='{"t":"${k}"}' aria-pressed="${T===k}">${l}</button>`;
h+=pieGlobeHtml()+pieSpatCard();
h+=`<div class="seg" style="margin:6px 0 10px">${tab('traffic',tr('pie_traffic.tab'))}${tab('co',tr('pie.tab_company'))}${tab('fly',tr('pie.tab_launch'))}${tab('dish',tr('pie.tab_dishes'))}${tab('book',tr('pie.tab_founder'))}</div>`;
h+=`<div class="seg" style="margin:6px 0 10px">${tab('traffic',tr('pie_traffic.tab'))}${tab('co',tr('pie.tab_company'))}${tab('fly',tr('pie.tab_launch'))}${tab('dish',tr('pie.tab_dishes'))}${tab('gov',tr('pie_gov.tab'))}${tab('book',tr('pie.tab_founder'))}</div>`;
const cities=Object.keys(S.pops).sort((a,b)=>CITY[a].name.localeCompare(CITY[b].name)),c=S.pops[UI.pieCity]?UI.pieCity:cities[0];
const sel=`<div class="trsel"><label>${tr('common.your_pop')}<select data-chg="pieCity">${cities.map(x=>`<option value="${x}"${x===c?' selected':''}>${esc(CITY[x].name)}</option>`).join('')}</select></label></div>`;
if(T==='traffic')h+=pieTrafficHtml();
@ -40,7 +40,8 @@ function pieModal(){if(!S||!pieOn())return;const P=S.pie||pieBlank(S.day),can=pi
const ccs=[...new Set([...P.dishes.map(x=>CITY[x.city].cc),CITY[c].cc,...Object.keys(P.lic)])];
h+=`<h3 style="font-size:15px;margin:10px 0 4px">${tr('pie.landing_rights')}</h3>`+ccs.map(cc=>{const l=P.lic[cc],ok=pieLicOk(cc);
return `<div class="kv"><span>${esc(pieLicCountry(cc))}${ok?' · '+tr('pie.lic_until',{d:dateStr(l.until)}):l&&l.state!=='ok'&&l.until>S.day?' · '+tr('pie.lic_refused'):''}</span>${btn((ok?tr('pie.renew'):tr('pie.buy'))+' '+fmt$(pieLicPrice(cc)),'pieLic',{cc},'ghost sm')}</div>`;}).join('');
}else{
}else if(T==='gov')h+=pieGovHtml();
else{
const F=P.founder;h+=`<div class="kv"><span>${tr('pie.promises')}</span><b>${tr('pie.promises_line',{n:F.promises,b:F.broken})}</b></div>`;
h+=`<div class="kv"><span>${tr('pie.spent')}</span><b>${fmt$(P.book.spent)}</b></div><div class="kv"><span>${tr('pie.earned')}</span><b>${fmt$(P.book.earned)}</b></div>`;
if(R&&R.pie)h+=`<p class="meta">${tr('pie.earned_mo',{amt:fmt$(R.pie.rev),n:R.pie.isl.length})}</p>`;

View file

@ -10,7 +10,7 @@ function renderBank(){
if(o.model==='balloon')return `<span class="tag st on">${tr('bank.nothing_to_pay_until_the_end_2a38')}</span><span class="tag st">${tr('bank.apr_apr',{apr:(o.apr*100).toFixed(1)})}</span><span class="tag st">${tr('bank.n_months',{n:o.term})}</span><span class="tag selective">${tr('bank.then_about_price_at_once',{price:fmt$(o.amount*Math.pow(1+o.apr/12,o.term))})}</span>${sh}`;
const extra=o.model==='storm'?`<span class="tag selective">${tr('bank.2_per_open_incident')}</span>`:o.model==='astro'?`<span class="tag selective">${tr('bank.rate_set_by_the_stars_each')}</span>`:'';
return (B.equity?`<span class="tag st on">${tr('common.no_repayments')}</span><span class="tag st">${tr('bank.pct_of_revenue_forever',{pct:pct(o.share)})}</span><span class="tag st">${tr('bank.buy_out_price',{price:fmt$(o.amount*3)})}</span>`:`<span class="tag st on">${tr('bank.apr_apr',{apr:(o.apr*100).toFixed(1)})}</span><span class="tag st">${tr('bank.n_months',{n:o.term})}</span><span class="tag st">${tr('common.price_mo',{price:fmt$(o.pay)})}</span>${B.crypto?'<span class="tag selective">'+tr('bank.paid_in_tubecoin')+'</span>':''}`)+extra+sh;};
const covList=(l)=>l.covs.length?l.covs.map(c=>{const ok=COVS[c].ok(l);return `<div class="meta"><b style="color:${ok?'var(--eye)':'var(--bad)'}">${ok?'✓':'✗'}</b> ${esc(covLabel(c))}</div>`;}).join(''):'<div class="meta">'+tr('bank.no_conditions_that_is_the_scary')+'</div>';
const covList=(l)=>l.covs.length?l.covs.map(c=>{const ok=COVS[c].ok(l);return `<div class="meta"><b style="color:${ok?'var(--eye)':'var(--bad)'}">${ok?'✓':'✗'}</b> ${esc(covLabel(c,l))}</div>`;}).join(''):'<div class="meta">'+tr('bank.no_conditions_that_is_the_scary')+'</div>';
let h=`<div style="display:flex;align-items:center;gap:12px"><div><div class="eyebrow">AS${S.asn} · ${esc(S.name)}</div><h2 style="font-size:28px">${tr('common.bank')}</h2></div><button class="x" data-act="bankClose" aria-label="${tr('common.close')}">×</button></div>
<div class="dgrid"><div class="tile"><div class="lbl">${tr('common.cash')}</div><div class="val" style="color:${S.cash<0?'var(--bad)':'inherit'}">${fmt$(S.cash)}</div><div class="sub">${S.cash<0?tr('bank.bankrupt_at_100k'):tr('bank.in_the_vault')}</div></div>
<div class="tile"><div class="lbl">${tr('dashboard.monthly_p_l')}</div><div class="val" style="color:${net>=0?'var(--eye)':'var(--bad)'}">${net>=0?'+':''}${fmt$(net)}</div><div class="sub">${tr('bank.after_loan_payments')}</div></div>

View file

@ -307,6 +307,10 @@
"banks.do_the_kehrwoche_keep_your_noc":"Do the Kehrwoche: keep your NOC free of incidents older than a week.",
"banks.download_our_app_and_enable_all":"Download our app and enable all notifications.",
"banks.every_pop_needs_a_backup_generator":"Every POP needs a backup generator. Our risk team saw one disaster movie.",
"banks.exim_blurb":"The state lends you money to buy rockets from home. Space covenants apply.",
"banks.exim_keep_a_dish_in":"Keep a pie dish in {a}",
"banks.exim_launch_n_pies_by":"Launch {n} pies by {d} ({f} so far)",
"banks.exim_launch_pies":"Launch the pies you promised",
"banks.fill_in_form_t_17b_in":"Fill in form T-17b in triplicate, every month, forever.",
"banks.give_our_ceo_s_nephew_a":"Give our CEO’s nephew a job. He needs {price}/mo and a parking spot.",
"banks.instant_approval_instant_regret":"Instant approval. Instant regret.",
@ -3509,6 +3513,42 @@
"pie_globe.switch_to_day_view":"Switch to day view",
"pie_globe.switch_to_night_view":"Switch to night view",
"pie_globe.your_pies_in_orbit":"Your pies in orbit, drag to turn the Earth",
"pie_gov.ask":"Ask {mo}/mo",
"pie_gov.bid":"Bid",
"pie_gov.closes":"bids close {d}",
"pie_gov.cov_dish":"Keep a pie dish in {a}",
"pie_gov.cov_launch":"Launch {n} pies by {d}",
"pie_gov.due":"Needs {p} served by {d}",
"pie_gov.exim":"Ex-Im Pie Bank",
"pie_gov.exim_breach":"Break a covenant and the rate goes up {apr} points, the deadline moves and the lending country gets cross.",
"pie_gov.exim_none":"No offer right now. The bank lends to rocket companies with a factory.",
"pie_gov.exim_offer":"Lends you {amt} at {apr}% for {n} months: {pay}/mo.",
"pie_gov.no_auction":"No auction open. The fund calls when a town only your pies reach is up for support.",
"pie_gov.open":"Open",
"pie_gov.pitcairn":"Pitcairn",
"pie_gov.pitcairn_note":"The UK pays {mo}/mo while the islanders are well served, and accepts satellite service for {sky}/mo.",
"pie_gov.rdf":"Rural Digital Pie Fund",
"pie_gov.rdf_note":"Reverse auctions for towns only orbit reaches: the lowest ask wins and is paid monthly for {y} years. Keep the town {p} served, averaged over each month: two months under it in a row and the award is revoked and {c} of the last year's support is clawed back.",
"pie_gov.rival_coop":"Co-op de Ville",
"pie_gov.rival_hugsnet":"HugsNet",
"pie_gov.rival_viasad":"ViaSad",
"pie_gov.served":"{p} served",
"pie_gov.t_auction":"Support for {city}: up to {mo}/mo for {y} years. Bids close {d}.",
"pie_gov.t_auction_title":"Rural Digital Pie Fund auction",
"pie_gov.t_bid":"Bid in for {city}: {mo}/mo. Results on {d}.",
"pie_gov.t_breach":"The Ex-Im Pie Bank tightens your terms: {apr}% now, and {a} is not amused.",
"pie_gov.t_breach_spat":"Its government has questions.",
"pie_gov.t_done":"The fund's support for {city} has ended: {amt} paid in all.",
"pie_gov.t_exim":"The Ex-Im Pie Bank would lend you {amt} at almost nothing, if you keep a pie dish in {a}.",
"pie_gov.t_exim_title":"State money for rockets",
"pie_gov.t_lost":"{rival} won {city} asking only {mo}/mo.",
"pie_gov.t_revoked":"Award for {city} revoked: {p} served, the fund wants {need}. It claws back {amt}.",
"pie_gov.t_warn":"The fund is watching {city}: {p} served last month, it wants {need}. Another month like that and the award is revoked.",
"pie_gov.t_won":"You won {city}: {mo}/mo. Have it {p} served by {d}.",
"pie_gov.tab":"Gov",
"pie_gov.until":"Paid until {d}",
"pie_gov.up_to":"up to {mo}/mo",
"pie_gov.warned":"one more bad month and it is revoked",
"pie_inc.dig_msg":"A backhoe found the backhaul fiber under the pie dish in {city}. The dish is fine, but its traffic has nowhere to go.",
"pie_inc.dig_press":"The press office says: the dish is taking a well-earned break from the ground.",
"pie_inc.food_fix":"Buy a Space Roomba",
@ -3661,6 +3701,7 @@
"pie_traffic.via_dishes":"up at {up}, down at {down}",
"pitcairn.uk_grant_mo":"UK grant {mo}/mo",
"pitcairn.uk_grant_mo_once_islanders":"UK grant {mo}/mo once the islanders are online",
"pitcairn.uk_sky_grant_mo":"UK satellite grant {mo}/mo (fiber gets {full})",
"pni_all.additional_per_month":"Additional monthly cost",
"pni_all.all_at_port":"Peer all networks · {port}",
"pni_all.delivery_and_traffic_charges":"Delivery times vary by network. Traffic-based peering charges also apply where required.",