mirror of
https://github.com/veden/Rampant.git
synced 2024-12-28 21:08:22 +02:00
83 lines
2.8 KiB
Lua
Executable File
83 lines
2.8 KiB
Lua
Executable File
local vanillaBuildings = require("prototypes/buildings/UpdatesVanilla")
|
|
|
|
local biterFunctions = require("prototypes/utils/BiterUtils")
|
|
|
|
local swarmUtils = require("prototypes/SwarmUtils")
|
|
|
|
|
|
|
|
if settings.startup["rampant-newEnemies"].value then
|
|
swarmUtils.processFactions()
|
|
swarmUtils.generateSpawnerProxy(data.raw["unit-spawner"]["neutral-biter-spawner-v1-t10-rampant"].result_units)
|
|
else
|
|
swarmUtils.generateSpawnerProxy(data.raw["unit-spawner"]["biter-spawner"].result_units)
|
|
end
|
|
|
|
if settings.startup["rampant-removeBloodParticles"].value then
|
|
local explosions = data.raw["explosion"]
|
|
|
|
for k,v in pairs(explosions) do
|
|
if string.find(k, "blood") then
|
|
v["created_effect"] = nil
|
|
end
|
|
end
|
|
end
|
|
|
|
if settings.startup["rampant-unitSpawnerBreath"].value then
|
|
for _, unitSpawner in pairs(data.raw["unit-spawner"]) do
|
|
if (string.find(unitSpawner.name, "hive") or string.find(unitSpawner.name, "biter") or
|
|
string.find(unitSpawner.name, "spitter")) then
|
|
if not unitSpawner.flags then
|
|
unitSpawner.flags = {}
|
|
end
|
|
unitSpawner.flags[#unitSpawner.flags+1] = "breaths-air"
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
for k, unit in pairs(data.raw["unit"]) do
|
|
if (string.find(k, "biter") or string.find(k, "spitter")) and unit.collision_box then
|
|
if settings.startup["rampant-enableSwarm"].value then
|
|
unit.collision_box = {
|
|
{unit.collision_box[1][1] * 0.20, unit.collision_box[1][2] * 0.20},
|
|
{unit.collision_box[2][1] * 0.20, unit.collision_box[2][2] * 0.20}
|
|
}
|
|
end
|
|
|
|
unit.affected_by_tiles = settings.startup["rampant-unitsAffectedByTiles"].value
|
|
|
|
unit.ai_settings = {
|
|
destroy_when_commands_fail = false,
|
|
allow_try_return_to_spawner = true,
|
|
path_resolution_modifier = -5,
|
|
do_seperation = true
|
|
}
|
|
end
|
|
end
|
|
|
|
if settings.startup["rampant-enableShrinkNestsAndWorms"].value then
|
|
for k, unit in pairs(data.raw["unit-spawner"]) do
|
|
if (string.find(k, "biter") or string.find(k, "spitter") or string.find(k, "hive")) and unit.collision_box then
|
|
unit.collision_box = {
|
|
{unit.collision_box[1][1] * 0.50, unit.collision_box[1][2] * 0.50},
|
|
{unit.collision_box[2][1] * 0.50, unit.collision_box[2][2] * 0.50}
|
|
}
|
|
end
|
|
end
|
|
|
|
for k, unit in pairs(data.raw["turret"]) do
|
|
if string.find(k, "worm") and unit.collision_box then
|
|
unit.collision_box = {
|
|
{unit.collision_box[1][1] * 0.50, unit.collision_box[1][2] * 0.50},
|
|
{unit.collision_box[2][1] * 0.50, unit.collision_box[2][2] * 0.50}
|
|
}
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
if settings.startup["rampant-addWallResistanceAcid"].value then
|
|
vanillaBuildings.addWallAcidResistance()
|
|
end
|