Class GadgetExtensions
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
customPrefabICustomPrefab- The custom prefab to set equipment slot for.
treeTypeCraftTree.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
customPrefabICustomPrefab- The custom prefab to set equipment slot for.
equipmentTypeEquipmentType- 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
customPrefabICustomPrefab- The custom prefab to add unlocks to.
groupTechGroup- The main group in the PDA blueprints where this item appears
categoryTechCategory- 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
customPrefabICustomPrefab- The custom prefab to add recipe to.
recipeDataRecipeData- 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
customPrefabICustomPrefab- The custom prefab to add recipe to.
filePathstring- 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
customPrefabICustomPrefab- The custom prefab to add biome spawns for.
biomesToSpawnInBiomeData[]- 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
customPrefabICustomPrefab- The custom prefab to add coordinated spawns for.
spawnLocationsSpawnLocation[]- 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
customPrefabICustomPrefab- The custom prefab to add biome spawns for.
entityInfoWorldEntityInfo- Data on how the biome spawner should treat this object as.
biomesToSpawnInBiomeData[]- 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
customPrefabICustomPrefab- The custom prefab to add unlocks to.
requiredForUnlockTechType- The blueprint to set as a requirement.
fragmentsToScanint- Amount of
requiredForUnlockthat must be scanned to unlock this item.
Returns
- ScanningGadget
- An instance to the created ScanningGadget to continue the scanning settings on.