Browse Source

Use toaster styles, use builint awardSkill

develop
Dale 5 months ago
parent
commit
2266bcaa25
Signed by: Deiru GPG Key ID: AA250C0277B927E1
4 changed files with 12 additions and 18 deletions
  1. +2
    -10
      src/game.ts
  2. +2
    -0
      src/index.ts
  3. +4
    -4
      yarn.lock
  4. +4
    -4
      yarn.nix

+ 2
- 10
src/game.ts View File

@@ -1,17 +1,9 @@
import { IGameState, setState, reducer } from '@/lib/store';
import { INode, IActor, EngineConfig, ILineOption, ILocation } from 'discoteque/lib/engine/types';
import { toast } from 'react-toastify';

import skills, { GameSkills } from './lib/skills';
import { setSkillpoints, lockSkills, setSkillMenu } from 'discoteque/lib/engine/lib/store';
import { Dispatch } from 'redux';

const awardSkill = (dispatch: Dispatch, skillPoints: number) => {
dispatch(setSkillpoints(skillPoints + 1));
toast("[Skill +1] You have been awarded a skill point!", {
onClick: () => dispatch(setSkillMenu(true)),
});
}
import { awardSkill } from 'discoteque/lib/engine/lib/utils';
import { lockSkills } from 'discoteque/lib/engine/lib/store';

const nodes: INode<IGameState>[] = [
{


+ 2
- 0
src/index.ts View File

@@ -1,6 +1,8 @@
import makeApp from 'discoteque/lib';
import { injectGlobal } from 'emotion';

import 'react-toastify/dist/ReactToastify.css';

import font from "discoteque/src/assets/fonts/AnticSlab-Regular.woff2";

injectGlobal`


+ 4
- 4
yarn.lock View File

@@ -1562,10 +1562,10 @@ diffie-hellman@^5.0.0:
miller-rabin "^4.0.0"
randombytes "^2.0.0"

discoteque@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/discoteque/-/discoteque-1.0.4.tgz#c5a11a22c3d709103bc6b1b6bdbd9b64a579b9f2"
integrity sha512-C6SehFoX9NFyTmD72bPXSR3FkzyGqsFSa/BfBcliy4Lrw7ra6tAlto4CHplkMSVdzcxmg7rynisukL8rrLfKgw==
discoteque@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/discoteque/-/discoteque-1.0.5.tgz#aca6e52064bcbc88500fdf6b70bdbcb5632836cf"
integrity sha512-o9p9vWMTGBXQJbByLBUFXyw433gbBJFUK+VHcCSNFEDcJBRigg3zK3YR1k9iC8rPH++XtZGfXCJ5wzn/jkj4Gw==
dependencies:
"@emotion/core" "^10.0.35"
classnames "^2.2.6"


+ 4
- 4
yarn.nix View File

@@ -1690,11 +1690,11 @@
};
}
{
name = "discoteque___discoteque_1.0.4.tgz";
name = "discoteque___discoteque_1.0.5.tgz";
path = fetchurl {
name = "discoteque___discoteque_1.0.4.tgz";
url = "https://registry.yarnpkg.com/discoteque/-/discoteque-1.0.4.tgz";
sha1 = "c5a11a22c3d709103bc6b1b6bdbd9b64a579b9f2";
name = "discoteque___discoteque_1.0.5.tgz";
url = "https://registry.yarnpkg.com/discoteque/-/discoteque-1.0.5.tgz";
sha1 = "aca6e52064bcbc88500fdf6b70bdbcb5632836cf";
};
}
{


Loading…
Cancel
Save