hopefully made the hotkey work

This commit is contained in:
Chunkybanana 2022-12-04 02:30:32 +00:00
parent 20cefa8684
commit 1fd1d32f43

View file

@ -10,6 +10,7 @@ import { createIndependentConversion, createPolynomialScaling } from "features/c
import { jsx, showIf } from "features/feature";
import { createMilestone } from "features/milestones/milestone";
import { createResource, displayResource } from "features/resources/resource";
import { createHotkey } from "features/hotkey";
import { BaseLayer, createLayer } from "game/layers";
import player from "game/player";
import Decimal, { DecimalSource, formatWhole } from "util/bignum";
@ -69,6 +70,14 @@ const layer = createLayer(id, function (this: BaseLayer) {
style: "width: 600px; min-height: unset"
}));
const buildFoundationHK = createHotkey(() => ({
key: "w",
description: 'Build part of the foundation.',
onPress: () => {
if (buildFoundation.canClick.value) buildFoundation.onClick();
}
}));
const logGainMilestone1 = createMilestone(() => ({
display: {
requirement: "1% Foundation Completed",
@ -169,6 +178,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
foundationConversion,
milestones,
minWidth: 700,
buildFoundationHK,
display: jsx(() => (
<>
<div>