2022-01-14 14:08:58 -08:00
|
|
|
-- Copyright (C) 2022 veden
|
|
|
|
|
|
|
|
-- This program is free software: you can redistribute it and/or modify
|
|
|
|
-- it under the terms of the GNU General Public License as published by
|
|
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
|
|
|
-- (at your option) any later version.
|
|
|
|
|
|
|
|
-- This program is distributed in the hope that it will be useful,
|
|
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
-- GNU General Public License for more details.
|
|
|
|
|
|
|
|
-- You should have received a copy of the GNU General Public License
|
|
|
|
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
2018-01-20 23:42:47 -08:00
|
|
|
local vanillaUpdates = require("prototypes/utils/UpdatesVanilla")
|
2019-03-16 20:39:30 -07:00
|
|
|
local attackBall = require("prototypes/utils/AttackBall")
|
2017-04-01 16:40:47 -07:00
|
|
|
|
2021-02-20 12:44:52 -08:00
|
|
|
if settings.startup["rampant--useDumbProjectiles"].value or settings.startup["rampant--newEnemies"].value then
|
2019-03-16 20:39:30 -07:00
|
|
|
attackBall.generateVanilla()
|
2017-04-01 16:40:47 -07:00
|
|
|
vanillaUpdates.useDumbProjectiles()
|
|
|
|
end
|
|
|
|
|
2018-02-16 17:48:50 -08:00
|
|
|
for _, robot in pairs(data.raw["logistic-robot"]) do
|
2021-02-20 12:44:52 -08:00
|
|
|
if (settings.startup["rampant--unkillableLogisticRobots"].value) then
|
2019-04-05 20:01:46 -07:00
|
|
|
robot.resistances = {}
|
|
|
|
for damageType, _ in pairs(data.raw["damage-type"]) do
|
|
|
|
robot.resistances[damageType] = {
|
|
|
|
type = damageType,
|
|
|
|
percent = 100
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2018-02-16 17:48:50 -08:00
|
|
|
end
|
|
|
|
|
|
|
|
for _, robot in pairs(data.raw["construction-robot"]) do
|
2021-02-20 12:44:52 -08:00
|
|
|
if (settings.startup["rampant--unkillableConstructionRobots"].value) then
|
2021-02-27 14:50:26 -08:00
|
|
|
robot.resistances = {}
|
2019-04-05 20:01:46 -07:00
|
|
|
for damageType, _ in pairs(data.raw["damage-type"]) do
|
|
|
|
robot.resistances[damageType] = {
|
|
|
|
type = damageType,
|
|
|
|
percent = 100
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2018-02-16 17:48:50 -08:00
|
|
|
end
|
|
|
|
|