-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
2,538 additions
and
1,051 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- docs | ||
|
||
jobs: | ||
SN1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: .NET Setup | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.x | ||
|
||
- name: Nuget Setup | ||
uses: nuget/setup-nuget@v1 | ||
|
||
- name: Nuget Restore | ||
run: nuget restore Nautilus.sln | ||
|
||
- name: Build Project | ||
run: dotnet build Nautilus.sln -c SN.STABLE | ||
BZ: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: .NET Setup | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.x | ||
|
||
- name: Nuget Setup | ||
uses: nuget/setup-nuget@v1 | ||
|
||
- name: Nuget Restore | ||
run: nuget restore Nautilus.sln | ||
|
||
- name: Build Project | ||
run: dotnet build Nautilus.sln -c BZ.STABLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using BepInEx; | ||
using Nautilus.Assets; | ||
using Nautilus.Assets.PrefabTemplates; | ||
using Nautilus.Handlers; | ||
using Nautilus.Utility; | ||
using UnityEngine; | ||
|
||
namespace Nautilus.Examples; | ||
|
||
[BepInPlugin("com.snmodding.nautilus.biomehandler", "Nautilus Biome Example Mod", Nautilus.PluginInfo.PLUGIN_VERSION)] | ||
[BepInDependency("com.snmodding.nautilus")] | ||
public class BiomeHandlerExample : BaseUnityPlugin | ||
{ | ||
private void Awake() | ||
{ | ||
// Register the new biome into the game | ||
var lilyPadsFogSettings = BiomeUtils.CreateBiomeSettings(new Vector3(20, 5, 6), 0.6f, Color.white, 0.45f, | ||
new Color(0.18f, 0.604f, 0.404f), 0.05f, 20, 1, 1.25f, 20); | ||
#if SUBNAUTICA | ||
BiomeHandler.RegisterBiome("nautilusexamplebiome", lilyPadsFogSettings, new BiomeHandler.SkyReference("SkyKelpForest")); | ||
#elif BELOWZERO | ||
BiomeHandler.RegisterBiome("nautilusexamplebiome", lilyPadsFogSettings, new BiomeHandler.SkyReference("SkyLilyPads")); | ||
#endif | ||
|
||
#if SUBNAUTICA | ||
// Add wreck ambience & music | ||
BiomeHandler.AddBiomeMusic("nautilusexamplebiome", AudioUtils.GetFmodAsset("event:/env/music/wreak_ambience_big_music")); | ||
BiomeHandler.AddBiomeAmbience("nautilusexamplebiome", AudioUtils.GetFmodAsset("event:/env/background/wreak_ambience_big"), FMODGameParams.InteriorState.OnlyOutside); | ||
#endif | ||
|
||
// Create an atmosphere volume for the biome | ||
PrefabInfo volumePrefabInfo = PrefabInfo.WithTechType("NautilusExampleBiomeSphereVolume"); | ||
CustomPrefab volumePrefab = new CustomPrefab(volumePrefabInfo); | ||
AtmosphereVolumeTemplate volumeTemplate = new AtmosphereVolumeTemplate(volumePrefabInfo, AtmosphereVolumeTemplate.VolumeShape.Sphere, "nautilusexamplebiome"); | ||
volumePrefab.SetGameObject(volumeTemplate); | ||
volumePrefab.Register(); | ||
|
||
// Add the biome somewhere to the world | ||
CoordinatedSpawnsHandler.RegisterCoordinatedSpawn(new SpawnInfo(volumePrefabInfo.ClassID, new Vector3(-1400, -80, 600), Quaternion.identity, new Vector3(50, 50, 50))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,48 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\common.props" /> | ||
<PropertyGroup> | ||
<TargetFramework>net472</TargetFramework> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
<RootNamespace>Nautilus.Examples</RootNamespace> | ||
<AssemblyName>Nautilus.Example</AssemblyName> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<Optimize>true</Optimize> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<LangVersion>latest</LangVersion> | ||
<Configurations>SN.STABLE;BZ.STABLE</Configurations> | ||
<Platforms>AnyCPU</Platforms> | ||
<Copyright>Copyright © 2023</Copyright> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
</PropertyGroup> | ||
<Import Project="$(SolutionDir)Version.targets" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'SN.STABLE|AnyCPU'"> | ||
<OutputPath>bin\SN.STABLE\</OutputPath> | ||
<DefineConstants>SUBNAUTICA;SUBNAUTICA_STABLE</DefineConstants> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'BZ.STABLE|AnyCPU'"> | ||
<OutputPath>bin\BZ.STABLE\</OutputPath> | ||
<DefineConstants>BELOWZERO;BELOWZERO_STABLE</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Nautilus\Nautilus.csproj"> | ||
<Private>False</Private> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="BepInEx.Core" Version="5.4.21" /> | ||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.1.0" /> | ||
<PackageReference Include="PolySharp" Version="1.13.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
<Target Name="CopyToOutputPath" AfterTargets="Build"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\common.props" /> | ||
<Import Project="$(SolutionDir)Version.targets" /> | ||
<PropertyGroup> | ||
<TargetFramework>net472</TargetFramework> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
<RootNamespace>Nautilus.Examples</RootNamespace> | ||
<AssemblyName>Nautilus.Example</AssemblyName> | ||
<BepInExPluginVersion>$(VersionPrefix).$(SuffixNumber)</BepInExPluginVersion> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<Optimize>true</Optimize> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<LangVersion>latest</LangVersion> | ||
<Configurations>SN.STABLE;BZ.STABLE</Configurations> | ||
<Platforms>AnyCPU</Platforms> | ||
<Copyright>Copyright © 2023</Copyright> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'SN.STABLE|AnyCPU'"> | ||
<OutputPath>bin\SN.STABLE\</OutputPath> | ||
<DefineConstants>SUBNAUTICA;SUBNAUTICA_STABLE</DefineConstants> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'BZ.STABLE|AnyCPU'"> | ||
<OutputPath>bin\BZ.STABLE\</OutputPath> | ||
<DefineConstants>BELOWZERO;BELOWZERO_STABLE</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<LocalizationFiles Include="Localization\*.*" /> | ||
<ProjectReference Include="..\Nautilus\Nautilus.csproj"> | ||
<Private>False</Private> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(LocalizationFiles)" DestinationFolder="$(OutDir)\Localization" SkipUnchangedFiles="true" /> | ||
</Target> | ||
<ItemGroup> | ||
<PackageReference Include="BepInEx.Core" Version="5.4.21" /> | ||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.1.0" /> | ||
<PackageReference Include="PolySharp" Version="1.13.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
<Target Name="CopyToOutputPath" AfterTargets="Build"> | ||
<ItemGroup> | ||
<LocalizationFiles Include="Localization\*.*" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(LocalizationFiles)" DestinationFolder="$(OutDir)\Localization" SkipUnchangedFiles="true" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.