mirror of
https://github.com/Steffo99/lihzahrd.git
synced 2024-11-21 15:44:24 +00:00
Fix more missing flags
This commit is contained in:
parent
7e5bc78006
commit
04c607aa0c
4 changed files with 19 additions and 9 deletions
|
@ -27,6 +27,7 @@ class BossesDefeated:
|
||||||
santa_nk1: bool,
|
santa_nk1: bool,
|
||||||
everscream: bool,
|
everscream: bool,
|
||||||
martian_madness: bool,
|
martian_madness: bool,
|
||||||
|
lunatic_cultist: bool,
|
||||||
lunar_pillars: PillarsInfo,
|
lunar_pillars: PillarsInfo,
|
||||||
old_ones_army: OldOnesArmyTiers):
|
old_ones_army: OldOnesArmyTiers):
|
||||||
self.eye_of_cthulhu: bool = eye_of_cthulhu
|
self.eye_of_cthulhu: bool = eye_of_cthulhu
|
||||||
|
@ -55,6 +56,7 @@ class BossesDefeated:
|
||||||
self.santa_nk1: bool = santa_nk1
|
self.santa_nk1: bool = santa_nk1
|
||||||
self.everscream: bool = everscream
|
self.everscream: bool = everscream
|
||||||
self.martian_madness: bool = martian_madness
|
self.martian_madness: bool = martian_madness
|
||||||
|
self.lunatic_cultist: bool = lunatic_cultist
|
||||||
self.lunar_pillars: PillarsInfo = lunar_pillars
|
self.lunar_pillars: PillarsInfo = lunar_pillars
|
||||||
self.old_ones_army: OldOnesArmyTiers = old_ones_army
|
self.old_ones_army: OldOnesArmyTiers = old_ones_army
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ class HardmodeTier2Ore(enum.IntEnum):
|
||||||
|
|
||||||
class HardmodeTier3Ore(enum.IntEnum):
|
class HardmodeTier3Ore(enum.IntEnum):
|
||||||
NOT_DETERMINED = -1
|
NOT_DETERMINED = -1
|
||||||
NOT_DETERMINED_TOO = 16785407 # ???
|
|
||||||
ADAMANTITE = 111
|
ADAMANTITE = 111
|
||||||
TITANIUM = 223
|
TITANIUM = 223
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import uuid
|
import uuid
|
||||||
import math
|
import math
|
||||||
import typing
|
import typing
|
||||||
import multiprocessing
|
|
||||||
from .fileutils import *
|
from .fileutils import *
|
||||||
from .header import *
|
from .header import *
|
||||||
from .tiles import *
|
from .tiles import *
|
||||||
|
@ -11,7 +10,6 @@ from .npcs import *
|
||||||
from .tileentities import *
|
from .tileentities import *
|
||||||
from .pressureplates import *
|
from .pressureplates import *
|
||||||
from .townmanager import *
|
from .townmanager import *
|
||||||
from .timer import Timer
|
|
||||||
from .errors import InvalidFooterError
|
from .errors import InvalidFooterError
|
||||||
|
|
||||||
|
|
||||||
|
@ -255,7 +253,7 @@ class World:
|
||||||
liquid = Liquid(type_=liquid_type, volume=fr.uint1())
|
liquid = Liquid(type_=liquid_type, volume=fr.uint1())
|
||||||
else:
|
else:
|
||||||
liquid = None
|
liquid = None
|
||||||
if rle_compression == RLEEncoding.DOUBLE_BYTE or rle_compression == RLEEncoding.UNKNOWN_3:
|
if rle_compression == RLEEncoding.DOUBLE_BYTE:
|
||||||
multiply_by = fr.uint2() + 1
|
multiply_by = fr.uint2() + 1
|
||||||
elif rle_compression == RLEEncoding.SINGLE_BYTE:
|
elif rle_compression == RLEEncoding.SINGLE_BYTE:
|
||||||
multiply_by = fr.uint1() + 1
|
multiply_by = fr.uint1() + 1
|
||||||
|
@ -391,9 +389,18 @@ class World:
|
||||||
|
|
||||||
rain = Rain(is_active=f.bool(), time_left=f.int4(), max_rain=f.single())
|
rain = Rain(is_active=f.bool(), time_left=f.int4(), max_rain=f.single())
|
||||||
|
|
||||||
hardmode_ore_1 = HardmodeTier1Ore(f.int4())
|
try:
|
||||||
hardmode_ore_2 = HardmodeTier2Ore(f.int4())
|
hardmode_ore_1 = HardmodeTier1Ore(f.int4())
|
||||||
hardmode_ore_3 = HardmodeTier3Ore(f.int4())
|
except ValueError:
|
||||||
|
hardmode_ore_1 = HardmodeTier1Ore.NOT_DETERMINED
|
||||||
|
try:
|
||||||
|
hardmode_ore_2 = HardmodeTier2Ore(f.int4())
|
||||||
|
except ValueError:
|
||||||
|
hardmode_ore_2 = HardmodeTier2Ore.NOT_DETERMINED
|
||||||
|
try:
|
||||||
|
hardmode_ore_3 = HardmodeTier3Ore(f.int4())
|
||||||
|
except ValueError:
|
||||||
|
hardmode_ore_3 = HardmodeTier3Ore.NOT_DETERMINED
|
||||||
altars_smashed = AltarsSmashed(count=smashed_altars_count,
|
altars_smashed = AltarsSmashed(count=smashed_altars_count,
|
||||||
ore_tier1=hardmode_ore_1,
|
ore_tier1=hardmode_ore_1,
|
||||||
ore_tier2=hardmode_ore_2,
|
ore_tier2=hardmode_ore_2,
|
||||||
|
@ -458,6 +465,7 @@ class World:
|
||||||
|
|
||||||
defeated_duke_fishron = f.bool()
|
defeated_duke_fishron = f.bool()
|
||||||
defeated_martian_madness = f.bool()
|
defeated_martian_madness = f.bool()
|
||||||
|
defeated_lunatic_cultist = f.bool()
|
||||||
defeated_moon_lord = f.bool()
|
defeated_moon_lord = f.bool()
|
||||||
defeated_pumpking = f.bool()
|
defeated_pumpking = f.bool()
|
||||||
defeated_mourning_wood = f.bool()
|
defeated_mourning_wood = f.bool()
|
||||||
|
@ -533,7 +541,8 @@ class World:
|
||||||
everscream=defeated_everscream,
|
everscream=defeated_everscream,
|
||||||
lunar_pillars=defeated_pillars,
|
lunar_pillars=defeated_pillars,
|
||||||
old_ones_army=old_ones_army,
|
old_ones_army=old_ones_army,
|
||||||
martian_madness=defeated_martian_madness)
|
martian_madness=defeated_martian_madness,
|
||||||
|
lunatic_cultist=defeated_lunatic_cultist)
|
||||||
|
|
||||||
unknown_world_header_data = f.read_until(pointers.world_tiles)
|
unknown_world_header_data = f.read_until(pointers.world_tiles)
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ with open("README.md", "r") as f:
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="lihzahrd",
|
name="lihzahrd",
|
||||||
version="1.0b3",
|
version="1.0b4",
|
||||||
author="Stefano Pigozzi",
|
author="Stefano Pigozzi",
|
||||||
author_email="ste.pigozzi@gmail.com",
|
author_email="ste.pigozzi@gmail.com",
|
||||||
description="A Terraria world parser in Python",
|
description="A Terraria world parser in Python",
|
||||||
|
|
Loading…
Reference in a new issue