Satellite View


Gives Satellite View / Remote View from Space Exploration; full credit to SE developer(s)

Tweaks
11 months ago
1.1
438
Transportation Cheats

g Crashes if body is on another surface

4 months ago

Hi,

If you use any mod that adds extra surfaces as an ingame editor (such as Compakt circuits, Blueprint Sandboxes, and similar) and you enter the editor while in satellite view, and then exit the satellite view while inside the editor you get the following unrecoverable lua error:

 759.712 Error MainLoop.cpp:1404: Exception at tick 34277: The mod Satellite View (0.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event satelliteView::n-pressed (ID 251)
LuaEntity belongs to surface nauvis (index 1) but a LuaEntity belonging to surface bpsb-lab-p-egladil (index 2) was expected.
stack traceback:
    [C]: in function 'set_controller'
    __satelliteView__/control.lua:37: in function <__satelliteView__/control.lua:2>

It might be good to add a check that the player's body is actually on the same surface as the satellite view. Or do like Space Exploration does and teleports the player to the right surface before restoring the controller. It seems SE also has a nil check here in case the player character is missing for any reason.

SE also seems to do some checks before entering satellite view to make sure the player isn't inside an editor. That's probably also something that could be useful to add.

New response