diff --git a/control.lua b/control.lua index bc84e34..2a03eca 100644 --- a/control.lua +++ b/control.lua @@ -41,3 +41,22 @@ end) script.on_event(defines.events.on_player_created, function(e) sct.unlockstart(game.players[e.player_index].force) end) + +script.on_configuration_changed( + function () + if remote.interfaces["DiscoScience"] and remote.interfaces["DiscoScience"]["setLabScale"] then + remote.call("DiscoScience", "setLabScale", "sct-lab-t2", 1) + remote.call("DiscoScience", "setLabScale", "sct-lab-t3", 1) + remote.call("DiscoScience", "setLabScale", "sct-lab-t4", 1) + end + if remote.interfaces["DiscoScience"] and remote.interfaces["DiscoScience"]["setIngredientColor"] then + remote.call("DiscoScience", "setIngredientColor", "automation-science-pack", {r = 1.0, g = 0.1, b = 0.1}) + remote.call("DiscoScience", "setIngredientColor", "logistic-science-pack", {r = 0.1, g = 1.0, b = 0.1}) + remote.call("DiscoScience", "setIngredientColor", "chemical-science-pack", {r = 0.1, g = 1.0, b = 1.0}) + remote.call("DiscoScience", "setIngredientColor", "military-science-pack", {r = 1.0, g = 0.6, b = 1.0}) + remote.call("DiscoScience", "setIngredientColor", "production-science-pack", {r = 1.0, g = 0.1, b = 1.0}) + remote.call("DiscoScience", "setIngredientColor", "utility-science-pack", {r = 1.0, g = 1.0, b = 0.1}) + remote.call("DiscoScience", "setIngredientColor", "space-science-pack", {r = 1.0, g = 1.0, b = 1.0}) + end + end +) \ No newline at end of file diff --git a/info.json b/info.json index 3b586df..264f8fa 100644 --- a/info.json +++ b/info.json @@ -4,7 +4,7 @@ "factorio_version":"1.1", "title": "ScienceCostTweaker Mod (mexmer)", "author": "mexmer, kingarthur", - "dependencies": ["base >= 1.1.0", "? omnimatter_science >= 3.0.3", "? pycoalprocessing >= 1.2.0", "? bobtech", "? aai-industry", "? omnimatter_energy" ], + "dependencies": ["base >= 1.1.0", "? omnimatter_science >= 3.0.3", "? pycoalprocessing >= 1.2.0", "? bobtech", "? aai-industry", "? omnimatter_energy" "? DiscoScience >= 1.0.0"], "contact": "mexmer@github.com", "homepage": "https://github.com/mexmer/ScienceCostTweakerM", "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. - Original mod made by UberWafe, this is adopted 0.18+ version" diff --git a/prototypes/entities/labs.lua b/prototypes/entities/labs.lua index d90db5f..2a9cc63 100644 --- a/prototypes/entities/labs.lua +++ b/prototypes/entities/labs.lua @@ -440,3 +440,10 @@ end if settings.startup["sct-military"].value == "tier2" then sctm.lab_input_add("sct-lab-t2", "military-science-pack") end + +if DiscoScience then + DiscoScience.prepareLab(data.raw["lab"]["lab"]) + DiscoScience.prepareLab(data.raw["lab"]["sct-lab-t2"]) + DiscoScience.prepareLab(data.raw["lab"]["sct-lab-t3"]) + DiscoScience.prepareLab(data.raw["lab"]["sct-lab-t4"]) +end \ No newline at end of file