From 3c3e374fd550f6c8499e2eaa1543b22e59039a83 Mon Sep 17 00:00:00 2001 From: zyl Date: Tue, 25 Jun 2024 00:44:21 -0700 Subject: [PATCH] disable interaction buttons on cooldown --- site/root/js/pet.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/site/root/js/pet.js b/site/root/js/pet.js index f637d0f..7b02044 100644 --- a/site/root/js/pet.js +++ b/site/root/js/pet.js @@ -449,8 +449,10 @@ return; } canFeed = false; + feedButton.disabled = true; setTimeout(() => { canFeed = true; + feedButton.disabled = false; }, FEED_TIMER); pet.feed(38); @@ -461,8 +463,10 @@ return; } canPet = false; + petButton.disabled = true; setTimeout(() => { canPet = true; + petButton.disabled = false; }, PET_TIMER); pet.pet(); @@ -473,8 +477,10 @@ return; } canClean = false; + cleanButton.disabled = true; setTimeout(() => { canClean = true; + cleanButton.disabled = false; }, CLEAN_TIMER); pet.clean();