Companion Drones 2.0 [WIP]

by kubiixx

Adds friends - now to Factorio 2.0 WORK IN PROGRESS - crashes may occur - use with caution !

Content
4 days ago
2.0
1.40K

b Companions moved on a new surface from the map view

2 days ago

If you select map view, and change the current surface
it tried to move companions on this surface! (Note: that player is just browsing the map, not moving to that surface with a physical body - I don't think companions should move between surfaces in that case)

...and then it crashes:

The mod Companion Drones 2.0 (2.0.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event companion-drones::on_tick (ID 0)
LuaEntity belongs to surface nauvis (index 1) but a LuaEntity belonging to surface reserve_base_surface (index 3) was expected.
stack traceback:
[C]: in function 'create_entity'
companion-drones/script/companion.lua:581: in function 'try_to_shove_inventory'
companion-drones/script/companion.lua:620: in function 'return_to_player'
companion-drones/script/companion.lua:486: in function 'update'
companion-drones/script/companion.lua:1189: in function 'update_active_companions'
companion-drones/script/companion.lua:1210: in function 'handler'
core/lualib/event_handler.lua:47: in function <core/lualib/event_handler.lua:45>

2 days ago
(updated 2 days ago)

P.S. switched to the surface without the land and water — all are "out of the map" tiles (the special surface from some mod)

2 days ago
(updated a day ago)

The fix for this issue is described in the other thread (needs range cap). I'm available on discord to help you or the mod author implement these changes.

New response