Black belts deprecated


18 days ago
2.0
285
Logistics

g Compatible to Bob's

22 days ago

Hello,
please make the mod compatible to Bob's mods.

20 days ago
(updated 20 days ago)

You could try the solution 0n0w1c wrote for the space age belts, but adapted to bob's logistics.
To paraphrase what they said:

Add the following to "data.lua", at line 19

if mods["boblogistics"] then
     belts["bob-basic-transport"] = { hue = 0, base = "iron" }
     belts["bob-turbo-transport"] = { hue = 0.78, base = "steel" }
     belts["bob-ultimate-transport"] = { hue = 0.37, base = "steel" }
end

Because the low tier belts are grey, I've decided to make their base "iron" instead of steel.
You'll also need to add this to data.lua at line 30 so the arrows are colorless (otherwise they'll appear red).

    if belt == "bob-basic-transport" then
        tint = IR2RB.hsva2rgba(0,0,0.7)
    end

Finally, add the following to info.json at line 10 (a comma will now be required at the end of line 9)

        "? boblogistics"

Just copypaste the blocks of code in the right places. I tested it in game and it works fine.
(At this point I'm considering uploading a fork of this mod with the extra compatibility options...)

18 days ago

You could try the solution 0n0w1c wrote for the space age belts, but adapted to bob's logistics.
To paraphrase what they said:

Add the following to "data.lua", at line 19

if mods["boblogistics"] then belts["bob-basic-transport"] = { hue = 0, base = "iron" } belts["bob-turbo-transport"] = { hue = 0.78, base = "steel" } belts["bob-ultimate-transport"] = { hue = 0.37, base = "steel" } end

Because the low tier belts are grey, I've decided to make their base "iron" instead of steel.
You'll also need to add this to data.lua at line 30 so the arrows are colorless (otherwise they'll appear red).
if belt == "bob-basic-transport" then tint = IR2RB.hsva2rgba(0,0,0.7) end

Finally, add the following to info.json at line 10 (a comma will now be required at the end of line 9)
"? boblogistics"

Just copypaste the blocks of code in the right places. I tested it in game and it works fine.
(At this point I'm considering uploading a fork of this mod with the extra compatibility options...)

You are genius man! Thank you very much for that!
Works Great!

BR

16 days ago
(updated 16 days ago)

You could try the solution 0n0w1c wrote for the space age belts, but adapted to bob's logistics.
To paraphrase what they said:

Add the following to "data.lua", at line 19

if mods["boblogistics"] then belts["bob-basic-transport"] = { hue = 0, base = "iron" } belts["bob-turbo-transport"] = { hue = 0.78, base = "steel" } belts["bob-ultimate-transport"] = { hue = 0.37, base = "steel" } end

Because the low tier belts are grey, I've decided to make their base "iron" instead of steel.
You'll also need to add this to data.lua at line 30 so the arrows are colorless (otherwise they'll appear red).
if belt == "bob-basic-transport" then tint = IR2RB.hsva2rgba(0,0,0.7) end

Finally, add the following to info.json at line 10 (a comma will now be required at the end of line 9)
"? boblogistics"

Just copypaste the blocks of code in the right places. I tested it in game and it works fine.
(At this point I'm considering uploading a fork of this mod with the extra compatibility options...)

Can you give me all the code from the file?
Nothing is working for me.

15 days ago
(updated 15 days ago)

After modifications my files look like this now. The belts work with Spage Age and Bob's. Thanks to 0n0w1c and Supershadow30.

Data.lua


-- BELTS: reskins
-- many Bothans died to bring us these shenanigans


local IR2RB = require("code.functions")

local alternate_bases = mods["IndustrialRevolution3"] and settings.startup["ir3-materials"].value and not settings.startup["ir2rb-rails"].value

local belts = {
["transport"] = { hue = 0.11, base = alternate_bases and "copper" or "steel" },
["fast-transport"] = { hue = 0, base = alternate_bases and "iron" or "steel" },
["express-transport"] = { hue = 0.54, base = "steel" },
}

for belt,beltdata in pairs(belts) do
if mods["space-age"] then
belts["turbo-transport"] = { hue = 0.23, base = "steel" }
end
if mods["boblogistics"] then
belts["bob-basic-transport"] = { hue = 0, base = "iron" }
belts["bob-turbo-transport"] = { hue = 0.78, base = "steel" }
belts["bob-ultimate-transport"] = { hue = 0.37, base = "steel" }
end
local tint = IR2RB.hsva2rgba(beltdata.hue,0.8,1)
local prototype = data.raw["transport-belt"][belt.."-belt"]
if belt == "bob-basic-transport" then
tint = IR2RB.hsva2rgba(0,0,0.7)
end
if prototype then
prototype.belt_animation_set.animation_set = IR2RB.get_belt_animation_set(tint, beltdata.base)
prototype.corpse = "small-remnants"
IR2RB.replace_item_icon(belt.."-belt", "rubber-belt-"..beltdata.base)
if settings.startup["ir2rb-arrows"].value then IR2RB.add_mask_to_item_icon(belt.."-belt", "rubber-belt-mask", tint) end
if settings.startup["ir2rb-rails"].value then IR2RB.add_mask_to_item_icon(belt.."-belt", "rubber-rail-mask", tint) end
IR2RB.copy_item_icons_to_entity("transport-belt", belt.."-belt")
end
end

local tab = data.raw["item-group"]["logistics"]
if tab then
tab.icon = IR2RB.get_icon_path("logistics", "item-group")
tab.icon_size = 256
tab.icon_mipmaps = 4
tab.icons = nil
end


info.json

{
"name": "black-rubber-belts-continued",
"version": "2.0.1",
"title": "Black Rubber Belts 2.0",
"author": "radmin96, Deadlock989",
"contact": "",
"homepage": "",
"dependencies": [
"base >= 2.0.11",
"? space-age",
"? boblogistics"
],
"description": "Reskins vanilla belts in a dark rubbery style. Cosmetic changes only.\n\nAll credits go to the original mod's author, Deadlock989.\n\nIf you're Deadlock989 and you're seeing this, please contact me about options of open sourcing this mod, or let me know if you want me to take my version down.",
"factorio_version": "2.0"
}

15 days ago

Thanks!
Works.

13 days ago
(updated 6 days ago)

Hey, if you two are still following this thread, I've made my own fork of the mod, to fix turbo belts.
EDIT: I've added a compat for bob's, and many other!
Check it out. :)

New response