mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
adjustment to when console message appears
This commit is contained in:
parent
9cd4766c8c
commit
69ab6e2013
@ -55,7 +55,7 @@ Configure Options:
|
||||
0.14.13 -
|
||||
- Reverted: Pheromone generation tweaks from 0.14.11
|
||||
- Feature: Recycling large biter swarms that are stuck (causes a big attack wave, and pops up a message)
|
||||
- Feature: Biters destroying player buildings will attract other unit groups
|
||||
- Feature: Breaching, Biters destroying player buildings will attract other unit groups
|
||||
- Tweak: Reduced unit group max size from 600 to 450
|
||||
- Tweak: Reduced unit group radius from 30 to 20
|
||||
- Fix: Unit groups merging during combat
|
||||
|
@ -198,7 +198,7 @@ local function onTick(event)
|
||||
local players = game.players
|
||||
|
||||
processPendingChunks(regionMap, surface, pendingChunks)
|
||||
scanMap(regionMap, surface, natives, evolutionFactor, tick)
|
||||
scanMap(regionMap, surface, natives, evolutionFactor)
|
||||
|
||||
if (tick == regionMap.logicTick) then
|
||||
regionMap.logicTick = regionMap.logicTick + INTERVAL_LOGIC
|
||||
@ -207,7 +207,7 @@ local function onTick(event)
|
||||
|
||||
natives.retreats = MAX_RETREATS
|
||||
|
||||
planning(natives, evolutionFactor, tick)
|
||||
planning(natives, evolutionFactor, tick, surface)
|
||||
|
||||
regroupSquads(natives, evolutionFactor)
|
||||
|
||||
|
@ -18,6 +18,8 @@ local AI_MIN_TEMPERAMENT_DURATION = constants.AI_MIN_TEMPERAMENT_DURATION
|
||||
local AI_MAX_STATE_DURATION = constants.AI_MAX_STATE_DURATION
|
||||
local AI_MAX_TEMPERAMENT_DURATION = constants.AI_MAX_TEMPERAMENT_DURATION
|
||||
|
||||
local TICKS_A_MINUTE = constants.TICKS_A_MINUTE
|
||||
|
||||
-- imported functions
|
||||
|
||||
local randomTickEvent = mathUtils.randomTickEvent
|
||||
@ -26,7 +28,7 @@ local mMax = math.max
|
||||
|
||||
-- module code
|
||||
|
||||
function aiPlanning.planning(natives, evolution_factor, tick)
|
||||
function aiPlanning.planning(natives, evolution_factor, tick, surface)
|
||||
local maxPoints = AI_MAX_POINTS * evolution_factor
|
||||
if (natives.points < maxPoints) then
|
||||
natives.points = natives.points + math.floor((AI_POINT_GENERATOR_AMOUNT * math.random()) + ((AI_POINT_GENERATOR_AMOUNT * 0.7) * (evolution_factor ^ 2.5)))
|
||||
@ -45,7 +47,12 @@ function aiPlanning.planning(natives, evolution_factor, tick)
|
||||
natives.state = AI_STATE_AGGRESSIVE
|
||||
end
|
||||
natives.stateTick = randomTickEvent(tick, AI_MIN_STATE_DURATION, AI_MAX_STATE_DURATION)
|
||||
end
|
||||
end
|
||||
|
||||
if (natives.state == AI_STATE_AGGRESSIVE) and (tick - natives.lastShakeMessage > TICKS_A_MINUTE * 5) and (natives.points > AI_MAX_POINTS) then
|
||||
natives.lastShakeMessage = tick
|
||||
surface.print("Rampant: The ground begins to shake")
|
||||
end
|
||||
end
|
||||
|
||||
return aiPlanning
|
||||
|
@ -32,8 +32,6 @@ local MOVEMENT_PHEROMONE = constants.MOVEMENT_PHEROMONE
|
||||
local PLAYER_BASE_GENERATOR = constants.PLAYER_BASE_GENERATOR
|
||||
local BUILDING_PHEROMONES = constants.BUILDING_PHEROMONES
|
||||
|
||||
local TICKS_A_MINUTE = constants.TICKS_A_MINUTE
|
||||
|
||||
-- imported functions
|
||||
|
||||
local scents = pheromoneUtils.scents
|
||||
@ -193,7 +191,7 @@ end
|
||||
--[[
|
||||
Passive scan to find entities that have been generated outside the factorio event system
|
||||
--]]
|
||||
function mapProcessor.scanMap(regionMap, surface, natives, evolution_factor, tick)
|
||||
function mapProcessor.scanMap(regionMap, surface, natives, evolution_factor)
|
||||
local index = regionMap.scanPointer
|
||||
|
||||
local processQueue = regionMap.processQueue
|
||||
@ -233,11 +231,6 @@ function mapProcessor.scanMap(regionMap, surface, natives, evolution_factor, tic
|
||||
if (natives.points > (AI_MAX_POINTS * 3)) then
|
||||
natives.points = (AI_MAX_POINTS * 3)
|
||||
end
|
||||
|
||||
if (tick - natives.lastShakeMessage > TICKS_A_MINUTE * 5) then
|
||||
natives.lastShakeMessage = tick
|
||||
surface.print("Rampant: The ground begins to shake")
|
||||
end
|
||||
end
|
||||
|
||||
local playerBaseGenerator = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user