Page 1 of 1
					
				Enegry requierement and info layer
				Posted: Fri Dec 12, 2014 9:13 pm
				by Kexík
				Hi i have question about info layer (i hope thats name for ALT layer where are arrows for inserters etc.)
Is posible change this layer for entity? 
Two examples i wanna achieve.
1. I wanna add arrow (like inserter one) to my entity (one way pipe), is there any option of doing that besides creating item that is inserter type with invisible textures that creates my entity
2. If not can i disable Energy requierement notification for that inserter? Like that he is not connected to electric network or have no fuel.
Thanks for answer i am new to modding, i tried to search it but without mayor succes.
			 
			
					
				Re: Enegry requierement and info layer
				Posted: Fri Dec 12, 2014 11:25 pm
				by Degraine
				Just a guess, but have you tried the burner inserter instead? I never use them, but they don't require power so they probably shouldn't make the power catchment areas appear.
			 
			
					
				Re: Enegry requierement and info layer
				Posted: Sat Dec 13, 2014 1:08 am
				by LordFedora
				but they require fuel
			 
			
					
				Re: Enegry requierement and info layer
				Posted: Sat Dec 13, 2014 3:58 am
				by Degraine
				Not the point - they're asking about something that won't cause the power grid overlay to appear when placing the item (AFAICT), while retaining the direction arrow thingy you get when placing inserters. I'm about to do something similar for my mod.
			 
			
					
				Re: Enegry requierement and info layer
				Posted: Sat Dec 13, 2014 11:35 am
				by Kexík
				I will try them but they have power requirement icon too, but maybe i would be able to add them one wood at create. Thanks
			 
			
					
				Re: Enegry requierement and info layer
				Posted: Sat Dec 13, 2014 12:05 pm
				by Kexík
				So burning type working with this energy_source i dont get no fuel icon  THX very much
Code: Select all
        energy_source =
        {
          type = "burner",
          effectivity = 100,
          fuel_inventory_size = 0,
        },
EDIT: Its not without any more modifications i had left some code that set inserter variable active to false after creation without it factorio will crash!
 
			
					
				Re: Enegry requierement and info layer
				Posted: Sat Dec 13, 2014 2:14 pm
				by L0771
				Kexík wrote:1. I wanna add arrow (like inserter one) to my entity (one way pipe), is there any option of doing that besides creating item that is inserter type with invisible textures that creates my entity
If your entity manipule fluids you need a pipe, can see 
here. If manipule items is like a sppliter, see 
here (I only know he use sppliters with arrows)
Kexík wrote:2. If not can i disable Energy requierement notification for that inserter? Like that he is not connected to electric network or have no fuel.
I think no. If you know a way, please tell me 

 
			
					
				Re: Enegry requierement and info layer
				Posted: Sun Dec 14, 2014 11:46 am
				by Kexík
				L0771 wrote:Kexík wrote:1. I wanna add arrow (like inserter one) to my entity (one way pipe), is there any option of doing that besides creating item that is inserter type with invisible textures that creates my entity
If your entity manipule fluids you need a pipe, can see 
here. If manipule items is like a sppliter, see 
here (I only know he use sppliters with arrows)
Kexík wrote:2. If not can i disable Energy requierement notification for that inserter? Like that he is not connected to electric network or have no fuel.
I think no. If you know a way, please tell me 

 
I wanna use inserter arrow because pump arrow is visible only with mouse over, i dont wanna use pump as pipe because it would 1] need energy 2] pump liquid so i am using underground pipes and arrows are different entity
If you wanna use entity that need energy source as dummy entity (for example like me, inserter only for arrows) and suppres energy/fuel requirement icon you can do this:
When creating entity you will set energy source as this:
Code: Select all
        energy_source =
        {
          type = "burner",
          effectivity = 100,
          fuel_inventory_size = 0,
        },
In script:
Code: Select all
game.onevent(defines.events.onbuiltentity, function(event)
    if (event ~= nil) and (event.createdentity ~= nil) and (event.createdentity.name == "your-dummy-inserter") then
        event.createdentity.active = false
    end
end)
Entity will do nothing, but will not show you nofuel icon and will show you arrows :]
 
			
					
				Re: Enegry requierement and info layer
				Posted: Sun Dec 14, 2014 12:09 pm
				by L0771
				Kexík wrote:Code: Select all
        energy_source =
        {
          type = "burner",
          effectivity = 100,
          fuel_inventory_size = 0,
        },
 
I think if for some reason, this entity is clicked, the game will crash.
Try with "electric" and active = "false".
but this item don't work  

 I want this for a mine without energy (work with pollution 

)
 
			
					
				Re: Enegry requierement and info layer
				Posted: Sun Dec 14, 2014 3:56 pm
				by Kexík
				As i said it work only if you dont wanna entity do anything, i tried electric, but there is problem that electric have icon when its not connected to grid that doesnt disapear, i will more tests and soon release my io-pipe to the mod if it will not crash in any situation i try, maybe i missed something that i should tell you, you will see
			 
			
					
				Re: Enegry requierement and info layer
				Posted: Sun Dec 14, 2014 9:31 pm
				by L0771
				Kexík wrote:As i said it work only if you dont wanna entity do anything, i tried electric, but there is problem that electric have icon when its not connected to grid that doesnt disapear, i will more tests and soon release my io-pipe to the mod if it will not crash in any situation i try, maybe i missed something that i should tell you, you will see
if you have any problem, post here, if have a code is easier helps you  

 
			
					
				Re: Enegry requierement and info layer
				Posted: Sun Dec 14, 2014 10:43 pm
				by Kexík
				So i finnished I/O pipe for my 
mod pipe is added in this 
commit Its created with "burning inserter". For anyone who wanna use inserter arrow for his own indication. I had some crash during development, but i was able every crash i got fix.