mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
AHIT: Add start_inventory_from_pool and get_filler_item_name (#4798)
* Update __init__.py * Update Options.py
This commit is contained in:
@@ -2,7 +2,7 @@ from typing import List, TYPE_CHECKING, Dict, Any
|
|||||||
from schema import Schema, Optional
|
from schema import Schema, Optional
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from worlds.AutoWorld import PerGameCommonOptions
|
from worlds.AutoWorld import PerGameCommonOptions
|
||||||
from Options import Range, Toggle, DeathLink, Choice, OptionDict, DefaultOnToggle, OptionGroup
|
from Options import Range, Toggle, DeathLink, Choice, OptionDict, DefaultOnToggle, OptionGroup, StartInventoryPool
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from . import HatInTimeWorld
|
from . import HatInTimeWorld
|
||||||
@@ -625,6 +625,8 @@ class ParadeTrapWeight(Range):
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class AHITOptions(PerGameCommonOptions):
|
class AHITOptions(PerGameCommonOptions):
|
||||||
|
start_inventory_from_pool: StartInventoryPool
|
||||||
|
|
||||||
EndGoal: EndGoal
|
EndGoal: EndGoal
|
||||||
ActRandomizer: ActRandomizer
|
ActRandomizer: ActRandomizer
|
||||||
ActPlando: ActPlando
|
ActPlando: ActPlando
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from BaseClasses import Item, ItemClassification, Tutorial, Location, MultiWorld
|
from BaseClasses import Item, ItemClassification, Tutorial, Location, MultiWorld
|
||||||
from .Items import item_table, create_item, relic_groups, act_contracts, create_itempool, get_shop_trap_name, \
|
from .Items import item_table, create_item, relic_groups, act_contracts, create_itempool, get_shop_trap_name, \
|
||||||
calculate_yarn_costs, alps_hooks
|
calculate_yarn_costs, alps_hooks, junk_weights
|
||||||
from .Regions import create_regions, randomize_act_entrances, chapter_act_info, create_events, get_shuffled_region
|
from .Regions import create_regions, randomize_act_entrances, chapter_act_info, create_events, get_shuffled_region
|
||||||
from .Locations import location_table, contract_locations, is_location_valid, get_location_names, TASKSANITY_START_ID, \
|
from .Locations import location_table, contract_locations, is_location_valid, get_location_names, TASKSANITY_START_ID, \
|
||||||
get_total_locations
|
get_total_locations
|
||||||
@@ -78,6 +78,9 @@ class HatInTimeWorld(World):
|
|||||||
self.nyakuza_thug_items: Dict[str, int] = {}
|
self.nyakuza_thug_items: Dict[str, int] = {}
|
||||||
self.badge_seller_count: int = 0
|
self.badge_seller_count: int = 0
|
||||||
|
|
||||||
|
def get_filler_item_name(self) -> str:
|
||||||
|
return self.random.choices(list(junk_weights.keys()), weights=junk_weights.values(), k=1)[0]
|
||||||
|
|
||||||
def generate_early(self):
|
def generate_early(self):
|
||||||
adjust_options(self)
|
adjust_options(self)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user