Event when singal of a constant combinator are changed

Place to get help with not working mods / modding interface.
Post Reply
kartikaybagla
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Jun 17, 2022 12:03 pm
Contact:

Event when singal of a constant combinator are changed

Post by kartikaybagla »

I'm trying to update the status of other entities when a constant combinator is updated (without using wires/signals). I tried looking through the events section in the API docs but couldn't find anything specific for this.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2541
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Event when singal of a constant combinator are changed

Post by FuryoftheStars »

I know there used to be a mod that added new entities to wirelessly transmit circuit signals between them. Maybe if you can find that you might be able to see what they did?
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Event when singal of a constant combinator are changed

Post by DaveMcW »

The event does not exist.

You can catch most changes with on_gui_closed.

But constant combinators can also be updated by copy/pasting (on_entity_settings_pasted) or stamping a blueprint (no relevant event).

mami
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Oct 21, 2022 12:27 am
Contact:

Re: Event when singal of a constant combinator are changed

Post by mami »

I am attempting to do the same thing here, catch when the settings of a custom combinator are changed. I'm currently catching when the settings are copy-pasted and when the gui to change them is accessed, but I cannot find a way to catch when the combinator is blueprinted over. Is there a way to disable allowing combinator settings to be copied by blueprint?

Honestly if there is no way to catch it and no way to disable it, I'm not sure what I should do to prevent players from accidentally breaking my mod thinking blueprints will work.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Event when singal of a constant combinator are changed

Post by quyxkh »

Haven't tried it but wouldn't watching player_cursor_stack_changed for the player switching away from a blueprint at least make checking whether the bp has constant combinators and if so rechecking every constant combinator on the map once a tolerable expense?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Event when singal of a constant combinator are changed

Post by DaveMcW »

mami wrote:
Thu Oct 27, 2022 8:50 pm
way to disable it
entity.allow_copy_paste = false

https://wiki.factorio.com/Prototype/Ent ... copy_paste

mami
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Oct 21, 2022 12:27 am
Contact:

Re: Event when singal of a constant combinator are changed

Post by mami »

I was skeptical if this worked with blueprints but looks like it does, thanks!

mami
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Oct 21, 2022 12:27 am
Contact:

Re: Event when singal of a constant combinator are changed

Post by mami »

I just attempted to use player_cursor_stack_changed, but if the player is using a blueprint from their blueprint library, it does not seem to show up. When watching the player_cursor_stack_changed, is there a way to determine if the player is holding a blueprint from their blueprint library?

Post Reply

Return to “Modding help”