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

re implements vector and changes zip #77

Merged
merged 11 commits into from
Jan 31, 2025
Merged

Conversation

Kashargul
Copy link
Contributor

About the PR

Re-implements the vector functions, using the built ins and moving the zip function to mapping to have it consistent.

Best to look over the code please.

We will now always fill vectors up with undefined if any is longer than the other. The image below was the common test case beforehand, which now also has the undefined and fill up to have it behave the same no matter which vector is the longer one.
grafik

Swapping the test case to have the larger vector as the first vector on original code:
grafik

Why's this needed?

We've multiple UIs relying on zip and vector, so we should be able to import them from tgui core

@tgstation-ci
Copy link

tgstation-ci bot commented Jan 28, 2025

Thank you for contributing to tgui-core! The workflow 'Chromatic Security' requires repository secrets and will not run without approval. Maintainers can add the CI Cleared label to allow it to run. Note that any changes to chromaitc-security.yml and chromatic.yml will not be reflected.

Copy link
Member

@jlsnow301 jlsnow301 left a comment

Choose a reason for hiding this comment

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

Wondering if we should add tests for these in the repo. Node has built in testing now, maybe we could make use of it?

lib/common/vector.ts Outdated Show resolved Hide resolved
@Kashargul
Copy link
Contributor Author

Wondering if we should add tests for these in the repo. Node has built in testing now, maybe we could make use of it?

actually not a bad idea.

@jlsnow301 jlsnow301 merged commit ff7c60b into tgstation:main Jan 31, 2025
3 of 7 checks passed
@Kashargul Kashargul deleted the vector branch February 1, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants