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

Local speed limit #172

Merged
merged 1 commit into from
Aug 7, 2022
Merged

Local speed limit #172

merged 1 commit into from
Aug 7, 2022

Conversation

Fusselwurm
Copy link
Member

@Fusselwurm Fusselwurm commented Aug 6, 2022

extending the functionality of #170 : add another speed limit option for towns.

it's a bit rough, as it uses location data (locations are circles, and cities are not necessarily circlish), but it works nicely as a first approximation.

default speed limit within towns is 30km/h

fallout from this change includes:

  • an array of local civilian vehicles
  • local speed limit indicator in the debug "show info line: speed" display
  • add diagnostics option to show speed limits on map
  • a variable on the vehicles denoting their current speed limit
  • for scripting : a global var containing custom speed limits (gets read contonuously). speed limits are applied after town speed limits in the order they appear in this GVAR.
  • speed limits are now set from the cars addon, which nicely keeps that whole functionality from the other behavioral stuff in voyagers / transit addons

@Fusselwurm Fusselwurm marked this pull request as ready for review August 6, 2022 20:32
@Fusselwurm Fusselwurm force-pushed the local-speed-limit branch 2 times, most recently from a0bcf8a to 0ec5cf6 Compare August 7, 2022 20:41
* add additional config `EGVAR(cars,townSpeedLimit)`
* use map locations to determine if a vehicle is in a town
* add speed limit zones to diagnostics views
* add EGVAR(cars,customSpeedLimits) that may contain speed
  limits defined by a tuple (Location, number)
@Fusselwurm Fusselwurm merged commit 4c70e2b into main Aug 7, 2022
@Fusselwurm Fusselwurm deleted the local-speed-limit branch August 7, 2022 21:32
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