Limiting modules to certain entities?

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:

Limiting modules to certain entities?

Post by aubergine18 »

i've added some new modules, and currently they can be added to any entity that accepts modules.

There's a `limit` property of module prototypes that can limit to certain recipes - which at least opens the possibility for me to prevent my modules being used in assembly machines, but is there a way to prevent them from being used on other machines?
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.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Limiting modules to certain entities?

Post by Ranakastrasz »

Well, I am pretty sure all machines use recipes, so blocking smelting recipes should disable furnaces. Beacons somehow disallow Productivity modules, so look at that.

Pretty sure everything is either a beacon or a assembler of some kind.

IF that isn't enough, clarify the issue, give specific use case.

Cartmen's Complete overhaul, (or at least an older version of it) had specilized assemblers with specilized modules for each type, so looking at that might help if you can find it. He might have taken it down.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Limiting modules to certain entities?

Post by aubergine18 »

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.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Limiting modules to certain entities?

Post by Ranakastrasz »

Ah. Right.

Well, its outdated, but does the job so far as I can tell. Admittedly, how he did it is way beyond me.

Worked when I played it way back when tho.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Limiting modules to certain entities?

Post by aubergine18 »

Thanks, will take a look and report back.
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”