Skip to content

Commit

Permalink
Subnautica: add free samples option
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 committed Apr 26, 2023
1 parent b704070 commit 9d40471
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion worlds/subnautica/Options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import typing

from Options import Choice, Range, DeathLink, DefaultOnToggle, StartInventoryPool
from Options import Choice, Range, DeathLink, Toggle, DefaultOnToggle, StartInventoryPool
from .Creatures import all_creatures, Definitions


Expand Down Expand Up @@ -35,6 +35,12 @@ class EarlySeaglide(DefaultOnToggle):
display_name = "Early Seaglide"


class FreeSamples(Toggle):
"""Get free items with your blueprints.
Items that can go into your inventory are awarded when you unlock their blueprint through Archipelago."""
display_name = "Free Samples"


class Goal(Choice):
"""Goal to complete.
Launch: Leave the planet.
Expand Down Expand Up @@ -100,6 +106,7 @@ class SubnauticaDeathLink(DeathLink):
options = {
"swim_rule": SwimRule,
"early_seaglide": EarlySeaglide,
"free_samples": FreeSamples,
"goal": Goal,
"creature_scans": CreatureScans,
"creature_scan_logic": AggressiveScanLogic,
Expand Down
3 changes: 2 additions & 1 deletion worlds/subnautica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SubnauticaWorld(World):
option_definitions = Options.options

data_version = 9
required_client_version = (0, 3, 9)
required_client_version = (0, 4, 0)

creatures_to_scan: List[str]

Expand Down Expand Up @@ -129,6 +129,7 @@ def fill_slot_data(self) -> Dict[str, Any]:
"vanilla_tech": vanilla_tech,
"creatures_to_scan": self.creatures_to_scan,
"death_link": self.multiworld.death_link[self.player].value,
"free_samples": self.multiworld.free_samples[self.player].value,
}

return slot_data
Expand Down

0 comments on commit 9d40471

Please sign in to comment.