Added cost and sorting based on cost to encyclopedia. Weird that I

forgot it earlier..
This commit is contained in:
sarah committed 2026-09-05 22:01:18 +02:00
1 parent 96473be21b
commit b583c09baf
2 files changed
+44

No files matched your search

+42
View File
@@ -244,6 +244,32 @@ function ComparePlantEncyclopediaPlants(
-1
) || A.Id - B.Id;
case "CostAsc":
return ComparePlantEncyclopediaNumbers(
GetPlantShopCost(
PlantEncyclopediaSave,
A.Id
),
GetPlantShopCost(
PlantEncyclopediaSave,
B.Id
),
1
) || A.Id - B.Id;
case "CostDesc":
return ComparePlantEncyclopediaNumbers(
GetPlantShopCost(
PlantEncyclopediaSave,
A.Id
),
GetPlantShopCost(
PlantEncyclopediaSave,
B.Id
),
-1
) || A.Id - B.Id;
case "RewardAsc":
return ComparePlantEncyclopediaNumbers(
GetPlantHarvestReward(
@@ -553,6 +579,12 @@ function CreatePlantEncyclopediaDetails(
);
const Cost =
GetPlantShopCost(
PlantEncyclopediaSave,
Plant.Id
);
const Reward =
GetPlantHarvestReward(
PlantEncyclopediaSave,
@@ -565,6 +597,16 @@ function CreatePlantEncyclopediaDetails(
Plant.Id
);
Details.appendChild(
CreatePlantEncyclopediaStat(
"Cost",
Cost === null
? "Unavailable"
: Cost.toLocaleString() +
" Dew"
)
);
Details.appendChild(
CreatePlantEncyclopediaStat(
"Reward",