mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 03:33:52 +01:00
Merge pull request #3115 from ApamNapat/remove_unreachable_code
Removed unreachable code
This commit is contained in:
commit
8506dcfed5
@ -210,7 +210,7 @@ export function BitverseRoot(props: IProps): React.ReactElement {
|
|||||||
]} />
|
]} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
} else {
|
}
|
||||||
return (
|
return (
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
<>
|
<>
|
||||||
@ -269,5 +269,3 @@ export function BitverseRoot(props: IProps): React.ReactElement {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return <></>;
|
|
||||||
}
|
|
||||||
|
@ -318,9 +318,8 @@ export class Bladeburner implements IBladeburner {
|
|||||||
if (this.contracts.hasOwnProperty(name)) {
|
if (this.contracts.hasOwnProperty(name)) {
|
||||||
action.name = name;
|
action.name = name;
|
||||||
return action;
|
return action;
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
case "operation":
|
case "operation":
|
||||||
case "operations":
|
case "operations":
|
||||||
case "op":
|
case "op":
|
||||||
@ -329,9 +328,8 @@ export class Bladeburner implements IBladeburner {
|
|||||||
if (this.operations.hasOwnProperty(name)) {
|
if (this.operations.hasOwnProperty(name)) {
|
||||||
action.name = name;
|
action.name = name;
|
||||||
return action;
|
return action;
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
case "blackoperation":
|
case "blackoperation":
|
||||||
case "black operation":
|
case "black operation":
|
||||||
case "black operations":
|
case "black operations":
|
||||||
@ -343,9 +341,8 @@ export class Bladeburner implements IBladeburner {
|
|||||||
if (BlackOperations.hasOwnProperty(name)) {
|
if (BlackOperations.hasOwnProperty(name)) {
|
||||||
action.name = name;
|
action.name = name;
|
||||||
return action;
|
return action;
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
case "general":
|
case "general":
|
||||||
case "general action":
|
case "general action":
|
||||||
case "gen":
|
case "gen":
|
||||||
|
@ -29,67 +29,51 @@ export function Effect(tpe: FragmentType): string {
|
|||||||
switch (tpe) {
|
switch (tpe) {
|
||||||
case FragmentType.HackingChance: {
|
case FragmentType.HackingChance: {
|
||||||
return "+x% hack() success chance";
|
return "+x% hack() success chance";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.HackingSpeed: {
|
case FragmentType.HackingSpeed: {
|
||||||
return "+x% faster hack(), grow(), and weaken()";
|
return "+x% faster hack(), grow(), and weaken()";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.HackingMoney: {
|
case FragmentType.HackingMoney: {
|
||||||
return "+x% hack() power";
|
return "+x% hack() power";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.HackingGrow: {
|
case FragmentType.HackingGrow: {
|
||||||
return "+x% grow() power";
|
return "+x% grow() power";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Hacking: {
|
case FragmentType.Hacking: {
|
||||||
return "+x% hacking skill";
|
return "+x% hacking skill";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Strength: {
|
case FragmentType.Strength: {
|
||||||
return "+x% strength skill";
|
return "+x% strength skill";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Defense: {
|
case FragmentType.Defense: {
|
||||||
return "+x% defense skill";
|
return "+x% defense skill";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Dexterity: {
|
case FragmentType.Dexterity: {
|
||||||
return "+x% dexterity skill";
|
return "+x% dexterity skill";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Agility: {
|
case FragmentType.Agility: {
|
||||||
return "+x% agility skill";
|
return "+x% agility skill";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Charisma: {
|
case FragmentType.Charisma: {
|
||||||
return "+x% charisma skill";
|
return "+x% charisma skill";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.HacknetMoney: {
|
case FragmentType.HacknetMoney: {
|
||||||
return "+x% hacknet production";
|
return "+x% hacknet production";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.HacknetCost: {
|
case FragmentType.HacknetCost: {
|
||||||
return "x% cheaper hacknet cost";
|
return "x% cheaper hacknet cost";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Rep: {
|
case FragmentType.Rep: {
|
||||||
return "+x% reputation from factions and companies";
|
return "+x% reputation from factions and companies";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.WorkMoney: {
|
case FragmentType.WorkMoney: {
|
||||||
return "+x% work money";
|
return "+x% work money";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Crime: {
|
case FragmentType.Crime: {
|
||||||
return "+x% crime money";
|
return "+x% crime money";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case FragmentType.Bladeburner: {
|
case FragmentType.Bladeburner: {
|
||||||
return "+x% all bladeburner stats";
|
return "+x% all bladeburner stats";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new Error("Calling effect for fragment type that doesn't have an effect " + tpe);
|
throw new Error("Calling effect for fragment type that doesn't have an effect " + tpe);
|
||||||
|
@ -739,7 +739,7 @@ export function runScriptFromScript(
|
|||||||
`Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,
|
`Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
}
|
||||||
// Able to run script
|
// Able to run script
|
||||||
workerScript.log(
|
workerScript.log(
|
||||||
caller,
|
caller,
|
||||||
@ -751,8 +751,6 @@ export function runScriptFromScript(
|
|||||||
|
|
||||||
return startWorkerScript(player, runningScriptObj, server, workerScript);
|
return startWorkerScript(player, runningScriptObj, server, workerScript);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);
|
workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -427,6 +427,4 @@ export async function calculateRamUsage(
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
return { cost: RamCalculationErrorCode.SyntaxError };
|
return { cost: RamCalculationErrorCode.SyntaxError };
|
||||||
}
|
}
|
||||||
|
|
||||||
return { cost: RamCalculationErrorCode.SyntaxError };
|
|
||||||
}
|
}
|
||||||
|
@ -620,7 +620,6 @@ export class Terminal implements ITerminal {
|
|||||||
const n00dlesServ = GetServer("n00dles");
|
const n00dlesServ = GetServer("n00dles");
|
||||||
if (n00dlesServ == null) {
|
if (n00dlesServ == null) {
|
||||||
throw new Error("Could not get n00dles server");
|
throw new Error("Could not get n00dles server");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
switch (ITutorial.currStep) {
|
switch (ITutorial.currStep) {
|
||||||
case iTutorialSteps.TerminalHelp:
|
case iTutorialSteps.TerminalHelp:
|
||||||
|
Loading…
Reference in New Issue
Block a user