You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it so when a tournament is created, the starting time picker is not populated.
This is harder than it looks. The current code assumes that there will always be a default starting time, unless the tournament is going to be started by a particular number of players. Even then, a starting time is kept in the various data structures which even shows up in the call to EventRow::create, which has this code in it:
if parameters.n_players_autostart.is_some() {
start_at = None;
} else if let Some(start_at) = start_at.as_mut() {
Self::fix(start_at, start_at_minimum..=start_at_maximum);
}
For non-demo event creation, the struct we use is NewEvent:
and start_at is not an Option. Pararmeters has an n_players_autostart field which is an Option<i32>. Currently, mb2 supports—in theory—the ability to have both a non-null start_at and a non-null n_players_autostart in the events table, with that telling mb2 to start whichever comes first, the starting time occurring or the given number of players registering. There is, however, no way to put that into the database through the UI, so if it's been used at all, it's been done via manual db manipulation, which is exceedingly rare.
The current creation code was a bit of a hack that hasn't been revisited. It has no UI for letting the creator know that a value is inappropriate for a field, so, for example if non-numeric characters are entered in a numeric-requiring input (e.g., "nn" in "Seconds to Act"), the Create button remains active and if clicked on, some default value will be used. As such, even if the creation code were hacked up to let us represent that a starting time hasn't been chosen, that wouldn't help in the least if clicking on Create simply used a default that the creator couldn't see.
Considering the above, it does not make sense to work on this issue any time soon. There are far too many higher priority issues. In fact, making the winner's default start-at always work (#1560) is way higher priority than this. The biggest reason for this issue to exist is to just document what I found while looking at how easy or hard it would be to get rid of the default.
The text was updated successfully, but these errors were encountered:
Make it so when a tournament is created, the starting time picker is not populated.
This is harder than it looks. The current code assumes that there will always be a default starting time, unless the tournament is going to be started by a particular number of players. Even then, a starting time is kept in the various data structures which even shows up in the call to
EventRow::create
, which has this code in it:For non-demo event creation, the struct we use is
NewEvent
:and
start_at
is not anOption
.Pararmeters
has ann_players_autostart
field which is anOption<i32>
. Currently, mb2 supports—in theory—the ability to have both a non-nullstart_at
and a non-nulln_players_autostart
in theevents
table, with that telling mb2 to start whichever comes first, the starting time occurring or the given number of players registering. There is, however, no way to put that into the database through the UI, so if it's been used at all, it's been done via manual db manipulation, which is exceedingly rare.The current creation code was a bit of a hack that hasn't been revisited. It has no UI for letting the creator know that a value is inappropriate for a field, so, for example if non-numeric characters are entered in a numeric-requiring input (e.g., "nn" in "Seconds to Act"), the
Create
button remains active and if clicked on, some default value will be used. As such, even if the creation code were hacked up to let us represent that a starting time hasn't been chosen, that wouldn't help in the least if clicking onCreate
simply used a default that the creator couldn't see.Considering the above, it does not make sense to work on this issue any time soon. There are far too many higher priority issues. In fact, making the winner's default start-at always work (#1560) is way higher priority than this. The biggest reason for this issue to exist is to just document what I found while looking at how easy or hard it would be to get rid of the default.
The text was updated successfully, but these errors were encountered: