Getting the name of a item on the ground.

Post Reply
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Getting the name of a item on the ground.

Post by ficolas »

I want to make a container to pick up the small artifacts laying arround everywhere with my mod, so I used game.findentities to search for the items on the ground near the artifact collector, and I used this:

Code: Select all

if artifacts[z].name=="item-on-ground" and artifacts[z].stack.name=="small-alien-artifact" then
But the item on the ground scanned doesnt have the field "stack", how can I do it?

And if I cant, move this to modding interface request plz :)

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Getting the name of a item on the ground.

Post by kovarex »

ficolas wrote:And if I cant, move this to modding interface request plz :)
Done :)

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Getting the name of a item on the ground.

Post by ficolas »

ok thanx :), hope I can do it for the next factorio update, because small alien artifacts everywhere are really annoying.

Dakkanor
Fast Inserter
Fast Inserter
Posts: 243
Joined: Wed Feb 27, 2013 6:18 am
Contact:

Re: Getting the name of a item on the ground.

Post by Dakkanor »

ficolas wrote:ok thanx :), hope I can do it for the next factorio update, because small alien artifacts everywhere are really annoying.
what about building a belt system where the small artifacts drop the most frequently and feed all of them into a set of chests? its not a mod function but it should work if you plan ahead.....

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Getting the name of a item on the ground.

Post by ficolas »

did this get added? (not trying to push), but I checked with "stack" and it doesnt work, idk if because it havent been added or because is another key

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Getting the name of a item on the ground.

Post by slpwnd »

I think the "done" was meant for moving it into the modding interface requests:)

Anyway I have put it on the list for things for 0.6.x.

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Getting the name of a item on the ground.

Post by slpwnd »

Done for the 0.6.0.

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Getting the name of a item on the ground.

Post by n9103 »

neat, should work well to help the wood harvesting bots that were in the works as well :)
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

Post Reply

Return to “Implemented mod requests”