Vanilla Loaders

by Kirazy

Adds the vanilla loaders to the game with customizable recipe difficulty, and with support for cargo wagons via lua scripting. Supports belts added by Bob's Logistics and Ultimate Belts. When installed side-by-side with Loader Redux, will use Loader Redux's snapping logic and train loading. Additionally, with a startup setting, may be used as a dumb mod to simply reskin Loader Redux.

Content
1 year, 8 months ago
0.16 - 1.1
16.2K
Logistics

g How to Update Code

4 years ago
(updated 4 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?

4 years ago
(updated 4 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_"

4 years ago
(updated 4 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 = {}

4 years ago

Will do -- thanks!

4 years ago

By the way, the new graphics look nice.

New response