set original thrust to 0
This commit is contained in:
parent
8d99a63648
commit
6e819dbce6
@ -7,7 +7,7 @@ import reqs from "../reqs.js";
|
||||
const dux = new Updux({
|
||||
subduxes: { reqs },
|
||||
initial: {
|
||||
rating: 1,
|
||||
rating: 0,
|
||||
advanced: false,
|
||||
},
|
||||
actions: {
|
||||
@ -20,7 +20,7 @@ dux.setMutation("setDrive", (changes) => u(changes));
|
||||
dux.setMutation("setDriveReqs", (reqs) => u({ reqs }));
|
||||
|
||||
// needs to be at the top level
|
||||
export const calculateDriveReqs = store =>
|
||||
export const calculateDriveReqs = (store) =>
|
||||
createSelector(
|
||||
[
|
||||
(ship) => ship.reqs.mass,
|
||||
@ -29,7 +29,7 @@ export const calculateDriveReqs = store =>
|
||||
],
|
||||
(ship_mass, rating, advanced) =>
|
||||
store.dispatch.setDriveReqs(calcDriveReqs(ship_mass, rating, advanced))
|
||||
);
|
||||
);
|
||||
|
||||
export function calcDriveReqs(shipMass, rating, advanced = false) {
|
||||
const mass = Math.ceil(rating * 0.05 * shipMass);
|
||||
|
Loading…
Reference in New Issue
Block a user