Minor Namming Fixes
This commit is contained in:
8
src/utils/funcs/getRoleCost.ts
Normal file
8
src/utils/funcs/getRoleCost.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { RoleDefinition } from "types/creeps";
|
||||
|
||||
export const get_role_cost = (role: RoleDefinition) => {
|
||||
return role.body.reduce((cost, part) => {
|
||||
cost += BODYPART_COST[part] || 0;
|
||||
return cost;
|
||||
}, 0);
|
||||
};
|
||||
Reference in New Issue
Block a user