Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
fix(game): loading save data was broken and now it's not.
Browse files Browse the repository at this point in the history
closes #33
  • Loading branch information
seiyria committed Dec 1, 2015
1 parent 083e307 commit ab4beb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/rogue/init/gamestate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import _ from 'lodash';
import Settings from '../constants/settings';
import GameUpgrades from './gameupgrades';
import { Current } from './gameupgrades';
import { EventEmitter2 } from 'eventemitter2';

class GameState extends EventEmitter2 {
Expand Down Expand Up @@ -38,6 +38,8 @@ class GameState extends EventEmitter2 {
}

loadExternalOptions() {
const GameUpgrades = Current();

this.upgrades = {};
_.keys(Settings.upgrades)
.forEach(key => {
Expand Down
2 changes: 2 additions & 0 deletions src/js/rogue/init/gameupgrades.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ let curState = NewState();

export const SetState = (newState) => curState = newState;

export const Current = () => curState;

export default curState;

0 comments on commit ab4beb4

Please sign in to comment.