Spawn in bramble (#990)

## Improvements

- Allow spawning inside Bramble dimensions (base game spawn point does not work yet)
This commit is contained in:
Will Corby 2024-11-03 16:07:09 -08:00 committed by GitHub
commit d5aa088e09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -510,13 +510,6 @@ namespace NewHorizons.Handlers
// Have to do this after setting position // Have to do this after setting position
var initialMotion = InitialMotionBuilder.Make(go, primaryBody, ao, owRigidBody, body.Config.Orbit); var initialMotion = InitialMotionBuilder.Make(go, primaryBody, ao, owRigidBody, body.Config.Orbit);
// Spawning on other planets is a bit hacky so we do it last
if (body.Config.Spawn != null)
{
NHLogger.LogVerbose($"Making spawn point on {body.Config.name}");
var spawnPoint = SpawnPointBuilder.Make(go, body.Config.Spawn, owRigidBody);
}
if (body.Config.Orbit.showOrbitLine && !body.Config.Orbit.isStatic) if (body.Config.Orbit.showOrbitLine && !body.Config.Orbit.isStatic)
{ {
OrbitlineBuilder.Make(body.Object, body.Config.Orbit.isMoon, body.Config); OrbitlineBuilder.Make(body.Object, body.Config.Orbit.isMoon, body.Config);
@ -746,6 +739,12 @@ namespace NewHorizons.Handlers
SupernovaEffectBuilder.Make(go, sector, body.Config, body.Mod, procGen, ambientLight, fog, atmosphere, null, fog?._fogImpostor); SupernovaEffectBuilder.Make(go, sector, body.Config, body.Mod, procGen, ambientLight, fog, atmosphere, null, fog?._fogImpostor);
} }
if (body.Config.Spawn != null)
{
NHLogger.LogVerbose($"Making spawn point on {body.Config.name}");
SpawnPointBuilder.Make(go, body.Config.Spawn, rb);
}
// We allow removing children afterwards so you can also take bits off of the modules you used // We allow removing children afterwards so you can also take bits off of the modules you used
if (body.Config.removeChildren != null) RemoveChildren(go, body); if (body.Config.removeChildren != null) RemoveChildren(go, body);