diff --git a/src/Constants.ts b/src/Constants.ts index fddfc3a55..76751c02e 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -237,6 +237,9 @@ export let CONSTANTS: IMap = { Netscript * Ace editor will now correctly highlight all functions. + Gang + * style improvements + Sleeve * karma gain now scales with sync. ` diff --git a/src/Gang.js b/src/Gang.js index e2018a8ee..3cea9b1e3 100644 --- a/src/Gang.js +++ b/src/Gang.js @@ -1934,10 +1934,10 @@ Gang.prototype.updateGangMemberDisplayElement = function(memberObj) { var gainInfo = document.getElementById(name + "gang-member-gain-info"); if (gainInfo) { gainInfo.innerHTML = - [`Money: $ ${formatNumber(5*memberObj.calculateMoneyGain(this), 2)} / sec`, - `Respect: ${formatNumber(5*memberObj.calculateRespectGain(this), 6)} / sec`, - `Wanted Level: ${formatNumber(5*memberObj.calculateWantedLevelGain(this), 6)} / sec`, - `Total Respect Earned: ${formatNumber(memberObj.earnedRespect, 6)}`].join("
"); + [`Money: ${numeralWrapper.format(5*memberObj.calculateMoneyGain(this), '$0.000a')} / sec`, + `Respect: ${numeralWrapper.format(5*memberObj.calculateRespectGain(this), '0.00000a')} / sec`, + `Wanted Level: ${numeralWrapper.format(5*memberObj.calculateWantedLevelGain(this), '0.00000a')} / sec`, + `Total Respect Earned: ${numeralWrapper.format(memberObj.earnedRespect, '0.00000a')}`].join("
"); } // Update selector to have the correct task diff --git a/src/ScriptEditor/AceNetscriptMode.js b/src/ScriptEditor/AceNetscriptMode.js index 88c21ccd2..1b2cd81c0 100644 --- a/src/ScriptEditor/AceNetscriptMode.js +++ b/src/ScriptEditor/AceNetscriptMode.js @@ -60,11 +60,12 @@ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; let functions = (function(){ function recursiveKeywords(namespace) { - const keywords = []; + let keywords = []; for(const elem of Object.keys(namespace)) { keywords.push(elem); - if(typeof namespace[elem] === Object) { - keywords.concat(namespace[elem]); + if(typeof namespace[elem] == 'object') { + console.log(recursiveKeywords(namespace[elem])); + keywords = keywords.concat(recursiveKeywords(namespace[elem])); } } return keywords; @@ -75,6 +76,8 @@ let functions = (function(){ return recursiveKeywords(ns).sort().reverse().join("|"); })(); +console.log(functions); + var NetscriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language":