Class CraftDataHandler
public static class CraftDataHandler
- Inheritance
-
CraftDataHandler
- Inherited Members
Methods
AddBuildable(TechType)
public static void AddBuildable(TechType techType)
Parameters
techTypeTechType- The TechType which you want to add to the buildable list.
AddToGroup(TechGroup, TechCategory, TechType)
public static void AddToGroup(TechGroup group, TechCategory category, TechType techType)
Parameters
groupTechGroup- The TechGroup you want to add your TechType to.
categoryTechCategory- The TechCategory (in the TechGroup) you want to add your TechType to.
techTypeTechType- The TechType you want to add.
AddToGroup(TechGroup, TechCategory, TechType, TechType, bool)
public static void AddToGroup(TechGroup group, TechCategory category, TechType techType, TechType target = TechType.None, bool after = true)
Parameters
groupTechGroup- The TechGroup you want to add your TechType to.
categoryTechCategory- The TechCategory (in the TechGroup) you want to add your TechType to.
techTypeTechType- The TechType you want to add.
targetTechType- The icon in the blueprints tab of the PDA will be added next to this item or at the end/beginning if not found.
afterbool- Whether to append after (true) or insert before (false) the target, for sorting purposes.
ConvertToRecipeData(JsonValue)
public static RecipeData ConvertToRecipeData(JsonValue techData)
Parameters
techDataJsonValue
Returns
GetModdedRecipeData(TechType)
public static RecipeData GetModdedRecipeData(TechType techType)
Parameters
techTypeTechType- The TechType whose RecipeData you want to access.
Returns
- RecipeData
- The RecipeData from the modded item if it exists; Otherwise, returns
null.
GetRecipeData(TechType)
public static RecipeData GetRecipeData(TechType techType)
Parameters
techTypeTechType- The TechType whose RecipeData you want to access.
Returns
- RecipeData
- The RecipeData from the item if it exists; Otherwise, returns
null.
RemoveFromGroup(TechGroup, TechCategory, TechType)
public static void RemoveFromGroup(TechGroup group, TechCategory category, TechType techType)
Parameters
groupTechGroup- The TechGroup in which the TechType is located.
categoryTechCategory- The TechCategory in which the TechType is located.
techTypeTechType- The TechType which you want to remove.
SetBackgroundType(TechType, BackgroundType)
Allows you to edit inventory background colors for TechTypes.
public static void SetBackgroundType(TechType techType, CraftData.BackgroundType backgroundColor)
Parameters
techTypeTechType- The TechType whose BackgroundType you want to edit.
backgroundColorCraftData.BackgroundType- The background color for that TechType.
- See Also
-
CraftData.BackgroundType
SetColdResistance(TechType, int)
Allows you to edit the Cold Resistance of a TechType.
Can be used for existing TechTypes too.
public static void SetColdResistance(TechType uncooked, int resistance)
Parameters
uncookedTechType- The TechType whose Cold Resistance to edit.
resistanceint- The Cold Resistance for that TechType.
SetCookedVariant(TechType, TechType)
Allows you to edit the cooked creature list, i.e. associate the unedible TechType to the cooked TechType.
Can be used for existing TechTypes too.
public static void SetCookedVariant(TechType uncooked, TechType cooked)
Parameters
uncookedTechType- The TechType whose cooked creature counterpart to edit.
cookedTechType- The cooked creature counterpart for that TechType.
SetCraftingTime(TechType, float)
Allows you to edit crafting times for TechTypes.
Can be used for existing TechTypes too.
public static void SetCraftingTime(TechType techType, float time)
Parameters
techTypeTechType- The TechType whose crafting time you want to edit.
timefloat- The crafting time, in seconds, for that TechType.
SetDropSound(TechType, string)
public static void SetDropSound(TechType consumable, string soundPath)
Parameters
consumableTechType- The item to add the new drop sound to.
soundPathstring- The sound path. A list of all sound paths can be viewed
on this page.
The default sound is "event:/tools/pda/drop_item".
SetEatingSound(TechType, string)
public static void SetEatingSound(TechType consumable, string soundPath)
Parameters
consumableTechType- The item being consumed during Survival.Eat(UnityEngine.GameObject).
soundPathstring- The sound path.
Valid values are - "event:/player/drink" - "event:/player/drink_stillsuit" - "event:/player/use_first_aid" - "event:/player/eat" (default)
SetEnergyCost(TechType, double)
Allows you to edit EnergyCost for TechTypes. Can be used for existing TechTypes too.
Careful: This has to be called after SetRecipeData(TechType, RecipeData).
public static void SetEnergyCost(TechType techType, double energyCost)
Parameters
techTypeTechType- The TechType wose EnergyCost you want to edit
energyCostdouble- The EnergyCost for that TechType.
SetEnergyCost(TechType, float)
public static void SetEnergyCost(TechType techType, float energyCost)
Parameters
techTypeTechType- The TechType whose EnergyCost you want to edit.
energyCostfloat- The energy cost.
SetEquipmentType(TechType, EquipmentType)
Allows you to edit EquipmentTypes for TechTypes.
Can be used for existing TechTypes too.
public static void SetEquipmentType(TechType techType, EquipmentType equipmentType)
Parameters
techTypeTechType- The TechType whose EqiupmentType you want to edit.
equipmentTypeEquipmentType- The EquipmentType for that TechType.
SetHarvestFinalCutBonus(TechType, int)
Allows you to edit how much additional slices/seeds are given upon last knife hit.
Can be used for existing TechTypes too.
public static void SetHarvestFinalCutBonus(TechType techType, int bonus)
Parameters
techTypeTechType- The TechType whose final cut bonus you want to edit.
bonusint- The number of additional slices/seeds you'll receive on last cut.
SetHarvestOutput(TechType, TechType)
Allows you to edit harvest output, i.e. what TechType you get when you "harvest" a TechType.
Can be used for existing TechTypes too.
public static void SetHarvestOutput(TechType techType, TechType harvestOutput)
Parameters
techTypeTechType- The TechType whose harvest output you want to edit.
harvestOutputTechType- The harvest output for that TechType.
SetHarvestType(TechType, HarvestType)
Allows you to edit how TechTypes are harvested.
Can be used for existing TechTypes too.
public static void SetHarvestType(TechType techType, HarvestType harvestType)
Parameters
techTypeTechType- The TechType whose HarvestType you want to edit.
harvestTypeHarvestType- The HarvestType for that TechType.
SetIngredients(TechType, ICollection<Ingredient>)
Allows you to edit recipes for TechTypes.
Can be used for existing TechTypes too.
public static void SetIngredients(TechType techType, ICollection<Ingredient> ingredients)
Parameters
techTypeTechType- The TechType whose RecipeData you want to edit.
ingredientsICollection<Ingredient>- The collection of Ingredients for that TechType.
- See Also
-
Ingredient
SetItemSize(TechType, int, int)
Allows you to edit item sizes for TechTypes.
Can be used for existing TechTypes too.
public static void SetItemSize(TechType techType, int x, int y)
Parameters
techTypeTechType- The TechType whose item size you want to edit.
xint- The width of the item
yint- The height of the item
SetItemSize(TechType, Vector2int)
Allows you to edit item sizes for TechTypes.
Can be used for existing TechTypes too.
public static void SetItemSize(TechType techType, Vector2int size)
Parameters
techTypeTechType- The TechType whose item size you want to edit.
sizeVector2int- The item size for that TechType.
SetLinkedItems(TechType, ICollection<TechType>)
Allows you to edit Linked Items for TechTypes.
Can be used for existing TechTypes too.
public static void SetLinkedItems(TechType techType, ICollection<TechType> linkedItems)
Parameters
techTypeTechType- The TechType whose RecipeData you want to edit.
linkedItemsICollection<TechType>- The collection of Ingredients for that TechType.
- See Also
-
Ingredient
SetMaxCharge(TechType, double)
Allows you to edit MaxCharge for TechTypes. Can be used for existing TechTypes too.
Careful: This has to be called after SetRecipeData(TechType, RecipeData).
public static void SetMaxCharge(TechType techType, double maxCharge)
Parameters
techTypeTechType- The TechType whose MaxCharge you want to edit.
maxChargedouble- The MaxCharge for that TechType.
SetMaxCharge(TechType, float)
public static void SetMaxCharge(TechType techType, float maxCharge)
Parameters
techTypeTechType- The TechType whose MaxCharge you want to edit.
maxChargefloat- The maximum charge.
SetPickupSound(TechType, string)
public static void SetPickupSound(TechType consumable, string soundPath)
Parameters
consumableTechType- The item to add the new pickup sound to.
soundPathstring- The sound path. A list of all sound paths can be viewed
on this page.
The default sound is "event:/loot/pickup_default".
SetQuickSlotType(TechType, QuickSlotType)
Allows you to edit QuickSlotType for TechTypes. Can be used for existing TechTypes too.
Careful: This has to be called after SetRecipeData(TechType, RecipeData).
public static void SetQuickSlotType(TechType techType, QuickSlotType slotType)
Parameters
techTypeTechType- The TechType whose QuickSlotType you want to edit.
slotTypeQuickSlotType- The QuickSlotType for that TechType.
SetRecipeData(TechType, RecipeData)
Allows you to add or edit RecipeData for TechTypes.
Can be used for existing TechTypes too.
public static void SetRecipeData(TechType techType, RecipeData recipeData)
Parameters
techTypeTechType- The TechType whose RecipeData you want to edit.
recipeDataRecipeData- The RecipeData for that TechType.
- See Also