ps99-api 2.3.2 → 2.4.0

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.
Files changed (53) hide show
  1. package/.idea/node-ps99-api.iml +1 -0
  2. package/README.md +1 -1
  3. package/dist/responses/collection/achievement.d.ts +2 -0
  4. package/dist/responses/collection/guild-battle.d.ts +2 -4
  5. package/dist/responses/collection/rank.d.ts +1 -0
  6. package/dist/responses/collection/seed.d.ts +1 -0
  7. package/dist/responses/exists.d.ts +2 -0
  8. package/example-web/react2/public/service-worker.js +6 -6
  9. package/example-web/react2/src/App.tsx +8 -2
  10. package/example-web/react2/src/components/AchievementsComponent.tsx +23 -30
  11. package/example-web/react2/src/components/BoostsComponent.tsx +6 -13
  12. package/example-web/react2/src/components/BoothsComponent.tsx +52 -20
  13. package/example-web/react2/src/components/BoxesComponent.tsx +17 -24
  14. package/example-web/react2/src/components/BuffsComponent.tsx +35 -13
  15. package/example-web/react2/src/components/CharmsComponent.tsx +25 -30
  16. package/example-web/react2/src/components/CurrencyComponent.tsx +37 -44
  17. package/example-web/react2/src/components/DynamicCollectionConfigData.tsx +23 -4
  18. package/example-web/react2/src/components/EggsComponent.tsx +39 -44
  19. package/example-web/react2/src/components/EnchantsComponent.tsx +43 -34
  20. package/example-web/react2/src/components/FishingRodsComponent.tsx +23 -30
  21. package/example-web/react2/src/components/Footer.tsx +80 -16
  22. package/example-web/react2/src/components/FruitsComponent.tsx +18 -25
  23. package/example-web/react2/src/components/GenericFetchComponent.tsx +31 -21
  24. package/example-web/react2/src/components/GuildBattlesComponent.tsx +86 -65
  25. package/example-web/react2/src/components/HomePage.tsx +3 -1
  26. package/example-web/react2/src/components/HoverboardsComponent.tsx +100 -36
  27. package/example-web/react2/src/components/LootboxesComponent.tsx +8 -15
  28. package/example-web/react2/src/components/MasteryComponent.tsx +17 -24
  29. package/example-web/react2/src/components/MerchantsComponent.tsx +16 -23
  30. package/example-web/react2/src/components/MiscItemsComponent.tsx +32 -25
  31. package/example-web/react2/src/components/PetsComponent.tsx +74 -44
  32. package/example-web/react2/src/components/PotionsComponent.tsx +37 -36
  33. package/example-web/react2/src/components/RandomEventsComponent.tsx +30 -35
  34. package/example-web/react2/src/components/RanksComponent.tsx +58 -67
  35. package/example-web/react2/src/components/RarityComponent.tsx +7 -14
  36. package/example-web/react2/src/components/RebirthsComponent.tsx +20 -26
  37. package/example-web/react2/src/components/SecretRoomsComponent.tsx +6 -13
  38. package/example-web/react2/src/components/SeedsComponent.tsx +15 -22
  39. package/example-web/react2/src/components/ShovelsComponent.tsx +9 -16
  40. package/example-web/react2/src/components/SprinklersComponent.tsx +11 -18
  41. package/example-web/react2/src/components/UltimatesComponent.tsx +17 -24
  42. package/example-web/react2/src/components/UpgradesComponent.tsx +49 -54
  43. package/example-web/react2/src/components/WateringCansComponent.tsx +15 -19
  44. package/example-web/react2/src/components/WorldsComponent.tsx +16 -23
  45. package/example-web/react2/src/components/XPPotionsComponent.tsx +12 -19
  46. package/example-web/react2/src/components/ZoneFlagsComponent.tsx +15 -22
  47. package/example-web/react2/src/components/ZonesComponent.tsx +69 -69
  48. package/package.json +1 -1
  49. package/src/responses/collection/achievement.ts +2 -0
  50. package/src/responses/collection/guild-battle.ts +2 -4
  51. package/src/responses/collection/rank.ts +1 -0
  52. package/src/responses/collection/seed.ts +1 -0
  53. package/src/responses/exists.ts +2 -0
@@ -1,61 +1,91 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const PetsComponent: React.FC<{
7
- configData?: CollectionConfigData<"Pets">;
8
- }> = ({ configData }) => {
6
+ configData: CollectionConfigData<"Pets">;
7
+ displayType?: "all" | "specific";
8
+ pt?: number;
9
+ }> = ({ configData, displayType = "all", pt }) => {
10
+ const getVariationName = () => {
11
+ if (pt === 1) return "(Golden)";
12
+ if (pt === 2) return "(Rainbow)";
13
+ return "";
14
+ };
15
+
9
16
  return (
10
- <GenericFetchComponent<CollectionConfigData<"Pets">>
11
- collectionName="Pets"
12
- configData={configData}
13
- render={(data) => (
14
- <div>
15
- <h2>{data.name}</h2>
16
- <ImageComponent src={data.thumbnail} alt={data.name} />
17
- {data.goldenThumbnail && (
17
+ <div style={{ padding: "1em", border: "1px solid #ccc", borderRadius: "8px", backgroundColor: "#f9f9f9" }}>
18
+ <h2 style={{ borderBottom: "2px solid #ccc", paddingBottom: "0.5em" }}>
19
+ {configData.name} {getVariationName()}
20
+ </h2>
21
+ {displayType === "all" && (
22
+ <>
23
+ <ImageComponent src={configData.thumbnail} alt={configData.name} />
24
+ {configData.goldenThumbnail && (
18
25
  <ImageComponent
19
- src={data.goldenThumbnail}
20
- alt={`${data.name} (Golden)`}
26
+ src={configData.goldenThumbnail}
27
+ alt={`${configData.name} (Golden)`}
21
28
  />
22
29
  )}
23
- <p>From World Number: {data.fromWorldNumber}</p>
24
- <p>From Zone Number: {data.fromZoneNumber}</p>
25
- {data.indexObtainable && <p>Index Obtainable: Yes</p>}
26
- {data.huge && <p>Huge: Yes</p>}
27
- {data.fly && <p>Can Fly: Yes</p>}
28
- {data.tradable && <p>Tradable: Yes</p>}
29
- {data.secret && <p>Secret: Yes</p>}
30
- {data.hidden && <p>Hidden: Yes</p>}
31
- {data.cachedPower && (
32
- <div>
33
- <h3>Cached Power:</h3>
34
- <ul>
35
- {data.cachedPower.map((power, index) => (
36
- <li key={index}>{power}</li>
37
- ))}
38
- </ul>
30
+ </>
31
+ )}
32
+ {displayType === "specific" && (
33
+ <>
34
+ {pt === 1 && configData.goldenThumbnail ? (
35
+ <div style={{ minWidth: '250px' }}>
36
+ <ImageComponent
37
+ src={configData.goldenThumbnail}
38
+ alt={`${configData.name} (Golden)`}
39
+ />
39
40
  </div>
40
- )}
41
- {data.animations && (
42
- <div>
43
- <h3>Animations:</h3>
44
- <ul>
45
- {Object.entries(data.animations).map(([key, value], index) => (
46
- <li key={index}>
47
- {key}: {JSON.stringify(value)}
48
- </li>
49
- ))}
50
- </ul>
41
+ ) : (
42
+ <div style={{ minWidth: '250px', outline: pt === 2 ? '4px solid #FFD700' : 'none', borderRadius: '8px' }}>
43
+ <ImageComponent
44
+ src={configData.thumbnail}
45
+ alt={configData.name}
46
+ />
51
47
  </div>
52
48
  )}
53
- {data.indexDesc && <p>Description: {data.indexDesc}</p>}
54
- {data.exclusiveLevel && <p>Exclusive Level: {data.exclusiveLevel}</p>}
55
- {data.power && <p>Power: {data.power}</p>}
49
+ </>
50
+ )}
51
+ <p><strong>From World Number:</strong> {configData.fromWorldNumber}</p>
52
+ <p><strong>From Zone Number:</strong> {configData.fromZoneNumber}</p>
53
+ {configData.indexObtainable && <p><strong>Index Obtainable:</strong> Yes</p>}
54
+ {configData.huge && <p><strong>Huge:</strong> Yes</p>}
55
+ {configData.fly && <p><strong>Can Fly:</strong> Yes</p>}
56
+ {configData.tradable && <p><strong>Tradable:</strong> Yes</p>}
57
+ {configData.secret && <p><strong>Secret:</strong> Yes</p>}
58
+ {configData.hidden && <p><strong>Hidden:</strong> Yes</p>}
59
+ {configData.cachedPower && (
60
+ <div>
61
+ <h3>Cached Power:</h3>
62
+ <ul>
63
+ {configData.cachedPower.map((power, index) => (
64
+ <li key={index}>{power}</li>
65
+ ))}
66
+ </ul>
56
67
  </div>
57
68
  )}
58
- />
69
+ {configData.animations && (
70
+ <div>
71
+ <h3>Animations:</h3>
72
+ <ul>
73
+ {Object.entries(configData.animations).map(
74
+ ([key, value], index) => (
75
+ <li key={index}>
76
+ {key}: {JSON.stringify(value)}
77
+ </li>
78
+ ),
79
+ )}
80
+ </ul>
81
+ </div>
82
+ )}
83
+ {configData.indexDesc && <p><strong>Description:</strong> {configData.indexDesc}</p>}
84
+ {configData.exclusiveLevel && (
85
+ <p><strong>Exclusive Level:</strong> {configData.exclusiveLevel}</p>
86
+ )}
87
+ {configData.power && <p><strong>Power:</strong> {configData.power}</p>}
88
+ </div>
59
89
  );
60
90
  };
61
91
 
@@ -1,48 +1,49 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const PotionsComponent: React.FC<{
7
- configData?: CollectionConfigData<"Potions">;
6
+ configData: CollectionConfigData<"Potions">;
8
7
  }> = ({ configData }) => {
9
8
  return (
10
- <GenericFetchComponent<CollectionConfigData<"Potions">>
11
- collectionName="Potions"
12
- configData={configData}
13
- render={(data) => (
9
+ <div style={{ padding: "1em", border: "1px solid #ccc", borderRadius: "8px", backgroundColor: "#f9f9f9" }}>
10
+ <h2 style={{ borderBottom: "2px solid #ccc", paddingBottom: "0.5em" }}>
11
+ Potion: {configData.Tiers[0].DisplayName}
12
+ </h2>
13
+ <div style={{ display: 'flex', gap: '1em' }}>
14
+ <div style={{ minWidth: '250px' }}>
15
+ <ImageComponent
16
+ src={configData.Tiers[0].Icon}
17
+ alt={configData.Tiers[0].DisplayName}
18
+ />
19
+ </div>
14
20
  <div>
15
- <h2>Potion: {data.Tiers[0].DisplayName}</h2>
16
- <div>
17
- <ImageComponent
18
- src={data.Tiers[0].Icon}
19
- alt={data.Tiers[0].DisplayName}
20
- />
21
- <p>Description: {data.Tiers[0].Desc}</p>
22
- <p>Primary Color: {data.PrimaryColor}</p>
23
- <p>Secondary Color: {data.SecondaryColor}</p>
24
- <p>Base Tier: {data.BaseTier}</p>
25
- <p>Max Tier: {data.MaxTier}</p>
26
- </div>
27
- <div>
28
- <h3>Tiers:</h3>
29
- <ul>
30
- {data.Tiers.map((tier, index) => (
31
- <li key={index}>
32
- <p>Tier {index + 1}:</p>
33
- <p>Display Name: {tier.DisplayName}</p>
34
- <p>Description: {tier.Desc}</p>
35
- <ImageComponent src={tier.Icon} alt={tier.DisplayName} />
36
- <p>Power: {tier.Power}</p>
37
- <p>Time: {tier.Time}</p>
38
- <p>Rarity: {tier.Rarity.DisplayName}</p>
39
- </li>
40
- ))}
41
- </ul>
42
- </div>
21
+ <p><strong>Description:</strong> {configData.Tiers[0].Desc}</p>
22
+ <p><strong>Primary Color:</strong> {configData.PrimaryColor}</p>
23
+ <p><strong>Secondary Color:</strong> {configData.SecondaryColor}</p>
24
+ <p><strong>Base Tier:</strong> {configData.BaseTier}</p>
25
+ <p><strong>Max Tier:</strong> {configData.MaxTier}</p>
26
+ </div>
27
+ </div>
28
+ <div style={{ marginTop: '1em' }}>
29
+ <h3>Tiers:</h3>
30
+ <div style={{ display: 'flex', flexWrap: 'wrap', gap: '1em' }}>
31
+ {configData.Tiers.map((tier, index) => (
32
+ <div key={index} style={{ border: '1px solid #ccc', borderRadius: '8px', padding: '1em', flex: '1 1 calc(33% - 1em)', boxSizing: 'border-box' }}>
33
+ <p><strong>Tier {index + 1}:</strong></p>
34
+ <p><strong>Display Name:</strong> {tier.DisplayName}</p>
35
+ <p><strong>Description:</strong> {tier.Desc}</p>
36
+ <div style={{ minWidth: '250px' }}>
37
+ <ImageComponent src={tier.Icon} alt={tier.DisplayName} />
38
+ </div>
39
+ <p><strong>Power:</strong> {tier.Power}</p>
40
+ <p><strong>Time:</strong> {tier.Time}</p>
41
+ <p><strong>Rarity:</strong> {tier.Rarity.DisplayName}</p>
42
+ </div>
43
+ ))}
43
44
  </div>
44
- )}
45
- />
45
+ </div>
46
+ </div>
46
47
  );
47
48
  };
48
49
 
@@ -1,45 +1,40 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const RandomEventsComponent: React.FC<{
7
- configData?: CollectionConfigData<"RandomEvents">;
6
+ configData: CollectionConfigData<"RandomEvents">;
8
7
  }> = ({ configData }) => {
9
8
  return (
10
- <GenericFetchComponent<CollectionConfigData<"RandomEvents">>
11
- collectionName="RandomEvents"
12
- configData={configData}
13
- render={(data) => (
14
- <div>
15
- <h2>Random Event: {data.Name}</h2>
16
- <div>
17
- <ImageComponent src={data.Icon} alt={data.Name} />
18
- <p>Color: {data.Color}</p>
19
- <p>Duration: {data.Duration} seconds</p>
20
- <p>Breaking Requirement: {data.BreakingRequirement}</p>
21
- <p>Playtime Requirement: {data.PlaytimeRequirement} minutes</p>
22
- <p>Chance: {data.Chance}</p>
23
- <p>Allow in Zones: {data.AllowInZones ? "Yes" : "No"}</p>
24
- <p>Allow in Instances: {data.AllowInInstances ? "Yes" : "No"}</p>
25
- <p>Allow Multiple: {data.AllowMultiple ? "Yes" : "No"}</p>
26
- {data.MinimumZone && <p>Minimum Zone: {data.MinimumZone}</p>}
27
- </div>
28
- <div>
29
- <h3>Area Whitelist:</h3>
30
- <ul>
31
- {Object.entries(data.AreaWhitelist).map(
32
- ([area, allowed], index) => (
33
- <li key={index}>
34
- {area.replace("_", " ")}: {allowed ? "Yes" : "No"}
35
- </li>
36
- ),
37
- )}
38
- </ul>
39
- </div>
40
- </div>
41
- )}
42
- />
9
+ <div>
10
+ <h2>Random Event: {configData.Name}</h2>
11
+ <div>
12
+ <ImageComponent src={configData.Icon} alt={configData.Name} />
13
+ <p>Color: {configData.Color}</p>
14
+ <p>Duration: {configData.Duration} seconds</p>
15
+ <p>Breaking Requirement: {configData.BreakingRequirement}</p>
16
+ <p>Playtime Requirement: {configData.PlaytimeRequirement} minutes</p>
17
+ <p>Chance: {configData.Chance}</p>
18
+ <p>Allow in Zones: {configData.AllowInZones ? "Yes" : "No"}</p>
19
+ <p>Allow in Instances: {configData.AllowInInstances ? "Yes" : "No"}</p>
20
+ <p>Allow Multiple: {configData.AllowMultiple ? "Yes" : "No"}</p>
21
+ {configData.MinimumZone && (
22
+ <p>Minimum Zone: {configData.MinimumZone}</p>
23
+ )}
24
+ </div>
25
+ <div>
26
+ <h3>Area Whitelist:</h3>
27
+ <ul>
28
+ {Object.entries(configData.AreaWhitelist).map(
29
+ ([area, allowed], index) => (
30
+ <li key={index}>
31
+ {area.replace("_", " ")}: {allowed ? "Yes" : "No"}
32
+ </li>
33
+ ),
34
+ )}
35
+ </ul>
36
+ </div>
37
+ </div>
43
38
  );
44
39
  };
45
40
 
@@ -1,86 +1,77 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
 
5
4
  const RanksComponent: React.FC<{
6
- configData?: CollectionConfigData<"Ranks">;
5
+ configData: CollectionConfigData<"Ranks">;
7
6
  }> = ({ configData }) => {
8
7
  return (
9
- <GenericFetchComponent<CollectionConfigData<"Ranks">>
10
- collectionName="Ranks"
11
- configData={configData}
12
- render={(data) => (
13
- <div>
14
- <h2>Rank: {data.Title}</h2>
15
- <p>Rank Number: {data.RankNumber}</p>
16
- <p>Max Enchants Equipped: {data.MaxEnchantsEquipped}</p>
17
- <p>Maximum Active Goals: {data.MaximumActiveGoals}</p>
18
- <p>Unlockable Egg Slots: {data.UnlockableEggSlots}</p>
19
- <p>Unlockable Pet Slots: {data.UnlockablePetSlots}</p>
20
- {data.RequiredRebirth && (
21
- <p>Required Rebirth: {data.RequiredRebirth}</p>
22
- )}
23
- {data.RequiredZone && <p>Required Zone: {data.RequiredZone}</p>}
24
-
25
- <div>
26
- <h3>Goals:</h3>
27
- {data.Goals.map((goalSet, index) => (
28
- <div key={index}>
29
- <h4>Goal Set {index + 1}</h4>
30
- <ul>
31
- {goalSet.map((goal, goalIndex) => (
32
- <li key={goalIndex}>
33
- <p>Type: {goal.Type}</p>
34
- <p>Amount: {goal.Amount}</p>
35
- <p>Weight: {goal.Weight}</p>
36
- {goal.CurrencyID && <p>Currency ID: {goal.CurrencyID}</p>}
37
- {goal.BreakableType && (
38
- <p>Breakable Type: {goal.BreakableType}</p>
39
- )}
40
- {goal.PotionTier && <p>Potion Tier: {goal.PotionTier}</p>}
41
- {goal.EnchantTier && (
42
- <p>Enchant Tier: {goal.EnchantTier}</p>
43
- )}
44
- </li>
45
- ))}
46
- </ul>
47
- </div>
48
- ))}
49
- </div>
8
+ <div>
9
+ <h2>Rank: {configData.Title}</h2>
10
+ <p>Rank Number: {configData.RankNumber}</p>
11
+ <p>Max Enchants Equipped: {configData.MaxEnchantsEquipped}</p>
12
+ <p>Maximum Active Goals: {configData.MaximumActiveGoals}</p>
13
+ <p>Unlockable Egg Slots: {configData.UnlockableEggSlots}</p>
14
+ <p>Unlockable Pet Slots: {configData.UnlockablePetSlots}</p>
15
+ {configData.RequiredRebirth && (
16
+ <p>Required Rebirth: {configData.RequiredRebirth}</p>
17
+ )}
18
+ {configData.RequiredZone && (
19
+ <p>Required Zone: {configData.RequiredZone}</p>
20
+ )}
50
21
 
51
- <div>
52
- <h3>Rewards:</h3>
22
+ <div>
23
+ <h3>Goals:</h3>
24
+ {configData.Goals.map((goalSet, index) => (
25
+ <div key={index}>
26
+ <h4>Goal Set {index + 1}</h4>
53
27
  <ul>
54
- {data.Rewards.map((reward, rewardIndex) => (
55
- <li key={rewardIndex}>
56
- <p>Stars Required: {reward.StarsRequired}</p>
57
- <p>Reward Item ID: {reward.Item._data.id}</p>
58
- {reward.Item._data._am && (
59
- <p>Amount: {reward.Item._data._am}</p>
28
+ {goalSet.map((goal, goalIndex) => (
29
+ <li key={goalIndex}>
30
+ <p>Type: {goal.Type}</p>
31
+ <p>Amount: {goal.Amount}</p>
32
+ <p>Weight: {goal.Weight}</p>
33
+ {goal.CurrencyID && <p>Currency ID: {goal.CurrencyID}</p>}
34
+ {goal.BreakableType && (
35
+ <p>Breakable Type: {goal.BreakableType}</p>
60
36
  )}
61
- {reward.Item._data.tn && <p>TN: {reward.Item._data.tn}</p>}
37
+ {goal.PotionTier && <p>Potion Tier: {goal.PotionTier}</p>}
38
+ {goal.EnchantTier && <p>Enchant Tier: {goal.EnchantTier}</p>}
62
39
  </li>
63
40
  ))}
64
41
  </ul>
65
42
  </div>
43
+ ))}
44
+ </div>
45
+
46
+ <div>
47
+ <h3>Rewards:</h3>
48
+ <ul>
49
+ {configData.Rewards.map((reward, rewardIndex) => (
50
+ <li key={rewardIndex}>
51
+ <p>Stars Required: {reward.StarsRequired}</p>
52
+ <p>Reward Item ID: {reward.Item._data.id}</p>
53
+ {reward.Item._data._am && <p>Amount: {reward.Item._data._am}</p>}
54
+ {reward.Item._data.tn && <p>TN: {reward.Item._data.tn}</p>}
55
+ </li>
56
+ ))}
57
+ </ul>
58
+ </div>
66
59
 
67
- {data.RankUpRewards && (
68
- <div>
69
- <h3>Rank Up Rewards:</h3>
70
- <ul>
71
- {data.RankUpRewards.map((reward, rewardIndex) => (
72
- <li key={rewardIndex}>
73
- <p>Reward Item ID: {reward._data.id}</p>
74
- {reward._data._am && <p>Amount: {reward._data._am}</p>}
75
- {reward._data.tn && <p>TN: {reward._data.tn}</p>}
76
- </li>
77
- ))}
78
- </ul>
79
- </div>
80
- )}
60
+ {configData.RankUpRewards && (
61
+ <div>
62
+ <h3>Rank Up Rewards:</h3>
63
+ <ul>
64
+ {configData.RankUpRewards.map((reward, rewardIndex) => (
65
+ <li key={rewardIndex}>
66
+ <p>Reward Item ID: {reward._data.id}</p>
67
+ {reward._data._am && <p>Amount: {reward._data._am}</p>}
68
+ {reward._data.tn && <p>TN: {reward._data.tn}</p>}
69
+ </li>
70
+ ))}
71
+ </ul>
81
72
  </div>
82
73
  )}
83
- />
74
+ </div>
84
75
  );
85
76
  };
86
77
 
@@ -1,23 +1,16 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
 
5
4
  const RarityComponent: React.FC<{
6
- configData?: CollectionConfigData<"Rarity">;
5
+ configData: CollectionConfigData<"Rarity">;
7
6
  }> = ({ configData }) => {
8
7
  return (
9
- <GenericFetchComponent<CollectionConfigData<"Rarity">>
10
- collectionName="Rarity"
11
- configData={configData}
12
- render={(data) => (
13
- <div>
14
- <h2>Rarity: {data.DisplayName}</h2>
15
- <p>Rarity Number: {data.RarityNumber}</p>
16
- <p>Color: {data.Color}</p>
17
- <p>Announce: {data.Announce ? "Yes" : "No"}</p>
18
- </div>
19
- )}
20
- />
8
+ <div>
9
+ <h2>Rarity: {configData.DisplayName}</h2>
10
+ <p>Rarity Number: {configData.RarityNumber}</p>
11
+ <p>Color: {configData.Color}</p>
12
+ <p>Announce: {configData.Announce ? "Yes" : "No"}</p>
13
+ </div>
21
14
  );
22
15
  };
23
16
 
@@ -1,36 +1,30 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData, RebirthUnlock } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const RebirthComponent: React.FC<{
7
- configData?: CollectionConfigData<"Rebirths">;
6
+ configData: CollectionConfigData<"Rebirths">;
8
7
  }> = ({ configData }) => {
9
8
  return (
10
- <GenericFetchComponent<CollectionConfigData<"Rebirths">>
11
- collectionName="Rebirths"
12
- configData={configData}
13
- render={(data) => (
14
- <div>
15
- <h2>Rebirth: {data.DisplayName}</h2>
16
- <p>Rebirth Number: {data.RebirthNumber}</p>
17
- <p>Zone Number Required: {data.ZoneNumberRequired}</p>
18
- <p>Strength Power Boost: {data.StrengthPowerBoost}%</p>
19
- <p>Boost Description: {data.BoostDesc}</p>
20
- {data.ResetZone && <p>Reset Zone: {data.ResetZone}</p>}
21
- <h3>Unlocks:</h3>
22
- <ul>
23
- {data.RebirthUnlocks.map((unlock: RebirthUnlock, index: number) => (
24
- <li key={index}>
25
- <ImageComponent src={unlock.Icon} alt={unlock.Title} />
26
- <strong>{unlock.GuiTitle || unlock.Title}</strong>:{" "}
27
- {unlock.Desc}
28
- </li>
29
- ))}
30
- </ul>
31
- </div>
32
- )}
33
- />
9
+ <div>
10
+ <h2>Rebirth: {configData.DisplayName}</h2>
11
+ <p>Rebirth Number: {configData.RebirthNumber}</p>
12
+ <p>Zone Number Required: {configData.ZoneNumberRequired}</p>
13
+ <p>Strength Power Boost: {configData.StrengthPowerBoost}%</p>
14
+ <p>Boost Description: {configData.BoostDesc}</p>
15
+ {configData.ResetZone && <p>Reset Zone: {configData.ResetZone}</p>}
16
+ <h3>Unlocks:</h3>
17
+ <ul>
18
+ {configData.RebirthUnlocks.map(
19
+ (unlock: RebirthUnlock, index: number) => (
20
+ <li key={index}>
21
+ <ImageComponent src={unlock.Icon} alt={unlock.Title} />
22
+ <strong>{unlock.GuiTitle || unlock.Title}</strong>: {unlock.Desc}
23
+ </li>
24
+ ),
25
+ )}
26
+ </ul>
27
+ </div>
34
28
  );
35
29
  };
36
30
 
@@ -1,22 +1,15 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
 
5
4
  const SecretRoomComponent: React.FC<{
6
- configData?: CollectionConfigData<"SecretRooms">;
5
+ configData: CollectionConfigData<"SecretRooms">;
7
6
  }> = ({ configData }) => {
8
7
  return (
9
- <GenericFetchComponent<CollectionConfigData<"SecretRooms">>
10
- collectionName="SecretRooms"
11
- configData={configData}
12
- render={(data) => (
13
- <div>
14
- <h2>Secret Room: {data.DisplayName}</h2>
15
- <p>Instance ID: {data.InstanceId}</p>
16
- <p>Required Zone: {data.RequiredZone}</p>
17
- </div>
18
- )}
19
- />
8
+ <div>
9
+ <h2>Secret Room: {configData.DisplayName}</h2>
10
+ <p>Instance ID: {configData.InstanceId}</p>
11
+ <p>Required Zone: {configData.RequiredZone}</p>
12
+ </div>
20
13
  );
21
14
  };
22
15
 
@@ -6,7 +6,6 @@ import {
6
6
  RawStackKey,
7
7
  LootTableData,
8
8
  } from "ps99-api";
9
- import { GenericFetchComponent } from "./GenericFetchComponent";
10
9
  import ImageComponent from "./ImageComponent";
11
10
 
12
11
  const parseRawStackKey = (rawStackKey: RawStackKey): LootTableData => {
@@ -45,29 +44,23 @@ const renderLootTable = (lootTable: LootTableRoot | LootTableRoot[]) => {
45
44
  };
46
45
 
47
46
  const SeedComponent: React.FC<{
48
- configData?: CollectionConfigData<"Seeds">;
47
+ configData: CollectionConfigData<"Seeds">;
49
48
  }> = ({ configData }) => {
50
49
  return (
51
- <GenericFetchComponent<CollectionConfigData<"Seeds">>
52
- collectionName="Seeds"
53
- configData={configData}
54
- render={(data) => (
55
- <div>
56
- <h2>Seed: {data.DisplayName}</h2>
57
- <p>Description: {data.Desc}</p>
58
- <p>Grow Time: {data.GrowTime} seconds</p>
59
- <p>
60
- Rarity: {data.Rarity.DisplayName} (Rarity Number:{" "}
61
- {data.Rarity.RarityNumber})
62
- </p>
63
- <ImageComponent src={data.Icon} alt={data.DisplayName} />
64
- <div>
65
- <h3>Loot Table</h3>
66
- {renderLootTable(data.LootTable)}
67
- </div>
68
- </div>
69
- )}
70
- />
50
+ <div>
51
+ <h2>Seed: {configData.DisplayName}</h2>
52
+ <p>Description: {configData.Desc}</p>
53
+ <p>Grow Time: {configData.GrowTime} seconds</p>
54
+ <p>
55
+ Rarity: {configData.Rarity.DisplayName} (Rarity Number:{" "}
56
+ {configData.Rarity.RarityNumber})
57
+ </p>
58
+ <ImageComponent src={configData.Icon} alt={configData.DisplayName} />
59
+ <div>
60
+ <h3>Loot Table</h3>
61
+ {renderLootTable(configData.LootTable)}
62
+ </div>
63
+ </div>
71
64
  );
72
65
  };
73
66