ORK Framework  2.27.1
API Documentation
ORKFramework.CraftingRecipe Class Reference
Inheritance diagram for ORKFramework.CraftingRecipe:
ORKFramework.BaseLanguageData ORKFramework.IContent ORKFramework.IPortraitContent ORKFramework.BaseIndexData ORKFramework.IContentSimple ORKFramework.IContentSimple ORKFramework.BaseData ORKFramework.IBaseData

Public Member Functions

 CraftingRecipe (string name)
 
override void SetData (DataObject data)
 Sets the variables of the class using a ORKFramework.DataObject. More...
 
List< ItemGainSimpleGetSummedUpIngredients (Combatant combatant)
 
List< ItemGainSimpleGetSummedUpIngredients (Combatant combatant, ItemGain[] items)
 
bool CanCreate (Combatant combatant)
 
bool CanCreate (Combatant combatant, List< IShortcut > items, CraftingListCreationType creationType)
 
void CreateItem (Combatant combatant, NotifyBool notify)
 Creates the outcome of the crafting recipe. More...
 
void CreateItem (Combatant combatant, List< IShortcut > list, CraftingListCreationType creationType, NotifyBool notify)
 
override string GetIconTextCode ()
 
IContentSimple GetTypeContent ()
 
string GetInfo (Combatant combatant)
 
IPortrait GetPortrait (int typeID)
 
- Public Member Functions inherited from ORKFramework.BaseLanguageData
 BaseLanguageData (string name)
 
void SetLanguageName (string name)
 
virtual string GetName ()
 
virtual string GetShortName ()
 
virtual string GetDescription ()
 
virtual Texture GetIcon ()
 
virtual GUIContent GetContent ()
 
- Public Member Functions inherited from ORKFramework.BaseData
virtual DataObject GetData ()
 Gets a ORKFramework.DataObject representing the class. More...
 
virtual void EditorAutoSetup (string fieldName)
 Called for all fields using the autoSetup option of the ORKFramework.ORKEditorLayoutAttribute. More...
 

Public Attributes

int typeID = 0
 
bool consume = false
 
float sympathyChange = 0
 
bool useChance = false
 
FloatValue chance
 
AssetSource< ORKGameEventfailGameEvent = new AssetSource<ORKGameEvent>()
 
bool failEventWait = false
 
bool useCriticalChance = false
 
FloatValue criticalChance
 
AssetSource< AudioClip > successClip = new AssetSource<AudioClip>()
 
float successVolume = 1
 
AssetSource< AudioClip > failClip
 
float failVolume = 1
 
AssetSource< AudioClip > criticalClip
 
float criticalVolume = 1
 
ItemPrefabSettings prefabSettings = new ItemPrefabSettings()
 
PriceSettings price = new PriceSettings()
 
bool useRequirements = false
 
SimpleCombatantRequirement requirement
 
AssetSource< ORKGameEventpreGameEvent = new AssetSource<ORKGameEvent>()
 
bool preEventPerItem = false
 
SimpleCombatantRequirement preEventRequirement
 
bool ingredientShowNotification = true
 
bool ingredientShowConsole = true
 
AssetSource< ORKGameEventingredientGameEvent = new AssetSource<ORKGameEvent>()
 
bool ingredientEventWait = false
 
bool ingredientEventPerItem = false
 
ItemGain [] ingredient = new ItemGain[] {new ItemGain()}
 
bool outcomeShowNotification = true
 
bool outcomeShowConsole = true
 
AssetSource< ORKGameEventoutcomeGameEvent = new AssetSource<ORKGameEvent>()
 
bool outcomeEventWait = false
 
bool outcomeEventPerItem = false
 
ItemGain [] outcome = new ItemGain[] {new ItemGain()}
 
bool critOutcomeShowNotification = true
 
bool critOutcomeShowConsole = true
 
AssetSource< ORKGameEventcritOutcomeGameEvent = new AssetSource<ORKGameEvent>()
 
bool critOutcomeEventWait = false
 
bool critOutcomeEventPerItem = false
 
ItemGain [] critOutcome = new ItemGain[] {new ItemGain()}
 
bool ownLayout = false
 
CraftingRecipeLayout layout
 
bool ownNotifications = false
 
CraftingNotification learnedNotification
 
CraftingNotification forgottenNotification
 
CraftingNotification finishedNotification
 
CraftingNotification failedNotification
 
bool ownConsoleLearning = false
 
ConsoleTextCrafting consoleLearning
 
bool ownConsoleForgetting = false
 
ConsoleTextCrafting consoleForgetting
 
TypePrefabViewPortrait [] portrait = new TypePrefabViewPortrait[0]
 
- Public Attributes inherited from ORKFramework.BaseLanguageData
LanguageContent [] languageInfo
 

Properties

int TypeID [get]
 
int ItemTypeID [get]
 
- Properties inherited from ORKFramework.BaseLanguageData
virtual int ID [get]
 
- Properties inherited from ORKFramework.BaseIndexData
virtual int RealID [get, set]
 
- Properties inherited from ORKFramework.IContentSimple
int ID [get]
 
- Properties inherited from ORKFramework.IContent
int TypeID [get]
 

Additional Inherited Members

- Protected Attributes inherited from ORKFramework.BaseIndexData
int realID = 0
 

Member Function Documentation

◆ CreateItem()

void ORKFramework.CraftingRecipe.CreateItem ( Combatant  combatant,
NotifyBool  notify 
)

Creates the outcome of the crafting recipe.

Parameters
recipeIDThe ID/index of the crafting recipe.
notifyA callback function taking a bool parameter (true if crafting was successful).

◆ SetData()

override void ORKFramework.CraftingRecipe.SetData ( DataObject  data)
virtual

Sets the variables of the class using a ORKFramework.DataObject.

Parameters
dataORKFramework.DataObject containing the data.

Reimplemented from ORKFramework.BaseData.