project/settings.py

21 lines
647 B
Python

from dataclasses import dataclass
import numpy as np
@dataclass
class WorldSettings:
width: int = 400
height: int = 300
seed: int = None
mode: str = 'continent' # 'land_only', 'continent', 'islands'
# Параметры рельефа
terrain_roughness: float = 0.5
continent_size: float = 0.7
continent_roughness: float = 0.5
islands_density: float = 0.6
islands_roughness: float = 0.5
island_size: float = 0.5
climate_mode: str = 'realistic' # 'realistic' или 'artistic'
def get_valid_seed(self):
return self.seed if self.seed is not None else np.random.randint(0, 1000000)