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

In the plugin, don't write properties if they're nil and also a number #955

Merged
merged 3 commits into from
Aug 2, 2024

Conversation

Dekkonot
Copy link
Member

@Dekkonot Dekkonot commented Aug 1, 2024

When sent through the network, NaN and Infinity become nil due to JSON not supporting them. This results in two problems:

  • An annoying value of type nil cannot be converted to number warning in the output
  • The value being reset to 0 instead of whatever value it was before

Neither of these are desirable, so this PR fixes that behavior. It does so by explicitly ignoring nil updates for Float32 and Float64 updates. This is explicitly on the 7.4.x branch because I don't want it to become permanent. Long-term, we want to swap to a different network protocol which should fix this issue.

See #953 for some discussion on this subject.

@Dekkonot Dekkonot added scope: plugin Relevant to the Roblox Studio plugin version 7.4 labels Aug 1, 2024
@Dekkonot Dekkonot merged commit 3e53d67 into rojo-rbx:7.4.x Aug 2, 2024
@Dekkonot Dekkonot deleted the silence-nil-warning branch August 2, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: plugin Relevant to the Roblox Studio plugin version 7.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants