Code: Select all
if data.raw["unit-spawner"]["bob-biter-spawner"] then
if data.raw["unit-spawner"]["bob-biter-spawner"].loot == nil then
data.raw["unit-spawner"]["bob-biter-spawner"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw["unit-spawner"]["bob-biter-spawner"].loot, { item = "alien-artifact", count_min = 2, count_max = 10, probability = 0.7 } )
end
if data.raw.item["alien-artifact-blue"] then
table.insert(data.raw["unit-spawner"]["bob-biter-spawner"].loot, { item = "alien-artifact-blue", count_min = 1, count_max = 3, probability = 0.9 } )
end
if data.raw.item["alien-artifact-purple"] then
table.insert(data.raw["unit-spawner"]["bob-biter-spawner"].loot, { item = "alien-artifact-purple", count_min = 1, count_max = 3, probability = 0.9 } )
end
if data.raw.item["alien-artifact-blue"] then
table.insert(data.raw["unit-spawner"]["bob-biter-spawner"].loot, { item = "alien-artifact-green", count_min = 1, count_max = 3, probability = 0.9 } )
end
end
if data.raw["unit-spawner"]["bob-spitter-spawner"] then
if data.raw["unit-spawner"]["bob-spitter-spawner"].loot == nil then
data.raw["unit-spawner"]["bob-spitter-spawner"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw["unit-spawner"]["bob-spitter-spawner"].loot, { item = "alien-artifact", count_min = 2, count_max = 10, probability = 0.7 } )
end
if data.raw.item["alien-artifact-orange"] then
table.insert(data.raw["unit-spawner"]["bob-spitter-spawner"].loot, { item = "alien-artifact-orange", count_min = 1, count_max = 3, probability = 0.9 } )
end
if data.raw.item["alien-artifact-red"] then
table.insert(data.raw["unit-spawner"]["bob-spitter-spawner"].loot, { item = "alien-artifact-red", count_min = 1, count_max = 3, probability = 0.9 } )
end
if data.raw.item["alien-artifact-yellow"] then
table.insert(data.raw["unit-spawner"]["bob-spitter-spawner"].loot, { item = "alien-artifact-yellow", count_min = 1, count_max = 3, probability = 0.9 } )
end
end
if data.raw["unit-spawner"]["biter-spawner"] then
if data.raw["unit-spawner"]["biter-spawner"].loot == nil then
data.raw["unit-spawner"]["biter-spawner"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw["unit-spawner"]["biter-spawner"].loot, { item = "alien-artifact", count_min = 2, count_max = 10, probability = 0.7 } )
end
end
if data.raw["unit-spawner"]["spitter-spawner"] then
if data.raw["unit-spawner"]["spitter-spawner"].loot == nil then
data.raw["unit-spawner"]["spitter-spawner"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw["unit-spawner"]["spitter-spawner"].loot, { item = "alien-artifact", count_min = 2, count_max = 10, probability = 0.7 } )
end
end
if data.raw.turret["small-worm-turret"] then
if data.raw.turret["small-worm-turret"].loot == nil then
data.raw.turret["small-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw.turret["small-worm-turret"].loot, { item = "alien-artifact", count_min = 1, count_max = 3, probability = 0.6 } )
end
end
if data.raw.turret["medium-worm-turret"] then
if data.raw.turret["medium-worm-turret"].loot == nil then
data.raw.turret["medium-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw.turret["medium-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.7 } )
end
end
if data.raw.turret["big-worm-turret"] then
if data.raw.turret["big-worm-turret"].loot == nil then
data.raw.turret["big-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact-purple"] then
table.insert(data.raw.turret["big-worm-turret"].loot, { item = "alien-artifact-purple", count_min = 1, count_max = 3, probability = 0.8 } )
end
if data.raw.item["alien-artifact"] then
if data.raw.item["alien-artifact-purple"] then
table.insert(data.raw.turret["big-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.8 } )
else
table.insert(data.raw.turret["big-worm-turret"].loot, { item = "alien-artifact", count_min = 3, count_max = 6, probability = 0.8 } )
end
end
end
if data.raw.turret["bob-big-explosive-worm-turret"] then
if data.raw.turret["bob-big-explosive-worm-turret"].loot == nil then
data.raw.turret["bob-big-explosive-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact-yellow"] then
table.insert(data.raw.turret["bob-big-explosive-worm-turret"].loot, { item = "alien-artifact-yellow", count_min = 1, count_max = 3, probability = 0.8 } )
end
if data.raw.item["alien-artifact"] then
if data.raw.item["alien-artifact-yellow"] then
table.insert(data.raw.turret["bob-big-explosive-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.8 } )
else
table.insert(data.raw.turret["bob-big-explosive-worm-turret"].loot, { item = "alien-artifact", count_min = 3, count_max = 6, probability = 0.8 } )
end
end
end
if data.raw.turret["bob-big-poison-worm-turret"] then
if data.raw.turret["bob-big-poison-worm-turret"].loot == nil then
data.raw.turret["bob-big-poison-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact-green"] then
table.insert(data.raw.turret["bob-big-poison-worm-turret"].loot, { item = "alien-artifact-green", count_min = 1, count_max = 3, probability = 0.8 } )
end
if data.raw.item["alien-artifact"] then
if data.raw.item["alien-artifact-green"] then
table.insert(data.raw.turret["bob-big-poison-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.8 } )
else
table.insert(data.raw.turret["bob-big-poison-worm-turret"].loot, { item = "alien-artifact", count_min = 3, count_max = 6, probability = 0.8 } )
end
end
end
if data.raw.turret["bob-big-fire-worm-turret"] then
if data.raw.turret["bob-big-fire-worm-turret"].loot == nil then
data.raw.turret["bob-big-fire-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact-red"] then
table.insert(data.raw.turret["bob-big-fire-worm-turret"].loot, { item = "alien-artifact-red", count_min = 1, count_max = 3, probability = 0.8 } )
end
if data.raw.item["alien-artifact"] then
if data.raw.item["alien-artifact-red"] then
table.insert(data.raw.turret["bob-big-fire-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.8 } )
else
table.insert(data.raw.turret["bob-big-fire-worm-turret"].loot, { item = "alien-artifact", count_min = 3, count_max = 6, probability = 0.8 } )
end
end
end
if data.raw.turret["bob-big-piercing-worm-turret"] then
if data.raw.turret["bob-big-piercing-worm-turret"].loot == nil then
data.raw.turret["bob-big-piercing-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact-blue"] then
table.insert(data.raw.turret["bob-big-piercing-worm-turret"].loot, { item = "alien-artifact-blue", count_min = 1, count_max = 3, probability = 0.8 } )
end
if data.raw.item["alien-artifact"] then
if data.raw.item["alien-artifact-blue"] then
table.insert(data.raw.turret["bob-big-piercing-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.8 } )
else
table.insert(data.raw.turret["bob-big-piercing-worm-turret"].loot, { item = "alien-artifact", count_min = 3, count_max = 6, probability = 0.8 } )
end
end
end
if data.raw.turret["bob-big-electric-worm-turret"] then
if data.raw.turret["bob-big-electric-worm-turret"].loot == nil then
data.raw.turret["bob-big-electric-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact-orange"] then
table.insert(data.raw.turret["bob-big-electric-worm-turret"].loot, { item = "alien-artifact-orange", count_min = 1, count_max = 3, probability = 0.8 } )
end
if data.raw.item["alien-artifact"] then
if data.raw.item["alien-artifact-orange"] then
table.insert(data.raw.turret["bob-big-electric-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.8 } )
else
table.insert(data.raw.turret["bob-big-electric-worm-turret"].loot, { item = "alien-artifact", count_min = 3, count_max = 6, probability = 0.8 } )
end
end
end
if data.raw.turret["bob-giant-worm-turret"] then
if data.raw.turret["bob-giant-worm-turret"].loot == nil then
data.raw.turret["bob-giant-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw.turret["bob-giant-worm-turret"].loot, { item = "alien-artifact", count_min = 2, count_max = 4, probability = 0.85 } )
end
end
if data.raw.turret["bob-behemoth-worm-turret"] then
if data.raw.turret["bob-behemoth-worm-turret"].loot == nil then
data.raw.turret["bob-behemoth-worm-turret"].loot = {}
end
if data.raw.item["alien-artifact"] then
table.insert(data.raw.turret["bob-behemoth-worm-turret"].loot, { item = "alien-artifact", count_min = 3, count_max = 6, probability = 0.85 } )
end
end