Subnautica: revamp aggressive creature scans (#966)

* add forgotten aggressive creatures
* fix logic requirements
* added option to opt out of aggressive creature scans
This commit is contained in:
Fabian Dill
2022-08-30 17:14:34 +02:00
committed by GitHub
parent 4a2a184db1
commit 60d1a27079
5 changed files with 78 additions and 18 deletions

View File

@@ -52,14 +52,15 @@ class SubnauticaWorld(World):
self.create_item("Seaglide Fragment"),
self.create_item("Seaglide Fragment")
]
if self.world.creature_scan_logic[self.player] == Options.AggressiveScanLogic.option_stasis:
valid_creatures = Creatures.all_creatures_presorted_without_containment
self.world.creature_scans[self.player].value = min(len(
Creatures.all_creatures_presorted_without_containment),
self.world.creature_scans[self.player].value)
else:
valid_creatures = Creatures.all_creatures_presorted
self.creatures_to_scan = self.world.random.sample(valid_creatures,
scan_option: Options.AggressiveScanLogic = self.world.creature_scan_logic[self.player]
creature_pool = scan_option.get_pool()
self.world.creature_scans[self.player].value = min(
len(creature_pool),
self.world.creature_scans[self.player].value
)
self.creatures_to_scan = self.world.random.sample(creature_pool,
self.world.creature_scans[self.player].value)
def create_regions(self):