add rough diamonds

This commit is contained in:
Brevven 2021-12-29 01:19:50 -08:00
parent c951cc3570
commit a0e957fea3
19 changed files with 73 additions and 9 deletions

View file

@ -39,7 +39,7 @@ I try to stick to the vanilla factorio spirit, with a slight edge towards more r
---- ----
**CAVEAT** This is still an alpha version. Large balance changes, breaking changes, and many others may happen until it is in beta. This is my most ambitious "resource" mod to date, so it may take a little time to settle. **CAVEAT** This is still an alpha version. Large balance changes, breaking changes, and many others may happen until it is in beta. There may be deadlocks, I'll fix them as I find them. This is my most ambitious "resource" mod to date, so it may take a little time to settle. As always, feedback and suggestions are most welcome.
---- ----

View file

@ -46,7 +46,6 @@ data:extend({
} or } or
{ {
enabled = false, enabled = false,
--energy_required = 128/45,
energy_required = 0.5, energy_required = 0.5,
ingredients = {{"flake-graphite", 1}}, ingredients = {{"flake-graphite", 1}},
result = "graphite" result = "graphite"
@ -54,7 +53,6 @@ data:extend({
expensive = expensive =
{ {
enabled = false, enabled = false,
--energy_required = 256/45,
energy_required = 1, energy_required = 1,
ingredients = {{"flake-graphite", 2}}, ingredients = {{"flake-graphite", 2}},
result = "graphite" result = "graphite"
@ -64,7 +62,6 @@ data:extend({
type = "technology", type = "technology",
name = "graphite-processing", name = "graphite-processing",
icon_size = 128, icon_size = 128,
-- icon = "__bzcarbon__/graphics/technology/graphite-processing.png",
icon = "__bzcarbon__/graphics/icons/graphite.png", icon = "__bzcarbon__/graphics/icons/graphite.png",
effects = effects =
{ {
@ -128,9 +125,49 @@ data:extend({
result = "diamond" result = "diamond"
} }
}, },
util.me.use_rough_diamond() and {
type = "recipe",
name = "diamond-processing",
category = "advanced-crafting",
subgroup = "raw-material",
order = "d[diamond]",
icons = (mods["Krastorio2"] and
{
{ icon = "__bzcarbon__/graphics/icons/diamond.png", icon_size = 128},
{ icon = "__bzcarbon__/graphics/icons/rough-diamond.png", icon_size = 64, scale=0.25, shift= {-8, -8}},
} or {{ icon = "__bzcarbon__/graphics/icons/diamond.png", icon_size = 128}}),
normal = (mods["Krastorio2"] and
{
enabled = false,
energy_required = 20,
ingredients = {{"rough-diamond", 1}},
results = {
{type="item", name= "diamond", amount=1, probability=0.8},
{type="item", name= "stone", amount=1, probability=0.2}
},
} or
{
enabled = false,
energy_required = 20,
ingredients = {{"rough-diamond", 1}},
results = {
{type="item", name= "diamond", amount=1, probability=0.8},
{type="item", name= "stone", amount=1, probability=0.2}
},
}),
expensive =
{
enabled = false,
energy_required = 40,
ingredients = {{"rough-diamond", 1}},
result = "diamond"
}
} or nil,
})
data:extend({
{ {
type = "technology", type = "technology",
name = "synthetic-diamond-processing", name = "diamond-processing",
icon_size = 128, icon_size = 128,
icon = "__bzcarbon__/graphics/icons/diamond.png", icon = "__bzcarbon__/graphics/icons/diamond.png",
effects = effects =
@ -139,6 +176,10 @@ data:extend({
type = "unlock-recipe", type = "unlock-recipe",
recipe = "synthetic-diamond" recipe = "synthetic-diamond"
}, },
util.me.use_rough_diamond() and {
type = "unlock-recipe",
recipe = "diamond-processing"
} or nil,
}, },
unit = unit =
{ {
@ -154,7 +195,8 @@ data:extend({
prerequisites = {"chemical-science-pack"}, prerequisites = {"chemical-science-pack"},
order = "b-b" order = "b-b"
}, },
})
data:extend({
-- graphene -- graphene
{ {
type = "item", type = "item",

View file

@ -28,7 +28,7 @@ for i, entity in pairs(data.raw["assembling-machine"]) do
end end
-- furnace recipe rework, remove crucible ingredients -- furnace recipe rework, remove crucible ingredients
for i, furnace in pairs(furnaces) do for i, furnace in pairs(util.me.furnaces) do
for j, ingredient in pairs(util.me.crucible_ingredients) do for j, ingredient in pairs(util.me.crucible_ingredients) do
util.remove_ingredient(furnace, ingredient) util.remove_ingredient(furnace, ingredient)
end end

View file

@ -1,5 +1,7 @@
require("graphite") require("graphite")
require("graphite-particle") require("graphite-particle")
require("diamond")
require("diamond-particle")
require("carbon-recipe") require("carbon-recipe")
require("carbon-recipe-k2") -- must be after carbon-recipe require("carbon-recipe-k2") -- must be after carbon-recipe

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

View file

@ -1,11 +1,14 @@
[entity-name] [entity-name]
graphite=Graphite graphite=Graphite
diamond=Diamond
[autoplace-control-names] [autoplace-control-names]
graphite=[item=flake-graphite] Graphite graphite=[item=flake-graphite] Graphite
diamond=[item=rough-diamond] Diamond
[item-name] [item-name]
flake-graphite=Flake graphite flake-graphite=Flake graphite
rough-diamond=Rough diamond
graphite=Graphite graphite=Graphite
graphite-dust=Graphite dust graphite-dust=Graphite dust
enriched-lead=Enriched lead enriched-lead=Enriched lead
@ -16,20 +19,23 @@ graphene=Graphene
fullerenes=Fullerenes fullerenes=Fullerenes
nanotubes=Nanotubes nanotubes=Nanotubes
carbon-black=Carbon black carbon-black=Carbon black
crucible=Crucible
[item-description] [item-description]
flake-graphite=Can be processed into graphite flake-graphite=Can be processed into graphite
rough-diamond=Can be processed into useful diamonds
crucible=A modernized classic for holding coffee
[technology-name] [technology-name]
graphite-processing=Graphite processing graphite-processing=Graphite processing
synthetic-diamond-processing=Synthetic diamond processing diamond-processing=Diamond processing
graphene=Graphene graphene=Graphene
fullerenes=Fullerenes fullerenes=Fullerenes
nanotubes=Carbon nanotubes nanotubes=Carbon nanotubes
[technology-description] [technology-description]
graphite-processing=Process flake graphite into usable graphite graphite-processing=Process flake graphite into usable graphite
synthetic-diamond-processing=Process graphite into synthetic diamonds. Used for grinding, drilling, high tech electronics, etc. diamond-processing=Process or create diamonds. Used for grinding, drilling, high tech electronics, etc.
graphene=A useful nanomaterial made from simple graphite graphene=A useful nanomaterial made from simple graphite
fullerenes=Isolate fullerenes by zapping carbon fullerenes=Isolate fullerenes by zapping carbon
nanotubes=A useful advanced material nanotubes=A useful advanced material
@ -38,6 +44,7 @@ nanotubes=A useful advanced material
graphite=__ITEM__graphite__ graphite=__ITEM__graphite__
graphite-dust=__ITEM__graphite-dust__ graphite-dust=__ITEM__graphite-dust__
synthetic-diamond=__ITEM__diamond__ synthetic-diamond=__ITEM__diamond__
diamond-processing=__ITEM__diamond__
graphene=__ITEM__graphene__ graphene=__ITEM__graphene__
heavy-water-graphene=[fluid=heavy-water] with __ITEM__graphene__ heavy-water-graphene=[fluid=heavy-water] with __ITEM__graphene__
fullerenes=__ITEM__fullerenes fullerenes=__ITEM__fullerenes
@ -55,8 +62,10 @@ graphite-carbon-black=Convert excess carbon black to graphite at a low ratio.
bzcarbon-recipe-bypass=Bypass recipes bzcarbon-recipe-bypass=Bypass recipes
bzcarbon-enable-fullerenes=Enable fullerenes & nanotubes bzcarbon-enable-fullerenes=Enable fullerenes & nanotubes
bzcarbon-enable-carbon-black=Enable carbon black bzcarbon-enable-carbon-black=Enable carbon black
bzcarbon-enable-rough-diamond=Enable diamond mining
[mod-setting-description] [mod-setting-description]
bzcarbon-recipe-bypass=Skip modifying these recipes (comma-separated list). bzcarbon-recipe-bypass=Skip modifying these recipes (comma-separated list).
bzcarbon-enable-fullerenes=Enable the fullerenes & nanotubes intermediate products.\nFullerenes are used primarily in bio-related things. Nanotubes for structures. bzcarbon-enable-fullerenes=Enable the fullerenes & nanotubes intermediate products.\nFullerenes are used primarily in bio-related things. Nanotubes for structures.
bzcarbon-enable-carbon-black=Enable carbon black byproduct. Primarily used to make plastics. bzcarbon-enable-carbon-black=Enable carbon black byproduct. Primarily used to make plastics.
bzcarbon-enable-rough-diamond=Enables diamond ore patches for new games.

4
me.lua
View file

@ -10,6 +10,10 @@ function me.use_carbon_black()
return me.get_setting("bzcarbon-enable-carbon-black") == "yes" return me.get_setting("bzcarbon-enable-carbon-black") == "yes"
end end
function me.use_rough_diamond()
return mods["rso-mod"] or me.get_setting("bzcarbon-enable-rough-diamond") == "yes"
end
function me.get_setting(name) function me.get_setting(name)
if settings.startup[name] == nil then if settings.startup[name] == nil then
return nil return nil

View file

@ -20,4 +20,11 @@ data:extend({
default_value = "no", default_value = "no",
allowed_values = {"no", "yes"}, allowed_values = {"no", "yes"},
}, },
{
type = "string-setting",
name = "bzcarbon-enable-rough-diamond",
setting_type = "startup",
default_value = mods["rso-mod"] and "yes" or "no",
allowed_values = {"no", "yes"},
},
}) })

Binary file not shown.