The China licence follows quick lead times: about 5 days instead of 45
Change Freeze and Sandbox deliver everything in a tenth of the time, but the licence still took 45 days and the button said so. It now waits leadDays(45), and the button shows that number.
This commit is contained in:
parent
1692217549
commit
4bb5e07c28
9 changed files with 19 additions and 8 deletions
|
|
@ -2128,7 +2128,7 @@
|
||||||
"link_panels.add_parallel_link":"Parallelen Link hinzufügen",
|
"link_panels.add_parallel_link":"Parallelen Link hinzufügen",
|
||||||
"link_panels.additional_traffic_lost":"Zusätzlich verlorener Traffic",
|
"link_panels.additional_traffic_lost":"Zusätzlich verlorener Traffic",
|
||||||
"link_panels.an_alternate_path_exists_but_current":"Es gibt einen anderen Weg, aber mit dem jetzigen Routing und der Kapazität kommt weniger Traffic an.",
|
"link_panels.an_alternate_path_exists_but_current":"Es gibt einen anderen Weg, aber mit dem jetzigen Routing und der Kapazität kommt weniger Traffic an.",
|
||||||
"link_panels.apply_for_a_license_price_mo":"Lizenz beantragen <small>{price} + {mo}/Monat · ~45 Tage</small>",
|
"link_panels.apply_for_a_license_price_mo_n_days":"Lizenz beantragen <small>{price} + {mo}/Monat · ~{n} Tage</small>",
|
||||||
"link_panels.back_in_n_days":"Zurück in {n} Tagen.",
|
"link_panels.back_in_n_days":"Zurück in {n} Tagen.",
|
||||||
"link_panels.behind_the_great_firewall":"Hinter der Großen Firewall",
|
"link_panels.behind_the_great_firewall":"Hinter der Großen Firewall",
|
||||||
"link_panels.biggest_fabric_money_can_buy":"Die größte Fabric, die man für Geld kaufen kann.",
|
"link_panels.biggest_fabric_money_can_buy":"Die größte Fabric, die man für Geld kaufen kann.",
|
||||||
|
|
|
||||||
|
|
@ -2126,7 +2126,7 @@
|
||||||
"link_panels.add_parallel_link":"Añadir enlace paralelo",
|
"link_panels.add_parallel_link":"Añadir enlace paralelo",
|
||||||
"link_panels.additional_traffic_lost":"Tráfico perdido adicional",
|
"link_panels.additional_traffic_lost":"Tráfico perdido adicional",
|
||||||
"link_panels.an_alternate_path_exists_but_current":"Hay un camino alternativo, pero con el routing y la capacidad actuales llega menos tráfico.",
|
"link_panels.an_alternate_path_exists_but_current":"Hay un camino alternativo, pero con el routing y la capacidad actuales llega menos tráfico.",
|
||||||
"link_panels.apply_for_a_license_price_mo":"Solicitar una licencia <small>{price} + {mo}/mes · ~45 días</small>",
|
"link_panels.apply_for_a_license_price_mo_n_days":"Solicitar una licencia <small>{price} + {mo}/mes · ~{n} días</small>",
|
||||||
"link_panels.back_in_n_days":"De vuelta en {n} días.",
|
"link_panels.back_in_n_days":"De vuelta en {n} días.",
|
||||||
"link_panels.behind_the_great_firewall":"Tras el Gran Cortafuegos",
|
"link_panels.behind_the_great_firewall":"Tras el Gran Cortafuegos",
|
||||||
"link_panels.biggest_fabric_money_can_buy":"La fabric más grande que el dinero puede comprar.",
|
"link_panels.biggest_fabric_money_can_buy":"La fabric más grande que el dinero puede comprar.",
|
||||||
|
|
|
||||||
|
|
@ -2126,7 +2126,7 @@
|
||||||
"link_panels.add_parallel_link":"Ajouter un lien parallèle",
|
"link_panels.add_parallel_link":"Ajouter un lien parallèle",
|
||||||
"link_panels.additional_traffic_lost":"Trafic perdu en plus",
|
"link_panels.additional_traffic_lost":"Trafic perdu en plus",
|
||||||
"link_panels.an_alternate_path_exists_but_current":"Un autre chemin existe, mais avec le routage et la capacité actuels, moins de trafic arrive.",
|
"link_panels.an_alternate_path_exists_but_current":"Un autre chemin existe, mais avec le routage et la capacité actuels, moins de trafic arrive.",
|
||||||
"link_panels.apply_for_a_license_price_mo":"Demander une licence <small>{price} + {mo}/mois · ~45 jours</small>",
|
"link_panels.apply_for_a_license_price_mo_n_days":"Demander une licence <small>{price} + {mo}/mois · ~{n} jours</small>",
|
||||||
"link_panels.back_in_n_days":"Retour dans {n} jours.",
|
"link_panels.back_in_n_days":"Retour dans {n} jours.",
|
||||||
"link_panels.behind_the_great_firewall":"Derrière le Grand Pare-feu",
|
"link_panels.behind_the_great_firewall":"Derrière le Grand Pare-feu",
|
||||||
"link_panels.biggest_fabric_money_can_buy":"Le plus gros fabric que l’argent puisse acheter.",
|
"link_panels.biggest_fabric_money_can_buy":"Le plus gros fabric que l’argent puisse acheter.",
|
||||||
|
|
|
||||||
|
|
@ -2126,7 +2126,7 @@
|
||||||
"link_panels.add_parallel_link":"Aggiungi link parallelo",
|
"link_panels.add_parallel_link":"Aggiungi link parallelo",
|
||||||
"link_panels.additional_traffic_lost":"Ulteriore traffico perso",
|
"link_panels.additional_traffic_lost":"Ulteriore traffico perso",
|
||||||
"link_panels.an_alternate_path_exists_but_current":"Esiste un percorso alternativo, ma con routing e capacità attuali viene consegnato meno traffico.",
|
"link_panels.an_alternate_path_exists_but_current":"Esiste un percorso alternativo, ma con routing e capacità attuali viene consegnato meno traffico.",
|
||||||
"link_panels.apply_for_a_license_price_mo":"Richiedi una licenza <small>{price} + {mo}/mese · ~45 giorni</small>",
|
"link_panels.apply_for_a_license_price_mo_n_days":"Richiedi una licenza <small>{price} + {mo}/mese · ~{n} giorni</small>",
|
||||||
"link_panels.back_in_n_days":"Torna tra {n} giorni.",
|
"link_panels.back_in_n_days":"Torna tra {n} giorni.",
|
||||||
"link_panels.behind_the_great_firewall":"Dietro il Great Firewall",
|
"link_panels.behind_the_great_firewall":"Dietro il Great Firewall",
|
||||||
"link_panels.biggest_fabric_money_can_buy":"Il fabric più grosso che si possa comprare.",
|
"link_panels.biggest_fabric_money_can_buy":"Il fabric più grosso che si possa comprare.",
|
||||||
|
|
|
||||||
|
|
@ -2126,7 +2126,7 @@
|
||||||
"link_panels.add_parallel_link":"Adicionar link paralelo",
|
"link_panels.add_parallel_link":"Adicionar link paralelo",
|
||||||
"link_panels.additional_traffic_lost":"Tráfego perdido a mais",
|
"link_panels.additional_traffic_lost":"Tráfego perdido a mais",
|
||||||
"link_panels.an_alternate_path_exists_but_current":"Existe um caminho alternativo, mas com o roteamento e a capacidade atuais chega menos tráfego.",
|
"link_panels.an_alternate_path_exists_but_current":"Existe um caminho alternativo, mas com o roteamento e a capacidade atuais chega menos tráfego.",
|
||||||
"link_panels.apply_for_a_license_price_mo":"Pedir licença <small>{price} + {mo}/mês · ~45 dias</small>",
|
"link_panels.apply_for_a_license_price_mo_n_days":"Pedir licença <small>{price} + {mo}/mês · ~{n} dias</small>",
|
||||||
"link_panels.back_in_n_days":"Volta em {n} dias.",
|
"link_panels.back_in_n_days":"Volta em {n} dias.",
|
||||||
"link_panels.behind_the_great_firewall":"Atrás do Great Firewall",
|
"link_panels.behind_the_great_firewall":"Atrás do Great Firewall",
|
||||||
"link_panels.biggest_fabric_money_can_buy":"O maior fabric que o dinheiro pode comprar.",
|
"link_panels.biggest_fabric_money_can_buy":"O maior fabric que o dinheiro pode comprar.",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Object.assign(ACT,{
|
Object.assign(ACT,{
|
||||||
applyCn:()=>{if(S.cnLic.state!=='none')return;if(!spend(CN_LIC))return;S.cnLic={state:'pending',ready:S.day+45};toast(tr('security_and_china.application_filed_your_local_partner'),'goal');after();},
|
applyCn:()=>{if(S.cnLic.state!=='none')return;if(!spend(CN_LIC))return;S.cnLic={state:'pending',ready:S.day+leadDays(45)};toast(tr('security_and_china.application_filed_your_local_partner'),'goal');after();},
|
||||||
togglePrem:({id})=>{const t=S.transit.find(x=>x.id===id);if(!t||!premCity(NET[t.net],t.city)||premOnlyAt(NET[t.net],t.city))return;t.premium=!t.premium;sfx('click');after();},
|
togglePrem:({id})=>{const t=S.transit.find(x=>x.id===id);if(!t||!premCity(NET[t.net],t.city)||premOnlyAt(NET[t.net],t.city))return;t.premium=!t.premium;sfx('click');after();},
|
||||||
buildScrub:({city,tier})=>{if(!S.pops[city]||S.scrubs.some(x=>x.city===city))return;const T=SCRUB_TIERS[tier||0];if(!T)return;if((lvl()||1)<T.lvl){toast(tr('security_and_china.tier_scrubbing_unlocks_at_customer',{tier:T.n,lv:T.lvl}),'bad');sfx('err');return;}if(!spend(T.cost))return;if(!hasScrub())S.scrubMode='always';S.scrubs.push({city,tier:tier||0});toast(tr('security_and_china.tier_scrubbing_center_online_in_city',{tier:T.n,city:CITY[city].name,g:fmtG(T.g)}),'good');after();},
|
buildScrub:({city,tier})=>{if(!S.pops[city]||S.scrubs.some(x=>x.city===city))return;const T=SCRUB_TIERS[tier||0];if(!T)return;if((lvl()||1)<T.lvl){toast(tr('security_and_china.tier_scrubbing_unlocks_at_customer',{tier:T.n,lv:T.lvl}),'bad');sfx('err');return;}if(!spend(T.cost))return;if(!hasScrub())S.scrubMode='always';S.scrubs.push({city,tier:tier||0});toast(tr('security_and_china.tier_scrubbing_center_online_in_city',{tier:T.n,city:CITY[city].name,g:fmtG(T.g)}),'good');after();},
|
||||||
scrubUp:({city,tier})=>{const x=S.scrubs.find(q=>q.city===city);tier=+tier;if(!x||!SCRUB_TIERS[tier]||tier<=(x.tier||0))return;const T=SCRUB_TIERS[tier];if((lvl()||1)<T.lvl){toast(tr('security_and_china.tier_scrubbing_unlocks_at_customer',{tier:T.n,lv:T.lvl}),'bad');sfx('err');return;}if(!spend(Math.round(T.cost*0.6)))return;x.tier=tier;toast(tr('security_and_china.scrubbing_upgraded_to_tier',{tier:T.n}),'good');after();},
|
scrubUp:({city,tier})=>{const x=S.scrubs.find(q=>q.city===city);tier=+tier;if(!x||!SCRUB_TIERS[tier]||tier<=(x.tier||0))return;const T=SCRUB_TIERS[tier];if((lvl()||1)<T.lvl){toast(tr('security_and_china.tier_scrubbing_unlocks_at_customer',{tier:T.n,lv:T.lvl}),'bad');sfx('err');return;}if(!spend(Math.round(T.cost*0.6)))return;x.tier=tier;toast(tr('security_and_china.scrubbing_upgraded_to_tier',{tier:T.n}),'good');after();},
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function metricSection(l){const key=edgeKey(l),cur=pairMet(key),pl=pairLinks(l.a
|
||||||
return h+`</section>`;}
|
return h+`</section>`;}
|
||||||
function chinaSection(c){const st=S.cnLic?S.cnLic.state:'none',loss=S.ev.gfw>S.day?0.35:0.2;
|
function chinaSection(c){const st=S.cnLic?S.cnLic.state:'none',loss=S.ev.gfw>S.day?0.35:0.2;
|
||||||
let h=`<section><h3>${tr('link_panels.behind_the_great_firewall')}</h3><p class="lead">${tr('link_panels.mainland_china_plays_by_its_own',{list:CN_BLOCKED.slice(0,4).map(esc).join(', '),pct:pct(loss)})}</p>`;
|
let h=`<section><h3>${tr('link_panels.behind_the_great_firewall')}</h3><p class="lead">${tr('link_panels.mainland_china_plays_by_its_own',{list:CN_BLOCKED.slice(0,4).map(esc).join(', '),pct:pct(loss)})}</p>`;
|
||||||
if(st==='none')h+=`<p class="lead">${tr('link_panels.foreign_networks_need_a_local_joint')}</p>${btn(tr('link_panels.apply_for_a_license_price_mo',{price:fmt$(CN_LIC),mo:fmt$(CN_JV_MO)}),'applyCn',{},'pink',S.cash<CN_LIC)}`;
|
if(st==='none')h+=`<p class="lead">${tr('link_panels.foreign_networks_need_a_local_joint')}</p>${btn(tr('link_panels.apply_for_a_license_price_mo_n_days',{price:fmt$(CN_LIC),mo:fmt$(CN_JV_MO),n:leadDays(45)}),'applyCn',{},'pink',S.cash<CN_LIC)}`;
|
||||||
else if(st==='pending')h+=`<p class="note">${tr('link_panels.license_paperwork_in_progress_n_days',{n:Math.max(0,S.cnLic.ready-S.day)})}</p>`;
|
else if(st==='pending')h+=`<p class="note">${tr('link_panels.license_paperwork_in_progress_n_days',{n:Math.max(0,S.cnLic.ready-S.day)})}</p>`;
|
||||||
else h+=`<p class="note">${tr('link_panels.your_joint_venture_holds_an')}</p>`;
|
else h+=`<p class="note">${tr('link_panels.your_joint_venture_holds_an')}</p>`;
|
||||||
if(R.gfwCross>0.5)h+=`<div class="kv"><span>${tr('link_panels.your_traffic_crossing_the_border')}</span><b>${fmtG(R.gfwCross)}</b></div><div class="kv"><span>${tr('link_panels.lost_on_the_way')}</span><b style="color:var(--bad)">${fmtG(R.gfwLost)}</b></div>`;
|
if(R.gfwCross>0.5)h+=`<div class="kv"><span>${tr('link_panels.your_traffic_crossing_the_border')}</span><b>${fmtG(R.gfwCross)}</b></div><div class="kv"><span>${tr('link_panels.lost_on_the_way')}</span><b style="color:var(--bad)">${fmtG(R.gfwLost)}</b></div>`;
|
||||||
|
|
|
||||||
|
|
@ -2127,7 +2127,7 @@
|
||||||
"link_panels.add_parallel_link":"Add parallel link",
|
"link_panels.add_parallel_link":"Add parallel link",
|
||||||
"link_panels.additional_traffic_lost":"Additional traffic lost",
|
"link_panels.additional_traffic_lost":"Additional traffic lost",
|
||||||
"link_panels.an_alternate_path_exists_but_current":"An alternate path exists, but current routing and capacity deliver less traffic.",
|
"link_panels.an_alternate_path_exists_but_current":"An alternate path exists, but current routing and capacity deliver less traffic.",
|
||||||
"link_panels.apply_for_a_license_price_mo":"Apply for a license <small>{price} + {mo}/mo · ~45 days</small>",
|
"link_panels.apply_for_a_license_price_mo_n_days":"Apply for a license <small>{price} + {mo}/mo · ~{n} days</small>",
|
||||||
"link_panels.back_in_n_days":"Back in {n} days.",
|
"link_panels.back_in_n_days":"Back in {n} days.",
|
||||||
"link_panels.behind_the_great_firewall":"Behind the Great Firewall",
|
"link_panels.behind_the_great_firewall":"Behind the Great Firewall",
|
||||||
"link_panels.biggest_fabric_money_can_buy":"Biggest fabric money can buy.",
|
"link_panels.biggest_fabric_money_can_buy":"Biggest fabric money can buy.",
|
||||||
|
|
|
||||||
|
|
@ -123,3 +123,14 @@ test('an imported save cannot put HTML in a Flood Season attacker\'s name', () =
|
||||||
assert.equal(dom.window.document.getElementById('pwn2'), null, 'and the toast escapes it anyway');
|
assert.equal(dom.window.document.getElementById('pwn2'), null, 'and the toast escapes it anyway');
|
||||||
assert.deepEqual(errors, []);
|
assert.deepEqual(errors, []);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('the China licence arrives in a tenth of the time with quick lead times, and the button says so', () => {
|
||||||
|
for (const [preset, days] of [['oncall', 45], ['freeze', 5]]) {
|
||||||
|
const { ev, errors } = load();
|
||||||
|
ev(`beginGame('C','fra',{mode:'normal',preset:'${preset}'});if(UI.pendGame)ACT.pitchSkip();S.cash=1e9`);
|
||||||
|
assert.match(ev("tr('link_panels.apply_for_a_license_price_mo_n_days',{price:'$1',mo:'$1',n:leadDays(45)})"), new RegExp(`~${days} days`));
|
||||||
|
ev('ACT.applyCn()');
|
||||||
|
assert.equal(ev('S.cnLic.ready-S.day'), days, preset);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue