blob: 5ceff500df68c7eb92c222052310e1ab3cbd8ddc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
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_DOWN_ONE_INTERACTION_LEVEL = "GO_DOWN_ONE_INTERACTION_LEVEL";
export function goFromBuildingToRoom(roomId) {
return (dispatch, getState) => {
const {interactionLevel} = getState();
if (interactionLevel.mode !== "BUILDING") {
return;
}
dispatch({
type: GO_FROM_BUILDING_TO_ROOM,
roomId
});
};
}
export function goFromRoomToRack(tileId) {
return (dispatch, getState) => {
const {interactionLevel} = getState();
if (interactionLevel.mode !== "ROOM") {
return;
}
dispatch({
type: GO_FROM_ROOM_TO_RACK,
tileId
});
};
}
export function goDownOneInteractionLevel() {
return {
type: GO_DOWN_ONE_INTERACTION_LEVEL
};
}
|