Clean up imports
This commit is contained in:
parent
059946d59e
commit
e49d10ab22
|
@ -1,4 +1,4 @@
|
||||||
from BaseClasses import Region, Entrance, Location, MultiWorld, Item
|
from BaseClasses import Location
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
class AdvData(typing.NamedTuple):
|
class AdvData(typing.NamedTuple):
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
def link_minecraft_structures(world, player: int):
|
def link_minecraft_structures(world, player):
|
||||||
|
|
||||||
# Link mandatory connections first
|
# Link mandatory connections first
|
||||||
for (exit, region) in mandatory_connections:
|
for (exit, region) in mandatory_connections:
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
from ..generic.Rules import set_rule
|
from ..generic.Rules import set_rule
|
||||||
from .Locations import exclusion_table, events_table
|
from .Locations import exclusion_table, events_table
|
||||||
from BaseClasses import Region, Entrance, Location, MultiWorld, Item
|
|
||||||
from Options import AdvancementGoal
|
from Options import AdvancementGoal
|
||||||
|
|
||||||
def set_rules(world: MultiWorld, player: int):
|
def set_rules(world, player):
|
||||||
|
|
||||||
def reachable_locations(state):
|
def reachable_locations(state):
|
||||||
postgame_advancements = set(exclusion_table['postgame'].keys())
|
postgame_advancements = set(exclusion_table['postgame'].keys())
|
||||||
|
|
|
@ -73,13 +73,14 @@ class MinecraftWorld(World):
|
||||||
|
|
||||||
|
|
||||||
def generate_output(self):
|
def generate_output(self):
|
||||||
import base64, json
|
import json
|
||||||
|
from base64 import b64encode
|
||||||
from Utils import output_path
|
from Utils import output_path
|
||||||
|
|
||||||
data = self._get_mc_data()
|
data = self._get_mc_data()
|
||||||
filename = f"AP_{self.world.seed_name}_P{self.player}_{self.world.get_player_names(self.player)}.apmc"
|
filename = f"AP_{self.world.seed_name}_P{self.player}_{self.world.get_player_names(self.player)}.apmc"
|
||||||
with open(output_path(filename), 'wb') as f:
|
with open(output_path(filename), 'wb') as f:
|
||||||
f.write(base64.b64encode(bytes(json.dumps(data), 'utf-8')))
|
f.write(b64encode(bytes(json.dumps(data), 'utf-8')))
|
||||||
|
|
||||||
|
|
||||||
def fill_slot_data(self):
|
def fill_slot_data(self):
|
||||||
|
|
Loading…
Reference in New Issue