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

Revert to Connection = ConnectionPoint #12

Closed
wants to merge 1 commit into from

Conversation

BalderHolst
Copy link
Contributor

Commit 1a939c2 changed the Connectiontype from

pub type Connection = ConnectionPoint;

to

#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum Connection {
    Single(ConnectionPoint),
    Multiple(Vec<ConnectionData>),
}

I find this change rather confusing as a user of this library. Why is a multiply connecton a vector of something different from when I have a single connection? Futhermore, how do i know the type of wire the Multiple connection is talking about?

Because of this confusion i think it is best to revert this change.

It was not possible to determine the type of wire used if the connection
was a `Multiple` connection.
@coriolinus
Copy link
Owner

The previous change is supported by test cases, which this reversion currently fails.

Keep in mind that this library does not define the blueprint string syntax. It's reverse-engineered, but the game is definitive. So I don't really have the option to just adjust the syntax according to my preference.

@BalderHolst
Copy link
Contributor Author

Ok, fair enough. It seems that all the blueprints I have tested only contain Single connections.

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