Skip to content

Commit

Permalink
Merge branch 'Frozen' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Septiple committed Apr 30, 2024
2 parents 2be930f + 9ce9c56 commit 4f5736e
Show file tree
Hide file tree
Showing 13 changed files with 156 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/workflows/factoriotest-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request_target:
branches:
- main
- Frozen
paths-ignore:
- 'cached-configs/**'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/factoriotest-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- Frozen
paths-ignore:
- 'cached-configs/**'

Expand Down
26 changes: 22 additions & 4 deletions PyPP-Regen-New.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -233,25 +233,43 @@ function Choose-PyCacheFiles{
}
}

function Space-Mode{
$Regex = 'pystellarexpedition'
foreach ($CacheFileModList in $CacheFileModLists)
{
if ($CacheFileModList.Path -match $Regex){
$CacheFileModList.Enabled = $true
Write-Host "Matched $($CacheFileModList.Path)"
}else{
$CacheFileModList.Enabled = $false
}
}
}

function Choose-PyModSetMenu{
$change_sets = New-Object System.Management.Automation.Host.ChoiceDescription "&Change cache file sets", "Change what cache files to generate"
$print_sets = New-Object System.Management.Automation.Host.ChoiceDescription "&Print cache files", "Print all cache files that will get generated"
$print_settings = New-Object System.Management.Automation.Host.ChoiceDescription "Print &settings", "Print all current settings."
$print_settings = New-Object System.Management.Automation.Host.ChoiceDescription "P&rint settings", "Print all current settings."
$explain = New-Object System.Management.Automation.Host.ChoiceDescription "E&xplain", "Explain what this script is for."
$generate = New-Object System.Management.Automation.Host.ChoiceDescription "&Generate", "Begin cache file generation."
$space = New-Object System.Management.Automation.Host.ChoiceDescription "&Space Mode", "Quickly generate cache files just for pySE and pyAliens."
$exit = New-Object System.Management.Automation.Host.ChoiceDescription "&Exit", "Exit this script."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($change_sets, $print_sets, $print_settings, $explain, $generate, $exit)
$options = [System.Management.Automation.Host.ChoiceDescription[]]($change_sets, $print_sets, $print_settings, $explain, $space, $generate, $exit)

$done = $false
while (!$done){
$decision = $host.ui.PromptForChoice("Py cache file generation", "Pick an option", $options, 4)
$decision = $host.ui.PromptForChoice("Py cache file generation", "Pick an option", $options, 5)
switch ($decision)
{
0 {Choose-PyCacheFiles}
1 {Print-PyCacheFiles}
2 {Print-PySettings}
3 {Print-PyExplanation}
5 {
4 {
Space-Mode
$done = $true
}
6 {
Write-Host "Exiting early, bye!"
Exit
}
Expand Down
20 changes: 20 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
---------------------------------------------------------------------------------------------------
Version: 0.2.23
Date: 2024-4-25
Changes:
- Changed the big inventory GUI startup setting from default OFF -> default ON
- Added a new startup setting to compactify recipe descriptions. Default ON.
- Ulric man is no longer shown in the "made-in" section of recipe tooltips.
---------------------------------------------------------------------------------------------------
Version: 0.2.22
Date: 2024-4-15
Changes:
- Made sure very early techs are not effected by tech cost multiplier (https://github.com/pyanodon/pybugreports/issues/467)
- Fixed duplicate "affected-by-productivity" text on recipe descriptions when combined with the extended-descriptions mod.
- Added open/close SFX to all machines (https://github.com/pyanodon/pybugreports/issues/421)
- Fixed a crash with the transport drones compatibility
---------------------------------------------------------------------------------------------------
Version: 0.2.21
Date: 2024-4-1
Changes:
- Added some basic compatibility with Galdoc Manufacturing mod
---------------------------------------------------------------------------------------------------
Version: 0.2.20
Date: 2024-3-13
Changes:
Expand Down
4 changes: 4 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ script.on_configuration_changed(function()
if remote.interfaces['pywiki_turd_page'] then
for _, force in pairs(game.forces) do remote.call('pywiki_turd_page', 'reapply_turd_bonuses', force) end
end

if remote.interfaces['pyse_start_seqence'] then
for _, force in pairs(game.forces) do remote.call('pyse_start_seqence', 'update_force', force) end
end
end)


Expand Down
2 changes: 1 addition & 1 deletion data-final-fixes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ if mods['PyBlock'] then
create_tmp_tech('borax-mine', 'glass')
end

if mods.pycoalprocessing then
if mods.pycoalprocessing and not mods['extended-descriptions'] then
local FUN = require('__pycoalprocessing__/prototypes/functions/functions')
for _, recipe in pairs(data.raw.module['productivity-module'].limitation or {}) do
recipe = data.raw.recipe[recipe]
Expand Down
78 changes: 62 additions & 16 deletions data-updates.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local py_utils = require("prototypes.functions.utils")
local py_utils = require('prototypes.functions.utils')
require('__stdlib__/stdlib/data/data').Util.create_data_globals()

local function set_underground_recipe(underground, belt, prev_underground, prev_belt)
Expand All @@ -16,32 +16,32 @@ local function set_underground_recipe(underground, belt, prev_underground, prev_
RECIPE(underground):remove_ingredient(ing.name)
:add_ingredient{ type = ing.type, name = ing.name, amount = ing.amount * prev_dist / belt_count}

if ing.type == "fluid" then fluid = true end
if ing.type == 'fluid' then fluid = true end
end
end

if fluid and (RECIPE(underground).category or "crafting") == "crafting" then
RECIPE(underground):set_fields{ category = "crafting-with-fluid" }
if fluid and (RECIPE(underground).category or 'crafting') == 'crafting' then
RECIPE(underground):set_fields{ category = 'crafting-with-fluid' }
end
end

RECIPE(underground):remove_ingredient(belt):add_ingredient{ type = "item", name = belt, amount = dist - prev_dist}
RECIPE(underground):remove_ingredient(belt):add_ingredient{ type = 'item', name = belt, amount = dist - prev_dist}
end


-- Set underground belt recipes
set_underground_recipe("underground-belt", "transport-belt", nil, nil)
set_underground_recipe("fast-underground-belt", "fast-transport-belt", "underground-belt", "transport-belt")
set_underground_recipe("express-underground-belt", "express-transport-belt", "fast-underground-belt", "fast-transport-belt")
set_underground_recipe('underground-belt', 'transport-belt', nil, nil)
set_underground_recipe('fast-underground-belt', 'fast-transport-belt', 'underground-belt', 'transport-belt')
set_underground_recipe('express-underground-belt', 'express-transport-belt', 'fast-underground-belt', 'fast-transport-belt')

local big_recipe_icons_blacklist = {
["rc-mk01"] = true,
["rc-mk02"] = true,
["rc-mk03"] = true,
["rc-mk04"] = true,
['rc-mk01'] = true,
['rc-mk02'] = true,
['rc-mk03'] = true,
['rc-mk04'] = true,
}

for _, prototype in pairs{"assembling-machine", "furnace"} do
for _, prototype in pairs{'assembling-machine', 'furnace'} do
for _, entity in pairs(data.raw[prototype]) do
if not entity.name or big_recipe_icons_blacklist[entity.name] then goto continue end
local box = entity.selection_box or entity.collision_box
Expand All @@ -55,7 +55,53 @@ for _, prototype in pairs{"assembling-machine", "furnace"} do
end
end

if settings.startup["pypp-big-inventory-gui"].value then
data.raw["utility-constants"]["default"].select_slot_row_count = 17
data.raw["utility-constants"]["default"].select_group_row_count = 100
if settings.startup['pypp-big-inventory-gui'].value then
data.raw['utility-constants']['default'].select_slot_row_count = 17
data.raw['utility-constants']['default'].select_group_row_count = 100
end

if settings.startup['pypp-compactified-recipe-tooltips'].value then
for _, type in pairs{'assembling-machine', 'furnace', 'rocket-silo'} do
for _, entity in pairs(data.raw[type]) do
if
entity.name and
(entity.name:find('%-[23456789]$') or entity.name:find('%-[mM][kK]0[23456789]$'))
and not entity.name:find('-powerplant-', 1, true)
and not entity.name:find('quantum-computer', 1, true)
then
entity.flags = entity.flags or {}
table.insert(entity.flags, 'not-in-made-in')
end
end
end
end

if data.raw['character']['ulric-man'] then
table.insert(data.raw['character']['ulric-man'].flags, 'not-in-made-in')
end

-- make sure very early techs are not effected by the tech cost multiplier
local function prevent_cost_multiplier(name)
local tech = data.raw.technology[name]
if not tech then return end
tech.ignore_tech_cost_multiplier = true
end

prevent_cost_multiplier('wood-processing')
prevent_cost_multiplier('moss-mk01')
prevent_cost_multiplier('automation')
prevent_cost_multiplier('soil-washing')
prevent_cost_multiplier('botany-mk01')
prevent_cost_multiplier('glass')
prevent_cost_multiplier('mining-with-fluid')
prevent_cost_multiplier('steel-processing')
prevent_cost_multiplier('coal-processing-1')

-- Add open/close SFX to machines

for _, type in pairs{'assembling-machine', 'furnace', 'lab', 'rocket-silo', 'beacon', 'mining-drill'} do
for _, entity in pairs(data.raw[type]) do
if not entity.open_sound then entity.open_sound = { filename = '__base__/sound/machine-open.ogg', volume = 0.5 } end
if not entity.close_sound then entity.close_sound = { filename = '__base__/sound/machine-close.ogg', volume = 0.5 } end
end
end
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pypostprocessing",
"version": "0.2.20",
"version": "0.2.23",
"factorio_version": "1.1",
"title": "Pyanodons Post-processing",
"author": "Pyanodon, Shadowglass",
Expand Down
2 changes: 2 additions & 0 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[mod-setting-name]
pypp-verbose-logging=Verbose logging
pypp-big-inventory-gui=Big inventory GUI
pypp-compactified-recipe-tooltips=Compactified recipe tooltips

[mod-setting-description]
pypp-verbose-logging=Generates detailed logs for debugging dependency errors
pypp-big-inventory-gui=Increases the size of the inventory GUI to fit more recipe icons. Works well with "flat" GUI mode.
pypp-compactified-recipe-tooltips=Makes recipe tooltips take up less screen space by removing redundant information in the "made-in" section. If a recipe is made in multiple tiers of the same machine, only the first machine tier is shown.

[command-help]
check-technology-consistency=Checks technologies against their prototypes to ensure they aren't improperly hidden or disabled.\nThis should only be used if you're encountering deadlocks from seemingly orphaned technologies.
Expand Down
8 changes: 8 additions & 0 deletions prototypes/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ if mods['pyalienlife'] then
config.STARTING_ITEMS:add('guano')
end

if mods.pystellarexpedition then
for _, item in pairs(require '__pystellarexpedition__.prototypes.crash-site-items') do
config.STARTING_ITEMS:add(item.name)
end
config.STARTING_ITEMS:add('ice')
config.STARTING_ITEMS:add('silicate-stone')
end

if mods['pyalternativeenergy'] then
config.ENTITY_SCRIPT_UNLOCKS['numal-reef-mk01'] = { 'numal-reef-mk01' }
config.ENTITY_SCRIPT_UNLOCKS['numal-reef-mk02'] = { 'numal-reef-mk02' }
Expand Down
5 changes: 4 additions & 1 deletion prototypes/functions/compatibility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ if mods['pyrawores'] then
end
end

if mods["galdocs-manufacturing"] then
require("prototypes/functions/galdoc")
end

if mods['DeadlockLargerLamp'] then
-- Originally these include electronic-circuits and are unlocked at optics, causing a deadlock in pymods
Expand Down Expand Up @@ -201,7 +204,7 @@ if mods['Transport_Drones'] then
TECHNOLOGY('transport-drone-speed-4'):add_prereq('utility-science-pack')
TECHNOLOGY('transport-drone-capacity-5'):add_prereq('space-science-pack')
for r, depotrecipe in pairs(transportdepots) do
if data.raw.recipe[depotrecipe].ingredients['iron-plate'] then
if data.raw.recipe[depotrecipe] and data.raw.recipe[depotrecipe].ingredients['iron-plate'] then
data.raw.recipe[depotrecipe].ingredients['iron-plate'].amount = data.raw.recipe[depotrecipe].ingredients['iron-plate'].amount / 2
end
RECIPE(depotrecipe):add_ingredient({type = 'item', name = 'electronic-circuit', amount = 1}):add_ingredient({type = 'item', name = 'solder', amount = 5})
Expand Down
22 changes: 22 additions & 0 deletions prototypes/functions/galdoc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local FUN = require("__pycoalprocessing__/prototypes/functions/functions")

--zinc
FUN.global_item_replacer("ore-zinc", "zinc-ore")
FUN.global_item_replacer("zinc-plate", "zinc-plate-stock")

--lead
FUN.global_item_replacer("ore-lead","lead-ore")
FUN.global_item_replacer("lead-plate", "lead-plate-stock")
TECHNOLOGY("gm-lead-stock-processing"):remove_pack("chemical-science-pack")
TECHNOLOGY("gm-lead-machined-part-processing"):remove_pack("chemical-science-pack")

--nickel
FUN.global_item_replacer("ore-nickel","nickel-ore")
FUN.global_item_replacer("nickel-plate", "nickel-plate-stock")

--titanium
FUN.global_item_replacer("ore-titanium","titanium-ore")
FUN.global_item_replacer("titanium-plate", "titanium-plate-stock")

--Shafts
RECIPE("shaft-mk01"):remove_ingredient("solder"):add_ingredient({type = "item", name = "basic-shafting", amount = 2})
9 changes: 8 additions & 1 deletion settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ data:extend(
type = "bool-setting",
name = "pypp-big-inventory-gui",
setting_type = "startup",
default_value = false,
default_value = true,
order = "e",
},
{
type = "bool-setting",
name = "pypp-compactified-recipe-tooltips",
setting_type = "startup",
default_value = true,
order = "e",
}
})

0 comments on commit 4f5736e

Please sign in to comment.