mirror of
https://github.com/veden/Rampant.git
synced 2025-02-09 13:36:53 +02:00
Merge branch '0.13'
This commit is contained in:
commit
cc398eca65
@ -46,8 +46,6 @@ Base Expansion
|
||||
added scaling for kamikaze attack (https://forums.factorio.com/viewtopic.php?f=94&t=31445&start=10#p199401)
|
||||
increased squad size max from 125 to 150, (larger waves)
|
||||
|
||||
0.0.7 - updated for 0.14
|
||||
|
||||
0.0.6 - some speed improvements
|
||||
MP is working (https://github.com/veden/Rampant/issues/1)
|
||||
|
||||
|
24
control.lua
24
control.lua
@ -39,7 +39,7 @@ local addRemoveEntity = entityUtils.addRemoveEntity
|
||||
|
||||
local regionMap
|
||||
local natives
|
||||
local pheromoneTotals
|
||||
-- local pheromoneTotals
|
||||
local pendingChunks
|
||||
|
||||
-- hook functions
|
||||
@ -49,7 +49,7 @@ local function onLoad()
|
||||
regionMap = global.regionMap
|
||||
natives = global.natives
|
||||
pendingChunks = global.pendingChunks
|
||||
pheromoneTotals = global.pheromoneTotals
|
||||
-- pheromoneTotals = global.pheromoneTotals
|
||||
end
|
||||
|
||||
local function onChunkGenerated(event)
|
||||
@ -89,19 +89,7 @@ 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
|
||||
pheromoneTotals[constants.PLAYER_BASE_PHEROMONE] = 0
|
||||
pheromoneTotals[constants.PLAYER_DEFENSE_PHEROMONE] = 0
|
||||
pheromoneTotals[constants.MOVEMENT_PHEROMONE] = 0
|
||||
|
||||
|
||||
global.version = constants.VERSION_9
|
||||
end
|
||||
if (global.version < constants.VERSION_10) then
|
||||
@ -165,7 +153,7 @@ local function onDeath(event)
|
||||
local entityPosition = entity.position
|
||||
|
||||
-- drop death pheromone where unit died
|
||||
deathScent(regionMap, entityPosition, pheromoneTotals)
|
||||
deathScent(regionMap, entityPosition)
|
||||
|
||||
if (event.force ~= nil) and (event.force.name == "player") then
|
||||
retreatUnits(entityPosition,
|
||||
@ -198,12 +186,12 @@ local function onInit()
|
||||
global.regionMap = {}
|
||||
global.pendingChunks = {}
|
||||
global.natives = {}
|
||||
global.pheromoneTotals = {}
|
||||
-- global.pheromoneTotals = {}
|
||||
|
||||
regionMap = global.regionMap
|
||||
natives = global.natives
|
||||
pendingChunks = global.pendingChunks
|
||||
pheromoneTotals = global.pheromoneTotals
|
||||
-- pheromoneTotals = global.pheromoneTotals
|
||||
|
||||
onConfigChanged()
|
||||
end
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name" : "Rampant",
|
||||
"factorio_version" : "0.14",
|
||||
"version" : "0.14.2",
|
||||
"factorio_version" : "0.13",
|
||||
"version" : "0.13.2",
|
||||
"title" : "Rampant AI",
|
||||
"author" : "Veden",
|
||||
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",
|
||||
|
@ -34,6 +34,7 @@ local EAST_WEST_PASSABLE = constants.EAST_WEST_PASSABLE
|
||||
local getChunkByPosition = mapUtils.getChunkByPosition
|
||||
local getNeighborChunksWithDirection = mapUtils.getNeighborChunksWithDirection
|
||||
local findNearBySquad = unitGroupUtils.findNearBySquad
|
||||
local addSquadMovementPenalty = unitGroupUtils.addSquadMovementPenalty
|
||||
local createSquad = unitGroupUtils.createSquad
|
||||
local membersToSquad = unitGroupUtils.membersToSquad
|
||||
local scoreNeighborsWithDirection = neighborUtils.scoreNeighborsWithDirection
|
||||
|
@ -49,11 +49,11 @@ function pheromoneUtils.scents(chunk)
|
||||
end
|
||||
end
|
||||
|
||||
function pheromoneUtils.deathScent(regionMap, position, pheromoneTotals)
|
||||
function pheromoneUtils.deathScent(regionMap, position)
|
||||
local chunk = getChunkByPosition(regionMap, position.x, position.y)
|
||||
if (chunk ~= nil) then
|
||||
chunk[DEATH_PHEROMONE] = chunk[DEATH_PHEROMONE] + DEATH_PHEROMONE_GENERATOR_AMOUNT
|
||||
pheromoneTotals[DEATH_PHEROMONE] = pheromoneTotals[DEATH_PHEROMONE] + DEATH_PHEROMONE_GENERATOR_AMOUNT
|
||||
-- pheromoneTotals[DEATH_PHEROMONE] = pheromoneTotals[DEATH_PHEROMONE] + DEATH_PHEROMONE_GENERATOR_AMOUNT
|
||||
end
|
||||
end
|
||||
|
||||
|
8
make.rkt
8
make.rkt
@ -6,7 +6,7 @@
|
||||
;(define modFolder "C:/Users/veden/AppData/Roaming/Factorio/mods/")
|
||||
;(define zipModFolder "C:/Program Files/Factorio_0.14.1/mods/")
|
||||
(define modFolder "/home/veden/.factorio/mods/")
|
||||
(define zipModFolder "/home/veden/.factorio/mods/")
|
||||
(define zipModFolder "/data/games/factorio13.20/mods/")
|
||||
(define configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
@ -73,7 +73,7 @@
|
||||
(copyDirectory "graphics" modFolder)
|
||||
(copyDirectory "prototypes" modFolder)))
|
||||
|
||||
; (copyFiles modFolder)
|
||||
; (copyFiles zipModFolder)
|
||||
(makeZip)
|
||||
(copyFiles modFolder)
|
||||
; (copyFiles zipModFolder)
|
||||
; (makeZip)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user