geting form on_player_placed_equipment to the entity

Place to get help with not working mods / modding interface.
Post Reply
ukezi
Filter Inserter
Filter Inserter
Posts: 387
Joined: Sat Jul 02, 2016 11:02 pm
Contact:

geting form on_player_placed_equipment to the entity

Post by ukezi »

I'm making a mod that does burner equipment. for that I'm using the on_player_placed_equipment event to detect when ever a player puts one of my equipments in a grid. For the player I can get to his inventory by using the player_index and the global list of players. is there a way to get to the inventory of a car from what I get from that event? I'd like to not have to go over every car, tank and train to find out witch one it was put into.

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

Re: geting form on_player_placed_equipment to the entity

Post by LuziferSenpai »

Go and look in the Code of this MOD:

https://mods.factorio.com/mods/mknejp/electric-vehicles
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: geting form on_player_placed_equipment to the entity

Post by aubergine18 »

Not sure what you're doing with the car entities, but another good mod to look at for burner-related stuff is KS_Power: https://mods.factorio.com/mods/Klonan/KS_Power
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”