[SMZ3] player count fix (#346)
This commit is contained in:
parent
64ac619b46
commit
e0aa52ed27
|
@ -322,7 +322,7 @@ class Patch:
|
|||
|
||||
def ItemTablePatch(self, location: Location, itemId: int):
|
||||
itemtype = 0 if location.APLocation.item.player == location.Region.world.Id else 1
|
||||
owner = location.APLocation.item.player
|
||||
owner = location.APLocation.item.player if location.APLocation.item.player < 256 else 0
|
||||
return (0x386000 + (location.Id * 8), getWordArray(itemtype) + getWordArray(itemId) + getWordArray(owner))
|
||||
|
||||
def WriteDungeonMusic(self, keysanity: bool):
|
||||
|
@ -572,7 +572,7 @@ class Patch:
|
|||
|
||||
def WritePlayerNames(self):
|
||||
self.patches += [(0x385000 + (0 * 16), self.PlayerNameBytes("Archipelago"))]
|
||||
self.patches += [(0x385000 + (id * 16), self.PlayerNameBytes(name)) for name, id in self.playerNames.items()]
|
||||
self.patches += [(0x385000 + (id * 16), self.PlayerNameBytes(name)) for name, id in self.playerNames.items() if id < 256]
|
||||
|
||||
def PlayerNameBytes(self, name: str):
|
||||
name = (name[:16] if len(name) > 16 else name).center(16)
|
||||
|
|
|
@ -135,6 +135,10 @@ class SMZ3World(World):
|
|||
startRegion.exits.append(exit)
|
||||
exit.connect(currentRegion)
|
||||
|
||||
def get_required_client_version(self):
|
||||
# first added for 0.2.6
|
||||
return max(super(SMZ3World, self).get_required_client_version(), (0, 2, 6))
|
||||
|
||||
def apply_sm_custom_sprite(self):
|
||||
itemSprites = ["off_world_prog_item.bin", "off_world_item.bin"]
|
||||
itemSpritesAddress = [0xF800, 0xF900]
|
||||
|
|
Loading…
Reference in New Issue