Class GadgetExtensions
Represents extension methods for the Gadget class.
public static class GadgetExtensions
- Inheritance
-
GadgetExtensions
- Inherited Members
Methods
CreateCreatureEgg(ICustomPrefab, int)
Makes this item have additional creature-egg-related functionality.
public static EggGadget CreateCreatureEgg(this ICustomPrefab customPrefab, int requiredAcuSize = 1)
Parameters
customPrefabICustomPrefabrequiredAcuSizeint- The total amount of ACU floors required for the egg to be dropped in the ACU. This value is shared between the normal and the large ACU.
Returns
CreateFabricator(ICustomPrefab, out Type)
public static FabricatorGadget CreateFabricator(this ICustomPrefab customPrefab, out CraftTree.Type treeType)
Parameters
customPrefabICustomPrefabtreeTypeType
Returns
CreateFragment(ICustomPrefab, TechType, float, int, string, bool, bool)
public static ScanningGadget CreateFragment(this ICustomPrefab customPrefab, TechType blueprint, float scanTime, int fragmentsToScan = 1, string encyKey = null, bool destroyAfterScan = true, bool isFragment = true)
Parameters
customPrefabICustomPrefabblueprintTechTypescanTimefloatfragmentsToScanintencyKeystringdestroyAfterScanboolisFragmentbool
Returns
SetEquipment(ICustomPrefab, EquipmentType)
public static EquipmentGadget SetEquipment(this ICustomPrefab customPrefab, EquipmentType equipmentType)
Parameters
customPrefabICustomPrefabequipmentTypeEquipmentType
Returns
SetPdaGroupCategory(ICustomPrefab, TechGroup, TechCategory)
public static ScanningGadget SetPdaGroupCategory(this ICustomPrefab customPrefab, TechGroup group, TechCategory category)
Parameters
customPrefabICustomPrefabgroupTechGroupcategoryTechCategory
Returns
SetPdaGroupCategoryAfter(ICustomPrefab, TechGroup, TechCategory, TechType)
public static ScanningGadget SetPdaGroupCategoryAfter(this ICustomPrefab customPrefab, TechGroup group, TechCategory category, TechType target)
Parameters
customPrefabICustomPrefabgroupTechGroupcategoryTechCategorytargetTechType
Returns
SetPdaGroupCategoryBefore(ICustomPrefab, TechGroup, TechCategory, TechType)
public static ScanningGadget SetPdaGroupCategoryBefore(this ICustomPrefab customPrefab, TechGroup group, TechCategory category, TechType target)
Parameters
customPrefabICustomPrefabgroupTechGroupcategoryTechCategorytargetTechType
Returns
SetRecipe(ICustomPrefab, RecipeData)
Adds recipe to this custom prefab.
public static CraftingGadget SetRecipe(this ICustomPrefab customPrefab, RecipeData recipeData)
Parameters
customPrefabICustomPrefabrecipeDataRecipeData- The recipe to add.
Returns
- CraftingGadget
- A reference 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
customPrefabICustomPrefabfilePathstring- The path to the recipe json file. A string with valid recipe data json is also acceptable.
Returns
- CraftingGadget
- A reference to the created CraftingGadget to continue the recipe settings on.
SetSpawns(ICustomPrefab, params BiomeData[])
public static ICustomPrefab SetSpawns(this ICustomPrefab customPrefab, params LootDistributionData.BiomeData[] biomesToSpawnIn)
Parameters
customPrefabICustomPrefabbiomesToSpawnInBiomeData[]
Returns
SetSpawns(ICustomPrefab, params SpawnLocation[])
Adds coordinated spawns for this custom prefab.
public static ICustomPrefab SetSpawns(this ICustomPrefab customPrefab, params SpawnLocation[] spawnLocations)
Parameters
customPrefabICustomPrefabspawnLocationsSpawnLocation[]- The spawn locations to spawn in.
Returns
- ICustomPrefab
- A reference to this instance after the operation has completed.
SetSpawns(ICustomPrefab, WorldEntityInfo, params BiomeData[])
public static ICustomPrefab SetSpawns(this ICustomPrefab customPrefab, WorldEntityInfo entityInfo, params LootDistributionData.BiomeData[] biomesToSpawnIn)
Parameters
customPrefabICustomPrefabentityInfoWorldEntityInfobiomesToSpawnInBiomeData[]
Returns
SetUnlock(ICustomPrefab, TechType, int)
public static ScanningGadget SetUnlock(this ICustomPrefab customPrefab, TechType requiredForUnlock, int fragmentsToScan = 1)
Parameters
customPrefabICustomPrefabrequiredForUnlockTechTypefragmentsToScanint
Returns
SetVehicleUpgradeModule(ICustomPrefab, EquipmentType, QuickSlotType)
public static UpgradeModuleGadget SetVehicleUpgradeModule(this ICustomPrefab customPrefab, EquipmentType equipmentType = 9, QuickSlotType slotType = 1)
Parameters
customPrefabICustomPrefabequipmentTypeEquipmentTypeslotTypeQuickSlotType