1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-07 23:01:39 +02:00
Rampant/prototypes/buildings/ChunkScanner.lua

118 lines
3.8 KiB
Lua
Raw Normal View History

2019-10-21 02:53:16 +02:00
local biterFunctions = require("prototypes/utils/BiterUtils")
2019-11-04 08:19:22 +02:00
local constants = require("libs/Constants")
2019-03-28 05:55:13 +02:00
data:extend({
2019-10-21 02:53:16 +02:00
biterFunctions.makeBiter("chunk-scanner-squad",
{
scale=15,
2019-11-04 08:19:22 +02:00
movement=1,
effectiveLevel=1
2019-10-21 02:53:16 +02:00
},
biterFunctions.createMeleeAttack({
radius=1,
damage=1,
2019-11-04 08:19:22 +02:00
scale=15,
effectiveLevel=1
2019-10-21 02:53:16 +02:00
}),
{}),
biterFunctions.makeBiter("chunk-scanner-squad-movement",
{
scale=2.5,
2019-11-04 08:19:22 +02:00
movement=1,
effectiveLevel=1
2019-10-21 02:53:16 +02:00
},
biterFunctions.createMeleeAttack({
radius=1,
damage=1,
2019-11-04 08:19:22 +02:00
scale=1,
effectiveLevel=1
2019-10-21 02:53:16 +02:00
}),
2019-11-04 08:19:22 +02:00
{})
})
2019-03-28 05:55:13 +02:00
local scales = {
2019-11-04 08:19:22 +02:00
[1] = 0.9,
[2] = 1.1,
[3] = 1.2,
[4] = 1.3,
[5] = 1.4,
[6] = 1.5,
[7] = 1.6,
2019-11-07 07:56:09 +02:00
[8] = 1.8,
[9] = 2.0,
[10] = 2.1,
[11] = 2.2
2019-03-28 05:55:13 +02:00
}
for t=1,11 do
2019-11-04 08:19:22 +02:00
local scale = scales[t] * 1.2
2019-03-28 05:55:13 +02:00
data:extend(
{
{
2019-10-22 07:30:23 +02:00
type = "simple-entity-with-force",
2019-03-28 05:55:13 +02:00
name = "chunk-scanner-" .. t .. "-nest-rampant",
2019-10-22 07:30:23 +02:00
icon = "__base__/graphics/icons/steel-chest.png",
2019-03-28 05:55:13 +02:00
icon_size = 32,
flags = {},
2019-10-22 07:30:23 +02:00
order = "s-e-w-f",
2019-03-28 05:55:13 +02:00
collision_mask = {"player-layer", "object-layer", "water-tile"},
2019-10-22 07:30:23 +02:00
minable = nil,
max_health = 100,
corpse = nil,
2019-03-28 05:55:13 +02:00
collision_box = {{-3 * scale, -2 * scale}, {2 * scale, 2 * scale}},
2019-10-21 02:53:16 +02:00
selection_box = {{-3 * scale, -2 * scale}, {2 * scale, 2 * scale}},
2019-03-28 05:55:13 +02:00
picture =
{
2019-10-22 07:30:23 +02:00
filename = "__core__/graphics/empty.png",
2019-03-28 05:55:13 +02:00
priority = "extra-high",
2019-10-22 07:30:23 +02:00
width = 1,
height = 1
}
2019-10-21 02:53:16 +02:00
}
2019-03-28 05:55:13 +02:00
}
)
end
2019-10-21 06:38:36 +02:00
2019-11-07 07:56:09 +02:00
-- local types = constants.FACTION_TYPES
2019-10-22 07:30:23 +02:00
2019-11-04 08:19:22 +02:00
local subTypes = constants.HIVE_BUILDINGS_TYPES
2019-10-21 06:38:36 +02:00
2019-11-07 07:56:09 +02:00
-- for x=1,#types do
-- local name = types[x]
2019-11-04 08:19:22 +02:00
2019-11-07 07:56:09 +02:00
for t=1,11 do
local scale = scales[t] * 1.2
2019-10-22 07:30:23 +02:00
2019-11-07 07:56:09 +02:00
for si=1,#subTypes do
local st = subTypes[si]
2019-10-22 07:30:23 +02:00
2019-11-07 07:56:09 +02:00
data:extend(
{
2019-10-21 06:38:36 +02:00
{
2019-11-07 07:56:09 +02:00
type = "simple-entity-with-force",
name = "entity-proxy-" .. st .. "-t" .. t .. "-rampant",
icon = "__base__/graphics/icons/steel-chest.png",
icon_size = 32,
flags = {},
order = "s-e-w-f",
collision_mask = {"player-layer", "object-layer", "water-tile"},
minable = nil,
max_health = 100,
corpse = nil,
collision_box = {{-3 * scale, -2 * scale}, {2 * scale, 2 * scale}},
selection_box = {{-3 * scale, -2 * scale}, {2 * scale, 2 * scale}},
picture =
{
filename = "__core__/graphics/empty.png",
priority = "extra-high",
width = 1,
height = 1
}
2019-10-21 06:38:36 +02:00
}
2019-11-07 07:56:09 +02:00
}
)
2019-10-21 06:38:36 +02:00
end
end
2019-11-07 07:56:09 +02:00
-- end