Krastorio 2


An overhaul mod focusing on end-game technologies and moderately increased complexity.

Overhaul
5 months ago
0.18 - 1.1
297K
Transportation Logistics Trains Combat Armor Mining Fluids Logistic network Manufacturing Power Storage

b Incompatibility with other mods doing loader snapping.

3 years ago
(updated 3 years ago)

I'm currently working on a mods that provide a really better snapping algorithm than any I've found, the only problem is that as many snapping algorithm, it can't fully works with other snapping algorithm. Mine only has unwanted behaviour when the algorithm choose to do nothing.

As I can see we need to have a way to choose which algorithm we prefer and so my mod also aim at that:
Allowing user to select at startup which algorithm is prefered.

So I ask you to add in loaders-snapping.lua:

-- if setting loaders-snap don't exist or is set to Deadlock then allow this loader logic
if (not settings.startup["loaders-snap"] or settings.startup["loaders-snap"].value == "Krastorio2") and
   settings.startup["kr-loaders"] and settings.startup["kr-loaders"].value then

instead of

if settings.startup["kr-loaders"] and settings.startup["kr-loaders"].value then

also you will need to add under settings-updates.lua

if data.raw["string-setting"] and data.raw["string-setting"]["loaders-snap"] then
    table.insert(data.raw["string-setting"]["loaders-snap"].allowed_values, "Krastorio2")
end

to add entry to the algorithm selection setting