ORK Framework  2.26.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.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)
 
IInventoryShortcut Split (int newQuantity)
 
IShortcut GetCopy (int newQuantity)
 
bool IsEqual (IShortcut shortcut)
 
int BuyPrice (Combatant user)
 
int SellPrice (Combatant user)
 
EquipmentLevel GetEquipmentLevel ()
 
EquipRequirements GetEquipRequirements ()
 
bool IsType (EquipSet t)
 
float GetOccupiedSpace (int quantity)
 
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, SimpleOperator 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)
 
int GetAbilityLearnPoints (int index)
 
void AddAbilityLearnPoints (int index, int value)
 
void GetBonus (ref StatusPreviewInformation info)
 
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)
 
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 ()
 
string GetName ()
 
void SetName (string name)
 
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, int id)
 
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 Attributes

float timestamp = 0
 

Properties

virtual string GUID [get, set]
 
int Quantity [get, set]
 
bool Sellable [get]
 
EquipSet Type [get]
 
int Level [get]
 
int LevelPoints [get]
 
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]
 
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]
 
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]
 
- 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]
 

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.