:: VehiclesWidgets[widget]
<<widget 'leaveVehicle'>>
	<<run $inventory.metadataUpdate($pc.vehicleInUse,'vehicles',{parkedAt:$location.passage})>>
	<<set $pc.vehicleInUse = null>>
<</widget>>
<<widget 'useVehicle'>>
    <<set $pc.vehicleInUse = _args[0]>>
<</widget>>

:: VehiclePassages[include]
    <<switch $pc.vehicleType>>
		<<case 'car'>>
            <<act 'Park your car here'>>
                <<addtime 3>>
				<<leaveVehicle>>
                <<gt $location>>
            <</act>>
        <<case 'walk'>>
            <<for _carId, _carMetaData range $inventory.itemsInContainerByMetadata({type:'car'},'vehicles',false)>>
				<<if _carMetaData.parkedAt == $location.passage>>
					<<act `'Drive your '+_carMetaData.label` undefined `{capture:['_carId']}`>>
						<<addtime 3>>
						<<useVehicle _carId>>
						<<gt $location>>
					<</act>>
				<</if>>
            <</for>>
    <</switch>>