Merge pull request #3115 from ApamNapat/remove_unreachable_code

Removed unreachable code
This commit is contained in:
hydroflame 2022-03-20 21:46:23 -04:00 committed by GitHub
commit 8506dcfed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 70 additions and 96 deletions

@ -210,7 +210,7 @@ export function BitverseRoot(props: IProps): React.ReactElement {
]} />
</>
)
} else {
}
return (
// 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)) {
action.name = name;
return action;
} else {
return null;
}
return null;
case "operation":
case "operations":
case "op":
@ -329,9 +328,8 @@ export class Bladeburner implements IBladeburner {
if (this.operations.hasOwnProperty(name)) {
action.name = name;
return action;
} else {
return null;
}
return null;
case "blackoperation":
case "black operation":
case "black operations":
@ -343,9 +341,8 @@ export class Bladeburner implements IBladeburner {
if (BlackOperations.hasOwnProperty(name)) {
action.name = name;
return action;
} else {
return null;
}
return null;
case "general":
case "general action":
case "gen":

@ -29,67 +29,51 @@ export function Effect(tpe: FragmentType): string {
switch (tpe) {
case FragmentType.HackingChance: {
return "+x% hack() success chance";
break;
}
case FragmentType.HackingSpeed: {
return "+x% faster hack(), grow(), and weaken()";
break;
}
case FragmentType.HackingMoney: {
return "+x% hack() power";
break;
}
case FragmentType.HackingGrow: {
return "+x% grow() power";
break;
}
case FragmentType.Hacking: {
return "+x% hacking skill";
break;
}
case FragmentType.Strength: {
return "+x% strength skill";
break;
}
case FragmentType.Defense: {
return "+x% defense skill";
break;
}
case FragmentType.Dexterity: {
return "+x% dexterity skill";
break;
}
case FragmentType.Agility: {
return "+x% agility skill";
break;
}
case FragmentType.Charisma: {
return "+x% charisma skill";
break;
}
case FragmentType.HacknetMoney: {
return "+x% hacknet production";
break;
}
case FragmentType.HacknetCost: {
return "x% cheaper hacknet cost";
break;
}
case FragmentType.Rep: {
return "+x% reputation from factions and companies";
break;
}
case FragmentType.WorkMoney: {
return "+x% work money";
break;
}
case FragmentType.Crime: {
return "+x% crime money";
break;
}
case FragmentType.Bladeburner: {
return "+x% all bladeburner stats";
break;
}
}
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!`,
);
return 0;
} else {
}
// Able to run script
workerScript.log(
caller,
@ -751,8 +751,6 @@ export function runScriptFromScript(
return startWorkerScript(player, runningScriptObj, server, workerScript);
}
break;
}
workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);
return 0;

@ -427,6 +427,4 @@ export async function calculateRamUsage(
console.error(e);
return { cost: RamCalculationErrorCode.SyntaxError };
}
return { cost: RamCalculationErrorCode.SyntaxError };
}

@ -620,7 +620,6 @@ export class Terminal implements ITerminal {
const n00dlesServ = GetServer("n00dles");
if (n00dlesServ == null) {
throw new Error("Could not get n00dles server");
return;
}
switch (ITutorial.currStep) {
case iTutorialSteps.TerminalHelp: