Table of Contents

Class GadgetExtensions

Namespace
Nautilus.Assets.Gadgets
Assembly
Nautilus.dll
Represents extension methods for the Gadget class.
public static class GadgetExtensions
Inheritance
GadgetExtensions
Inherited Members

Methods

CreateFabricator(ICustomPrefab, out Type)

Creates a craft tree for this prefab. The created craft tree is immediately returned after this method is executed.
public static FabricatorGadget CreateFabricator(this ICustomPrefab customPrefab, out CraftTree.Type treeType)

Parameters

customPrefab ICustomPrefab
The custom prefab to set equipment slot for.
treeType CraftTree.Type
The created custom craft tree type.

Returns

FabricatorGadget
An instance to the created FabricatorGadget to continue the fabricator settings on.

SetEquipment(ICustomPrefab, EquipmentType)

Sets the type of equipment slot this item can fit into.
public static EquipmentGadget SetEquipment(this ICustomPrefab customPrefab, EquipmentType equipmentType)

Parameters

customPrefab ICustomPrefab
The custom prefab to set equipment slot for.
equipmentType EquipmentType
The type of equipment slot this item can fit into.

Returns

EquipmentGadget
An instance to the created EquipmentGadget to continue the equipment settings on.

SetPdaGroupCategory(ICustomPrefab, TechGroup, TechCategory)

Adds this item into a blueprint category to appear in.
public static ScanningGadget SetPdaGroupCategory(this ICustomPrefab customPrefab, TechGroup group, TechCategory category)

Parameters

customPrefab ICustomPrefab
The custom prefab to add unlocks to.
group TechGroup
The main group in the PDA blueprints where this item appears
category TechCategory
The category within the group in the PDA blueprints where this item appears.

Returns

ScanningGadget
An instance to the created ScanningGadget to continue the scanning settings on.

Remarks

If the specified group is a tech group that is present in the uGUI_BuilderMenu.groups list, this item will automatically become buildable. To avoid this, or make this item a buildable manually, use the SetBuildable(bool) method.

SetRecipe(ICustomPrefab, RecipeData)

Adds recipe to this custom prefab.
public static CraftingGadget SetRecipe(this ICustomPrefab customPrefab, RecipeData recipeData)

Parameters

customPrefab ICustomPrefab
The custom prefab to add recipe to.
recipeData RecipeData
The recipe to add.

Returns

CraftingGadget
An instance to the created CraftingGadget to continue the recipe settings on.

SetRecipeFromJson(ICustomPrefab, string)

Adds recipe from a json file to this custom prefab.
public static CraftingGadget SetRecipeFromJson(this ICustomPrefab customPrefab, string filePath)

Parameters

customPrefab ICustomPrefab
The custom prefab to add recipe to.
filePath string
The path to the recipe json file. A string with valid recipe data json is also acceptable.

Returns

CraftingGadget
An instance to the created CraftingGadget to continue the recipe settings on.

SetSpawns(ICustomPrefab, params BiomeData[])

Adds biome spawns for this custom prefab with default UWE.WorldEntityInfo values.
public static ICustomPrefab SetSpawns(this ICustomPrefab customPrefab, params LootDistributionData.BiomeData[] biomesToSpawnIn)

Parameters

customPrefab ICustomPrefab
The custom prefab to add biome spawns for.
biomesToSpawnIn BiomeData[]
The biomes to spawn in.

Returns

ICustomPrefab
A reference to this instance after the operation has completed.

SetSpawns(ICustomPrefab, params SpawnLocation[])

Adds coordinated spawns for this custom prefab.
public static ICustomPrefab SetSpawns(this ICustomPrefab customPrefab, params SpawnLocation[] spawnLocations)

Parameters

customPrefab ICustomPrefab
The custom prefab to add coordinated spawns for.
spawnLocations SpawnLocation[]
The spawn locations to spawn in.

Returns

ICustomPrefab
A reference to this instance after the operation has completed.

SetSpawns(ICustomPrefab, WorldEntityInfo, params BiomeData[])

Adds biome spawns for this custom prefab.
public static ICustomPrefab SetSpawns(this ICustomPrefab customPrefab, WorldEntityInfo entityInfo, params LootDistributionData.BiomeData[] biomesToSpawnIn)

Parameters

customPrefab ICustomPrefab
The custom prefab to add biome spawns for.
entityInfo WorldEntityInfo
Data on how the biome spawner should treat this object as.
biomesToSpawnIn BiomeData[]
The biomes to spawn in.

Returns

ICustomPrefab
A reference to this instance after the operation has completed.

SetUnlock(ICustomPrefab, TechType, int)

Adds unlocks to this custom prefab.
public static ScanningGadget SetUnlock(this ICustomPrefab customPrefab, TechType requiredForUnlock, int fragmentsToScan = 1)

Parameters

customPrefab ICustomPrefab
The custom prefab to add unlocks to.
requiredForUnlock TechType
The blueprint to set as a requirement.
fragmentsToScan int
Amount of requiredForUnlock that must be scanned to unlock this item.

Returns

ScanningGadget
An instance to the created ScanningGadget to continue the scanning settings on.