MCPcopy Create free account
hub / github.com/SurceBeats/Atlas / __init__

Method __init__

pymodules/__universe_init_moons.py:313–328  ·  view source on GitHub ↗
(self, planet, star_mass: float)

Source from the content-addressed store, hash-verified

311
312
313class 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:

Callers

nothing calls this directly

Calls 4

_generate_moonsMethod · 0.95
seedmasterFunction · 0.90

Tested by

no test coverage detected