Hacknet Node Member Variables
The following is a list of member variables for a Hacknet Node object. These variables are read-only, which means you cannot assign
a value to these.
Note that these must be called on an element inside the hacknetnodes array, not the array itself.
+
+-
+
hacknetnodes[i].
name
+Returns the name of the corresponding Hacknet Node
+
+
-
hacknetnodes[i].
level
@@ -234,6 +258,7 @@ Nodes to a level of at least 75, RAM to at least 8GB, and number of cores to at
Advanced Functions
Hacknet Node API
+
Terminal
Keyboard Shortcuts
diff --git a/doc/build/html/objects.inv b/doc/build/html/objects.inv
index d6d011bd1..1269b55f1 100644
Binary files a/doc/build/html/objects.inv and b/doc/build/html/objects.inv differ
diff --git a/doc/build/html/searchindex.js b/doc/build/html/searchindex.js
index 68296e4ad..bf5ca4090 100644
--- a/doc/build/html/searchindex.js
+++ b/doc/build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["index","netscript","netscriptadvancedfunctions","netscriptdatatypes","netscriptfunctions","netscripthacknetnodeapi","netscriptixapi","netscriptloopsandconditionals","netscriptmisc","netscriptoperators","netscriptscriptarguments","netscriptsingularityfunctions","shortcuts","terminal"],envversion:53,filenames:["index.rst","netscript.rst","netscriptadvancedfunctions.rst","netscriptdatatypes.rst","netscriptfunctions.rst","netscripthacknetnodeapi.rst","netscriptixapi.rst","netscriptloopsandconditionals.rst","netscriptmisc.rst","netscriptoperators.rst","netscriptscriptarguments.rst","netscriptsingularityfunctions.rst","shortcuts.rst","terminal.rst"],objects:{"":{applyToCompany:[11,2,1,""],buyStock:[6,2,1,""],cancelOrder:[6,2,1,""],checkFactionInvitations:[11,2,1,""],clearLog:[4,2,1,""],commitCrime:[11,2,1,""],createProgram:[11,2,1,""],deleteServer:[4,2,1,""],disableLog:[4,2,1,""],enableLog:[4,2,1,""],fileExists:[4,2,1,""],getAugmentationCost:[11,2,1,""],getAugmentationsFromFaction:[11,2,1,""],getBitNodeMultipliers:[2,2,1,""],getCompanyFavor:[11,2,1,""],getCompanyRep:[11,2,1,""],getCrimeChance:[11,2,1,""],getFactionFavor:[11,2,1,""],getFactionRep:[11,2,1,""],getGrowTime:[4,2,1,""],getHackTime:[4,2,1,""],getHackingLevel:[4,2,1,""],getHackingMultipliers:[4,2,1,""],getHostname:[4,2,1,""],getNextHacknetNodeCost:[4,2,1,""],getOwnedAugmentations:[11,2,1,""],getPurchasedServers:[4,2,1,""],getScriptExpGain:[4,2,1,""],getScriptIncome:[4,2,1,""],getScriptRam:[4,2,1,""],getServerBaseSecurityLevel:[4,2,1,""],getServerGrowth:[4,2,1,""],getServerMaxMoney:[4,2,1,""],getServerMinSecurityLevel:[4,2,1,""],getServerMoneyAvailable:[4,2,1,""],getServerNumPortsRequired:[4,2,1,""],getServerRam:[4,2,1,""],getServerRequiredHackingLevel:[4,2,1,""],getServerSecurityLevel:[4,2,1,""],getStats:[11,2,1,""],getStockPosition:[6,2,1,""],getStockPrice:[6,2,1,""],getTimeSinceLastAug:[4,2,1,""],getUpgradeHomeRamCost:[11,2,1,""],getWeakenTime:[4,2,1,""],gymWorkout:[11,2,1,""],hasRootAccess:[4,2,1,""],installAugmentations:[11,2,1,""],isBusy:[11,2,1,""],isRunning:[4,2,1,""],joinFaction:[11,2,1,""],placeOrder:[6,2,1,""],purchaseAugmentation:[11,2,1,""],purchaseHacknetNode:[4,2,1,""],purchaseProgram:[11,2,1,""],purchaseServer:[4,2,1,""],purchaseTor:[11,2,1,""],scriptKill:[4,2,1,""],scriptRunning:[4,2,1,""],sellShort:[6,2,1,""],sellStock:[6,2,1,""],serverExists:[4,2,1,""],shortStock:[6,2,1,""],stopAction:[11,2,1,""],travelToCity:[11,2,1,""],universityCourse:[11,2,1,""],upgradeHomeRam:[11,2,1,""],workForCompany:[11,2,1,""],workForFaction:[11,2,1,""]},"hacknetnodes[i]":{cores:[5,1,1,""],getCoreUpgradeCost:[5,0,1,""],getLevelUpgradeCost:[5,0,1,""],getRamUpgradeCost:[5,0,1,""],level:[5,1,1,""],moneyGainRatePerSecond:[5,1,1,""],onlineTimeSeconds:[5,1,1,""],ram:[5,1,1,""],totalMoneyGenerated:[5,1,1,""],upgradeCore:[5,0,1,""],upgradeLevel:[5,0,1,""],upgradeRam:[5,0,1,""]},NetscriptPort:{clear:[8,0,1,""],data:[8,1,1,""],empty:[8,0,1,""],full:[8,0,1,""],tryWrite:[8,0,1,""],write:[8,0,1,""]}},objnames:{"0":["js","method","JavaScript method"],"1":["js","attribute","JavaScript attribute"],"2":["js","function","JavaScript function"]},objtypes:{"0":"js:method","1":"js:attribute","2":"js:function"},terms:{"1e3":13,"50e3":13,"8gb":5,"boolean":[3,4,11],"break":10,"case":[4,6,11,13],"class":[11,12],"default":[4,11,12,13],"export":8,"float":3,"function":[0,1,3,5,6,7,12,13],"import":[0,1,4,13],"long":6,"new":[4,5,8,11,12,13],"null":[4,8],"return":[2,4,5,6,8,9,11,12],"short":6,"static":8,"switch":12,"true":[3,4,5,6,8,9,11],"try":[4,8,10,11],"var":7,"while":[4,5,7,8,11,13],AND:9,Ace:12,Adding:3,And:8,For:[2,3,4,5,7,8,9,10,13],IPs:4,NOT:[4,6,9,11,12,13],Not:11,One:11,The:[0,2,3,4,5,6,7,8,10,11,13],Their:3,Then:[5,8,13],There:8,These:[2,4,5,11,12,13],Use:4,Will:[4,6,12],Yes:4,_termin:[],abbrevi:13,abil:6,abl:11,about:[3,4,8,11,13],abov:[3,4,8,9,13],accept:11,access:[3,4,5,6,8,10,11,13],action:[11,12],activ:[4,12],actual:[4,6,8,11,13],add:[5,13],added:4,addit:[4,5,9,11],address:[4,13],adjac:13,advanc:[0,1],aevum:11,affect:4,afford:4,after:[3,4,6,8,11,13],afterward:13,agenc:[11,12],agent:11,agi:11,agil:11,aid:0,aka:[11,12],algorithm:[6,11],alia:0,alias:13,all:[3,4,5,6,8,11,13],allow:[6,8,11,13],almost:[1,12],alphabet:[4,13],alphanumer:3,alreadi:[4,11,13],also:[3,4,6,10,11,12,13],alt:[12,13],altern:13,although:11,alwai:12,amount:[4,5,6,10,11,13],analyz:[0,12],ani:[0,1,3,4,11,12,13],anoth:[4,8,10,13],anyth:4,anytim:13,anywher:[4,13],api:[0,1],appear:4,append:4,appli:[4,11],applic:11,applytocompani:[0,1],arg:[4,8,10,13],argument:[0,1,4,5,6,8,11,13],arm:11,around:[0,11],arrai:[3,4,5,6,8,10,11],arrow:[12,13],aspect:11,assassin:11,assign:[5,9],assum:8,attack:4,attempt:[6,8,11,13],augment:[4,6,11,12],augmentationmoneycost:2,augmentationrepcost:2,augnam:11,auto:11,autocomplet:12,autolink:11,autom:[5,6],automat:[4,6,11],avail:[3,4,6,7,11,12,13],averag:6,avgpx:6,avgpxshort:6,awai:13,back:8,background:13,backspac:12,base:[4,9],bash:0,basic:[0,1,13],becaus:[2,4,11,13],becom:2,been:0,befor:[4,8],begin:12,being:[4,13],below:4,best:10,beta:0,better:12,between:[2,4,8,12,13],billion:6,binari:[0,1],bind:12,bitburn:1,bitnod:[2,11],bond:11,both:[4,11,13],box:4,brief:[8,13],browser:[11,12],brutessh:[0,1,11,13],bui:[0,6,11],build:6,busi:11,buystock:[0,1],calcul:6,call:[0,4,5,8,10,11,13],callback:11,can:[0,3,4,5,6,7,8,10,11,12,13],cancel:[6,11,12],cancelord:[0,1],cannot:[4,5,13],capabl:3,capit:6,cat:0,caus:4,caveat:7,cbscript:11,certain:[4,6,8,11],cha:11,chanc:[4,11,13],chang:[2,3,4,9,13],charact:[3,11,12],charisma:11,check:[0,4,7,11],checkfactioninvit:[0,1],chongq:11,citi:[11,12],citynam:11,classgymexpgain:2,clear:[0,1,8,12],clearlog:[0,1],click:[4,13],close:[8,12,13],cls:0,code:[4,6,7,8,9,10],color:13,come:13,command:[0,3,4,11,12],comment:[0,1,9],commiss:6,commit:[2,11],commitcrim:[0,1],commonli:13,commun:[6,8],compani:[6,11,12],companynam:11,companyworkexpgain:2,companyworkmonei:2,complet:4,comput:[4,11,13],condit:[0,1],configur:[0,12],confirm:0,connect:0,consol:13,constantli:4,constrain:4,consult:11,contain:[2,3,4,8,11],content:0,continu:11,contract:11,control:11,convert:4,copi:[4,13],core:[5,13],correct:11,correspond:5,cosmet:13,cost:[4,5,6,11,13],could:13,count:[4,13],cours:11,coursenam:11,cpu:13,creat:[4,6,11,12,13],createprogram:[0,1],crime:[2,11],crimeexpgain:2,crimemonei:2,crush:11,ctrl:12,current:[0,2,4,6,11,12,13],cursor:12,cyberpunk:0,cycl:12,dark:[0,11,13],data:[0,1,4,8,11],date:[0,1],deal:[8,11],decim:11,declar:[3,4,7,8,13],decreas:4,decrement:9,deepscanv1:[11,13],deepscanv2:[11,13],def:11,defens:11,defin:[0,1,12,13],definit:8,delai:4,delet:[4,12,13],deleteserv:[0,1],denot:[4,8],depend:4,depth:13,describ:4,descript:13,desir:13,destin:4,detail:[4,13],determin:4,develop:[0,1],dex:11,dexter:11,dialog:4,differ:[2,3,4,12],differenti:13,digit:13,disabl:4,disablelog:[0,1],displai:13,divis:9,document:[4,7,8,11,12,13],doe:[1,4,6,8,9,12,13],doing:[5,8,10],don:[8,11],done:12,doubl:[3,5,13],down:[12,13],download:0,drug:11,due:4,dynam:13,dystopian:0,each:[5,6,11,13],earli:0,earn:[4,5,11],ecp:6,edit:[12,13],editor:[0,13],effect:4,either:[3,4,13],element:[4,5,6,8,10,11],els:[7,8,11],emac:12,embark:0,emploi:[11,12],employe:11,empti:[4,8,13],emul:[12,13],enabl:[4,12,13],enable_bash_hotkei:12,enablelog:[0,1],encapsul:3,end:[4,5,8,11,12],endpoint:8,engin:11,enough:[4,6],enter:[12,13],equal:9,equival:[3,4],error:4,esc:12,especi:4,estim:13,etc:[3,4,10,11,13],evalu:8,even:[4,6,8,9],everi:[4,6,8,11,13],exampl:[0,1,2,3,4,6,7,8,9,10,11,13],exce:6,exceed:4,except:[4,12,13],exchang:[0,1],exe:[4,11,13],exec:[0,1],execut:[4,6,8,13],exist:[4,5,7,13],exit:[0,1],expand:13,experi:[4,11],explain:8,extens:[4,11,13],facnam:11,faction:[11,12],factionnam:11,factionpassiverepgain:2,factionworkexpgain:2,factionworkrepgain:2,fail:[4,11,13],failur:4,fairli:11,fairlyn:11,fals:[3,4,5,6,8,9,11],far:11,favor:11,fconf:[12,13],featur:1,fee:6,feel:1,few:13,ffffff:13,field:11,fieldwork:11,file:[2,4,11,12,13],fileexist:[0,1],filenam:[4,8,13],fill:4,find:4,findindex:8,fine:4,finish:11,first:[3,4,5,6,8,10,11,13],fisg:6,fit:11,fix:4,flag:13,floor:8,fn1:8,fn2:8,follow:[2,3,4,5,7,8,11,13],foo1:[4,8],foo2:[4,8],foo3:[4,8],foo4:8,foo:[4,8,13],foodnstuff:[4,7,8,13],forgeri:11,form:[2,4,13],four:[5,6],fourth:[5,6],free:[0,1],from:[4,6,8,10,11,13],ftpcrack:[0,1,11],full:[8,13],fulli:3,furthermor:4,futur:[2,4,12],gain:[0,4,11],game:[0,2,4,6,8,10,11,13],gener:[4,9,10],get:[4,8,10,11,13],getaugmentationcost:[0,1],getaugmentationsfromfact:[0,1],getbitnodemultipli:[0,1],getcharacterinform:[0,1],getcompanyfavor:[0,1],getcompanyrep:[0,1],getcoreupgradecost:5,getcrimech:[0,1],getfactionfavor:[0,1],getfactionrep:[0,1],getgrowtim:[0,1],gethackinglevel:[0,1],gethackingmultipli:[0,1],gethacktim:[0,1],gethostnam:[0,1],getlevelupgradecost:5,getnexthacknetnodecost:[0,1],getownedaugment:[0,1],getporthandl:8,getpurchasedserv:[0,1],getramupgradecost:5,getscriptexpgain:[0,1],getscriptincom:[0,1],getscriptram:[0,1],getserverbasesecuritylevel:[0,1],getservergrowth:[0,1],getservermaxmonei:[0,1],getserverminsecuritylevel:[0,1],getservermoneyavail:[0,1,7],getservernumportsrequir:[0,1],getserverram:[0,1,8],getserverrequiredhackinglevel:[0,1],getserversecuritylevel:[0,1],getstat:[0,1],getstockposit:[0,1],getstockpric:[0,1],gettimesincelastaug:[0,1],getupgradehomeramcost:[0,1],getweakentim:[0,1],give:[2,4,11],given:[4,6,11,13],global:[4,13],googl:13,grand:11,greater:9,grep:[4,13],grow:[0,1,7],grown:7,growth:4,guarante:11,gym:[11,12],gymnam:11,gymworkout:[0,1],hack:[0,1,7,11,12],hacker:0,hackexpgain:2,hackingcontract:11,hacknet:[0,1,4,12],hacknetnod:[0,1],hacknetnodemonei:2,halt:4,halv:11,hand:13,handl:8,has:[1,2,4,5,11,13],hasrootaccess:[0,1],have:[1,2,4,5,6,8,11,13],header:13,heist:11,helio:4,hello:4,help:0,here:[0,3,4,6,7,8,11,13],hex:13,higher:4,highlight:13,histori:13,hoist:4,hold:3,home:[0,4,11,12],homicid:11,hope:0,hostnam:[0,4],how:[3,4,7,8,13],howev:[4,7,8,13],httpworm:[0,1,11,13],hyphen:3,ident:1,identifi:[4,13],ifconfig:0,immedi:[4,6,11,13],implement:[1,8,12],importantinfo:13,improv:1,includ:[3,4,11,12,13],incom:[4,5],increas:4,increment:[0,9],incur:8,index:[0,4,5],indic:[4,11,13],individu:13,inequ:9,inform:[0,1,4,11,13],initi:3,input:[11,12],insid:[4,5,8],instal:[4,6,11],installaugment:[0,1],instanc:4,instead:[2,4,11],institut:11,instrins:4,integ:[2,3,4,5,6],intellig:11,interact:8,interfac:13,invalid:[4,11],invit:11,iron:11,isbusi:[0,1],ishima:11,isinteg:8,isrun:[0,1],issu:[11,13],item:8,iter:[5,7],its:[4,6,8,13],itself:5,javascript:[0,1,3,4,7],job:[11,12],jobtitl:11,joesgun:4,join:[3,11],joinfact:[0,1],jump3r:0,just:[4,8,13],kei:[12,13],keyboard:[0,13],keyword:7,kidnap:11,kill:[0,1],killal:[0,1],know:8,label:3,languag:[1,3,4],larceni:11,last:[4,8,12],later:[2,3,6,11],lead:0,leadership:11,least:[4,5],left:13,length:[4,5,10],lenient:11,less:9,let:[6,7,8,10,13],letter:[3,6],level:[4,5,11,13],librari:8,life:13,like:[4,8,10,12],limit:[4,6,11],limitbui:6,limitsel:6,line:[8,12],link:[4,13],list:[5,11,13],lit:[4,13],literatur:[4,13],local:4,locat:[4,11],log:[4,5,8,12,13],logic:9,look:[8,10],loop:[0,1],lose:8,lot:11,lower:4,lscpu:0,machin:13,made:[6,13],mai:[4,13],make:[4,10],manag:11,mani:[1,3,11],manual:11,manualhackmonei:2,map:5,mark:13,market:6,masterscript:13,match:13,math:[0,1],matter:13,max:5,maximum:[4,13],mayb:8,mean:[0,1,2,3,4,5,8,11],mechan:13,mem:0,member:[0,1,3,11],memori:[4,13],menu:[12,13],messag:[0,4,13],method:[0,1,3,8],middl:11,millenium:11,millisecond:4,minimum:4,minut:11,misc:0,miscellan:[0,1],mission:12,mode:[4,12],modifi:10,modul:[0,1],modulo:9,monei:[0,2,4,5,6,7,11,13],moneygainratepersecond:5,more:[3,4,7,12,13],most:3,move:12,msg:[4,13],much:[7,13],mug:11,mult:[2,4],multi:8,multipl:[4,9,13],multipli:[2,4,11],must:[3,4,5,6,8,11,12,13],mute:13,mysteri:0,name:[3,4,5,6,9,10,11,13],namespac:8,nano:[0,12],navig:[0,13],nearest:[4,5,6],necessari:[0,13],need:[4,8,13],negat:9,net:6,netscript:0,netscriptport:8,network:[11,13],newli:4,next:[4,12],node:[0,1,4,12,13],non:13,none:[4,5],normal:[8,10,11],notabl:4,note:[4,5,8,11,12,13],now:[0,8,13],nuke:[0,1,13],num:13,number:[0,1,3,4,5,6,9,10,11,13],numer:[3,6,9],numthread:[4,8],object:[2,3,4,5,11],obtain:4,obvious:11,offlin:4,omit:[4,13],onc:13,one:[4,5,7,8,11],onli:[2,4,5,6,8,9,11,12,13],onlin:4,onlinetimesecond:5,onto:3,open:[4,8,11,12,13],oper:[0,1,8,10],operand:9,option:[4,11,12,13],order:[2,4,6,11,13],origin:2,other:[4,8,11,12],otherwis:[4,5,6,7,8,11,12,13],our:8,oustand:[6,11],out:[1,4,8,11],output:4,outsid:[4,11],over:4,overrid:12,overwrit:4,own:[0,1,6,13],page:[0,2,4,8,11,12,13],param:[],paramet:[4,13],pars:8,part:[11,13],particular:11,pass:[4,8,10,11,13],path:13,pattern:13,peek:[0,1,8],percentag:4,perform:11,perman:13,picker:13,place:6,placeord:[0,1],plai:0,plan:10,player:[0,4,5,6,10,11,13],pop:[3,8],port:[0,1,4,13],pos:6,posit:[3,5,6,11],possibl:10,pound:13,power:[0,4],powerhous:11,pre:9,preced:13,preset:[12,13],prevent:10,previou:12,price:6,primit:3,print:[0,1,2,5,8,11,13],process:4,produc:9,profit:6,program:[1,4,11,12,13],programnam:11,promot:11,prompt:[0,1],properti:11,protocol:6,provid:[5,6],pserv:4,purchas:[4,5,6,11,13],purchaseaugment:[0,1],purchasehacknetnod:[0,1,5],purchaseprogram:[0,1],purchaseserv:[0,1],purchasetor:[0,1],purpos:[3,4],put:[2,9],quest:0,queue:[4,8],quickli:4,quot:3,quotat:13,rais:4,ram:[4,5,8,11,13],ramus:4,ran:[4,8,13],rate:4,rather:13,reach:[1,13],read:[0,1,3,5,8],real:13,reason:4,receiv:[2,11],recommend:11,refer:[3,7],referenc:3,reflect:6,regardless:4,rel:13,relat:[4,8,13],relaysmtp:[0,1,11],relev:2,reload:8,rememb:[4,6,13],remot:13,remov:[4,8,13],replac:13,repres:[2,3,4,6,8,13],reput:11,request:1,requir:[2,4,8,9,11,13],res:[4,8,11],reset:[4,6,11],resolv:4,respect:13,rest:3,restart:11,result:[4,9],retain:6,reusabl:13,revert:4,right:8,rob:11,role:0,room:8,root:[4,13],rothman:[4,11],round:[4,5,6],router:[11,13],rpg:0,run:[0,1,2,7,8,9,10,11],runtim:4,sai:[4,10],sake:8,sale:6,same:[4,7,8,11,12,13],save:[8,12],scan:[0,1],schedul:11,scheme:13,scienc:11,scope:4,scp:[0,1],screen:[12,13],script:[0,1,4,5,6,8,11,13],scripthackmonei:2,scriptkil:[0,1],scriptnam:4,scriptrun:[0,1],search:[0,4],second:[3,4,5,6,10,11,13],secret:0,section:[1,4],sector:11,secur:[4,11],securitywork:11,see:[4,5,7,13],select:4,sell:6,sellshort:[0,1],sellstock:[0,1],sensit:[4,6,11,13],separ:[2,4,13],sequenc:[3,6],serial:[4,8],server:[4,7,13],serverexist:[0,1],servergrowthr:2,servermaxmonei:2,serverprofil:11,serverstartingmonei:2,serverstartingsecur:2,serverweakenr:2,set:[4,11,12,13],sever:8,share:6,sharesshort:6,she:0,shell:12,shoplift:11,shortcut:[0,13],shortstock:[0,1],should:[4,7,11,13],show:[3,4,7,13],shown:[4,13],side:13,sigma:13,sign:13,signatur:4,signific:4,similar:4,simpl:[7,8],simplest:4,simpli:[1,3],simplic:8,sinc:[4,8],singl:[3,4,9,13],singular:[0,1],skill:4,sleep:[0,1,5,8,11],slice:8,small:11,snap:11,softwar:11,solar:13,sold:6,some:[4,7,8,9,11],some_valu:4,someth:0,someval1:8,someval2:8,sort:[4,8],sourc:[2,4,11],space:[12,13],spawn:[0,1],special:[3,5,10,11],specif:[4,8],specifi:[4,5,6,8,10,11,13],speed:4,splice:3,spoiler:[2,11],sprintf:[0,1],sqlinject:[0,1,11],stage:0,stai:4,start:[3,4,8,11,13],stat:[11,12],statement:7,statist:[6,13],steal:4,still:[4,13],stock:6,stolen:4,stop:[4,6,11,13],stopact:[0,1],stopbui:6,stopsel:6,store:[3,11],str:11,strategi:6,strength:11,strict:9,string:[3,4,6,11,13],structur:[2,4,8],strucur:11,studi:11,subject:2,subset:1,substitut:13,substr:4,subtract:9,success:[4,6,11],successfulli:[4,5,6,8,11,13],sudov:0,suggest:1,sum:4,summit:11,support:[3,5,6,8,13],suppos:8,suspend:4,suspicion:0,sym:6,symbol:6,syntax:[1,4,8],system:6,tab:[12,13],tail:0,take:[0,4,11,12,13],target:[4,13],technolog:11,templat:4,ten:7,term:11,termin:[0,4,11],test:4,testlib:8,testlibrari:8,text:[3,4,13],than:[4,7,9,13],theft:11,thei:[1,2,4,12,13],them:[4,8,11],theme:0,thi:[0,1,2,3,4,5,6,8,9,10,11,12,13],thing:13,third:[4,6],those:[4,5],though:[4,8],thought:3,thread:[4,10,11,13],three:[3,4,8,12,13],through:[4,5,8,11,12,13],time:[4,5,7,8,11,13],timework:11,tini:1,tix:[0,1],todo:13,tokyo:11,tolowercas:3,top:0,tor:[11,13],total:[4,5,13],totalmoneygener:5,totalram:4,tprint:[0,1,8],trade:[0,1],traffick:11,train:[11,12],transact:6,travel:[11,12],traveltoc:[0,1],travers:7,tri:[4,5,13],trywrit:8,tutori:12,two:[4,6,8,9,10,11],txt:[4,13],type:[0,1,4,6,11,13],typic:4,unalia:0,unalias_terminal_command:[],unari:[0,1],uncov:0,underli:[4,8],underscor:3,undo:13,undon:13,uni:4,uniqu:[4,13],univeristi:11,univers:[11,12],universitycours:[0,1],universitynam:11,unknown:0,unless:12,unlock:[6,11],until:[4,5,11],untyp:3,updat:11,upgrad:[5,11],upgradecor:5,upgradehomeram:[0,1],upgradelevel:5,upgraderam:5,usag:[4,8,13],use:[4,6,7,8,11,13],used:[1,3,4,5,6,8,11,12,13],user:13,uses:7,using:[4,5,6,7,8,10,11,13],usual:11,utc:8,valid:[4,8,11,13],valu:[2,3,4,5,6,8,9,11,13],vari:4,variabl:[0,1,4,7,9,13],variou:[11,12],vim:12,visit:[6,11],volhaven:11,vsprintf:[0,1],wai:[4,5,8,11,13],wait:8,waiter:11,want:[5,8,10,11,13],warn:[9,10,11,13],weaken:[0,1],web:[11,13],well:[3,12,13],were:[4,11,12,13],wese:6,what:[4,5,11,13],whatev:11,when:[0,1,4,7,8,11,13],where:[0,4,8,12],whether:[4,6,11,13],which:[3,4,5,6,8,11,13],whitespac:4,whose:13,window:12,without:[4,8,13],word:[4,12,13],work:[4,6,8,9,11,12,13],workagiexpgain:11,workchaexpgain:11,workdefexpgain:11,workdexexpgain:11,workforcompani:[0,1],workforfact:[0,1],workhackexpgain:11,workmoneygain:11,workrepgain:11,workstrexpgain:11,worktyp:11,world:[0,1,4,6],worm:13,would:[2,9,10,11,13],write:[0,1,5,6,8],written:[1,4,8],wrong:0,wrote:8,wse:6,yet:[4,11],you:[0,1,2,3,4,5,6,7,8,9,11,12,13],your:[0,1,5,6,11,12,13],yourself:5,zero:4,zip:13},titles:["Welcome to Bitburner's documentation!","Netscript Documentation","Netscript Advanced Functions","Netscript Data Types and Variables","Netscript Basic Functions","Netscript Hacknet Node API","Netscript Trade Information eXchange (TIX) API","Netscript Loops and Conditionals","Netscript Miscellaneous","Netscript Operators","Netscript Script Arguments","Netscript Singularity Functions","Keyboard Shortcuts","Terminal"],titleterms:{"function":[2,4,8,11],"import":8,advanc:2,alia:13,analyz:13,api:[5,6],applytocompani:11,argument:10,bash:12,basic:4,binari:9,bitburn:0,brutessh:4,bui:13,buystock:6,cancelord:6,cat:13,check:13,checkfactioninvit:11,clear:[4,13],clearlog:4,cls:13,command:13,comment:8,commitcrim:11,condit:7,configur:13,connect:13,createprogram:11,data:3,date:8,defin:4,deleteserv:4,disablelog:4,document:[0,1],download:13,editor:12,enablelog:4,exampl:5,exchang:6,exec:4,exit:4,fileexist:4,free:13,ftpcrack:4,game:12,getaugmentationcost:11,getaugmentationsfromfact:11,getbitnodemultipli:2,getcharacterinform:11,getcompanyfavor:11,getcompanyrep:11,getcrimech:11,getfactionfavor:11,getfactionrep:11,getgrowtim:4,gethackinglevel:4,gethackingmultipli:4,gethacktim:4,gethostnam:4,getnexthacknetnodecost:4,getownedaugment:11,getpurchasedserv:4,getscriptexpgain:4,getscriptincom:4,getscriptram:4,getserverbasesecuritylevel:4,getservergrowth:4,getservermaxmonei:4,getserverminsecuritylevel:4,getservermoneyavail:4,getservernumportsrequir:4,getserverram:4,getserverrequiredhackinglevel:4,getserversecuritylevel:4,getstat:11,getstockposit:6,getstockpric:6,gettimesincelastaug:4,getupgradehomeramcost:11,getweakentim:4,grow:4,gymworkout:11,hack:[4,13],hacknet:5,hacknetnod:5,handl:[],hasrootaccess:4,help:13,home:13,hostnam:13,httpworm:4,ifconfig:13,indic:0,inform:6,installaugment:11,isbusi:11,isrun:4,javascript:8,joinfact:11,keyboard:12,kill:[4,13],killal:[4,13],loop:7,lscpu:13,math:8,mem:13,member:5,method:5,misc:12,miscellan:8,modul:8,nano:13,navig:12,netscript:[1,2,3,4,5,6,7,8,9,10,11],node:5,nuke:4,number:8,oper:9,own:4,peek:4,placeord:6,port:8,print:4,prompt:4,purchaseaugment:11,purchasehacknetnod:4,purchaseprogram:11,purchaseserv:4,purchasetor:11,read:4,relaysmtp:4,round:[],run:[4,13],scan:[4,13],scp:[4,13],script:[10,12],scriptkil:4,scriptrun:4,sellshort:6,sellstock:6,serverexist:4,shortcut:12,shortstock:6,singular:11,sleep:4,spawn:4,sprintf:4,sqlinject:4,stopact:11,sudov:13,tabl:0,tail:13,termin:[12,13],theme:13,tix:6,top:13,tprint:4,trade:6,traveltoc:11,type:3,unalia:13,unari:9,universitycours:11,upgradehomeram:11,usag:[],variabl:[3,5],vsprintf:4,weaken:4,welcom:0,what:0,workforcompani:11,workforfact:11,write:4,your:4}})
\ No newline at end of file
+Search.setIndex({docnames:["index","netscript","netscriptadvancedfunctions","netscriptdatatypes","netscriptfunctions","netscripthacknetnodeapi","netscriptixapi","netscriptloopsandconditionals","netscriptmisc","netscriptoperators","netscriptscriptarguments","netscriptsingularityfunctions","shortcuts","terminal"],envversion:53,filenames:["index.rst","netscript.rst","netscriptadvancedfunctions.rst","netscriptdatatypes.rst","netscriptfunctions.rst","netscripthacknetnodeapi.rst","netscriptixapi.rst","netscriptloopsandconditionals.rst","netscriptmisc.rst","netscriptoperators.rst","netscriptscriptarguments.rst","netscriptsingularityfunctions.rst","shortcuts.rst","terminal.rst"],objects:{"":{applyToCompany:[11,2,1,""],buyStock:[6,2,1,""],cancelOrder:[6,2,1,""],checkFactionInvitations:[11,2,1,""],clearLog:[4,2,1,""],commitCrime:[11,2,1,""],createProgram:[11,2,1,""],deleteServer:[4,2,1,""],disableLog:[4,2,1,""],enableLog:[4,2,1,""],fileExists:[4,2,1,""],getAugmentationCost:[11,2,1,""],getAugmentationsFromFaction:[11,2,1,""],getBitNodeMultipliers:[2,2,1,""],getCompanyFavor:[11,2,1,""],getCompanyRep:[11,2,1,""],getCrimeChance:[11,2,1,""],getFactionFavor:[11,2,1,""],getFactionRep:[11,2,1,""],getGrowTime:[4,2,1,""],getHackTime:[4,2,1,""],getHackingLevel:[4,2,1,""],getHackingMultipliers:[4,2,1,""],getHostname:[4,2,1,""],getNextHacknetNodeCost:[4,2,1,""],getOwnedAugmentations:[11,2,1,""],getPurchasedServers:[4,2,1,""],getScriptExpGain:[4,2,1,""],getScriptIncome:[4,2,1,""],getScriptName:[4,2,1,""],getScriptRam:[4,2,1,""],getServerBaseSecurityLevel:[4,2,1,""],getServerGrowth:[4,2,1,""],getServerMaxMoney:[4,2,1,""],getServerMinSecurityLevel:[4,2,1,""],getServerMoneyAvailable:[4,2,1,""],getServerNumPortsRequired:[4,2,1,""],getServerRam:[4,2,1,""],getServerRequiredHackingLevel:[4,2,1,""],getServerSecurityLevel:[4,2,1,""],getStats:[11,2,1,""],getStockPosition:[6,2,1,""],getStockPrice:[6,2,1,""],getTimeSinceLastAug:[4,2,1,""],getUpgradeHomeRamCost:[11,2,1,""],getWeakenTime:[4,2,1,""],gymWorkout:[11,2,1,""],hasRootAccess:[4,2,1,""],installAugmentations:[11,2,1,""],isBusy:[11,2,1,""],isRunning:[4,2,1,""],joinFaction:[11,2,1,""],placeOrder:[6,2,1,""],purchaseAugmentation:[11,2,1,""],purchaseHacknetNode:[4,2,1,""],purchaseProgram:[11,2,1,""],purchaseServer:[4,2,1,""],purchaseTor:[11,2,1,""],scriptKill:[4,2,1,""],scriptRunning:[4,2,1,""],sellShort:[6,2,1,""],sellStock:[6,2,1,""],serverExists:[4,2,1,""],shortStock:[6,2,1,""],stopAction:[11,2,1,""],travelToCity:[11,2,1,""],universityCourse:[11,2,1,""],upgradeHomeRam:[11,2,1,""],workForCompany:[11,2,1,""],workForFaction:[11,2,1,""]},"hacknetnodes[i]":{cores:[5,1,1,""],getCoreUpgradeCost:[5,0,1,""],getLevelUpgradeCost:[5,0,1,""],getRamUpgradeCost:[5,0,1,""],level:[5,1,1,""],moneyGainRatePerSecond:[5,1,1,""],name:[5,1,1,""],onlineTimeSeconds:[5,1,1,""],ram:[5,1,1,""],totalMoneyGenerated:[5,1,1,""],upgradeCore:[5,0,1,""],upgradeLevel:[5,0,1,""],upgradeRam:[5,0,1,""]},NetscriptPort:{clear:[8,0,1,""],data:[8,1,1,""],empty:[8,0,1,""],full:[8,0,1,""],tryWrite:[8,0,1,""],write:[8,0,1,""]}},objnames:{"0":["js","method","JavaScript method"],"1":["js","attribute","JavaScript attribute"],"2":["js","function","JavaScript function"]},objtypes:{"0":"js:method","1":"js:attribute","2":"js:function"},terms:{"1e3":13,"50e3":13,"8gb":5,"boolean":[3,4,11],"break":10,"case":[4,6,11,13],"class":[11,12],"default":[4,11,12,13],"export":8,"float":3,"function":[0,1,3,5,6,7,12,13],"import":[0,1,4,13],"long":6,"new":[4,5,8,11,12,13],"null":[4,8],"return":[2,4,5,6,8,9,11,12],"short":6,"static":8,"switch":12,"true":[3,4,5,6,8,9,11],"try":[4,8,10,11],"var":7,"while":[4,5,7,8,11,13],AND:9,Ace:12,Adding:3,And:8,For:[2,3,4,5,7,8,9,10,13],IPs:4,NOT:[4,6,9,11,12,13],Not:11,One:11,The:[0,2,3,4,5,6,7,8,10,11,13],Their:3,Then:[5,8,13],There:8,These:[2,4,5,11,12,13],Use:4,Will:[4,6,12],Yes:4,_termin:[],abbrevi:13,abil:6,abl:11,about:[3,4,8,11,13],abov:[3,4,8,9,13],accept:11,access:[3,4,5,6,8,10,11,13],action:[11,12],activ:[4,12],actual:[4,6,8,11,13],add:[5,13],added:4,addit:[4,5,9,11],address:[4,13],adjac:13,advanc:[0,1],aevum:11,affect:4,afford:[4,5],after:[3,4,6,8,11,13],afterward:13,agenc:[11,12],agent:11,agi:11,agil:11,aid:0,aka:[11,12],algorithm:[6,11],alia:0,alias:13,all:[3,4,5,6,8,11,13],allow:[6,8,11,13],almost:[1,12],alphabet:[4,13],alphanumer:3,alreadi:[4,11,13],also:[3,4,6,10,11,12,13],alt:[12,13],altern:13,although:11,alwai:12,amount:[4,5,6,10,11,13],analyz:[0,12],ani:[0,1,3,4,11,12,13],anoth:[4,8,10,13],anyth:4,anytim:13,anywher:[4,13],api:[0,1],appear:4,append:4,appli:[4,11],applic:11,applytocompani:[0,1],arg:[4,8,10,13],argument:[0,1,4,5,6,8,11,13],arm:11,around:[0,11],arrai:[3,4,5,6,8,10,11],arrow:[12,13],aspect:11,assassin:11,assign:[5,9],assum:8,attack:4,attempt:[6,8,11,13],augment:[4,6,11,12],augmentationmoneycost:2,augmentationrepcost:2,augnam:11,auto:11,autocomplet:12,autolink:11,autom:[5,6],automat:[4,6,11],avail:[3,4,6,7,11,12,13],averag:6,avgpx:6,avgpxshort:6,awai:13,back:8,background:13,backspac:12,base:[4,9],bash:0,basic:[0,1,13],becaus:[2,4,11,13],becom:2,been:0,befor:[4,8],begin:12,being:[4,13],below:4,best:10,beta:0,better:12,between:[2,4,8,12,13],billion:6,binari:[0,1],bind:12,bitburn:1,bitnod:[2,11],bond:11,both:[4,11,13],box:4,brief:[8,13],browser:[11,12],brutessh:[0,1,11,13],bui:[0,6,11],build:6,busi:11,buystock:[0,1],calcul:6,call:[0,4,5,8,10,11,13],callback:11,can:[0,3,4,5,6,7,8,10,11,12,13],cancel:[6,11,12],cancelord:[0,1],cannot:[4,5,13],capabl:3,capit:6,cat:0,caus:4,caveat:7,cbscript:11,certain:[4,6,8,11],cha:11,chanc:[4,11,13],chang:[2,3,4,9,13],charact:[3,11,12],charisma:11,check:[0,4,7,11],checkfactioninvit:[0,1],chongq:11,citi:[11,12],citynam:11,classgymexpgain:2,clear:[0,1,8,12],clearlog:[0,1],click:[4,13],close:[8,12,13],cls:0,code:[4,6,7,8,9,10],color:13,come:13,command:[0,3,4,11,12],comment:[0,1,9],commiss:6,commit:[2,11],commitcrim:[0,1],commonli:13,commun:[6,8],compani:[6,11,12],companynam:11,companyworkexpgain:2,companyworkmonei:2,complet:4,comput:[4,11,13],condit:[0,1],configur:[0,12],confirm:0,connect:0,consol:13,constantli:4,constrain:4,consult:11,contain:[2,3,4,8,11],content:0,continu:11,contract:11,control:11,convert:4,copi:[4,13],core:[5,13],correct:11,correspond:5,cosmet:13,cost:[4,5,6,11,13],could:13,count:[4,13],cours:11,coursenam:11,cpu:13,creat:[4,6,11,12,13],createprogram:[0,1],crime:[2,11],crimeexpgain:2,crimemonei:2,crush:11,ctrl:12,current:[0,2,4,6,11,12,13],cursor:12,cyberpunk:0,cycl:12,dark:[0,11,13],data:[0,1,4,8,11],date:[0,1],deal:[8,11],decim:11,declar:[3,4,7,8,13],decreas:4,decrement:9,deepscanv1:[11,13],deepscanv2:[11,13],def:11,defens:11,defin:[0,1,12,13],definit:8,delai:4,delet:[4,12,13],deleteserv:[0,1],denot:[4,8],depend:4,depth:13,describ:4,descript:13,desir:13,destin:4,detail:[4,13],determin:4,develop:[0,1],dex:11,dexter:11,dialog:4,differ:[2,3,4,12],differenti:13,digit:13,disabl:4,disablelog:[0,1],displai:13,divis:9,document:[4,7,8,11,12,13],doe:[1,4,6,8,9,12,13],doing:[5,8,10],don:[8,11],done:12,doubl:[3,5,13],down:[12,13],download:0,drug:11,due:4,dynam:13,dystopian:0,each:[5,6,11,13],earli:0,earn:[4,5,11],ecp:6,edit:[12,13],editor:[0,13],effect:4,either:[3,4,13],element:[4,5,6,8,10,11],els:[7,8,11],emac:12,embark:0,emploi:[11,12],employe:11,empti:[4,8,13],emul:[12,13],enabl:[4,12,13],enable_bash_hotkei:12,enablelog:[0,1],encapsul:3,end:[4,5,8,11,12],endpoint:8,engin:11,enough:[4,6],enter:[12,13],equal:9,equival:[3,4,5],error:4,esc:12,especi:4,estim:13,etc:[3,4,10,11,13],evalu:8,even:[4,6,8,9],everi:[4,6,8,11,13],exampl:[0,1,2,3,4,6,7,8,9,10,11,13],exce:6,exceed:4,except:[4,12,13],exchang:[0,1],exe:[4,11,13],exec:[0,1],execut:[4,6,8,13],exist:[4,5,7,13],exit:[0,1],expand:13,experi:[4,11],explain:8,extens:[4,11,13],facnam:11,faction:[11,12],factionnam:11,factionpassiverepgain:2,factionworkexpgain:2,factionworkrepgain:2,fail:[4,11,13],failur:4,fairli:11,fairlyn:11,fals:[3,4,5,6,8,9,11],far:11,favor:11,fconf:[12,13],featur:1,fee:6,feel:1,few:13,ffffff:13,field:11,fieldwork:11,file:[2,4,11,12,13],fileexist:[0,1],filenam:[4,8,13],fill:4,find:4,findindex:8,fine:4,finish:11,first:[3,4,5,6,8,10,11,13],fisg:6,fit:11,fix:4,flag:13,floor:8,fn1:8,fn2:8,follow:[2,3,4,5,7,8,11,13],foo1:[4,8],foo2:[4,8],foo3:[4,8],foo4:8,foo:[4,8,13],foodnstuff:[4,7,8,13],forgeri:11,form:[2,4,13],four:[5,6],fourth:[5,6],free:[0,1],from:[4,6,8,10,11,13],ftpcrack:[0,1,11],full:[8,13],fulli:3,furthermor:4,futur:[2,4,12],gain:[0,4,11],game:[0,2,4,6,8,10,11,13],gener:[4,9,10],get:[4,8,10,11,13],getaugmentationcost:[0,1],getaugmentationsfromfact:[0,1],getbitnodemultipli:[0,1],getcharacterinform:[0,1],getcompanyfavor:[0,1],getcompanyrep:[0,1],getcoreupgradecost:5,getcrimech:[0,1],getfactionfavor:[0,1],getfactionrep:[0,1],getgrowtim:[0,1],gethackinglevel:[0,1],gethackingmultipli:[0,1],gethacktim:[0,1],gethostnam:[0,1],getlevelupgradecost:5,getnexthacknetnodecost:[0,1,5],getownedaugment:[0,1],getporthandl:8,getpurchasedserv:[0,1],getramupgradecost:5,getscriptexpgain:[0,1],getscriptincom:[0,1],getscriptnam:[0,1],getscriptram:[0,1],getserverbasesecuritylevel:[0,1],getservergrowth:[0,1],getservermaxmonei:[0,1],getserverminsecuritylevel:[0,1],getservermoneyavail:[0,1,7],getservernumportsrequir:[0,1],getserverram:[0,1,8],getserverrequiredhackinglevel:[0,1],getserversecuritylevel:[0,1],getstat:[0,1],getstockposit:[0,1],getstockpric:[0,1],gettimesincelastaug:[0,1],getupgradehomeramcost:[0,1],getweakentim:[0,1],give:[2,4,11],given:[4,6,11,13],global:[4,13],googl:13,grand:11,greater:9,grep:[4,13],grow:[0,1,7],grown:7,growth:4,guarante:11,gym:[11,12],gymnam:11,gymworkout:[0,1],hack:[0,1,7,11,12],hacker:0,hackexpgain:2,hackingcontract:11,hacknet:[0,1,4,12],hacknetnod:[0,1],hacknetnodemonei:2,halt:4,halv:11,hand:13,handl:8,has:[1,2,4,5,11,13],hasrootaccess:[0,1],have:[1,2,4,5,6,8,11,13],header:13,heist:11,helio:4,hello:4,help:0,here:[0,3,4,6,7,8,11,13],hex:13,higher:4,highlight:13,histori:13,hoist:4,hold:3,home:[0,4,11,12],homicid:11,hope:0,hostnam:[0,4],how:[3,4,7,8,13],howev:[4,7,8,13],httpworm:[0,1,11,13],hyphen:3,ident:1,identifi:[4,13],ifconfig:0,immedi:[4,6,11,13],implement:[1,8,12],importantinfo:13,improv:1,includ:[3,4,11,12,13],incom:[4,5],increas:4,increment:[0,9],incur:8,index:[0,4,5],indic:[4,11,13],individu:13,inequ:9,inform:[0,1,4,11,13],initi:3,input:[11,12],insid:[4,5,8],instal:[4,6,11],installaugment:[0,1],instanc:4,instead:[2,4,11],institut:11,instrins:4,integ:[2,3,4,5,6],intellig:11,interact:8,interfac:13,invalid:[4,11],invit:11,iron:11,isbusi:[0,1],ishima:11,isinteg:8,isrun:[0,1],issu:[11,13],item:8,iter:[5,7],its:[4,6,8,13],itself:5,javascript:[0,1,3,4,7],job:[11,12],jobtitl:11,joesgun:4,join:[3,11],joinfact:[0,1],jump3r:0,just:[4,8,13],kei:[12,13],keyboard:[0,13],keyword:7,kidnap:11,kill:[0,1],killal:[0,1],know:8,label:3,languag:[1,3,4],larceni:11,last:[4,8,12],later:[2,3,6,11],lead:0,leadership:11,least:[4,5],left:13,length:[4,5,10],lenient:11,less:9,let:[6,7,8,10,13],letter:[3,6],level:[4,5,11,13],librari:8,life:13,like:[4,8,10,12],limit:[4,6,11],limitbui:6,limitsel:6,line:[8,12],link:[4,13],list:[5,11,13],lit:[4,13],literatur:[4,13],local:4,locat:[4,11],log:[4,5,8,12,13],logic:9,look:[8,10],loop:[0,1],lose:8,lot:11,lower:4,lscpu:0,machin:13,made:[6,13],mai:[4,13],make:[4,10],manag:11,mani:[1,3,11],manual:11,manualhackmonei:2,map:5,mark:13,market:6,masterscript:13,match:13,math:[0,1],matter:13,max:5,maximum:[4,13],mayb:8,mean:[0,1,2,3,4,5,8,11],mechan:13,mem:0,member:[0,1,3,11],memori:[4,13],menu:[12,13],messag:[0,4,13],method:[0,1,3,8],middl:11,millenium:11,millisecond:4,minimum:4,minut:11,misc:0,miscellan:[0,1],mission:12,mode:[4,12],modifi:10,modul:[0,1],modulo:9,monei:[0,2,4,5,6,7,11,13],moneygainratepersecond:5,more:[3,4,7,12,13],most:3,move:12,msg:[4,13],much:[7,13],mug:11,mult:[2,4],multi:8,multipl:[4,9,13],multipli:[2,4,11],must:[3,4,5,6,8,11,12,13],mute:13,mysteri:0,name:[3,4,5,6,9,10,11,13],namespac:8,nano:[0,12],navig:[0,13],nearest:[4,5,6],necessari:[0,13],need:[4,8,13],negat:9,net:6,netscript:0,netscriptport:8,network:[11,13],newli:4,next:[4,12],node:[0,1,4,12,13],non:13,none:[4,5],normal:[8,10,11],notabl:4,note:[4,5,8,11,12,13],now:[0,8,13],nuke:[0,1,13],num:13,number:[0,1,3,4,5,6,9,10,11,13],numer:[3,6,9],numthread:[4,8],object:[2,3,4,5,11],obtain:4,obvious:11,offlin:4,omit:[4,13],onc:13,one:[4,5,7,8,11],onli:[2,4,5,6,8,9,11,12,13],onlin:4,onlinetimesecond:5,onto:3,open:[4,8,11,12,13],oper:[0,1,8,10],operand:9,option:[4,11,12,13],order:[2,4,6,11,13],origin:2,other:[4,8,11,12],otherwis:[4,5,6,7,8,11,12,13],our:8,oustand:[6,11],out:[1,4,8,11],output:4,outsid:[4,11],over:4,overrid:12,overwrit:4,own:[0,1,6,13],page:[0,2,4,8,11,12,13],param:[],paramet:[4,13],pars:8,part:[11,13],particular:11,pass:[4,8,10,11,13],path:13,pattern:13,peek:[0,1,8],percentag:4,perform:11,perman:13,picker:13,place:6,placeord:[0,1],plai:0,plan:10,player:[0,4,5,6,10,11,13],pop:[3,8],port:[0,1,4,13],pos:6,posit:[3,5,6,11],possibl:10,pound:13,power:[0,4],powerhous:11,pre:9,preced:13,preset:[12,13],prevent:10,previou:12,price:6,primit:3,print:[0,1,2,5,8,11,13],process:4,produc:9,profit:6,program:[1,4,11,12,13],programnam:11,promot:11,prompt:[0,1],properti:11,protocol:6,provid:[5,6],pserv:4,purchas:[0,1,4,6,11,13],purchaseaugment:[0,1],purchasehacknetnod:[0,1,5],purchaseprogram:[0,1],purchaseserv:[0,1],purchasetor:[0,1],purpos:[3,4],put:[2,9],quest:0,queue:[4,8],quickli:4,quot:3,quotat:13,rais:4,ram:[4,5,8,11,13],ramus:4,ran:[4,8,13],rate:4,rather:13,reach:[1,13],read:[0,1,3,5,8],real:13,reason:4,receiv:[2,11],recommend:11,refer:[3,7],referenc:3,reflect:6,regardless:4,rel:13,relat:[4,8,13],relaysmtp:[0,1,11],relev:2,reload:8,rememb:[4,6,13],remot:13,remov:[4,8,13],replac:13,repres:[2,3,4,6,8,13],reput:11,request:1,requir:[2,4,8,9,11,13],res:[4,8,11],reset:[4,6,11],resolv:4,respect:13,rest:3,restart:11,result:[4,9],retain:6,reusabl:13,revert:4,right:8,rob:11,role:0,room:8,root:[4,13],rothman:[4,11],round:[4,5,6],router:[11,13],rpg:0,run:[0,1,2,7,8,9,10,11],runtim:4,sai:[4,10],sake:8,sale:6,same:[4,7,8,11,12,13],save:[8,12],scan:[0,1],schedul:11,scheme:13,scienc:11,scope:4,scp:[0,1],screen:[12,13],script:[0,1,4,5,6,8,11,13],scripthackmonei:2,scriptkil:[0,1],scriptnam:4,scriptrun:[0,1],search:[0,4],second:[3,4,5,6,10,11,13],secret:0,section:[1,4],sector:11,secur:[4,11],securitywork:11,see:[4,5,7,13],select:4,sell:6,sellshort:[0,1],sellstock:[0,1],sensit:[4,6,11,13],separ:[2,4,13],sequenc:[3,6],serial:[4,8],server:[4,7,13],serverexist:[0,1],servergrowthr:2,servermaxmonei:2,serverprofil:11,serverstartingmonei:2,serverstartingsecur:2,serverweakenr:2,set:[4,11,12,13],sever:8,share:6,sharesshort:6,she:0,shell:12,shoplift:11,shortcut:[0,13],shortstock:[0,1],should:[4,7,11,13],show:[3,4,7,13],shown:[4,13],side:13,sigma:13,sign:13,signatur:4,signific:4,similar:4,simpl:[7,8],simplest:4,simpli:[1,3],simplic:8,sinc:[4,8],singl:[3,4,9,13],singular:[0,1],skill:4,sleep:[0,1,5,8,11],slice:8,small:11,snap:11,softwar:11,solar:13,sold:6,some:[4,7,8,9,11],some_valu:4,someth:0,someval1:8,someval2:8,sort:[4,8],sourc:[2,4,11],space:[12,13],spawn:[0,1],special:[3,5,10,11],specif:[4,8],specifi:[4,5,6,8,10,11,13],speed:4,splice:3,spoiler:[2,11],sprintf:[0,1],sqlinject:[0,1,11],stage:0,stai:4,start:[3,4,8,11,13],stat:[11,12],statement:7,statist:[6,13],steal:4,still:[4,13],stock:6,stolen:4,stop:[4,6,11,13],stopact:[0,1],stopbui:6,stopsel:6,store:[3,11],str:11,strategi:6,strength:11,strict:9,string:[3,4,6,11,13],structur:[2,4,8],strucur:11,studi:11,subject:2,subset:1,substitut:13,substr:4,subtract:9,success:[4,6,11],successfulli:[4,5,6,8,11,13],sudov:0,suggest:1,sum:4,summit:11,support:[3,5,6,8,13],suppos:8,suspend:4,suspicion:0,sym:6,symbol:6,syntax:[1,4,8],system:6,tab:[12,13],tail:0,take:[0,4,11,12,13],target:[4,13],technolog:11,templat:4,ten:7,term:11,termin:[0,4,11],test:4,testlib:8,testlibrari:8,text:[3,4,13],than:[4,7,9,13],theft:11,thei:[1,2,4,12,13],them:[4,8,11],theme:0,thi:[0,1,2,3,4,5,6,8,9,10,11,12,13],thing:13,third:[4,6],those:[4,5],though:[4,8],thought:3,thread:[4,10,11,13],three:[3,4,8,12,13],through:[4,5,8,11,12,13],time:[4,5,7,8,11,13],timework:11,tini:1,tix:[0,1],todo:13,tokyo:11,tolowercas:3,top:0,tor:[11,13],total:[4,5,13],totalmoneygener:5,totalram:4,tprint:[0,1,8],trade:[0,1],traffick:11,train:[11,12],transact:6,travel:[11,12],traveltoc:[0,1],travers:7,tri:[4,5,13],trywrit:8,tutori:12,two:[4,6,8,9,10,11],txt:[4,13],type:[0,1,4,6,11,13],typic:4,unalia:0,unalias_terminal_command:[],unari:[0,1],uncov:0,underli:[4,8],underscor:3,undo:13,undon:13,uni:4,uniqu:[4,13],univeristi:11,univers:[11,12],universitycours:[0,1],universitynam:11,unknown:0,unless:12,unlock:[6,11],until:[4,5,11],untyp:3,updat:11,upgrad:[5,11],upgradecor:5,upgradehomeram:[0,1],upgradelevel:5,upgraderam:5,usag:[4,8,13],use:[4,6,7,8,11,13],used:[1,3,4,5,6,8,11,12,13],user:13,uses:7,using:[4,5,6,7,8,10,11,13],usual:11,utc:8,valid:[4,8,11,13],valu:[2,3,4,5,6,8,9,11,13],vari:4,variabl:[0,1,4,7,9,13],variou:[11,12],vim:12,visit:[6,11],volhaven:11,vsprintf:[0,1],wai:[4,5,8,11,13],wait:8,waiter:11,want:[5,8,10,11,13],warn:[9,10,11,13],weaken:[0,1],web:[11,13],well:[3,12,13],were:[4,11,12,13],wese:6,what:[4,5,11,13],whatev:11,when:[0,1,4,7,8,11,13],where:[0,4,8,12],whether:[4,6,11,13],which:[3,4,5,6,8,11,13],whitespac:4,whose:13,window:12,without:[4,8,13],word:[4,12,13],work:[4,6,8,9,11,12,13],workagiexpgain:11,workchaexpgain:11,workdefexpgain:11,workdexexpgain:11,workforcompani:[0,1],workforfact:[0,1],workhackexpgain:11,workmoneygain:11,workrepgain:11,workstrexpgain:11,worktyp:11,world:[0,1,4,6],worm:13,would:[2,9,10,11,13],write:[0,1,5,6,8],written:[1,4,8],wrong:0,wrote:8,wse:6,yet:[4,11],you:[0,1,2,3,4,5,6,7,8,9,11,12,13],your:[0,1,5,6,11,12,13],yourself:5,zero:4,zip:13},titles:["Welcome to Bitburner's documentation!","Netscript Documentation","Netscript Advanced Functions","Netscript Data Types and Variables","Netscript Basic Functions","Netscript Hacknet Node API","Netscript Trade Information eXchange (TIX) API","Netscript Loops and Conditionals","Netscript Miscellaneous","Netscript Operators","Netscript Script Arguments","Netscript Singularity Functions","Keyboard Shortcuts","Terminal"],titleterms:{"function":[2,4,8,11],"import":8,advanc:2,alia:13,analyz:13,api:[5,6],applytocompani:11,argument:10,bash:12,basic:4,binari:9,bitburn:0,brutessh:4,bui:13,buystock:6,cancelord:6,cat:13,check:13,checkfactioninvit:11,clear:[4,13],clearlog:4,cls:13,command:13,comment:8,commitcrim:11,condit:7,configur:13,connect:13,createprogram:11,data:3,date:8,defin:4,deleteserv:4,disablelog:4,document:[0,1],download:13,editor:12,enablelog:4,exampl:5,exchang:6,exec:4,exit:4,fileexist:4,free:13,ftpcrack:4,game:12,getaugmentationcost:11,getaugmentationsfromfact:11,getbitnodemultipli:2,getcharacterinform:11,getcompanyfavor:11,getcompanyrep:11,getcrimech:11,getfactionfavor:11,getfactionrep:11,getgrowtim:4,gethackinglevel:4,gethackingmultipli:4,gethacktim:4,gethostnam:4,getnexthacknetnodecost:4,getownedaugment:11,getpurchasedserv:4,getscriptexpgain:4,getscriptincom:4,getscriptnam:4,getscriptram:4,getserverbasesecuritylevel:4,getservergrowth:4,getservermaxmonei:4,getserverminsecuritylevel:4,getservermoneyavail:4,getservernumportsrequir:4,getserverram:4,getserverrequiredhackinglevel:4,getserversecuritylevel:4,getstat:11,getstockposit:6,getstockpric:6,gettimesincelastaug:4,getupgradehomeramcost:11,getweakentim:4,grow:4,gymworkout:11,hack:[4,13],hacknet:5,hacknetnod:5,handl:[],hasrootaccess:4,help:13,home:13,hostnam:13,httpworm:4,ifconfig:13,indic:0,inform:6,installaugment:11,isbusi:11,isrun:4,javascript:8,joinfact:11,keyboard:12,kill:[4,13],killal:[4,13],loop:7,lscpu:13,math:8,mem:13,member:5,method:5,misc:12,miscellan:8,modul:8,nano:13,navig:12,netscript:[1,2,3,4,5,6,7,8,9,10,11],node:5,nuke:4,number:8,oper:9,own:4,peek:4,placeord:6,port:8,print:4,prompt:4,purchas:5,purchaseaugment:11,purchasehacknetnod:4,purchaseprogram:11,purchaseserv:4,purchasetor:11,read:4,relaysmtp:4,round:[],run:[4,13],scan:[4,13],scp:[4,13],script:[10,12],scriptkil:4,scriptrun:4,sellshort:6,sellstock:6,serverexist:4,shortcut:12,shortstock:6,singular:11,sleep:4,spawn:4,sprintf:4,sqlinject:4,stopact:11,sudov:13,tabl:0,tail:13,termin:[12,13],theme:13,tix:6,top:13,tprint:4,trade:6,traveltoc:11,type:3,unalia:13,unari:9,universitycours:11,upgradehomeram:11,usag:[],variabl:[3,5],vsprintf:4,weaken:4,welcom:0,what:0,workforcompani:11,workforfact:11,write:4,your:4}})
\ No newline at end of file
diff --git a/doc/source/netscriptfunctions.rst b/doc/source/netscriptfunctions.rst
index 7402830d9..6515412b4 100644
--- a/doc/source/netscriptfunctions.rst
+++ b/doc/source/netscriptfunctions.rst
@@ -783,6 +783,7 @@ getScriptName
^^^^^^^^^^^^^
.. js:function:: getScriptName()
+
Returns the current script name
getScriptRam
diff --git a/src/ActiveScriptsUI.js b/src/ActiveScriptsUI.js
index ab389bc4b..d559251f3 100644
--- a/src/ActiveScriptsUI.js
+++ b/src/ActiveScriptsUI.js
@@ -6,7 +6,7 @@ import {getServer} from "./Server.js";
import {dialogBoxCreate} from "../utils/DialogBox.js";
import {printArray, createElement,
createAccordionElement, removeElement,
- removeChildrenFromElement} from "../utils/HelperFunctions.js";
+ removeChildrenFromElement, exceptionAlert} from "../utils/HelperFunctions.js";
import {logBoxCreate} from "../utils/LogBox.js";
import numeral from "../utils/numeral.min.js";
import {formatNumber} from "../utils/StringHelperFunctions.js";
@@ -22,58 +22,64 @@ import {formatNumber} from "../utils/StringHelperF
* ...
*/
let ActiveScriptsUI = {};
+let ActiveScriptsTasks = []; //Sequentially schedule the creation/deletion of UI elements
function createActiveScriptsServerPanel(server) {
- let hostname = server.hostname;
- if (ActiveScriptsUI[hostname] != null) {
- console.log("WARNING: Tried to create already-existing Active Scripts Server panel. Aborting");
- return;
- }
- var activeScriptsList = document.getElementById("active-scripts-list");
+ ActiveScriptsTasks.push(function(server) {
+ let hostname = server.hostname;
- let res = createAccordionElement({hdrText:hostname});
- let li = res[0];
- var hdr = res[1];
- let panel = res[2];
+ var activeScriptsList = document.getElementById("active-scripts-list");
- var panelScriptList = createElement("ul");
- panel.appendChild(panelScriptList);
- activeScriptsList.appendChild(li);
+ let res = createAccordionElement({hdrText:hostname});
+ let li = res[0];
+ var hdr = res[1];
+ let panel = res[2];
- ActiveScriptsUI[hostname] = {
- header: hdr,
- panel: panel,
- panelList: panelScriptList,
- scripts: {}, //Holds references to li elements for each active script
- scriptHdrs: {}, //Holds references to header elements for each active script
- scriptStats: {} //Holds references to the p elements containing text for each active script
- };
+ if (ActiveScriptsUI[hostname] != null) {
+ console.log("WARNING: Tried to create already-existing Active Scripts Server panel. This is most likely fine. It probably means many scripts just got started up on a new server. Aborting");
+ return;
+ }
- return li;
+ var panelScriptList = createElement("ul");
+ panel.appendChild(panelScriptList);
+ activeScriptsList.appendChild(li);
+
+ ActiveScriptsUI[hostname] = {
+ header: hdr,
+ panel: panel,
+ panelList: panelScriptList,
+ scripts: {}, //Holds references to li elements for each active script
+ scriptHdrs: {}, //Holds references to header elements for each active script
+ scriptStats: {} //Holds references to the p elements containing text for each active script
+ };
+
+ return li;
+ }.bind(null, server));
}
//Deletes the info for a particular server (Dropdown header + Panel with all info)
//in the Active Scripts page if it exists
function deleteActiveScriptsServerPanel(server) {
- let hostname = server.hostname;
- if (ActiveScriptsUI[hostname] == null) {
- console.log("WARNING: Tried to delete non-existent Active Scripts Server panel. Aborting");
- return;
- }
+ ActiveScriptsTasks.push(function(server) {
+ let hostname = server.hostname;
+ if (ActiveScriptsUI[hostname] == null) {
+ console.log("WARNING: Tried to delete non-existent Active Scripts Server panel. Aborting");
+ return;
+ }
- //Make sure it's empty
- if (Object.keys(ActiveScriptsUI[hostname].scripts).length > 0) {
- console.log("WARNING: Tried to delete Active Scripts Server panel that still has scripts. Aborting");
- return;
- }
+ //Make sure it's empty
+ if (Object.keys(ActiveScriptsUI[hostname].scripts).length > 0) {
+ console.log("WARNING: Tried to delete Active Scripts Server panel that still has scripts. Aborting");
+ return;
+ }
- removeElement(ActiveScriptsUI[hostname].panel);
- removeElement(ActiveScriptsUI[hostname].header);
- delete ActiveScriptsUI[hostname];
+ removeElement(ActiveScriptsUI[hostname].panel);
+ removeElement(ActiveScriptsUI[hostname].header);
+ delete ActiveScriptsUI[hostname];
+ }.bind(null, server));
}
function addActiveScriptsItem(workerscript) {
- //Get server panel
var server = getServer(workerscript.serverIp);
if (server == null) {
console.log("ERROR: Invalid server IP for workerscript in addActiveScriptsItem()");
@@ -84,96 +90,116 @@ function addActiveScriptsItem(workerscript) {
createActiveScriptsServerPanel(server);
}
- //Create the unique identifier (key) for this script
- var itemNameArray = ["active", "scripts", server.hostname, workerscript.name];
- for (var i = 0; i < workerscript.args.length; ++i) {
- itemNameArray.push(String(workerscript.args[i]));
- }
- var itemName = itemNameArray.join("-");
-
- let res = createAccordionElement({hdrText:workerscript.name});
- let li = res[0];
- let hdr = res[1];
- let panel = res[2];
-
- hdr.classList.remove("accordion-header");
- hdr.classList.add("active-scripts-script-header");
- panel.classList.remove("accordion-panel");
- panel.classList.add("active-scripts-script-panel");
-
- //Handle the constant elements on the panel that don't change after creation
- //Threads, args, kill/log button
- panel.appendChild(createElement("p", {
- innerHTML: "Threads: " + workerscript.scriptRef.threads + "
" +
- "Args: " + printArray(workerscript.args)
- }));
- var panelText = createElement("p", {
- innerText:"Loading...", fontSize:"14px",
- });
- updateActiveScriptsText(workerscript, panelText, itemName);
- panel.appendChild(panelText);
- panel.appendChild(createElement("br"));
- panel.appendChild(createElement("span", {
- innerText:"Log", class:"active-scripts-button", margin:"4px", padding:"4px",
- clickListener:()=>{
- logBoxCreate(workerscript.scriptRef);
- return false;
+ ActiveScriptsTasks.push(function(workerscript, hostname) {
+ //Create the unique identifier (key) for this script
+ var itemNameArray = ["active", "scripts", hostname, workerscript.name];
+ for (var i = 0; i < workerscript.args.length; ++i) {
+ itemNameArray.push(String(workerscript.args[i]));
}
- }));
- panel.appendChild(createElement("span", {
- innerText:"Kill Script", class:"active-scripts-button", margin:"4px", padding:"4px",
- clickListener:()=>{
- killWorkerScript(workerscript.scriptRef, workerscript.scriptRef.scriptRef.server);
- dialogBoxCreate("Killing script, may take a few minutes to complete...");
- return false;
- }
- }));
+ var itemName = itemNameArray.join("-");
- //Append element to list
- ActiveScriptsUI[hostname]["panelList"].appendChild(li);
- ActiveScriptsUI[hostname].scripts[itemName] = li;
- ActiveScriptsUI[hostname].scriptHdrs[itemName] = hdr;
- ActiveScriptsUI[hostname].scriptStats[itemName] = panelText;
+ let res = createAccordionElement({hdrText:workerscript.name});
+ let li = res[0];
+ let hdr = res[1];
+ let panel = res[2];
+
+ hdr.classList.remove("accordion-header");
+ hdr.classList.add("active-scripts-script-header");
+ panel.classList.remove("accordion-panel");
+ panel.classList.add("active-scripts-script-panel");
+
+ //Handle the constant elements on the panel that don't change after creation
+ //Threads, args, kill/log button
+ panel.appendChild(createElement("p", {
+ innerHTML: "Threads: " + workerscript.scriptRef.threads + "
" +
+ "Args: " + printArray(workerscript.args)
+ }));
+ var panelText = createElement("p", {
+ innerText:"Loading...", fontSize:"14px",
+ });
+ panel.appendChild(panelText);
+ panel.appendChild(createElement("br"));
+ panel.appendChild(createElement("span", {
+ innerText:"Log", class:"active-scripts-button", margin:"4px", padding:"4px",
+ clickListener:()=>{
+ logBoxCreate(workerscript.scriptRef);
+ return false;
+ }
+ }));
+ panel.appendChild(createElement("span", {
+ innerText:"Kill Script", class:"active-scripts-button", margin:"4px", padding:"4px",
+ clickListener:()=>{
+ killWorkerScript(workerscript.scriptRef, workerscript.scriptRef.scriptRef.server);
+ dialogBoxCreate("Killing script, may take a few minutes to complete...");
+ return false;
+ }
+ }));
+
+ //Append element to list
+ ActiveScriptsUI[hostname]["panelList"].appendChild(li);
+ ActiveScriptsUI[hostname].scripts[itemName] = li;
+ ActiveScriptsUI[hostname].scriptHdrs[itemName] = hdr;
+ ActiveScriptsUI[hostname].scriptStats[itemName] = panelText;
+ }.bind(null, workerscript, hostname));
}
function deleteActiveScriptsItem(workerscript) {
- var server = getServer(workerscript.serverIp);
- if (server == null) {
- console.log("ERROR: Invalid server IP for workerscript.");
- return;
- }
- let hostname = server.hostname;
- if (ActiveScriptsUI[hostname] == null) {
- console.log("ERROR: Trying to delete Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: " + hostname);
- return;
- }
+ ActiveScriptsTasks.push(function(workerscript) {
+ var server = getServer(workerscript.serverIp);
+ if (server == null) {
+ console.log("ERROR: Invalid server IP for workerscript.");
+ return;
+ }
+ let hostname = server.hostname;
+ if (ActiveScriptsUI[hostname] == null) {
+ console.log("ERROR: Trying to delete Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: " + hostname);
+ return;
+ }
- var itemNameArray = ["active", "scripts", server.hostname, workerscript.name];
- for (var i = 0; i < workerscript.args.length; ++i) {
- itemNameArray.push(String(workerscript.args[i]));
- }
- var itemName = itemNameArray.join("-");
+ var itemNameArray = ["active", "scripts", server.hostname, workerscript.name];
+ for (var i = 0; i < workerscript.args.length; ++i) {
+ itemNameArray.push(String(workerscript.args[i]));
+ }
+ var itemName = itemNameArray.join("-");
- let li = ActiveScriptsUI[hostname].scripts[itemName];
- if (li == null) {
- console.log("ERROR: Cannot find Active Script UI element for workerscript: ");
- console.log(workerscript);
- return;
- }
- removeElement(li);
- delete ActiveScriptsUI[hostname].scripts[itemName];
- delete ActiveScriptsUI[hostname].scriptHdrs[itemName];
- delete ActiveScriptsUI[hostname].scriptStats[itemName];
- if (Object.keys(ActiveScriptsUI[hostname].scripts).length === 0) {
- deleteActiveScriptsServerPanel(server);
- }
+ let li = ActiveScriptsUI[hostname].scripts[itemName];
+ if (li == null) {
+ console.log("ERROR: Cannot find Active Script UI element for workerscript: ");
+ console.log(workerscript);
+ return;
+ }
+ removeElement(li);
+ delete ActiveScriptsUI[hostname].scripts[itemName];
+ delete ActiveScriptsUI[hostname].scriptHdrs[itemName];
+ delete ActiveScriptsUI[hostname].scriptStats[itemName];
+ if (Object.keys(ActiveScriptsUI[hostname].scripts).length === 0) {
+ deleteActiveScriptsServerPanel(server);
+ }
+ }.bind(null, workerscript));
}
//Update the ActiveScriptsItems array
function updateActiveScriptsItems() {
+ //Run tasks that need to be done sequentially (adding items, creating/deleting server panels)
+ //We'll limit this to 50 at a time in case someone decides to start a bunch of scripts all at once...
+ let numTasks = Math.min(50, ActiveScriptsTasks.length);
+ for (let i = 0; i < numTasks; ++i) {
+ let task = ActiveScriptsTasks.shift();
+ try {
+ task();
+ } catch(e) {
+ exceptionAlert(e);
+ console.log(task);
+ }
+ }
+
var total = 0;
for (var i = 0; i < workerScripts.length; ++i) {
- total += updateActiveScriptsItemContent(workerScripts[i]);
+ try {
+ total += updateActiveScriptsItemContent(workerScripts[i]);
+ } catch(e) {
+ exceptionAlert(e);
+ }
}
document.getElementById("active-scripts-total-prod").innerHTML =
"Total online production of Active Scripts: " + numeral(total).format('$0.000a') + " / sec
" +
@@ -192,8 +218,7 @@ function updateActiveScriptsItemContent(workerscript) {
}
let hostname = server.hostname;
if (ActiveScriptsUI[hostname] == null) {
- console.log("ERROR: Trying to update Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: " + hostname);
- return;
+ return; //Hasn't been created yet. We'll skip it
}
var itemNameArray = ["active", "scripts", server.hostname, workerscript.name];
@@ -201,6 +226,10 @@ function updateActiveScriptsItemContent(workerscript) {
itemNameArray.push(String(workerscript.args[i]));
}
var itemName = itemNameArray.join("-");
+
+ if (ActiveScriptsUI[hostname].scriptStats[itemName] == null) {
+ return; //Hasn't been fully added yet. We'll skip it
+ }
var item = ActiveScriptsUI[hostname].scriptStats[itemName];
//Update the text if necessary. This fn returns the online $/s production
@@ -214,7 +243,7 @@ function updateActiveScriptsText(workerscript, item, itemName) {
return;
}
let hostname = server.hostname;
- if (ActiveScriptsUI[hostname] == null) {
+ if (ActiveScriptsUI[hostname] == null || ActiveScriptsUI[hostname].scriptHdrs[itemName] == null) {
console.log("ERROR: Trying to update Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: " + hostname);
return;
}
diff --git a/src/Constants.js b/src/Constants.js
index 436da1be7..10a5d2e3e 100644
--- a/src/Constants.js
+++ b/src/Constants.js
@@ -691,6 +691,7 @@ let CONSTANTS = {
"hostname/ip, regardless of arguments. Returns true if one or more scripts were successfully killed, and false if there were none.
" +
"The first argument must be a string with the name of the script. The script name is case sensitive. The second argument is " +
"a string with the hostname or IP of the target server. Both arguments are required.
" +
+ "
getScriptName()Returns the filename of the current script (including the extension)
" +
"
getScriptRam(scriptname, hostname/ip)Returns the amount of RAM required to run the specified script on the " +
"target server. The first argument must be a string with the name of the script. The script name is case sensitive. " +
"The second argument is a string with the hostname or IP of the server where that script is. Both arguments are required.
" +
@@ -1143,11 +1144,16 @@ let CONSTANTS = {
"* Bladeburner Changes:
" +
"** Bug Fix: You can no longer get Bladeburner faction reputation through Infiltration
" +
"** Initial difficulty of Tracking contracts reduced
" +
- "* Crime, Infiltration, and Hacking are now slightly more profitable in BN-6
" +
+ "** Datamancer skill effect increased from 4% per level to 5%
" +
+ "* Crime, Infiltration, and Hacking are now slightly more profitable in BN-6
" +
+ "* Added getScriptName() Netscript function (added by Github user hydroflame)
" +
+ "* There is now a soft-cap on stock price, which means it's no longer possible for the price of a stock to reach insanely-high values
" +
"* The ctrl+b hotkey in the text editor is now also triggered by command+b or winkey+b
" +
"* Many servers now have additional RAM
" +
"* Added an option to disable hotkeys/keyboard shortcuts
" +
"* Refactored 'Active Scripts' UI page to optimize its performance
" +
+ "* Added a new .fconf setting: ENABLE_TIMESTAMP
" +
+ "* Bug Fix: Fixed a typo in the Fulcrum Technologies company name (Technolgies -> Technologies)
" +
"v0.36.0
" +
"* Added BN-6: Bladeburners
" +
"* Rebalanced many combat Augmentations so that they are slightly less powerful
" +
diff --git a/src/Fconf.js b/src/Fconf.js
index 68c6abc48..ac8cf8afc 100644
--- a/src/Fconf.js
+++ b/src/Fconf.js
@@ -1,7 +1,8 @@
import {parse, Node} from "../utils/acorn.js";
var FconfSettings = {
- ENABLE_BASH_HOTKEYS: false
+ ENABLE_BASH_HOTKEYS: false,
+ ENABLE_TIMESTAMPS: false,
}
var FconfComments = {
@@ -12,6 +13,8 @@ var FconfComments = {
"shortcuts.\n\n" +
"To see a full list of the Terminal shortcuts that this enables, see:\n" +
"http://bitburner.readthedocs.io/en/latest/shortcuts.html",
+ ENABLE_TIMESTAMPS: "Terminal commands and log entries will be timestamped. The timestamp\n" +
+ "will have the format: M/D h:m",
}
//Parse Fconf settings from the config text
@@ -70,6 +73,7 @@ function parseFconfSetting(setting, value) {
//Needed to convert entered value to boolean/strings accordingly
switch(setting) {
case "ENABLE_BASH_HOTKEYS":
+ case "ENABLE_TIMESTAMPS":
var value = value.toLowerCase();
if (value === "1" || value === "true" || value === "y") {
value = true;
@@ -105,14 +109,19 @@ function createFconf() {
} else {
value = String(FconfSettings[setting]);
}
- res += (setting + "=" + value + "\n");
+ res += (setting + "=" + value + "\n\n");
}
}
return res;
}
function loadFconf(saveString) {
- FconfSettings = JSON.parse(saveString);
+ let tempFconfSettings = JSON.parse(saveString);
+ for (var setting in tempFconfSettings) {
+ if (tempFconfSettings.hasOwnProperty(setting)) {
+ FconfSettings[setting] = tempFconfSettings[setting];
+ }
+ }
}
export {FconfSettings, createFconf, parseFconfSettings, loadFconf}
diff --git a/src/Gang.js b/src/Gang.js
index 22f45deb6..e7a5494ae 100644
--- a/src/Gang.js
+++ b/src/Gang.js
@@ -1170,12 +1170,24 @@ function updateGangContent() {
for (var gangname in AllGangs) {
if (AllGangs.hasOwnProperty(gangname)) {
var gangTerritoryInfo = AllGangs[gangname];
+ let territory = gangTerritoryInfo.territory*100;
+
+ //Fix some rounding issues graphically
+ let displayNumber;
+ if (territory <= 0) {
+ displayNumber = formatNumber(0, 2);
+ } else if (territory >= 100) {
+ displayNumber = formatNumber(100, 2);
+ } else {
+ displayNumber = formatNumber(territory, 2);
+ }
+
if (gangname == Player.gang.facName) {
gangTerritoryInfoText.innerHTML += ("
" + gangname + "(Power: " + formatNumber(gangTerritoryInfo.power, 6) + "): " +
- formatNumber(100*gangTerritoryInfo.territory, 2) + "%
");
+ displayNumber + "%
");
} else {
gangTerritoryInfoText.innerHTML += (gangname + "
(Power: " + formatNumber(gangTerritoryInfo.power, 6) + "): " +
- formatNumber(100*gangTerritoryInfo.territory, 2) + "%
");
+ displayNumber + "%
");
}
}
}
@@ -1227,10 +1239,19 @@ function updateGangContent() {
}));
gangInfo.appendChild(createElement("br", {}));
- var territoryMult = AllGangs[Player.gang.facName].territory;
+ //Fix some rounding issues graphically
+ var territoryMult = AllGangs[Player.gang.facName].territory * 100;
+ let displayNumber;
+ if (territoryMult <= 0) {
+ displayNumber = formatNumber(0, 2);
+ } else if (territoryMult >= 100) {
+ displayNumber = formatNumber(100, 2);
+ } else {
+ displayNumber = formatNumber(territoryMult, 2);
+ }
gangInfo.appendChild(createElement("p", { //Territory multiplier
display:"inline-block",
- innerText:"Territory: " + formatNumber(territoryMult * 100, 3) + "%",
+ innerText:"Territory: " + formatNumber(displayNumber, 3) + "%",
tooltip:"The percentage of total territory your Gang controls"
}));
gangInfo.appendChild(createElement("br", {}));
diff --git a/src/Location.js b/src/Location.js
index 24048d836..37cdd30e2 100644
--- a/src/Location.js
+++ b/src/Location.js
@@ -52,7 +52,7 @@ var Locations = {
AevumECorp: "ECorp",
AevumBachmanAndAssociates: "Bachman & Associates",
AevumClarkeIncorporated: "Clarke Incorporated",
- AevumFulcrumTechnologies: "Fulcrum Technolgies",
+ AevumFulcrumTechnologies: "Fulcrum Technologies",
AevumAeroCorp: "AeroCorp",
AevumGalacticCybersystems: "Galactic Cybersystems",
AevumWatchdogSecurity: "Watchdog Security",
diff --git a/src/Script.js b/src/Script.js
index dc0228cb7..38d770554 100644
--- a/src/Script.js
+++ b/src/Script.js
@@ -18,7 +18,7 @@ const walk = require("acorn/dist/walk");
import {CONSTANTS} from "./Constants.js";
import {Engine} from "./engine.js";
-import {parseFconfSettings} from "./Fconf.js";
+import {FconfSettings, parseFconfSettings} from "./Fconf.js";
import {iTutorialSteps, iTutorialNextStep,
iTutorialIsRunning, currITutorialStep} from "./InteractiveTutorial.js";
import {evaluateImport} from "./NetscriptEvaluator.js";
@@ -28,7 +28,7 @@ import {addWorkerScript, killWorkerScript,
import {Player} from "./Player.js";
import {AllServers, processSingleServerGrowth} from "./Server.js";
import {Settings} from "./Settings.js";
-import {post} from "./Terminal.js";
+import {post, Terminal} from "./Terminal.js";
import {TextFile} from "./TextFile.js";
import {parse, Node} from "../utils/acorn.js";
@@ -595,7 +595,7 @@ function calculateRamUsage(codeCopy) {
}
//Search through AST, scanning for any 'Identifier' nodes for functions, or While/For/If nodes
- var queue = [], ramUsage = 1.4;
+ var queue = [], ramUsage = CONSTANTS.ScriptBaseRamCost;
var whileUsed = false, forUsed = false, ifUsed = false;
queue.push(ast);
while (queue.length != 0) {
@@ -859,7 +859,11 @@ RunningScript.prototype.log = function(txt) {
//to improve performance
this.logs.shift();
}
- this.logs.push(txt);
+ let logEntry = txt;
+ if (FconfSettings.ENABLE_TIMESTAMPS) {
+ logEntry = "[" + Terminal.getTimestamp() + "] " + logEntry;
+ }
+ this.logs.push(logEntry);
this.logUpd = true;
}
diff --git a/src/StockMarket.js b/src/StockMarket.js
index 139a46397..7a060111a 100644
--- a/src/StockMarket.js
+++ b/src/StockMarket.js
@@ -19,7 +19,8 @@ import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
yesNoTxtInpBoxGetInput, yesNoBoxClose,
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox.js";
-/* StockMarket.js */
+let StockPriceCap = 1e9; //Put a limit on how high a price can go
+
function Stock(name, symbol, mv, b, otlkMag, initPrice=10000) {
this.symbol = symbol;
this.name = name;
@@ -580,6 +581,10 @@ function updateStockPrices() {
chc = (chc - stock.otlkMag)/100;
if (isNaN(chc)) {chc = 0.5;}
}
+ if (stock.price >= StockPriceCap) {
+ chc = -1; //Limit on stock price
+ stock.b = false;
+ }
var c = Math.random();
if (c < chc) {
diff --git a/src/Terminal.js b/src/Terminal.js
index 4af264ed7..c783b4442 100644
--- a/src/Terminal.js
+++ b/src/Terminal.js
@@ -110,7 +110,12 @@ $(document).keydown(function(event) {
event.preventDefault(); //Prevent newline from being entered in Script Editor
var command = $('input[class=terminal-input]').val();
if (command.length > 0) {
- post("[" + Player.getCurrentServer().hostname + " ~]> " + command);
+ post(
+ "[" +
+ (FconfSettings.ENABLE_TIMESTAMPS ? Terminal.getTimestamp() + " " : "") +
+ Player.getCurrentServer().hostname +
+ " ~]> " + command
+ );
Terminal.resetTerminalInput(); //Clear input first
Terminal.executeCommand(command);
@@ -632,6 +637,11 @@ let Terminal = {
}
},
+ getTimestamp: function() {
+ let d = new Date();
+ return (d.getMonth() + "/" + d.getDay() + " " + d.getHours() + ":" + d.getMinutes());
+ },
+
finishAction: function(cancelled = false) {
if (Terminal.hackFlag) {
Terminal.finishHack(cancelled);