Merge branch 'common-resources' into somework

This commit is contained in:
Nick 2021-12-30 16:48:04 -05:00 committed by GitHub
commit f76e36fc86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 159 additions and 174 deletions

View File

@ -38,14 +38,20 @@ namespace NewHorizons.Builder.General
hb = AddHeavenlyBody(config.Name);
}
var mapping = Planet.defaultMapping;
Planet.Plantoid planetoid;
if (!config.Orbit.IsStatic)
{
var planetoid = new Planet.Plantoid(size, gravity, body.transform.rotation, initialMotion._initAngularSpeed, parent, orbit);
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
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>
<ProjectGuid>{8A39F9E7-1A89-430C-9C3E-BDFB3B7E17DF}</ProjectGuid>
<TargetFramework>net48</TargetFramework>
@ -33,27 +32,7 @@
<HintPath>$(OuterWildsModsDirectory)\PacificEngine.OW_CommonResources\PacificEngine.OW_CommonResources.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
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>
<ItemGroup>
<Content Include="NewHorizons.csproj.user" />
</ItemGroup>
</Project>