FAForever / FAForever/server

Add validity to `game_info` message

オープン
#858 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
72
フォーク
84
平均マージ
5時間 11分
マージ済み PR(30日)
1

説明

It would be nice if people could see that a game will be unrated because of certain lobby settings during the lobby phase. Obviously we can’t predict if there will be desyncs or disconnects, but if the game is modded or a bad map is selected we could certainly show it as unrated.

We should add a field `validity` to the `game_info` message that will contain certain validity strings (we would probably have to figure out some better names since the naming of the enum is currently pretty inconsistent).

Adding this would require some reworking of when the validity is calculated as it’s currently only computed once when the game is launched. We would probably want to break a certain subset of those validity checks out into checks that are recomputed whenever the game_info message is requested. Those pre-launch validity checks should not make writes to the database since they aren’t final yet, so some of the code will have to be refactored.

Examples of validity states that should always be checked:
* bad map
* bad mod
* wrong victory condition
* has AI

These validity states could only be checked when the game is full as they may fail and pass again as players join:
* uneven teams
* single player

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。