GE Lua Documentation

Press F to search!

formatGasStationPoi

Definition


-- @/lua/ge/extensions/freeroam/gasStations.lua:52

local function formatGasStationPoi(gasStation)
  local center, radius = gasStationCenterRadius(gasStation)
  local isElectric = tableValuesAsLookupDict(gasStation.energyTypes or {"any"}).electricEnergy
  local elem = {
    id = gasStation.id,
    data = { type = "gasStation", facility = gasStation},
    markerInfo = {
      gasStationMarker = {pumps = gasStation.pumps, pos = center, radius = radius, electric = isElectric},
      bigmapMarker = { pos = center, icon = isElectric and "poi_charge_round" or "poi_fuel_round", name = gasStation.name, description = gasStation.description, thumbnail = gasStation.preview, previews = {gasStation.preview}, cardIcon = isElectric and "charge" or "fuelPump"}
    }
  }
  return elem
end

Callers

@/lua/ge/extensions/gameplay/rawPois.lua
      local elements = {
        freeroam_gasStations.formatGasStationPoi(gasStation)
      }
@/lua/ge/extensions/freeroam/gasStations.lua
    for i, gasStation in ipairs(facilities.gasStations or {}) do
      table.insert(elements, formatGasStationPoi(gasStation))
    end