setSites
Definition
-- @/lua/ge/extensions/gameplay/parking.lua:45
local function setSites(data) -- sets sites data, can override the default sites data
if type(data) == "string" then
if FS:fileExists(data) then
sites = gameplay_sites_sitesManager.loadSites(data)
end
elseif type(data) == "table" and data.parkingSpots then -- assuming that given data is valid sites data
sites = data
else
sites = nil
end
parkingSpotsAmount = sites and #sites.parkingSpots.sorted or 0
end
Callers
@/lua/ge/extensions/editor/sitesEditor/sortedListDisplay.lua
function C:setSites(sites)
self.sites = sites
self.sorted = sites[self.key].sorted
self.elementEditor:setSites(sites)
@/lua/ge/extensions/editor/sitesEditor/locations.lua
function C:setSites(sites)
self.sites = sites
@/lua/ge/extensions/editor/sitesEditor/tags.lua
function C:setSites(sites)
self.sites = sites
@/lua/ge/extensions/editor/sitesEditor.lua
for _, window in ipairs(windows) do
window:setSites(currentSites)
window:unselect()
for _, window in ipairs(windows) do
window:setSites(currentSites)
window:unselect()
currentWindow = window
currentWindow:setSites(currentSites)
currentWindow:selected()
for _, window in ipairs(windows) do
window:setSites(currentSites)
window:unselect()
currentWindow = windows[1]
currentWindow:setSites(currentSites)
currentWindow:selected()
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/setupParkedCars.lua
self.mgr.modules.traffic:deactivateParkedCars()
gameplay_parking.setSites()
end
if self.pinIn.sitesData.value then
gameplay_parking.setSites(self.pinIn.sitesData.value)
end
@/lua/ge/extensions/editor/sitesEditor/parkingSpots.lua
function C:setSites(sites)
for _, ps in ipairs(sites.parkingSpots.sorted) do -- fixes rotations due to auto rotation adjustments of multispots
@/lua/ge/extensions/editor/sitesEditor/zones.lua
function C:setSites(sites)
self.sites = sites