1
Fork 0
mirror of https://github.com/Steffo99/lihzahrd.git synced 2024-11-24 17:14:22 +00:00

Reformat journeypowers.py

This commit is contained in:
Steffo 2020-06-04 20:52:25 +02:00
parent a5dfd2995e
commit 2b506c3ddf
Signed by: steffo
GPG key ID: 896A80F55F7C97F0

View file

@ -1,9 +1,19 @@
import typing
class JourneyPowers:
"""Journey mode powers settings. Spawn rate does not appear to be stored in the world."""
__slots__ = "freeze_time", "god_mode", "time_rate", "freeze_rain", "freeze_wind", "far_placement_range", "difficulty", "freeze_biome_spread", "spawn_rate"
__slots__ = (
"freeze_time",
"god_mode",
"time_rate",
"freeze_rain",
"freeze_wind",
"far_placement_range",
"difficulty",
"freeze_biome_spread"
)
def __init__(self,
freeze_time: typing.Optional[bool] = None,
@ -13,13 +23,13 @@ class JourneyPowers:
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,):
freeze_biome_spread: typing.Optional[bool] = None):
self.freeze_time: bool = freeze_time
"""Can time be frozen."""
"""Is time frozen?"""
self.god_mode: bool = god_mode
"""Can god mode be enabled."""
"""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,6 +50,13 @@ class JourneyPowers:
"""Can evil biomes & the hallow spread."""
def __repr__(self):
return f"<JourneyPowers: freeze_time={self.freeze_time}, god_mode={self.god_mode}, freeze_rain={self.freeze_rain}," \
f"freeze_wind={self.freeze_wind}, far_placement={self.far_placement_range}, biome_spread={self.freeze_biome_spread}," \
f"time_rate={self.time_rate}, difficulty={self.difficulty}>"
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}" \
f")"