Where Is My Body


Death happens. The mod shows the lines between you and your dead corpses

Utilities
3 years ago
0.17 - 1.1
27.3K

g [Fixed] Incompatiple with "Warptorio"

4 years ago

Reproduce by dying outside of base and warping. Consider fixing it with proper error handling. It is better to show no line if not possible then crashing the current game.

4 years ago

Do you have the error screenshot?

4 years ago

Wait, there is no warptorio for 0.18 https://mods.factorio.com/query/warptorio?version=0.18

PyroFire β˜†
3 years ago
(updated 3 years ago)

I've had a quick look at the code in this mod and found the issue is that there's no hook for https://lua-api.factorio.com/latest/events.html#on_surface_cleared and https://lua-api.factorio.com/latest/events.html#on_surface_deleted which can result in unpredictable behavior including crashes and memory/data leaks. Though at a glance i don't see how this would cause a crash, it's mostly just unused data in the global table.

3 years ago
(updated 3 years ago)

Can you please add this part of code? I am not sure why it needs it.

3 years ago

There is actually no saved surface in the global table.

PyroFire β˜†
3 years ago
(updated 3 years ago)

screenshot of error: https://gyazo.com/4dfb489d354eaff6f5cdd1ea349130dc

Thanks for collab, promise i won't break it this time :P

And turns out there's a whole bunch of events not hooked for this mod.
It tries to clean itself up automatically, but there are better ways to do it.

E.g. this mod would likely break if a player dies inside a factorissimo building - when the player gets to that warehouse, the line won't draw.

I'm also fixing your line-width thing so it draws in terms of distance (whichever is closer) rather than number of bodies.

3 years ago

Thanks for update!

3 years ago

sorry didn't use the form for a long while :(

New response