Skip to content

Fix garage refuel handling of bad/old state data - #3913

Open
jaj22 wants to merge 1 commit into
official-antistasi-community:unstablefrom
jaj22:fix-garage-refuel-bad-data
Open

Fix garage refuel handling of bad/old state data#3913
jaj22 wants to merge 1 commit into
official-antistasi-community:unstablefrom
jaj22:fix-garage-refuel-bad-data

Conversation

@jaj22

@jaj22 jaj22 commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

What type of PR is this.

  1. Bug
  2. Change
  3. Enhancement

What have you changed and why?

  1. If you put a fuel vehicle into the garage with ACE loaded, it'll write the vanilla fuel cargo as -1. This was then used for calculations of available fuel, causing ACE + non-ACE garaged tankers to report 0 fuel total. It also broke the actual refuel function. Fixed with a scattering of 0 max.

  2. At some point the garage was capable of writing nil as the ACE fuel cargo. If then used with ACE, the refuel function would do its crackheaded infinite loop and then fail to refuel anything. Fixed with a nil check.

Also sanitized some related code. Should really rework the refuel function to be less dangerous but maybe later.

Please specify which Issue this PR Resolves.

closes #XXXX

Please verify the following and ensure all checks are completed.

  1. Have you loaded the mission in LAN host?
  2. Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. No
  2. Yes (Please provide further detail below.)

@jaj22 jaj22 added this to the 3.12.0 milestone Apr 10, 2026
@jaj22 jaj22 added Bug Something isn't working Review pending labels Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Review pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant