mirror of
https://github.com/Steffo99/lihzahrd.git
synced 2024-11-21 15:44:24 +00:00
Fix journey powers parsing
This commit is contained in:
parent
cb1cbaad7d
commit
7a99efaf54
2 changed files with 2 additions and 16 deletions
|
@ -17,20 +17,15 @@ class JourneyPowers:
|
|||
|
||||
def __init__(self,
|
||||
freeze_time: typing.Optional[bool] = None,
|
||||
god_mode: typing.Optional[bool] = None,
|
||||
time_rate: typing.Optional[float] = None,
|
||||
freeze_rain: typing.Optional[bool] = None,
|
||||
freeze_wind: typing.Optional[bool] = None,
|
||||
far_placement_range: typing.Optional[bool] = None,
|
||||
difficulty: typing.Optional[float] = None,
|
||||
freeze_biome_spread: typing.Optional[bool] = None):
|
||||
|
||||
self.freeze_time: bool = freeze_time
|
||||
"""Is time frozen?"""
|
||||
|
||||
self.god_mode: bool = god_mode
|
||||
"""Is god mode enabled?"""
|
||||
|
||||
self.time_rate: float = time_rate
|
||||
"""How fast does time go, 1x to 24x. Value ranges from 0.0 to 1.0."""
|
||||
|
||||
|
@ -40,9 +35,6 @@ class JourneyPowers:
|
|||
self.freeze_wind: bool = freeze_wind
|
||||
"""Can the wind speed and direction change."""
|
||||
|
||||
self.far_placement_range: bool = far_placement_range
|
||||
"""Can players place blocks further than normal."""
|
||||
|
||||
self.difficulty: float = difficulty
|
||||
"""Enemy difficulty scaling, 0.5x to 3x. Value ranges from 0.0 to 1.0."""
|
||||
|
||||
|
@ -52,10 +44,8 @@ class JourneyPowers:
|
|||
def __repr__(self):
|
||||
return f"JourneyPowers(" \
|
||||
f"freeze_time={self.freeze_time}," \
|
||||
f" god_mode={self.god_mode}," \
|
||||
f" freeze_rain={self.freeze_rain}," \
|
||||
f" freeze_wind={self.freeze_wind}," \
|
||||
f" far_placement={self.far_placement_range}," \
|
||||
f" freeze_biome_spread={self.freeze_biome_spread}," \
|
||||
f" time_rate={self.time_rate}," \
|
||||
f" difficulty={self.difficulty}" \
|
||||
|
|
|
@ -637,7 +637,7 @@ class World:
|
|||
ore_4 = BlockType(f.int4())
|
||||
saved_ore_tiers = SavedOreTiers(ore_1, ore_2, ore_3, ore_4, hardmode_ore_1, hardmode_ore_2, hardmode_ore_3)
|
||||
|
||||
pets = Pets(f.bool(), f.bool(), f.bool())
|
||||
pets = Pets(cat=f.bool(), dog=f.bool(), bunny=f.bool())
|
||||
|
||||
defeated_empress_of_light = f.bool()
|
||||
defeated_queen_slime = f.bool()
|
||||
|
@ -871,21 +871,17 @@ class World:
|
|||
|
||||
unknown_bestiary_data = f.read_until(pointers.journey_powers)
|
||||
|
||||
journey_powers = JourneyPowers()
|
||||
while f.bool():
|
||||
journey_powers = JourneyPowers()
|
||||
power_id = f.int2()
|
||||
if power_id == 0:
|
||||
journey_powers.freeze_time = f.bool()
|
||||
elif power_id == 5:
|
||||
journey_powers.god_mode = f.bool()
|
||||
elif power_id == 8:
|
||||
journey_powers.time_rate = f.single()
|
||||
elif power_id == 9:
|
||||
journey_powers.freeze_rain = f.bool()
|
||||
elif power_id == 10:
|
||||
journey_powers.freeze_wind = f.bool()
|
||||
elif power_id == 11:
|
||||
journey_powers.far_placement_range = f.bool()
|
||||
elif power_id == 12:
|
||||
journey_powers.difficulty = f.single()
|
||||
elif power_id == 13:
|
||||
|
|
Loading…
Reference in a new issue