1
0
mirror of https://github.com/veden/Rampant.git synced 2025-02-05 13:14:51 +02:00

removing conditional requires everywhere

This commit is contained in:
Aaron Veden 2018-04-14 16:02:40 -07:00
parent bf74de8051
commit 868eb2f3d7
19 changed files with 13880 additions and 13761 deletions

View File

@ -304,9 +304,6 @@ local function onConfigChanged()
upgraded, natives = upgrade.attempt(natives)
if upgraded and onModSettingsChange(nil) then
rebuildMap()
if natives.newEnemies then
rebuildNativeTables(natives, game.surfaces[1], game.create_random_generator(natives.enemySeed))
end
-- clear pending chunks, will be added when loop runs below
global.pendingChunks = {}
@ -324,6 +321,9 @@ local function onConfigChanged()
processPendingChunks(natives, map, surface, pendingChunks, tick, game.forces.enemy.evolution_factor, true)
end
if natives.newEnemies then
rebuildNativeTables(natives, game.surfaces[1], game.create_random_generator(natives.enemySeed))
end
end
script.on_nth_tick(INTERVAL_PROCESS,

View File

@ -1,22 +1,40 @@
local vanillaBuildings = require("prototypes/buildings/UpdatesVanilla")
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")
-- require("prototypes/Decaying")
-- require("prototypes/Poison")
-- require("prototypes/Undying")
local spawner = require("prototypes/Spawner")
local wasp = require("prototypes/Wasp")
local laser = require("prototypes/Laser")
if settings.startup["rampant-newEnemies"].value then
require("prototypes/Neutral")
require("prototypes/Acid")
require("prototypes/Physical")
require("prototypes/Suicide")
require("prototypes/Fire")
require("prototypes/Electric")
require("prototypes/Nuclear")
require("prototypes/Inferno")
require("prototypes/Fast")
require("prototypes/Troll")
neutral.addFaction()
acid.addFaction()
physical.addFaction()
suicide.addFaction()
fire.addFaction()
electric.addFaction()
nuclear.addFaction()
inferno.addFaction()
fast.addFaction()
troll.addFaction()
-- require("prototypes/Decaying")
-- require("prototypes/Poison")
-- require("prototypes/Undying")
require("prototypes/Spawner")
require("prototypes/Wasp")
require("prototypes/Laser")
spawner.addFaction()
wasp.addFaction()
laser.addFaction()
for _, unitSpawner in pairs(data.raw["unit-spawner"]) do
if (unitSpawner.name ~= "biter-spawner") then

View File

@ -3,6 +3,9 @@ local bobsUpdates = require("prototypes/utils/UpdatesBobs")
local NEUpdates = require("prototypes/utils/UpdatesNE")
local constants = require("libs/Constants")
local attackBobs = require("prototypes/utils/AttackBobs")
local attackNE = require("prototypes/utils/AttackNE")
if settings.startup["rampant-removeBloodParticles"].value then
local explosions = data.raw["explosion"]
@ -16,14 +19,13 @@ if settings.startup["rampant-useDumbProjectiles"].value then
local option = settings.startup["bobmods-enemies-enableartifacts"]
if option then
require("prototypes/utils/AttackBobs")
attackBobs.addAttacks()
bobsUpdates.useDumbProjectiles()
end
option = settings.startup["NE_Difficulty"]
if option then
require("prototypes/utils/AttackNE")
attackNE.addAttacks()
NEUpdates.useDumbProjectiles()
if settings.startup["rampant-useNEUnitLaunchers"].value then
NEUpdates.useNEUnitLaunchers()

View File

@ -369,6 +369,8 @@ end
function chunkUtils.analyzeChunk(chunk, natives, surface, map)
local playerObjects = chunkUtils.scorePlayerBuildings(surface, map, natives)
setPlayerBaseGenerator(map, chunk, playerObjects)
local resources = surface.count_entities_filtered(map.countResourcesQuery) * RESOURCE_NORMALIZER
setResourceGenerator(map, chunk, resources)
end
function chunkUtils.createChunk(topX, topY)

View File

@ -8,6 +8,8 @@ local constants = require("Constants")
-- constants
local acid = {}
local ACID_UNIT_TIERS = constants.ACID_UNIT_TIERS
local ACID_UNIT_VARIATIONS = constants.ACID_UNIT_VARIATIONS
@ -36,8 +38,10 @@ local biterLoot = makeUnitAlienLootTable("green")
local spawnerLoot = makeSpawnerAlienLootTable("green")
local wormLoot = makeWormAlienLootTable("green")
-- acid biters
buildUnitSpawner(
function acid.addFaction()
-- acid biters
buildUnitSpawner(
{
unit = {
name = "acid-biter",
@ -564,10 +568,10 @@ buildUnitSpawner(
unit = ACID_UNIT_TIERS,
unitSpawner = ACID_NEST_TIERS
}
)
)
-- acid spitters
buildUnitSpawner(
-- acid spitters
buildUnitSpawner(
{
unit = {
name = "acid-spitter",
@ -1190,10 +1194,10 @@ buildUnitSpawner(
unit = ACID_UNIT_TIERS,
unitSpawner = ACID_NEST_TIERS
}
)
)
-- acid worms
buildWorm(
-- acid worms
buildWorm(
{
name = "acid-worm",
@ -1536,4 +1540,7 @@ buildWorm(
ACID_WORM_VARIATIONS,
ACID_WORM_TIERS
)
)
end
return acid

View File

@ -9,6 +9,8 @@ local constants = require("Constants")
-- constants
local electric = {}
local ELECTRIC_UNIT_TIERS = constants.ELECTRIC_UNIT_TIERS
local ELECTRIC_UNIT_VARIATIONS = constants.ELECTRIC_UNIT_VARIATIONS
@ -33,20 +35,22 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
local biterLoot = makeUnitAlienLootTable("blue")
local spawnerLoot = makeSpawnerAlienLootTable("blue")
local wormLoot = makeWormAlienLootTable("blue")
function electric.addFaction()
local electricBubble = makeBubble({
local biterLoot = makeUnitAlienLootTable("blue")
local spawnerLoot = makeSpawnerAlienLootTable("blue")
local wormLoot = makeWormAlienLootTable("blue")
local electricBubble = makeBubble({
name = "electric-worm",
lTint = {r=0, g=0.1, b=1, a=1}
})
})
local softSmoke = "the-soft-smoke-rampant"
local softSmoke = "the-soft-smoke-rampant"
-- electric biters
buildUnitSpawner(
-- electric biters
buildUnitSpawner(
{
unit = {
name = "electric-biter",
@ -623,10 +627,10 @@ buildUnitSpawner(
unit = ELECTRIC_UNIT_TIERS,
unitSpawner = ELECTRIC_NEST_TIERS
}
)
)
-- electric worms
buildWorm(
-- electric worms
buildWorm(
{
name = "electric-worm",
@ -1040,4 +1044,7 @@ buildWorm(
ELECTRIC_WORM_VARIATIONS,
ELECTRIC_WORM_TIERS
)
)
end
return electric

View File

@ -8,6 +8,8 @@ local constants = require("Constants")
-- constants
local fast = {}
local FAST_UNIT_TIERS = constants.FAST_UNIT_TIERS
local FAST_UNIT_VARIATIONS = constants.FAST_UNIT_VARIATIONS
@ -35,10 +37,10 @@ local biterLoot = makeUnitAlienLootTable("purple")
local spawnerLoot = makeSpawnerAlienLootTable("purple")
local wormLoot = makeWormAlienLootTable("purple")
function fast.addFaction()
-- fast biters
buildUnitSpawner(
-- fast biters
buildUnitSpawner(
{
unit = {
name = "fast-biter",
@ -529,10 +531,10 @@ buildUnitSpawner(
unit = FAST_UNIT_TIERS,
unitSpawner = FAST_NEST_TIERS
}
)
)
-- fast spitters
buildUnitSpawner(
-- fast spitters
buildUnitSpawner(
{
unit = {
name = "fast-spitter",
@ -1050,10 +1052,10 @@ buildUnitSpawner(
unit = FAST_UNIT_TIERS,
unitSpawner = FAST_NEST_TIERS
}
)
)
-- fast worms
buildWorm(
-- fast worms
buildWorm(
{
name = "fast-worm",
@ -1362,4 +1364,7 @@ buildWorm(
FAST_WORM_VARIATIONS,
FAST_WORM_TIERS
)
)
end
return fast

View File

@ -8,6 +8,8 @@ local constants = require("Constants")
-- constants
local fire = {}
local FIRE_UNIT_TIERS = constants.FIRE_UNIT_TIERS
local FIRE_UNIT_VARIATIONS = constants.FIRE_UNIT_VARIATIONS
@ -35,10 +37,10 @@ local biterLoot = makeUnitAlienLootTable("red")
local spawnerLoot = makeSpawnerAlienLootTable("red")
local wormLoot = makeWormAlienLootTable("red")
function fire.addFaction()
-- fire biters
buildUnitSpawner(
-- fire biters
buildUnitSpawner(
{
unit = {
name = "fire-biter",
@ -592,10 +594,10 @@ buildUnitSpawner(
unit = FIRE_UNIT_TIERS,
unitSpawner = FIRE_NEST_TIERS
}
)
)
-- fire spitters
buildUnitSpawner(
-- fire spitters
buildUnitSpawner(
{
unit = {
name = "fire-spitter",
@ -1207,10 +1209,10 @@ buildUnitSpawner(
unit = FIRE_UNIT_TIERS,
unitSpawner = FIRE_NEST_TIERS
}
)
)
-- fire worms
buildWorm(
-- fire worms
buildWorm(
{
name = "fire-worm",
@ -1551,4 +1553,8 @@ buildWorm(
FIRE_WORM_VARIATIONS,
FIRE_WORM_TIERS
)
)
end
return fire

View File

@ -9,6 +9,8 @@ local math3d = require("math3d")
-- constants
local inferno = {}
local INFERNO_UNIT_TIERS = constants.INFERNO_UNIT_TIERS
local INFERNO_UNIT_VARIATIONS = constants.INFERNO_UNIT_VARIATIONS
@ -38,10 +40,11 @@ local biterLoot = makeUnitAlienLootTable("orange")
local spawnerLoot = makeSpawnerAlienLootTable("orange")
local wormLoot = makeWormAlienLootTable("orange")
function inferno.addFaction()
-- inferno spitters
buildUnitSpawner(
-- inferno spitters
buildUnitSpawner(
{
unit = {
name = "inferno-spitter",
@ -706,10 +709,10 @@ buildUnitSpawner(
unit = INFERNO_UNIT_TIERS,
unitSpawner = INFERNO_NEST_TIERS
}
)
)
-- inferno worms
buildWorm(
-- inferno worms
buildWorm(
{
name = "inferno-worm",
@ -1158,4 +1161,7 @@ buildWorm(
INFERNO_WORM_VARIATIONS,
INFERNO_WORM_TIERS
)
)
end
return inferno

View File

@ -20,6 +20,8 @@ local LASER_WORM_VARIATIONS = constants.LASER_WORM_VARIATIONS
-- imported functions
local laser = {}
local buildUnitSpawner = swarmUtils.buildUnitSpawner
local buildWorm = swarmUtils.buildWorm
local createAttackBall = acidBall.createAttackBall
@ -39,15 +41,16 @@ local biterLoot = makeUnitAlienLootTable("blue")
local spawnerLoot = makeSpawnerAlienLootTable("blue")
local wormLoot = makeWormAlienLootTable("blue")
function laser.addFaction()
local laserBubble = makeBubble({
local laserBubble = makeBubble({
name = "laser-worm",
lTint = {r=0, g=0, b=0.42, a=0.65}
})
})
-- laser biters
buildUnitSpawner(
-- laser biters
buildUnitSpawner(
{
unit = {
name = "laser-biter",
@ -575,10 +578,10 @@ buildUnitSpawner(
unit = LASER_UNIT_TIERS,
unitSpawner = LASER_NEST_TIERS
}
)
)
-- laser spitters
buildUnitSpawner(
-- laser spitters
buildUnitSpawner(
{
unit = {
name = "laser-spitter",
@ -1208,10 +1211,10 @@ buildUnitSpawner(
unit = LASER_UNIT_TIERS,
unitSpawner = LASER_NEST_TIERS
}
)
)
-- laser worms
buildWorm(
-- laser worms
buildWorm(
{
name = "laser-worm",
@ -1625,4 +1628,7 @@ buildWorm(
LASER_WORM_VARIATIONS,
LASER_WORM_TIERS
)
)
end
return laser

View File

@ -8,6 +8,8 @@ local constants = require("Constants")
-- constants
local neutral = {}
local NEUTRAL_UNIT_TIERS = constants.NEUTRAL_UNIT_TIERS
local NEUTRAL_UNIT_VARIATIONS = constants.NEUTRAL_UNIT_VARIATIONS
@ -33,12 +35,14 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
local biterLoot = makeUnitAlienLootTable(nil)
local spawnerLoot = makeSpawnerAlienLootTable(nil)
local wormLoot = makeWormAlienLootTable(nil)
function neutral.addFaction()
-- neutral biters
buildUnitSpawner(
local biterLoot = makeUnitAlienLootTable(nil)
local spawnerLoot = makeSpawnerAlienLootTable(nil)
local wormLoot = makeWormAlienLootTable(nil)
-- neutral biters
buildUnitSpawner(
{
unit = {
name = "neutral-biter",
@ -507,10 +511,10 @@ buildUnitSpawner(
unit = NEUTRAL_UNIT_TIERS,
unitSpawner = NEUTRAL_NEST_TIERS
}
)
)
-- neutral spitters
buildUnitSpawner(
-- neutral spitters
buildUnitSpawner(
{
unit = {
name = "neutral-spitter",
@ -1006,10 +1010,10 @@ buildUnitSpawner(
unit = NEUTRAL_UNIT_TIERS,
unitSpawner = NEUTRAL_NEST_TIERS
}
)
)
-- neutral worms
buildWorm(
-- neutral worms
buildWorm(
{
name = "neutral-worm",
@ -1318,4 +1322,8 @@ buildWorm(
NEUTRAL_WORM_VARIATIONS,
NEUTRAL_WORM_TIERS
)
)
end
return neutral

View File

@ -10,6 +10,8 @@ local constants = require("Constants")
-- constants
local nuclear = {}
local NUCLEAR_UNIT_TIERS = constants.NUCLEAR_UNIT_TIERS
local NUCLEAR_UNIT_VARIATIONS = constants.NUCLEAR_UNIT_VARIATIONS
@ -35,12 +37,15 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
local biterLoot = makeUnitAlienLootTable("yellow")
local spawnerLoot = makeSpawnerAlienLootTable("yellow")
local wormLoot = makeWormAlienLootTable("yellow")
function nuclear.addFaction()
-- nuclear biters
buildUnitSpawner(
local biterLoot = makeUnitAlienLootTable("yellow")
local spawnerLoot = makeSpawnerAlienLootTable("yellow")
local wormLoot = makeWormAlienLootTable("yellow")
-- nuclear biters
buildUnitSpawner(
{
unit = {
name = "nuclear-biter",
@ -567,10 +572,10 @@ buildUnitSpawner(
unit = NUCLEAR_UNIT_TIERS,
unitSpawner = NUCLEAR_NEST_TIERS
}
)
)
-- nuclear worms
buildWorm(
-- nuclear worms
buildWorm(
{
name = "nuclear-worm",
@ -930,4 +935,7 @@ buildWorm(
NUCLEAR_WORM_VARIATIONS,
NUCLEAR_WORM_TIERS
)
)
end
return nuclear

View File

@ -8,6 +8,8 @@ local constants = require("Constants")
-- constants
local physical = {}
local PHYSICAL_UNIT_TIERS = constants.PHYSICAL_UNIT_TIERS
local PHYSICAL_UNIT_VARIATIONS = constants.PHYSICAL_UNIT_VARIATIONS
@ -31,14 +33,16 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
local biterLoot = makeUnitAlienLootTable("red")
local spawnerLoot = makeSpawnerAlienLootTable("red")
local wormLoot = makeWormAlienLootTable("red")
function physical.addFaction()
local biterLoot = makeUnitAlienLootTable("red")
local spawnerLoot = makeSpawnerAlienLootTable("red")
local wormLoot = makeWormAlienLootTable("red")
-- physical biters
buildUnitSpawner(
-- physical biters
buildUnitSpawner(
{
unit = {
name = "physical-biter",
@ -508,10 +512,10 @@ buildUnitSpawner(
unit = PHYSICAL_UNIT_TIERS,
unitSpawner = PHYSICAL_NEST_TIERS
}
)
)
-- physical worms
buildWorm(
-- physical worms
buildWorm(
{
name = "physical-worm",
@ -860,4 +864,7 @@ buildWorm(
PHYSICAL_WORM_VARIATIONS,
PHYSICAL_WORM_TIERS
)
)
end
return physical

View File

@ -9,6 +9,8 @@ local constants = require("Constants")
-- constants
local spawner = {}
local SPAWNER_UNIT_TIERS = constants.SPAWNER_UNIT_TIERS
local SPAWNER_UNIT_VARIATIONS = constants.SPAWNER_UNIT_VARIATIONS
@ -37,12 +39,14 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
local biterLoot = makeUnitAlienLootTable("green")
local spawnerLoot = makeSpawnerAlienLootTable("green")
local wormLoot = makeWormAlienLootTable("green")
function spawner.addFaction()
-- spawner
buildUnits(
local biterLoot = makeUnitAlienLootTable("green")
local spawnerLoot = makeSpawnerAlienLootTable("green")
local wormLoot = makeWormAlienLootTable("green")
-- spawner
buildUnits(
{
name = "spawner-drone",
@ -363,9 +367,9 @@ buildUnits(
},
SPAWNER_UNIT_VARIATIONS,
SPAWNER_UNIT_TIERS
)
)
buildUnits(
buildUnits(
{
name = "spawner-worm-drone",
@ -686,10 +690,10 @@ buildUnits(
},
SPAWNER_UNIT_VARIATIONS,
SPAWNER_UNIT_TIERS
)
)
-- spawner units
buildUnits(
-- spawner units
buildUnits(
{
name = "spawner-biter",
@ -914,11 +918,11 @@ buildUnits(
},
SPAWNER_UNIT_VARIATIONS,
SPAWNER_UNIT_TIERS
)
)
-- spawner spitters
buildUnitSpawner(
-- spawner spitters
buildUnitSpawner(
{
unit = {
name = "spawner-spitter",
@ -1433,10 +1437,10 @@ buildUnitSpawner(
unit = SPAWNER_UNIT_TIERS,
unitSpawner = SPAWNER_NEST_TIERS
}
)
)
-- spawner worms
buildWorm(
-- spawner worms
buildWorm(
{
name = "spawner-worm",
@ -1749,4 +1753,7 @@ buildWorm(
SPAWNER_WORM_VARIATIONS,
SPAWNER_WORM_TIERS
)
)
end
return spawner

View File

@ -9,6 +9,8 @@ local constants = require("Constants")
-- constants
local suicide = {}
local SUICIDE_UNIT_TIERS = constants.SUICIDE_UNIT_TIERS
local SUICIDE_UNIT_VARIATIONS = constants.SUICIDE_UNIT_VARIATIONS
@ -34,14 +36,16 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
local biterLoot = makeUnitAlienLootTable("yellow")
local spawnerLoot = makeSpawnerAlienLootTable("yellow")
local wormLoot = makeWormAlienLootTable("yellow")
function suicide.addFaction()
local biterLoot = makeUnitAlienLootTable("yellow")
local spawnerLoot = makeSpawnerAlienLootTable("yellow")
local wormLoot = makeWormAlienLootTable("yellow")
-- suicide biters
buildUnitSpawner(
-- suicide biters
buildUnitSpawner(
{
unit = {
name = "suicide-biter",
@ -590,10 +594,10 @@ buildUnitSpawner(
unit = SUICIDE_UNIT_TIERS,
unitSpawner = SUICIDE_NEST_TIERS
}
)
)
-- suicide worms
buildWorm(
-- suicide worms
buildWorm(
{
name = "suicide-worm",
@ -952,4 +956,7 @@ buildWorm(
SUICIDE_WORM_VARIATIONS,
SUICIDE_WORM_TIERS
)
)
end
return suicide

View File

@ -8,6 +8,8 @@ local constants = require("Constants")
-- constants
local troll = {}
local TROLL_UNIT_TIERS = constants.TROLL_UNIT_TIERS
local TROLL_UNIT_VARIATIONS = constants.TROLL_UNIT_VARIATIONS
@ -32,12 +34,14 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
local biterLoot = makeUnitAlienLootTable("green")
local spawnerLoot = makeSpawnerAlienLootTable("green")
local wormLoot = makeWormAlienLootTable("green")
function troll.addFaction()
-- troll biters
buildUnitSpawner(
local biterLoot = makeUnitAlienLootTable("green")
local spawnerLoot = makeSpawnerAlienLootTable("green")
local wormLoot = makeWormAlienLootTable("green")
-- troll biters
buildUnitSpawner(
{
unit = {
name = "troll-biter",
@ -536,10 +540,10 @@ buildUnitSpawner(
unit = TROLL_UNIT_TIERS,
unitSpawner = TROLL_NEST_TIERS
}
)
)
-- troll spitters
buildUnitSpawner(
-- troll spitters
buildUnitSpawner(
{
unit = {
name = "troll-spitter",
@ -735,7 +739,7 @@ buildUnitSpawner(
}
},
{
{
type = "resistance",
name = "fire",
decrease = {
@ -1066,10 +1070,10 @@ buildUnitSpawner(
unit = TROLL_UNIT_TIERS,
unitSpawner = TROLL_NEST_TIERS
}
)
)
-- troll worms
buildWorm(
-- troll worms
buildWorm(
{
name = "troll-worm",
@ -1377,4 +1381,7 @@ buildWorm(
TROLL_WORM_VARIATIONS,
TROLL_WORM_TIERS
)
)
end
return troll

View File

@ -9,6 +9,8 @@ local constants = require("Constants")
-- constants
local wasp = {}
local WASP_UNIT_TIERS = constants.WASP_UNIT_TIERS
local WASP_UNIT_VARIATIONS = constants.WASP_UNIT_VARIATIONS
@ -36,6 +38,8 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
function wasp.addFaction()
local biterLoot = makeUnitAlienLootTable("purple")
local spawnerLoot = makeSpawnerAlienLootTable("purple")
local wormLoot = makeWormAlienLootTable("purple")
@ -1399,3 +1403,6 @@ buildWorm(
WASP_WORM_VARIATIONS,
WASP_WORM_TIERS
)
end
return wasp

View File

@ -1,5 +1,7 @@
-- bobs replacement attacks
local attacks = {}
-- import
local fireUtils = require("FireUtils")
@ -27,10 +29,11 @@ local smokeGlow = "the-glow-smoke-rampant"
local smokeWithoutGlow = "the-without-glow-smoke-rampant"
local smokeFuel = "the-adding-fuel-rampant"
function attacks.addAttacks()
local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7
local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7
createAttackBall(
createAttackBall(
{
name = "bob-explosive-ball",
pTint = {r=1, g=0.97, b=0.34, a=0.5},
@ -66,9 +69,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "bob-explosive-ball-direction",
@ -107,27 +110,27 @@ if not FORCE_OLD_PROJECTILES then
end
}
)
end
end
--
--
local name = "bob-fire-ball"
local spawnEntityName = makeSpreadEffect({
local name = "bob-fire-ball"
local spawnEntityName = makeSpreadEffect({
name = name,
smokeWithoutGlowName = smokeWithoutGlow
})
local fireName = makeFire({
})
local fireName = makeFire({
name = name,
fireTint = {r=0, g=0.9, b=0, a=0.5},
smokeWithGlowName = smokeGlow,
smokeAddingFuelName = smokeFuel,
spawnEntityName = spawnEntityName
})
local stickerName = makeSticker({
})
local stickerName = makeSticker({
name = name,
spawnEntityName = spawnEntityName
})
createAttackBall(
})
createAttackBall(
{
name = name,
pTint = {r=1, g=0.17, b=0.17, a=0.5},
@ -157,9 +160,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
name = "bob-fire-ball-direction"
createAttackBall(
{
@ -192,12 +195,12 @@ if not FORCE_OLD_PROJECTILES then
}
end
}
)
end
)
end
--
--
createAttackBall(
createAttackBall(
{
name = "bob-poison-ball",
pTint = {r=0.1, g=0.5, b=1, a=0.5},
@ -223,10 +226,10 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
createAttackBall(
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "bob-poison-ball-direction",
pTint = {r=0.1, g=0.5, b=1, a=0.5},
@ -253,12 +256,12 @@ createAttackBall(
}
end
}
)
end
)
end
-- piercing
-- piercing
data:extend({
data:extend({
{
type = "projectile",
name = "piercing-spike-rampant",
@ -288,9 +291,9 @@ data:extend({
priority = "high"
},
}
})
})
createAttackBall(
createAttackBall(
{
name = "bob-piercing-ball",
pTint = {r=0.1, g=0.1, b=0.1, a=0.8},
@ -328,11 +331,11 @@ createAttackBall(
}
end
}
)
)
--
--
data:extend({
data:extend({
{
type = "projectile",
name = "electric-spike-rampant",
@ -372,9 +375,9 @@ data:extend({
},
speed = 0.15
}
})
})
createAttackBall(
createAttackBall(
{
name = "bob-electric-ball",
pTint = {r=0, g=0.1, b=1, a=1},
@ -412,9 +415,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "bob-electric-ball-direction",
@ -454,12 +457,12 @@ if not FORCE_OLD_PROJECTILES then
}
end
}
)
end
)
end
--
--
createAttackBall(
createAttackBall(
{
name = "bob-titan-ball",
pTint = {r=0, g=0.1, b=1, a=1},
@ -498,9 +501,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "bob-titan-ball-direction",
@ -540,12 +543,12 @@ if not FORCE_OLD_PROJECTILES then
}
end
}
)
end
)
end
--
--
createAttackBall(
createAttackBall(
{
name = "bob-behemoth-ball",
pTint = {r=0, g=0.1, b=1, a=1},
@ -588,9 +591,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "bob-behemoth-ball-direction",
@ -635,12 +638,12 @@ if not FORCE_OLD_PROJECTILES then
}
end
}
)
end
)
end
--
--
createAttackBall(
createAttackBall(
{
name = "bob-leviathan-ball",
pTint = {r=0, g=0.1, b=1, a=1},
@ -703,9 +706,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "bob-leviathan-ball-direction",
@ -770,5 +773,6 @@ if not FORCE_OLD_PROJECTILES then
}
end
}
)
)
end
end

View File

@ -1,5 +1,7 @@
-- import
local attacks = {}
local attackBall = require("AttackBall")
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
@ -9,9 +11,11 @@ local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].va
local softSmoke = "the-soft-smoke-rampant"
local createAttackBall = attackBall.createAttackBall
local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7
function attacks.addAttacks()
createAttackBall(
local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7
createAttackBall(
{
name = "ne-infected-unit-ball",
pTint = {r=0, g=0.97, b=0.34, a=0.5},
@ -54,11 +58,11 @@ createAttackBall(
}
end
}
)
)
--
--
createAttackBall(
createAttackBall(
{
name = "ne-mutated-unit-ball",
pTint = {r=0.5, g=0.7, b=0.34, a=0.5},
@ -97,11 +101,11 @@ createAttackBall(
}
end
}
)
)
--
--
createAttackBall(
createAttackBall(
{
name = "ne-infected-ball",
pTint = {r=0.5, g=0.7, b=0.34, a=0.5},
@ -131,9 +135,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "ne-infected-ball-direction",
@ -165,12 +169,12 @@ if not FORCE_OLD_PROJECTILES then
}
end
}
)
end
)
end
--
--
createAttackBall(
createAttackBall(
{
name = "ne-mutated-ball",
pTint = {r=0.5, g=0.7, b=0.34, a=0.5},
@ -200,9 +204,9 @@ createAttackBall(
}
end
}
)
)
if not FORCE_OLD_PROJECTILES then
if not FORCE_OLD_PROJECTILES then
createAttackBall(
{
name = "ne-mutated-ball-direction",
@ -234,5 +238,6 @@ if not FORCE_OLD_PROJECTILES then
}
end
}
)
)
end
end