1
Fork 0
mirror of https://github.com/Steffo99/lihzahrd.git synced 2024-11-25 01:24:21 +00:00

Handle hardmode ores sometimes having an unknown value

This commit is contained in:
Steffo 2019-08-20 14:49:32 +02:00
parent 89597079c0
commit abcd9aea57

View file

@ -378,9 +378,21 @@ 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())
try:
hardmode_ore_1 = HardmodeTier1Ore(f.int4()) hardmode_ore_1 = HardmodeTier1Ore(f.int4())
except ValueError:
hardmode_ore_1 = HardmodeTier1Ore.NOT_DETERMINED
try:
hardmode_ore_2 = HardmodeTier2Ore(f.int4()) hardmode_ore_2 = HardmodeTier2Ore(f.int4())
except ValueError:
hardmode_ore_2 = HardmodeTier2Ore.NOT_DETERMINED
try:
hardmode_ore_3 = HardmodeTier3Ore(f.int4()) 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,