Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if mods["apia"] then
- local util = require("util.util")
- local phosphorus_ammo = data.raw["ammo"]["artillery-shell-with-phosphorus"]
- local phosphorus_projectile = data.raw["artillery-projectile"]["artillery-projectile-with-phosphorus"]
- local phosphorus_recipe = data.raw["recipe"]["artillery-shell-with-phosphorus"]
- local bio_solar_panel = data.raw["solar-panel"]["bio-solar-panel"]
- local bio_solar_item = data.raw["item"]["bio-solar-panel"]
- -- Non-optional settings
- if phosphorus_ammo then
- phosphorus_ammo.icon = "__xy-k2so-enhancements-nulls-fork__/icons/phosphorus-artillery-shell.png"
- end
- util.relax_conditions_for_planet("assembling-machine", "kr-greenhouse", "apia")
- if data.raw["combat-robot"] and data.raw["combat-robot"]["flamethrower"] then
- data.raw["combat-robot"]["flamethrower"].time_to_live = 120 * 60
- end
- -- Phosphorus Artillery Shell
- if settings.startup["xy-apia-artillery-rebalance"].value then
- if phosphorus_projectile then
- phosphorus_projectile.action = phosphorus_projectile.action or { type = "direct" }
- phosphorus_projectile.action.action_delivery = {
- type = "instant",
- target_effects = {
- {
- type = "nested-result",
- action = {
- type = "area",
- radius = 10.0,
- action_delivery = {
- type = "instant",
- target_effects = {
- { type = "damage", damage = { amount = 2500, type = "physical" } },
- { type = "damage", damage = { amount = 2500, type = "explosion" } }
- }
- }
- }
- },
- {
- type = "create-trivial-smoke",
- smoke_name = "artillery-smoke",
- initial_height = 0,
- speed_from_center = 0.05,
- speed_from_center_deviation = 0.005,
- offset_deviation = {{-4, -4}, {4, 4}},
- max_radius = 3.5,
- repeat_count = 4 * 4 * 15
- },
- {
- type = "create-smoke",
- entity_name = "phosphorus-cloud",
- repeat_count = 8,
- random_offset = true,
- offset_deviation = {{-8, -8}, {8, 8}}
- },
- {
- type = "create-entity",
- entity_name = "big-artillery-explosion"
- },
- {
- type = "show-explosion-on-chart",
- scale = 8 / 32
- }
- }
- }
- end
- if phosphorus_ammo then
- phosphorus_ammo.stack_size = 25
- phosphorus_ammo.weight = 1000 * kg
- end
- if phosphorus_recipe then
- phosphorus_recipe.ingredients = {
- { type = "item", name = "steel-plate", amount = 10 },
- { type = "item", name = "processing-unit", amount = 10 },
- { type = "item", name = "phosphorus", amount = 15 },
- { type = "item", name = "artillery-shell", amount = 1 }
- }
- end
- end
- -- Bio Solar Panel
- if settings.startup["xy-apia-biosolar-rebalance"].value then
- if bio_solar_panel then
- bio_solar_panel.emissions_per_second = { pollution = -0.2 }
- bio_solar_panel.production = "120kW"
- end
- if bio_solar_item then
- bio_solar_item.weight = 40000
- bio_solar_item.stack_size = 50
- end
- end
- end
Advertisement
Comments
-
- It only ensures that the module starts up. There may still be problems later on.
Add Comment
Please, Sign In to add comment