Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"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"
Expand Down
7 changes: 7 additions & 0 deletions prototypes/entities/labs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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