GE Lua Documentation

Press F to search!

formatFacilityToRawPoi

Definition


-- @/lua/ge/extensions/freeroam/facilities.lua:411


local function formatFacilityToRawPoi(f, elements)
  if not f then return end
  local e = M[facilityPoiDefaults[f.type].clusterType.."FormatFacility"](f, elements)
  if e then
    -- put in the default values for this facility, if the facility itself did not define it
    for key, value in pairs(facilityPoiDefaults[f.type]) do
      e[key] = f[key]
      if e[key] == nil then
        e[key] = value
      end
    end
    table.insert(elements, e)
  end
end

Callers

@/lua/ge/extensions/gameplay/rawPois.lua
      local garage = freeroam_facilities.getFacility("computer", "servicestationGarageComputer")
      freeroam_facilities.formatFacilityToRawPoi(garage, elements)
      return elements, rawPoiGeneration