Regression
* Revert cache for seeded randomisation due to the loss of seeded randomisation when functools.cache decorator is present
This commit is contained in:
parent
51877952d4
commit
4e01b71a99
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user