Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing time for stationary generators and other immobile vehicles #63206

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

cake-pie
Copy link
Contributor

@cake-pie cake-pie commented Jan 20, 2023

Summary

Features "Passing time for stationary generators and other immobile vehicles"

Purpose of change

Resolves #63135

Describe the solution

Full range of checks for situations permitting / not permitting passing of time while in control of a vehicle

  • Rail vehicle on rails: always allowed, control is optional. (Assumes no broken rails.)
  • Aircraft in flight: never allowed, even if in stationary hover (which still consumes fuel, what if you run out?)
  • Falling vehicle: no, it's moving!
  • Moving vehicle: of course not
  • Stationary vehicle (velocity == 0) with a nonzero target speed (cruise_velocity):
    • viable watercraft (enough flotation) floating in water: no, it will move
    • viable land vehicle (enough wheels) on ground or fording shallow water: nope
    • neither of the above: yes! \o/
  • Non-viable watercraft (insufficient flotation) in deep water: no, it will sink
  • Anything else (e.g. sitting at the controls of a stationary vehicle (velocity == 0) with no intention of accelerating (cruise_velocity == 0)): yes, but this was already possible before.

Describe alternatives you've considered

Just slapping a check for insufficient wheels and calling it done.

Testing

  • debug spawn a children's tricycle
  • install bicycle alternator and storage battery
  • remove wheels
  • use debug to drain half of the charge out of the battery
  • hop on, take control and press up arrow a couple times to start pedaling
  • observe that cruise speed > 0 while actual speed still 0
  • press | to pass time while remaining at vehicle controls
  • pick something like 30min to 1 hour, watch as time passes
  • check that battery has been charged up

Additional context

immobileveh-passtime

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 20, 2023
@dseguin dseguin merged commit 200e84d into CleverRaven:master Jan 30, 2023
@cake-pie cake-pie deleted the quickfix-63135 branch January 30, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make it possible to pass time while driving a vehicle (meant for power gen)
2 participants