ORK Framework  2.34.1
API Documentation
ORKFramework.EquipShortcut Class Reference
Inheritance diagram for ORKFramework.EquipShortcut:
ORKFramework.IInventoryShortcut ORKFramework.IStatusChanged ORKFramework.IRenameable ORKFramework.ICallCombatantSelection ORKFramework.ILevelUpSpend ORKFramework.ILevelUpCostText ORKFramework.IKeyEventStarter ORKFramework.IShortcut ORKFramework.IGUID ORKFramework.IMarkNewContent ORKFramework.IVariableSource ORKFramework.ITimestamp ORKFramework.IContent ORKFramework.ISaveData ORKFramework.CoreIShortcut ORKFramework.IPreviewable ORKFramework.IPortraitContent ORKFramework.IContentSimple ORKFramework.IContent ORKFramework.IContentSimple

Public Member Functions

 EquipShortcut (EquipSet type, int id, int level, int quantity)
 
virtual void NewGUID (Combatant fromInventory)
 
IInventoryShortcut Split (int newQuantity)
 
IShortcut GetCopy (int newQuantity)
 
bool IsEqual (IShortcut shortcut)
 
string FormatQuantity (int quantity)
 
int BuyPrice (Combatant user)
 
int SellPrice (Combatant user)
 
string FormatLevelPoints (int value)
 
EquipmentLevel GetEquipmentLevel ()
 
EquipRequirements GetEquipRequirements ()
 
bool IsType (EquipSet t)
 
float GetOccupiedSpace (int quantity)
 
int GetQuantityForSpace (float availableSpace)
 
virtual SelectedDataHandler GetSelectedData ()
 
void StartKeyEvent (string eventKey, object eventObject, object startingObject, VariableHandler localVariables, Notify finishedCallback)
 
void InitVariables ()
 
void UpdateVariableChanges ()
 
void UsesExperience (Combatant combatant, int points)
 
void CheckLevelUp (Combatant combatant, int points)
 
bool CanLevelUp ()
 
bool CanLevelUpSpend (Combatant combatant)
 
void SpendExperience (Combatant combatant)
 
string GetLevelUpCostString (Combatant combatant)
 
void ChangeStatusValueBonus (int statusValueID, int value, FormulaOperator op)
 
bool CanEquip (Combatant combatant)
 
void Equipped (Combatant combatant)
 
void Unequipped (Combatant combatant)
 
AbilityShortcut GetCurrentBaseAttack (int index)
 
bool GetBaseAttacks (ref List< AbilityShortcut > list)
 
AbilityShortcut GetCounterAttack ()
 
void CheckAbilities (Combatant c)
 
void GetBonus (ref StatusPreviewInformation info)
 
int GetStatusValueBonus (Combatant user, int statusValueID)
 
void GetDefenceAttributeIDs (ref int[] id)
 
void SetStartEffects (Combatant owner)
 
void RemoveStartEffects (Combatant owner)
 
bool CanApplyEffect (Combatant owner, int effectID)
 
bool CanRemoveEffect (Combatant owner, int effectID)
 
void SetDurability (float durability, float maxDurability)
 
bool DurabilityCanUse ()
 
float GetMaxDurability (Combatant combatant)
 Calculates the maximum durability of the equipment for a defined combatant. More...
 
void InitDurability (Combatant combatant)
 Initiates the maximum durability for a defined combatant. The durability will be set or changed when it wasn't initialized before or exceeds the new maximum durability. More...
 
void ResetDurability (Combatant combatant)
 Resets the durability for a defined combatant. The durability will be set to the maximum durability. More...
 
void ChangeDurability (Combatant combatant, float value, SimpleOperator op)
 Changes the durability of the equipment. More...
 
List< CombatantGetPossibleTargets (Combatant user, List< Combatant > available)
 
bool CanTarget (Combatant user, Combatant target)
 
bool IsUseable (UseableIn useIn)
 
bool CanUse (Combatant c, bool checkTime, bool checkUseCosts)
 
bool IsDropable ()
 
void CallCombatantSelection (BaseMenuPart parent, bool useAction)
 
bool Use (Combatant user, List< Combatant > targets, bool useAction)
 
IContentSimple GetTypeContent ()
 
ItemType GetItemType ()
 
string GetName ()
 
string GetShortName ()
 
string GetDescription ()
 
string GetIconTextCode ()
 
Texture GetIcon ()
 
GUIContent GetContent ()
 
string GetInfo (Combatant c)
 
ShortcutHUDWrapper GetDrag (Combatant user)
 
EquipmentPrefabSettings GetPrefabSettings ()
 
void RegisterStatusChanges (Combatant c)
 
void UnregisterStatusChanges (Combatant c)
 
void AttackAttributeChanged (Combatant c, int id, int id2, float change)
 
void DefenceAttributeChanged (Combatant c, int id, int id2, float change)
 
void DefenceAttributeIDChanged (Combatant c, int id, int id2)
 
void StatusValueChanged (Combatant c, int id, int change)
 
void StatusEffectChanged (Combatant c, StatusEffect effect)
 
void LevelChanged (Combatant c, int id)
 
void ClassLevelChanged (Combatant c, int id)
 
void ClassChanged (Combatant c, int id)
 
void AbilitiesChanged (Combatant c)
 
void EquipmentChanged (Combatant c)
 
void CombatantGroupChanged (Combatant combatant)
 
void CombatantInventoryChanged (Combatant combatant)
 
void CombatantBattleStateChanged (Combatant combatant)
 
void CombatantActionStateChanged (Combatant combatant)
 
void CombatantCastingStateChanged (Combatant combatant)
 
void CombatantChoosingStateChanged (Combatant combatant)
 
void CombatantTurnStateChanged (Combatant combatant)
 
void CombatantGridMoveRangeChanged (Combatant combatant)
 
void CombatantResearchChanged (Combatant combatant)
 
void CombatantAIChanged (Combatant combatant)
 
void CombatantActionBarChanged (Combatant combatant)
 
void CombatantDeathStateChanged (Combatant combatant)
 
IPortrait GetPortrait (int typeID)
 
void UnmarkID (int id)
 
bool MarkFirstAdd ()
 
bool MarkEachAdd ()
 
bool MarkEachChange ()
 
bool UnmarkView (Combatant owner, int unmarkID)
 
bool UnmarkSelection (Combatant owner, int unmarkID)
 
StatusPreview GetPreview (Combatant combatant, PreviewSelection selectedPreview)
 
DataObject SaveGame ()
 Used to save the data - you need to add the data to a ORKFramework.DataObject. More...
 
void LoadGame (DataObject data)
 Used to load the data - you need to get the data from the ORKFramework.DataObject. More...
 

Protected Member Functions

void RegisterUpdateVariables ()
 
void CheckStatus (Combatant combatant)
 

Protected Attributes

string guid = ""
 
EquipSet type = EquipSet.None
 
int id = 0
 
int level = 0
 
int quantity = 0
 
VariableHandler variableHandler
 
bool contribute = true
 
float timestamp = 0
 
GameObject viewerPrefabInstance
 
bool isNewContent = false
 
string name = ""
 
string description = ""
 
int lvlPoints = 0
 
int [] statusValue
 
int [] abilityLearnPoints
 
AttributeChange [] atkAttr
 
AttributeChange [] defAttr
 
float durability = -1
 
float maxDurability = 0
 
Equipment equipment
 
NotifyShortcut quantityChangedHandler
 

Properties

NotifyShortcut QuantityChanged
 
virtual string GUID [get, set]
 
int Quantity [get, set]
 
string QuantityFormatted [get]
 
bool Sellable [get]
 
EquipSet Type [get]
 
int Level [get]
 
string? LevelFormatted [get]
 
int LevelPoints [get, set]
 
int MinLevelPoints [get]
 
int MaxLevelPoints [get]
 
Equipment Setting [get]
 
int? ItemTypeID [get]
 
InventoryAddType InventoryAddType [get]
 
bool? InventorySpacePerStack [get]
 
int? StackLimit [get]
 
bool? Stealable [get]
 
bool Contribute [get, set]
 
float Timestamp [get, set]
 
bool HasVariables [get]
 
VariableHandler Variables [get]
 
int [] StatusValue [get, set]
 
int [] AbilityLearnPoints [get, set]
 
AttributeChange [] AttackAttribute [get, set]
 
AttributeChange [] DefenceAttribute [get, set]
 
bool UseDurability [get]
 Indicates if this equipment uses durability. More...
 
bool IsDurable [get]
 Indicates if this equipment uses durability and the durability didn't reach 0. More...
 
float Durability [get]
 The durability of the equipment. Returns -1 if the equipment doesn't use durability. More...
 
float MaxDurability [get]
 The maximum durability of the equipment. Returns 0 if the equipment doesn't use durability. More...
 
int? ID [get]
 
int? TypeID [get]
 
string RenameableName [get, set]
 
string RenameableDescription [get, set]
 
GameObject ViewerPrefabInstance [get, set]
 
bool IsNewContent [get, set]
 
- Properties inherited from ORKFramework.IInventoryShortcut
int ItemTypeID [get]
 
InventoryAddType InventoryAddType [get]
 
bool InventorySpacePerStack [get]
 
int StackLimit [get]
 
bool Stealable [get]
 
bool Sellable [get]
 
- Properties inherited from ORKFramework.IShortcut
int Quantity [get, set]
 
string QuantityFormatted [get]
 
- Properties inherited from ORKFramework.IContent
int TypeID [get]
 
- Properties inherited from ORKFramework.IContentSimple
int ID [get]
 
- Properties inherited from ORKFramework.IGUID
string GUID [get, set]
 
- Properties inherited from ORKFramework.IMarkNewContent
bool IsNewContent [get, set]
 
- Properties inherited from ORKFramework.IVariableSource
bool HasVariables [get]
 
VariableHandler Variables [get]
 
- Properties inherited from ORKFramework.ITimestamp
float Timestamp [get, set]
 
- Properties inherited from ORKFramework.IRenameable
string RenameableName [get, set]
 
string RenameableDescription [get, set]
 

Additional Inherited Members

- Events inherited from ORKFramework.IInventoryShortcut
NotifyShortcut QuantityChanged
 

Member Function Documentation

◆ ChangeDurability()

void ORKFramework.EquipShortcut.ChangeDurability ( Combatant  combatant,
float  value,
SimpleOperator  op 
)

Changes the durability of the equipment.

Parameters
combatantThe combatant used for calculating the maximum durability and notifications.
valueThe value used to change the durability.
opThe operator used to change the durability.

◆ GetMaxDurability()

float ORKFramework.EquipShortcut.GetMaxDurability ( Combatant  combatant)

Calculates the maximum durability of the equipment for a defined combatant.

Parameters
combatantThe combatant used for the calculation.
Returns
The maximum durability for the combatant.

◆ InitDurability()

void ORKFramework.EquipShortcut.InitDurability ( Combatant  combatant)

Initiates the maximum durability for a defined combatant. The durability will be set or changed when it wasn't initialized before or exceeds the new maximum durability.

Parameters
combatantThe combatant used for the calculation.

◆ LoadGame()

void ORKFramework.EquipShortcut.LoadGame ( DataObject  data)

Used to load the data - you need to get the data from the ORKFramework.DataObject.

Parameters
dataA ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

◆ ResetDurability()

void ORKFramework.EquipShortcut.ResetDurability ( Combatant  combatant)

Resets the durability for a defined combatant. The durability will be set to the maximum durability.

Parameters
combatantThe combatant used for the calculation.

◆ SaveGame()

DataObject ORKFramework.EquipShortcut.SaveGame ( )

Used to save the data - you need to add the data to a ORKFramework.DataObject.

Returns
A ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

Property Documentation

◆ Durability

float ORKFramework.EquipShortcut.Durability
get

The durability of the equipment. Returns -1 if the equipment doesn't use durability.

◆ IsDurable

bool ORKFramework.EquipShortcut.IsDurable
get

Indicates if this equipment uses durability and the durability didn't reach 0.

◆ MaxDurability

float ORKFramework.EquipShortcut.MaxDurability
get

The maximum durability of the equipment. Returns 0 if the equipment doesn't use durability.

◆ UseDurability

bool ORKFramework.EquipShortcut.UseDurability
get

Indicates if this equipment uses durability.