Rewritten sending helper and logic
This commit is contained in:
@@ -2,7 +2,7 @@ function AddPowerPole(event)
|
||||
local e = event.entity
|
||||
if e then
|
||||
storage.representativePoles[e.unit_number] = e
|
||||
-- Update cache with new network
|
||||
-- Invalidate cache
|
||||
storage.networkCache = nil
|
||||
end
|
||||
end
|
||||
@@ -187,6 +187,7 @@ function SendPowerStats()
|
||||
end
|
||||
end
|
||||
powerPart[#powerPart + 1] = possiblePower
|
||||
helpers.send_udp(udpAddress, table.concat(powerPart, "\n"), serverIndex)
|
||||
--Send("---power-stats---",table.concat(powerPart,"\n"),200)
|
||||
SendChunked(table.concat(powerPart, "\n"))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user