function createReducer(defaultState, actionType) { return function reducer(state = defaultState, action) { switch (action.type) { case actionType: return action.value; default: return state; } }; } /* eslint-disable key-spacing */ module.exports = { account: createReducer(null, 'SET_ACCOUNT'), activeItem: createReducer(null, 'SET_ACTIVE_VAR'), activeSkill: createReducer(null, 'SET_ACTIVE_SKILL'), animating: createReducer(false, 'SET_ANIMATING'), animCb: createReducer(null, 'SET_ANIM_CB'), animSkill: createReducer(null, 'SET_ANIM_SKILL'), animSource: createReducer(null, 'SET_ANIM_SOURCE'), animFocus: createReducer(null, 'SET_ANIM_FOCUS'), animTarget: createReducer(null, 'SET_ANIM_TARGET'), animText: createReducer(null, 'SET_ANIM_TEXT'), demo: createReducer(null, 'SET_DEMO'), chatShow: createReducer(null, 'SET_CHAT_SHOW'), chatWheel: createReducer([], 'SET_CHAT_WHEEL'), combiner: createReducer([], 'SET_COMBINER'), constructs: createReducer([], 'SET_CONSTRUCTS'), constructEditId: createReducer(null, 'SET_CONSTRUCT_EDIT_ID'), constructRename: createReducer(null, 'SET_CONSTRUCT_RENAME'), game: createReducer(null, 'SET_GAME'), gameSkillInfo: createReducer(null, 'SET_GAME_SKILL_INFO'), gameEffectInfo: createReducer(null, 'SET_GAME_EFFECT_INFO'), email: createReducer(null, 'SET_EMAIL'), invite: createReducer(null, 'SET_INVITE'), info: createReducer(null, 'SET_INFO'), instance: createReducer(null, 'SET_INSTANCE'), instanceChat: createReducer(null, 'SET_INSTANCE_CHAT'), instances: createReducer([], 'SET_INSTANCES'), itemEquip: createReducer(null, 'SET_ITEM_EQUIP'), itemInfo: createReducer({ combos: [], items: [] }, 'SET_ITEM_INFO'), itemUnequip: createReducer([], 'SET_ITEM_UNEQUIP'), mtxActive: createReducer(null, 'SET_MTX_ACTIVE'), nav: createReducer(null, 'SET_NAV'), ping: createReducer(null, 'SET_PING'), player: createReducer(null, 'SET_PLAYER'), reclaiming: createReducer(false, 'SET_RECLAIMING'), skip: createReducer(false, 'SET_SKIP'), shop: createReducer(false, 'SET_SHOP'), subscription: createReducer(null, 'SET_SUBSCRIPTION'), team: createReducer([], 'SET_TEAM'), teamPage: createReducer(0, 'SET_TEAM_PAGE'), teamSelect: createReducer([null, null, null], 'SET_TEAM_SELECT'), tutorial: createReducer(1, 'SET_TUTORIAL'), tutorialGame: createReducer(1, 'SET_TUTORIAL_GAME'), vboxSelected: createReducer([], 'SET_VBOX_SELECTED'), ws: createReducer(null, 'SET_WS'), };