-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtypes.js
74 lines (64 loc) · 1.83 KB
/
types.js
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// This file stores all of the actions types for redux
// For Players:
const NEW_USERNAME = "NEW_USERNAME";
const ADD_PLAYER = "ADD_PLAYER";
// For gameState:
const NEW_GAMEPHASE = "NEW_GAMEPHASE";
// For gameActions:
const PLAYER_ACTION = "PLAYER_ACTION";
const TOGGLE_CARD = "TOGGLE_CARD";
const SELECT_SUB = "SELECT_SUB";
const SELECT_ADD = "SELECT_ADD";
const UPDATE_SELECT_NUM = "UPDATE_SELECT_NUM";
// For roleSelect:
const NUMROLESELECTED = "NUMROLESELECTED";
// For day actions
const DAY_KILLSELECT_SUBMIT = "DAY_KILLSELECT_SUBMIT";
// REMEMBER TO UPDATED TYPES IN CLIENT FOLDER AS WELL
// Actions that will dispatch from server:
const UPDATE_PLAYERS = "UPDATE_PLAYERS";
const UPDATE_GAMEPHASE = "UPDATE_GAMEPHASE";
const UPDATE_ROLE = "UPDATE_ROLE";
const UPDATE_ROLEDESCRIPTION = "UPDATE_ROLEDESCRIPTION"
const ROLE_TOGGLE = "ROLE_TOGGLE";
const ROLE_ADD = "ROLE_ADD";
const ROLE_SUB = "ROLE_SUB";
const MAJORITY_ADD = "MAJORITY_ADD";
const MAJORITY_SUB = "MAJORITY_SUB";
const MAJORITY_RESET = "MAJORITY_RESET";
const UPDATE_MAJORITY = "UPDATE_MAJORITY";
const UPDATE_MAJORITY_READY = "UPDATE_MAJORITY_READY";
const UPDATE_ALL_ROLES = "UPDATE_ALL_ROLES";
const UPDATE_GAME_ROLES = "UPDATE_GAME_ROLES";
const UPDATE_DAYDESCRIPTION = "UPDATE_DAYDESCRIPTION";
const UPDATE_KILLS = "UPDATE_KILLS";
const UPDATE_GAME_RESET = "UPDATE_GAME_RESET";
module.exports.types = {
NEW_USERNAME,
ADD_PLAYER,
NEW_GAMEPHASE,
PLAYER_ACTION,
TOGGLE_CARD,
SELECT_SUB,
SELECT_ADD,
UPDATE_SELECT_NUM,
NUMROLESELECTED,
DAY_KILLSELECT_SUBMIT,
UPDATE_PLAYERS,
UPDATE_GAMEPHASE,
UPDATE_ROLE,
UPDATE_ROLEDESCRIPTION,
ROLE_TOGGLE,
ROLE_ADD,
ROLE_SUB,
MAJORITY_ADD,
MAJORITY_SUB,
MAJORITY_RESET,
UPDATE_MAJORITY,
UPDATE_MAJORITY_READY,
UPDATE_ALL_ROLES,
UPDATE_GAME_ROLES,
UPDATE_DAYDESCRIPTION,
UPDATE_KILLS,
UPDATE_GAME_RESET
}