Far Reach

by Fexx

Build, interact and mine on the entire screen. Distances are customizable. Substitute for non-maintained mods like Long Reach.

Utilities
28 days ago
0.16 - 2.0
192K

b Losing far reach on death

3 years ago

Hi, when playing with this mod when i die i lose far reach and have to relog. pls fix. ty

3 years ago
(updated 3 years ago)

Hi. What other mods are you using? Most likely there is an interference with another mod.

Instead of restarting the game or something similar, you can temporarily fix this by editing the mod settings in-game.

2 years ago

Same for me.
I'm mainly using Krastorio 2 + Space Exploration

2 years ago

Same issue, also using Space Exploration.

Issue can be resolved by changing any of the current settings related to the mod to a different value in addition to relogging

2 years ago

yeah breaks on k2se death

2 years ago

Did a little poking around, SE exposes a remote interface for it's custom respawn event

get_on_player_respawned_event
--script.on_event(remote.call("space-exploration", "get_on_player_respawned_event"), my_event_handler)

2 years ago

with only SE same problem.
Fix:
- turn off "Far reach" on mods menu
- load save
- save game
- turn on "Far reach"
- done)

2 years ago
(updated 2 years ago)

To fix this issue replace line 14 in control.lua with the following

function hook_space_exploration()
    if script.active_mods["space-exploration"] and remote.interfaces["space-exploration"] and remote.interfaces["space-exploration"]["get_on_player_respawned_event"] then
        script.on_event(remote.call("space-exploration", "get_on_player_respawned_event"), function(data) far_reach_apply_settings() end)
    end
end

script.on_init(
    function(data)
        far_reach_apply_settings()
        hook_space_exploration()
    end
)

script.on_load(
    function(data)
        hook_space_exploration()
    end
)

Would have done a pull request, but your mod does not link a github and I was unable to locate one. Provided here so that others can patch their local copy to not suffer from this bug.

2 years ago

Hi Sil3ntSt0rm, thank you very much for your fix.

I will test it and then release it today.

Sorry it took so long, I always planned to fix this at some point, but whenever I started Factorio I ended up building a factory instead of adding the compatibility.. it's a curse ;)

2 years ago

Worked like a charm, just released it.

Thanks again!

This thread has been locked.