com.Indigocoder.SubLibrary
1.1.0
See the version list below for details.
dotnet add package com.Indigocoder.SubLibrary --version 1.1.0
NuGet\Install-Package com.Indigocoder.SubLibrary -Version 1.1.0
<PackageReference Include="com.Indigocoder.SubLibrary" Version="1.1.0" />
paket add com.Indigocoder.SubLibrary --version 1.1.0
#r "nuget: com.Indigocoder.SubLibrary, 1.1.0"
// Install com.Indigocoder.SubLibrary as a Cake Addin #addin nuget:?package=com.Indigocoder.SubLibrary&version=1.1.0 // Install com.Indigocoder.SubLibrary as a Cake Tool #tool nuget:?package=com.Indigocoder.SubLibrary&version=1.1.0
Using the Library
This library is designed for implementing submarines in mods for the game Subnautica. If that is not what you're doing, then this package is not for you.
To use the library, you will need to add it to your Unity project that is using Thunderkit.
The components you need will depend on the sub you are making, but some of the more versatile components are the Spawn____
ones, which spawn and assign elements of the Cyclops to your sub.
Different Components
There are some components in this library that replace ones that you might find on subs such as the Cyclops. One of the most notable ones is the ModdedSubFire
replacing SubFire
.
This is to provide more flexibility and to remove stuff like the use of enums, which limit expandability.
Save System
This library also comes with a custom save system for your subs. Simply add the SubSerializationManager
to your prefab root, and then create a class for your save data
extending either ModuleDataClass
or BaseSubDataClass
.
Then in the Save Data Type Class Name
field on the manager put in the full Type
of your save data class (I.e. Chameleon.SaveData.ChameleonSaveDataClass
).
The manager will also call any ISaveDataListener
or ILateSaveDataListener
s on save and load. These methods provide a BaseSubDataClass
and you will need to cast it to your data class.
If the data isn't your data class (I.e. the cast is null) it means your sub doesn't have save data yet. I recommend making an extension method for BaseSubDataClass
which ensures that your data isn't null and casts it to your data type.
Miscellaneous
Many fields accessible on components in this library have tooltips on them. If you're ever confused about what something does try hovering over its name in Unity to see if it has any extra info there.
When forking/modifying the repo:
You will need to go into the Configuration.targets
file and change the CommonDir
to the path to your Steam library folder so that the project builds correctly.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- BepInEx.Core (>= 5.4.21)
- BepInEx.PluginInfoProps (>= 1.1.0)
- PolySharp (>= 1.13.1)
- Subnautica.GameLibs (>= 71288.0.0-r.0)
- UnityEngine.Modules (>= 2019.4.36)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added sky manager
Added proximity sensors system
Fixed floodlight marker not being able to be added as a component
Fixed OnTakeFireDamage call not reaching the HUD manager