LttP: Add Allow collect option, default Off. (#414)
* LttP: Add Allow collect option, default Off. * Add allow_collect to the sample yaml.
This commit is contained in:
@@ -299,6 +299,12 @@ class BeemizerTrapChance(BeemizerRange):
|
||||
display_name = "Beemizer Trap Chance"
|
||||
|
||||
|
||||
class AllowCollect(Toggle):
|
||||
"""Allows for !collect / co-op to auto-open chests containing items for other players.
|
||||
Off by default, because it currently crashes on real hardware."""
|
||||
display_name = "Allow Collection of checks for other players"
|
||||
|
||||
|
||||
alttp_options: typing.Dict[str, type(Option)] = {
|
||||
"crystals_needed_for_gt": CrystalsTower,
|
||||
"crystals_needed_for_ganon": CrystalsGanon,
|
||||
@@ -334,6 +340,6 @@ alttp_options: typing.Dict[str, type(Option)] = {
|
||||
"glitch_boots": DefaultOnToggle,
|
||||
"beemizer_total_chance": BeemizerTotalChance,
|
||||
"beemizer_trap_chance": BeemizerTrapChance,
|
||||
"death_link": DeathLink
|
||||
|
||||
"death_link": DeathLink,
|
||||
"allow_collect": AllowCollect
|
||||
}
|
||||
|
||||
@@ -1765,7 +1765,7 @@ def hud_format_text(text):
|
||||
|
||||
def apply_rom_settings(rom, beep, color, quickswap, menuspeed, music: bool, sprite: str, palettes_options,
|
||||
world=None, player=1, allow_random_on_event=False, reduceflashing=False,
|
||||
triforcehud: str = None, deathlink: bool = False):
|
||||
triforcehud: str = None, deathlink: bool = False, allowcollect: bool = False):
|
||||
local_random = random if not world else world.slot_seeds[player]
|
||||
disable_music: bool = not music
|
||||
# enable instant item menu
|
||||
@@ -1899,7 +1899,9 @@ def apply_rom_settings(rom, beep, color, quickswap, menuspeed, music: bool, spri
|
||||
elif palettes_options['dungeon'] == 'random':
|
||||
randomize_uw_palettes(rom, local_random)
|
||||
|
||||
rom.write_byte(0x18008D, int(deathlink))
|
||||
rom.write_byte(0x18008D, (0b00000001 if deathlink else 0) |
|
||||
# 0b00000010 is already used for death_link_allow_survive in super metroid.
|
||||
(0b00000100 if allowcollect else 0))
|
||||
|
||||
apply_random_sprite_on_event(rom, sprite, local_random, allow_random_on_event,
|
||||
world.sprite_pool[player] if world else [])
|
||||
|
||||
@@ -295,7 +295,8 @@ class ALTTPWorld(World):
|
||||
palettes_options, world, player, True,
|
||||
reduceflashing=world.reduceflashing[player] or world.is_race,
|
||||
triforcehud=world.triforcehud[player].current_key,
|
||||
deathlink=world.death_link[player])
|
||||
deathlink=world.death_link[player],
|
||||
allowcollect=world.allow_collect[player])
|
||||
|
||||
outfilepname = f'_P{player}'
|
||||
outfilepname += f"_{world.get_file_safe_player_name(player).replace(' ', '_')}" \
|
||||
@@ -324,7 +325,7 @@ class ALTTPWorld(World):
|
||||
multidata["connect_names"][new_name] = multidata["connect_names"][self.world.player_name[self.player]]
|
||||
|
||||
def get_required_client_version(self) -> tuple:
|
||||
return max((0, 3, 1), super(ALTTPWorld, self).get_required_client_version())
|
||||
return max((0, 3, 2), super(ALTTPWorld, self).get_required_client_version())
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
return ALttPItem(name, self.player, **as_dict_item_table[name])
|
||||
|
||||
Reference in New Issue
Block a user