(self, planet, star_mass: float)
| 311 | |
| 312 | |
| 313 | class MoonSystem: |
| 314 | def __init__(self, planet, star_mass: float): |
| 315 | self.planet = planet |
| 316 | self.star_mass = star_mass |
| 317 | self.moons: List[Moon] = [] |
| 318 | |
| 319 | self.system_seed = int( |
| 320 | hashlib.sha256(f"{planet.seed}-{seedmaster(2)}-moon_system".encode()).hexdigest(), |
| 321 | 16, |
| 322 | ) |
| 323 | |
| 324 | self.system_rng = random.Random(self.system_seed) |
| 325 | |
| 326 | self.roche_limit = self._calculate_roche_limit() |
| 327 | self.hill_radius = self._calculate_hill_sphere() |
| 328 | |
| 329 | self._generate_moons() |
| 330 | |
| 331 | def _calculate_roche_limit(self) -> float: |
nothing calls this directly
no test coverage detected