Skip to content

ui_router_routes_firstDrive

File: lua/ge/extensions/ui/router/routes/firstDrive.lua · VM: Game Engine (GE) · 98 lines · BeamNG.drive 0.40.5 (buildbot 302427 on GitLab)

Access: extension ui_router_routes_firstDrive: extensions.load("ui_router_routes_firstDrive"), then the global ui_router_routes_firstDrive

Routes of the guided first drive (Vue): introduction, onboarding, arrival, completion, recovery, learning areas. Back is locked (firstDriveLockedHandler) except onboarding (previousRouteBackHandler). The onMount/onEnter/onLeave hooks call gameplay_discover_firstDrive_experience.

Notes

  • Route configuration module: it exports no function. routeManager reads it (via the ui_router_routes_ extension) when routes.lua includes it with { include = "<name>" }.
  • The keys of Children form the segments of the dotted name: ".". children (lowercase) in a node designates its sub-routes; include mounts another module there.
  • ui is inherited by child routes (uiTypes, uiTypesFilter, infoBar, topBar, uiApps, uiNav, triggerPause): a child redefines it only for what changes.

Fields

Field Type Description
Children table onboarding (infoBar visible), arrival, completion (dedicated onMount, locked back), recovery (backTarget play, onLeave onFirstDriveRecoveryRouteLeave), learning (backTarget pause, dedicated onEnter/onLeave, triggerPause = true, scope first-drive-learning-areas).
ModuleName string Name of the routes module (first segment of the dotted name).
Root table {screenId = "firstDrive", onMount = "gameplay_discover_firstDrive_experience.onFirstDriveRouteMount", back = handler firstDriveLockedHandler, scopeTree first-drive-intro, ui = Vue, bars hidden, uiApps hidden, triggerPause = false}

tim19Atlas (Tim0219800) — derived from BeamNG GmbH Lua code (bCDDL 1.1, see LICENSE). Source: lua/ge/extensions/ui/router/routes/firstDrive.lua.