mirror of
https://github.com/Steffo99/lihzahrd.git
synced 2024-11-25 01:24:21 +00:00
Reformat journeypowers.py
This commit is contained in:
parent
a5dfd2995e
commit
2b506c3ddf
1 changed files with 31 additions and 14 deletions
|
@ -1,25 +1,35 @@
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
|
|
||||||
class JourneyPowers:
|
class JourneyPowers:
|
||||||
"""Journey mode powers settings. Spawn rate does not appear to be stored in the world."""
|
"""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,
|
def __init__(self,
|
||||||
freeze_time: typing.Optional[bool] = None,
|
freeze_time: typing.Optional[bool] = None,
|
||||||
god_mode: typing.Optional[bool] = None,
|
god_mode: typing.Optional[bool] = None,
|
||||||
time_rate: typing.Optional[float] = None,
|
time_rate: typing.Optional[float] = None,
|
||||||
freeze_rain: typing.Optional[bool] = None,
|
freeze_rain: typing.Optional[bool] = None,
|
||||||
freeze_wind: typing.Optional[bool] = None,
|
freeze_wind: typing.Optional[bool] = None,
|
||||||
far_placement_range: typing.Optional[bool] = None,
|
far_placement_range: typing.Optional[bool] = None,
|
||||||
difficulty: typing.Optional[float] = 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
|
self.freeze_time: bool = freeze_time
|
||||||
"""Can time be frozen."""
|
"""Is time frozen?"""
|
||||||
|
|
||||||
self.god_mode: bool = god_mode
|
self.god_mode: bool = god_mode
|
||||||
"""Can god mode be enabled."""
|
"""Is god mode enabled?"""
|
||||||
|
|
||||||
self.time_rate: float = time_rate
|
self.time_rate: float = time_rate
|
||||||
"""How fast does time go, 1x to 24x. Value ranges from 0.0 to 1.0."""
|
"""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."""
|
"""Can evil biomes & the hallow spread."""
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"<JourneyPowers: freeze_time={self.freeze_time}, god_mode={self.god_mode}, freeze_rain={self.freeze_rain}," \
|
return f"JourneyPowers(" \
|
||||||
f"freeze_wind={self.freeze_wind}, far_placement={self.far_placement_range}, biome_spread={self.freeze_biome_spread}," \
|
f"freeze_time={self.freeze_time}," \
|
||||||
f"time_rate={self.time_rate}, difficulty={self.difficulty}>"
|
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")"
|
||||||
|
|
Loading…
Reference in a new issue