HelicopterRevival


Adds a fully animated attack helicopter to the game. Ideal for getting from A to B quickly, exploring the map, building islands and nuking biters from the sky. Originally forked from Kumpu with fixes for Factorio 0.18.2+, but adding some enhancements of my own as well.

Content
25 days ago
0.18 - 2.0
78.7K
Transportation

b [Fixed] LuaEntity API call when LuaEntity was invalid, after removing fron Landfill Plus

1 year, 11 months ago

This error happens after removing Landfill Plus landfill tiles near to a helicopter.

Error MainLoop.cpp:1284: Exception at tick 2593: The mod HelicopterRevival (0.2.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event HelicopterRevival::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
        [C]: in function '__index'
        __HelicopterRevival__/logic/emptyBoxCollider.lua:80: in function <__HelicopterRevival__/logic/emptyBoxCollider.lua:79>
        (...tail calls...)
        __HelicopterRevival__/logic/emptyBoxCollider.lua:103: in function <__HelicopterRevival__/logic/emptyBoxCollider.lua:100>
        (...tail calls...)
        __HelicopterRevival__/logic/heliBase.lua:1034: in function 'updateEntityPositions'
        __HelicopterRevival__/logic/heliBase.lua:464: in function 'OnTick'
        __HelicopterRevival__/logic/util.lua:99: in function 'checkAndTickInGlobal'
        __HelicopterRevival__/control.lua:126: in function <__HelicopterRevival__/control.lua:125>
1 year, 11 months ago

I know this...
This was reported before, but I set it up as a super low priority cause, well... Most people don't dig ground under items c:

This may be patched in the next version, but unsure of that...

1 year, 11 months ago

A good practice —and recommended in the documentation— is checking the validity of each entity you hold a reference to, since it's always possible that any mod or the vanilla game itself invalidate any entity before you use it again.

1 year, 10 months ago
(updated 1 year, 10 months ago)

A good practice —and recommended in the documentation— is checking the validity of each entity you hold a reference to, since it's always possible that any mod or the vanilla game itself invalidate any entity before you use it again.

Eh... If it was that simple that would be fixed eons ago c:

Edit: Also, fixed.

1 year, 10 months ago
(updated 1 year, 10 months ago)

Eh... If it was that simple that would be fixed eons ago c:

It's literally pretty much like:

if entity.valid() then
    --[[ actions ]]
end
1 year, 10 months ago

Eh... If it was that simple that would be fixed eons ago c:

It's literally pretty much like:

if entity.valid() then
    --[[ actions ]]
end

Yes. Programming is super easy, look!

if not false then true

See? Everyone can do it! What? I'm not going to tell you what and where to look for this condition, especially if there's a million of interconnected entities. I'm just going to tell you the solution is super mega simple.

Please.

If' you're interested in solution, here. If not, eh.

In either case, closing this thread because, a: Bug had been fixed, and b: this conversation is getting non-sensical.

This thread has been locked.