fix minecraft tests
This commit is contained in:
parent
6837cd2917
commit
fd811bfd1b
|
@ -1,8 +1,7 @@
|
||||||
from test.TestBase import TestBase
|
from test.TestBase import TestBase
|
||||||
from BaseClasses import MultiWorld
|
from BaseClasses import MultiWorld
|
||||||
from worlds.minecraft import minecraft_gen_item_pool
|
from worlds import AutoWorld
|
||||||
from worlds.minecraft.Regions import minecraft_create_regions, link_minecraft_structures
|
from worlds.minecraft import MinecraftWorld
|
||||||
from worlds.minecraft.Rules import set_rules
|
|
||||||
from worlds.minecraft.Items import MinecraftItem, item_table
|
from worlds.minecraft.Items import MinecraftItem, item_table
|
||||||
import Options
|
import Options
|
||||||
|
|
||||||
|
@ -28,16 +27,16 @@ class TestMinecraft(TestBase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.world = MultiWorld(1)
|
self.world = MultiWorld(1)
|
||||||
self.world.game[1] = "Minecraft"
|
self.world.game[1] = "Minecraft"
|
||||||
|
self.world.worlds[1] = MinecraftWorld(self.world, 1)
|
||||||
exclusion_pools = ['hard', 'insane', 'postgame']
|
exclusion_pools = ['hard', 'insane', 'postgame']
|
||||||
for pool in exclusion_pools:
|
for pool in exclusion_pools:
|
||||||
setattr(self.world, f"include_{pool}_advancements", [False, False])
|
setattr(self.world, f"include_{pool}_advancements", [False, False])
|
||||||
setattr(self.world, "advancement_goal", [0, Options.AdvancementGoal(value=30)])
|
setattr(self.world, "advancement_goal", {1: Options.AdvancementGoal(30)})
|
||||||
setattr(self.world, "shuffle_structures", [False, False])
|
setattr(self.world, "shuffle_structures", {1: False})
|
||||||
setattr(self.world, "combat_difficulty", [0, Options.CombatDifficulty(value=1)])
|
setattr(self.world, "combat_difficulty", {1: Options.CombatDifficulty(1)}) # normal
|
||||||
minecraft_create_regions(self.world, 1)
|
AutoWorld.call_single(self.world, "create_regions", 1)
|
||||||
link_minecraft_structures(self.world, 1)
|
AutoWorld.call_single(self.world, "generate_basic", 1)
|
||||||
minecraft_gen_item_pool(self.world, 1)
|
AutoWorld.call_single(self.world, "set_rules", 1)
|
||||||
set_rules(self.world, 1)
|
|
||||||
|
|
||||||
def _get_items(self, item_pool, all_except):
|
def _get_items(self, item_pool, all_except):
|
||||||
if all_except and len(all_except) > 0:
|
if all_except and len(all_except) > 0:
|
||||||
|
|
Loading…
Reference in New Issue