Item forbidden from inventory and others...

Place to get help with not working mods / modding interface.
Forien
Inserter
Inserter
Posts: 26
Joined: Sat Jul 19, 2014 9:16 am
Contact:

Item forbidden from inventory and others...

Post by Forien »

Hi. I've just started to make my mod (first mod ever!), but I've ran into few problems of... logistic nature.

First of all, sorry for my english if it's in any way bad. Not my native and I'm not too good with it.

So, there are my questions, all refers to items:
  1. Is there a simple way to make item forbidden from going to player's inventory and/or chests, but still being able to travel via belts and inserters? If not, is it possible to make other type of "pipes" to transport only my items without much control scripting?
  2. Is it even possible for an item to cause pollution, or only entities are able to?
  3. This one I know is possible (at least I think so), but question is performance. Is it good idea for an item to cause slowly melting (technically destroying X items per Y seconds) other items in any container they are together? Or would it be too much for computing through ticks?
No longer needed - And bonus question not really related to topic: how to add an ore/new resource to mine? , nevermind, I've found out and made it working just fine :D

Sorry if I asked for something asked before, but I couldn't find answers.

I will be really thankfull for all responses and advices!
So, thank you and have a nice day :)
My mods:
- Power Mod (WiP)
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Item forbidden from inventory and others...

Post by FreeER »

Forien wrote:Is there a simple way to make item forbidden from going to player's inventory and/or chests
There's no easy way to do so that I am aware of. It would require checking (via control.lua) the contents of the player inventory and all chests to see if it was there and remove it if so.
Forien wrote:If not, is it possible to make other type of "pipes" to transport only my items without much control scripting?
No, it can be done with control scripting but it follows the same principle as above (except check all of your belts, pipes are for fluids, for any items that aren't yours).
Forien wrote:Is it even possible for an item to cause pollution, or only entities are able to?
Only entities, control scripting could place a pollution generating entity where an item is, or directly pollute using game.pollute(position, amount), but of course you have to know where the items are...
Forien wrote:Is it good idea for an item to cause slowly melting (technically destroying X items per Y seconds) other items in any container they are together?
Again, a matter of checking all containers for the item and then destroying x items, not too bad if done every few seconds rather than every tick.
Post Reply

Return to “Modding help”