Spoiler: Don't double print if world overrides common options (#1505)
This commit is contained in:
parent
e3deb822ad
commit
738319462d
|
@ -2,20 +2,20 @@ from __future__ import annotations
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import functools
|
import functools
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
import secrets
|
import secrets
|
||||||
import typing # this can go away when Python 3.8 support is dropped
|
import typing # this can go away when Python 3.8 support is dropped
|
||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
from collections import OrderedDict, Counter, deque
|
from collections import OrderedDict, Counter, deque, ChainMap
|
||||||
from enum import unique, IntEnum, IntFlag
|
from enum import IntEnum, IntFlag
|
||||||
from typing import List, Dict, Optional, Set, Iterable, Union, Any, Tuple, TypedDict, Callable, NamedTuple
|
from typing import List, Dict, Optional, Set, Iterable, Union, Any, Tuple, TypedDict, Callable, NamedTuple
|
||||||
|
|
||||||
import NetUtils
|
import NetUtils
|
||||||
import Options
|
import Options
|
||||||
import Utils
|
import Utils
|
||||||
|
|
||||||
|
|
||||||
class Group(TypedDict, total=False):
|
class Group(TypedDict, total=False):
|
||||||
name: str
|
name: str
|
||||||
game: str
|
game: str
|
||||||
|
@ -1278,12 +1278,11 @@ class Spoiler():
|
||||||
if self.multiworld.players > 1:
|
if self.multiworld.players > 1:
|
||||||
outfile.write('\nPlayer %d: %s\n' % (player, self.multiworld.get_player_name(player)))
|
outfile.write('\nPlayer %d: %s\n' % (player, self.multiworld.get_player_name(player)))
|
||||||
outfile.write('Game: %s\n' % self.multiworld.game[player])
|
outfile.write('Game: %s\n' % self.multiworld.game[player])
|
||||||
for f_option, option in Options.per_game_common_options.items():
|
|
||||||
write_option(f_option, option)
|
options = ChainMap(Options.per_game_common_options, self.multiworld.worlds[player].option_definitions)
|
||||||
options = self.multiworld.worlds[player].option_definitions
|
|
||||||
if options:
|
|
||||||
for f_option, option in options.items():
|
for f_option, option in options.items():
|
||||||
write_option(f_option, option)
|
write_option(f_option, option)
|
||||||
|
|
||||||
AutoWorld.call_single(self.multiworld, "write_spoiler_header", player, outfile)
|
AutoWorld.call_single(self.multiworld, "write_spoiler_header", player, outfile)
|
||||||
|
|
||||||
if self.entrances:
|
if self.entrances:
|
||||||
|
|
Loading…
Reference in New Issue