mirror of
https://git.srhtnin.garden/sarah/srhtnin.github.io.git
synced 2026-10-14 02:38:12 +02:00
Added effects engine.
This commit is contained in:
1 parent
132aba0b9a
commit
9de8af0d2b
9 files changed
+1684
-12
No files matched your search
@@ -1669,11 +1669,35 @@ function CreatePlotElement(
|
||||
Plant
|
||||
);
|
||||
|
||||
const CooldownState =
|
||||
Progress >= 1 &&
|
||||
typeof GetFunctionalPlantCooldownDisplayState ===
|
||||
"function"
|
||||
? GetFunctionalPlantCooldownDisplayState(
|
||||
Plot,
|
||||
Plant,
|
||||
GetSimulationTime(
|
||||
GameSave
|
||||
)
|
||||
)
|
||||
: null;
|
||||
|
||||
const BorderProgress =
|
||||
CooldownState === null
|
||||
? Progress
|
||||
: CooldownState.Progress;
|
||||
|
||||
Tile.style.setProperty(
|
||||
"--GrowthProgress",
|
||||
`${Progress * 100}%`
|
||||
`${BorderProgress * 100}%`
|
||||
);
|
||||
|
||||
if (CooldownState !== null) {
|
||||
Tile.classList.add(
|
||||
"GardenPlotFunctionalCooldown"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const ImagePath =
|
||||
GetPlantImage(
|
||||
@@ -2004,6 +2028,31 @@ function CreateGardenPlotTimer(
|
||||
}
|
||||
|
||||
|
||||
if (
|
||||
Progress >= 1 &&
|
||||
typeof GetFunctionalPlantCooldownDisplayState ===
|
||||
"function"
|
||||
) {
|
||||
const CooldownState =
|
||||
GetFunctionalPlantCooldownDisplayState(
|
||||
Plot,
|
||||
Plant,
|
||||
GetSimulationTime(
|
||||
GameSave
|
||||
)
|
||||
);
|
||||
|
||||
if (CooldownState !== null) {
|
||||
Timer.textContent =
|
||||
FormatGardenRemainingTime(
|
||||
CooldownState.Remaining
|
||||
);
|
||||
|
||||
return Timer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Progress >= 1) {
|
||||
Timer.textContent =
|
||||
"Ready";
|
||||
|
||||
Reference in new issue
Block a user