Skip to content

Bug fixes related to electric-powered vehicles#327

Open
oelsart wants to merge 2 commits into
SmashPhil:developfrom
oelsart:fix-electric-vehicles
Open

Bug fixes related to electric-powered vehicles#327
oelsart wants to merge 2 commits into
SmashPhil:developfrom
oelsart:fix-electric-vehicles

Conversation

@oelsart
Copy link
Copy Markdown
Contributor

@oelsart oelsart commented Apr 12, 2026

I found a few bugs related to electric-powered vehicles.
https://gist.github.com/HugsLibRecordKeeper/8dc833082dfc4f8ffb2677b60ef3b273

  1. Charging is not available unless the vehicle is in a state of consuming fuel.
image

It won't charge even when connected to power.
--> Changed to perform charging and discharging before the ShouldConsumeNow check.

  1. Errors when the parent of a connected power comp despawns.
    --> Changed to check whether connectedPower.PowerNet exists within CompTick. And Charging property is referenced outside of the ticks, so I added a null check to PowerNet.

  2. Errors in the tooltips and information cards for electric vehicles.

image

--> Corrected the fuel label to Wd in the gizmo and to Electricity in the info card.

  1. The charge setting does not toggle when clicking the fuel gizmo icon.
    --> Changed ToggleAutoRefuel to ToggleSwitch.

oelsart added 2 commits April 13, 2026 05:07
- Ensured that electric-powered vehicles can charge and discharge regardless of whether they consume fuel.
- Fixed errors that occurred when connectedPower despawned.
- Fixed and tooltip error on refuel gizmo.
- Resolved issue where refuel gizmo button fails to trigger ToggleCharging.
- Fixed errors within the info card.
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.

1 participant