Regression

* Revert cache for seeded randomisation due to the loss of seeded randomisation when functools.cache decorator is present
This commit is contained in:
LoafyLemon 2024-04-27 01:05:53 +01:00
parent 51877952d4
commit 4e01b71a99
1 changed files with 2 additions and 2 deletions

View File

@ -101,10 +101,10 @@ init python:
def seed(self):
return self._seed
@functools.lru_cache(maxsize=35)
# @functools.cache # <-- Causes side effects
def _random(self, day):
seed = self.seed + day
return renpy.random.Random(seed)
return renpy.random.Random(seed=seed)
@property
def random(self):