@jeremyckahn/farmhand 1.23.2 → 1.23.4
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/README.md +5 -0
- package/dist/assets/index-4ynbl-GC.js +392 -0
- package/dist/assets/index-4ynbl-GC.js.map +1 -0
- package/dist/assets/index-CaYdR-lC.css +1 -0
- package/dist/assets/jersey-10-latin-400-normal-DrL73VYW.woff2 +0 -0
- package/dist/assets/jersey-10-latin-ext-400-normal-uIKqQSaG.woff2 +0 -0
- package/dist/assets/jersey-20-latin-400-normal-bNi78tgO.woff2 +0 -0
- package/dist/assets/jersey-20-latin-ext-400-normal-BO3lmWef.woff2 +0 -0
- package/dist/assets/jersey-25-latin-400-normal-BuYJnnt7.woff2 +0 -0
- package/dist/assets/jersey-25-latin-ext-400-normal-CP5Jl3WN.woff2 +0 -0
- package/dist/index.html +2 -2
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.map +1 -1
- package/package.json +7 -12
- package/src/common/services/randomNumber.test.ts +61 -1
- package/src/common/services/randomNumber.ts +36 -1
- package/src/common/utils.ts +22 -13
- package/src/components/AccountingView/AccountingView.tsx +7 -13
- package/src/components/Achievement/Achievement.tsx +2 -15
- package/src/components/AchievementsView/AchievementsView.tsx +2 -7
- package/src/components/AnimatedNumber/AnimatedNumber.tsx +0 -6
- package/src/components/AppBar/AppBar.tsx +21 -17
- package/src/components/Cellar/Cellar.tsx +0 -2
- package/src/components/Cellar/CellarInventoryTabPanel.tsx +0 -6
- package/src/components/Cellar/FermentationTabPanel.tsx +0 -6
- package/src/components/Cellar/Keg.tsx +0 -5
- package/src/components/Cellar/TabPanel/index.tsx +0 -7
- package/src/components/Cellar/WinemakingTabPanel.tsx +0 -6
- package/src/components/ContextPane/ContextPane.tsx +0 -6
- package/src/components/CowCard/Bloodline/Bloodline.tsx +0 -6
- package/src/components/CowCard/CowCard.tsx +7 -39
- package/src/components/CowCard/Subheader/Subheader.tsx +21 -44
- package/src/components/CowPen/Cow.tsx +5 -11
- package/src/components/CowPen/CowPen.test.tsx +4 -4
- package/src/components/CowPen/CowPen.tsx +5 -16
- package/src/components/CowPenContextMenu/CowPenContextMenu.tsx +2 -18
- package/src/components/CowPenContextMenu/TabPanel/index.tsx +0 -7
- package/src/components/Farmhand/Farmhand.context.tsx +4 -3
- package/src/components/Farmhand/Farmhand.tsx +11 -15
- package/src/components/Farmhand/FarmhandReducers.tsx +1 -2
- package/src/components/Farmhand/FarmhandService.test.ts +6 -9
- package/src/components/Farmhand/hooks/useFarmhandDayAdvancement.ts +2 -6
- package/src/components/Farmhand/hooks/useFarmhandNetwork.test.ts +2 -2
- package/src/components/Farmhand/hooks/useFarmhandNetwork.ts +15 -31
- package/src/components/Farmhand/useFarmhand.test.ts +7 -5
- package/src/components/Farmhand/useFarmhand.ts +24 -15
- package/src/components/FermentationRecipeList/FermentationRecipe.tsx +0 -5
- package/src/components/FermentationRecipeList/FermentationRecipeList.test.tsx +10 -11
- package/src/components/FermentationRecipeList/FermentationRecipeList.tsx +2 -3
- package/src/components/Field/Field.tsx +15 -50
- package/src/components/Forest/Forest.tsx +10 -7
- package/src/components/ForestPlot/ForestPlot.tsx +5 -5
- package/src/components/ForestQuickSelect/ForestQuickSelect.tsx +0 -12
- package/src/components/Home/Home.tsx +2 -7
- package/src/components/Home/SnowBackground.tsx +1 -1
- package/src/components/IngredientsList/IngredientsList.tsx +0 -7
- package/src/components/Inventory/Inventory.test.tsx +4 -4
- package/src/components/Inventory/Inventory.tsx +5 -12
- package/src/components/Item/Item.tsx +11 -29
- package/src/components/ItemList/ItemList.tsx +4 -11
- package/src/components/KeybindingsView/KeybindingsView.tsx +0 -2
- package/src/components/LogView/LogView.tsx +6 -28
- package/src/components/Navigation/DayAndProgressContainer.tsx +0 -8
- package/src/components/Navigation/Navigation.tsx +12 -33
- package/src/components/NotificationSystem/NotificationSystem.test.tsx +45 -3
- package/src/components/NotificationSystem/NotificationSystem.tsx +45 -32
- package/src/components/OnlinePeersView/OnlinePeer/OnlinePeer.test.tsx +2 -2
- package/src/components/OnlinePeersView/OnlinePeer/OnlinePeer.tsx +0 -11
- package/src/components/OnlinePeersView/OnlinePeersView.tsx +0 -10
- package/src/components/PixelIcon/createPixelIcon.test.tsx +59 -0
- package/src/components/PixelIcon/createPixelIcon.tsx +97 -0
- package/src/components/PixelIcon/icons.ts +445 -0
- package/src/components/PixelIcon/index.ts +3 -0
- package/src/components/Plot/Plot.tsx +3 -3
- package/src/components/PriceEventView/PriceEventView.tsx +0 -6
- package/src/components/ProgressBar/ProgressBar.tsx +9 -8
- package/src/components/QuantityInput/QuantityInput.tsx +6 -11
- package/src/components/QuickSelect/QuickSelect.tsx +0 -10
- package/src/components/Recipe/Recipe.tsx +0 -9
- package/src/components/RecipeList/RecipeList.tsx +0 -6
- package/src/components/SearchBar/SearchBar.tsx +4 -10
- package/src/components/SettingsView/RandomSeedInput.test.tsx +2 -4
- package/src/components/SettingsView/RandomSeedInput.tsx +5 -8
- package/src/components/SettingsView/SettingsView.test.tsx +21 -0
- package/src/components/SettingsView/SettingsView.tsx +24 -18
- package/src/components/Shop/Shop.tsx +0 -20
- package/src/components/Shop/TabPanel/index.tsx +0 -7
- package/src/components/Stage/Stage.tsx +11 -20
- package/src/components/StatsView/StatsView.tsx +0 -18
- package/src/components/TierPurchase/TierPurchase.tsx +0 -12
- package/src/components/Toolbelt/Toolbelt.tsx +5 -10
- package/src/components/UpdateNotifier/UpdateNotifier.tsx +33 -5
- package/src/components/UpgradePurchase/UpgradePurchase.tsx +0 -10
- package/src/components/WineRecipeList/WineRecipe.test.tsx +2 -2
- package/src/components/WineRecipeList/WineRecipe.tsx +0 -5
- package/src/components/WineRecipeList/WineRecipeList.tsx +2 -3
- package/src/components/Workshop/ForgeTabPanel.tsx +0 -8
- package/src/components/Workshop/KitchenTabPanel.tsx +0 -7
- package/src/components/Workshop/RecyclingTabPanel.tsx +0 -7
- package/src/components/Workshop/TabPanel/index.tsx +0 -7
- package/src/components/Workshop/WoodChipperTabPanel.tsx +0 -7
- package/src/components/Workshop/Workshop.tsx +0 -9
- package/src/components/Workshop/getUpgradesAvailable.ts +1 -1
- package/src/constants.ts +18 -13
- package/src/data/crops/grape.ts +13 -15
- package/src/data/maps.test.ts +3 -4
- package/src/data/maps.ts +27 -29
- package/src/enums.ts +47 -19
- package/src/factories/OreFactory.ts +2 -1
- package/src/farmhand.d.ts +6 -3
- package/src/game-logic/reducers/applyPrecipitation.ts +4 -4
- package/src/game-logic/reducers/generatePriceEvents.ts +6 -3
- package/src/game-logic/reducers/harvestForestPlot.ts +1 -2
- package/src/game-logic/reducers/makeFermentationRecipe.ts +2 -3
- package/src/game-logic/reducers/minePlot.test.ts +2 -2
- package/src/game-logic/reducers/minePlot.ts +1 -1
- package/src/game-logic/reducers/processCowFertilizerProduction.test.ts +16 -14
- package/src/game-logic/reducers/processFeedingCows.test.ts +2 -5
- package/src/game-logic/reducers/purchaseCow.ts +2 -7
- package/src/game-logic/reducers/showNotification.test.ts +20 -0
- package/src/game-logic/reducers/showNotification.ts +4 -2
- package/src/game-logic/reducers/updateAchievements.ts +1 -1
- package/src/game-logic/reducers/updateFinancialRecords.test.ts +21 -25
- package/src/game-logic/reducers/updateFinancialRecords.ts +2 -5
- package/src/game-logic/reducers/updateInventoryRecordsForNextDay.test.ts +12 -14
- package/src/handlers/ui-events.test.ts +44 -42
- package/src/handlers/ui-events.tsx +18 -3
- package/src/hooks/usePrefersReducedMotion.ts +10 -6
- package/src/index.tsx +0 -2
- package/src/mui-theme.ts +258 -37
- package/src/scripts/generate-crop-table.ts +3 -2
- package/src/setupTests.ts +18 -12
- package/src/strings.ts +1 -1
- package/src/styles/fonts.ts +73 -0
- package/src/styles/pixel.ts +151 -0
- package/src/styles/sx.ts +46 -33
- package/src/styles/tokens.ts +11 -0
- package/src/test-utils/index.ts +1 -0
- package/src/utils/chooseRandom.ts +4 -1
- package/src/utils/chooseRandomIndex.ts +6 -2
- package/src/utils/getCowImage.ts +22 -27
- package/src/utils/getMaxYieldOfFermentationRecipe.ts +2 -2
- package/src/utils/getPeerMetadata.ts +1 -1
- package/src/utils/getPlotImage.test.ts +14 -14
- package/src/utils/getPlotImage.ts +10 -10
- package/src/utils/getRandomUnlockedCrop.ts +5 -3
- package/src/utils/getRandomizedLifespan.test.ts +2 -8
- package/src/utils/getValueAdjustmentStream.test.ts +9 -0
- package/src/utils/getValueAdjustmentStream.ts +5 -0
- package/src/utils/isItemAFarmProduct.ts +2 -2
- package/src/utils/shouldPrecipitateToday.ts +3 -1
- package/src/utils/shouldStormToday.ts +2 -1
- package/src/utils/transformStateDataForImport.ts +3 -5
- package/dist/assets/francois-one-latin-400-normal-DD1rFI7H.woff2 +0 -0
- package/dist/assets/francois-one-latin-400-normal-DNXs7uOx.woff +0 -0
- package/dist/assets/francois-one-latin-ext-400-normal-CwRdWRZD.woff2 +0 -0
- package/dist/assets/francois-one-latin-ext-400-normal-JvkpT0Av.woff +0 -0
- package/dist/assets/francois-one-vietnamese-400-normal-BLIKeG5Y.woff2 +0 -0
- package/dist/assets/francois-one-vietnamese-400-normal-CuWeHlXs.woff +0 -0
- package/dist/assets/index-CNcrTYN-.css +0 -1
- package/dist/assets/index-DNPchtK9.js +0 -844
- package/dist/assets/index-DNPchtK9.js.map +0 -1
- package/dist/assets/public-sans-latin-400-normal-8Rpg0ruU.woff2 +0 -0
- package/dist/assets/public-sans-latin-400-normal-SBbinRkI.woff +0 -0
- package/dist/assets/public-sans-latin-ext-400-normal-B02wwOdZ.woff +0 -0
- package/dist/assets/public-sans-latin-ext-400-normal-mk90oQqJ.woff2 +0 -0
- package/dist/assets/public-sans-vietnamese-400-normal-BO1meqcx.woff +0 -0
- package/dist/assets/public-sans-vietnamese-400-normal-TxZB8OSn.woff2 +0 -0
- package/src/fontsource.d.ts +0 -3
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
// Pixel art replacements for the @mui/icons-material and Font Awesome icons
|
|
2
|
+
// used throughout the app. See createPixelIcon.tsx for the pixel map format.
|
|
3
|
+
//
|
|
4
|
+
// Every map is 12x12, so at MUI's default icon size (24px) each art pixel
|
|
5
|
+
// is exactly 2 CSS pixels.
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
createPixelIcon,
|
|
9
|
+
flipX,
|
|
10
|
+
flipY,
|
|
11
|
+
PixelMap,
|
|
12
|
+
rotate,
|
|
13
|
+
} from './createPixelIcon.js'
|
|
14
|
+
|
|
15
|
+
const chevronDown: PixelMap = [
|
|
16
|
+
'............',
|
|
17
|
+
'............',
|
|
18
|
+
'............',
|
|
19
|
+
'.##......##.',
|
|
20
|
+
'.###....###.',
|
|
21
|
+
'..###..###..',
|
|
22
|
+
'...######...',
|
|
23
|
+
'....####....',
|
|
24
|
+
'.....##.....',
|
|
25
|
+
'............',
|
|
26
|
+
'............',
|
|
27
|
+
'............',
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
const arrowDown: PixelMap = [
|
|
31
|
+
'............',
|
|
32
|
+
'.....##.....',
|
|
33
|
+
'.....##.....',
|
|
34
|
+
'.....##.....',
|
|
35
|
+
'.....##.....',
|
|
36
|
+
'.....##.....',
|
|
37
|
+
'..#..##..#..',
|
|
38
|
+
'..##.##.##..',
|
|
39
|
+
'...######...',
|
|
40
|
+
'....####....',
|
|
41
|
+
'.....##.....',
|
|
42
|
+
'............',
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
const heart: PixelMap = [
|
|
46
|
+
'............',
|
|
47
|
+
'..##....##..',
|
|
48
|
+
'.####..####.',
|
|
49
|
+
'############',
|
|
50
|
+
'###+########',
|
|
51
|
+
'##+#########',
|
|
52
|
+
'.##########.',
|
|
53
|
+
'..########..',
|
|
54
|
+
'...######...',
|
|
55
|
+
'....####....',
|
|
56
|
+
'.....##.....',
|
|
57
|
+
'............',
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
const zoomLens = (symbol: 'plus' | 'minus'): PixelMap => [
|
|
61
|
+
'..#####.....',
|
|
62
|
+
'.##...##....',
|
|
63
|
+
'##..' + (symbol === 'plus' ? '#' : '.') + '..##...',
|
|
64
|
+
'#...' + (symbol === 'plus' ? '#' : '.') + '...#...',
|
|
65
|
+
'#.#####.#...',
|
|
66
|
+
'#...' + (symbol === 'plus' ? '#' : '.') + '...#...',
|
|
67
|
+
'##..' + (symbol === 'plus' ? '#' : '.') + '..##...',
|
|
68
|
+
'.##...###...',
|
|
69
|
+
'..#######...',
|
|
70
|
+
'.......###..',
|
|
71
|
+
'........###.',
|
|
72
|
+
'.........##.',
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
export const KeyboardArrowDownIcon = createPixelIcon(
|
|
76
|
+
chevronDown,
|
|
77
|
+
'KeyboardArrowDown'
|
|
78
|
+
)
|
|
79
|
+
export const KeyboardArrowUpIcon = createPixelIcon(
|
|
80
|
+
flipY(chevronDown),
|
|
81
|
+
'KeyboardArrowUp'
|
|
82
|
+
)
|
|
83
|
+
export const KeyboardArrowLeftIcon = createPixelIcon(
|
|
84
|
+
rotate(chevronDown),
|
|
85
|
+
'KeyboardArrowLeft'
|
|
86
|
+
)
|
|
87
|
+
export const KeyboardArrowRightIcon = createPixelIcon(
|
|
88
|
+
flipX(rotate(chevronDown)),
|
|
89
|
+
'KeyboardArrowRight'
|
|
90
|
+
)
|
|
91
|
+
export const ExpandMoreIcon = createPixelIcon(chevronDown, 'ExpandMore')
|
|
92
|
+
|
|
93
|
+
export const ArrowDownwardIcon = createPixelIcon(arrowDown, 'ArrowDownward')
|
|
94
|
+
export const ArrowUpwardIcon = createPixelIcon(flipY(arrowDown), 'ArrowUpward')
|
|
95
|
+
|
|
96
|
+
export const ArrowDropDownIcon = createPixelIcon(
|
|
97
|
+
[
|
|
98
|
+
'............',
|
|
99
|
+
'............',
|
|
100
|
+
'............',
|
|
101
|
+
'............',
|
|
102
|
+
'..########..',
|
|
103
|
+
'...######...',
|
|
104
|
+
'....####....',
|
|
105
|
+
'.....##.....',
|
|
106
|
+
'............',
|
|
107
|
+
'............',
|
|
108
|
+
'............',
|
|
109
|
+
'............',
|
|
110
|
+
],
|
|
111
|
+
'ArrowDropDown'
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
export const MenuIcon = createPixelIcon(
|
|
115
|
+
[
|
|
116
|
+
'............',
|
|
117
|
+
'............',
|
|
118
|
+
'.##########.',
|
|
119
|
+
'.##########.',
|
|
120
|
+
'............',
|
|
121
|
+
'.##########.',
|
|
122
|
+
'.##########.',
|
|
123
|
+
'............',
|
|
124
|
+
'.##########.',
|
|
125
|
+
'.##########.',
|
|
126
|
+
'............',
|
|
127
|
+
'............',
|
|
128
|
+
],
|
|
129
|
+
'Menu'
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
export const HotelIcon = createPixelIcon(
|
|
133
|
+
[
|
|
134
|
+
'............',
|
|
135
|
+
'............',
|
|
136
|
+
'#...........',
|
|
137
|
+
'#...........',
|
|
138
|
+
'#.##........',
|
|
139
|
+
'#.##.######.',
|
|
140
|
+
'#....#######',
|
|
141
|
+
'############',
|
|
142
|
+
'############',
|
|
143
|
+
'#..........#',
|
|
144
|
+
'#..........#',
|
|
145
|
+
'............',
|
|
146
|
+
],
|
|
147
|
+
'Hotel'
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
export const SettingsIcon = createPixelIcon(
|
|
151
|
+
[
|
|
152
|
+
'....####....',
|
|
153
|
+
'.##.####.##.',
|
|
154
|
+
'.##########.',
|
|
155
|
+
'..########..',
|
|
156
|
+
'#####..#####',
|
|
157
|
+
'####....####',
|
|
158
|
+
'####....####',
|
|
159
|
+
'#####..#####',
|
|
160
|
+
'..########..',
|
|
161
|
+
'.##########.',
|
|
162
|
+
'.##.####.##.',
|
|
163
|
+
'....####....',
|
|
164
|
+
],
|
|
165
|
+
'Settings'
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
export const FlashOnIcon = createPixelIcon(
|
|
169
|
+
[
|
|
170
|
+
'......####..',
|
|
171
|
+
'.....####...',
|
|
172
|
+
'....####....',
|
|
173
|
+
'...####.....',
|
|
174
|
+
'..########..',
|
|
175
|
+
'..#######...',
|
|
176
|
+
'.....###....',
|
|
177
|
+
'....###.....',
|
|
178
|
+
'....##......',
|
|
179
|
+
'...##.......',
|
|
180
|
+
'...#........',
|
|
181
|
+
'............',
|
|
182
|
+
],
|
|
183
|
+
'FlashOn'
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
export const BookIcon = createPixelIcon(
|
|
187
|
+
[
|
|
188
|
+
'............',
|
|
189
|
+
'..#########.',
|
|
190
|
+
'.#+########.',
|
|
191
|
+
'.#+##....##.',
|
|
192
|
+
'.#+########.',
|
|
193
|
+
'.#+########.',
|
|
194
|
+
'.#+########.',
|
|
195
|
+
'.#+########.',
|
|
196
|
+
'.#+########.',
|
|
197
|
+
'.##########.',
|
|
198
|
+
'.#+++++++++.',
|
|
199
|
+
'..#########.',
|
|
200
|
+
],
|
|
201
|
+
'Book'
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
export const AssessmentIcon = createPixelIcon(
|
|
205
|
+
[
|
|
206
|
+
'.##########.',
|
|
207
|
+
'############',
|
|
208
|
+
'########..##',
|
|
209
|
+
'########..##',
|
|
210
|
+
'#####..#..##',
|
|
211
|
+
'#####..#..##',
|
|
212
|
+
'##..#..#..##',
|
|
213
|
+
'##..#..#..##',
|
|
214
|
+
'##..#..#..##',
|
|
215
|
+
'##..#..#..##',
|
|
216
|
+
'############',
|
|
217
|
+
'.##########.',
|
|
218
|
+
],
|
|
219
|
+
'Assessment'
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
export const BeenhereIcon = createPixelIcon(
|
|
223
|
+
[
|
|
224
|
+
'.##########.',
|
|
225
|
+
'.##########.',
|
|
226
|
+
'.#######..#.',
|
|
227
|
+
'.######..##.',
|
|
228
|
+
'.#..##..###.',
|
|
229
|
+
'.##....####.',
|
|
230
|
+
'.###..#####.',
|
|
231
|
+
'.##########.',
|
|
232
|
+
'.##########.',
|
|
233
|
+
'.####..####.',
|
|
234
|
+
'.###....###.',
|
|
235
|
+
'.##......##.',
|
|
236
|
+
],
|
|
237
|
+
'Beenhere'
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
export const AssignmentLateIcon = createPixelIcon(
|
|
241
|
+
[
|
|
242
|
+
'....####....',
|
|
243
|
+
'.##.####.##.',
|
|
244
|
+
'.##########.',
|
|
245
|
+
'.####..####.',
|
|
246
|
+
'.####..####.',
|
|
247
|
+
'.####..####.',
|
|
248
|
+
'.####..####.',
|
|
249
|
+
'.##########.',
|
|
250
|
+
'.####..####.',
|
|
251
|
+
'.##########.',
|
|
252
|
+
'.##########.',
|
|
253
|
+
'.##########.',
|
|
254
|
+
],
|
|
255
|
+
'AssignmentLate'
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
export const AccountBalanceIcon = createPixelIcon(
|
|
259
|
+
[
|
|
260
|
+
'.....##.....',
|
|
261
|
+
'...######...',
|
|
262
|
+
'.##########.',
|
|
263
|
+
'############',
|
|
264
|
+
'............',
|
|
265
|
+
'.##..##..##.',
|
|
266
|
+
'.##..##..##.',
|
|
267
|
+
'.##..##..##.',
|
|
268
|
+
'.##..##..##.',
|
|
269
|
+
'.##########.',
|
|
270
|
+
'############',
|
|
271
|
+
'############',
|
|
272
|
+
],
|
|
273
|
+
'AccountBalance'
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
export const ZoomInIcon = createPixelIcon(zoomLens('plus'), 'ZoomIn')
|
|
277
|
+
export const ZoomOutIcon = createPixelIcon(zoomLens('minus'), 'ZoomOut')
|
|
278
|
+
|
|
279
|
+
export const HeartIcon = createPixelIcon(heart, 'Heart')
|
|
280
|
+
|
|
281
|
+
export const HeartOutlineIcon = createPixelIcon(
|
|
282
|
+
[
|
|
283
|
+
'............',
|
|
284
|
+
'..##....##..',
|
|
285
|
+
'.#..#..#..#.',
|
|
286
|
+
'#....##....#',
|
|
287
|
+
'#..........#',
|
|
288
|
+
'#..........#',
|
|
289
|
+
'.#........#.',
|
|
290
|
+
'..#......#..',
|
|
291
|
+
'...#....#...',
|
|
292
|
+
'....#..#....',
|
|
293
|
+
'.....##.....',
|
|
294
|
+
'............',
|
|
295
|
+
],
|
|
296
|
+
'HeartOutline'
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
export const FemaleIcon = createPixelIcon(
|
|
300
|
+
[
|
|
301
|
+
'...######...',
|
|
302
|
+
'..##....##..',
|
|
303
|
+
'.##......##.',
|
|
304
|
+
'.##......##.',
|
|
305
|
+
'.##......##.',
|
|
306
|
+
'..##....##..',
|
|
307
|
+
'...######...',
|
|
308
|
+
'.....##.....',
|
|
309
|
+
'...######...',
|
|
310
|
+
'.....##.....',
|
|
311
|
+
'.....##.....',
|
|
312
|
+
'............',
|
|
313
|
+
],
|
|
314
|
+
'Female'
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
export const MaleIcon = createPixelIcon(
|
|
318
|
+
[
|
|
319
|
+
'......######',
|
|
320
|
+
'......######',
|
|
321
|
+
'.........###',
|
|
322
|
+
'........####',
|
|
323
|
+
'..####.##.##',
|
|
324
|
+
'.##..###....',
|
|
325
|
+
'##....##....',
|
|
326
|
+
'##....##....',
|
|
327
|
+
'##....##....',
|
|
328
|
+
'##....##....',
|
|
329
|
+
'.##..##.....',
|
|
330
|
+
'..####......',
|
|
331
|
+
],
|
|
332
|
+
'Male'
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
const circle = (holes: Record<number, string>): PixelMap =>
|
|
336
|
+
[
|
|
337
|
+
'...######...',
|
|
338
|
+
'.##########.',
|
|
339
|
+
'.##########.',
|
|
340
|
+
'############',
|
|
341
|
+
'############',
|
|
342
|
+
'############',
|
|
343
|
+
'############',
|
|
344
|
+
'############',
|
|
345
|
+
'############',
|
|
346
|
+
'.##########.',
|
|
347
|
+
'.##########.',
|
|
348
|
+
'...######...',
|
|
349
|
+
].map((row, y) => holes[y] ?? row)
|
|
350
|
+
|
|
351
|
+
export const SuccessIcon = createPixelIcon(
|
|
352
|
+
circle({
|
|
353
|
+
3: '########..##',
|
|
354
|
+
4: '#######..###',
|
|
355
|
+
5: '##..##..####',
|
|
356
|
+
6: '###....#####',
|
|
357
|
+
7: '####..######',
|
|
358
|
+
}),
|
|
359
|
+
'Success'
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
export const InfoIcon = createPixelIcon(
|
|
363
|
+
circle({
|
|
364
|
+
2: '.####..####.',
|
|
365
|
+
5: '#####..#####',
|
|
366
|
+
6: '#####..#####',
|
|
367
|
+
7: '#####..#####',
|
|
368
|
+
8: '#####..#####',
|
|
369
|
+
9: '.####..####.',
|
|
370
|
+
}),
|
|
371
|
+
'Info'
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
export const ErrorIcon = createPixelIcon(
|
|
375
|
+
circle({
|
|
376
|
+
2: '.####..####.',
|
|
377
|
+
3: '#####..#####',
|
|
378
|
+
4: '#####..#####',
|
|
379
|
+
5: '#####..#####',
|
|
380
|
+
6: '#####..#####',
|
|
381
|
+
8: '#####..#####',
|
|
382
|
+
9: '.####..####.',
|
|
383
|
+
}),
|
|
384
|
+
'Error'
|
|
385
|
+
)
|
|
386
|
+
|
|
387
|
+
export const WarningIcon = createPixelIcon(
|
|
388
|
+
[
|
|
389
|
+
'.....##.....',
|
|
390
|
+
'.....##.....',
|
|
391
|
+
'....####....',
|
|
392
|
+
'....#..#....',
|
|
393
|
+
'...##..##...',
|
|
394
|
+
'...##..##...',
|
|
395
|
+
'..###..###..',
|
|
396
|
+
'..########..',
|
|
397
|
+
'.####..####.',
|
|
398
|
+
'.##########.',
|
|
399
|
+
'############',
|
|
400
|
+
'............',
|
|
401
|
+
],
|
|
402
|
+
'Warning'
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
const checkbox = (holes: Record<number, string>): PixelMap =>
|
|
406
|
+
[
|
|
407
|
+
'.##########.',
|
|
408
|
+
'############',
|
|
409
|
+
'############',
|
|
410
|
+
'############',
|
|
411
|
+
'############',
|
|
412
|
+
'############',
|
|
413
|
+
'############',
|
|
414
|
+
'############',
|
|
415
|
+
'############',
|
|
416
|
+
'############',
|
|
417
|
+
'############',
|
|
418
|
+
'.##########.',
|
|
419
|
+
].map((row, y) => holes[y] ?? row)
|
|
420
|
+
|
|
421
|
+
export const CheckBoxOutlineBlankIcon = createPixelIcon(
|
|
422
|
+
checkbox(
|
|
423
|
+
Object.fromEntries([2, 3, 4, 5, 6, 7, 8, 9].map(y => [y, '##........##']))
|
|
424
|
+
),
|
|
425
|
+
'CheckBoxOutlineBlank'
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
export const CheckBoxIcon = createPixelIcon(
|
|
429
|
+
checkbox({
|
|
430
|
+
3: '########..##',
|
|
431
|
+
4: '#######..###',
|
|
432
|
+
5: '##..##..####',
|
|
433
|
+
6: '###....#####',
|
|
434
|
+
7: '####..######',
|
|
435
|
+
}),
|
|
436
|
+
'CheckBox'
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
export const IndeterminateCheckBoxIcon = createPixelIcon(
|
|
440
|
+
checkbox({
|
|
441
|
+
5: '###......###',
|
|
442
|
+
6: '###......###',
|
|
443
|
+
}),
|
|
444
|
+
'IndeterminateCheckBox'
|
|
445
|
+
)
|
|
@@ -165,9 +165,9 @@ export const Plot = ({
|
|
|
165
165
|
|
|
166
166
|
const showPlotImage = Boolean(
|
|
167
167
|
image &&
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
(wasJustShoveled ||
|
|
169
|
+
plotContent?.itemId ||
|
|
170
|
+
(plotContent && getPlotContentType(plotContent) === itemType.CROP))
|
|
171
171
|
)
|
|
172
172
|
|
|
173
173
|
let plotLabelText: string | null = null
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { object } from 'prop-types'
|
|
3
2
|
import Divider from '@mui/material/Divider/index.js'
|
|
4
3
|
|
|
5
4
|
import { itemsMap } from '../../data/maps.js'
|
|
@@ -44,11 +43,6 @@ const PriceEventView = ({
|
|
|
44
43
|
</div>
|
|
45
44
|
)
|
|
46
45
|
|
|
47
|
-
PriceEventView.propTypes = {
|
|
48
|
-
priceCrashes: object.isRequired,
|
|
49
|
-
priceSurges: object.isRequired,
|
|
50
|
-
}
|
|
51
|
-
|
|
52
46
|
export { PriceEventView }
|
|
53
47
|
|
|
54
48
|
export default function Consumer(
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef } from 'react'
|
|
2
|
-
import { number } from 'prop-types'
|
|
3
2
|
import { interpolate, tween } from 'shifty'
|
|
4
3
|
|
|
5
4
|
import { Div, P } from '../Elements/index.js'
|
|
6
5
|
import { usePrefersReducedMotion } from '../../hooks/usePrefersReducedMotion.js'
|
|
6
|
+
import { pixelBevel, pixelFrameSx, px } from '../../styles/pixel.js'
|
|
7
|
+
import { colors } from '../../styles/tokens.js'
|
|
7
8
|
|
|
8
9
|
const incompleteColor = '#ff9f00'
|
|
9
10
|
const completeColor = '#00e500'
|
|
@@ -92,9 +93,13 @@ const ProgressBar = ({ percent }: { percent: number }) => {
|
|
|
92
93
|
className="progress-wrapper"
|
|
93
94
|
sx={{
|
|
94
95
|
flexGrow: 1,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
...pixelFrameSx({ outline: colors.neutralOutline }),
|
|
97
|
+
height: `calc(1em + ${px(2)})`,
|
|
98
|
+
backgroundColor: 'rgba(0, 0, 0, 0.15)',
|
|
99
|
+
boxShadow: pixelBevel({
|
|
100
|
+
highlight: 'rgba(0, 0, 0, 0.15)',
|
|
101
|
+
lowlight: 'rgba(255, 255, 255, 0.2)',
|
|
102
|
+
}),
|
|
98
103
|
overflow: 'hidden',
|
|
99
104
|
}}
|
|
100
105
|
>
|
|
@@ -116,8 +121,4 @@ const ProgressBar = ({ percent }: { percent: number }) => {
|
|
|
116
121
|
)
|
|
117
122
|
}
|
|
118
123
|
|
|
119
|
-
ProgressBar.propTypes = {
|
|
120
|
-
percent: number.isRequired,
|
|
121
|
-
}
|
|
122
|
-
|
|
123
124
|
export default ProgressBar
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
|
-
import { func, number } from 'prop-types'
|
|
3
2
|
import Fab from '@mui/material/Fab/index.js'
|
|
4
|
-
|
|
5
|
-
import KeyboardArrowDown from '@mui/icons-material/KeyboardArrowDown.js'
|
|
3
|
+
|
|
6
4
|
import NumberFormat from 'react-number-format'
|
|
7
5
|
import TextField from '@mui/material/TextField/index.js'
|
|
8
6
|
|
|
7
|
+
import {
|
|
8
|
+
KeyboardArrowUpIcon as KeyboardArrowUp,
|
|
9
|
+
KeyboardArrowDownIcon as KeyboardArrowDown,
|
|
10
|
+
} from '../PixelIcon/index.js'
|
|
11
|
+
|
|
9
12
|
import { integerString } from '../../utils/integerString.js'
|
|
10
13
|
import AnimatedNumber from '../AnimatedNumber/index.js'
|
|
11
14
|
import { Div, Span } from '../Elements/index.js'
|
|
@@ -187,14 +190,6 @@ const QuantityInput = ({
|
|
|
187
190
|
)
|
|
188
191
|
}
|
|
189
192
|
|
|
190
|
-
QuantityInput.propTypes = {
|
|
191
|
-
handleSubmit: func.isRequired,
|
|
192
|
-
handleUpdateNumber: func.isRequired,
|
|
193
|
-
maxQuantity: number.isRequired,
|
|
194
|
-
setQuantity: func.isRequired,
|
|
195
|
-
value: number,
|
|
196
|
-
}
|
|
197
|
-
|
|
198
193
|
QuantityInput.defaultProps = {
|
|
199
194
|
value: 1,
|
|
200
195
|
}
|
|
@@ -2,7 +2,6 @@ import Divider from '@mui/material/Divider/index.js'
|
|
|
2
2
|
import Grid from '@mui/material/Grid/index.js'
|
|
3
3
|
import Paper from '@mui/material/Paper/index.js'
|
|
4
4
|
import { Theme } from '@mui/material/styles/index.js'
|
|
5
|
-
import { array, bool, func, object, string } from 'prop-types'
|
|
6
5
|
|
|
7
6
|
import { quickSelectSx } from '../../styles/sx.js'
|
|
8
7
|
import FarmhandContext from '../Farmhand/Farmhand.context.js'
|
|
@@ -61,15 +60,6 @@ const QuickSelect = ({
|
|
|
61
60
|
</Paper>
|
|
62
61
|
)
|
|
63
62
|
|
|
64
|
-
QuickSelect.propTypes = {
|
|
65
|
-
fieldToolInventory: array.isRequired,
|
|
66
|
-
handleItemSelectClick: func,
|
|
67
|
-
isMenuOpen: bool,
|
|
68
|
-
plantableCropInventory: array.isRequired,
|
|
69
|
-
playerInventoryQuantities: object.isRequired,
|
|
70
|
-
selectedItemId: string.isRequired,
|
|
71
|
-
}
|
|
72
|
-
|
|
73
63
|
export default function Consumer(
|
|
74
64
|
props: Partial<Parameters<typeof QuickSelect>[0]>
|
|
75
65
|
) {
|
|
@@ -6,7 +6,6 @@ import CardHeader from '@mui/material/CardHeader/index.js'
|
|
|
6
6
|
import CardContent from '@mui/material/CardContent/index.js'
|
|
7
7
|
import CardActions from '@mui/material/CardActions/index.js'
|
|
8
8
|
import Typography from '@mui/material/Typography/index.js'
|
|
9
|
-
import { array, func, number, object } from 'prop-types'
|
|
10
9
|
|
|
11
10
|
import { totalIngredientsInRecipe } from '../../utils/totalIngredientsInRecipe.js'
|
|
12
11
|
import { canMakeRecipe } from '../../utils/canMakeRecipe.js'
|
|
@@ -141,14 +140,6 @@ const Recipe = ({
|
|
|
141
140
|
)
|
|
142
141
|
}
|
|
143
142
|
|
|
144
|
-
Recipe.propTypes = {
|
|
145
|
-
handleMakeRecipeClick: func.isRequired,
|
|
146
|
-
inventory: array.isRequired,
|
|
147
|
-
inventoryLimit: number.isRequired,
|
|
148
|
-
playerInventoryQuantities: object.isRequired,
|
|
149
|
-
recipe: object.isRequired,
|
|
150
|
-
}
|
|
151
|
-
|
|
152
143
|
export { Recipe }
|
|
153
144
|
|
|
154
145
|
export default function Consumer(props: Partial<Parameters<typeof Recipe>[0]>) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
|
|
4
3
|
import SearchBar from '../SearchBar/index.js'
|
|
5
4
|
import Recipe from '../Recipe/index.js'
|
|
@@ -48,8 +47,3 @@ export function RecipeList({
|
|
|
48
47
|
</>
|
|
49
48
|
)
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
RecipeList.propTypes = {
|
|
53
|
-
allRecipes: PropTypes.object.isRequired,
|
|
54
|
-
learnedRecipes: PropTypes.array.isRequired,
|
|
55
|
-
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import { useDebounceCallback } from 'usehooks-ts'
|
|
4
3
|
import TextField from '@mui/material/TextField/index.js'
|
|
5
4
|
|
|
6
5
|
import { Div } from '../Elements/index.js'
|
|
7
|
-
import {
|
|
6
|
+
import { pixelBevel, pixelFrameSx } from '../../styles/pixel.js'
|
|
7
|
+
import { colors, layout } from '../../styles/tokens.js'
|
|
8
8
|
|
|
9
9
|
const SearchBar = ({
|
|
10
10
|
placeholder,
|
|
@@ -32,14 +32,13 @@ const SearchBar = ({
|
|
|
32
32
|
display: 'flex',
|
|
33
33
|
justifyContent: 'center',
|
|
34
34
|
alignItems: 'center',
|
|
35
|
+
...pixelFrameSx({ outline: colors.cardOutline, shadow: true }),
|
|
35
36
|
backgroundColor: '#fff',
|
|
36
|
-
|
|
37
|
-
boxShadow: '0 0.25em 0.5em rgba(0, 0, 0, 0.1)',
|
|
37
|
+
boxShadow: pixelBevel({ highlight: 'rgba(0, 0, 0, 0.06)' }),
|
|
38
38
|
'& .MuiOutlinedInput-root': {
|
|
39
39
|
width: '100%',
|
|
40
40
|
fontSize: '1em',
|
|
41
41
|
backgroundColor: 'transparent',
|
|
42
|
-
borderRadius: '0.5em',
|
|
43
42
|
transition: 'all 0.3s ease',
|
|
44
43
|
'&:hover .MuiOutlinedInput-notchedOutline': {
|
|
45
44
|
borderColor: '#ffd24d',
|
|
@@ -81,9 +80,4 @@ const SearchBar = ({
|
|
|
81
80
|
)
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
SearchBar.propTypes = {
|
|
85
|
-
placeholder: PropTypes.string,
|
|
86
|
-
onSearch: PropTypes.func.isRequired,
|
|
87
|
-
}
|
|
88
|
-
|
|
89
83
|
export default SearchBar
|
|
@@ -6,13 +6,11 @@ import FarmhandContext, {
|
|
|
6
6
|
createContextData,
|
|
7
7
|
} from '../Farmhand/Farmhand.context.js'
|
|
8
8
|
|
|
9
|
-
import { RandomSeedInput } from './RandomSeedInput.js'
|
|
9
|
+
import { RandomSeedInput, RandomSeedInputProps } from './RandomSeedInput.js'
|
|
10
10
|
|
|
11
11
|
const mockHandleRNGSeedChange = vitest.fn()
|
|
12
12
|
|
|
13
|
-
const MockRandomSeedInput = (
|
|
14
|
-
props: React.PropsWithChildren<Record<string, unknown>>
|
|
15
|
-
) => {
|
|
13
|
+
const MockRandomSeedInput = (props: RandomSeedInputProps) => {
|
|
16
14
|
const contextValue = createContextData()
|
|
17
15
|
|
|
18
16
|
contextValue.handlers.handleRNGSeedChange = mockHandleRNGSeedChange
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React, { useContext, useState } from 'react'
|
|
2
|
-
import { string } from 'prop-types'
|
|
3
2
|
import globalWindow from 'global/window.js'
|
|
4
3
|
import TextField from '@mui/material/TextField/index.js'
|
|
5
4
|
|
|
6
5
|
import FarmhandContext from '../Farmhand/Farmhand.context.js'
|
|
7
6
|
import { Form } from '../Elements/index.js'
|
|
8
7
|
|
|
8
|
+
export interface RandomSeedInputProps {
|
|
9
|
+
search?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
9
12
|
export const RandomSeedInput = ({
|
|
10
13
|
search = globalWindow.location.search,
|
|
11
|
-
}: {
|
|
12
|
-
search?: string
|
|
13
|
-
}) => {
|
|
14
|
+
}: RandomSeedInputProps) => {
|
|
14
15
|
const {
|
|
15
16
|
handlers: { handleRNGSeedChange },
|
|
16
17
|
} = useContext(FarmhandContext)
|
|
@@ -47,7 +48,3 @@ export const RandomSeedInput = ({
|
|
|
47
48
|
</Form>
|
|
48
49
|
)
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
RandomSeedInput.propTypes = {
|
|
52
|
-
search: string,
|
|
53
|
-
}
|