merge dev

This commit is contained in:
Olivier Gagnon
2021-10-26 23:11:47 -04:00
82 changed files with 1280 additions and 793 deletions
+3 -2
View File
@@ -8,11 +8,12 @@ import { Cities } from "./Cities";
import { IMap } from "../types";
export function createCityMap<T>(initValue: T): IMap<T> {
const map: IMap<any> = {};
const map: IMap<T> = {};
const cities = Object.keys(Cities);
for (let i = 0; i < cities.length; ++i) {
map[cities[i]] = initValue;
}
return map;
// round try JSON so to make sure none of the initial values have the same references.
return JSON.parse(JSON.stringify(map));
}
+2 -1
View File
@@ -24,6 +24,7 @@ import { joinFaction } from "../../Faction/FactionHelpers";
import { use } from "../../ui/Context";
import { dialogBoxCreate } from "../../ui/React/DialogBox";
import { SnackbarEvents } from "../../ui/React/Snackbar";
type IProps = {
loc: Location;
@@ -78,7 +79,7 @@ export function SpecialLocation(props: IProps): React.ReactElement {
function renderNoodleBar(): React.ReactElement {
function EatNoodles(): void {
dialogBoxCreate(<>You ate some delicious noodles and feel refreshed.</>);
SnackbarEvents.emit("You ate some delicious noodles and feel refreshed", "success");
}
return <Button onClick={EatNoodles}>Eat noodles</Button>;