diff --git a/README.md b/README.md index ce46e82..b2fa2f8 100644 --- a/README.md +++ b/README.md @@ -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. ---- diff --git a/carbon-recipe.lua b/carbon-recipe.lua index 54cb95c..27b4f66 100644 --- a/carbon-recipe.lua +++ b/carbon-recipe.lua @@ -46,7 +46,6 @@ data:extend({ } or { enabled = false, - --energy_required = 128/45, energy_required = 0.5, ingredients = {{"flake-graphite", 1}}, result = "graphite" @@ -54,7 +53,6 @@ data:extend({ expensive = { enabled = false, - --energy_required = 256/45, energy_required = 1, ingredients = {{"flake-graphite", 2}}, result = "graphite" @@ -64,7 +62,6 @@ data:extend({ type = "technology", name = "graphite-processing", icon_size = 128, - -- icon = "__bzcarbon__/graphics/technology/graphite-processing.png", icon = "__bzcarbon__/graphics/icons/graphite.png", effects = { @@ -128,9 +125,49 @@ data:extend({ 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", - name = "synthetic-diamond-processing", + name = "diamond-processing", icon_size = 128, icon = "__bzcarbon__/graphics/icons/diamond.png", effects = @@ -139,6 +176,10 @@ data:extend({ type = "unlock-recipe", recipe = "synthetic-diamond" }, + util.me.use_rough_diamond() and { + type = "unlock-recipe", + recipe = "diamond-processing" + } or nil, }, unit = { @@ -154,7 +195,8 @@ data:extend({ prerequisites = {"chemical-science-pack"}, order = "b-b" }, - +}) +data:extend({ -- graphene { type = "item", diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 893571e..4e3c624 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -28,7 +28,7 @@ for i, entity in pairs(data.raw["assembling-machine"]) do end -- 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 util.remove_ingredient(furnace, ingredient) end diff --git a/data.lua b/data.lua index e7d5239..8759316 100644 --- a/data.lua +++ b/data.lua @@ -1,5 +1,7 @@ require("graphite") require("graphite-particle") +require("diamond") +require("diamond-particle") require("carbon-recipe") require("carbon-recipe-k2") -- must be after carbon-recipe diff --git a/graphics/entity/ores/diamond.png b/graphics/entity/ores/diamond.png new file mode 100644 index 0000000..0c681ed Binary files /dev/null and b/graphics/entity/ores/diamond.png differ diff --git a/graphics/entity/ores/hr-diamond.png b/graphics/entity/ores/hr-diamond.png new file mode 100644 index 0000000..f50ba16 Binary files /dev/null and b/graphics/entity/ores/hr-diamond.png differ diff --git a/graphics/entity/ores/hr-diamond.xcf b/graphics/entity/ores/hr-diamond.xcf new file mode 100644 index 0000000..3d4b84b Binary files /dev/null and b/graphics/entity/ores/hr-diamond.xcf differ diff --git a/graphics/icons/rough-diamond-1.png b/graphics/icons/rough-diamond-1.png new file mode 100644 index 0000000..7285518 Binary files /dev/null and b/graphics/icons/rough-diamond-1.png differ diff --git a/graphics/icons/rough-diamond-1.xcf b/graphics/icons/rough-diamond-1.xcf new file mode 100644 index 0000000..37d6e36 Binary files /dev/null and b/graphics/icons/rough-diamond-1.xcf differ diff --git a/graphics/icons/rough-diamond-2.png b/graphics/icons/rough-diamond-2.png new file mode 100644 index 0000000..56dd1d7 Binary files /dev/null and b/graphics/icons/rough-diamond-2.png differ diff --git a/graphics/icons/rough-diamond-2.xcf b/graphics/icons/rough-diamond-2.xcf new file mode 100644 index 0000000..7fa2811 Binary files /dev/null and b/graphics/icons/rough-diamond-2.xcf differ diff --git a/graphics/icons/rough-diamond-3.png b/graphics/icons/rough-diamond-3.png new file mode 100644 index 0000000..a36d235 Binary files /dev/null and b/graphics/icons/rough-diamond-3.png differ diff --git a/graphics/icons/rough-diamond-3.xcf b/graphics/icons/rough-diamond-3.xcf new file mode 100644 index 0000000..e2afeff Binary files /dev/null and b/graphics/icons/rough-diamond-3.xcf differ diff --git a/graphics/icons/rough-diamond.png b/graphics/icons/rough-diamond.png new file mode 100644 index 0000000..6e2345b Binary files /dev/null and b/graphics/icons/rough-diamond.png differ diff --git a/graphics/icons/rough-diamond.xcf b/graphics/icons/rough-diamond.xcf new file mode 100644 index 0000000..48cbec1 Binary files /dev/null and b/graphics/icons/rough-diamond.xcf differ diff --git a/locale/en/carbon.cfg b/locale/en/carbon.cfg index 4f740f4..65ced78 100644 --- a/locale/en/carbon.cfg +++ b/locale/en/carbon.cfg @@ -1,11 +1,14 @@ [entity-name] graphite=Graphite +diamond=Diamond [autoplace-control-names] graphite=[item=flake-graphite] Graphite +diamond=[item=rough-diamond] Diamond [item-name] flake-graphite=Flake graphite +rough-diamond=Rough diamond graphite=Graphite graphite-dust=Graphite dust enriched-lead=Enriched lead @@ -16,20 +19,23 @@ graphene=Graphene fullerenes=Fullerenes nanotubes=Nanotubes carbon-black=Carbon black +crucible=Crucible [item-description] flake-graphite=Can be processed into graphite +rough-diamond=Can be processed into useful diamonds +crucible=A modernized classic for holding coffee [technology-name] graphite-processing=Graphite processing -synthetic-diamond-processing=Synthetic diamond processing +diamond-processing=Diamond processing graphene=Graphene fullerenes=Fullerenes nanotubes=Carbon nanotubes [technology-description] 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 fullerenes=Isolate fullerenes by zapping carbon nanotubes=A useful advanced material @@ -38,6 +44,7 @@ nanotubes=A useful advanced material graphite=__ITEM__graphite__ graphite-dust=__ITEM__graphite-dust__ synthetic-diamond=__ITEM__diamond__ +diamond-processing=__ITEM__diamond__ graphene=__ITEM__graphene__ heavy-water-graphene=[fluid=heavy-water] with __ITEM__graphene__ 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-enable-fullerenes=Enable fullerenes & nanotubes bzcarbon-enable-carbon-black=Enable carbon black +bzcarbon-enable-rough-diamond=Enable diamond mining [mod-setting-description] 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-carbon-black=Enable carbon black byproduct. Primarily used to make plastics. +bzcarbon-enable-rough-diamond=Enables diamond ore patches for new games. diff --git a/me.lua b/me.lua index dd2f6c0..c5454f9 100644 --- a/me.lua +++ b/me.lua @@ -10,6 +10,10 @@ function me.use_carbon_black() return me.get_setting("bzcarbon-enable-carbon-black") == "yes" 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) if settings.startup[name] == nil then return nil diff --git a/settings.lua b/settings.lua index 2755605..5b7459e 100644 --- a/settings.lua +++ b/settings.lua @@ -20,4 +20,11 @@ data:extend({ default_value = "no", 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"}, + }, }) diff --git a/thumbnail.xcf b/thumbnail.xcf index 612998f..9b15648 100644 Binary files a/thumbnail.xcf and b/thumbnail.xcf differ