Bob's Tech


Research expansion

8 months ago
0.13 - 1.1
234K

i Support for Disco Science

4 years ago
(updated 4 years ago)

Hey, would you consider making your mod support Disco Science? I've made an API to make it easy to register new and modified ingredient colours: https://mods.factorio.com/mod/DiscoScience/faq

I think adding this to a control.lua, and an optional dependency on Disco Science 1.0.0 should cover you:

script.on_configuration_changed(
    function ()
        if remote.interfaces["DiscoScience"] and remote.interfaces["DiscoScience"]["setIngredientColor"] then
            if settings.startup["bobmods-tech-colorupdate"].value then
                remote.call("DiscoScience", "setIngredientColor", "automation-science-pack", {r = 1.0, g = 0.9, b = 0.1})
                remote.call("DiscoScience", "setIngredientColor", "logistic-science-pack", {r = 1.0, g = 0.1, b = 0.1})
                remote.call("DiscoScience", "setIngredientColor", "utility-science-pack", {r = 0.1, g = 1.0, b = 0.1})
            end
            remote.call("DiscoScience", "setIngredientColor", "advanced-logistic-science-pack", {r = 1.0, g = 0.1, b = 1.0})
        end
    end
)
4 years ago

Ah, you've got extra labs in there as well. In that case, the last section of the FAQ should contain what you need.

4 years ago

I'll work on it for the next update.
I probably should have for the previous update, but I had a list to get through, and was too focused on that.

4 years ago

Super, thanks! Let me know if you have any questions or encounter any problems.

New response