mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-28 19:11:39 +00:00
hopefully made the hotkey work
This commit is contained in:
parent
20cefa8684
commit
1fd1d32f43
1 changed files with 10 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue