mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
commit
d170693da4
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
20
dist/vendor.bundle.js
vendored
20
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -3,6 +3,28 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v0.50.1 - 2021-03-22 (hydroflame)
|
||||
---------------------------------
|
||||
**Netscript**
|
||||
|
||||
* getTaskTasks works
|
||||
|
||||
**Source-File -1**
|
||||
|
||||
* Added a new Exploit
|
||||
|
||||
**Factions**
|
||||
|
||||
* Augmentations offered by a Faction but already bought are in a separate list at the bottom of the page.
|
||||
|
||||
**Bug fixed**
|
||||
|
||||
* Fixed a bug where completing a maxed non-repeatable BitNode would make its color on the BitVerse like level 1.
|
||||
|
||||
**Misc.**
|
||||
|
||||
* Minor spacing in stats tables.
|
||||
|
||||
v0.50.0 - 2021-03-20 Intelligence (hydroflame)
|
||||
----------------------------------------------
|
||||
|
||||
|
@ -64,9 +64,9 @@ documentation_title = '{0} Documentation'.format(project)
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.47'
|
||||
version = '0.50'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.47.0'
|
||||
release = '0.50.1'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -590,6 +590,8 @@
|
||||
<p>If the game fails to load, consider <a href="?noScripts">killing all scripts</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
|
||||
<script type="text/javascript" src="dist/vendor.bundle.js"></script><script type="text/javascript" src="dist/engine.bundle.js"></script><script type="text/javascript" src="dist/engineStyle.bundle.js"></script></body>
|
||||
|
||||
<!-- Misc Scripts -->
|
||||
|
@ -121,5 +121,5 @@
|
||||
"watch": "webpack --watch --mode production",
|
||||
"watch:dev": "webpack --watch --mode development"
|
||||
},
|
||||
"version": "0.49.2"
|
||||
"version": "0.50.1"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
import { IMap } from "./types";
|
||||
|
||||
export let CONSTANTS: IMap<any> = {
|
||||
Version: "0.50.0",
|
||||
Version: "0.5X.X",
|
||||
|
||||
/** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
|
||||
* and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
|
||||
@ -228,20 +228,21 @@ export let CONSTANTS: IMap<any> = {
|
||||
|
||||
LatestUpdate:
|
||||
`
|
||||
v0.50.0 - 2021-03-20 Intelligence (hydroflame)
|
||||
v0.50.1 - 2021-03-22 (hydroflame)
|
||||
-------
|
||||
Intelligence
|
||||
* int exp gain and effect has been reworked. It is now much more easy to
|
||||
acquire and far more powerful. The goal here is to feel like players have
|
||||
another tool in their arsenal.
|
||||
Netscript
|
||||
* getTaskTasks works
|
||||
|
||||
Source-File -1
|
||||
* Added a new Exploit
|
||||
|
||||
Factions
|
||||
* Hacking factions no longer have hacking level requirements since their associated servers do.
|
||||
* Augmentations offered by a Faction but already bought are in a separate list at the bottom of the page.
|
||||
|
||||
Bug fixed
|
||||
* Fixed a bug where completing a maxed non-repeatable BitNode would make its color on the BitVerse like level 1.
|
||||
|
||||
Misc.
|
||||
* Sleeve styling.
|
||||
* number formatting
|
||||
* remove wiki button in Hacking Missions.
|
||||
* Fix NaN displayed when very very large numbers are reached.
|
||||
* Minor spacing in stats tables.
|
||||
`
|
||||
}
|
||||
|
@ -12,10 +12,11 @@ Source-File minus 1 is extremely weak because it can be fully level up quickly.
|
||||
|
||||
export enum Exploit {
|
||||
UndocumentedFunctionCall = 'UndocumentedFunctionCall',
|
||||
Unclickable = 'Unclickable',
|
||||
PrototypeTampering = 'PrototypeTampering',
|
||||
// To the players reading this. Yes you're supposed to add EditSaveFile by
|
||||
// editing your save file, yes you could add them all, no we don't care
|
||||
// that's not the point
|
||||
// that's not the point.
|
||||
EditSaveFile = 'EditSaveFile'
|
||||
}
|
||||
|
||||
@ -25,6 +26,7 @@ const names: {
|
||||
'UndocumentedFunctionCall': 'by looking beyond the documentation.',
|
||||
'EditSaveFile': 'by editing your save file.',
|
||||
'PrototypeTampering': 'by tampering with Numbers prototype.',
|
||||
'Unclickable': 'by clicking the unclickable.',
|
||||
}
|
||||
|
||||
|
||||
|
24
src/Exploits/unclickable.ts
Normal file
24
src/Exploits/unclickable.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import { Player } from "../Player";
|
||||
import { Exploit } from "./Exploit";
|
||||
|
||||
(function() {
|
||||
function clickTheUnclickable(event: MouseEvent) {
|
||||
if(!event.target || !(event.target instanceof Element)) return;
|
||||
const display = window.getComputedStyle(event.target as Element).display;
|
||||
if(display === 'none' && event.isTrusted)
|
||||
Player.giveExploit(Exploit.Unclickable);
|
||||
}
|
||||
|
||||
|
||||
function targetElement() {
|
||||
const elem = document.getElementById('unclickable');
|
||||
if(elem == null) {
|
||||
console.error('Could not find the unclickable elem for the related exploit.');
|
||||
return;
|
||||
}
|
||||
elem.addEventListener("click", clickTheUnclickable);
|
||||
document.removeEventListener('DOMContentLoaded', targetElement);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', targetElement);
|
||||
})();
|
@ -6,6 +6,7 @@ import * as React from "react";
|
||||
import { PurchaseableAugmentation } from "./PurchaseableAugmentation";
|
||||
|
||||
import { Augmentations } from "../../Augmentation/Augmentations";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { Faction } from "../../Faction/Faction";
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
import { PurchaseAugmentationsOrderSetting } from "../../Settings/SettingEnums";
|
||||
@ -44,7 +45,7 @@ export class AugmentationsPage extends React.Component<IProps, IState> {
|
||||
this.rerender = this.rerender.bind(this);
|
||||
}
|
||||
|
||||
getAugs() {
|
||||
getAugs(): string[] {
|
||||
if (this.isPlayersGang) {
|
||||
const augs: string[] = [];
|
||||
for (const augName in Augmentations) {
|
||||
@ -60,7 +61,7 @@ export class AugmentationsPage extends React.Component<IProps, IState> {
|
||||
}
|
||||
}
|
||||
|
||||
getAugsSorted() {
|
||||
getAugsSorted(): string[] {
|
||||
switch (Settings.PurchaseAugmentationsOrder) {
|
||||
case PurchaseAugmentationsOrderSetting.Cost: {
|
||||
return this.getAugsSortedByCost();
|
||||
@ -73,7 +74,7 @@ export class AugmentationsPage extends React.Component<IProps, IState> {
|
||||
}
|
||||
}
|
||||
|
||||
getAugsSortedByCost() {
|
||||
getAugsSortedByCost(): string[] {
|
||||
const augs = this.getAugs();
|
||||
augs.sort((augName1, augName2)=>{
|
||||
var aug1 = Augmentations[augName1], aug2 = Augmentations[augName2];
|
||||
@ -87,7 +88,7 @@ export class AugmentationsPage extends React.Component<IProps, IState> {
|
||||
return augs;
|
||||
}
|
||||
|
||||
getAugsSortedByReputation() {
|
||||
getAugsSortedByReputation(): string[] {
|
||||
const augs = this.getAugs();
|
||||
augs.sort((augName1, augName2)=>{
|
||||
var aug1 = Augmentations[augName1], aug2 = Augmentations[augName2];
|
||||
@ -100,16 +101,16 @@ export class AugmentationsPage extends React.Component<IProps, IState> {
|
||||
return augs;
|
||||
}
|
||||
|
||||
getAugsSortedByDefault() {
|
||||
getAugsSortedByDefault(): string[] {
|
||||
return this.getAugs();
|
||||
}
|
||||
|
||||
switchSortOrder(newOrder: PurchaseAugmentationsOrderSetting) {
|
||||
switchSortOrder(newOrder: PurchaseAugmentationsOrderSetting): void {
|
||||
Settings.PurchaseAugmentationsOrder = newOrder;
|
||||
this.rerender();
|
||||
}
|
||||
|
||||
rerender() {
|
||||
rerender(): void {
|
||||
this.setState((prevState) => {
|
||||
return {
|
||||
rerenderFlag: !prevState.rerenderFlag,
|
||||
@ -119,17 +120,39 @@ export class AugmentationsPage extends React.Component<IProps, IState> {
|
||||
|
||||
render() {
|
||||
const augs = this.getAugsSorted();
|
||||
const augList = augs.map((aug) => {
|
||||
const purchasable = augs.filter((aug: string) =>
|
||||
aug === AugmentationNames.NeuroFluxGovernor ||
|
||||
(!this.props.p.augmentations.some(a => a.name === aug) &&
|
||||
!this.props.p.queuedAugmentations.some(a => a.name === aug))
|
||||
)
|
||||
|
||||
const parent = this;
|
||||
function purchaseableAugmentation(aug: string) {
|
||||
return (
|
||||
<PurchaseableAugmentation
|
||||
augName={aug}
|
||||
faction={this.props.faction}
|
||||
faction={parent.props.faction}
|
||||
key={aug}
|
||||
p={this.props.p}
|
||||
rerender={this.rerender}
|
||||
p={parent.props.p}
|
||||
rerender={parent.rerender}
|
||||
/>
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
const augListElems = purchasable.map(aug => purchaseableAugmentation(aug));
|
||||
|
||||
let ownedElem = <></>
|
||||
const owned = augs.filter((aug: string) => !purchasable.includes(aug));
|
||||
if (owned.length !== 0) {
|
||||
ownedElem = <>
|
||||
<br />
|
||||
<h2>Purchased Augmentations</h2>
|
||||
<p style={infoStyleMarkup}>
|
||||
This factions also offers these augmentations but you already own them.
|
||||
</p>
|
||||
{owned.map(aug => purchaseableAugmentation(aug))}
|
||||
</>
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
@ -156,7 +179,8 @@ export class AugmentationsPage extends React.Component<IProps, IState> {
|
||||
text={"Sort by Default Order"}
|
||||
/>
|
||||
<br />
|
||||
{augList}
|
||||
{augListElems}
|
||||
{ownedElem}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -114,7 +114,6 @@ export class PurchaseableAugmentation extends React.Component<IProps, any> {
|
||||
color = "red";
|
||||
} else if (this.aug.name !== AugmentationNames.NeuroFluxGovernor && (this.aug.owned || this.owned())) {
|
||||
disabled = true;
|
||||
statusTxt = "ALREADY OWNED";
|
||||
} else if (this.hasReputation()) {
|
||||
statusTxt = `UNLOCKED - ${numeralWrapper.formatMoney(moneyCost)}`;
|
||||
} else {
|
||||
|
@ -490,9 +490,9 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
|
||||
const getGangTask = function(func, name) {
|
||||
const task = GangMemberTasks[taskName];
|
||||
const task = GangMemberTasks[name];
|
||||
if (!task) {
|
||||
throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${taskName}'`);
|
||||
throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);
|
||||
}
|
||||
|
||||
return task;
|
||||
|
@ -151,7 +151,8 @@ function loadBitVerse(destroyedBitNodeNum, flume=false) {
|
||||
// Update NextSourceFileFlags
|
||||
nextSourceFileFlags = SourceFileFlags.slice();
|
||||
if (!flume) {
|
||||
++nextSourceFileFlags[destroyedBitNodeNum];
|
||||
if (nextSourceFileFlags[destroyedBitNodeNum] < 3 && destroyedBitNodeNum !== 12)
|
||||
++nextSourceFileFlags[destroyedBitNodeNum];
|
||||
}
|
||||
|
||||
// Create the Bit Verse
|
||||
|
@ -102,6 +102,7 @@ import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||
import { removeLoadingScreen } from "../utils/uiHelpers/removeLoadingScreen";
|
||||
import { KEY } from "../utils/helpers/keyCodes";
|
||||
import "./Exploits/tampering";
|
||||
import "./Exploits/unclickable";
|
||||
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
|
@ -603,6 +603,8 @@ if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>
|
||||
<p>If the game fails to load, consider <a href="?noScripts">killing all scripts</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
|
||||
</body>
|
||||
|
||||
<!-- Misc Scripts -->
|
||||
|
@ -78,7 +78,7 @@ export function CharacterInfo(p: IPlayer): React.ReactElement {
|
||||
if(SourceFileFlags[5] > 0 && r.length > 2 && r[1] != r[2]) {
|
||||
return <td key='2' style={{textAlign: 'right'}}> ({numeralWrapper.formatPercentage(r[2])})</td>
|
||||
}
|
||||
return undefined;
|
||||
return <></>;
|
||||
}
|
||||
return <>
|
||||
<table>
|
||||
|
@ -13,7 +13,7 @@ export function StatsTable(rows: any[][], title: string | null): React.ReactElem
|
||||
return <tr key={row[0]}>
|
||||
{row.map((elem: any, i: number) => {
|
||||
let style = {};
|
||||
if (i !== 0) style = {textAlign: 'right'};
|
||||
if (i !== 0) style = {textAlign: 'right', paddingLeft: '.25em'};
|
||||
return <td key={i} style={style}>{elem}</td>
|
||||
})}
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user