/** * <summary>Generates data to save about an item instance in a single string.</summary> * <param name = "invInstance">The inventory item instance to save</param> * <returns>Save data for the instance as a single string</returns> */ public static string GetSaveData(InvInstance invInstance) { string dataString = string.Empty; if (IsValid(invInstance)) { dataString += invInstance.itemID.ToString(); dataString += SaveSystem.colon; dataString += invInstance.count.ToString(); dataString += SaveSystem.colon; dataString += invInstance.GetPropertySaveData(); dataString += SaveSystem.pipe; } else if (KickStarter.settingsManager.canReorderItems) { dataString += "-1"; dataString += SaveSystem.colon; dataString += "0"; dataString += SaveSystem.colon; dataString += "_"; dataString += SaveSystem.pipe; } return(dataString); }