shobhit-pathak / MatchZy

MatchZy is a plugin for CS2 (Counter Strike 2) for running and managing practice/pugs/scrims/matches with easy configuration and Get5 (G5API/G5V) support as well!
https://shobhit-pathak.github.io/MatchZy/
MIT License
268 stars 78 forks source link

JSON: "map_sides" field should allow null/undefined #163

Open FlowingSPDG opened 6 months ago

FlowingSPDG commented 6 months ago

Hello, thank you for developing/maintaining awesome plugin for CS2 era! I was big fan of get5 originally, and developing get5-based match management app for few years.

So I was trying to use my old project for get5 with MatchZy, and figured out some properties are not compatible with original get5 load_match json structure.

https://splewis.github.io/get5/latest/match_schema/#schema In this case, get5 allows undefined which is null in JSON but in MatchZy it does not allow null.

https://github.com/shobhit-pathak/MatchZy/blob/ae597e50756f8ed8380e4cbacec4a4c1eb9013da/MatchManagement.cs#L224

I am currently thinking to use an empty array instead of null, but it could be compatibility issue imo.

P.S. I am also curious to how veto_mode works! :)

shobhit-pathak commented 5 months ago

Hey!

Apologies for replying late, and thanks for highlighting it! I thought it is compatible but I've definitely missed out a few things. As you said, for now you can use an empty array, or do not send map_sides in the json. I'll be looking into it soon

veto_mode should be same as get5, it specifies the ban/pick order

FlowingSPDG commented 5 months ago

Hi @shobhit-pathak and No problem at all!

Copy, I'll use empty array for my project and https://github.com/FlowingSPDG/Got5 . Thank you❤️‍🔥

FlowingSPDG commented 5 months ago

Maybe this relates to #101 ?