mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
move more Factorio stuff around
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from BaseClasses import MultiWorld
|
||||
|
||||
|
||||
class AutoWorldRegister(type):
|
||||
world_types = {}
|
||||
|
||||
@@ -12,7 +13,7 @@ class AutoWorldRegister(type):
|
||||
|
||||
def call_single(world: MultiWorld, method_name: str, player: int):
|
||||
method = getattr(world.worlds[player], method_name)
|
||||
return method(world, player)
|
||||
return method()
|
||||
|
||||
|
||||
def call_all(world: MultiWorld, method_name: str):
|
||||
@@ -24,14 +25,22 @@ class World(metaclass=AutoWorldRegister):
|
||||
"""A World object encompasses a game's Items, Locations, Rules and additional data or functionality required.
|
||||
A Game should have its own subclass of World in which it defines the required data structures."""
|
||||
|
||||
def __init__(self, player: int):
|
||||
self.player = int
|
||||
world: MultiWorld
|
||||
player: int
|
||||
|
||||
def generate_basic(self, world: MultiWorld, player: int):
|
||||
def __init__(self, world: MultiWorld, player: int):
|
||||
self.world = world
|
||||
self.player = player
|
||||
|
||||
# overwritable methods that get called by Main.py
|
||||
def generate_basic(self):
|
||||
pass
|
||||
|
||||
def generate_output(self, world: MultiWorld, player: int):
|
||||
def set_rules(self):
|
||||
pass
|
||||
|
||||
def create_regions(self, world: MultiWorld, player: int):
|
||||
def create_regions(self):
|
||||
pass
|
||||
|
||||
def generate_output(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user