Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.11.2 #607

Merged
merged 10 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions NewHorizons/Builder/Body/StarBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public static class StarBuilder
private static GameObject _supernovaPrefab;
private static Material _mainSequenceMaterial;
private static Material _giantMaterial;
private static Material _flareMaterial;

private static bool _isInit;

Expand All @@ -54,6 +55,11 @@ internal static void InitPrefabs()
if (_supernovaPrefab == null) _supernovaPrefab = SearchUtilities.Find("Sun_Body/Sector_SUN/Effects_SUN/Supernova").InstantiateInactive().Rename("Prefab_Supernova").DontDestroyOnLoad();
if (_mainSequenceMaterial == null) _mainSequenceMaterial = new Material(SearchUtilities.Find("Sun_Body").GetComponent<SunController>()._startSurfaceMaterial).DontDestroyOnLoad();
if (_giantMaterial == null) _giantMaterial = new Material(SearchUtilities.Find("Sun_Body").GetComponent<SunController>()._endSurfaceMaterial).DontDestroyOnLoad();
if (_flareMaterial == null)
{
_flareMaterial = new Material(_starSolarFlareEmitter.GetComponentInChildren<SolarFlareController>().GetComponent<MeshRenderer>().sharedMaterial).DontDestroyOnLoad();
_flareMaterial.color = Color.white;
}
}

public static (GameObject, StarController, StarEvolutionController, Light) Make(GameObject planetGO, Sector sector, StarModule starModule, IModBehaviour mod, bool isStellarRemnant)
Expand Down Expand Up @@ -347,11 +353,11 @@ public static GameObject MakeStarGraphics(GameObject rootObject, Sector sector,
var flareTint = starModule.tint.ToColor();
var emitter = solarFlareEmitter.GetComponent<SolarFlareEmitter>();
emitter.tint = flareTint;
var material = new Material(_flareMaterial);
foreach (var controller in solarFlareEmitter.GetComponentsInChildren<SolarFlareController>())
{
// It multiplies color by tint but wants something very bright idk
controller._color = new Color(1, 1, 1);
controller.GetComponent<MeshRenderer>().sharedMaterial.SetColor("_Color", controller._color);
controller.GetComponent<MeshRenderer>().sharedMaterial = material;
controller._color = Color.white;
controller._tint = flareTint;
}
}
Expand Down
18 changes: 9 additions & 9 deletions NewHorizons/External/SerializableEnums/NHFluidType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ namespace NewHorizons.External.SerializableEnums
[JsonConverter(typeof(StringEnumConverter))]
public enum NHFluidType
{
[EnumMember(Value = @"none")] NONE = 0,

[EnumMember(Value = @"water")] WATER = 1,

[EnumMember(Value = @"cloud")] CLOUD = 2,

[EnumMember(Value = @"sand")] SAND = 3,

[EnumMember(Value = @"plasma")] PLASMA = 4
[EnumMember(Value = @"none")] NONE,
[EnumMember(Value = @"air")] AIR,
[EnumMember(Value = @"water")] WATER,
[EnumMember(Value = @"tractorBeam")] TRACTOR_BEAM,
[EnumMember(Value = @"cloud")] CLOUD,
[EnumMember(Value = @"sand")] SAND,
[EnumMember(Value = @"plasma")] PLASMA,
[EnumMember(Value = @"fog")] FOG,
[EnumMember(Value = @"geyser")] GEYSER
}
}
2 changes: 1 addition & 1 deletion NewHorizons/NewHorizons.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OWML" Version="2.9.0" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.456" />
<Reference Include="../Lib/System.ComponentModel.Annotations.dll" />
</ItemGroup>
<ItemGroup>
Expand Down
12 changes: 10 additions & 2 deletions NewHorizons/Schemas/body_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -485,17 +485,25 @@
"description": "",
"x-enumNames": [
"NONE",
"AIR",
"WATER",
"TRACTOR_BEAM",
"CLOUD",
"SAND",
"PLASMA"
"PLASMA",
"FOG",
"GEYSER"
],
"enum": [
"none",
"air",
"water",
"tractorBeam",
"cloud",
"sand",
"plasma"
"plasma",
"fog",
"geyser"
]
},
"MGradient": {
Expand Down
2 changes: 1 addition & 1 deletion NewHorizons/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
"name": "New Horizons",
"uniqueName": "xen.NewHorizons",
"version": "1.11.1",
"version": "1.11.2",
"owmlVersion": "2.9.0",
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
Expand Down
6 changes: 3 additions & 3 deletions SchemaExporter/SchemaExporter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<None Include="UnityEngine.CoreModule.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NJsonSchema" Version="10.8.0" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" IncludeAssets="compile" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NJsonSchema" Version="10.9.0" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.456" IncludeAssets="compile" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down