EVA refueler - Goufalite/OreToParts GitHub Wiki

In stock, KSP refuels for free all EVA tanks (jetpacks and cylinder).

But in 1.11.1 a new field was added to prevent this: reinitResourcesOnStoreInVessel. So if you want to prevent jetpacks and cylinders from refueling, make the inventory of kerbals persistent in the difficulty settings and apply this patch:

@PART[evaJetpack]
{
    @MODULE[ModuleCargoPart]
    {
        %reinitResourcesOnStoreInVessel = false
    }
}

@PART[evaCylinder]
{
    @MODULE[ModuleCargoPart]
    {
        %reinitResourcesOnStoreInVessel = false
    }
}

Let's get technical!

The EVA refueler module can identify which cargo part has EVA Propellant stored in an inventory part and try to refuel them. More info in the ModuleEvaRefueler.cs file. In short the amount of fuel is stored here:

inventory.storedParts[i].snapshot.resources["EVA Propellant"].amount

After refueling, an inventory update is in order

inventory.storedParts[i].snapshot.resources["EVA Propellant"].amount = inventory.storedParts[i].snapshot.resources["EVA Propellant"].maxAmount;
inventory.storedParts[i].snapshot.resources["EVA Propellant"].UpdateConfigNodeAmounts();
GameEvents.onModuleInventoryChanged.Fire(inventory);