[Request] on_player_interact

Things that already exist in the current mod API
Post Reply
cookta2012
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Oct 24, 2015 9:53 pm
Contact:

[Request] on_player_interact

Post by cookta2012 »

// LUA

script.on_event(defines.events.on_player_interact, function(event)
end
end)

// JSON like description of "event"

Code: Select all

event = 
{
	type =
	{
		"clicked_entity",  // obviously they will have clicked an entity
		"clicked_ground"	// for this event to fire nothing will be "selected"
	}
	
	data = 
	{
		// if the type is "clicked_entity" it will return the entity clicked.
		// if the type is "clicked_ground" it will return an array or table with the x,y of the coordnate clicked
	}
}

Post Reply

Return to “Already exists”