blob: 884f1988498cdbecc80db8704aa3c6134d357218 (
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_OBJECT = "GO_FROM_ROOM_TO_OBJECT";
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 goFromRoomToObject(tileId) {
return (dispatch, getState) => {
const {interactionLevel} = getState();
if (interactionLevel.mode !== "ROOM") {
return;
}
dispatch({
type: GO_FROM_ROOM_TO_OBJECT,
tileId
});
};
}
export function goDownOneInteractionLevel() {
return {
type: GO_DOWN_ONE_INTERACTION_LEVEL
};
}
|