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

[WIP] Caravan circuit improvments #292

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

mnemonicly
Copy link
Contributor

Hello,

I'm working towards improving the circuit conditions in caravans. Before I get too far, (and because I'm bad at LUA) I wanted to start a PR for feedback.

At the moment, this adds a "circuit condition with static value" option to caravans, to allow checking if "=" a value, rather than another signal. As far as I can tell, the nice circuit gui dialog that the base game has cannot be reused by mods, so this seemed like the cleanest solution, but I might be missing something.

I'd like to also add support for a wider range of conditions, not just "=". I'm not exactly sure the best way to do this. My thought is to make a circuit condition class that encapsulates the conditions and conditionals, and exposes an evaluate method, but I'm not sure exactly where to stick this class, or if theres a simpler way I'm missing.

I'll keep poking at my ideas, but would appreciate some feedback before I go too far down a road.

@notnotmelon
Copy link
Contributor

I love this, really good idea. Code looks clean. Is it ready for merge?

@mnemonicly
Copy link
Contributor Author

This feature should be mergable. I'm working on a related one to allow for conditionals that aren't "=" but that can be a separate PR.

@notnotmelon notnotmelon merged commit e772ebb into pyanodon:master Jan 16, 2025
3 checks passed
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