add dux action 'resetShip'

This commit is contained in:
Yanick Champoux 2022-04-17 12:23:25 -04:00
parent 6e819dbce6
commit f9228916f3

View File

@ -25,6 +25,7 @@ const dux = new Updux({
setShipReqs: null,
setUITransform: null,
resetLayout: null,
resetShip: null,
},
});
@ -37,6 +38,8 @@ function resetUITransform(thing) {
);
}
dux.setMutation("resetShip", () => () => dux.initial);
dux.setMutation("resetLayout", () => resetUITransform);
dux.setMutation("setShipMass", (mass) => u({ reqs: { mass } }));