/** * <summary>Runs one of the item's 'Use' interactions.</summary> * <param name = "iconID">The ID number of the CursorIcon associated with the use interaction. If no number is supplied, the default use interaction will be run.</param> */ public void RunUseInteraction(int iconID = -1) { InvInstance newInstance = new InvInstance(this); if (iconID < 0) { newInstance.Use(); } else { newInstance.Use(iconID); } }
/** * <summary>Runs the item's default 'Use' interactions. This is the first defined 'Standard Interaction' in the item's properties.</summary> */ public void RunDefaultInteraction() { if (interactions != null && interactions.Count > 0) { InvInstance newInstance = new InvInstance(this); newInstance.Use(interactions[0].icon.id); } }