mirror of
https://github.com/Steffo99/lihzahrd.git
synced 2024-11-21 15:44:24 +00:00
Handle hardmode ores sometimes having an unknown value
This commit is contained in:
parent
89597079c0
commit
abcd9aea57
1 changed files with 15 additions and 3 deletions
|
@ -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())
|
||||||
|
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue