mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
see readme
This commit is contained in:
parent
f534027448
commit
99f883651d
@ -50,6 +50,11 @@ Configure Options not in game menu:
|
||||
|
||||
# Version History
|
||||
|
||||
0.15.9 -
|
||||
- Improvement: Added bobs higher tier big electric poles to be included with make safe toggle for big electric poles
|
||||
- Improvement: Added logic to reconnect wires when big electric poles are made safe and get destroyed (Thanks Jeroen D Stout, https://forums.factorio.com/viewtopic.php?f=94&t=31445&sid=c6853c4f035c77bc499627e030dfdb84&start=140#p275663)
|
||||
- Improvement: Added a mod option to add acid resistance to walls to make damage levels with dumb projectiles to be equal to vanilla levels. (https://forums.factorio.com/viewtopic.php?f=94&t=31445&start=120#p274792)
|
||||
|
||||
0.15.8 -
|
||||
- Fixed: aiPointsScaler being nil
|
||||
|
||||
|
31
control.lua
31
control.lua
@ -30,8 +30,6 @@ local BONUS_RALLY_CHANCE = constants.BONUS_RALLY_CHANCE
|
||||
|
||||
local RETREAT_MOVEMENT_PHEROMONE_LEVEL = constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL
|
||||
|
||||
local CHUNK_SIZE = constants.CHUNK_SIZE
|
||||
|
||||
-- imported functions
|
||||
|
||||
local getChunkByPosition = mapUtils.getChunkByPosition
|
||||
@ -57,6 +55,7 @@ local squadBeginAttack = aiAttack.squadBeginAttack
|
||||
|
||||
local retreatUnits = aiDefense.retreatUnits
|
||||
|
||||
local regenerateEntity = entityUtils.regenerateEntity
|
||||
local addRemoveEntity = entityUtils.addRemoveEntity
|
||||
--local makeImmortalEntity = entityUtils.makeImmortalEntity
|
||||
|
||||
@ -97,9 +96,13 @@ local function onModSettingsChange(event)
|
||||
natives.safeEntities["rail-signal"] = settings.global["rampant-safeBuildings-railSignals"].value
|
||||
natives.safeEntities["rail-chain-signal"] = settings.global["rampant-safeBuildings-railChainSignals"].value
|
||||
natives.safeEntities["train-stop"] = settings.global["rampant-safeBuildings-trainStops"].value
|
||||
|
||||
natives.safeEntityName["big-electric-pole"] = settings.global["rampant-safeBuildings-bigElectricPole"].value
|
||||
|
||||
|
||||
local poles = settings.global["rampant-safeBuildings-bigElectricPole"].value
|
||||
natives.safeEntityName["big-electric-pole"] = poles
|
||||
natives.safeEntityName["big-electric-pole-2"] = poles
|
||||
natives.safeEntityName["big-electric-pole-3"] = poles
|
||||
natives.safeEntityName["big-electric-pole-4"] = poles
|
||||
|
||||
natives.attackUsePlayer = settings.global["rampant-attackWaveGenerationUsePlayerProximity"].value
|
||||
natives.attackUsePollution = settings.global["rampant-attackWaveGenerationUsePollution"].value
|
||||
|
||||
@ -226,22 +229,8 @@ local function onDeath(event)
|
||||
if creditNatives and natives.safeBuildings and (natives.safeEntities[entity.type] or natives.safeEntityName[entity.name]) then
|
||||
-- makeImmortalEntity(surface, entity)
|
||||
|
||||
-- patch (Needs to be removed)
|
||||
local repairPosition = entityPosition
|
||||
local repairName = entity.name
|
||||
local repairForce = entity.force
|
||||
local repairDirection = entity.direction
|
||||
entity.destroy()
|
||||
surface.create_entity({position=repairPosition,
|
||||
name=repairName,
|
||||
direction=repairDirection,
|
||||
force=repairForce})
|
||||
-- forces enemy to disperse
|
||||
local enemies = surface.find_enemy_units({repairPosition.x, repairPosition.y}, CHUNK_SIZE)
|
||||
for i=1, #enemies do
|
||||
enemies[i].set_command({type=defines.command.wander,
|
||||
distraction=defines.distraction.by_enemy})
|
||||
end
|
||||
-- hack version
|
||||
regenerateEntity(entity, entityPosition, surface)
|
||||
else
|
||||
addRemoveEntity(regionMap, entity, natives, false, creditNatives)
|
||||
end
|
||||
|
5
data-final-fixes.lua
Normal file
5
data-final-fixes.lua
Normal file
@ -0,0 +1,5 @@
|
||||
local vanillaBuildings = require("prototypes/buildings/UpdatesVanilla")
|
||||
|
||||
if settings.startup["rampant-addWallResistanceAcid"].value then
|
||||
vanillaBuildings.addWallAcidResistance()
|
||||
end
|
@ -14,6 +14,8 @@ local PLAYER_BASE_GENERATOR = constants.PLAYER_BASE_GENERATOR
|
||||
|
||||
local ENEMY_BASE_PHEROMONE_GENERATOR_AMOUNT = constants.ENEMY_BASE_PHEROMONE_GENERATOR_AMOUNT
|
||||
|
||||
local CHUNK_SIZE = constants.CHUNK_SIZE
|
||||
|
||||
-- imported functions
|
||||
|
||||
local getChunkByIndex = mapUtils.getChunkByIndex
|
||||
@ -116,6 +118,46 @@ function entityUtils.addRemoveEntity(regionMap, entity, natives, addObject, cred
|
||||
end
|
||||
|
||||
|
||||
function entityUtils.regenerateEntity(entity, entityPosition, surface)
|
||||
local repairPosition = entityPosition
|
||||
local repairName = entity.name
|
||||
local repairForce = entity.force
|
||||
local repairDirection = entity.direction
|
||||
|
||||
local wires
|
||||
if (entity.type == "electric-pole") then
|
||||
wires = entity.neighbours
|
||||
end
|
||||
entity.destroy()
|
||||
local newEntity = surface.create_entity({position=repairPosition,
|
||||
name=repairName,
|
||||
direction=repairDirection,
|
||||
force=repairForce})
|
||||
if wires then
|
||||
for connectType,neighbourGroup in pairs(wires) do
|
||||
if connectType == "copper" then
|
||||
for _,v in pairs(neighbourGroup) do
|
||||
newEntity.connect_neighbour(v);
|
||||
end
|
||||
elseif connectType == "red" then
|
||||
for _,v in pairs(neighbourGroup) do
|
||||
newEntity.connect_neighbour({wire = defines.wire_type.red, target_entity = v});
|
||||
end
|
||||
elseif connectType == "green" then
|
||||
for _,v in pairs(neighbourGroup) do
|
||||
newEntity.connect_neighbour({wire = defines.wire_type.green, target_entity = v});
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- forces enemy to disperse
|
||||
local enemies = surface.find_enemy_units({repairPosition.x, repairPosition.y}, CHUNK_SIZE)
|
||||
for i=1, #enemies do
|
||||
enemies[i].set_command({type=defines.command.wander,
|
||||
distraction=defines.distraction.by_enemy})
|
||||
end
|
||||
end
|
||||
|
||||
function entityUtils.makeImmortalEntity(surface, entity)
|
||||
local repairPosition = entity.position
|
||||
local repairName = entity.name
|
||||
|
@ -37,6 +37,7 @@ rampant-safeBuildings-trainStops=Make train stops safe from biters
|
||||
rampant-attackPlayerThreshold=Player score contribution threshold
|
||||
rampant-permanentNocturnal=Permanent Nocturnal Mode
|
||||
rampant-aiPointsScaler=Difficulty Scaling
|
||||
rampant-addWallResistanceAcid=Increase wall resistance to spitters
|
||||
|
||||
[mod-setting-description]
|
||||
rampant-useDumbProjectiles=Turns off homing projectiles for worms and spitters
|
||||
@ -56,3 +57,4 @@ rampant-safeBuildings-trainStops=Make train stops safe from biters
|
||||
rampant-attackPlayerThreshold=The score that a chunk must reach for it to contribute to the attack threshold. Increasing reduces player pheromone cloud impact.
|
||||
rampant-permanentNocturnal=Toggling this will cause Rampant attack waves to spawn at night. DOES NOT turn off vanilla attack groups yet. Works better with Day/Night extender mod.
|
||||
rampant-aiPointsScaler=Between 0.0 and 5.0. This scales how many action points the ai gets per logic cycle to perform actions like making attack waves. 0.3 - very easy, 0.75 - easy, 1.0 - medium, 1.25+ - hard
|
||||
rampant-addWallResistanceAcid=Toggling this will cause a %60 acid resistance to be added to all wall entities to reduce the damage done by spitters to walls back to vanilla levels.
|
6
make.rkt
6
make.rkt
@ -28,6 +28,7 @@
|
||||
(string->path "config.lua")
|
||||
(string->path "data.lua")
|
||||
(string->path "data-updates.lua")
|
||||
(string->path "data-final-fixes.lua")
|
||||
(string->path "LICENSE.md")
|
||||
(string->path "tests.lua")
|
||||
(string->path "Upgrade.lua")
|
||||
@ -66,6 +67,7 @@
|
||||
(copyFile "info.json" modFolder)
|
||||
(copyFile "data.lua" modFolder)
|
||||
(copyFile "data-updates.lua" modFolder)
|
||||
(copyFile "data-final-fixes.lua" modFolder)
|
||||
(copyFile "settings.lua" modFolder)
|
||||
(copyFile "Upgrade.lua" modFolder)
|
||||
(copyFile "tests.lua" modFolder)
|
||||
@ -75,7 +77,7 @@
|
||||
(copyDirectory "prototypes" modFolder)))
|
||||
|
||||
(define (run)
|
||||
(copyFiles modFolder)
|
||||
;;(makeZip modFolder)
|
||||
;;(copyFiles modFolder)
|
||||
(makeZip modFolder)
|
||||
)
|
||||
)
|
||||
|
21
prototypes/buildings/UpdatesVanilla.lua
Normal file
21
prototypes/buildings/UpdatesVanilla.lua
Normal file
@ -0,0 +1,21 @@
|
||||
local vanillaUpdates = {}
|
||||
|
||||
function vanillaUpdates.addWallAcidResistance()
|
||||
local walls = data.raw["wall"]
|
||||
|
||||
for _,wall in pairs(walls) do
|
||||
local foundAcid = false
|
||||
for _,resistance in pairs(wall.resistances) do
|
||||
if resistance.type == "acid" then
|
||||
resistance.percent = 60
|
||||
foundAcid = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not foundAcid then
|
||||
wall.resistances[#wall.resistances+1] = {type="acid",percent=60}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return vanillaUpdates
|
10
settings.lua
10
settings.lua
@ -162,5 +162,15 @@ data:extend({
|
||||
maximum_value = 5.0,
|
||||
order = "f[modifier]-b[ai]",
|
||||
per_user = false
|
||||
},
|
||||
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "rampant-addWallResistanceAcid",
|
||||
description = "rampant-addWallResistanceAcid",
|
||||
setting_type = "startup",
|
||||
default_value = false,
|
||||
order = "g[modifier]-a[damage]",
|
||||
per_user = false
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user