From 2b506c3ddfd205a2114cc64d4b97dbdef8181d7e Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 4 Jun 2020 20:52:25 +0200 Subject: [PATCH] Reformat journeypowers.py --- lihzahrd/journeypowers/journeypowers.py | 45 +++++++++++++++++-------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/lihzahrd/journeypowers/journeypowers.py b/lihzahrd/journeypowers/journeypowers.py index 07a07d9..2b5f99c 100755 --- a/lihzahrd/journeypowers/journeypowers.py +++ b/lihzahrd/journeypowers/journeypowers.py @@ -1,25 +1,35 @@ 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, - 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,): + 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 - """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"" + 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")"