summaryrefslogtreecommitdiff
path: root/src/actions/interaction-level.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-07 19:27:13 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:05:58 +0200
commit8218c3d3c21bfa7c4f3ee4872722b9b1261576fb (patch)
tree16b8d0b8813aed0c846310a3fa4a01bd8ad18c60 /src/actions/interaction-level.js
parenta7d2ac48224c4226003d67f77143738cc72aa016 (diff)
Add machine mode with title and delete options
Diffstat (limited to 'src/actions/interaction-level.js')
-rw-r--r--src/actions/interaction-level.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/interaction-level.js b/src/actions/interaction-level.js
index 5ceff500..2003f45e 100644
--- a/src/actions/interaction-level.js
+++ b/src/actions/interaction-level.js
@@ -1,5 +1,6 @@
export const GO_FROM_BUILDING_TO_ROOM = "GO_FROM_BUILDING_TO_ROOM";
export const GO_FROM_ROOM_TO_RACK = "GO_FROM_ROOM_TO_RACK";
+export const GO_FROM_RACK_TO_MACHINE = "GO_FROM_RACK_TO_MACHINE";
export const GO_DOWN_ONE_INTERACTION_LEVEL = "GO_DOWN_ONE_INTERACTION_LEVEL";
export function goFromBuildingToRoom(roomId) {
@@ -29,6 +30,19 @@ export function goFromRoomToRack(tileId) {
};
}
+export function goFromRackToMachine(position) {
+ return (dispatch, getState) => {
+ const {interactionLevel} = getState();
+ if (interactionLevel.mode !== "RACK") {
+ return;
+ }
+ dispatch({
+ type: GO_FROM_RACK_TO_MACHINE,
+ position
+ });
+ };
+}
+
export function goDownOneInteractionLevel() {
return {
type: GO_DOWN_ONE_INTERACTION_LEVEL