Skip to content

Commit

Permalink
Format with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Jan 19, 2025
1 parent dc9273e commit abe05f1
Show file tree
Hide file tree
Showing 21 changed files with 598 additions and 598 deletions.
8 changes: 4 additions & 4 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ require "scripts/wiki/text-pages"
require "scripts/bitumen"

remote.add_interface("pyph", {
---@param func string
execute_on_nth_tick = function(func)
py.mod_nth_tick_funcs[func]()
end
---@param func string
execute_on_nth_tick = function(func)
py.mod_nth_tick_funcs[func]()
end
})

py.finalize_events()
82 changes: 41 additions & 41 deletions data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ require "prototypes/updates/pyindustry-updates"
require "prototypes/updates/compat-updates"

if mods["pyrawores"] then
require "prototypes/updates/pyrawores-updates"
require "prototypes/updates/pyrawores-updates"
end

if mods["pyhightech"] then
require "prototypes/updates/pyhightech-updates"
require "prototypes/updates/pyhightech-updates"
end

require "prototypes/updates/tholin-overhaul"
Expand Down Expand Up @@ -47,51 +47,51 @@ data.raw["rocket-silo"]["rocket-silo"].rocket_parts_required = 15

local remove_old_oil_stuff =
{
["pumpjack"] = true,
["oil-refinery"] = true,
["basic-oil-processing"] = true,
["advanced-oil-processing"] = true,
["heavy-oil-cracking"] = true,
["light-oil-cracking"] = true,
["coal-liquefaction"] = true
["pumpjack"] = true,
["oil-refinery"] = true,
["basic-oil-processing"] = true,
["advanced-oil-processing"] = true,
["heavy-oil-cracking"] = true,
["light-oil-cracking"] = true,
["coal-liquefaction"] = true
}

local recipes_to_keep = {}

--log(serpent.block(remove_old_oil_stuff))

for _, recipe in pairs(data.raw.technology["oil-processing"].effects) do
--log('hit')
if recipe.type == "unlock-recipe" then
--log('hit')
--log(recipe.recipe)
if remove_old_oil_stuff[recipe.recipe] == nil then
--log('hit')
table.insert(recipes_to_keep, recipe)
end
end
--log('hit')
if recipe.type == "unlock-recipe" then
--log('hit')
--log(recipe.recipe)
if remove_old_oil_stuff[recipe.recipe] == nil then
--log('hit')
table.insert(recipes_to_keep, recipe)
end
end
end

data.raw.technology["oil-processing"].effects = recipes_to_keep
recipes_to_keep = {}

for _, recipe in pairs(data.raw.technology["advanced-oil-processing"].effects) do
if recipe.type == "unlock-recipe" then
if remove_old_oil_stuff[recipe.recipe] == nil then
table.insert(recipes_to_keep, recipe)
end
end
if recipe.type == "unlock-recipe" then
if remove_old_oil_stuff[recipe.recipe] == nil then
table.insert(recipes_to_keep, recipe)
end
end
end

data.raw.technology["advanced-oil-processing"].effects = recipes_to_keep
recipes_to_keep = {}

for _, recipe in pairs(data.raw.technology["coal-liquefaction"].effects) do
if recipe.type == "unlock-recipe" then
if remove_old_oil_stuff[recipe.recipe] == nil then
table.insert(recipes_to_keep, recipe)
end
end
if recipe.type == "unlock-recipe" then
if remove_old_oil_stuff[recipe.recipe] == nil then
table.insert(recipes_to_keep, recipe)
end
end
end

data.raw.technology["coal-liquefaction"].effects = recipes_to_keep
Expand All @@ -100,30 +100,30 @@ data.raw.planet.nauvis.map_gen_settings.autoplace_controls["crude-oil"] = nil
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["crude-oil"] = nil

for _, preset in pairs(data.raw["map-gen-presets"]["default"]) do
if preset and preset.basic_settings and preset.basic_settings.autoplace_controls and preset.basic_settings.autoplace_controls["crude-oil"] then
preset.basic_settings.autoplace_controls["crude-oil"] = nil
end
if preset and preset.basic_settings and preset.basic_settings.autoplace_controls and preset.basic_settings.autoplace_controls["crude-oil"] then
preset.basic_settings.autoplace_controls["crude-oil"] = nil
end
end

if data.data_crawler then
data.script_enabled = data.script_enabled or {}
table.insert(data.script_enabled, "tar-patch")
if mods["pyhightech"] then table.insert(data.script_enabled, "crash-site-assembling-machine-1-repaired") end
data.script_enabled = data.script_enabled or {}
table.insert(data.script_enabled, "tar-patch")
if mods["pyhightech"] then table.insert(data.script_enabled, "crash-site-assembling-machine-1-repaired") end
end

--gather recipes for module changes
local recipes_list = {
"kevlar-2",
"small-parts-02",
"small-parts-03",
"kevlar-2",
"small-parts-02",
"small-parts-03",
}

--adding to module limitation list
py.allow_productivity(recipes_list)

if register_cache_file ~= nil then
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyindustry+pypetroleumhandling")
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pyhightech", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyhightech+pyindustry+pypetroleumhandling")
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pyrawores", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyindustry+pypetroleumhandling+pyrawores")
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pyrawores", "pyhightech", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyhightech+pyindustry+pypetroleumhandling+pyrawores")
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyindustry+pypetroleumhandling")
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pyhightech", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyhightech+pyindustry+pypetroleumhandling")
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pyrawores", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyindustry+pypetroleumhandling+pyrawores")
register_cache_file({"pycoalprocessing", "pyfusionenergy", "pyindustry", "pyrawores", "pyhightech", "pypetroleumhandling"}, "__pypetroleumhandling__/cached-configs/pycoalprocessing+pyfusionenergy+pyhightech+pyindustry+pypetroleumhandling+pyrawores")
end
58 changes: 29 additions & 29 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"name": "pypetroleumhandling",
"version": "3.0.11",
"factorio_version": "2.0",
"title": "Pyanodons Petroleum Handling",
"author": "Pyanodon, Nexela, Kingarthur, notnotmelon, Mootykins, ShadowGlass, Archezekiel, Quintuple",
"contact": "https://discord.gg/SBHM3h5Utj",
"homepage": "https://forums.factorio.com/viewtopic.php?f=94&t=51490&sid=f5d85f769fccb0ac398bf4036f829064",
"description": "Adds realistic petrochemical processing into Factorio. Process bitumen hydrocarbons into hundreds of products and drill deep for underground oil deposits.",
"dependencies": [
"pyfusionenergy >= 3.0.0",
"pyindustry >= 3.0.0",
"? pyrawores >= 3.0.0",
"? pyhightech >= 3.0.0",
"(?) rso-mod",
"~ pypetroleumhandlinggraphics >= 3.0.4",
"! wret-beacon-rebalance-mod",
"! BigBags",
"! ResearchFog",
"! omnimatter_energy"
],
"package": {
"ignore": [],
"scripts": {}
},
"quality_required": false,
"space_travel_required": false,
"spoiling_required": false,
"freezing_required": false,
"segmented_units_required": false
"name": "pypetroleumhandling",
"version": "3.0.11",
"factorio_version": "2.0",
"title": "Pyanodons Petroleum Handling",
"author": "Pyanodon, Nexela, Kingarthur, notnotmelon, Mootykins, ShadowGlass, Archezekiel, Quintuple",
"contact": "https://discord.gg/SBHM3h5Utj",
"homepage": "https://forums.factorio.com/viewtopic.php?f=94&t=51490&sid=f5d85f769fccb0ac398bf4036f829064",
"description": "Adds realistic petrochemical processing into Factorio. Process bitumen hydrocarbons into hundreds of products and drill deep for underground oil deposits.",
"dependencies": [
"pyfusionenergy >= 3.0.0",
"pyindustry >= 3.0.0",
"? pyrawores >= 3.0.0",
"? pyhightech >= 3.0.0",
"(?) rso-mod",
"~ pypetroleumhandlinggraphics >= 3.0.4",
"! wret-beacon-rebalance-mod",
"! BigBags",
"! ResearchFog",
"! omnimatter_energy"
],
"package": {
"ignore": [],
"scripts": {}
},
"quality_required": false,
"space_travel_required": false,
"spoiling_required": false,
"freezing_required": false,
"segmented_units_required": false
}
6 changes: 3 additions & 3 deletions migrations/2.0.7.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
game.reload_script()

for _, player in pairs(game.players) do
player.force.reset_recipes()
player.force.reset_technologies()
player.force.reset_technology_effects()
player.force.reset_recipes()
player.force.reset_technologies()
player.force.reset_technology_effects()
end
8 changes: 4 additions & 4 deletions prototypes/animations/animations.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--need to figure out how we are doing the animation

data:extend
{
{
{
type = "animation",
name = "reverse-rocket",
type = "animation",
name = "reverse-rocket",

}
}
}
36 changes: 18 additions & 18 deletions prototypes/buildings/natural-gas-derrick.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ RECIPE {
energy_required = 15,
enabled = false,
ingredients = {
{type = "item", name = "evaporator", amount = 1},
{type = "item", name = "distilator", amount = 1},
{type = "item", name = "evaporator", amount = 1},
{type = "item", name = "distilator", amount = 1},
{type = "item", name = "natural-gas-derrick-mk01", amount = 1},
{type = "item", name = "steel-plate", amount = 50},
{type = "item", name = "advanced-circuit", amount = 12},
{type = "item", name = "engine-unit", amount = 5},
{type = "item", name = "small-parts-02", amount = 30},
{type = "item", name = "pipe", amount = 30},
{type = "item", name = "steel-plate", amount = 50},
{type = "item", name = "advanced-circuit", amount = 12},
{type = "item", name = "engine-unit", amount = 5},
{type = "item", name = "small-parts-02", amount = 30},
{type = "item", name = "pipe", amount = 30},
},
results = {
{type = "item", name = "natural-gas-derrick-mk02", amount = 1}
Expand All @@ -92,12 +92,12 @@ RECIPE {
ingredients = {
{type = "item", name = "natural-gas-derrick-mk02", amount = 1},
{mods.pyrawores and "distilator-mk03" or "distilator", 1},
{type = "item", name = "automated-factory-mk01", amount = 1},
{type = "item", name = "steel-plate", amount = 100},
{type = "item", name = "processing-unit", amount = 15},
{type = "item", name = "electric-engine-unit", amount = 5},
{type = "item", name = "small-parts-03", amount = 25},
{type = "item", name = "pipe", amount = 20},
{type = "item", name = "automated-factory-mk01", amount = 1},
{type = "item", name = "steel-plate", amount = 100},
{type = "item", name = "processing-unit", amount = 15},
{type = "item", name = "electric-engine-unit", amount = 5},
{type = "item", name = "small-parts-03", amount = 25},
{type = "item", name = "pipe", amount = 20},
},
results = {
{type = "item", name = "natural-gas-derrick-mk03", amount = 1}
Expand All @@ -111,10 +111,10 @@ RECIPE {
enabled = false,
ingredients = {
{type = "item", name = "natural-gas-derrick-mk03", amount = 1},
{type = "item", name = "distilator", amount = 1},
{type = "item", name = "nbfe-alloy", amount = 50},
{type = "item", name = "low-density-structure", amount = 30},
{type = "item", name = "pipe", amount = 20}
{type = "item", name = "distilator", amount = 1},
{type = "item", name = "nbfe-alloy", amount = 50},
{type = "item", name = "low-density-structure", amount = 30},
{type = "item", name = "pipe", amount = 20}
},
results = {
{type = "item", name = "natural-gas-derrick-mk04", amount = 1}
Expand Down Expand Up @@ -308,4 +308,4 @@ for i = 1, 4 do
localised_name = {"entity-name." .. name},
localised_description = {"entity-description." .. name}
}
end
end
20 changes: 10 additions & 10 deletions prototypes/buildings/oil-derrick.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ RECIPE {
energy_required = 15,
enabled = false,
ingredients = {
{type = "item", name = "evaporator", amount = 1},
{type = "item", name = "evaporator", amount = 1},
{mods.pyrawores and "distilator-mk02" or "distilator", 1},
{type = "item", name = "oil-derrick-mk01", amount = 1},
{type = "item", name = "engine-unit", amount = 5},
{type = "item", name = "steel-plate", amount = 50},
{type = "item", name = "advanced-circuit", amount = 12},
{type = "item", name = "small-parts-02", amount = 30},
{type = "item", name = "pipe", amount = 30},
{type = "item", name = "engine-unit", amount = 5},
{type = "item", name = "steel-plate", amount = 50},
{type = "item", name = "advanced-circuit", amount = 12},
{type = "item", name = "small-parts-02", amount = 30},
{type = "item", name = "pipe", amount = 30},
},
results = {
{type = "item", name = "oil-derrick-mk02", amount = 1}
Expand All @@ -82,7 +82,7 @@ RECIPE {
energy_required = 15,
enabled = false,
ingredients = {
{type = "item", name = "oil-derrick-mk02", amount = 1},
{type = "item", name = "oil-derrick-mk02", amount = 1},
{mods.pyrawores and "distilator-mk03" or "distilator", 1},
{type = "item", name = "steel-plate", amount = 100},
{type = "item", name = "electric-engine-unit", amount = 10},
Expand All @@ -101,7 +101,7 @@ RECIPE {
energy_required = 15,
enabled = false,
ingredients = {
{type = "item", name = "oil-derrick-mk03", amount = 1},
{type = "item", name = "oil-derrick-mk03", amount = 1},
{type = "item", name = "distilator", amount = 1},
{type = "item", name = "nbfe-alloy", amount = 50},
{type = "item", name = "low-density-structure", amount = 30},
Expand Down Expand Up @@ -275,7 +275,7 @@ for i = 1, 4 do
local name = "oil-derrick-mk0" .. i
local icon = "__pypetroleumhandlinggraphics__/graphics/icons/oil-derrick-mk0" .. i .. ".png"
local icon_size = 64

ITEM {
type = "item",
name = name,
Expand Down Expand Up @@ -414,4 +414,4 @@ for i = 1, 4 do
localised_name = {"entity-name." .. name},
localised_description = {"entity-description." .. name}
}
end
end
2 changes: 1 addition & 1 deletion prototypes/buildings/reformer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,4 @@ for i = 1, 4 do
apparent_volume = 2.5
}
}
end
end
2 changes: 1 addition & 1 deletion prototypes/buildings/tar-extractor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -442,4 +442,4 @@ local oil_explosion = {
type = "explosion"
}

data:extend{oil_explosion}
data:extend {oil_explosion}
Loading

0 comments on commit abe05f1

Please sign in to comment.