some updates
This commit is contained in:
parent
efca9e27a4
commit
541444d063
9 changed files with 80 additions and 11 deletions
2
Makefile
2
Makefile
|
|
@ -24,7 +24,7 @@ copy: link
|
||||||
mkdir -p ../$(v)
|
mkdir -p ../$(v)
|
||||||
cp -rf * ../$(v)
|
cp -rf * ../$(v)
|
||||||
rm -f ../$(v).zip
|
rm -f ../$(v).zip
|
||||||
cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak"
|
cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak" -x "*.blend*"
|
||||||
|
|
||||||
install: lint-changelog copy
|
install: lint-changelog copy
|
||||||
cp -f ../$(v).zip ../../mods/
|
cp -f ../$(v).zip ../../mods/
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,16 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.1.2
|
||||||
|
Date: 2021-08-16
|
||||||
|
Fixes:
|
||||||
|
- Enable prod modules on all intermediates
|
||||||
|
- Power Armor MK3 compatibility
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.1.1
|
Version: 0.1.1
|
||||||
Date: 2021-07-26
|
Date: 2021-07-26
|
||||||
Changes:
|
Changes:
|
||||||
- Minor refactor
|
- SE: experimental alloys data recipe
|
||||||
- Add a tech description for cermet tech
|
- Add a tech description for cermet tech
|
||||||
|
- Minor refactor
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.1.0
|
Version: 0.1.0
|
||||||
Date: 2021-07-21
|
Date: 2021-07-21
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
-- require("modules")
|
require("modules")
|
||||||
require("zirconium-recipe-final-stacking")
|
require("zirconium-recipe-final-stacking")
|
||||||
require("zirconium-recipe-final-rrr")
|
require("zirconium-recipe-final-rrr")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
-- WARNING - this file will be overwritten, edit bzlib/data-util.lua
|
-- WARNING WARNING WARNING
|
||||||
|
-- This file will be overwritten in mod zipfiles, edit bzlib/data-util.lua
|
||||||
|
-- WARNING WARNING WARNING
|
||||||
|
|
||||||
local me = require("me")
|
local me = require("me")
|
||||||
local util = {}
|
local util = {}
|
||||||
|
|
@ -32,7 +34,7 @@ end
|
||||||
|
|
||||||
-- Add a prerequisite to a given technology
|
-- Add a prerequisite to a given technology
|
||||||
function util.add_prerequisite(technology_name, prerequisite)
|
function util.add_prerequisite(technology_name, prerequisite)
|
||||||
technology = data.raw.technology[technology_name]
|
local technology = data.raw.technology[technology_name]
|
||||||
if technology and data.raw.technology[prerequisite] then
|
if technology and data.raw.technology[prerequisite] then
|
||||||
if technology.prerequisites then
|
if technology.prerequisites then
|
||||||
table.insert(technology.prerequisites, prerequisite)
|
table.insert(technology.prerequisites, prerequisite)
|
||||||
|
|
@ -44,7 +46,7 @@ end
|
||||||
|
|
||||||
-- Remove a prerequisite from a given technology
|
-- Remove a prerequisite from a given technology
|
||||||
function util.remove_prerequisite(technology_name, prerequisite)
|
function util.remove_prerequisite(technology_name, prerequisite)
|
||||||
technology = data.raw.technology[technology_name]
|
local technology = data.raw.technology[technology_name]
|
||||||
local index = -1
|
local index = -1
|
||||||
if technology and data.raw.technology[prerequisite] then
|
if technology and data.raw.technology[prerequisite] then
|
||||||
for i, prereq in pairs(technology.prerequisites) do
|
for i, prereq in pairs(technology.prerequisites) do
|
||||||
|
|
@ -61,7 +63,7 @@ end
|
||||||
|
|
||||||
-- Add an effect to a given technology
|
-- Add an effect to a given technology
|
||||||
function util.add_effect(technology_name, effect)
|
function util.add_effect(technology_name, effect)
|
||||||
technology = data.raw.technology[technology_name]
|
local technology = data.raw.technology[technology_name]
|
||||||
if technology then
|
if technology then
|
||||||
table.insert(technology.effects, effect)
|
table.insert(technology.effects, effect)
|
||||||
end
|
end
|
||||||
|
|
@ -69,7 +71,7 @@ end
|
||||||
|
|
||||||
-- Set technology ingredients
|
-- Set technology ingredients
|
||||||
function util.set_tech_recipe(technology_name, ingredients)
|
function util.set_tech_recipe(technology_name, ingredients)
|
||||||
technology = data.raw.technology[technology_name]
|
local technology = data.raw.technology[technology_name]
|
||||||
if technology then
|
if technology then
|
||||||
technology.unit.ingredients = ingredients
|
technology.unit.ingredients = ingredients
|
||||||
end
|
end
|
||||||
|
|
@ -351,4 +353,54 @@ function util.add_crafting_category(entity_type, entity, category)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function util.add_to_ingredient(recipe, ingredient, amount)
|
||||||
|
if data.raw.recipe[recipe] then
|
||||||
|
add_to_ingredient(data.raw.recipe[recipe], ingredient, amount)
|
||||||
|
add_to_ingredient(data.raw.recipe[recipe].normal, ingredient, amount)
|
||||||
|
add_to_ingredient(data.raw.recipe[recipe].expensive, ingredient, amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_to_ingredient(recipe, it, amount)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name == it then
|
||||||
|
ingredient.amount = ingredient.amount + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if ingredient[1] == it then
|
||||||
|
ingredient[2] = ingredients[2] + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.add_to_product(recipe, product, amount)
|
||||||
|
if data.raw.recipe[recipe] then
|
||||||
|
add_to_product(data.raw.recipe[recipe], product, amount)
|
||||||
|
add_to_product(data.raw.recipe[recipe].normal, product, amount)
|
||||||
|
add_to_product(data.raw.recipe[recipe].expensive, product, amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_to_product(recipe, product, amount)
|
||||||
|
if recipe ~= nil and recipe.results ~= nil then
|
||||||
|
if recipe.result == product then
|
||||||
|
recipe.result_count = recipe.result_count + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name == product then
|
||||||
|
result.amount = result.amount + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if result[1] == product then
|
||||||
|
result[2] = result[2] + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return util
|
return util
|
||||||
|
|
|
||||||
BIN
graphics/icons/zirconium-plate-old.png
Normal file
BIN
graphics/icons/zirconium-plate-old.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
graphics/icons/zirconium-plate-old.xcf
Normal file
BIN
graphics/icons/zirconium-plate-old.xcf
Normal file
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzzirconium",
|
"name": "bzzirconium",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
"title": "Zirconium",
|
"title": "Zirconium",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ if mods["Krastorio2"] then
|
||||||
table.insert(recipes, "enriched-zircon")
|
table.insert(recipes, "enriched-zircon")
|
||||||
end
|
end
|
||||||
if mods["space-exploration"] then
|
if mods["space-exploration"] then
|
||||||
table.insert(recipes, "tungsten-smelting-vulcanite")
|
table.insert(recipes, "zirconia-smelting-vulcanite")
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
table.insert(recipes, "enriched-tungsten-smelting-vulcanite")
|
table.insert(recipes, "enriched-zirconia-smelting-vulcanite")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,11 @@ if mods["space-exploration"] then
|
||||||
util.add_ingredient("se-hot-thermodynamics-data", "zirconium-plate", 1)
|
util.add_ingredient("se-hot-thermodynamics-data", "zirconium-plate", 1)
|
||||||
util.add_product("se-hot-thermodynamics-data", {name="zirconium-plate", amount=1, probability=0.50})
|
util.add_product("se-hot-thermodynamics-data", {name="zirconium-plate", amount=1, probability=0.50})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
util.add_ingredient("se-experimental-alloys-data", "zirconium-plate", 1)
|
||||||
|
util.add_to_product("se-experimental-alloys-data", "se-experimental-alloys-data", 1)
|
||||||
|
util.add_to_product("se-experimental-alloys-data", "se-scrap", 1)
|
||||||
|
util.add_to_ingredient("se-experimental-alloys-data", "se-empty-data", 1)
|
||||||
end
|
end
|
||||||
-- AAI
|
-- AAI
|
||||||
util.add_ingredient("industrial-furnace", "zirconium-plate", 4)
|
util.add_ingredient("industrial-furnace", "zirconium-plate", 4)
|
||||||
|
|
@ -185,3 +190,8 @@ util.replace_some_ingredient("tritium-breeder-fuel-cell", nuclear_plate, 5, "zir
|
||||||
|
|
||||||
-- Hazmat suit
|
-- Hazmat suit
|
||||||
util.replace_some_ingredient("mil-grade-fuel-cell", nuclear_plate, 5, "zirconium-plate", 5)
|
util.replace_some_ingredient("mil-grade-fuel-cell", nuclear_plate, 5, "zirconium-plate", 5)
|
||||||
|
|
||||||
|
-- Power Armor Mk3
|
||||||
|
util.add_ingredient("pamk3-battmk3", "zirconium-plate", 5)
|
||||||
|
util.add_ingredient("pamk3-pamk4", "zirconium-plate", 10)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue