Fixed static objects still moving

This commit is contained in:
Nick J. Connors 2021-12-30 16:47:08 -05:00
parent a5eb0d25ee
commit 6be680ac8e
2 changed files with 16 additions and 31 deletions

View File

@ -41,14 +41,20 @@ namespace NewHorizons.Builder.General
hb = AddHeavenlyBody(config.Name); hb = AddHeavenlyBody(config.Name);
} }
if(!config.Orbit.IsStatic) Planet.Plantoid planetoid;
{
var planetoid = new Planet.Plantoid(size, gravity, body.transform.rotation, initialMotion._initAngularSpeed, parent, orbit);
var mapping = Planet.defaultMapping; if (!config.Orbit.IsStatic)
mapping[hb] = planetoid; {
Planet.defaultMapping = mapping; planetoid = new Planet.Plantoid(size, gravity, body.transform.rotation, initialMotion._initAngularSpeed, parent, orbit);
} }
else
{
planetoid = new Planet.Plantoid(size, gravity, body.transform.rotation, 0f, HeavenlyBody.None, body.transform.position, Vector3.zero);
}
var mapping = Planet.defaultMapping;
mapping[hb] = planetoid;
Planet.defaultMapping = mapping;
// Fix for binary focal points // Fix for binary focal points
var focalPoint = Position.AstroLookup[parent].Invoke()?.gameObject.GetComponent<BinaryFocalPoint>(); var focalPoint = Position.AstroLookup[parent].Invoke()?.gameObject.GetComponent<BinaryFocalPoint>();

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{8A39F9E7-1A89-430C-9C3E-BDFB3B7E17DF}</ProjectGuid> <ProjectGuid>{8A39F9E7-1A89-430C-9C3E-BDFB3B7E17DF}</ProjectGuid>
<TargetFramework>net48</TargetFramework> <TargetFramework>net48</TargetFramework>
@ -33,27 +32,7 @@
<HintPath>$(OuterWildsModsDirectory)\PacificEngine.OW_CommonResources\PacificEngine.OW_CommonResources.dll</HintPath> <HintPath>$(OuterWildsModsDirectory)\PacificEngine.OW_CommonResources\PacificEngine.OW_CommonResources.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ItemGroup>
<PropertyGroup> <Content Include="NewHorizons.csproj.user" />
<PostBuildEvent> </ItemGroup>
rmdir /Q /S "$(OuterWildsModsDirectory)\$(ProjectName)"
md "$(OuterWildsModsDirectory)\$(ProjectName)"
md "$(OuterWildsModsDirectory)\$(ProjectName)\AssetBundle"
copy /y "$(ProjectDir)default-config.json" "$(OuterWildsModsDirectory)\$(ProjectName)"
copy /y "$(ProjectDir)manifest.json" "$(OuterWildsModsDirectory)\$(ProjectName)"
copy /y "$(ProjectDir)AssetBundle" "$(OuterWildsModsDirectory)\$(ProjectName)\AssetBundle"
copy /y "$(TargetPath)" "$(OuterWildsModsDirectory)\$(ProjectName)"
rmdir /Q /S "$(ProjectDir)$(ProjectName)"
md "$(ProjectDir)$(ProjectName)"
md "$(ProjectDir)$(ProjectName)\AssetBundle"
copy /y "$(ProjectDir)default-config.json" "$(ProjectDir)$(ProjectName)"
copy /y "$(ProjectDir)manifest.json" "$(ProjectDir)$(ProjectName)"
copy /y "$(ProjectDir)AssetBundle" "$(ProjectDir)$(ProjectName)\AssetBundle"
copy /y "$(TargetPath)" "$(ProjectDir)$(ProjectName)"
del /q "$(ProjectDir)..\$(ProjectName).zip"
powershell Compress-Archive "$(ProjectDir)$(ProjectName)" "$(ProjectDir)..\$(ProjectName).zip"
rmdir /Q /S "$(ProjectDir)$(ProjectName)"
</PostBuildEvent>
</PropertyGroup>
</Project> </Project>