py compatibility with jetpack

This commit is contained in:
Brevven 2021-01-16 20:35:04 -08:00
parent ade23d7b2a
commit 766a3c5b68
4 changed files with 12 additions and 3 deletions

View file

@ -1,4 +1,10 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 0.9.10
Date: 2021-01-09
Changes:
- More very minor compatibility tweaks for py
- Remove some logspam
---------------------------------------------------------------------------------------------------
Version: 0.9.9 Version: 0.9.9
Date: 2021-01-09 Date: 2021-01-09
Changes: Changes:

View file

@ -28,7 +28,6 @@ end
function data_util.check_for_ingredient(recipe, name) function data_util.check_for_ingredient(recipe, name)
if recipe ~= nil and recipe.ingredients ~= nil then if recipe ~= nil and recipe.ingredients ~= nil then
log(serpent.dump(recipe))
for i, ingredient in pairs(recipe.ingredients) do for i, ingredient in pairs(recipe.ingredients) do
if ingredient.name == name then if ingredient.name == name then
return true return true
@ -59,7 +58,7 @@ end
--- removes a prerequisite tech --- removes a prerequisite tech
function data_util.remove_prerequisite(tech, prereq) function data_util.remove_prerequisite(tech, prereq)
if data.raw.technology[tech] then if data.raw.technology[tech] then
for i=1, #data.raw.technology[tech].prerequisites, 1 do for i, prerequisite in pairs(data.raw.technology[tech].prerequisites) do
if data.raw.technology[tech].prerequisites[i] == prereq then if data.raw.technology[tech].prerequisites[i] == prereq then
table.remove(data.raw.technology[tech].prerequisites, i) table.remove(data.raw.technology[tech].prerequisites, i)
break break

View file

@ -1,6 +1,6 @@
{ {
"name": "bztitanium", "name": "bztitanium",
"version": "0.9.9", "version": "0.9.10",
"factorio_version": "1.1", "factorio_version": "1.1",
"title": "Titanium", "title": "Titanium",
"author": "Brevven", "author": "Brevven",

View file

@ -67,3 +67,7 @@ if mods["Hover-Car"] then
util.steel_to_titanium(data.raw.recipe["hover-car-mk2-recipe"].expensive) util.steel_to_titanium(data.raw.recipe["hover-car-mk2-recipe"].expensive)
end end
-- Just a general compatiblity improvement with py alien life enabled alongside jetpack or other equipment mods
if mods["pyalienlife"] then
util.remove_prerequisite("modular-armor", "advanced-electronics")
end