[solved] How to prevent robot build/mine an entity?

Place to get help with not working mods / modding interface.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[solved] How to prevent robot build/mine an entity?

Post by aubergine18 »

Is there a way, without using events, to prevent construction robots from building or mining a specific entity?

I can see a way by using events, but was wondering if there's a flag that prevents logistic robots working with a specific type (or more correctly: prototype) of entity, as I'd prefer to avoid using events for such a rare situation.
Last edited by aubergine18 on Sat Oct 29, 2016 12:42 am, edited 1 time in total.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15997
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: How to prevent robot build/mine an entity?

Post by Rseding91 »

The entity prototype flags "not-deconstructable" and "not-blueprintable". Although I don't think that prevents ghosts from being created when an entity is killed or if the player built manually using shift click.
If you want to get ahold of me I'm almost always on Discord.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: How to prevent robot build/mine an entity?

Post by aubergine18 »

I can handle the player placement without too much pain, so those flags above should solve all the other issues I was facing, thanks!

Out of interest, does the `can_be_part_of_blueprint` prototype setting do something different to the `not-blueprintable` flag?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15997
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: How to prevent robot build/mine an entity?

Post by Rseding91 »

aubergine18 wrote:I can handle the player placement without too much pain, so those flags above should solve all the other issues I was facing, thanks!

Out of interest, does the `can_be_part_of_blueprint` prototype setting do something different to the `not-blueprintable` flag?
That's for tiles not entities.
If you want to get ahold of me I'm almost always on Discord.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: How to prevent robot build/mine an entity?

Post by aubergine18 »

Just finished testing "not-deconstructable" and "not-blueprintable" - they worked like a charm! Many thanks as always!
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Post Reply

Return to “Modding help”