on_entity_settings_pasted for all entities ?

Post Reply
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

on_entity_settings_pasted for all entities ?

Post by binbinhfr »

Hi,

it would be nice if on_entity_settings_pasted and the factorio copy/paste feature could trigger on any entities (and modded entity of course).
Because this event is very useful if you want to copy modded variables attached to a derivated modded entity.
I already use it on my trader chest, and players asked me why they cannot copy/paste also on trader tanks, trader accus, etc...

On vanilla objects that has nothing to copy/paste, the copy/paste feature would just do nothing. But the feature would be available on every entity.
My mods on the Factorio Mod Portal :geek:

Rseding91
Factorio Staff
Factorio Staff
Posts: 13232
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: on_entity_settings_pasted for all entities ?

Post by Rseding91 »

You can already do this. You just have to define which entities can copy to which other entities using the entity prototype property: additional_pastable_entities = {"entity-1", "entity-2", ...}
If you want to get ahold of me I'm almost always on Discord.

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: on_entity_settings_pasted for all entities ?

Post by binbinhfr »

Grrrreat ! thx guy.
My mods on the Factorio Mod Portal :geek:

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1194
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: on_entity_settings_pasted for all entities ?

Post by Mooncat »

I was looking for something like that too. Thanks!

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: on_entity_settings_pasted for all entities ?

Post by ownlyme »

works, thx :)
this hint should be right in the events documentation :D
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Post Reply

Return to “Implemented mod requests”