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)
public static void AddToGroup(TechGroup group, TechCategory category, TechType techType, TechType after)
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.
afterTechType- Added TechType will be added after this TechType, for sorting purposes.
ConvertToRecipeData(ITechData)
public static RecipeData ConvertToRecipeData(ITechData iTechData)
Parameters
iTechDataITechData
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
- Returns RecipeData 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
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.
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.
Value values are - "event:/player/drink" - "event:/player/drink_stillsuit" - "event:/player/use_first_aid" - "event:/player/eat" (default)
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.
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.
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, ITechData) and 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, ITechData)
Allows you to edit recipes, i.e. RecipeData for TechTypes.
Can be used for existing TechTypes too.
public static void SetRecipeData(TechType techType, ITechData techData)
Parameters
techTypeTechType- The TechType whose RecipeData you want to edit.
techDataITechData- The ITechData for that TechType.
- See Also
SetRecipeData(TechType, RecipeData)
Allows you to edit recipes, i.e. 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