Merge pull request #1544 from Snarling/patch-3

Reduce repetitive code sections (bladeburner general actions)
This commit is contained in:
hydroflame 2021-10-18 14:13:43 -04:00 committed by GitHub
commit 55504d600d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,35 +3,17 @@ import { IMap } from "../types";
export const GeneralActions: IMap<Action> = {};
(function () {
// General Actions
let actionName;
actionName = "Training";
GeneralActions[actionName] = new Action({
name: actionName,
});
let actionNames : Array<string> = [
"Training",
"Field Analysis",
"Recruitment",
"Diplomacy",
"Hyperbolic Regeneration Chamber",
"Incite Violence"
];
actionName = "Field Analysis";
for (let actionName of actionNames){
GeneralActions[actionName] = new Action({
name: actionName,
});
actionName = "Recruitment";
GeneralActions[actionName] = new Action({
name: actionName,
});
actionName = "Diplomacy";
GeneralActions[actionName] = new Action({
name: actionName,
});
actionName = "Hyperbolic Regeneration Chamber";
GeneralActions[actionName] = new Action({
name: actionName,
});
actionName = "Incite Violence";
GeneralActions[actionName] = new Action({
name: actionName,
});
})();
}