@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
|
@@ -200,7 +200,6 @@ export const LEVEL_GAINED_NOTIFICATION = (_, newLevel, randomCropSeed) => {
|
|
|
200
200
|
itemsMap[itemUnlockLevels[newLevel]].name
|
|
201
201
|
}**.`
|
|
202
202
|
)
|
|
203
|
-
// @ts-expect-error
|
|
204
203
|
} else if (levelObject && levelObject.increasesSprinklerRange) {
|
|
205
204
|
chunks.push(`Sprinkler range has increased.`)
|
|
206
205
|
} else if (randomCropSeed) {
|
|
@@ -209,15 +208,11 @@ export const LEVEL_GAINED_NOTIFICATION = (_, newLevel, randomCropSeed) => {
|
|
|
209
208
|
randomCropSeed.name
|
|
210
209
|
}** as a reward!`
|
|
211
210
|
)
|
|
212
|
-
// @ts-expect-error
|
|
213
211
|
} else if (levelObject && levelObject.unlocksTool) {
|
|
214
|
-
// @ts-expect-error
|
|
215
212
|
if (levelObject.unlocksTool === toolType.SHOVEL) {
|
|
216
213
|
chunks.push(SHOVEL_UNLOCKED)
|
|
217
214
|
}
|
|
218
|
-
// @ts-expect-error
|
|
219
215
|
} else if (levelObject && levelObject.unlocksStageFocusType) {
|
|
220
|
-
// @ts-expect-error
|
|
221
216
|
if (levelObject.unlocksStageFocusType === stageFocusType.FOREST) {
|
|
222
217
|
chunks.push(FOREST_AVAILABLE_NOTIFICATION)
|
|
223
218
|
}
|
|
@@ -245,7 +240,6 @@ export const POSITIONS_POSTED_NOTIFICATION = (_, who, positions) => {
|
|
|
245
240
|
const positionKeys = Object.keys(positions)
|
|
246
241
|
|
|
247
242
|
positionKeys.forEach(itemId =>
|
|
248
|
-
// @ts-expect-error
|
|
249
243
|
(positions[itemId] > 0 ? positivePositions : negativePositions).push(itemId)
|
|
250
244
|
)
|
|
251
245
|
|
|
@@ -254,7 +248,6 @@ export const POSITIONS_POSTED_NOTIFICATION = (_, who, positions) => {
|
|
|
254
248
|
if (positivePositions.length) {
|
|
255
249
|
chunks.push('Values raised:')
|
|
256
250
|
positivePositions.forEach(itemId =>
|
|
257
|
-
// @ts-expect-error
|
|
258
251
|
chunks.push(` - ${itemsMap[itemId].name}`)
|
|
259
252
|
)
|
|
260
253
|
}
|
|
@@ -266,7 +259,6 @@ export const POSITIONS_POSTED_NOTIFICATION = (_, who, positions) => {
|
|
|
266
259
|
|
|
267
260
|
chunks.push('Values lowered:')
|
|
268
261
|
negativePositions.forEach(itemId =>
|
|
269
|
-
// @ts-expect-error
|
|
270
262
|
chunks.push(` - ${itemsMap[itemId].name}`)
|
|
271
263
|
)
|
|
272
264
|
}
|
|
@@ -40,7 +40,7 @@ export const testShoveledPlot = plotProps => ({
|
|
|
40
40
|
export const testItem = (item = {}) => ({
|
|
41
41
|
id: '',
|
|
42
42
|
name: '',
|
|
43
|
-
type: /** @type {farmhand.itemType} */ 'CRAFTED_ITEM',
|
|
43
|
+
type: /** @type {farmhand.itemType} */ ('CRAFTED_ITEM'),
|
|
44
44
|
value: 0,
|
|
45
45
|
description: '',
|
|
46
46
|
doesPriceFluctuate: false,
|
|
@@ -62,8 +62,8 @@ export const testRecipe = (overrides = {}) => ({
|
|
|
62
62
|
'sample-item-1': 1,
|
|
63
63
|
},
|
|
64
64
|
condition: () => true,
|
|
65
|
-
recipeType: /** @type {farmhand.recipeType} */ 'KITCHEN',
|
|
66
|
-
type: /** @type {farmhand.itemType} */ 'CRAFTED_ITEM',
|
|
65
|
+
recipeType: /** @type {farmhand.recipeType} */ ('KITCHEN'),
|
|
66
|
+
type: /** @type {farmhand.itemType} */ ('CRAFTED_ITEM'),
|
|
67
67
|
value: 100,
|
|
68
68
|
...overrides,
|
|
69
69
|
})
|
|
@@ -3,7 +3,6 @@ import { itemsMap } from '../data/maps.js'
|
|
|
3
3
|
import { memoize } from './memoize.js'
|
|
4
4
|
import { isItemAFarmProduct } from './isItemAFarmProduct.js'
|
|
5
5
|
|
|
6
|
-
// @ts-expect-error
|
|
7
6
|
export const farmProductsSold = memoize(
|
|
8
7
|
/**
|
|
9
8
|
* @param {Partial<Record<string, number>>} itemsSold
|
|
@@ -12,7 +11,6 @@ export const farmProductsSold = memoize(
|
|
|
12
11
|
itemsSold =>
|
|
13
12
|
Object.entries(itemsSold).reduce(
|
|
14
13
|
(sum, [itemId, numberSold]) =>
|
|
15
|
-
// @ts-expect-error
|
|
16
14
|
sum + (isItemAFarmProduct(itemsMap[itemId]) ? numberSold || 0 : 0),
|
|
17
15
|
0
|
|
18
16
|
)
|
|
@@ -4,7 +4,6 @@ import { memoize } from './memoize.js'
|
|
|
4
4
|
* @param {{ cropTimeline: number[] }} crop
|
|
5
5
|
* @returns {number}
|
|
6
6
|
*/
|
|
7
|
-
// @ts-expect-error
|
|
8
7
|
export const getCropLifecycleDuration = memoize(({ cropTimeline }) => {
|
|
9
8
|
return cropTimeline.reduce((acc, value) => {
|
|
10
9
|
return acc + value
|
|
@@ -9,7 +9,6 @@ import { memoize } from './memoize.js'
|
|
|
9
9
|
* @returns {levelEntitlements} Contains `sprinklerRange` and keys that correspond to
|
|
10
10
|
* unlocked items.
|
|
11
11
|
*/
|
|
12
|
-
// @ts-expect-error
|
|
13
12
|
export const getLevelEntitlements = memoize(
|
|
14
13
|
/**
|
|
15
14
|
* @param {number} levelNumber
|
|
@@ -38,17 +37,14 @@ export const getLevelEntitlements = memoize(
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
if (unlocksShopItem) {
|
|
41
|
-
// @ts-expect-error
|
|
42
40
|
acc.items[unlocksShopItem] = true
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
if (unlocksTool) {
|
|
46
|
-
// @ts-expect-error
|
|
47
44
|
acc.tools[unlocksTool] = true
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
if (unlocksStageFocusType) {
|
|
51
|
-
// @ts-expect-error
|
|
52
48
|
acc.stageFocusType[unlocksStageFocusType] = true
|
|
53
49
|
}
|
|
54
50
|
|
|
@@ -289,7 +289,6 @@ export const getPlotContentType = ({ itemId }) =>
|
|
|
289
289
|
export const doesPlotContainCrop = plot =>
|
|
290
290
|
plot !== null && getPlotContentType(plot) === itemType.CROP
|
|
291
291
|
|
|
292
|
-
// @ts-expect-error
|
|
293
292
|
export const getLifeStageRange = memoize((
|
|
294
293
|
/** @type {number[]} */ cropTimeline
|
|
295
294
|
) => {
|
|
@@ -331,9 +330,7 @@ export const getGrowingPhase = memoize(
|
|
|
331
330
|
},
|
|
332
331
|
{
|
|
333
332
|
cacheSize:
|
|
334
|
-
// @ts-expect-error
|
|
335
333
|
LARGEST_PURCHASABLE_FIELD_SIZE.columns *
|
|
336
|
-
// @ts-expect-error
|
|
337
334
|
LARGEST_PURCHASABLE_FIELD_SIZE.rows,
|
|
338
335
|
}
|
|
339
336
|
)
|
|
@@ -389,7 +386,7 @@ export const getPlotImage = (plotContents, x, y) => {
|
|
|
389
386
|
}
|
|
390
387
|
|
|
391
388
|
// Handle other plot content (non-crop, non-weed)
|
|
392
|
-
return itemImages[/** @type {farmhand.plotContent} */ plotContents.itemId]
|
|
389
|
+
return itemImages[/** @type {farmhand.plotContent} */ (plotContents).itemId]
|
|
393
390
|
}
|
|
394
391
|
|
|
395
392
|
if (isShoveledPlot(plotContents)) {
|
|
@@ -451,14 +448,12 @@ export const getFinalCropItemIdFromSeedItemId = (
|
|
|
451
448
|
|
|
452
449
|
export const getSeedItemIdFromFinalStageCropItemId = memoize(
|
|
453
450
|
/** @type {string} */ cropItemId => {
|
|
454
|
-
// @ts-expect-error
|
|
455
451
|
const seedItemId = Object.values(itemsMap).find(({ growsInto }) => {
|
|
456
452
|
if (Array.isArray(growsInto)) {
|
|
457
453
|
return growsInto.includes(cropItemId)
|
|
458
454
|
} else {
|
|
459
455
|
return growsInto === cropItemId
|
|
460
456
|
}
|
|
461
|
-
// @ts-expect-error
|
|
462
457
|
})?.id
|
|
463
458
|
|
|
464
459
|
if (!seedItemId)
|
|
@@ -498,11 +493,8 @@ export const getCowDisplayName = (cow, playerId, allowCustomPeerCowNames) => {
|
|
|
498
493
|
* @returns {farmhand.cow}
|
|
499
494
|
*/
|
|
500
495
|
export const generateCow = (options = {}) => {
|
|
501
|
-
// @ts-expect-error
|
|
502
496
|
const gender = options.gender || chooseRandom(Object.values(genders))
|
|
503
|
-
// @ts-expect-error
|
|
504
497
|
const color = options.color || chooseRandom(Object.values(standardCowColors))
|
|
505
|
-
// @ts-expect-error
|
|
506
498
|
const id = options.id || uuid()
|
|
507
499
|
|
|
508
500
|
const baseWeight = Math.round(
|
|
@@ -567,7 +559,7 @@ export const generateOffspringCow = (cow1, cow2, ownerId, customProps = {}) => {
|
|
|
567
559
|
}
|
|
568
560
|
|
|
569
561
|
delete colorsInBloodline[
|
|
570
|
-
/** @type {keyof typeof colorsInBloodline} */ cowColors.RAINBOW
|
|
562
|
+
/** @type {keyof typeof colorsInBloodline} */ (cowColors.RAINBOW)
|
|
571
563
|
]
|
|
572
564
|
|
|
573
565
|
const isRainbowCow =
|
|
@@ -682,7 +674,6 @@ export const getCowSellValue = cow => getCowValue(cow, true)
|
|
|
682
674
|
* @param {{id: string, quantity: number}[]} inventory
|
|
683
675
|
* @returns {number}
|
|
684
676
|
*/
|
|
685
|
-
// @ts-expect-error
|
|
686
677
|
export const maxYieldOfRecipe = memoize(({ ingredients }, inventory) => {
|
|
687
678
|
const inventoryQuantityMap = getInventoryQuantityMap(inventory)
|
|
688
679
|
|
|
@@ -750,7 +741,6 @@ export const doesMenuObstructStage = () => window.innerWidth < BREAKPOINTS.MD
|
|
|
750
741
|
/** @type {Set<farmhand.itemType>} */
|
|
751
742
|
const itemTypesToShowInReverse = new Set([itemType.MILK])
|
|
752
743
|
|
|
753
|
-
// @ts-expect-error
|
|
754
744
|
const sortItemIdsByTypeAndValue = memoize(itemIds =>
|
|
755
745
|
sortBy(itemIds, [
|
|
756
746
|
id => Number(itemsMap[id].type !== itemType.CROP),
|
|
@@ -772,7 +762,6 @@ export const sortItems = items => {
|
|
|
772
762
|
return sortItemIdsByTypeAndValue(items.map(({ id }) => id)).map(id => map[id])
|
|
773
763
|
}
|
|
774
764
|
|
|
775
|
-
// @ts-expect-error
|
|
776
765
|
export const inventorySpaceConsumed = memoize(
|
|
777
766
|
/**
|
|
778
767
|
* @param {farmhand.state['inventory']} inventory
|
|
@@ -797,7 +786,6 @@ export const inventorySpaceRemaining = ({ inventory, inventoryLimit }) =>
|
|
|
797
786
|
export const doesInventorySpaceRemain = state =>
|
|
798
787
|
inventorySpaceRemaining(state) > 0
|
|
799
788
|
|
|
800
|
-
// @ts-expect-error
|
|
801
789
|
export const areHuggingMachinesInInventory = memoize(
|
|
802
790
|
/**
|
|
803
791
|
* @param {farmhand.state['inventory']} inventory
|
|
@@ -817,7 +805,6 @@ export const nullArray = memoize(
|
|
|
817
805
|
}
|
|
818
806
|
)
|
|
819
807
|
|
|
820
|
-
// @ts-expect-error
|
|
821
808
|
export const findCowById = memoize(
|
|
822
809
|
/**
|
|
823
810
|
* @param {Array.<farmhand.cow>} cowInventory
|
|
@@ -834,7 +821,6 @@ export const findCowById = memoize(
|
|
|
834
821
|
export const experienceNeededForLevel = targetLevel =>
|
|
835
822
|
((targetLevel - 1) * 10) ** 2
|
|
836
823
|
|
|
837
|
-
// @ts-expect-error
|
|
838
824
|
export const getAvailableShopInventory = memoize((
|
|
839
825
|
/** @type {farmhand.levelEntitlements} */ levelEntitlements
|
|
840
826
|
) =>
|
|
@@ -879,7 +865,7 @@ export const getPeerMetadata = state => {
|
|
|
879
865
|
|
|
880
866
|
return acc
|
|
881
867
|
},
|
|
882
|
-
/** @type {Partial<farmhand.peerMetadata>} */ {}
|
|
868
|
+
/** @type {Partial<farmhand.peerMetadata>} */ ({})
|
|
883
869
|
)
|
|
884
870
|
|
|
885
871
|
Object.assign(reducedState, {
|
|
@@ -888,7 +874,7 @@ export const getPeerMetadata = state => {
|
|
|
888
874
|
),
|
|
889
875
|
})
|
|
890
876
|
|
|
891
|
-
return /** @type {farmhand.peerMetadata} */ reducedState
|
|
877
|
+
return /** @type {farmhand.peerMetadata} */ (reducedState)
|
|
892
878
|
}
|
|
893
879
|
|
|
894
880
|
/**
|
|
@@ -897,7 +883,7 @@ export const getPeerMetadata = state => {
|
|
|
897
883
|
* farmhand.state data that should be persisted.
|
|
898
884
|
*/
|
|
899
885
|
export const reduceByPersistedKeys = state =>
|
|
900
|
-
/** @type {farmhand.state} */ PERSISTED_STATE_KEYS.reduce((
|
|
886
|
+
/** @type {farmhand.state} */ (PERSISTED_STATE_KEYS.reduce((
|
|
901
887
|
/** @type {Partial<farmhand.state>} */ acc,
|
|
902
888
|
key
|
|
903
889
|
) => {
|
|
@@ -908,7 +894,7 @@ export const reduceByPersistedKeys = state =>
|
|
|
908
894
|
}
|
|
909
895
|
|
|
910
896
|
return acc
|
|
911
|
-
}, {})
|
|
897
|
+
}, {}))
|
|
912
898
|
|
|
913
899
|
/**
|
|
914
900
|
* @param {Array.<number>} historicalData Must be no longer than 7 numbers long.
|
|
@@ -1006,7 +992,8 @@ export const transformStateDataForImport = /** @type {(state: any) => farmhand.s
|
|
|
1006
992
|
) {
|
|
1007
993
|
sanitizedState = {
|
|
1008
994
|
...sanitizedState,
|
|
1009
|
-
stageFocus:
|
|
995
|
+
stageFocus:
|
|
996
|
+
/** @type {farmhand.stageFocusType} */ (STANDARD_VIEW_LIST[0]),
|
|
1010
997
|
}
|
|
1011
998
|
}
|
|
1012
999
|
|
|
@@ -1048,15 +1035,17 @@ export const transformStateDataForImport = /** @type {(state: any) => farmhand.s
|
|
|
1048
1035
|
}
|
|
1049
1036
|
|
|
1050
1037
|
// NOTE: Legacy data trasformation for https://github.com/jeremyckahn/farmhand/issues/387
|
|
1038
|
+
// @ts-expect-error
|
|
1051
1039
|
if (sanitizedState.id) {
|
|
1040
|
+
// @ts-expect-error
|
|
1052
1041
|
sanitizedState.playerId = sanitizedState.id
|
|
1042
|
+
// @ts-expect-error
|
|
1053
1043
|
delete sanitizedState.id
|
|
1054
1044
|
}
|
|
1055
1045
|
|
|
1056
1046
|
return sanitizedState
|
|
1057
1047
|
}
|
|
1058
1048
|
|
|
1059
|
-
// @ts-expect-error
|
|
1060
1049
|
export const getPlayerName = memoize(
|
|
1061
1050
|
/**
|
|
1062
1051
|
* @param {string} playerId
|
|
@@ -1124,11 +1113,9 @@ export function randomChoice(weightedOptions) {
|
|
|
1124
1113
|
|
|
1125
1114
|
for (let option of weightedOptions) {
|
|
1126
1115
|
totalWeight += option.weight
|
|
1127
|
-
// @ts-expect-error
|
|
1128
1116
|
sortedOptions.push(option)
|
|
1129
1117
|
}
|
|
1130
1118
|
|
|
1131
|
-
// @ts-expect-error
|
|
1132
1119
|
sortedOptions.sort(o => o.weight)
|
|
1133
1120
|
|
|
1134
1121
|
let diceRoll = random() * totalWeight
|
|
@@ -1159,7 +1146,6 @@ const colorizeCowTemplate = (() => {
|
|
|
1159
1146
|
const cachedCowImages = {}
|
|
1160
1147
|
|
|
1161
1148
|
// https://stackoverflow.com/a/5624139
|
|
1162
|
-
// @ts-expect-error
|
|
1163
1149
|
const hexToRgb = memoize(hex => {
|
|
1164
1150
|
const [, r, g, b] = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(
|
|
1165
1151
|
hex
|
|
@@ -729,6 +729,7 @@ describe('canMakeRecipe', () => {
|
|
|
729
729
|
test('evaluates inventory correctly', () => {
|
|
730
730
|
expect(
|
|
731
731
|
canMakeRecipe(
|
|
732
|
+
// @ts-expect-error
|
|
732
733
|
{ ingredients: { 'sample-item-1': 2 } },
|
|
733
734
|
[{ id: 'sample-item-1', quantity: 1 }],
|
|
734
735
|
1
|
|
@@ -741,6 +742,7 @@ describe('canMakeRecipe', () => {
|
|
|
741
742
|
test('evaluates inventory correctly', () => {
|
|
742
743
|
expect(
|
|
743
744
|
canMakeRecipe(
|
|
745
|
+
// @ts-expect-error
|
|
744
746
|
{ ingredients: { 'sample-item-1': 2 } },
|
|
745
747
|
[{ id: 'sample-item-1', quantity: 2 }],
|
|
746
748
|
1
|
|
@@ -21,7 +21,6 @@ export class MemoizeCache {
|
|
|
21
21
|
* @see https://github.com/caiogondim/fast-memoize.js
|
|
22
22
|
*/
|
|
23
23
|
constructor({ cacheSize = MEMOIZE_CACHE_CLEAR_THRESHOLD } = {}) {
|
|
24
|
-
// @ts-expect-error
|
|
25
24
|
this.cacheSize = cacheSize
|
|
26
25
|
}
|
|
27
26
|
|
|
@@ -34,7 +33,6 @@ export class MemoizeCache {
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
set(key, value) {
|
|
37
|
-
// @ts-expect-error
|
|
38
36
|
if (Object.keys(this.cache).length > this.cacheSize) {
|
|
39
37
|
this.cache = {}
|
|
40
38
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/AchievementsView/{AchievementsView.test.tsx → AchievementsView.test.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/CowPenContextMenu/{CowPenContextMenu.test.tsx → CowPenContextMenu.test.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/Farmhand/helpers/{getInventoryQuantities.ts → getInventoryQuantities.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/IngredientsList/{IngredientsList.test.tsx → IngredientsList.test.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/KeybindingsView/{KeybindingsView.test.tsx → KeybindingsView.test.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/Navigation/{DayAndProgressContainer.tsx → DayAndProgressContainer.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/OnlinePeersView/OnlinePeer/{OnlinePeer.test.tsx → OnlinePeer.test.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/components/OnlinePeersView/{OnlinePeersView.test.tsx → OnlinePeersView.test.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|