mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Spectator: fix data type
This commit is contained in:
@@ -12,7 +12,7 @@ STATE_ERROR = -1
|
|||||||
class Slot(db.Entity):
|
class Slot(db.Entity):
|
||||||
id = PrimaryKey(int, auto=True)
|
id = PrimaryKey(int, auto=True)
|
||||||
player_id = Required(int)
|
player_id = Required(int)
|
||||||
player_name = Required(str, 16)
|
player_name = Required(str)
|
||||||
data = Optional(bytes, lazy=True)
|
data = Optional(bytes, lazy=True)
|
||||||
seed = Optional('Seed')
|
seed = Optional('Seed')
|
||||||
game = Required(str)
|
game = Required(str)
|
||||||
|
@@ -4,6 +4,7 @@ import logging
|
|||||||
from BaseClasses import Item
|
from BaseClasses import Item
|
||||||
|
|
||||||
from ..AutoWorld import World
|
from ..AutoWorld import World
|
||||||
|
from NetUtils import SlotType
|
||||||
|
|
||||||
|
|
||||||
class GenericWorld(World):
|
class GenericWorld(World):
|
||||||
@@ -19,7 +20,7 @@ class GenericWorld(World):
|
|||||||
hidden = True
|
hidden = True
|
||||||
|
|
||||||
def generate_early(self):
|
def generate_early(self):
|
||||||
self.world.player_types[self.player] = 0 # mark as spectator
|
self.world.player_types[self.player] = SlotType.spectator # mark as spectator
|
||||||
|
|
||||||
def create_item(self, name: str) -> Item:
|
def create_item(self, name: str) -> Item:
|
||||||
if name == "Nothing":
|
if name == "Nothing":
|
||||||
|
Reference in New Issue
Block a user