@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
|
@@ -37,12 +37,11 @@ export const LogView = ({ notificationLog, todaysNotifications }) => (
|
|
|
37
37
|
{['success', 'info', 'warning', 'error'].map(
|
|
38
38
|
(severityLevel, severityIndex) =>
|
|
39
39
|
notifications[severityLevel].length ? (
|
|
40
|
-
// @ts-expect-error
|
|
41
40
|
<Alert
|
|
42
41
|
{...{
|
|
43
42
|
elevation: 3,
|
|
44
43
|
key: `${severityLevel}_${severityIndex}`,
|
|
45
|
-
severity: /** @type {'success' | 'info' | 'warning' | 'error'} */ severityLevel,
|
|
44
|
+
severity: /** @type {'success' | 'info' | 'warning' | 'error'} */ (severityLevel),
|
|
46
45
|
}}
|
|
47
46
|
>
|
|
48
47
|
{notifications[severityLevel].map((message, messageIndex) => (
|
|
@@ -58,6 +58,7 @@ export default withSnackbar(function Consumer(props) {
|
|
|
58
58
|
<FarmhandContext.Consumer>
|
|
59
59
|
{({ gameState, handlers }) => {
|
|
60
60
|
return (
|
|
61
|
+
// @ts-expect-error - Complex prop spreading creates type mismatch with PropTypes
|
|
61
62
|
<NotificationSystem {...{ ...gameState, ...handlers, ...props }} />
|
|
62
63
|
)
|
|
63
64
|
}}
|
|
@@ -33,18 +33,14 @@ export const getBackgroundStyles = plotContent => {
|
|
|
33
33
|
const backgroundImages = []
|
|
34
34
|
|
|
35
35
|
if (plotContent.fertilizerType === fertilizerType.STANDARD) {
|
|
36
|
-
// @ts-expect-error
|
|
37
36
|
backgroundImages.push(`url(${plotStates['fertilized-plot']})`)
|
|
38
37
|
} else if (plotContent.fertilizerType === fertilizerType.RAINBOW) {
|
|
39
|
-
// @ts-expect-error
|
|
40
38
|
backgroundImages.push(`url(${plotStates['rainbow-fertilized-plot']})`)
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
if ('wasWateredToday' in plotContent && plotContent.wasWateredToday) {
|
|
44
|
-
// @ts-expect-error
|
|
45
42
|
backgroundImages.push(`url(${plotStates['watered-plot']})`)
|
|
46
43
|
} else if ('isShoveled' in plotContent && plotContent.isShoveled) {
|
|
47
|
-
// @ts-expect-error
|
|
48
44
|
backgroundImages.push(`url(${plotStates['shoveled-plot']})`)
|
|
49
45
|
}
|
|
50
46
|
|
|
@@ -137,7 +133,6 @@ export const Plot = ({
|
|
|
137
133
|
} else if (wasJustShoveled || plotContent?.isShoveled) {
|
|
138
134
|
const oreItem = itemsMap[plotContent?.oreId]
|
|
139
135
|
|
|
140
|
-
// @ts-expect-error
|
|
141
136
|
plotLabelText = oreItem ? SHOVELED_PLOT('', oreItem) : SHOVELED
|
|
142
137
|
}
|
|
143
138
|
|
|
@@ -363,9 +363,9 @@ describe('getBackgroundStyles', () => {
|
|
|
363
363
|
test('constructs style for fertilizerType === fertilizerType.STANDARD', () => {
|
|
364
364
|
expect(
|
|
365
365
|
getBackgroundStyles(
|
|
366
|
-
/** @type {globalThis.farmhand.plotContent} */ testCrop({
|
|
366
|
+
/** @type {globalThis.farmhand.plotContent} */ (testCrop({
|
|
367
367
|
fertilizerType: fertilizerType.STANDARD,
|
|
368
|
-
})
|
|
368
|
+
}))
|
|
369
369
|
)
|
|
370
370
|
).toBe(`url(${plotStates['fertilized-plot']})`)
|
|
371
371
|
})
|
|
@@ -373,9 +373,9 @@ describe('getBackgroundStyles', () => {
|
|
|
373
373
|
test('constructs style for fertilizerType === fertilizerType.RAINBOW', () => {
|
|
374
374
|
expect(
|
|
375
375
|
getBackgroundStyles(
|
|
376
|
-
/** @type {globalThis.farmhand.plotContent} */ testCrop({
|
|
376
|
+
/** @type {globalThis.farmhand.plotContent} */ (testCrop({
|
|
377
377
|
fertilizerType: fertilizerType.RAINBOW,
|
|
378
|
-
})
|
|
378
|
+
}))
|
|
379
379
|
)
|
|
380
380
|
).toBe(`url(${plotStates['rianbow-fertilized-plot']})`)
|
|
381
381
|
})
|
|
@@ -383,9 +383,9 @@ describe('getBackgroundStyles', () => {
|
|
|
383
383
|
test('constructs style for wasWateredToday', () => {
|
|
384
384
|
expect(
|
|
385
385
|
getBackgroundStyles(
|
|
386
|
-
/** @type {globalThis.farmhand.plotContent} */ testCrop({
|
|
386
|
+
/** @type {globalThis.farmhand.plotContent} */ (testCrop({
|
|
387
387
|
wasWateredToday: true,
|
|
388
|
-
})
|
|
388
|
+
}))
|
|
389
389
|
)
|
|
390
390
|
).toBe(`url(${plotStates['watered-plot']})`)
|
|
391
391
|
})
|
|
@@ -393,10 +393,10 @@ describe('getBackgroundStyles', () => {
|
|
|
393
393
|
test('constructs style for fertilizerType === fertilizerType.STANDARD and wasWateredToday', () => {
|
|
394
394
|
expect(
|
|
395
395
|
getBackgroundStyles(
|
|
396
|
-
/** @type {globalThis.farmhand.plotContent} */ testCrop({
|
|
396
|
+
/** @type {globalThis.farmhand.plotContent} */ (testCrop({
|
|
397
397
|
fertilizerType: fertilizerType.STANDARD,
|
|
398
398
|
wasWateredToday: true,
|
|
399
|
-
})
|
|
399
|
+
}))
|
|
400
400
|
)
|
|
401
401
|
).toBe(
|
|
402
402
|
`url(${plotStates['fertilized-plot']}), url(${plotStates['watered-plot']})`
|
|
@@ -57,6 +57,7 @@ const Recipe = ({
|
|
|
57
57
|
const canBeMade =
|
|
58
58
|
quantity > 0 &&
|
|
59
59
|
canMakeRecipe(recipe, inventory, quantity) &&
|
|
60
|
+
// @ts-expect-error
|
|
60
61
|
doesInventorySpaceRemain({
|
|
61
62
|
inventory,
|
|
62
63
|
// Without the Infinity coercion, this would break recipes for unlimited
|
|
@@ -94,7 +95,7 @@ const Recipe = ({
|
|
|
94
95
|
<IngredientsList
|
|
95
96
|
{...{
|
|
96
97
|
playerInventoryQuantities,
|
|
97
|
-
recipe: recipe
|
|
98
|
+
recipe: /** @type {globalThis.farmhand.recipe} */ (recipe),
|
|
98
99
|
}}
|
|
99
100
|
/>
|
|
100
101
|
</>
|
|
@@ -20,7 +20,7 @@ export const RandomSeedInput = ({ search = globalWindow.location.search }) => {
|
|
|
20
20
|
* @param {React.ChangeEvent<HTMLInputElement>} e
|
|
21
21
|
*/
|
|
22
22
|
const handleChange = e => {
|
|
23
|
-
setSeed(/** @type {HTMLInputElement} */ e.target.value)
|
|
23
|
+
setSeed(/** @type {HTMLInputElement} */ (e.target).value)
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -42,7 +42,6 @@ import './Shop.sass'
|
|
|
42
42
|
* @param {Array.<farmhand.item>} shopInventory
|
|
43
43
|
* @returns {Object.<'seeds' | 'fieldTools', Array.<farmhand.item>>}
|
|
44
44
|
*/
|
|
45
|
-
// @ts-expect-error
|
|
46
45
|
const categorizeShopInventory = memoize(shopInventory =>
|
|
47
46
|
shopInventory.reduce(
|
|
48
47
|
(acc, inventoryItem) => {
|
|
@@ -205,7 +204,7 @@ export const Shop = ({
|
|
|
205
204
|
}}
|
|
206
205
|
/>
|
|
207
206
|
</li>
|
|
208
|
-
{
|
|
207
|
+
{features.FOREST && isForestUnlocked ? (
|
|
209
208
|
<li>
|
|
210
209
|
<TierPurchase
|
|
211
210
|
{...{
|
|
@@ -16,22 +16,19 @@ import { isOctober, isDecember } from '../../utils/index.js'
|
|
|
16
16
|
import './Stage.sass'
|
|
17
17
|
|
|
18
18
|
export const Stage = ({ field, stageFocus, viewTitle }) => {
|
|
19
|
-
const ref = /** @type {React.MutableRefObject<HTMLDivElement | null>} */ useRef(
|
|
19
|
+
const ref = /** @type {React.MutableRefObject<HTMLDivElement | null>} */ (useRef(
|
|
20
20
|
null
|
|
21
|
-
)
|
|
21
|
+
))
|
|
22
22
|
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
if (ref.current) {
|
|
25
|
-
const current = /** @type {HTMLElement} */ ref.current
|
|
25
|
+
const current = /** @type {HTMLElement} */ (ref.current)
|
|
26
26
|
const { style } = current
|
|
27
27
|
// Set scroll position to the top
|
|
28
|
-
// @ts-expect-error
|
|
29
28
|
current.scrollTop = 0
|
|
30
29
|
|
|
31
30
|
// Stop any intertial scrolling
|
|
32
|
-
// @ts-expect-error
|
|
33
31
|
style.overflow = 'hidden'
|
|
34
|
-
// @ts-expect-error
|
|
35
32
|
setTimeout(() => (style.overflow = ''), 0)
|
|
36
33
|
}
|
|
37
34
|
}, [stageFocus])
|
|
@@ -17,18 +17,15 @@ import { tools as toolImages, craftedItems, pixel } from '../../img/index.js'
|
|
|
17
17
|
|
|
18
18
|
import './Toolbelt.sass'
|
|
19
19
|
|
|
20
|
-
// @ts-expect-error
|
|
21
20
|
const getTools = memoize(toolLevels => {
|
|
22
21
|
const tools = []
|
|
23
22
|
|
|
24
23
|
for (let tool of Object.values(toolsData)) {
|
|
25
24
|
if (toolLevels[tool.type] !== toolLevel.UNAVAILABLE) {
|
|
26
|
-
// @ts-expect-error
|
|
27
25
|
tools.push(tool)
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
// @ts-expect-error
|
|
32
29
|
return tools.sort((a, b) => a.order - b.order)
|
|
33
30
|
})
|
|
34
31
|
|
|
@@ -43,7 +43,6 @@ export const WineRecipe = ({ wineVariety }) => {
|
|
|
43
43
|
const [quantity, setQuantity] = useState(1)
|
|
44
44
|
const wineName = grapeVarietyNameMap[wineVariety]
|
|
45
45
|
const grape = grapeVarietyToGrapeItemMap[wineVariety]
|
|
46
|
-
// @ts-expect-error
|
|
47
46
|
const wine = itemsMap[grape.wineId]
|
|
48
47
|
const { space: cellarSize } = PURCHASEABLE_CELLARS.get(purchasedCellar) ?? {
|
|
49
48
|
space: 0,
|
|
@@ -100,7 +99,7 @@ export const WineRecipe = ({ wineVariety }) => {
|
|
|
100
99
|
subheader={
|
|
101
100
|
<>
|
|
102
101
|
<p>
|
|
103
|
-
Days to mature:{
|
|
102
|
+
Days to mature: {/* @ts-expect-error */}
|
|
104
103
|
{integerString(wineService.getDaysToMature(wineVariety))}
|
|
105
104
|
</p>
|
|
106
105
|
<p>
|
|
@@ -58,8 +58,7 @@ const WineRecipeStub = (
|
|
|
58
58
|
handlers: { ...stubHandlers, ...handlers },
|
|
59
59
|
}}
|
|
60
60
|
>
|
|
61
|
-
{
|
|
62
|
-
<WineRecipe wineVariety={grapeChardonnay.variety as any} {...props} />
|
|
61
|
+
<WineRecipe wineVariety={grapeChardonnay.variety} {...props} />
|
|
63
62
|
</FarmhandContext.Provider>
|
|
64
63
|
)
|
|
65
64
|
}
|
|
@@ -84,7 +83,6 @@ describe('WineRecipe', () => {
|
|
|
84
83
|
render(
|
|
85
84
|
<WineRecipeStub
|
|
86
85
|
props={{ wineVariety: grape.variety }}
|
|
87
|
-
// @ts-expect-error
|
|
88
86
|
state={{ inventory: [{ id: grape.id, quantity: 1 }] }}
|
|
89
87
|
/>
|
|
90
88
|
)
|
|
@@ -112,7 +110,6 @@ describe('WineRecipe', () => {
|
|
|
112
110
|
render(
|
|
113
111
|
<WineRecipeStub
|
|
114
112
|
props={{ wineVariety: grape.variety }}
|
|
115
|
-
// @ts-expect-error
|
|
116
113
|
state={{ inventory: [{ id: grape.id, quantity }] }}
|
|
117
114
|
/>
|
|
118
115
|
)
|
|
@@ -142,7 +139,6 @@ describe('WineRecipe', () => {
|
|
|
142
139
|
render(
|
|
143
140
|
<WineRecipeStub
|
|
144
141
|
props={{ wineVariety: grape.variety }}
|
|
145
|
-
// @ts-expect-error
|
|
146
142
|
state={{
|
|
147
143
|
inventory: [
|
|
148
144
|
{ id: grape.id, quantity: GRAPES_REQUIRED_FOR_WINE },
|
|
@@ -181,9 +177,7 @@ describe('WineRecipe', () => {
|
|
|
181
177
|
<WineRecipeStub
|
|
182
178
|
props={{ wineVariety: grape.variety }}
|
|
183
179
|
state={{
|
|
184
|
-
// @ts-expect-error
|
|
185
180
|
cellarInventory: new Array(quantity).fill(
|
|
186
|
-
// @ts-expect-error
|
|
187
181
|
getKegStub({ itemId: grape.wineId })
|
|
188
182
|
),
|
|
189
183
|
}}
|
|
@@ -214,7 +208,6 @@ describe('WineRecipe', () => {
|
|
|
214
208
|
render(
|
|
215
209
|
<WineRecipeStub
|
|
216
210
|
props={{ wineVariety: grape.variety }}
|
|
217
|
-
// @ts-expect-error
|
|
218
211
|
state={{
|
|
219
212
|
inventory: [
|
|
220
213
|
{ id: grape.id, quantity: grapeQuantity },
|
|
@@ -242,7 +235,6 @@ describe('WineRecipe', () => {
|
|
|
242
235
|
render(
|
|
243
236
|
<WineRecipeStub
|
|
244
237
|
props={{ wineVariety: grape.variety }}
|
|
245
|
-
// @ts-expect-error
|
|
246
238
|
state={{
|
|
247
239
|
inventory: [
|
|
248
240
|
{ id: grape.id, quantity: grapeQuantity },
|
|
@@ -269,7 +261,6 @@ describe('WineRecipe', () => {
|
|
|
269
261
|
render(
|
|
270
262
|
<WineRecipeStub
|
|
271
263
|
props={{ wineVariety: grape.variety }}
|
|
272
|
-
// @ts-expect-error
|
|
273
264
|
state={{
|
|
274
265
|
inventory: [
|
|
275
266
|
{ id: grape.id, quantity: grapeQuantity },
|
|
@@ -22,7 +22,6 @@ export const WineRecipeList = () => {
|
|
|
22
22
|
const [searchQuery, setSearchQuery] = useState('')
|
|
23
23
|
|
|
24
24
|
const filteredWineVarieties = wineVarietiesAvailableToMake.filter(
|
|
25
|
-
// @ts-expect-error
|
|
26
25
|
wineVariety => wineVariety.toLowerCase().includes(searchQuery.toLowerCase())
|
|
27
26
|
)
|
|
28
27
|
|
|
@@ -18,7 +18,6 @@ export function getUpgradesAvailable({ learnedForgeRecipes, toolLevels }) {
|
|
|
18
18
|
const nextLevelUpgrade = toolUpgrades[type][upgrade.nextLevel]
|
|
19
19
|
let allIngredientsUnlocked = true
|
|
20
20
|
|
|
21
|
-
// @ts-expect-error
|
|
22
21
|
for (let ingredient of Object.keys(nextLevelUpgrade.ingredients)) {
|
|
23
22
|
allIngredientsUnlocked =
|
|
24
23
|
allIngredientsUnlocked &&
|
|
@@ -28,7 +27,6 @@ export function getUpgradesAvailable({ learnedForgeRecipes, toolLevels }) {
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
if (allIngredientsUnlocked) {
|
|
31
|
-
// @ts-expect-error
|
|
32
30
|
upgradesAvailable.push(nextLevelUpgrade)
|
|
33
31
|
}
|
|
34
32
|
}
|
|
@@ -59,9 +59,9 @@ export const PURCHASABLE_FOREST_SIZES = freeze(
|
|
|
59
59
|
])
|
|
60
60
|
)
|
|
61
61
|
|
|
62
|
-
export const LARGEST_PURCHASABLE_FIELD_SIZE = /** @type {farmhand.purchaseableFieldSize} */ PURCHASEABLE_FIELD_SIZES.get(
|
|
62
|
+
export const LARGEST_PURCHASABLE_FIELD_SIZE = /** @type {farmhand.purchaseableFieldSize} */ (PURCHASEABLE_FIELD_SIZES.get(
|
|
63
63
|
PURCHASEABLE_FIELD_SIZES.size
|
|
64
|
-
)
|
|
64
|
+
))
|
|
65
65
|
|
|
66
66
|
export const PURCHASEABLE_COMBINES = freeze(
|
|
67
67
|
new Map([[1, { type: 'Basic', price: 250_000 }]])
|
|
@@ -28,10 +28,8 @@ const addMoney = (state, reward) => ({
|
|
|
28
28
|
money: moneyTotal(state.money, reward),
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
-
// @ts-expect-error
|
|
32
31
|
const sumOfCropsHarvested = memoize(cropsHarvested =>
|
|
33
32
|
Object.values(cropsHarvested).reduce(
|
|
34
|
-
// @ts-expect-error
|
|
35
33
|
(sum, cropHarvested) => sum + cropHarvested,
|
|
36
34
|
0
|
|
37
35
|
)
|
|
@@ -135,11 +133,9 @@ const achievements = [
|
|
|
135
133
|
id: 'play-during-october',
|
|
136
134
|
name: 'Halloween Harvest',
|
|
137
135
|
description: 'Play Farmhand in October and get the gift of the season.',
|
|
138
|
-
// @ts-expect-error
|
|
139
136
|
rewardDescription: `${reward} units of ${itemsMap.jackolantern.name}`,
|
|
140
137
|
condition: () => isOctober(),
|
|
141
138
|
reward: state =>
|
|
142
|
-
// @ts-expect-error
|
|
143
139
|
addItemToInventory(state, itemsMap.jackolantern, reward, true),
|
|
144
140
|
}))(),
|
|
145
141
|
|
|
@@ -147,14 +143,11 @@ const achievements = [
|
|
|
147
143
|
id: 'sell-10000-jack-o-lanterns',
|
|
148
144
|
name: 'Spooky Pumpkin Patch',
|
|
149
145
|
description: `Sell ${integerString(goal)} units of ${
|
|
150
|
-
// @ts-expect-error
|
|
151
146
|
itemsMap.jackolantern.name
|
|
152
147
|
}. That's enough to fill a whole pumpkin patch!`,
|
|
153
|
-
// @ts-expect-error
|
|
154
148
|
rewardDescription: `${reward} units of ${itemsMap.scarecrow.name}`,
|
|
155
149
|
condition: state => (state.itemsSold.jackolantern || 0) >= goal,
|
|
156
150
|
reward: state =>
|
|
157
|
-
// @ts-expect-error
|
|
158
151
|
addItemToInventory(state, itemsMap.scarecrow, reward, true),
|
|
159
152
|
}))(),
|
|
160
153
|
|
|
@@ -162,7 +155,6 @@ const achievements = [
|
|
|
162
155
|
id: 'daily-profit-1',
|
|
163
156
|
name: `Daily profit: ${dollarString(goal)}`,
|
|
164
157
|
description: `Earn ${dollarString(goal)} of profit in a single day.`,
|
|
165
|
-
// @ts-expect-error
|
|
166
158
|
rewardDescription: `${reward} units of ${itemsMap.fertilizer.name}`,
|
|
167
159
|
condition: state =>
|
|
168
160
|
getProfitRecord(
|
|
@@ -171,7 +163,6 @@ const achievements = [
|
|
|
171
163
|
state.todaysLosses
|
|
172
164
|
) >= goal,
|
|
173
165
|
reward: state =>
|
|
174
|
-
// @ts-expect-error
|
|
175
166
|
addItemToInventory(state, itemsMap.fertilizer, reward, true),
|
|
176
167
|
}))(),
|
|
177
168
|
|
|
@@ -80,8 +80,7 @@ describe.each(iAmRichVariants)(
|
|
|
80
80
|
test(`is not achieved when revenue is less than ${goal}`, () => {
|
|
81
81
|
const achievement = achievementsMap[id]
|
|
82
82
|
const state = {
|
|
83
|
-
|
|
84
|
-
revenue: /** @type {number} */ goal - 1,
|
|
83
|
+
revenue: /** @type {number} */ (goal) - 1,
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
expect(achievement.condition(state)).toEqual(false)
|
|
@@ -18,7 +18,7 @@ export const crop = ({
|
|
|
18
18
|
...rest
|
|
19
19
|
}) =>
|
|
20
20
|
freeze(
|
|
21
|
-
/** @type {farmhand.item} */ {
|
|
21
|
+
/** @type {farmhand.item} */ ({
|
|
22
22
|
id,
|
|
23
23
|
name,
|
|
24
24
|
cropTimeline,
|
|
@@ -32,7 +32,7 @@ export const crop = ({
|
|
|
32
32
|
isPlantableCrop: true,
|
|
33
33
|
}),
|
|
34
34
|
...rest,
|
|
35
|
-
}
|
|
35
|
+
})
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -48,7 +48,7 @@ export const fromSeed = (
|
|
|
48
48
|
) => {
|
|
49
49
|
const variants = Array.isArray(growsInto) ? growsInto : [growsInto]
|
|
50
50
|
|
|
51
|
-
return /** @type {farmhand.item} */ {
|
|
51
|
+
return /** @type {farmhand.item} */ ({
|
|
52
52
|
id: variants[variantIdx] || '',
|
|
53
53
|
cropTimeline,
|
|
54
54
|
cropType,
|
|
@@ -58,7 +58,7 @@ export const fromSeed = (
|
|
|
58
58
|
...(canBeFermented && {
|
|
59
59
|
daysToFerment: getCropLifecycleDuration({ cropTimeline }) * tier,
|
|
60
60
|
}),
|
|
61
|
-
}
|
|
61
|
+
})
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -71,6 +71,5 @@ export const cropVariety = ({
|
|
|
71
71
|
variety,
|
|
72
72
|
...cropVarietyProperties
|
|
73
73
|
}) => {
|
|
74
|
-
// @ts-expect-error
|
|
75
74
|
return { imageId, cropFamily, variety, ...crop({ ...cropVarietyProperties }) }
|
|
76
75
|
}
|
|
@@ -18,9 +18,7 @@ export const asparagusSeed = crop({
|
|
|
18
18
|
* @property farmhand.module:items.asparagus
|
|
19
19
|
* @type {farmhand.item}
|
|
20
20
|
*/
|
|
21
|
-
// @ts-expect-error
|
|
22
21
|
export const asparagus = crop({
|
|
23
|
-
// @ts-expect-error
|
|
24
22
|
...fromSeed(asparagusSeed, {
|
|
25
23
|
canBeFermented: true,
|
|
26
24
|
}),
|
|
@@ -17,7 +17,7 @@ const grape = grapeProps => {
|
|
|
17
17
|
const newGrape = {
|
|
18
18
|
...cropVariety({
|
|
19
19
|
...grapeProps,
|
|
20
|
-
cropFamily: /** @type {'GRAPE'} */ cropFamily.GRAPE,
|
|
20
|
+
cropFamily: /** @type {'GRAPE'} */ (cropFamily.GRAPE),
|
|
21
21
|
}),
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -90,13 +90,12 @@ export const wineVarietyValueMap = {
|
|
|
90
90
|
* @type {farmhand.grape}
|
|
91
91
|
*/
|
|
92
92
|
export const grapeChardonnay = grape({
|
|
93
|
-
// @ts-expect-error
|
|
94
93
|
...fromSeed(grapeSeed, {
|
|
95
94
|
variantIdx: grapeSeed.growsInto?.indexOf('grape-chardonnay'),
|
|
96
95
|
}),
|
|
97
96
|
name: 'Chardonnay Grape',
|
|
98
97
|
imageId: 'grape-green',
|
|
99
|
-
variety: /** @type {'CHARDONNAY'} */ grapeVariety.CHARDONNAY,
|
|
98
|
+
variety: /** @type {'CHARDONNAY'} */ (grapeVariety.CHARDONNAY),
|
|
100
99
|
wineId: 'wine-chardonnay',
|
|
101
100
|
})
|
|
102
101
|
|
|
@@ -105,13 +104,12 @@ export const grapeChardonnay = grape({
|
|
|
105
104
|
* @type {farmhand.grape}
|
|
106
105
|
*/
|
|
107
106
|
export const grapeSauvignonBlanc = grape({
|
|
108
|
-
// @ts-expect-error
|
|
109
107
|
...fromSeed(grapeSeed, {
|
|
110
108
|
variantIdx: grapeSeed.growsInto?.indexOf('grape-sauvignon-blanc'),
|
|
111
109
|
}),
|
|
112
110
|
name: 'Sauvignon Blanc Grape',
|
|
113
111
|
imageId: 'grape-green',
|
|
114
|
-
variety: /** @type {'SAUVIGNON_BLANC'} */ grapeVariety.SAUVIGNON_BLANC,
|
|
112
|
+
variety: /** @type {'SAUVIGNON_BLANC'} */ (grapeVariety.SAUVIGNON_BLANC),
|
|
115
113
|
wineId: 'wine-sauvignon-blanc',
|
|
116
114
|
})
|
|
117
115
|
|
|
@@ -168,13 +166,13 @@ export const grapeSauvignonBlanc = grape({
|
|
|
168
166
|
* @type {farmhand.grape}
|
|
169
167
|
*/
|
|
170
168
|
export const grapeCabernetSauvignon = grape({
|
|
171
|
-
// @ts-expect-error
|
|
172
169
|
...fromSeed(grapeSeed, {
|
|
173
170
|
variantIdx: grapeSeed.growsInto?.indexOf('grape-cabernet-sauvignon'),
|
|
174
171
|
}),
|
|
175
172
|
name: 'Cabernet Sauvignon Grape',
|
|
176
173
|
imageId: 'grape-purple',
|
|
177
|
-
variety:
|
|
174
|
+
variety:
|
|
175
|
+
/** @type {'CABERNET_SAUVIGNON'} */ (grapeVariety.CABERNET_SAUVIGNON),
|
|
178
176
|
wineId: 'wine-cabernet-sauvignon',
|
|
179
177
|
})
|
|
180
178
|
|
|
@@ -195,13 +193,12 @@ export const grapeCabernetSauvignon = grape({
|
|
|
195
193
|
* @type {farmhand.grape}
|
|
196
194
|
*/
|
|
197
195
|
export const grapeTempranillo = grape({
|
|
198
|
-
// @ts-expect-error
|
|
199
196
|
...fromSeed(grapeSeed, {
|
|
200
197
|
variantIdx: grapeSeed.growsInto?.indexOf('grape-tempranillo'),
|
|
201
198
|
}),
|
|
202
199
|
name: 'Tempranillo Grape',
|
|
203
200
|
imageId: 'grape-purple',
|
|
204
|
-
variety: /** @type {'TEMPRANILLO'} */ grapeVariety.TEMPRANILLO,
|
|
201
|
+
variety: /** @type {'TEMPRANILLO'} */ (grapeVariety.TEMPRANILLO),
|
|
205
202
|
wineId: 'wine-tempranillo',
|
|
206
203
|
})
|
|
207
204
|
|
|
@@ -210,13 +207,12 @@ export const grapeTempranillo = grape({
|
|
|
210
207
|
* @type {farmhand.grape}
|
|
211
208
|
*/
|
|
212
209
|
export const grapeNebbiolo = grape({
|
|
213
|
-
// @ts-expect-error
|
|
214
210
|
...fromSeed(grapeSeed, {
|
|
215
211
|
variantIdx: grapeSeed.growsInto?.indexOf('grape-nebbiolo'),
|
|
216
212
|
}),
|
|
217
213
|
name: 'Nebbiolo Grape',
|
|
218
214
|
imageId: 'grape-purple',
|
|
219
|
-
variety: /** @type {'NEBBIOLO'} */ grapeVariety.NEBBIOLO,
|
|
215
|
+
variety: /** @type {'NEBBIOLO'} */ (grapeVariety.NEBBIOLO),
|
|
220
216
|
wineId: 'wine-nebbiolo',
|
|
221
217
|
})
|
|
222
218
|
|