Custom GUI Screen

Place to get help with not working mods / modding interface.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Custom GUI Screen

Post by LuziferSenpai »

Hey,

I want to show a Screen with all avaible Recipes in the Game, but only them that are the player can see. When you click on a Custom Entity and than say that if for this recipe the virtual signal is 1 or more than set the recipe in the Assembler or Chemical to that Recipe, but only if it possible to craft there.

I dont know how i can make that.

So i ask for help.

And if you can help me fast getting it working that only in front of the entity is searching, than pls say that.

This is how i search at the Moment:

Code: Select all

function getConnectedEntity( combi )
	local connectedEntitys = combi.surface.find_entities( { { x = combi.position.x - 1, y = combi.position.y - 1 }, { x = combi.position.x + 1, y = combi.position.y + 1 } } )
	for _,entity in ipairs(connectedEntitys) do
		if ( entity.valid and entity.type == "assembling-machine" ) then
			return entity
		end
	end
end
Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Custom GUI Screen

Post by LuziferSenpai »

PUSH
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
Post Reply

Return to “Modding help”