mirror of
https://git.srhtnin.garden/sarah/srhtnin.github.io.git
synced 2026-10-14 10:48:12 +02:00
Added rotation to plots.. Only does stuff for functional plants.
This commit is contained in:
1 parent
75e4f31ccd
commit
132aba0b9a
14 files changed
+1244
-197
No files matched your search
+26
-3
@@ -15,7 +15,7 @@ const MaximumGardenNameLength = 32;
|
||||
const StartingGardenWidth = 4;
|
||||
const StartingGardenHeight = 4;
|
||||
|
||||
const CurrentSaveVersion = 6;
|
||||
const CurrentSaveVersion = 7;
|
||||
|
||||
|
||||
function CreateSimulationRandomState() {
|
||||
@@ -274,6 +274,20 @@ function NormalizeGardenData(
|
||||
Date.now()
|
||||
);
|
||||
|
||||
const ValidRotations = [
|
||||
"North",
|
||||
"East",
|
||||
"South",
|
||||
"West"
|
||||
];
|
||||
|
||||
Plot.Rotation =
|
||||
ValidRotations.includes(
|
||||
Plot.Rotation
|
||||
)
|
||||
? Plot.Rotation
|
||||
: "East";
|
||||
|
||||
delete Plot.VisualVariant;
|
||||
delete Plot.AddedTags;
|
||||
}
|
||||
@@ -571,7 +585,8 @@ function CreateNewSave() {
|
||||
GardenOverview: false,
|
||||
GardenEconomy: false,
|
||||
MutationHints: false,
|
||||
MutationHintsLevel: 0
|
||||
MutationHintsLevel: 0,
|
||||
Rotation: false
|
||||
},
|
||||
|
||||
Preferences: {
|
||||
@@ -584,7 +599,8 @@ function CreateNewSave() {
|
||||
ShowGrowingPlots: true,
|
||||
ShowReadyPlots: true,
|
||||
SelectQuickBoughtPlant: true,
|
||||
SelectTrowelWithInventoryPlant: true
|
||||
SelectTrowelWithInventoryPlant: true,
|
||||
ShowPlotRotation: true
|
||||
},
|
||||
|
||||
Gardens: [
|
||||
@@ -831,6 +847,9 @@ function NormalizeSaveData(
|
||||
SaveData.Upgrades.MutationHints ===
|
||||
true;
|
||||
|
||||
SaveData.Upgrades.Rotation =
|
||||
SaveData.Upgrades.Rotation === true;
|
||||
|
||||
SaveData.Upgrades.MutationHintsLevel =
|
||||
Math.max(
|
||||
0,
|
||||
@@ -888,6 +907,10 @@ function NormalizeSaveData(
|
||||
SaveData.Preferences.SelectTrowelWithInventoryPlant !==
|
||||
false;
|
||||
|
||||
SaveData.Preferences.ShowPlotRotation =
|
||||
SaveData.Preferences.ShowPlotRotation !==
|
||||
false;
|
||||
|
||||
|
||||
const LegacyGarden =
|
||||
SaveData.Garden ??
|
||||
|
||||
Reference in new issue
Block a user