Infestation


Work in progress. Aliens now have nasty infestation (base-game tiles with a purple tint) that destroys everything in its path. Only water and player-made hard surfaces (bricks/concrete) can stop its spread.

3 years ago
1.1
207

g Crash

3 years ago

When using the map-editor, when I place any tile:

The mod Infestation (0.2.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event infestation::on_player_built_tile (ID 46)
__infestation__/mod/Spread/SpreadManager.lua:70: bad argument #1 of 3 to 'find' (string expected, got nil)
stack traceback:
    [C]: in function 'find'
    __infestation__/mod/Spread/SpreadManager.lua:70: in function 'l'
    __infestation__/mod/Util/ListenerList.lua:45: in function 'onEvent'
    __infestation__/mod/Util/ListenerCollection.lua:99: in function 'onTileBuilt'
    __infestation__/control.lua:87: in function <__infestation__/control.lua:83>
3 years ago
(updated 3 years ago)

Oh...

I think I know what is going on here. I have a function that looks for the hidden tile name for when the player builds a tile, but I did not make it check if the tile even has a hidden tile to begin with. It uses that information to replace infestation that has become hidden with landfill tiles. That way, when you cover infestation with bricks, it is removed.

I have put in a check in the code while I was typing this and will test it to see if it works.

Now that I think of it, this could have been an issue when using landfills in freeplay too. That's why it is good you found it early.

Edit:

I tried out the editor, and did not get a crash when placing tiles. So I think this issue is now fixed. I have updated the mod to the fixed version.

New response