Skip to content

Commit

Permalink
WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
UberWaffe committed Apr 19, 2016
1 parent b164dc8 commit 8ec1cd4
Show file tree
Hide file tree
Showing 13 changed files with 227 additions and 20 deletions.
1 change: 1 addition & 0 deletions data-updates.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require("config")
require("tweaks.productivity-limitations")

-- Select the science pack config file as requested. Initial data file.
sciencepackConfig = "tweaks." .. sciencecosttweaker.options.sciencePackConfig .. ".1_update"
Expand Down
4 changes: 2 additions & 2 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "ScienceCostTweaker",
"version": "0.12.13",
"version": "0.12.14",
"title": "ScienceCostTweaker Mod",
"author": "UberWaffe",
"dependencies": ["base >= 0.12.0","? bobelectronics >= 0.12.0","? bobplates >= 0.12.0","? UberTweaks >= 0.0.1", "? peacemod"],
"dependencies": ["base >= 0.12.0", "boblibrary >= 0.12.0", "? bobelectronics >= 0.12.0", "? bobplates >= 0.12.0", "? bobtech >= 0.12.0", "? UberTweaks >= 0.0.1", "? peacemod"],
"contact": "",
"homepage": "https://github.com/UberWaffe/ScienceCostTweaker",
"description": "Allows the cost of research to be tweaked, in terms of count, science packs and time. Edit its configs costs *.lua to tweak the multipliers."
Expand Down
11 changes: 11 additions & 0 deletions locale/en/sciencecosttweaker.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
science-pack-1=Used by Lab for adapting technology to the local environment, this electromagnet is destroyed during use but allows for intricate electromagnetic experiments. (4:1:1)
science-pack-2=Used by Lab for adapting technology to the local environment, this fragile equipment is destroyed during use but provide keen insight into the local environment's effects upon materials and chemical reactions. (4:1:1)
science-pack-3=Used by Lab for adapting technology to the local environment, these can manipulate and monitor interactions on an atomic level, but burn themselves out in the process. (4:1:1)
science-pack-4=Used by Lab for adapting technology to the local environment, these single use items can forge virtual particles to manipulate nearby matter and quantum fields.
alien-science-pack=Used by Lab for adapting technology to the local environment, these living processors can directly manipulate and monitor quantum level interactions, but are destroyed during the hostile research experiments.
[item-name]
lab=Electromagnetism Lab
Expand All @@ -23,9 +24,14 @@ sct-t3-femto-lasers=Femto Laser Array (1:1:1)
sct-t3-atomic-sensors=Atomic Sensors Array
sct-t4-bioprocessor=QL Bio-processor
sct-t4-overclocker=Neural Overclocker
sct-bm4-plating=VP Containment Plating
sct-bm4-injector=VP Injector
sct-bm4-supercoils=Superconductive Coils
sct-bm4-capbank=Capacitor Bank
science-pack-1=Sacrificial Electromagnet
science-pack-2=Sacrificial ATMOS Set
science-pack-3=Sacrificial Atomic Manipulator
science-pack-4=Onerun Virtual Particle Forge
alien-science-pack=Sacrificial QL Bio-processor
basic-circuit-board-base=Basic Circuit
[recipe-name]
Expand All @@ -44,9 +50,14 @@ sct-t2-wafer-stamp=__ITEM__sct-t2-wafer-stamp__
sct-t3-flash-fuel=__ITEM__sct-t3-flash-fuel__
sct-t3-laser-foci=__ITEM__sct-t3-laser-foci__
sct-t3-femto-lasers=__ITEM__sct-t3-femto-lasers__
sct-bm4-plating=__ITEM__sct-bm4-plating__
sct-bm4-injector=__ITEM__sct-bm4-injector__
sct-bm4-supercoils=__ITEM__sct-bm4-supercoils__
sct-bm4-capbank=__ITEM__sct-bm4-capbank__
science-pack-1=__ITEM__science-pack-1__
science-pack-2=__ITEM__science-pack-2__
science-pack-3=__ITEM__science-pack-3__
science-pack-4=__ITEM__science-pack-4__
alien-science-pack=__ITEM__alien-science-pack__
basic-circuit-board-base=__ITEM__basic-circuit-board-base__
[entity-name]
Expand Down
7 changes: 6 additions & 1 deletion tweaks/bobsmods/0_initial.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ end

if (bobIsAbout == true) then
-- Firstly, set the options for using the new intermediaries, as well as using the new tiered labs.
require("tweaks.newintermediates")
require("tweaks.newIntermediates.newintermediates")

-- If BobsTech is installed, then adjust the new science packs as well.
if (data.raw["item"]["lab-2"] ~= nil) then
require("tweaks.bobsmods.newintermediates")
end

-- Make resin craftable by hand, so that we can use it in science pack crafting.
data.raw.recipe["bob-resin-wood"].category = "crafting"
Expand Down
20 changes: 7 additions & 13 deletions tweaks/bobsmods/2_final.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,15 @@ end

if (bobIsAbout == true) then
-- Use the new labs new tiered labs.
require("tweaks.newlabs")
require("tweaks.tweakedsciencepacks")
require("tweaks.newIntermediates.newlabs")
-- Use the new tweaked science packs (for vanilla packs 1 to alien)
require("tweaks.newIntermediates.tweakedsciencepacks")

-- Make resin craftable by hand, so that we can use it in science pack crafting.
data.raw.recipe["bob-resin-wood"].category = "crafting"

-- Change the recipe for Science-Pack-4 (Dark Blue).
data.raw.recipe["science-pack-4"].ingredients =
{
{"processing-unit", 1},
{"express-transport-belt", 1},
{"silicon-nitride", 1},
{"lithium-ion-battery", 1}
}

-- Make Lab Mk2 consume more power than Quantum lab.
data.raw["lab"]["lab-2"].energy_usage = "2MW"
-- If BobsTech is installed, then adjust the new science packs as well.
if (data.raw["item"]["lab-2"] ~= nil) then
require("tweaks.bobsmods.tweakedscience")
end
end
125 changes: 125 additions & 0 deletions tweaks/bobsmods/newintermediates.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
data:extend({

-- Create new intermediary products unique to science pack creation.
-- ===================================================================

-- Blue-Science Intermediary products.
-- =============================
-- Quantum Plating
{
type = "item",
name = "sct-bm4-plating",
icon = "__ScienceCostTweaker__/graphics/icons/iron-core.png",
flags = {"goes-to-main-inventory"},
subgroup = "intermediate-product",
order = "a[bm4-plating]",
stack_size = 200
},


-- Old cost = 1x Express transport belt = 21.5x Iron plate, 2x Heavy Oil (5 steps)
-- New cost = Carbon + Cobalt Steel + Invar ( steps)
{
type = "recipe",
name = "sct-bm4-plating",
category = "crafting-with-fluid",
enabled = false,
energy_required = 20.5,
ingredients =
{
{"iron-plate", 8},
{type="fluid", name="lubricant", amount=2},
{"invar-alloy", 1},
{"cobalt-steel-alloy", 1},
{"carbon", 2},
},
results =
{
{type="item", name="sct-bm4-plating", amount=1},
},
},

-- Particle Injector
{
type = "item",
name = "sct-bm4-injector",
icon = "__ScienceCostTweaker__/graphics/icons/magnet-coils.png",
flags = {"goes-to-main-inventory"},
subgroup = "intermediate-product",
order = "a[bm4-injector]",
stack_size = 200
},

-- Old cost = 1x Processing Unit = ( steps)
-- New cost = 1x Processing Unit, ( steps)
{
type = "recipe",
name = "sct-bm4-injector",
enabled = false,
energy_required = 20.5,
ingredients =
{
{"processing-unit", 1},
},
results =
{
{type="item", name="sct-bm4-injector", amount=1},
},
},

-- Superconductive Coils
{
type = "item",
name = "sct-bm4-supercoils",
icon = "__ScienceCostTweaker__/graphics/icons/iron-core.png",
flags = {"goes-to-main-inventory"},
subgroup = "intermediate-product",
order = "a[bm4-supercoils]",
stack_size = 200
},

-- Old cost = 1x Silicon Nitride = ( steps)
-- New cost = ( steps)
{
type = "recipe",
name = "sct-bm4-supercoils",
enabled = false,
energy_required = 20.5,
ingredients =
{
{"silicon-nitride", 1},
},
results =
{
{type="item", name="sct-bm4-supercoils", amount=1},
},
},

-- Energy Bank
{
type = "item",
name = "sct-bm4-capbank",
icon = "__ScienceCostTweaker__/graphics/icons/magnet-coils.png",
flags = {"goes-to-main-inventory"},
subgroup = "intermediate-product",
order = "a[bm4-capbank]",
stack_size = 200
},

-- Old cost = ( steps)
-- New cost = ( steps)
{
type = "recipe",
name = "sct-bm4-capbank",
enabled = false,
energy_required = 20.5,
ingredients =
{
{"lithium-ion-battery", 1},
},
results =
{
{type="item", name="sct-bm4-capbank", amount=1},
},
},
})
34 changes: 34 additions & 0 deletions tweaks/bobsmods/tweakedscience.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
-- Make technology research enable the new BobsMods tiers
-- ===================================================================
-- Tier BobsMod 4, enabled by the "Advanced Research" research
table.insert(data.raw.technology["advanced-research"].effects,{type = "unlock-recipe", recipe = "sct-bm4-plating"})
table.insert(data.raw.technology["advanced-research"].effects,{type = "unlock-recipe", recipe = "sct-bm4-injector"})
table.insert(data.raw.technology["advanced-research"].effects,{type = "unlock-recipe", recipe = "sct-bm4-supercoils"})
table.insert(data.raw.technology["advanced-research"].effects,{type = "unlock-recipe", recipe = "sct-bm4-capbank"})

-- Update the Bob's Mods Tech labs and science packs
-- ===================================================================
-- Change the recipe for new lab.
data.raw.recipe["lab-2"].ingredients =
{
{"sct-lab-4", 1},
{"advanced-circuit", 10},
{"smart-inserter", 4},
{"copper-cable", 400}
}

-- Make Lab Mk2 consume more power than Quantum lab.
data.raw["lab"]["lab-2"].energy_usage = "3MW"
-- Make Lab Mk2 research at normal speed.
data.raw["lab"]["lab-2"].researching_speed = 1 -- Normally 2
-- Make Lab Mk2 not have any module slots.
data.raw["lab"]["lab-2"].module_specification.module_slots = 0

-- Change the recipe for Science-Pack-4 (Dark Blue).
data.raw.recipe["science-pack-4"].ingredients =
{
{"sct-bm4-plating", 1},
{"sct-bm4-injector", 1},
{"sct-bm4-supercoils", 1},
{"sct-bm4-capbank", 1}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions tweaks/productivity-limitations.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local science_packs_and_intermediates = {
"science-pack-1",
"science-pack-2",
"science-pack-3",
"alien-science-pack",
"science-pack-4",
"science-pack-gold",
"sct-t1-ironcore",
"sct-t1-magnet-coils",
"sct-t2-reaction-nodes",
"sct-t2-instruments",
"sct-t2-microcircuits",
"sct-t2-micro-wafer",
"sct-t2-wafer-stamp",
"sct-t3-flash-fuel",
"sct-t3-laser-foci",
"sct-t3-laser-emitter",
"sct-t3-femto-lasers",
"sct-t3-atomic-sensors",
"sct-t4-bioprocessor",
"sct-t4-overclocker",
"sct-bm4-plating",
"sct-bm4-injector",
"sct-bm4-supercoils",
"sct-bm4-capbank"
}

local finallist = {}

-- Go through all the recipes defined in the science pack and intermidate list.
-- For any of them that exist, add them to the final list of things to limit.
for j, recipeName in pairs(science_packs_and_intermediates) do
if data.raw.recipe[recipeName] then
table.insert(finallist, recipeName)
end
end
bobmods.lib.add_productivity_limitations(finallist)
4 changes: 2 additions & 2 deletions tweaks/vanilla/0_initial.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Firstly, set the options for using the new intermediaries, as well as using the new tiered labs.
require("tweaks.newintermediates")
require("tweaks.newIntermediates.newintermediates")


data:extend({
Expand Down Expand Up @@ -246,7 +246,7 @@ data:extend({
name = "sct-t4-bioprocessor",
category = "crafting-with-fluid",
enabled = "false",
energy_required = 90,
energy_required = 30,
ingredients =
{
{type="item", name="alien-artifact", amount=1},
Expand Down
4 changes: 2 additions & 2 deletions tweaks/vanilla/2_final.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-- Use the new labs new tiered labs.
require("tweaks.newlabs")
require("tweaks.tweakedsciencepacks")
require("tweaks.newIntermediates.newlabs")
require("tweaks.newIntermediates.tweakedsciencepacks")

0 comments on commit 8ec1cd4

Please sign in to comment.