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

View File

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