Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this compatible with compakt circuits #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tamj0rd2
Copy link

@tamj0rd2 tamj0rd2 commented Mar 4, 2024

No description provided.

@@ -55,7 +55,51 @@ function _M.get_rc_slot_count()
return _rc_slot_count
end

local function add_compakt_circuits_integration()
if not remote.interfaces["compaktcircuit"] or not remote.interfaces["compaktcircuit"]["add_combinator"] then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not remote.interfaces["compaktcircuit"] or not remote.interfaces["compaktcircuit"]["add_combinator"] then
if not script.active_mods["compaktcircuit"] then

I think it's better if this code errors out when compaktcircuit is active, but it hasn't defined this interface yet.
Otherwise, we might have hard-to-debug cases where everything looks like it loaded fine, but then placing the combinator in the processor doesn't work.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And, well, I think check using script.active_mods is easier and more intuitive...

@SunSerega
Copy link

Just tried in my save... And seems like the recipe combinator parameters are reset when it's packed. Ig something has been changed on the crafting combinator's side.

@SunSerega
Copy link

Ok, packing works if settings are set like this:

				_M.create(packed_input, {crafting_combinator_data={settings=info.settings}})

However, now the settings are reset when unpacking.

You don't implement create_entity, so it's probably a bug in one of the 2 mods...
One thing that might be related is that if I take a blueprint where RC has settings, and try pasting it over an already-built RC with default (or any other) settings - the settings aren't changed.
Actually, this is the problem with many mods. Including processors of compaktcircuit...

@SunSerega
Copy link

Ah and also the outline of RC is still shown when hovering over a power pole nearby:
image
It isn't the case with vanilla combinators, so can definitely be fixed too...

@tamj0rd2
Copy link
Author

tamj0rd2 commented Jun 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants