forked from ArchipelagoMW/Archipelago
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KH2: New Unit Test and better keyblade fill (ArchipelagoMW#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
- Loading branch information
1 parent
62a265c
commit 06a25a9
Showing
3 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |