[0.14.1] create_entity() silent fail
Posted: Sat Aug 27, 2016 8:19 pm
Ok, this one is difficult to pinpoint for me:
if create_entity() is used to place entity of type "tree" at coordinates, where entity of same name is already present, then the command fails and returns nil.
It didn't do so in previous versions, and seems to works as usual for all other entities.
Now, the trick is: vanilla trees can be placed so.
I've encountered the problem while updating one of my mods.
It weights only a few kilobytes, so I'll put it in work-in-progress state here.
To reproduce the issue, use the folowing command (three times):
Only one puff will be seen and if previous entity is destroyed, no other is seen under it.
I've found workaround for me, but this inconsistency seems weird.
if create_entity() is used to place entity of type "tree" at coordinates, where entity of same name is already present, then the command fails and returns nil.
It didn't do so in previous versions, and seems to works as usual for all other entities.
Now, the trick is: vanilla trees can be placed so.
I've encountered the problem while updating one of my mods.
It weights only a few kilobytes, so I'll put it in work-in-progress state here.
To reproduce the issue, use the folowing command (three times):
Code: Select all
/c e=game.player.surface.create_entity{name="sign-post-2",position={0,0}}
I've found workaround for me, but this inconsistency seems weird.