@jeremyckahn/farmhand 1.19.21 → 1.19.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{index-CG_lY1MJ.js → index-BjAIF9CZ.js} +7 -7
- package/dist/assets/{index-CG_lY1MJ.js.map → index-BjAIF9CZ.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.map +1 -1
- package/package.json +2 -3
- package/src/common/services/{randomNumber.ts → randomNumber.js} +0 -1
- package/src/common/{utils.ts → utils.js} +1 -1
- package/src/components/AccountingView/{AccountingView.tsx → AccountingView.js} +0 -1
- package/src/components/AchievementsView/{AchievementsView.tsx → AchievementsView.js} +0 -2
- package/src/components/AnimatedNumber/{AnimatedNumber.tsx → AnimatedNumber.js} +0 -3
- package/src/components/AppBar/{AppBar.tsx → AppBar.js} +0 -3
- package/src/components/BailOutErrorBoundary/{BailOutErrorBoundary.tsx → BailOutErrorBoundary.js} +0 -2
- package/src/components/Cellar/{CellarInventoryTabPanel.tsx → CellarInventoryTabPanel.js} +0 -2
- package/src/components/Cellar/{Keg.tsx → Keg.js} +1 -0
- package/src/components/ContextPane/{ContextPane.tsx → ContextPane.js} +0 -2
- package/src/components/ContextPane/{ContextPane.test.tsx → ContextPane.test.js} +0 -3
- package/src/components/CowCard/Bloodline/{Bloodline.test.tsx → Bloodline.test.js} +3 -6
- package/src/components/CowCard/{CowCard.tsx → CowCard.js} +2 -4
- package/src/components/CowCard/Subheader/{Subheader.tsx → Subheader.js} +0 -1
- package/src/components/CowPen/{Cow.tsx → Cow.js} +1 -15
- package/src/components/CowPen/{CowPen.test.tsx → CowPen.test.js} +1 -15
- package/src/components/CowPen/{Tumbleweeds.tsx → Tumbleweeds.js} +1 -2
- package/src/components/Farmhand/{Farmhand.context.tsx → Farmhand.context.js} +2 -2
- package/src/components/Farmhand/{Farmhand.tsx → Farmhand.js} +16 -83
- package/src/components/FermentationRecipeList/{FermentationRecipe.tsx → FermentationRecipe.js} +3 -4
- package/src/components/FermentationRecipeList/{FermentationRecipeList.tsx → FermentationRecipeList.js} +0 -3
- package/src/components/FermentationRecipeList/{FermentationRecipeList.test.tsx → FermentationRecipeList.test.js} +0 -5
- package/src/components/Field/{Field.tsx → Field.js} +1 -6
- package/src/components/Field/{Field.test.tsx → Field.test.js} +1 -0
- package/src/components/Home/{Home.tsx → Home.js} +0 -1
- package/src/components/Home/{SnowBackground.tsx → SnowBackground.js} +0 -2
- package/src/components/Inventory/{Inventory.tsx → Inventory.js} +2 -9
- package/src/components/Item/{Item.tsx → Item.js} +1 -2
- package/src/components/LogView/{LogView.tsx → LogView.js} +1 -2
- package/src/components/Navigation/{Navigation.tsx → Navigation.js} +1 -0
- package/src/components/NotificationSystem/{NotificationSystem.tsx → NotificationSystem.js} +1 -0
- package/src/components/OnlinePeersView/{OnlinePeersView.tsx → OnlinePeersView.js} +1 -1
- package/src/components/Plot/{Plot.tsx → Plot.js} +0 -5
- package/src/components/Plot/{Plot.test.tsx → Plot.test.js} +8 -8
- package/src/components/PriceEventView/{PriceEventView.test.tsx → PriceEventView.test.js} +0 -1
- package/src/components/ProgressBar/{ProgressBar.tsx → ProgressBar.js} +0 -2
- package/src/components/QuantityInput/{QuantityInput.tsx → QuantityInput.js} +0 -1
- package/src/components/Recipe/{Recipe.tsx → Recipe.js} +2 -1
- package/src/components/SettingsView/{RandomSeedInput.tsx → RandomSeedInput.js} +1 -1
- package/src/components/Shop/{Shop.tsx → Shop.js} +1 -2
- package/src/components/Stage/{Stage.tsx → Stage.js} +3 -6
- package/src/components/Stage/{Stage.test.tsx → Stage.test.js} +0 -1
- package/src/components/Toolbelt/{Toolbelt.tsx → Toolbelt.js} +0 -3
- package/src/components/UpgradePurchase/{UpgradePurchase.tsx → UpgradePurchase.js} +1 -0
- package/src/components/WineRecipeList/{WineRecipe.tsx → WineRecipe.js} +1 -2
- package/src/components/WineRecipeList/{WineRecipe.test.tsx → WineRecipe.test.js} +1 -10
- package/src/components/WineRecipeList/{WineRecipeList.tsx → WineRecipeList.js} +0 -1
- package/src/components/Workshop/{ForgeTabPanel.tsx → ForgeTabPanel.js} +0 -1
- package/src/components/Workshop/{getUpgradesAvailable.ts → getUpgradesAvailable.js} +0 -2
- package/src/components/Workshop/{getUpgradesAvailable.test.ts → getUpgradesAvailable.test.js} +0 -1
- package/src/{constants.ts → constants.js} +2 -2
- package/src/data/{achievements.ts → achievements.js} +0 -9
- package/src/data/{achievements.test.ts → achievements.test.js} +1 -2
- package/src/data/{crop.ts → crop.js} +4 -5
- package/src/data/crops/{asparagus.ts → asparagus.js} +0 -2
- package/src/data/crops/{carrot.ts → carrot.js} +0 -2
- package/src/data/crops/{corn.ts → corn.js} +0 -2
- package/src/data/crops/{garlic.ts → garlic.js} +0 -2
- package/src/data/crops/{grape.ts → grape.js} +7 -11
- package/src/data/crops/{jalapeno.ts → jalapeno.js} +0 -2
- package/src/data/crops/{olive.ts → olive.js} +0 -2
- package/src/data/crops/{onion.ts → onion.js} +0 -2
- package/src/data/crops/{pea.ts → pea.js} +0 -2
- package/src/data/crops/{potato.ts → potato.js} +0 -2
- package/src/data/crops/{pumpkin.ts → pumpkin.js} +0 -2
- package/src/data/crops/{soybean.ts → soybean.js} +0 -2
- package/src/data/crops/{spinach.ts → spinach.js} +0 -2
- package/src/data/crops/{strawberry.ts → strawberry.js} +0 -2
- package/src/data/crops/{sunflower.ts → sunflower.js} +0 -2
- package/src/data/crops/{sweet-potato.ts → sweet-potato.js} +0 -2
- package/src/data/crops/{tomato.ts → tomato.js} +0 -2
- package/src/data/crops/{watermelon.ts → watermelon.js} +0 -2
- package/src/data/crops/{wheat.ts → wheat.js} +0 -2
- package/src/data/{items.ts → items.js} +12 -12
- package/src/data/{levels.ts → levels.js} +0 -28
- package/src/data/{maps.ts → maps.js} +1 -2
- package/src/data/ores/{bronzeOre.ts → bronzeOre.js} +1 -1
- package/src/data/ores/{coal.ts → coal.js} +1 -1
- package/src/data/ores/{goldOre.ts → goldOre.js} +1 -1
- package/src/data/ores/{ironOre.ts → ironOre.js} +1 -1
- package/src/data/ores/{saltRock.ts → saltRock.js} +1 -1
- package/src/data/ores/{silverOre.ts → silverOre.js} +1 -1
- package/src/data/ores/{stone.ts → stone.js} +1 -1
- package/src/data/{recipes.ts → recipes.js} +43 -43
- package/src/{enums.ts → enums.js} +28 -28
- package/src/factories/{CoalFactory.ts → CoalFactory.js} +0 -2
- package/src/factories/{OreFactory.ts → OreFactory.js} +0 -3
- package/src/factories/{ResourceFactory.ts → ResourceFactory.js} +0 -4
- package/src/factories/{ResourceFactory.test.ts → ResourceFactory.test.js} +0 -4
- package/src/factories/{StoneFactory.ts → StoneFactory.js} +0 -1
- package/src/{fetch-utils.ts → fetch-utils.js} +0 -2
- package/src/game-logic/{field-purchase.test.ts → field-purchase.test.js} +2 -4
- package/src/game-logic/reducers/{applyCrows.ts → applyCrows.js} +0 -3
- package/src/game-logic/reducers/{applyLoanInterest.ts → applyLoanInterest.js} +1 -1
- package/src/game-logic/reducers/{applyPrecipitation.ts → applyPrecipitation.js} +6 -6
- package/src/game-logic/reducers/{computeStateForNextDay.ts → computeStateForNextDay.js} +2 -2
- package/src/game-logic/reducers/{makeFermentationRecipe.ts → makeFermentationRecipe.js} +0 -1
- package/src/game-logic/reducers/{makeWine.ts → makeWine.js} +0 -1
- package/src/game-logic/reducers/{makeWine.test.ts → makeWine.test.js} +2 -0
- package/src/game-logic/reducers/{minePlot.ts → minePlot.js} +0 -1
- package/src/game-logic/reducers/{processCellarSpoilage.ts → processCellarSpoilage.js} +1 -0
- package/src/game-logic/reducers/{processCellarSpoilage.test.ts → processCellarSpoilage.test.js} +5 -0
- package/src/game-logic/reducers/{processCowFertilizerProduction.ts → processCowFertilizerProduction.js} +1 -1
- package/src/game-logic/reducers/{processLevelUp.ts → processLevelUp.js} +0 -3
- package/src/game-logic/reducers/{purchaseField.test.ts → purchaseField.test.js} +0 -2
- package/src/game-logic/reducers/{purchaseForest.test.tsx → purchaseForest.test.js} +2 -6
- package/src/game-logic/reducers/{rotateNotificationLogs.ts → rotateNotificationLogs.js} +1 -1
- package/src/game-logic/reducers/{sellItem.test.ts → sellItem.test.js} +3 -0
- package/src/game-logic/reducers/{sellKeg.ts → sellKeg.js} +1 -0
- package/src/game-logic/reducers/{spawnWeeds.ts → spawnWeeds.js} +0 -1
- package/src/game-logic/reducers/{updateAchievements.ts → updateAchievements.js} +0 -1
- package/src/game-logic/reducers/{updatePeer.ts → updatePeer.js} +0 -1
- package/src/game-logic/reducers/{updatePeer.test.ts → updatePeer.test.js} +4 -0
- package/src/game-logic/reducers/{updatePlotShoveledState.test.ts → updatePlotShoveledState.test.js} +1 -0
- package/src/handlers/{peer-events.ts → peer-events.js} +0 -5
- package/src/handlers/{ui-events.tsx → ui-events.js} +6 -88
- package/src/handlers/{ui-events.test.ts → ui-events.test.js} +0 -2
- package/src/{index.tsx → index.js} +0 -2
- package/src/scripts/{generate-crop-table.ts → generate-crop-table.js} +4 -5
- package/src/services/{cellar.test.ts → cellar.test.js} +1 -1
- package/src/services/{wine.ts → wine.js} +0 -1
- package/src/shell/{notifications.test.ts → notifications.test.js} +13 -19
- package/src/{templates.ts → templates.js} +0 -8
- package/src/test-utils/{index.ts → index.js} +3 -3
- package/src/test-utils/stubs/{getKegStub.ts → getKegStub.js} +0 -1
- package/src/utils/{farmProductsSold.tsx → farmProductsSold.js} +0 -2
- package/src/utils/{getCropLifecycleDuration.ts → getCropLifecycleDuration.js} +0 -1
- package/src/utils/{getCropsAvailableToFerment.ts → getCropsAvailableToFerment.js} +0 -1
- package/src/utils/{getInventoryQuantityMap.ts → getInventoryQuantityMap.js} +0 -1
- package/src/utils/{getLevelEntitlements.ts → getLevelEntitlements.js} +0 -4
- package/src/utils/{getMaxYieldOfFermentationRecipe.ts → getMaxYieldOfFermentationRecipe.js} +0 -1
- package/src/utils/{getWineVarietiesAvailableToMake.ts → getWineVarietiesAvailableToMake.js} +0 -2
- package/src/utils/{index.tsx → index.js} +11 -25
- package/src/utils/{index.test.ts → index.test.js} +2 -0
- package/src/utils/{isItemAFarmProduct.ts → isItemAFarmProduct.js} +1 -1
- package/src/utils/{memoize.ts → memoize.js} +0 -2
- package/src/utils/{totalIngredientsInRecipe.ts → totalIngredientsInRecipe.js} +0 -2
- /package/src/common/{constants.ts → constants.js} +0 -0
- /package/src/common/services/{randomNumber.test.ts → randomNumber.test.js} +0 -0
- /package/src/common/{utils.test.ts → utils.test.js} +0 -0
- /package/src/components/AccountingView/{AccountingView.test.tsx → AccountingView.test.js} +0 -0
- /package/src/components/AccountingView/{index.ts → index.js} +0 -0
- /package/src/components/Achievement/{Achievement.tsx → Achievement.js} +0 -0
- /package/src/components/Achievement/{Achievement.test.tsx → Achievement.test.js} +0 -0
- /package/src/components/Achievement/{index.ts → index.js} +0 -0
- /package/src/components/AchievementsView/{AchievementsView.test.tsx → AchievementsView.test.js} +0 -0
- /package/src/components/AchievementsView/{index.ts → index.js} +0 -0
- /package/src/components/AnimatedNumber/{AnimatedNumber.test.tsx → AnimatedNumber.test.js} +0 -0
- /package/src/components/AnimatedNumber/{index.ts → index.js} +0 -0
- /package/src/components/AppBar/{AppBar.test.tsx → AppBar.test.js} +0 -0
- /package/src/components/AppBar/{index.ts → index.js} +0 -0
- /package/src/components/BailOutErrorBoundary/{BailOutErrorBoundary.test.tsx → BailOutErrorBoundary.test.js} +0 -0
- /package/src/components/BailOutErrorBoundary/{index.ts → index.js} +0 -0
- /package/src/components/Cellar/{Cellar.tsx → Cellar.js} +0 -0
- /package/src/components/Cellar/{FermentationTabPanel.tsx → FermentationTabPanel.js} +0 -0
- /package/src/components/Cellar/TabPanel/{index.tsx → index.js} +0 -0
- /package/src/components/Cellar/{WinemakingTabPanel.tsx → WinemakingTabPanel.js} +0 -0
- /package/src/components/Cellar/{index.ts → index.js} +0 -0
- /package/src/components/ChatRoom/{ChatRoom.tsx → ChatRoom.js} +0 -0
- /package/src/components/ChatRoom/{index.ts → index.js} +0 -0
- /package/src/components/ContextPane/{index.ts → index.js} +0 -0
- /package/src/components/CowCard/Bloodline/{Bloodline.tsx → Bloodline.js} +0 -0
- /package/src/components/CowCard/Bloodline/{index.ts → index.js} +0 -0
- /package/src/components/CowCard/{CowCard.test.tsx → CowCard.test.js} +0 -0
- /package/src/components/CowCard/Subheader/{Subheader.test.tsx → Subheader.test.js} +0 -0
- /package/src/components/CowCard/Subheader/{index.ts → index.js} +0 -0
- /package/src/components/CowCard/{index.ts → index.js} +0 -0
- /package/src/components/CowPen/{CowPen.tsx → CowPen.js} +0 -0
- /package/src/components/CowPen/{index.ts → index.js} +0 -0
- /package/src/components/CowPenContextMenu/{CowPenContextMenu.tsx → CowPenContextMenu.js} +0 -0
- /package/src/components/CowPenContextMenu/{CowPenContextMenu.test.tsx → CowPenContextMenu.test.js} +0 -0
- /package/src/components/CowPenContextMenu/TabPanel/{index.tsx → index.js} +0 -0
- /package/src/components/CowPenContextMenu/{index.ts → index.js} +0 -0
- /package/src/components/Elements/{index.ts → index.js} +0 -0
- /package/src/components/Farmhand/{Farmhand.test.ts → Farmhand.test.js} +0 -0
- /package/src/components/Farmhand/{FarmhandReducers.tsx → FarmhandReducers.js} +0 -0
- /package/src/components/Farmhand/helpers/{getInventoryQuantities.ts → getInventoryQuantities.js} +0 -0
- /package/src/components/Farmhand/helpers/{getInventoryQuantities.test.ts → getInventoryQuantities.test.js} +0 -0
- /package/src/components/Farmhand/{index.ts → index.js} +0 -0
- /package/src/components/Field/{index.ts → index.js} +0 -0
- /package/src/components/Forest/{Forest.tsx → Forest.js} +0 -0
- /package/src/components/Forest/{index.ts → index.js} +0 -0
- /package/src/components/Home/{Home.test.tsx → Home.test.js} +0 -0
- /package/src/components/Home/{index.ts → index.js} +0 -0
- /package/src/components/IngredientsList/{IngredientsList.tsx → IngredientsList.js} +0 -0
- /package/src/components/IngredientsList/{IngredientsList.test.tsx → IngredientsList.test.js} +0 -0
- /package/src/components/IngredientsList/{index.ts → index.js} +0 -0
- /package/src/components/Inventory/{Inventory.test.tsx → Inventory.test.js} +0 -0
- /package/src/components/Inventory/{index.ts → index.js} +0 -0
- /package/src/components/Item/{Item.test.tsx → Item.test.js} +0 -0
- /package/src/components/Item/{index.ts → index.js} +0 -0
- /package/src/components/KeybindingsView/{KeybindingsView.tsx → KeybindingsView.js} +0 -0
- /package/src/components/KeybindingsView/{KeybindingsView.test.tsx → KeybindingsView.test.js} +0 -0
- /package/src/components/KeybindingsView/{index.ts → index.js} +0 -0
- /package/src/components/LogView/{LogView.test.tsx → LogView.test.js} +0 -0
- /package/src/components/LogView/{index.ts → index.js} +0 -0
- /package/src/components/Navigation/{DayAndProgressContainer.tsx → DayAndProgressContainer.js} +0 -0
- /package/src/components/Navigation/{Navigation.test.tsx → Navigation.test.js} +0 -0
- /package/src/components/Navigation/{index.ts → index.js} +0 -0
- /package/src/components/NotificationSystem/{NotificationSystem.test.tsx → NotificationSystem.test.js} +0 -0
- /package/src/components/NotificationSystem/{index.ts → index.js} +0 -0
- /package/src/components/OnlinePeersView/OnlinePeer/{OnlinePeer.tsx → OnlinePeer.js} +0 -0
- /package/src/components/OnlinePeersView/OnlinePeer/{OnlinePeer.test.tsx → OnlinePeer.test.js} +0 -0
- /package/src/components/OnlinePeersView/OnlinePeer/{index.ts → index.js} +0 -0
- /package/src/components/OnlinePeersView/{OnlinePeersView.test.tsx → OnlinePeersView.test.js} +0 -0
- /package/src/components/OnlinePeersView/{index.ts → index.js} +0 -0
- /package/src/components/Plot/{index.ts → index.js} +0 -0
- /package/src/components/PriceEventView/{PriceEventView.tsx → PriceEventView.js} +0 -0
- /package/src/components/PriceEventView/{index.ts → index.js} +0 -0
- /package/src/components/ProgressBar/{ProgressBar.test.tsx → ProgressBar.test.js} +0 -0
- /package/src/components/ProgressBar/{index.ts → index.js} +0 -0
- /package/src/components/QuantityInput/{QuantityInput.test.tsx → QuantityInput.test.js} +0 -0
- /package/src/components/QuantityInput/{index.ts → index.js} +0 -0
- /package/src/components/QuickSelect/{QuickSelect.tsx → QuickSelect.js} +0 -0
- /package/src/components/QuickSelect/{QuickSelect.test.tsx → QuickSelect.test.js} +0 -0
- /package/src/components/QuickSelect/{index.ts → index.js} +0 -0
- /package/src/components/Recipe/{Recipe.test.tsx → Recipe.test.js} +0 -0
- /package/src/components/Recipe/{index.ts → index.js} +0 -0
- /package/src/components/RecipeList/{RecipeList.tsx → RecipeList.js} +0 -0
- /package/src/components/SearchBar/{SearchBar.tsx → SearchBar.js} +0 -0
- /package/src/components/SearchBar/{SearchBar.test.tsx → SearchBar.test.js} +0 -0
- /package/src/components/SearchBar/{index.ts → index.js} +0 -0
- /package/src/components/SettingsView/{RandomSeedInput.test.tsx → RandomSeedInput.test.js} +0 -0
- /package/src/components/SettingsView/{SettingsView.tsx → SettingsView.js} +0 -0
- /package/src/components/SettingsView/{SettingsView.test.tsx → SettingsView.test.js} +0 -0
- /package/src/components/SettingsView/{index.ts → index.js} +0 -0
- /package/src/components/Shop/{Shop.test.tsx → Shop.test.js} +0 -0
- /package/src/components/Shop/TabPanel/{index.tsx → index.js} +0 -0
- /package/src/components/Shop/{index.ts → index.js} +0 -0
- /package/src/components/Stage/{index.ts → index.js} +0 -0
- /package/src/components/StatsView/{StatsView.tsx → StatsView.js} +0 -0
- /package/src/components/StatsView/{StatsView.test.tsx → StatsView.test.js} +0 -0
- /package/src/components/StatsView/{index.ts → index.js} +0 -0
- /package/src/components/TierPurchase/{TierPurchase.tsx → TierPurchase.js} +0 -0
- /package/src/components/TierPurchase/{TierPurchase.test.tsx → TierPurchase.test.js} +0 -0
- /package/src/components/TierPurchase/{index.ts → index.js} +0 -0
- /package/src/components/Toolbelt/{Toolbelt.test.tsx → Toolbelt.test.js} +0 -0
- /package/src/components/Toolbelt/{index.ts → index.js} +0 -0
- /package/src/components/UpdateNotifier/{UpdateNotifier.tsx → UpdateNotifier.js} +0 -0
- /package/src/components/UpdateNotifier/{index.ts → index.js} +0 -0
- /package/src/components/UpgradePurchase/{UpgradePurchase.test.tsx → UpgradePurchase.test.js} +0 -0
- /package/src/components/UpgradePurchase/{index.ts → index.js} +0 -0
- /package/src/components/Workshop/{KitchenTabPanel.tsx → KitchenTabPanel.js} +0 -0
- /package/src/components/Workshop/{RecyclingTabPanel.tsx → RecyclingTabPanel.js} +0 -0
- /package/src/components/Workshop/TabPanel/{index.tsx → index.js} +0 -0
- /package/src/components/Workshop/{Workshop.tsx → Workshop.js} +0 -0
- /package/src/components/Workshop/{Workshop.test.tsx → Workshop.test.js} +0 -0
- /package/src/components/Workshop/{index.ts → index.js} +0 -0
- /package/src/{config.ts → config.js} +0 -0
- /package/src/data/__mocks__/{items.ts → items.js} +0 -0
- /package/src/data/__mocks__/{maps.ts → maps.js} +0 -0
- /package/src/data/__mocks__/{recipes.ts → recipes.js} +0 -0
- /package/src/data/__mocks__/{shop-inventory.ts → shop-inventory.js} +0 -0
- /package/src/data/crops/{index.ts → index.js} +0 -0
- /package/src/data/{fruit-names.ts → fruit-names.js} +0 -0
- /package/src/data/{items-map.ts → items-map.js} +0 -0
- /package/src/data/ores/{index.ts → index.js} +0 -0
- /package/src/data/{shop-inventory-cow.ts → shop-inventory-cow.js} +0 -0
- /package/src/data/{shop-inventory.ts → shop-inventory.js} +0 -0
- /package/src/data/{tools.ts → tools.js} +0 -0
- /package/src/data/{upgrades.ts → upgrades.js} +0 -0
- /package/src/factories/{CoalFactory.test.ts → CoalFactory.test.js} +0 -0
- /package/src/factories/{OreFactory.test.ts → OreFactory.test.js} +0 -0
- /package/src/factories/{StoneFactory.test.ts → StoneFactory.test.js} +0 -0
- /package/src/factories/{index.ts → index.js} +0 -0
- /package/src/game-logic/cows/{cow-selection.test.ts → cow-selection.test.js} +0 -0
- /package/src/game-logic/{item-purchase.test.ts → item-purchase.test.js} +0 -0
- /package/src/game-logic/{item-sell.test.ts → item-sell.test.js} +0 -0
- /package/src/game-logic/reducers/{addCowToInventory.ts → addCowToInventory.js} +0 -0
- /package/src/game-logic/reducers/{addExperience.ts → addExperience.js} +0 -0
- /package/src/game-logic/reducers/{addExperience.test.ts → addExperience.test.js} +0 -0
- /package/src/game-logic/reducers/{addItemToInventory.ts → addItemToInventory.js} +0 -0
- /package/src/game-logic/reducers/{addItemToInventory.test.ts → addItemToInventory.test.js} +0 -0
- /package/src/game-logic/reducers/{addKegToCellarInventory.ts → addKegToCellarInventory.js} +0 -0
- /package/src/game-logic/reducers/{addPeer.ts → addPeer.js} +0 -0
- /package/src/game-logic/reducers/{addRevenue.ts → addRevenue.js} +0 -0
- /package/src/game-logic/reducers/{adjustLoan.ts → adjustLoan.js} +0 -0
- /package/src/game-logic/reducers/{adjustLoan.test.ts → adjustLoan.test.js} +0 -0
- /package/src/game-logic/reducers/{applyCrows.test.ts → applyCrows.test.js} +0 -0
- /package/src/game-logic/reducers/{applyLoanInterest.test.ts → applyLoanInterest.test.js} +0 -0
- /package/src/game-logic/reducers/{applyPrecipitation.test.ts → applyPrecipitation.test.js} +0 -0
- /package/src/game-logic/reducers/{changeCowAutomaticHugState.ts → changeCowAutomaticHugState.js} +0 -0
- /package/src/game-logic/reducers/{changeCowAutomaticHugState.test.ts → changeCowAutomaticHugState.test.js} +0 -0
- /package/src/game-logic/reducers/{changeCowBreedingPenResident.ts → changeCowBreedingPenResident.js} +0 -0
- /package/src/game-logic/reducers/{changeCowBreedingPenResident.test.ts → changeCowBreedingPenResident.test.js} +0 -0
- /package/src/game-logic/reducers/{changeCowName.ts → changeCowName.js} +0 -0
- /package/src/game-logic/reducers/{changeCowName.test.ts → changeCowName.test.js} +0 -0
- /package/src/game-logic/reducers/{clearPlot.ts → clearPlot.js} +0 -0
- /package/src/game-logic/reducers/{clearPlot.test.ts → clearPlot.test.js} +0 -0
- /package/src/game-logic/reducers/{computeCowInventoryForNextDay.ts → computeCowInventoryForNextDay.js} +0 -0
- /package/src/game-logic/reducers/{computeCowInventoryForNextDay.test.ts → computeCowInventoryForNextDay.test.js} +0 -0
- /package/src/game-logic/reducers/{computeStateForNextDay.test.ts → computeStateForNextDay.test.js} +0 -0
- /package/src/game-logic/reducers/{consumeIngredients.ts → consumeIngredients.js} +0 -0
- /package/src/game-logic/reducers/{consumeIngredients.test.ts → consumeIngredients.test.js} +0 -0
- /package/src/game-logic/reducers/{createPriceEvent.ts → createPriceEvent.js} +0 -0
- /package/src/game-logic/reducers/{createPriceEvent.test.ts → createPriceEvent.test.js} +0 -0
- /package/src/game-logic/reducers/{decrementItemFromInventory.ts → decrementItemFromInventory.js} +0 -0
- /package/src/game-logic/reducers/{decrementItemFromInventory.test.ts → decrementItemFromInventory.test.js} +0 -0
- /package/src/game-logic/reducers/{fertilizePlot.ts → fertilizePlot.js} +0 -0
- /package/src/game-logic/reducers/{fertilizePlot.test.ts → fertilizePlot.test.js} +0 -0
- /package/src/game-logic/reducers/{forRange.ts → forRange.js} +0 -0
- /package/src/game-logic/reducers/{forRange.test.ts → forRange.test.js} +0 -0
- /package/src/game-logic/reducers/{generatePriceEvents.ts → generatePriceEvents.js} +0 -0
- /package/src/game-logic/reducers/{generatePriceEvents.test.ts → generatePriceEvents.test.js} +0 -0
- /package/src/game-logic/reducers/{harvestPlot.ts → harvestPlot.js} +0 -0
- /package/src/game-logic/reducers/{harvestPlot.test.ts → harvestPlot.test.js} +0 -0
- /package/src/game-logic/reducers/{helpers.tsx → helpers.js} +0 -0
- /package/src/game-logic/reducers/{hugCow.ts → hugCow.js} +0 -0
- /package/src/game-logic/reducers/{hugCow.test.ts → hugCow.test.js} +0 -0
- /package/src/game-logic/reducers/{incrementPlotContentAge.ts → incrementPlotContentAge.js} +0 -0
- /package/src/game-logic/reducers/{incrementPlotContentAge.test.ts → incrementPlotContentAge.test.js} +0 -0
- /package/src/game-logic/reducers/{index.ts → index.js} +0 -0
- /package/src/game-logic/reducers/{makeFermentationRecipe.test.ts → makeFermentationRecipe.test.js} +0 -0
- /package/src/game-logic/reducers/{makeRecipe.ts → makeRecipe.js} +0 -0
- /package/src/game-logic/reducers/{makeRecipe.test.ts → makeRecipe.test.js} +0 -0
- /package/src/game-logic/reducers/{minePlot.test.ts → minePlot.test.js} +0 -0
- /package/src/game-logic/reducers/{modifyCow.ts → modifyCow.js} +0 -0
- /package/src/game-logic/reducers/{modifyFieldPlotAt.ts → modifyFieldPlotAt.js} +0 -0
- /package/src/game-logic/reducers/{offerCow.ts → offerCow.js} +0 -0
- /package/src/game-logic/reducers/{offerCow.test.ts → offerCow.test.js} +0 -0
- /package/src/game-logic/reducers/{plantInPlot.ts → plantInPlot.js} +0 -0
- /package/src/game-logic/reducers/{plantInPlot.test.ts → plantInPlot.test.js} +0 -0
- /package/src/game-logic/reducers/{prependPendingPeerMessage.ts → prependPendingPeerMessage.js} +0 -0
- /package/src/game-logic/reducers/{prependPendingPeerMessage.test.ts → prependPendingPeerMessage.test.js} +0 -0
- /package/src/game-logic/reducers/{processCellar.ts → processCellar.js} +0 -0
- /package/src/game-logic/reducers/{processCellar.test.ts → processCellar.test.js} +0 -0
- /package/src/game-logic/reducers/{processCowAttrition.ts → processCowAttrition.js} +0 -0
- /package/src/game-logic/reducers/{processCowAttrition.test.ts → processCowAttrition.test.js} +0 -0
- /package/src/game-logic/reducers/{processCowBreeding.ts → processCowBreeding.js} +0 -0
- /package/src/game-logic/reducers/{processCowBreeding.test.ts → processCowBreeding.test.js} +0 -0
- /package/src/game-logic/reducers/{processCowFertilizerProduction.test.ts → processCowFertilizerProduction.test.js} +0 -0
- /package/src/game-logic/reducers/{processFeedingCows.ts → processFeedingCows.js} +0 -0
- /package/src/game-logic/reducers/{processFeedingCows.test.ts → processFeedingCows.test.js} +0 -0
- /package/src/game-logic/reducers/{processField.ts → processField.js} +0 -0
- /package/src/game-logic/reducers/{processLevelUp.test.ts → processLevelUp.test.js} +0 -0
- /package/src/game-logic/reducers/{processMilkingCows.ts → processMilkingCows.js} +0 -0
- /package/src/game-logic/reducers/{processMilkingCows.test.ts → processMilkingCows.test.js} +0 -0
- /package/src/game-logic/reducers/{processNerfs.ts → processNerfs.js} +0 -0
- /package/src/game-logic/reducers/{processNerfs.test.ts → processNerfs.test.js} +0 -0
- /package/src/game-logic/reducers/{processSprinklers.ts → processSprinklers.js} +0 -0
- /package/src/game-logic/reducers/{processSprinklers.test.ts → processSprinklers.test.js} +0 -0
- /package/src/game-logic/reducers/{processWeather.ts → processWeather.js} +0 -0
- /package/src/game-logic/reducers/{processWeather.test.ts → processWeather.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCellar.ts → purchaseCellar.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCellar.test.ts → purchaseCellar.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCombine.ts → purchaseCombine.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCombine.test.ts → purchaseCombine.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseComposter.ts → purchaseComposter.js} +0 -0
- /package/src/game-logic/reducers/{purchaseComposter.test.ts → purchaseComposter.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCow.ts → purchaseCow.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCow.test.ts → purchaseCow.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCowPen.ts → purchaseCowPen.js} +0 -0
- /package/src/game-logic/reducers/{purchaseCowPen.test.ts → purchaseCowPen.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseField.ts → purchaseField.js} +0 -0
- /package/src/game-logic/reducers/{purchaseForest.ts → purchaseForest.js} +0 -0
- /package/src/game-logic/reducers/{purchaseItem.ts → purchaseItem.js} +0 -0
- /package/src/game-logic/reducers/{purchaseItem.test.ts → purchaseItem.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseSmelter.ts → purchaseSmelter.js} +0 -0
- /package/src/game-logic/reducers/{purchaseSmelter.test.ts → purchaseSmelter.test.js} +0 -0
- /package/src/game-logic/reducers/{purchaseStorageExpansion.ts → purchaseStorageExpansion.js} +0 -0
- /package/src/game-logic/reducers/{purchaseStorageExpansion.test.ts → purchaseStorageExpansion.test.js} +0 -0
- /package/src/game-logic/reducers/{removeCowFromInventory.ts → removeCowFromInventory.js} +0 -0
- /package/src/game-logic/reducers/{removeFieldPlotAt.ts → removeFieldPlotAt.js} +0 -0
- /package/src/game-logic/reducers/{removeKegFromCellar.ts → removeKegFromCellar.js} +0 -0
- /package/src/game-logic/reducers/{removePeer.ts → removePeer.js} +0 -0
- /package/src/game-logic/reducers/{rotateNotificationLogs.test.ts → rotateNotificationLogs.test.js} +0 -0
- /package/src/game-logic/reducers/{selectCow.ts → selectCow.js} +0 -0
- /package/src/game-logic/reducers/{selectCow.test.ts → selectCow.test.js} +0 -0
- /package/src/game-logic/reducers/{sellCow.ts → sellCow.js} +0 -0
- /package/src/game-logic/reducers/{sellCow.test.ts → sellCow.test.js} +0 -0
- /package/src/game-logic/reducers/{sellItem.ts → sellItem.js} +0 -0
- /package/src/game-logic/reducers/{sellKeg.test.ts → sellKeg.test.js} +0 -0
- /package/src/game-logic/reducers/{setScarecrow.ts → setScarecrow.js} +0 -0
- /package/src/game-logic/reducers/{setScarecrow.test.ts → setScarecrow.test.js} +0 -0
- /package/src/game-logic/reducers/{setSprinkler.ts → setSprinkler.js} +0 -0
- /package/src/game-logic/reducers/{setSprinkler.test.ts → setSprinkler.test.js} +0 -0
- /package/src/game-logic/reducers/{showNotification.ts → showNotification.js} +0 -0
- /package/src/game-logic/reducers/{showNotification.test.ts → showNotification.test.js} +0 -0
- /package/src/game-logic/reducers/{spawnWeeds.test.ts → spawnWeeds.test.js} +0 -0
- /package/src/game-logic/reducers/{unlockTool.ts → unlockTool.js} +0 -0
- /package/src/game-logic/reducers/{unlockTool.test.ts → unlockTool.test.js} +0 -0
- /package/src/game-logic/reducers/{updateAchievements.test.ts → updateAchievements.test.js} +0 -0
- /package/src/game-logic/reducers/{updateFinancialRecords.ts → updateFinancialRecords.js} +0 -0
- /package/src/game-logic/reducers/{updateFinancialRecords.test.ts → updateFinancialRecords.test.js} +0 -0
- /package/src/game-logic/reducers/{updateInventoryRecordsForNextDay.ts → updateInventoryRecordsForNextDay.js} +0 -0
- /package/src/game-logic/reducers/{updateInventoryRecordsForNextDay.test.ts → updateInventoryRecordsForNextDay.test.js} +0 -0
- /package/src/game-logic/reducers/{updateLearnedRecipes.ts → updateLearnedRecipes.js} +0 -0
- /package/src/game-logic/reducers/{updateLearnedRecipes.test.ts → updateLearnedRecipes.test.js} +0 -0
- /package/src/game-logic/reducers/{updatePlotShoveledState.ts → updatePlotShoveledState.js} +0 -0
- /package/src/game-logic/reducers/{updatePriceEvents.tsx → updatePriceEvents.js} +0 -0
- /package/src/game-logic/reducers/{updatePriceEvents.test.ts → updatePriceEvents.test.js} +0 -0
- /package/src/game-logic/reducers/{upgradeTool.ts → upgradeTool.js} +0 -0
- /package/src/game-logic/reducers/{upgradeTool.test.ts → upgradeTool.test.js} +0 -0
- /package/src/game-logic/reducers/{waterAllPlots.ts → waterAllPlots.js} +0 -0
- /package/src/game-logic/reducers/{waterAllPlots.test.ts → waterAllPlots.test.js} +0 -0
- /package/src/game-logic/reducers/{waterField.ts → waterField.js} +0 -0
- /package/src/game-logic/reducers/{waterPlot.ts → waterPlot.js} +0 -0
- /package/src/game-logic/reducers/{waterPlot.test.ts → waterPlot.test.js} +0 -0
- /package/src/game-logic/reducers/{withdrawCow.ts → withdrawCow.js} +0 -0
- /package/src/game-logic/reducers/{withdrawCow.test.ts → withdrawCow.test.js} +0 -0
- /package/src/img/__mocks__/{index.ts → index.js} +0 -0
- /package/src/img/{index.ts → index.js} +0 -0
- /package/src/interfaces/{Factory.ts → Factory.js} +0 -0
- /package/src/{mui-theme.ts → mui-theme.js} +0 -0
- /package/src/{polyfills.ts → polyfills.js} +0 -0
- /package/src/services/{cellar.ts → cellar.js} +0 -0
- /package/src/services/{wine.test.ts → wine.test.js} +0 -0
- /package/src/{setupTests.ts → setupTests.js} +0 -0
- /package/src/shell/{bootup.test.ts → bootup.test.js} +0 -0
- /package/src/shell/{field.test.ts → field.test.js} +0 -0
- /package/src/shell/{game-saving.test.ts → game-saving.test.js} +0 -0
- /package/src/shell/{navigation.test.ts → navigation.test.js} +0 -0
- /package/src/shell/{pending-notifications.test.ts → pending-notifications.test.js} +0 -0
- /package/src/{strings.ts → strings.js} +0 -0
- /package/src/test-utils/stubs/{cowStub.ts → cowStub.js} +0 -0
- /package/src/test-utils/stubs/{farmhandStub.tsx → farmhandStub.js} +0 -0
- /package/src/test-utils/stubs/{itemStub.ts → itemStub.js} +0 -0
- /package/src/test-utils/stubs/{peerMetadataStub.ts → peerMetadataStub.js} +0 -0
- /package/src/test-utils/stubs/{saveDataStubFactory.ts → saveDataStubFactory.js} +0 -0
- /package/src/test-utils/{ui.ts → ui.js} +0 -0
- /package/src/utils/__snapshots__/{index.test.ts.snap → index.test.js.snap} +0 -0
- /package/src/utils/{findInField.ts → findInField.js} +0 -0
- /package/src/utils/{findInField.test.ts → findInField.test.js} +0 -0
- /package/src/utils/{getCropLifecycleDuration.test.ts → getCropLifecycleDuration.test.js} +0 -0
- /package/src/utils/{getCropsAvailableToFerment.test.ts → getCropsAvailableToFerment.test.js} +0 -0
- /package/src/utils/{getItemBaseValue.ts → getItemBaseValue.js} +0 -0
- /package/src/utils/{getKegSpoilageRate.ts → getKegSpoilageRate.js} +0 -0
- /package/src/utils/{getKegSpoilageRate.test.ts → getKegSpoilageRate.test.js} +0 -0
- /package/src/utils/{getKegValue.ts → getKegValue.js} +0 -0
- /package/src/utils/{getKegValue.test.ts → getKegValue.test.js} +0 -0
- /package/src/utils/{getLevelEntitlements.test.ts → getLevelEntitlements.test.js} +0 -0
- /package/src/utils/{getMaxYieldOfFermentationRecipe.test.ts → getMaxYieldOfFermentationRecipe.test.js} +0 -0
- /package/src/utils/{getSaltRequirementsForFermentationRecipe.ts → getSaltRequirementsForFermentationRecipe.js} +0 -0
- /package/src/utils/{getWineVarietiesAvailableToMake.test.ts → getWineVarietiesAvailableToMake.test.js} +0 -0
- /package/src/utils/{getYeastRequiredForWine.ts → getYeastRequiredForWine.js} +0 -0
- /package/src/utils/{isItemAGrownCrop.ts → isItemAGrownCrop.js} +0 -0
- /package/src/utils/{levelAchieved.ts → levelAchieved.js} +0 -0
- /package/src/utils/{moneyString.ts → moneyString.js} +0 -0
- /package/src/utils/{moneyString.test.ts → moneyString.test.js} +0 -0
- /package/src/utils/{noop.ts → noop.js} +0 -0
- /package/src/utils/{totalIngredientsInRecipe.test.ts → totalIngredientsInRecipe.test.js} +0 -0
|
@@ -50,7 +50,6 @@ export default {
|
|
|
50
50
|
* @param {number} [howMany=1]
|
|
51
51
|
*/
|
|
52
52
|
handleItemPurchaseClick(item, howMany = 1) {
|
|
53
|
-
// @ts-expect-error
|
|
54
53
|
this.purchaseItem(item, howMany)
|
|
55
54
|
},
|
|
56
55
|
|
|
@@ -59,7 +58,6 @@ export default {
|
|
|
59
58
|
* @param {number} [howMany=1]
|
|
60
59
|
*/
|
|
61
60
|
handleMakeRecipeClick(recipe, howMany = 1) {
|
|
62
|
-
// @ts-expect-error
|
|
63
61
|
this.makeRecipe(recipe, howMany)
|
|
64
62
|
},
|
|
65
63
|
|
|
@@ -68,7 +66,6 @@ export default {
|
|
|
68
66
|
* @param {number} [howMany=1]
|
|
69
67
|
*/
|
|
70
68
|
handleMakeFermentationRecipeClick(fermentationRecipe, howMany = 1) {
|
|
71
|
-
// @ts-expect-error
|
|
72
69
|
this.makeFermentationRecipe(fermentationRecipe, howMany)
|
|
73
70
|
},
|
|
74
71
|
|
|
@@ -77,7 +74,6 @@ export default {
|
|
|
77
74
|
* @param {number} [howMany=1]
|
|
78
75
|
*/
|
|
79
76
|
handleMakeWineClick(grape, howMany = 1) {
|
|
80
|
-
// @ts-expect-error
|
|
81
77
|
this.makeWine(grape, howMany)
|
|
82
78
|
},
|
|
83
79
|
|
|
@@ -85,7 +81,6 @@ export default {
|
|
|
85
81
|
* @param {keg} keg
|
|
86
82
|
*/
|
|
87
83
|
handleSellKegClick(keg) {
|
|
88
|
-
// @ts-expect-error
|
|
89
84
|
this.sellKeg(keg)
|
|
90
85
|
},
|
|
91
86
|
|
|
@@ -93,7 +88,6 @@ export default {
|
|
|
93
88
|
* @param {keg} keg
|
|
94
89
|
*/
|
|
95
90
|
handleThrowAwayKegClick(keg) {
|
|
96
|
-
// @ts-expect-error
|
|
97
91
|
this.removeKegFromCellar(keg.id)
|
|
98
92
|
},
|
|
99
93
|
|
|
@@ -101,7 +95,6 @@ export default {
|
|
|
101
95
|
* @param {farmhand.upgradesMetadatum} upgrade
|
|
102
96
|
*/
|
|
103
97
|
handleUpgradeTool(upgrade) {
|
|
104
|
-
// @ts-expect-error
|
|
105
98
|
this.upgradeTool(upgrade)
|
|
106
99
|
},
|
|
107
100
|
|
|
@@ -109,7 +102,6 @@ export default {
|
|
|
109
102
|
* @param {farmhand.cow} cow
|
|
110
103
|
*/
|
|
111
104
|
handleCowPurchaseClick(cow) {
|
|
112
|
-
// @ts-expect-error
|
|
113
105
|
this.purchaseCow(cow)
|
|
114
106
|
},
|
|
115
107
|
|
|
@@ -117,7 +109,6 @@ export default {
|
|
|
117
109
|
* @param {farmhand.cow} cow
|
|
118
110
|
*/
|
|
119
111
|
handleCowSellClick(cow) {
|
|
120
|
-
// @ts-expect-error
|
|
121
112
|
this.sellCow(cow)
|
|
122
113
|
},
|
|
123
114
|
|
|
@@ -125,7 +116,6 @@ export default {
|
|
|
125
116
|
* @param {farmhand.cow} cow
|
|
126
117
|
*/
|
|
127
118
|
handleCowTradeClick(cow) {
|
|
128
|
-
// @ts-expect-error
|
|
129
119
|
this.tradeForPeerCow(cow)
|
|
130
120
|
},
|
|
131
121
|
|
|
@@ -134,7 +124,6 @@ export default {
|
|
|
134
124
|
* @param {farmhand.cow} cow
|
|
135
125
|
*/
|
|
136
126
|
handleCowAutomaticHugChange({ target: { checked } }, cow) {
|
|
137
|
-
// @ts-expect-error
|
|
138
127
|
this.changeCowAutomaticHugState(cow, checked)
|
|
139
128
|
},
|
|
140
129
|
|
|
@@ -144,7 +133,6 @@ export default {
|
|
|
144
133
|
*/
|
|
145
134
|
handleCowBreedChange({ target }, cow) {
|
|
146
135
|
const { checked } = target
|
|
147
|
-
// @ts-expect-error
|
|
148
136
|
this.changeCowBreedingPenResident(cow, checked)
|
|
149
137
|
},
|
|
150
138
|
|
|
@@ -152,7 +140,6 @@ export default {
|
|
|
152
140
|
* @param {farmhand.cow} cow
|
|
153
141
|
*/
|
|
154
142
|
handleCowHugClick(cow) {
|
|
155
|
-
// @ts-expect-error
|
|
156
143
|
this.hugCow(cow.id)
|
|
157
144
|
},
|
|
158
145
|
|
|
@@ -160,7 +147,6 @@ export default {
|
|
|
160
147
|
* @param {farmhand.cow} cow
|
|
161
148
|
*/
|
|
162
149
|
handleCowOfferClick(cow) {
|
|
163
|
-
// @ts-expect-error
|
|
164
150
|
this.offerCow(cow.id)
|
|
165
151
|
},
|
|
166
152
|
|
|
@@ -168,7 +154,6 @@ export default {
|
|
|
168
154
|
* @param {farmhand.cow} cow
|
|
169
155
|
*/
|
|
170
156
|
handleCowWithdrawClick(cow) {
|
|
171
|
-
// @ts-expect-error
|
|
172
157
|
this.withdrawCow(cow.id)
|
|
173
158
|
},
|
|
174
159
|
|
|
@@ -178,7 +163,6 @@ export default {
|
|
|
178
163
|
*/
|
|
179
164
|
handleCowNameInputChange({ target }, cow) {
|
|
180
165
|
const { value } = target
|
|
181
|
-
// @ts-expect-error
|
|
182
166
|
this.changeCowName(cow.id, value)
|
|
183
167
|
},
|
|
184
168
|
|
|
@@ -187,7 +171,6 @@ export default {
|
|
|
187
171
|
* @param {number} [howMany=1]
|
|
188
172
|
*/
|
|
189
173
|
handleItemSellClick(item, howMany = 1) {
|
|
190
|
-
// @ts-expect-error
|
|
191
174
|
this.sellItem(item, howMany)
|
|
192
175
|
},
|
|
193
176
|
|
|
@@ -196,9 +179,8 @@ export default {
|
|
|
196
179
|
*/
|
|
197
180
|
handleViewChange({ target }) {
|
|
198
181
|
const { value } = target
|
|
199
|
-
// @ts-expect-error
|
|
200
182
|
this.setState({
|
|
201
|
-
stageFocus: /** @type {farmhand.stageFocusType} */ value,
|
|
183
|
+
stageFocus: /** @type {farmhand.stageFocusType} */ (value),
|
|
202
184
|
})
|
|
203
185
|
},
|
|
204
186
|
|
|
@@ -206,7 +188,6 @@ export default {
|
|
|
206
188
|
* @param {farmhand.stageFocusType} stageFocus
|
|
207
189
|
*/
|
|
208
190
|
handleViewChangeButtonClick(stageFocus) {
|
|
209
|
-
// @ts-expect-error
|
|
210
191
|
this.setState({ stageFocus })
|
|
211
192
|
},
|
|
212
193
|
|
|
@@ -214,10 +195,10 @@ export default {
|
|
|
214
195
|
* @param {farmhand.fieldMode} selectedFieldMode
|
|
215
196
|
*/
|
|
216
197
|
handleFieldModeSelect(selectedFieldMode) {
|
|
217
|
-
// @ts-expect-error
|
|
218
198
|
this.setState(({ selectedItemId }) => ({
|
|
219
199
|
selectedItemId:
|
|
220
200
|
selectedFieldMode !== PLANT ||
|
|
201
|
+
// @ts-expect-error
|
|
221
202
|
TOOLBELT_FIELD_MODES.has(selectedFieldMode)
|
|
222
203
|
? ''
|
|
223
204
|
: selectedItemId,
|
|
@@ -229,7 +210,6 @@ export default {
|
|
|
229
210
|
* @param {item} item
|
|
230
211
|
*/
|
|
231
212
|
handleItemSelectClick({ id, enablesFieldMode }) {
|
|
232
|
-
// @ts-expect-error
|
|
233
213
|
this.setState({
|
|
234
214
|
fieldMode: enablesFieldMode,
|
|
235
215
|
selectedItemId: id,
|
|
@@ -245,32 +225,23 @@ export default {
|
|
|
245
225
|
fieldMode: fieldModeValue,
|
|
246
226
|
hoveredPlotRangeSize: rangeRadius,
|
|
247
227
|
selectedItemId,
|
|
248
|
-
// @ts-expect-error
|
|
249
228
|
} = this.state
|
|
250
229
|
|
|
251
230
|
if (fieldModeValue === PLANT) {
|
|
252
|
-
// @ts-expect-error
|
|
253
231
|
this.forRange(plantInPlot, rangeRadius, x, y, selectedItemId)
|
|
254
232
|
} else if (fieldModeValue === HARVEST) {
|
|
255
|
-
// @ts-expect-error
|
|
256
233
|
this.forRange(harvestPlot, rangeRadius, x, y)
|
|
257
234
|
} else if (fieldModeValue === MINE) {
|
|
258
|
-
// @ts-expect-error
|
|
259
235
|
this.forRange(minePlot, rangeRadius, x, y)
|
|
260
236
|
} else if (fieldModeValue === CLEANUP) {
|
|
261
|
-
// @ts-expect-error
|
|
262
237
|
this.forRange(clearPlot, rangeRadius, x, y)
|
|
263
238
|
} else if (fieldModeValue === WATER) {
|
|
264
|
-
// @ts-expect-error
|
|
265
239
|
this.forRange(waterPlot, rangeRadius, x, y)
|
|
266
240
|
} else if (fieldModeValue === FERTILIZE) {
|
|
267
|
-
// @ts-expect-error
|
|
268
241
|
this.forRange(fertilizePlot, rangeRadius, x, y)
|
|
269
242
|
} else if (fieldModeValue === SET_SPRINKLER) {
|
|
270
|
-
// @ts-expect-error
|
|
271
243
|
this.setSprinkler(x, y)
|
|
272
244
|
} else if (fieldModeValue === SET_SCARECROW) {
|
|
273
|
-
// @ts-expect-error
|
|
274
245
|
this.setScarecrow(x, y)
|
|
275
246
|
}
|
|
276
247
|
},
|
|
@@ -279,18 +250,15 @@ export default {
|
|
|
279
250
|
* @param {number} range
|
|
280
251
|
*/
|
|
281
252
|
handleFieldActionRangeChange(range) {
|
|
282
|
-
// @ts-expect-error
|
|
283
253
|
this.setState(() => ({ hoveredPlotRangeSize: range }))
|
|
284
254
|
},
|
|
285
255
|
|
|
286
256
|
handleClickEndDayButton() {
|
|
287
|
-
// @ts-expect-error
|
|
288
257
|
this.incrementDay()
|
|
289
258
|
|
|
290
259
|
// Prevent the player from spamming the End Day button
|
|
291
260
|
// https://www.reddit.com/r/incremental_games/comments/jusn9i/farmhand_updates_for_November_2020/gcmi6x6/?context=3
|
|
292
|
-
const activeElement = /** @type {HTMLElement} */ document.activeElement
|
|
293
|
-
// @ts-expect-error
|
|
261
|
+
const activeElement = /** @type {HTMLElement} */ (document.activeElement)
|
|
294
262
|
activeElement.blur()
|
|
295
263
|
},
|
|
296
264
|
|
|
@@ -298,17 +266,14 @@ export default {
|
|
|
298
266
|
* @param {number} amount
|
|
299
267
|
*/
|
|
300
268
|
handleAddMoneyClick(amount) {
|
|
301
|
-
// @ts-expect-error
|
|
302
269
|
this.setState(({ money }) => ({ money: moneyTotal(money, amount) }))
|
|
303
270
|
},
|
|
304
271
|
|
|
305
272
|
handleClearPersistedDataClick() {
|
|
306
|
-
// @ts-expect-error
|
|
307
273
|
this.clearPersistedData()
|
|
308
274
|
},
|
|
309
275
|
|
|
310
276
|
handleWaterAllPlotsClick() {
|
|
311
|
-
// @ts-expect-error
|
|
312
277
|
this.waterAllPlots(this.state)
|
|
313
278
|
},
|
|
314
279
|
|
|
@@ -316,7 +281,6 @@ export default {
|
|
|
316
281
|
* @param {number} fieldId
|
|
317
282
|
*/
|
|
318
283
|
handleFieldPurchase(fieldId) {
|
|
319
|
-
// @ts-expect-error
|
|
320
284
|
this.purchaseField(fieldId)
|
|
321
285
|
},
|
|
322
286
|
|
|
@@ -324,7 +288,6 @@ export default {
|
|
|
324
288
|
* @param {number} forestId
|
|
325
289
|
*/
|
|
326
290
|
handleForestPurchase(forestId) {
|
|
327
|
-
// @ts-expect-error
|
|
328
291
|
this.purchaseForest(forestId)
|
|
329
292
|
},
|
|
330
293
|
|
|
@@ -332,7 +295,6 @@ export default {
|
|
|
332
295
|
* @param {number} combineId
|
|
333
296
|
*/
|
|
334
297
|
handleCombinePurchase(combineId) {
|
|
335
|
-
// @ts-expect-error
|
|
336
298
|
this.purchaseCombine(combineId)
|
|
337
299
|
},
|
|
338
300
|
|
|
@@ -340,7 +302,6 @@ export default {
|
|
|
340
302
|
* @param {number} composterId
|
|
341
303
|
*/
|
|
342
304
|
handleComposterPurchase(composterId) {
|
|
343
|
-
// @ts-expect-error
|
|
344
305
|
this.purchaseComposter(composterId)
|
|
345
306
|
},
|
|
346
307
|
|
|
@@ -348,7 +309,6 @@ export default {
|
|
|
348
309
|
* @param {number} smelterId
|
|
349
310
|
*/
|
|
350
311
|
handleSmelterPurchase(smelterId) {
|
|
351
|
-
// @ts-expect-error
|
|
352
312
|
this.purchaseSmelter(smelterId)
|
|
353
313
|
},
|
|
354
314
|
|
|
@@ -356,7 +316,6 @@ export default {
|
|
|
356
316
|
* @param {number} cowPenId
|
|
357
317
|
*/
|
|
358
318
|
handleCowPenPurchase(cowPenId) {
|
|
359
|
-
// @ts-expect-error
|
|
360
319
|
this.purchaseCowPen(cowPenId)
|
|
361
320
|
},
|
|
362
321
|
|
|
@@ -364,32 +323,27 @@ export default {
|
|
|
364
323
|
* @param {number} cellarId
|
|
365
324
|
*/
|
|
366
325
|
handleCellarPurchase(cellarId) {
|
|
367
|
-
// @ts-expect-error
|
|
368
326
|
this.purchaseCellar(cellarId)
|
|
369
327
|
},
|
|
370
328
|
|
|
371
329
|
handleStorageExpansionPurchase() {
|
|
372
|
-
// @ts-expect-error
|
|
373
330
|
this.purchaseStorageExpansion()
|
|
374
331
|
},
|
|
375
332
|
|
|
376
333
|
/**
|
|
377
334
|
* @param {boolean} [setOpen]
|
|
378
335
|
*/
|
|
379
|
-
handleMenuToggle(setOpen = /** @type {boolean | undefined} */ undefined) {
|
|
380
|
-
// @ts-expect-error
|
|
336
|
+
handleMenuToggle(setOpen = /** @type {boolean | undefined} */ (undefined)) {
|
|
381
337
|
this.setState(({ isMenuOpen }) => ({
|
|
382
338
|
isMenuOpen: setOpen == null ? !isMenuOpen : setOpen,
|
|
383
339
|
}))
|
|
384
340
|
},
|
|
385
341
|
|
|
386
342
|
handleClickNextMenuButton() {
|
|
387
|
-
// @ts-expect-error
|
|
388
343
|
this.focusNextView()
|
|
389
344
|
},
|
|
390
345
|
|
|
391
346
|
handleClickPreviousMenuButton() {
|
|
392
|
-
// @ts-expect-error
|
|
393
347
|
this.focusPreviousView()
|
|
394
348
|
},
|
|
395
349
|
|
|
@@ -397,7 +351,6 @@ export default {
|
|
|
397
351
|
* @param {farmhand.cow} cow
|
|
398
352
|
*/
|
|
399
353
|
handleCowSelect(cow) {
|
|
400
|
-
// @ts-expect-error
|
|
401
354
|
this.selectCow(cow)
|
|
402
355
|
},
|
|
403
356
|
|
|
@@ -405,14 +358,11 @@ export default {
|
|
|
405
358
|
* @param {farmhand.cow} cow
|
|
406
359
|
*/
|
|
407
360
|
handleCowClick(cow) {
|
|
408
|
-
// @ts-expect-error
|
|
409
361
|
this.selectCow(cow)
|
|
410
|
-
// @ts-expect-error
|
|
411
362
|
this.hugCow(cow.id)
|
|
412
363
|
},
|
|
413
364
|
|
|
414
365
|
handleCowPenUnmount() {
|
|
415
|
-
// @ts-expect-error
|
|
416
366
|
this.setState({ selectedCowId: '' })
|
|
417
367
|
},
|
|
418
368
|
|
|
@@ -420,20 +370,16 @@ export default {
|
|
|
420
370
|
* @param {farmhand.dialogView} selectedDialogView
|
|
421
371
|
*/
|
|
422
372
|
handleClickDialogViewButton(selectedDialogView) {
|
|
423
|
-
// @ts-expect-error
|
|
424
373
|
this.openDialogView(selectedDialogView)
|
|
425
374
|
},
|
|
426
375
|
|
|
427
376
|
handleCloseDialogView() {
|
|
428
|
-
// @ts-expect-error
|
|
429
377
|
if (this.state.isAwaitingCowTradeRequest) return
|
|
430
378
|
|
|
431
|
-
// @ts-expect-error
|
|
432
379
|
this.closeDialogView()
|
|
433
380
|
},
|
|
434
381
|
|
|
435
382
|
handleDialogViewExited() {
|
|
436
|
-
// @ts-expect-error
|
|
437
383
|
this.setState({ currentDialogView: dialogView.NONE })
|
|
438
384
|
},
|
|
439
385
|
|
|
@@ -441,7 +387,6 @@ export default {
|
|
|
441
387
|
* @param {number} paydownAmount
|
|
442
388
|
*/
|
|
443
389
|
handleClickLoanPaydownButton(paydownAmount) {
|
|
444
|
-
// @ts-expect-error
|
|
445
390
|
this.adjustLoan(-paydownAmount)
|
|
446
391
|
},
|
|
447
392
|
|
|
@@ -449,13 +394,11 @@ export default {
|
|
|
449
394
|
* @param {number} loanAmount
|
|
450
395
|
*/
|
|
451
396
|
handleClickTakeOutLoanButton(loanAmount) {
|
|
452
|
-
// @ts-expect-error
|
|
453
397
|
this.adjustLoan(loanAmount)
|
|
454
398
|
},
|
|
455
399
|
|
|
456
400
|
handleExportDataClick() {
|
|
457
401
|
const blob = new Blob(
|
|
458
|
-
// @ts-expect-error
|
|
459
402
|
[JSON.stringify(reduceByPersistedKeys(this.state), null, 2)],
|
|
460
403
|
{
|
|
461
404
|
type: 'application/json;charset=utf-8',
|
|
@@ -476,8 +419,7 @@ export default {
|
|
|
476
419
|
|
|
477
420
|
fileReader.addEventListener('loadend', eImport => {
|
|
478
421
|
try {
|
|
479
|
-
const target = /** @type {FileReader} */ eImport.target
|
|
480
|
-
// @ts-expect-error
|
|
422
|
+
const target = /** @type {FileReader} */ (eImport.target)
|
|
481
423
|
const json = String(target.result)
|
|
482
424
|
const parsedJson = JSON.parse(json)
|
|
483
425
|
const transformedStateData = transformStateDataForImport(parsedJson)
|
|
@@ -485,29 +427,24 @@ export default {
|
|
|
485
427
|
|
|
486
428
|
if (
|
|
487
429
|
Object.keys(state).some(
|
|
488
|
-
// @ts-expect-error
|
|
489
430
|
key => typeof this.state[key] !== typeof state[key]
|
|
490
431
|
)
|
|
491
432
|
) {
|
|
492
433
|
throw new Error(INVALID_DATA_PROVIDED)
|
|
493
434
|
}
|
|
494
435
|
|
|
495
|
-
// @ts-expect-error
|
|
496
436
|
this.setState({
|
|
497
437
|
...transformStateDataForImport({
|
|
498
|
-
// @ts-expect-error
|
|
499
438
|
...this.createInitialState(),
|
|
500
439
|
...state,
|
|
501
440
|
}),
|
|
502
441
|
hasBooted: true,
|
|
503
442
|
})
|
|
504
443
|
|
|
505
|
-
// @ts-expect-error
|
|
506
444
|
this.showNotification('Data loaded!', 'success')
|
|
507
445
|
} catch (e) {
|
|
508
446
|
console.error(e)
|
|
509
|
-
|
|
510
|
-
this.showNotification(/** @type {Error} */ e.message, 'error')
|
|
447
|
+
this.showNotification(/** @type {Error} */ (e).message, 'error')
|
|
511
448
|
}
|
|
512
449
|
})
|
|
513
450
|
|
|
@@ -515,9 +452,7 @@ export default {
|
|
|
515
452
|
},
|
|
516
453
|
|
|
517
454
|
async handleSaveButtonClick() {
|
|
518
|
-
// @ts-expect-error
|
|
519
455
|
await this.persistState()
|
|
520
|
-
// @ts-expect-error
|
|
521
456
|
this.showNotification(PROGRESS_SAVED_MESSAGE, 'info')
|
|
522
457
|
},
|
|
523
458
|
|
|
@@ -525,12 +460,10 @@ export default {
|
|
|
525
460
|
* @param {string} farmName
|
|
526
461
|
*/
|
|
527
462
|
handleFarmNameUpdate(farmName) {
|
|
528
|
-
// @ts-expect-error
|
|
529
463
|
this.setState({ farmName })
|
|
530
464
|
},
|
|
531
465
|
|
|
532
466
|
handleCombineEnabledChange(_e, enableCombine) {
|
|
533
|
-
// @ts-expect-error
|
|
534
467
|
this.setState({ isCombineEnabled: enableCombine })
|
|
535
468
|
},
|
|
536
469
|
|
|
@@ -538,33 +471,26 @@ export default {
|
|
|
538
471
|
_e,
|
|
539
472
|
useAlternateEndDayButtonPosition
|
|
540
473
|
) {
|
|
541
|
-
// @ts-expect-error
|
|
542
474
|
this.setState({ useAlternateEndDayButtonPosition })
|
|
543
475
|
},
|
|
544
476
|
|
|
545
477
|
handleAllowCustomPeerCowNamesChange(_e, allowCustomPeerCowNames) {
|
|
546
|
-
// @ts-expect-error
|
|
547
478
|
this.setState({ allowCustomPeerCowNames })
|
|
548
479
|
},
|
|
549
480
|
|
|
550
481
|
handleShowHomeScreenChange(_e, showHomeScreen) {
|
|
551
|
-
// @ts-expect-error
|
|
552
482
|
if (this.state.stageFocus === stageFocusType.HOME && !showHomeScreen) {
|
|
553
|
-
// @ts-expect-error
|
|
554
483
|
this.focusNextView()
|
|
555
484
|
}
|
|
556
485
|
|
|
557
|
-
// @ts-expect-error
|
|
558
486
|
this.setState({ showHomeScreen })
|
|
559
487
|
},
|
|
560
488
|
|
|
561
489
|
handleShowNotificationsChange({ target: { checked } }) {
|
|
562
|
-
// @ts-expect-error
|
|
563
490
|
this.setState({ showNotifications: checked })
|
|
564
491
|
},
|
|
565
492
|
|
|
566
493
|
handleClickNotificationIndicator() {
|
|
567
|
-
// @ts-expect-error
|
|
568
494
|
this.openDialogView(dialogView.FARMERS_LOG)
|
|
569
495
|
},
|
|
570
496
|
|
|
@@ -573,11 +499,9 @@ export default {
|
|
|
573
499
|
*/
|
|
574
500
|
handleOnlineToggleChange(goOnline) {
|
|
575
501
|
if (!goOnline) {
|
|
576
|
-
// @ts-expect-error
|
|
577
502
|
this.showNotification(DISCONNECTING_FROM_SERVER, 'info')
|
|
578
503
|
}
|
|
579
504
|
|
|
580
|
-
// @ts-expect-error
|
|
581
505
|
this.setState(({ room }) =>
|
|
582
506
|
goOnline
|
|
583
507
|
? {
|
|
@@ -594,7 +518,6 @@ export default {
|
|
|
594
518
|
* @param {string} room
|
|
595
519
|
*/
|
|
596
520
|
handleRoomChange(room) {
|
|
597
|
-
// @ts-expect-error
|
|
598
521
|
this.setState(() => ({
|
|
599
522
|
room,
|
|
600
523
|
redirect: `/online/${encodeURIComponent(room.trim() || DEFAULT_ROOM)}`,
|
|
@@ -602,7 +525,6 @@ export default {
|
|
|
602
525
|
},
|
|
603
526
|
|
|
604
527
|
handleActivePlayerButtonClick() {
|
|
605
|
-
// @ts-expect-error
|
|
606
528
|
this.openDialogView(dialogView.ONLINE_PEERS)
|
|
607
529
|
},
|
|
608
530
|
|
|
@@ -618,13 +540,11 @@ export default {
|
|
|
618
540
|
randomNumberService.unseedRandomNumber()
|
|
619
541
|
queryParams.delete('seed')
|
|
620
542
|
|
|
621
|
-
// @ts-expect-error
|
|
622
543
|
this.showNotification('Random seed reset', 'info')
|
|
623
544
|
} else {
|
|
624
545
|
randomNumberService.seedRandomNumber(trimmedSeed)
|
|
625
546
|
queryParams.set('seed', trimmedSeed)
|
|
626
547
|
|
|
627
|
-
// @ts-expect-error
|
|
628
548
|
this.showNotification(`Random seed set to "${trimmedSeed}"`, 'success')
|
|
629
549
|
}
|
|
630
550
|
|
|
@@ -639,7 +559,6 @@ export default {
|
|
|
639
559
|
* @param {boolean} isChatOpen
|
|
640
560
|
*/
|
|
641
561
|
handleChatRoomOpenStateChange(isChatOpen) {
|
|
642
|
-
// @ts-expect-error
|
|
643
562
|
this.setState({ isChatOpen })
|
|
644
563
|
},
|
|
645
564
|
|
|
@@ -647,7 +566,6 @@ export default {
|
|
|
647
566
|
* @param {(reloadPage?: boolean) => Promise<void>} updateServiceWorker
|
|
648
567
|
*/
|
|
649
568
|
handleGameUpdateAvailable(updateServiceWorker) {
|
|
650
|
-
// @ts-expect-error
|
|
651
569
|
this.showNotification(UPDATE_AVAILABLE, 'success', () => {
|
|
652
570
|
updateServiceWorker(true)
|
|
653
571
|
})
|
|
@@ -156,7 +156,6 @@ describe('UI Event Handlers', () => {
|
|
|
156
156
|
enablesFieldMode: fieldMode.PLANT,
|
|
157
157
|
})
|
|
158
158
|
|
|
159
|
-
// @ts-expect-error
|
|
160
159
|
handler(mockItem)
|
|
161
160
|
|
|
162
161
|
expect(mockContext.setState).toHaveBeenCalledWith({
|
|
@@ -184,7 +183,6 @@ describe('UI Event Handlers', () => {
|
|
|
184
183
|
test('opens menu when explicitly requested', () => {
|
|
185
184
|
const handler = uiEventHandlers.handleMenuToggle.bind(mockContext)
|
|
186
185
|
|
|
187
|
-
// @ts-expect-error
|
|
188
186
|
handler(true)
|
|
189
187
|
|
|
190
188
|
const stateUpdater = mockContext.setState.mock.calls[0][0]
|
|
@@ -10,9 +10,7 @@ import { HashRouter as Router, Route } from 'react-router-dom'
|
|
|
10
10
|
import './index.sass'
|
|
11
11
|
import Farmhand from './components/Farmhand/index.js'
|
|
12
12
|
import { features } from './config.js'
|
|
13
|
-
// @ts-expect-error
|
|
14
13
|
import '@fontsource/francois-one'
|
|
15
|
-
// @ts-expect-error
|
|
16
14
|
import '@fontsource/public-sans'
|
|
17
15
|
|
|
18
16
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -17,8 +17,10 @@ function getCropImage(seedItem, cropItem) {
|
|
|
17
17
|
if (Array.isArray(seedItem.growsInto)) {
|
|
18
18
|
return ``
|
|
22
24
|
} else {
|
|
23
25
|
return ``
|
|
24
26
|
}
|
|
@@ -69,17 +71,14 @@ for (const level of levels) {
|
|
|
69
71
|
if (growsInto) {
|
|
70
72
|
const seedItem = item
|
|
71
73
|
if (Array.isArray(growsInto)) {
|
|
72
|
-
// @ts-expect-error
|
|
73
74
|
for (const cropItemId of growsInto) {
|
|
74
75
|
const cropItem = itemsMap[cropItemId]
|
|
75
76
|
|
|
76
|
-
// @ts-expect-error
|
|
77
77
|
rows.push(getCropRow(id, seedItem, cropItem))
|
|
78
78
|
}
|
|
79
79
|
} else {
|
|
80
80
|
const cropItem = itemsMap[growsInto]
|
|
81
81
|
|
|
82
|
-
// @ts-expect-error
|
|
83
82
|
rows.push(getCropRow(id, seedItem, cropItem))
|
|
84
83
|
}
|
|
85
84
|
}
|
|
@@ -8,6 +8,7 @@ import { cellarService } from './cellar.js'
|
|
|
8
8
|
const mockUuid = 'abc123'
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
|
+
// @ts-expect-error
|
|
11
12
|
vitest.spyOn(cellarService, '_uuid').mockReturnValue(mockUuid)
|
|
12
13
|
})
|
|
13
14
|
|
|
@@ -17,7 +18,6 @@ describe('CellarService', () => {
|
|
|
17
18
|
const keg = cellarService.generateKeg(pumpkin)
|
|
18
19
|
|
|
19
20
|
expect(keg).toEqual({
|
|
20
|
-
// @ts-expect-error
|
|
21
21
|
daysUntilMature: pumpkin.daysToFerment,
|
|
22
22
|
itemId: pumpkin.id,
|
|
23
23
|
id: mockUuid,
|
|
@@ -45,7 +45,6 @@ export class WineService {
|
|
|
45
45
|
getMaxWineYield = ({ grape, inventory, cellarInventory, cellarSize }) => {
|
|
46
46
|
const {
|
|
47
47
|
[grape.id]: grapeQuantityInInventory = 0,
|
|
48
|
-
// @ts-expect-error
|
|
49
48
|
[itemsMap.yeast.id]: yeastQuantityInInventory = 0,
|
|
50
49
|
} = getInventoryQuantityMap(inventory)
|
|
51
50
|
|
|
@@ -21,19 +21,17 @@ describe('notifications', () => {
|
|
|
21
21
|
|
|
22
22
|
const carrotItem = await getItemByName('Carrot')
|
|
23
23
|
const carrotInput = within(
|
|
24
|
-
|
|
25
|
-
/** @type {HTMLElement} */ carrotItem
|
|
24
|
+
/** @type {HTMLElement} */ (carrotItem)
|
|
26
25
|
).getByDisplayValue('1')
|
|
27
26
|
await userEvent.type(carrotInput, '10')
|
|
28
27
|
const carrotSellButton = within(
|
|
29
|
-
|
|
30
|
-
/** @type {HTMLElement} */ carrotItem
|
|
28
|
+
/** @type {HTMLElement} */ (carrotItem)
|
|
31
29
|
).getByText('Sell')
|
|
32
30
|
await userEvent.click(carrotSellButton)
|
|
33
31
|
const notification = await screen.findByRole('alert')
|
|
34
32
|
|
|
35
33
|
expect(
|
|
36
|
-
within(/** @type {HTMLElement} */ notification).getByText('Carrot Soup')
|
|
34
|
+
within(/** @type {HTMLElement} */ (notification)).getByText('Carrot Soup')
|
|
37
35
|
).toBeInTheDocument()
|
|
38
36
|
})
|
|
39
37
|
|
|
@@ -58,29 +56,23 @@ describe('notifications', () => {
|
|
|
58
56
|
const carrotItem = await getItemByName('Carrot')
|
|
59
57
|
|
|
60
58
|
const cornInput = within(
|
|
61
|
-
|
|
62
|
-
/** @type {HTMLElement} */ cornItem
|
|
59
|
+
/** @type {HTMLElement} */ (cornItem)
|
|
63
60
|
).getByDisplayValue('1')
|
|
64
61
|
const spinachInput = within(
|
|
65
|
-
|
|
66
|
-
/** @type {HTMLElement} */ spinachItem
|
|
62
|
+
/** @type {HTMLElement} */ (spinachItem)
|
|
67
63
|
).getByDisplayValue('1')
|
|
68
64
|
const carrotInput = within(
|
|
69
|
-
|
|
70
|
-
/** @type {HTMLElement} */ carrotItem
|
|
65
|
+
/** @type {HTMLElement} */ (carrotItem)
|
|
71
66
|
).getByDisplayValue('1')
|
|
72
67
|
|
|
73
68
|
const cornSellButton = within(
|
|
74
|
-
|
|
75
|
-
/** @type {HTMLElement} */ cornItem
|
|
69
|
+
/** @type {HTMLElement} */ (cornItem)
|
|
76
70
|
).getByText('Sell')
|
|
77
71
|
const spinachSellButton = within(
|
|
78
|
-
|
|
79
|
-
/** @type {HTMLElement} */ spinachItem
|
|
72
|
+
/** @type {HTMLElement} */ (spinachItem)
|
|
80
73
|
).getByText('Sell')
|
|
81
74
|
const carrotSellButton = within(
|
|
82
|
-
|
|
83
|
-
/** @type {HTMLElement} */ carrotItem
|
|
75
|
+
/** @type {HTMLElement} */ (carrotItem)
|
|
84
76
|
).getByText('Sell')
|
|
85
77
|
|
|
86
78
|
await userEvent.type(cornInput, '6')
|
|
@@ -97,10 +89,12 @@ describe('notifications', () => {
|
|
|
97
89
|
|
|
98
90
|
const notification = await screen.findByRole('alert')
|
|
99
91
|
expect(
|
|
100
|
-
within(/** @type {HTMLElement} */ notification).getByText('Carrot Soup')
|
|
92
|
+
within(/** @type {HTMLElement} */ (notification)).getByText('Carrot Soup')
|
|
101
93
|
).toBeInTheDocument()
|
|
102
94
|
expect(
|
|
103
|
-
within(/** @type {HTMLElement} */ notification).getByText(
|
|
95
|
+
within(/** @type {HTMLElement} */ (notification)).getByText(
|
|
96
|
+
'Summer Salad'
|
|
97
|
+
)
|
|
104
98
|
).toBeInTheDocument()
|
|
105
99
|
})
|
|
106
100
|
})
|