Merge pull request #2289 from IvarK/replicanti-galaxy-request-hotkeys

Resolve #2218
This commit is contained in:
Dys 2022-03-16 18:06:42 +08:00 committed by GitHub
commit 8fef20131d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -82,7 +82,7 @@ export const shortcuts = [
name: "Replicanti Galaxy",
keys: ["r"],
type: "bindRepeatableHotkey",
function: () => replicantiGalaxy(),
function: () => replicantiGalaxyRequest(),
visible: () => Replicanti.areUnlocked || PlayerProgress.eternityUnlocked()
}, {
name: "Eternity",

View File

@ -34,6 +34,12 @@ export function replicantiGalaxy() {
addReplicantiGalaxies(galaxyGain);
}
export function replicantiGalaxyRequest() {
if (!Replicanti.galaxies.canBuyMore) return;
if (player.options.confirmations.replicantiGalaxy) Modal.replicantiGalaxy.show();
else replicantiGalaxy();
}
// Produces replicanti quickly below e308, will auto-bulk-RG if production is fast enough
// Returns the remaining unused gain factor
function fastReplicantiBelow308(log10GainFactor, isAutobuyerActive) {

View File

@ -57,9 +57,7 @@ export default {
this.update();
},
handleClick() {
if (!this.isAvailable) return;
if (player.options.confirmations.replicantiGalaxy) Modal.replicantiGalaxy.show();
else replicantiGalaxy();
replicantiGalaxyRequest();
}
}
};