Hookup weather to seeded randomiser
This commit is contained in:
parent
db86910a8e
commit
eb90a77262
@ -36,8 +36,7 @@ init python:
|
||||
if value is None or value == "random":
|
||||
period = Calendar.get_period()
|
||||
weights = Weather._interpolate_weights(states.env.day, period)
|
||||
rand = renpy.random.Random(seed=states.env.day)
|
||||
value = rand.choices(Weather.weather_types, weights=weights)[0]
|
||||
value = states.env.random.choices(Weather.weather_types, weights=weights)[0]
|
||||
|
||||
elif value not in Weather.weather_types:
|
||||
raise ValueError(f"Unsupported weather type: {value!r}")
|
||||
@ -54,7 +53,7 @@ init python:
|
||||
for i in range(span):
|
||||
day = start_day + i
|
||||
weights = Weather._interpolate_weights(day, period)
|
||||
rand = renpy.random.Random(seed=day)
|
||||
rand = states.env._random(day)
|
||||
value = rand.choices(Weather.weather_types, weights=weights)[0]
|
||||
|
||||
forecast[i] = value
|
||||
|
Loading…
Reference in New Issue
Block a user