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

Merge branch 'master' into 0.13

This commit is contained in:
veden 2016-09-14 11:18:25 -07:00
commit 77c1cb3d32
3 changed files with 20 additions and 4 deletions

View File

@ -78,7 +78,7 @@ local function onConfigChanged()
global.version = constants.VERSION_5
end
if (global.version < constants.VERSION_9) then
-- remove version 5 references
regionMap.pQ = nil
regionMap.pI = nil
@ -89,7 +89,12 @@ local function onConfigChanged()
regionMap.processPointer = 1
regionMap.scanPointer = 1
regionMap.processRoll = -1
if (pheromoneTotals == nil) then
global.pheromoneTotals = {}
pheromoneTotals = global.pheromoneTotals
end
pheromoneTotals[constants.DEATH_PHEROMONE] = 0
pheromoneTotals[constants.ENEMY_BASE_PHEROMONE] = 0
pheromoneTotals[constants.PLAYER_PHEROMONE] = 0
@ -97,14 +102,23 @@ local function onConfigChanged()
pheromoneTotals[constants.PLAYER_DEFENSE_PHEROMONE] = 0
pheromoneTotals[constants.MOVEMENT_PHEROMONE] = 0
-- queue all current chunks that wont be generated during play
global.version = constants.VERSION_9
end
if (global.version < constants.VERSION_10) then
for _,squad in pairs(natives.squads) do
squad.frenzy = false
squad.frenzyPosition = {x=0,y=0}
squad.rabid = false
end
-- queue all current chunks that wont be generated during play
local surface = game.surfaces[1]
for chunk in surface.get_chunks() do
onChunkGenerated({ surface = surface,
area = { left_top = { x = chunk.x * 32,
y = chunk.y * 32 }}})
end
global.version = constants.VERSION_9
global.version = constants.VERSION_10
end
end

View File

@ -38,6 +38,7 @@ local addSquadMovementPenalty = unitGroupUtils.addSquadMovementPenalty
local createSquad = unitGroupUtils.createSquad
local membersToSquad = unitGroupUtils.membersToSquad
local scoreNeighborsWithDirection = neighborUtils.scoreNeighborsWithDirection
local addSquadMovementPenalty = unitGroupUtils.addSquadMovementPenalty
-- module code

View File

@ -4,6 +4,7 @@ local constants = {}
constants.VERSION_5 = 5
constants.VERSION_9 = 9
constants.VERSION_10 = 10
-- misc