SSPP Logistics Train Mod

by jagoly

A logistics train mod that aims to be as pleasant to use as possible, even when knee-deep in byproducts. SSPP stands for Source-Sink-Push-Pull.

Content
7 days ago
2.0
606
Logistics Trains

b Station names are always assigned

3 months ago

Hi!
There is a small problem, if the mod is enabled, but any other stations are used (vanilla, LTN, etc.), the mod renames the stations anyway.
For example, I have a station with a manual name, and if I move this station, it is renamed, and this is not very good, because if the station is tied to manual interrupts, then everything flies off, and the interrupt no longer works.
In fact, the mod does not just rename the station (then it would exist, but with a different name), but deletes the old one and places a new one.
Maybe add some kind of filter to the logic, that if the station belongs to the mod, then rename it, otherwise leave the name as is. ?

3 months ago

That is odd, it should not affect vanilla train stops at all. SSPP provides it's own train stop entity, separate from the vanilla one. The vanilla ones should function exactly as normal, unless there is a bug.

Are you sure you are placing the right kind of train stop? They currently have the same icon so might be hard to distinguish.

3 months ago

I'm 100% sure because I localized it into another language and it's hard to get the name wrong :)

3 months ago

Are you able to share a video or set of screenshots demonstrating the issue? I'm not quite sure how to reproduce it.

3 months ago

Another odd thing - I turned off the mod in the mod list, and now I turned it back on, the technology reset, although I did not change the save. It seems like it should not be like this, but I could be wrong.

Link to Google Drive - video of how the station is renamed:
https://drive.google.com/file/d/1ORc5xhWrVP-5HkmRw76LfoklV0uThk7r/view?usp=sharing

3 months ago
(updated 3 months ago)

I definitely don't experience that issue. You may want to check your other mods. Assuming you have tested that the problem doesn't occur if you remove SSPP (and only SSPP), you'll need to find out which of your other mods is causing a conflict by removing them until the problem goes away. Then I can look into why the issue is happening and if it's a problem with my mod or the other one.

Also, removing a mod, saving, and then re-adding it will reset technology from that mod, that is normal.

To be clear, that "ID: xxxxx" name is not from SSPP. That name is coming from a different mod.

3 months ago

Oh, there was a mistake, I somehow didn’t check everything right away, because... installed several mods at the same time :(
Yes, I found a mod that changes the names of stations (including), thanks for the tip.
https://mods.factorio.com/mod/Circuit_Repeater

The code looks like this:

local built_filters = {
    {filter = "name", name = "mini-radar"},
    {filter = "ghost", ghost_name = "mini-radar"}
    }

local function OnEntityCreated(event)
    local entity = event.entity or event.destination
    local tower_id = string.format("%.2f%.2f", entity.position.x, entity.position.y)
    local count = 0

        for _ in tower_id:gmatch("%-") do
            count = count + 1
        end

    local result = tower_id:gsub("%-", "")
    result = result:gsub("%..", "")

    entity.backer_name = "ID: " .. count .. result
end

script.on_event(defines.events.on_built_entity, OnEntityCreated, built_filters)
script.on_event(defines.events.on_robot_built_entity, OnEntityCreated, built_filters)
script.on_event(defines.events.script_raised_built, OnEntityCreated, built_filters)
script.on_event(defines.events.on_entity_cloned, OnEntityCreated, built_filters)
script.on_event(defines.events.script_raised_revive, OnEntityCreated, built_filters)
script.on_event(defines.events.on_space_platform_built_entity, OnEntityCreated, built_filters)

I'm not good at this, and I wrote to the author of the mod, but I don't know when he will fix it.

P.S. Let me remind you that we are waiting for a video with instructions :))))

New response