mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: rename world to multiworld (#931)
* rename references to `Multiworld` in core to `multiworld` instead of `world` * fix smz3 * fix oot * fix low hanging fruit * revert mysteriously broken spacing in world api.md * fix more randomly broken spacing * hate * that better be all of it * begrudgingly move over smw * ._. * missed some worlds * this is getting tedious now * Missed some self.world definitions Co-authored-by: espeon65536 <espeon65536@gmail.com> Co-authored-by: Zach Parks <zach@alliware.com>
This commit is contained in:
@@ -43,7 +43,7 @@ class ArchipIDLEWorld(World):
|
||||
|
||||
def generate_basic(self):
|
||||
item_table_copy = list(item_table)
|
||||
self.world.random.shuffle(item_table_copy)
|
||||
self.multiworld.random.shuffle(item_table_copy)
|
||||
|
||||
item_pool = []
|
||||
for i in range(100):
|
||||
@@ -55,31 +55,31 @@ class ArchipIDLEWorld(World):
|
||||
)
|
||||
item_pool.append(item)
|
||||
|
||||
self.world.itempool += item_pool
|
||||
self.multiworld.itempool += item_pool
|
||||
|
||||
def set_rules(self):
|
||||
set_rules(self.world, self.player)
|
||||
set_rules(self.multiworld, self.player)
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
return Item(name, ItemClassification.progression, self.item_name_to_id[name], self.player)
|
||||
|
||||
def create_regions(self):
|
||||
self.world.regions += [
|
||||
create_region(self.world, self.player, 'Menu', None, ['Entrance to IDLE Zone']),
|
||||
create_region(self.world, self.player, 'IDLE Zone', self.location_name_to_id)
|
||||
self.multiworld.regions += [
|
||||
create_region(self.multiworld, self.player, 'Menu', None, ['Entrance to IDLE Zone']),
|
||||
create_region(self.multiworld, self.player, 'IDLE Zone', self.location_name_to_id)
|
||||
]
|
||||
|
||||
# link up our region with the entrance we just made
|
||||
self.world.get_entrance('Entrance to IDLE Zone', self.player)\
|
||||
.connect(self.world.get_region('IDLE Zone', self.player))
|
||||
self.multiworld.get_entrance('Entrance to IDLE Zone', self.player)\
|
||||
.connect(self.multiworld.get_region('IDLE Zone', self.player))
|
||||
|
||||
def get_filler_item_name(self) -> str:
|
||||
return self.world.random.choice(item_table)
|
||||
return self.multiworld.random.choice(item_table)
|
||||
|
||||
|
||||
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
|
||||
region = Region(name, RegionType.Generic, name, player)
|
||||
region.world = world
|
||||
region.multiworld = world
|
||||
if locations:
|
||||
for location_name in locations.keys():
|
||||
location = ArchipIDLELocation(player, location_name, locations[location_name], region)
|
||||
|
||||
Reference in New Issue
Block a user