early option, less trees

This commit is contained in:
Brevven 2023-03-12 03:59:44 -07:00
parent 994fef1d69
commit 0e63324488
7 changed files with 39 additions and 6 deletions

View file

@ -1,4 +1,11 @@
---------------------------------------------------------------------------------------------------
Version: 0.7.0
Date: 2023-03-13
Features:
- New setting to disable the need for zircon in the early game.
Changes:
- Trees should spawn less often on ore
---------------------------------------------------------------------------------------------------
Version: 0.6.15
Date: 2023-02-12
Changes:

View file

@ -1,6 +1,6 @@
{
"name": "bzzirconium",
"version": "0.6.15",
"version": "0.7.0",
"factorio_version": "1.1",
"title": "Zirconium",
"author": "Brevven",

View file

@ -61,11 +61,14 @@ bzzirconium-recipe-bypass=Bypass recipes
bzzirconium-byproduct=Output byproducts
bzzirconium-enable-intermediates=Enable cermet
bzzirconium-enable-sorting=Enable stone sorting
bzzirconium-early=Early zircon
[mod-setting-description]
bzzirconium-recipe-bypass=Skip modifying these recipes (comma-separated list).
bzzirconium-byproduct=If enabled and using Titanium mod, zirconia production will output titanium as a byproduct.
bzzirconium-enable-intermediates=Enable cermet, an advanced intermediate made from ceramics and metals.
bzzirconium-enable-sorting=Enable "sorting" recipes to convert between zircon and stone. This is no longer as useful for burner phase as it used to be, but left as an option for certain map layouts or existing factories.
bzzirconium-early=If [color=green]enabled[\color], zircon is required in small quantities early in the game.\nIf [color=orange]disabled[/color], zircon is not required until after logistic science.
[string-mod-setting]
bzzirconium-enable-intermediates-lds=Yes, and __ITEM__cermet__ in __ITEM__low-density-structure__
bzzirconium-enable-intermediates-yes=Yes, but not in __ITEM__low-density-structure__

4
me.lua
View file

@ -12,6 +12,10 @@ function me.byproduct()
return me.get_setting("bzzirconium-byproduct") and not me.get_setting("bz-no-byproduct")
end
function me.early()
return me.get_setting("bzzirconium-early")
end
function me.use_cermet()
if me.get_setting("bz-all-intermediates") then return true end
return me.get_setting("bzzirconium-enable-intermediates") == "yes" or me.cermet_lds()

View file

@ -5,12 +5,14 @@ data:extend({
setting_type = "startup",
default_value = "",
allow_blank = true,
order = "a-a-a",
},
{
type = "bool-setting",
name = "bzzirconium-byproduct",
setting_type = "startup",
default_value = true,
order = "a-b-a",
},
{
type = "string-setting",
@ -18,11 +20,20 @@ data:extend({
setting_type = "startup",
default_value = "lds",
allowed_values = {"lds", "yes", "no"},
order = "b-a-a",
},
{
type = "bool-setting",
name = "bzzirconium-early",
setting_type = "startup",
default_value = true,
order = "c-a-a",
},
{
type = "bool-setting",
name = "bzzirconium-enable-sorting",
setting_type = "startup",
default_value = false,
order = "m-a-a",
},
})

View file

@ -1,7 +1,7 @@
local resource_autoplace = require('resource-autoplace');
local noise = require('noise');
local util = require("__bzzirconium__.data-util");
local util = require("data-util");
data:extend({
{
@ -23,6 +23,8 @@ data:extend({
flags = {"placeable-neutral"},
order="a-b-a",
map_color = {r=0.90, g=0.70, b=0.70},
tree_removal_probability = 0.7,
tree_removal_max_distance = 32 * 32,
minable =
{
hardness = 1,

View file

@ -1,4 +1,4 @@
local util = require("__bzzirconium__.data-util");
local util = require("data-util");
local nuclear_plate = mods.bzlead and "lead-plate" or "iron-plate"
local nuclear_z = data.raw.item["zircaloy-4"] and "zircaloy-4" or "zirconium-plate"
@ -8,9 +8,13 @@ if mods.bzfoundry and data.raw.item["foundry"] then
end
util.replace_some_ingredient("stone-furnace", "stone", 1, "zircon", 1)
if util.me.early() then
util.replace_some_ingredient("stone-furnace", "stone", 1, "zircon", 1)
end
if not mods["Krastorio2"] then
util.replace_some_ingredient("steel-furnace", "stone-brick", 4, "zircon", 6)
if util.me.early() then
util.replace_some_ingredient("steel-furnace", "stone-brick", 4, "zircon", 6)
end
util.replace_some_ingredient("electric-furnace", "stone-brick", 5, "zirconia", 5)
end
@ -74,7 +78,9 @@ if mods["Krastorio2"] then
util.add_ingredient("kr-fusion-reactor", nuclear_z, 350)
util.add_ingredient("kr-antimatter-reactor", nuclear_z, 350)
util.replace_some_ingredient("stone-brick", "stone", 5, "zircon", 5)
if util.me.early() then
util.replace_some_ingredient("stone-brick", "stone", 5, "zircon", 5)
end
if mods["space-exploration"] then
util.replace_some_ingredient("se-stone-brick-vulcanite", "stone", 2, "zircon", 2)
end