Skip to content

Commit 1ea2a3c

Browse files
authored
Merge pull request #11 from TheCodeRaccoons/te-taking-project
Add full-save-file.json to .gitignore Prevents full-save-file.json from being tracked by git, likely because it is a generated or environment-specific file.
2 parents f42f3b5 + 615ade5 commit 1ea2a3c

9 files changed

Lines changed: 27 additions & 85 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
.env.development.local
1818
.env.test.local
1919
.env.production.local
20+
full-save-file.json
2021

2122
npm-debug.log*
2223
yarn-debug.log*

src/Components/AchieveTabs/Cooking.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState, useEffect } from 'react'
2-
import type { generalFormatedItemType } from 'types/savefile';
2+
import type { generalFormatedItemType } from 'types/displayDataTypes';
33

44
interface dishesCookedType {
55
cookedItems: generalFormatedItemType[];

src/Components/AchieveTabs/Crops.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState, useEffect } from 'react'
2-
import type { cropsShippedType } from 'types/savefile';
2+
import type { cropsShippedType } from 'types/displayDataTypes';
33

44
interface CropsShippedWrapperType {
55
cropsShipped: cropsShippedType;

src/Components/Skills/SkillContainer/SkillContainer.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@
7171

7272
.skill-container__progress-fill {
7373
height: 100%;
74-
background: linear-gradient(90deg, #A8511B, #CC7625);
74+
background: linear-gradient(90deg, #4caf50, #81c784);
7575
border-radius: 4px;
7676
transition: width 0.3s ease;
7777
min-width: 2px;
78-
box-shadow: 0 0 8px rgba(168, 81, 27, 0.5);
78+
box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
7979
}
8080

8181
.skill-container__icon {

src/Components/Utility/Utility.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,25 @@ import MonsterCat from '@utility/monsterCategorie.json' with { type: "json" };
1212
import Museum from '@utility/museum.json' with { type: "json" };
1313
import townSR from './TownSpecialReq.json' with { type: "json" };
1414
import QiSR from './QiSpecialReq.json' with { type: "json" };
15-
import type {
16-
cropsShippedType,
17-
experienceType,
18-
formatedFriendshipDataType,
19-
formatedMonsterDataType,
15+
import type {
2016
friendshipDataType,
21-
gameLocationType,
22-
generalFormatedItemType,
23-
itemFoundType,
17+
gameLocationType,
2418
itemsType,
25-
itemType,
26-
maxMonoType,
27-
playerType,
28-
professionsType,
19+
itemType,
20+
playerType,
2921
questType,
3022
specialOrderType
3123
} from 'types/savefile';
24+
import type {
25+
cropsShippedType,
26+
generalFormatedItemType,
27+
professionsType,
28+
maxMonoType,
29+
itemFoundType,
30+
experienceType,
31+
formatedFriendshipDataType,
32+
formatedMonsterDataType
33+
} from 'types/displayDataTypes';
3234
import type { fullPlayerDataType, museumCollectionType } from 'types/displayDataTypes';
3335

3436
//Gets the info from the farm hands as an array of the same type
@@ -95,7 +97,7 @@ const parseData = ({playerData, collectionStatus, specialRequests, availableSpec
9597
professions: GetProfessionData(playerData.professions.int) , //DONE?
9698
shippedItems: GetShippedItems(playerData.basicShipped) || [],//DONE
9799
cropsShipped: GetCropsAchievements(playerData.basicShipped?.item),//Refactored DONE
98-
mineralsFound: GetArrayData(playerData.mineralsFound?.item) || [], //DONE
100+
//mineralsFound: GetArrayData(playerData.mineralsFound?.item) || [], //DONE
99101
cookedItems: GetCookingData(playerData.recipesCooked, playerData.cookingRecipes.item) || [], //DONE
100102
fishCaught: GetFishes(playerData.fishCaught.item) || [],
101103
tailoredItems: GetArrayDataTimeless(playerData.tailoredItems) || [],
@@ -142,6 +144,7 @@ const GetProfessionData = (professions: number[]): professionsType[] =>{
142144
}
143145
});
144146
}
147+
console.log('Profession Data:', data);
145148
return data;
146149
}
147150

src/Components/stats/stats.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ const Stats = ({playerData, farmName, farmhandData}: formattedSaveFileType) => {
3838
<Achievements
3939
cookedItems={p.cookedItems}
4040
itemsCrafted={p.itemsCrafted}
41-
cropsShipped={p.cropsShipped}
41+
cropsShipped={p.cropsShipped}
42+
professions={p.professions}
4243
fishCaught={p.fishCaught}
4344
friendship={p.friendship}
4445
monstersKilled={p.monstersKilled}
@@ -75,6 +76,7 @@ const Stats = ({playerData, farmName, farmhandData}: formattedSaveFileType) => {
7576
<Achievements
7677
cookedItems={playerData.cookedItems}
7778
itemsCrafted={playerData.itemsCrafted}
79+
professions={playerData.professions}
7880
cropsShipped={playerData.cropsShipped}
7981
fishCaught={playerData.fishCaught}
8082
friendship={playerData.friendship}

src/serviceWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414

15-
export function unregister() {
15+
export default function unregister() {
1616
if ('serviceWorker' in navigator) {
1717
navigator.serviceWorker.ready
1818
.then(registration => {

src/types/displayDataTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type fullPlayerDataType = {
1212
professions: professionsType[];
1313
shippedItems: generalFormatedItemType[];
1414
cropsShipped: cropsShippedType;
15-
mineralsFound: itemFoundType[];
15+
mineralsFound?: itemFoundType[];
1616
cookedItems: generalFormatedItemType[];
1717
museumCollection: museumCollectionType;
1818
availableSpecialRequests: string[];

src/types/savefile.ts

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -266,56 +266,6 @@ export type playerType = {
266266
fishCaught: itemType,
267267
}
268268

269-
export type professionsType = {
270-
id: number;
271-
name: string;
272-
}
273-
274-
export type cropsShippedType = {
275-
hasMonoculture: boolean;
276-
hasPolyculture: boolean;
277-
mono_extras: generalFormatedItemType[];
278-
poly_crops: generalFormatedItemType[];
279-
maxMono: null | maxMonoType;
280-
};
281-
282-
export type maxMonoType = {
283-
name: string;
284-
shipped: number;
285-
}
286-
287-
export type generalFormatedItemType = {
288-
id?: number;
289-
image: string;
290-
name: string;
291-
link?: string;
292-
knownDish?: boolean;
293-
times?: number;
294-
shipped?: number;
295-
fished?: boolean;
296-
found?: boolean;
297-
inMuseum?: boolean;
298-
}
299-
300-
export type formatedFriendshipDataType = {
301-
name: string;
302-
dateable: boolean;
303-
points: number;
304-
level: number;
305-
lvlup: number;
306-
}
307-
export type formatedMonsterDataType = {
308-
category: string;
309-
goal: number;
310-
images: monsterImageType[];
311-
timesKilled: number;
312-
};
313-
314-
type monsterImageType = {
315-
img: string;
316-
name: string;
317-
}
318-
319269
type batType = {
320270
goal: number;
321271
monsters: string[];
@@ -343,11 +293,6 @@ type friendshipDataItemType = {
343293
item: friendshipDataType[]
344294
}
345295

346-
export type itemFoundType = {
347-
item: number | string,
348-
timesFound: number
349-
}
350-
351296
export type friendshipDataType = {
352297
key: {
353298
string: "Robin"
@@ -541,13 +486,4 @@ export type questType = {
541486
dueDate: number;
542487
duration: string;
543488
questState: string;
544-
}
545-
546-
export type experienceType = {
547-
levelInfo: {
548-
id: number;
549-
val: number;
550-
};
551-
skill: string;
552-
xp: number;
553-
};
489+
}

0 commit comments

Comments
 (0)