mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
baseIds are now unique across all surfaces
This commit is contained in:
parent
d150e54bcb
commit
0cdacdfba4
@ -507,6 +507,7 @@ function upgrade.attempt(universe)
|
||||
universe.chunkToRallys = {}
|
||||
universe.chunkToPassScan = {}
|
||||
universe.chunkToPassScanIterator = nil
|
||||
universe.baseId = 0
|
||||
|
||||
game.print("Rampant - Version 2.0.0")
|
||||
end
|
||||
@ -590,7 +591,6 @@ function upgrade.prepMap(universe, surface)
|
||||
map.baseIncrement = 0
|
||||
map.points = 0
|
||||
map.state = constants.AI_STATE_AGGRESSIVE
|
||||
map.baseId = 0
|
||||
map.squads = nil
|
||||
map.pendingAttack = nil
|
||||
map.building = nil
|
||||
|
@ -501,6 +501,7 @@ function baseUtils.createBase(map, chunk, tick)
|
||||
BASE_DISTANCE_THRESHOLD * 1.50,
|
||||
map.random)
|
||||
local distanceThreshold = (baseLevel * BASE_DISTANCE_LEVEL_BONUS) + baseDistanceThreshold
|
||||
local universe = map.universe
|
||||
|
||||
local base = {
|
||||
x = x,
|
||||
@ -516,9 +517,9 @@ function baseUtils.createBase(map, chunk, tick)
|
||||
chunkCount = 0,
|
||||
createdTick = tick,
|
||||
points = 0,
|
||||
id = map.baseId
|
||||
id = universe.baseId
|
||||
}
|
||||
map.baseId = map.baseId + 1
|
||||
universe.baseId = universe.baseId + 1
|
||||
|
||||
map.bases[base.id] = base
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user