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

VON color deserialization broke #1966

Closed
katsu6436 opened this issue Jan 11, 2025 · 8 comments · Fixed by #1971
Closed

VON color deserialization broke #1966

katsu6436 opened this issue Jan 11, 2025 · 8 comments · Fixed by #1971
Labels

Comments

@katsu6436
Copy link
Contributor

--@server
local color = von.deserialize(von.serialize(Color(255,0,0)))
print(color, version())

https://imgur.com/Xbkdk9O

tested on fresh new copy of a dedicated server with only latest starfallex loaded

@thegrb93
Copy link
Owner

It never used to work I think. There's not a serialization type specified for color.

@Advers
Copy link
Contributor

Advers commented Jan 11, 2025

No, I have it on good word that it did work in the near past. I believe something did actually change.

@katsu6436
Copy link
Contributor Author

katsu6436 commented Jan 12, 2025

Aye, I have no idea what would even have caused it. I just loaded in one day and my model loader from file wasn't working properly.

@thegrb93
Copy link
Owner

Oh, I think its because regular lua tables used to work for color in most cases even if the type wasn't a color.

@thegrb93
Copy link
Owner

What is erroring now? Maybe we can still make that work.

@thegrb93 thegrb93 added the bug label Jan 12, 2025
@katsu6436
Copy link
Contributor Author

Oh, so it never was typecast to SF Color type in the first place? I'm just passing the results of the de-serialization of multi part "model" files into functions like hologram.setColor, and it worked before.

I've just done this temporary workaround on my libraries for now:

local data = von.deserialize(str)
local c = data.Color
data.Color = Color(c.r,c.g,c.b,c.a)

So you're saying that those functions were actually just being passed regular tables but with the correct key values so it still accepted them? Can we just fix that then, if changing it to be typecast immediately to SF Color after being de-serialized is out of the question?

@thegrb93
Copy link
Owner

See if this fixes it? #1971

@katsu6436
Copy link
Contributor Author

Confirm, the original behavior has been restored.

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

Successfully merging a pull request may close this issue.

3 participants