Page 1 of 1

[0.16.21] Fun with .placeable_by and {count=0}

Posted: Fri Feb 09, 2018 7:14 am
by eradicator
So there's several things i noticed:

Code: Select all

placeable_by   = {item = "", count = 0}
An empty item string causes a crash at startup.
LOG

Code: Select all

placeable_by   = {item = "copper-cable", count = 0}
Zero count causes two things:
1) If i'm building from personal roboport then the robot takes up to one stack (but it's happy with just 1 item if i don't carry any more) flies to the ghost, revives it and comes back to me, bringing me back all the items it took.

2) The funny one. If i build one or several ghosts (let's assume i build 10 ghosts) in range of a roboport and the logistic net has some of the item then 10 robots start flying towards the storage/provider chests, the first one grabs up to a stack of the item, now the storage is empty and all the other bots go home. The bot that grabbed all the items revives the ghost aaand...
(if the player is not in range) brings the items back to storage or
(if the player is in logistics range) brings the items to the player. I.e. a construction bot just brought me a stack of cable from a storage chest... :D

Expected behavior:
Someone tells me how to correctly specify a building that is constructible for free. (yea. like that's going to happen :P)

Re: [0.16.21] Fun with .placeable_by and {count=0}

Posted: Fri Feb 09, 2018 7:26 am
by Rseding91
Thanks for the report. I've fixed the crash for the next version of 0.16. The "buildable for free" is something else though. Not something I want to work on at this point in 0.16 bug fixing but maybe for 0.17.