1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

adding map check to main tick loop incase all maps are inactive

This commit is contained in:
Aaron Veden 2021-12-08 21:29:52 -08:00
parent bfe34eb253
commit 4a535ae79d
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84

View File

@ -1012,30 +1012,44 @@ script.on_event(defines.events.on_tick,
if (pick == 0) then
processPendingChunks(universe, tick)
processMapAIs(universe, gameRef.forces.enemy.evolution_factor, tick)
if universe.NEW_ENEMIES then
recycleBases(map)
if map then
if universe.NEW_ENEMIES then
recycleBases(map)
end
cleanUpMapTables(map, tick)
end
cleanUpMapTables(map, tick)
elseif (pick == 1) then
processPlayers(gameRef.connected_players, universe, tick)
elseif (pick == 2) then
processMap(map, tick)
if map then
processMap(map, tick)
end
elseif (pick == 3) then
processStaticMap(map)
if map then
processStaticMap(map)
end
disperseVictoryScent(universe)
processVengence(universe)
elseif (pick == 4) then
scanResourceMap(map, tick)
scanEnemyMap(map, tick)
if map then
scanResourceMap(map, tick)
scanEnemyMap(map, tick)
end
elseif (pick == 5) then
processAttackWaves(universe)
scanEnemyMap(map, tick)
if map then
scanEnemyMap(map, tick)
end
elseif (pick == 6) then
scanPlayerMap(map, tick)
if map then
scanPlayerMap(map, tick)
end
processNests(universe, tick)
elseif (pick == 7) then
processPendingChunks(universe, tick)
processScanChunks(map)
if map then
processScanChunks(map)
end
end
processActiveNests(universe, tick)