Long range delivery drones patched crash

by amuerta

They deliver things far far away FIXED RAHHHHHHHH

Tweaks
a month ago
2.0
91
Logistic network
Owner:
amuerta
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
2 months ago
Latest Version:
2.0.3 (a month ago)
Factorio version:
2.0
Downloaded by:
91 users

Fixed the game crash on attempt to send empty plane or send drone with drone cargo
original issue is fixed by kolhov
in the mod thread of the crash issue, but it never got fixed by the developer, so i did for me and friend

ver 2.0.1: OMG IM GONNA KILL MYSELF

NOTE: im do not guarantee this works 100% since i am not a factorio modder, plus this mod is a mess to debug with 0 knowledge of modding, so if it breaks just report the error, i might try to fix it.

what this does:
- adds a check for set_slot() and clear_slot() in update_logistics_filters()
- adds a safe number function to prevent null error
- wraps call of the update_logistics_filters in pcall to prevent a crash and fail silently
- makes me listen to this music each time i have to fix this mod to keep playing with it: https://www.youtube.com/watch?v=urb3uHYf3OY