eduran84 / LTN_Tracker

Other
7 stars 6 forks source link

Multi-surface crash issue. #34

Open credomane opened 4 years ago

credomane commented 4 years ago

To reproduce:

  1. have LTN Train Stops on multiple surfaces
  2. Open LTN Tracker GUI
  3. Click a LTN Train stop name in the LTN Tracker GUI that is NOT on the nauvis surface.
  4. Factorio display a script error about expecting surface nauvis but entity is on "insert different surface name".

Looking though the code the issue seems to be a hardcoded value of "nauvis.

https://github.com/eduran84/LTN_Tracker/blob/7e1213c4cd9201121673617c9a8bfad9448157ca/script/gui_ctrl.lua#L324-L334

Instead of surface = "nauvis" it should be probably be surface = stop.entity.surface

I don't know if that will fix the issue for certain but it has to at least be better than before right?