Skip to content

Commit

Permalink
chore: Vehicle Upgrade Module Gadget and Custom Buildable Example cle…
Browse files Browse the repository at this point in the history
…anup (#567)

* Update CustomBuildableExample comments

* Clean up awful vehicle module docs
  • Loading branch information
LeeTwentyThree authored Dec 7, 2024
1 parent 2e6ed45 commit d6bc4ab
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 131 deletions.
6 changes: 4 additions & 2 deletions Example mod/CustomBuildableExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ public static void Register()
// create prefab:
CustomPrefab prefab = new CustomPrefab(Info);

// copy the model of a vanilla wreck piece (which looks like a taller locker):
// copy the model of a vanilla wreck piece (which looks like a taller locker)
// we pass in the Class ID of the original prefab, which was found on this page:
// https://github.com/SubnauticaModding/Nautilus/blob/master/Nautilus/Documentation/resources/SN1-PrefabPaths.json
CloneTemplate lockerClone = new CloneTemplate(Info, "cd34fecd-794c-4a0c-8012-dd81b77f2840");

// modify the cloned model:
lockerClone.ModifyPrefab += obj =>
{
// allow it to be placced inside bases and submarines on the ground, and can be rotated:
// allow it to be placed inside bases and submarines on the ground, and can be rotated:
ConstructableFlags constructableFlags = ConstructableFlags.Inside | ConstructableFlags.Rotatable | ConstructableFlags.Ground | ConstructableFlags.Submarine;

// find the object that holds the model:
Expand Down
Loading

0 comments on commit d6bc4ab

Please sign in to comment.