2017-05-17 08:18:25 +02:00
|
|
|
local vanillaBuildings = require("prototypes/buildings/UpdatesVanilla")
|
|
|
|
|
2018-04-15 01:02:40 +02:00
|
|
|
local neutral = require("prototypes/Neutral")
|
|
|
|
local acid = require("prototypes/Acid")
|
|
|
|
local physical = require("prototypes/Physical")
|
|
|
|
local suicide = require("prototypes/Suicide")
|
|
|
|
local fire = require("prototypes/Fire")
|
|
|
|
local electric = require("prototypes/Electric")
|
|
|
|
local nuclear = require("prototypes/Nuclear")
|
|
|
|
local inferno = require("prototypes/Inferno")
|
|
|
|
local fast = require("prototypes/Fast")
|
|
|
|
local troll = require("prototypes/Troll")
|
2019-02-14 07:53:31 +02:00
|
|
|
local poison = require("prototypes/Poison")
|
2018-04-15 01:02:40 +02:00
|
|
|
local spawner = require("prototypes/Spawner")
|
|
|
|
local wasp = require("prototypes/Wasp")
|
|
|
|
local laser = require("prototypes/Laser")
|
2019-02-13 07:50:25 +02:00
|
|
|
local energyThief = require("prototypes/EnergyThief")
|
2019-02-14 07:53:31 +02:00
|
|
|
-- require("prototypes/Decaying")
|
|
|
|
-- require("prototypes/Undying")
|
2018-04-15 01:02:40 +02:00
|
|
|
|
2018-01-24 08:02:06 +02:00
|
|
|
if settings.startup["rampant-newEnemies"].value then
|
2019-02-03 08:01:28 +02:00
|
|
|
|
2018-04-15 01:02:40 +02:00
|
|
|
neutral.addFaction()
|
2019-02-03 08:01:28 +02:00
|
|
|
if settings.startup["rampant-acidEnemy"].value then
|
|
|
|
acid.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-physicalEnemy"].value then
|
|
|
|
physical.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-suicideEnemy"].value then
|
|
|
|
suicide.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-fireEnemy"].value then
|
|
|
|
fire.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-electricEnemy"].value then
|
|
|
|
electric.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-nuclearEnemy"].value then
|
|
|
|
nuclear.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-infernoEnemy"].value then
|
|
|
|
inferno.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-fastEnemy"].value then
|
|
|
|
fast.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-trollEnemy"].value then
|
|
|
|
troll.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-spawnerEnemy"].value then
|
|
|
|
spawner.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-waspEnemy"].value then
|
|
|
|
wasp.addFaction()
|
|
|
|
end
|
|
|
|
if settings.startup["rampant-laserEnemy"].value then
|
|
|
|
laser.addFaction()
|
|
|
|
end
|
2019-02-13 07:50:25 +02:00
|
|
|
if settings.startup["rampant-energyThiefEnemy"].value then
|
|
|
|
energyThief.addFaction()
|
|
|
|
end
|
2019-02-14 07:53:31 +02:00
|
|
|
if settings.startup["rampant-poisonEnemy"].value then
|
|
|
|
poison.addFaction()
|
|
|
|
end
|
|
|
|
-- require("prototypes/Decaying")
|
|
|
|
-- require("prototypes/Undying")
|
|
|
|
|
2019-02-03 08:01:28 +02:00
|
|
|
|
2018-01-29 03:51:24 +02:00
|
|
|
for _, unitSpawner in pairs(data.raw["unit-spawner"]) do
|
2018-01-21 09:42:47 +02:00
|
|
|
if (unitSpawner.name ~= "biter-spawner") then
|
2019-02-03 08:01:28 +02:00
|
|
|
unitSpawner.autoplace = nil
|
2018-01-21 09:42:47 +02:00
|
|
|
end
|
2019-03-13 07:46:25 +02:00
|
|
|
if settings.startup["rampant-unitSpawnerBreath"] then
|
|
|
|
if not unitSpawner.flags then
|
|
|
|
unitSpawner.flags = {}
|
|
|
|
end
|
|
|
|
unitSpawner.flags[#unitSpawner.flags+1] = "breaths-air"
|
|
|
|
end
|
2018-01-21 09:42:47 +02:00
|
|
|
end
|
2018-01-29 03:51:24 +02:00
|
|
|
for _, unitSpawner in pairs(data.raw["turret"]) do
|
2018-01-21 09:42:47 +02:00
|
|
|
if (unitSpawner.name ~= "small-worm-turret") then
|
2019-02-03 08:01:28 +02:00
|
|
|
unitSpawner.autoplace = nil
|
2018-01-21 09:42:47 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-02-03 08:01:28 +02:00
|
|
|
if settings.startup["rampant-enableSwarm"] then
|
2017-11-27 00:10:56 +02:00
|
|
|
for k, unit in pairs(data.raw["unit"]) do
|
|
|
|
if (string.find(k, "biter") or string.find(k, "spitter")) and unit.collision_box then
|
|
|
|
unit.collision_box = {
|
|
|
|
{unit.collision_box[1][1] * 0.40, unit.collision_box[1][2] * 0.40},
|
|
|
|
{unit.collision_box[2][1] * 0.40, unit.collision_box[2][2] * 0.40}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-05-17 08:18:25 +02:00
|
|
|
if settings.startup["rampant-addWallResistanceAcid"].value then
|
|
|
|
vanillaBuildings.addWallAcidResistance()
|
|
|
|
end
|