1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

9e7f510: Moved new enemies from data-update-final to data stage

This commit is contained in:
Aaron Veden 2023-01-15 11:57:29 -08:00
parent 9cdd4cad4b
commit 4a72f7fb9a
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
3 changed files with 25 additions and 26 deletions

View File

@ -29,6 +29,7 @@ Version: 3.2.0
- Removed chunk-scanner entities
- Reduced max mod setting for enemy variations to 7 and created migrations for any variations greater than 8
- Reduced range of enemy structures and unit sizes
- Moved new enemies creation from data-update-final to data stage
Bugfixes:
- Removed layer-13 from projectiles
- script_raised_built now looks for enemy faction and registers as needed

View File

@ -14,35 +14,23 @@
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
local vanillaBuildings = require("prototypes/buildings/UpdatesVanilla")
local swarmUtils = require("prototypes/SwarmUtils")
local constants = require("libs/Constants")
if settings.startup["rampant--newEnemies"].value then
swarmUtils.processFactions()
swarmUtils.generateSpawnerProxy(data.raw["unit-spawner"]["neutral-biter-spawner-v1-t"..constants.TIERS.."-rampant"].result_units)
if mods["SchallAlienLoot"] then
local SizeLootRampant = {1, 2, 3, 3, 4, 4, 4, 5, 5, 6}
for _,faction in pairs(constants.FACTION_SET) do
for v=1,settings.startup["rampant--newEnemyVariations"].value
do
for factionSize = 1, constants.TIERS do
local effectiveLevel = constants.TIER_UPGRADE_SET[factionSize]
SchallAlienLoot_add_spawner(faction.type.."-hive-v"..v.."-t"..factionSize.."-rampant")
SchallAlienLoot_add_spawner(faction.type.."-spitter-spawner-v"..v.."-t"..factionSize.."-rampant")
SchallAlienLoot_add_spawner(faction.type.."-biter-spawner-v"..v.."-t"..factionSize.."-rampant")
SchallAlienLoot_add_worm(faction.type.."-worm-v"..v.."-t"..factionSize.."-rampant", factionSize)
SchallAlienLoot_add_mover(faction.type.."-spitter-v"..v.."-t"..factionSize.."-rampant", SizeLootRampant[effectiveLevel])
SchallAlienLoot_add_mover(faction.type.."-biter-v"..v.."-t"..factionSize.."-rampant", SizeLootRampant[effectiveLevel])
end
if settings.startup["rampant--newEnemies"].value and mods["SchallAlienLoot"] then
local SizeLootRampant = {1, 2, 3, 3, 4, 4, 4, 5, 5, 6}
for _,faction in pairs(constants.FACTION_SET) do
for v=1,settings.startup["rampant--newEnemyVariations"].value do
for factionSize = 1, constants.TIERS do
local effectiveLevel = constants.TIER_UPGRADE_SET[factionSize]
SchallAlienLoot_add_spawner(faction.type.."-hive-v"..v.."-t"..factionSize.."-rampant")
SchallAlienLoot_add_spawner(faction.type.."-spitter-spawner-v"..v.."-t"..factionSize.."-rampant")
SchallAlienLoot_add_spawner(faction.type.."-biter-spawner-v"..v.."-t"..factionSize.."-rampant")
SchallAlienLoot_add_worm(faction.type.."-worm-v"..v.."-t"..factionSize.."-rampant", factionSize)
SchallAlienLoot_add_mover(faction.type.."-spitter-v"..v.."-t"..factionSize.."-rampant", SizeLootRampant[effectiveLevel])
SchallAlienLoot_add_mover(faction.type.."-biter-v"..v.."-t"..factionSize.."-rampant", SizeLootRampant[effectiveLevel])
end
end
end
else
swarmUtils.generateSpawnerProxy(data.raw["unit-spawner"]["biter-spawner"].result_units)
end
if settings.startup["rampant--removeBloodParticles"].value then

View File

@ -18,6 +18,8 @@
local colorUtils = require("prototypes/utils/ColorUtils")
local smokeUtils = require("prototypes/utils/SmokeUtils")
local swarmUtils = require("prototypes/SwarmUtils")
local constants = require("libs/Constants")
-- imported functions
@ -37,9 +39,9 @@ makeSmokeAddingFuel({name="the"})
require("prototypes/buildings/ChunkScanner")
local attributes = {}
if not data.raw["corpse"]["acid-splash-purple"] then
local attributes = {}
data:extend({
{
type = "corpse",
@ -142,3 +144,11 @@ if not data.raw["corpse"]["acid-splash-purple"] then
}
})
end
if settings.startup["rampant--newEnemies"].value then
swarmUtils.processFactions()
swarmUtils.generateSpawnerProxy(data.raw["unit-spawner"]["neutral-biter-spawner-v1-t"..constants.TIERS.."-rampant"].result_units)
else
swarmUtils.generateSpawnerProxy(data.raw["unit-spawner"]["biter-spawner"].result_units)
end