Skip to content

Fix EVA refuel for custom inventory propellants - #416

Open
sdy623 wants to merge 1 commit into
ihsoft:masterfrom
sdy623:codex/fix-eva-inventory-propellant-resource
Open

Fix EVA refuel for custom inventory propellants#416
sdy623 wants to merge 1 commit into
ihsoft:masterfrom
sdy623:codex/fix-eva-inventory-propellant-resource

Conversation

@sdy623

@sdy623 sdy623 commented Aug 30, 2026

Copy link
Copy Markdown

Fixes #415.

Summary

  • Match stock-inventory resource snapshots against the active EVA propellant resource.
  • Preserve the existing behavior for stock EVA Propellant while supporting configurations such as Kerbalism / Realism Overhaul using Nitrogen.

Cause

RefillEvaPack already obtains the active runtime PartResource from KerbalEVA.propellantResource, but the subsequent KSP 1.11+ inventory lookup ignores it and filters snapshots using StockResourceNames.EvaPropellant.

When the stored evaJetpack snapshot contains Nitrogen, the query returns no resources and KIS reports:

Unexpectedly no EVA resource parts found in: kerbalEVA

Change

Use the resource name from the active runtime propellant:

-.Where(x => x.resourceName == StockResourceNames.EvaPropellant)
+.Where(x => x.resourceName == propellantResource.resourceName)

This is intentionally limited to the target stock-inventory lookup. It does not change canister supply-resource handling or Kerbalism's boarding behavior.

Validation

  • Confirmed the same hard-coded path in KIS 1.29 and current master.
  • Confirmed an affected KSP 1.12.5 save stores Nitrogen under ModuleInventoryPart / STOREDPART (evaJetpack) / RESOURCE, rather than as a matching resource directly on kerbalEVA.
  • Compiled the patched KIS source successfully against the installed KSP 1.12.5 assemblies (local build-only target: .NET Framework 4.8; no project-file changes are included in this PR).
  • Verified the branch is one commit ahead of master and changes one line in one file.
  • Full in-game verification is still pending.

Related issue

#360 made the canister's source resource configurable. This change covers the remaining hard-coded target-resource lookup in the stock-inventory path.

@sdy623
sdy623 marked this pull request as ready for review August 30, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EVA canister refuel misses inventory jetpacks using custom propellant resources

1 participant