Own cables are laid by the lay fleet, never by a repair ship: one list of lay ship names, the one in the toast lays the cable
This commit is contained in:
parent
96e2c2f537
commit
a77eef8ce7
3 changed files with 3 additions and 4 deletions
|
|
@ -22,8 +22,8 @@ const SHIPS=[
|
|||
{id:'tea',n:'Spliced Tea',club:'med',home:'mrs'},
|
||||
];
|
||||
const SHIP=Object.fromEntries(SHIPS.map(s=>[s.id,s]));
|
||||
// The installation fleet lays new cables: your own cable gets one of these, and a second one can be booked.
|
||||
const LAY_SHIPS=['Lay-Z Susan','Long Haul Lass','Reel Estate','Spoolhardy'];
|
||||
// The installation fleet lays new cables (not the repair ships above): your own cable gets one, and a second can be booked.
|
||||
const LAY_SHIPS=['HMS Unplugged','Knot Today','Lay-Z Susan','Long Haul Lass','Reel Estate','Seas the Day','Spoolhardy','Wet Willy'];
|
||||
/* Real numbers, rounded: a cable ship cruises at 10 to 12 knots (about 500 km a day) and leaves within a day of the
|
||||
call; a repair takes 3 to 5 days on site in shallow water and a week or two in deep water; most faults (anchors and
|
||||
fishing gear) are in shallow water near the shore; some countries take weeks to grant a repair permit in their
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Object.assign(ACT,{
|
|||
dfSys:({v})=>{UI.dfSys=v;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);},
|
||||
orderCable:()=>{const p=UI.pending;if(!p)return;const {a,b}=p;if(ownCabWhy(a,b))return;const design=own(SEA_DESIGNS,UI.seaDesign)?UI.seaDesign:'standard',up=seaUps(seaQuote(a,b,design).km),q=seaQuote(a,b,design,up),km=q.km,cost=q.cost+(S.pops[b]?0:popCost(b));if(seaLack(km,up).length||!spend(cost))return;
|
||||
if(!S.pops[b])S.pops[b]={day:S.day,bb:null,boost:0,down:0,routers:1,gen:false,rgen:0};
|
||||
const used=new Set(S.links.map(l=>l.cname).filter(Boolean)),cname=OWNCAB_NAMES.find(n=>!used.has(n))||`${pick(OWNCAB_NAMES)} ${used.size+1}`,ship=pick(OWNCAB_SHIPS),id=uid(),days=q.days;
|
||||
const used=new Set(S.links.map(l=>l.cname).filter(Boolean)),cname=OWNCAB_NAMES.find(n=>!used.has(n))||`${pick(OWNCAB_NAMES)} ${used.size+1}`,id=uid(),ship=layName({id}),days=q.days;
|
||||
S.links.push({id,a,b,kind:'df',own:true,sub:true,seaDesign:design,seaPath:q.pts.map(p=>p.slice()),sys:'roadm',ch:[],km,cable:null,cname,mo:Math.round(km*OWNCAB_OM),trench:'own:'+id,cut:0,day:S.day,ready:S.day+days,spares:false,pairs:1});
|
||||
const laid=S.links[S.links.length-1];laid.paid=q.cost;for(const k of Object.keys(SUB_UPGRADES))if(up[k])laid['sub'+k]=laid.ready;UI.seaDesign='standard';UI.seaterminal=UI.seaengineering=false;
|
||||
S.stats.ownCab=(S.stats.ownCab||0)+1;UI.dfSrc='lease';closeModal();UI.sel={type:'link',id};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
const SEA_DELAYS=[N_('own_cable.a_whale_has_parked_on_the'),N_('own_cable.the_cable_ship_s_coffee_machine'),N_('own_cable.a_fishing_fleet_is_trawling_exactly'),N_('own_cable.the_seabed_survey_found_an_old'),N_('own_cable.storm_season_the_ship_is_sheltering'),N_('own_cable.the_crew_fished_out_somebody_else')];
|
||||
const OWNCAB_LAND=3000000,OWNCAB_KM=6000,OWNCAB_OM=25;
|
||||
const OWNCAB_NAMES=['Big Wet Tube','Davy Jones’ Backhaul','Kraken-1','Mariana Trench Coat','The Wet Ethernet','Sea-ya Later','Deep Pockets Express','Salty Sausage','Poseidon’s Patch Cable','Neptune Neutrality','Moby Disk','Fibre Nemo','The Long Wet Thing','Bermuda Triangle Routing','Seabed & Breakfast','Atlantis Backhaul'];
|
||||
const OWNCAB_SHIPS=['MV Cable Guy','Spool of Thought','Wet Willy','Reel Deal','Splice Girl','Knot Today','Seas the Day','HMS Unplugged'];
|
||||
const landing=c=>!!CITY[c].beach||CABLE_PAIRS.some(p=>p.a===c||p.b===c);
|
||||
const nearLanding=c=>CITIES.filter(x=>x.id!==c&&landing(x.id)).sort((x,y)=>kmBetween(c,x.id)-kmBetween(c,y.id))[0].id;
|
||||
const ownCabKm=(a,b)=>seaRoutes(a,b)[0]?.km||Infinity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue