Vanilla Loaders

by Kirazy

Adds the vanilla loaders to the game with customizable recipe difficulty. Supports belts added by Bob's Logistics and Ultimate Belts.

Content
21 days ago
0.16 - 2.0
25.0K
Logistics

g How to Update Code

5 years ago
(updated 5 years ago)

Hey,

I had a piece of code that did this:
[code]
vanillaHD.tint_mask["nuclear-loader"] = {r = 0, g = 141, b = 5}
vanillaHD.hr_tint_mask["nuclear-loader"] = {r = 0, g = 141, b = 5}
vanillaHD.createLoaderItem("nuclear-loader","uranium-transport-belt")
vanillaHD.createLoaderRecipe("nuclear-loader","uranium-transport-belt","express-loader")
vanillaHD.createLoaderEntity("nuclear-loader","uranium-transport-belt")
vanillaHD.patchLoaderTechnology("uranium-transport-belts","nuclear-loader")
data.raw.item["nuclear-loader"].flags = {}
[/code]

Which is broken in the latest version, because hr_tint_mask is nil, now. How would you suggest modifying this code to work with your latest version?

5 years ago
(updated 5 years ago)

Oooooh.

I only had two separate tint masks because the low-res and hi-res graphics were different. In 0.17.4 they're now the same, just resized, so just drop "hr_"

5 years ago
(updated 5 years ago)

Or in your case, drop the second line entirely.

vanillaHD.hr_tint_mask["nuclear-loader"] = {r = 0, g = 141, b = 5} is now redundant.

You would want:
vanillaHD.tint_mask["nuclear-loader"] = {r = 0, g = 141, b = 5}
vanillaHD.createLoaderItem("nuclear-loader","uranium-transport-belt")
vanillaHD.createLoaderRecipe("nuclear-loader","uranium-transport-belt","express-loader")
vanillaHD.createLoaderEntity("nuclear-loader","uranium-transport-belt")
vanillaHD.patchLoaderTechnology("uranium-transport-belts","nuclear-loader")
data.raw.item["nuclear-loader"].flags = {}

5 years ago

Will do -- thanks!

5 years ago

By the way, the new graphics look nice.

New response