mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
KH2: New Unit Test and better keyblade fill (#1744)
__init__: - Added exception for if the player has too many excluded abilities on keyblades. - Fixed Action Abilities only on keyblades from breaking. - Added proper support for ability quantity's instead of 1 of the ability - Moved filling the localitems slot data to init instead of generate_output so I could easily unit test it TestSlotData: - Checks if the "localItems" part of slot data is filled. This is used for keeping track of local items and making sure nothing dupes
This commit is contained in:
21
worlds/kh2/test/TestSlotData.py
Normal file
21
worlds/kh2/test/TestSlotData.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import unittest
|
||||
|
||||
from test.general import setup_solo_multiworld
|
||||
from . import KH2TestBase
|
||||
from .. import KH2World, all_locations, item_dictionary_table, CheckDupingItems, AllWeaponSlot, KH2Item
|
||||
from ..Names import ItemName
|
||||
from ... import AutoWorldRegister
|
||||
from ...AutoWorld import call_all
|
||||
|
||||
|
||||
class TestLocalItems(KH2TestBase):
|
||||
|
||||
def testSlotData(self):
|
||||
gen_steps = ("generate_early", "create_regions", "create_items", "set_rules", "generate_basic", "pre_fill")
|
||||
multiworld = setup_solo_multiworld(KH2World, gen_steps)
|
||||
for location in multiworld.get_locations():
|
||||
if location.item is None:
|
||||
location.place_locked_item(multiworld.worlds[1].create_item(ItemName.NoExperience))
|
||||
call_all(multiworld, "fill_slot_data")
|
||||
slotdata = multiworld.worlds[1].fill_slot_data()
|
||||
assert len(slotdata["LocalItems"]) > 0, f"{slotdata['LocalItems']} is empty"
|
Reference in New Issue
Block a user