Weighted entity picks are now seeded
This commit is contained in:
parent
8c2a3f2bff
commit
6725c4ae0c
@ -171,4 +171,7 @@ def pickEntity(player, map):
|
||||
if not finalEntities:
|
||||
# If all items are gone, pick random one
|
||||
finalEntities = map.getInteractablesByClassifier()
|
||||
return random.choices(finalEntities, finalWeights)[0]
|
||||
random.seed(10)
|
||||
choice = random.choices(finalEntities, finalWeights)[0]
|
||||
random.seed()
|
||||
return choice
|
||||
|
Loading…
Reference in New Issue
Block a user