Barotrauma

Barotrauma

BetterHealthUI (Updated)
NT Gel Ice Pack use modification
Hi, I'm trying to make a modification that checks for the Neurotrauma gel ice pack condition, and searches for another one of sufficient condition, when used from the health UI recommended treatment panel. End goal is to make use of any ice packs in the inventory, not just the first one.
But I'm really not at all familiar with C# and C# for Baro, so I'm sure my syntax is wrong somewhere, and it isn't working. I insert the following new line below line 349, in what I believe to be the relevant section.

if (item == gelipack && it.ConditionPercentage < 0.35f) if (item == gelipack && it.ConditionPercentage < 0.35f) { Character.Controlled.Inventory.FindItem(it => it.Prefab == gelipack && it.ConditionPercentage >=0.35f, recursive: true); }

Could you tell me how I've messed it up?