|
|
|
@ -4,13 +4,7 @@ class VotingSettings extends FeatureConfig
|
|
|
|
|
|
|
|
|
|
/// Determines the duration of the voting period, specified in seconds. |
|
|
|
|
var public config float votingTime; |
|
|
|
|
/// Minimal amount of rounds player has to play before being allowed to vote. |
|
|
|
|
/// |
|
|
|
|
/// If every player played the same amount of rounds, then voting is allowed even if they played |
|
|
|
|
/// less that specified value. |
|
|
|
|
/// |
|
|
|
|
/// `0` to disable. |
|
|
|
|
var public config int minimalRoundsToVote; |
|
|
|
|
|
|
|
|
|
/// Determines whether spectators are allowed to vote. |
|
|
|
|
var public config bool allowSpectatorVoting; |
|
|
|
|
/// Specifies which group(s) of players are allowed to see who makes what vote. |
|
|
|
@ -25,7 +19,6 @@ protected function HashTable ToData() {
|
|
|
|
|
|
|
|
|
|
data = __().collections.EmptyHashTable(); |
|
|
|
|
data.SetFloat(P("votingTime"), votingTime); |
|
|
|
|
data.SetInt(P("minimalRoundsToVote"), minimalRoundsToVote); |
|
|
|
|
data.SetBool(P("allowSpectatorVoting"), allowSpectatorVoting); |
|
|
|
|
|
|
|
|
|
arrayOfTexts = _.collections.EmptyArrayList(); |
|
|
|
@ -52,7 +45,6 @@ protected function FromData(HashTable source) {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
votingTime = source.GetFloat(P("votingTime"), 30.0); |
|
|
|
|
minimalRoundsToVote = source.GetInt(P("minimalRoundsToVote"), 1); |
|
|
|
|
allowSpectatorVoting = source.GetBool(P("allowSpectatorVoting"), false); |
|
|
|
|
|
|
|
|
|
allowedToSeeVotesGroup.length = 0; |
|
|
|
@ -72,7 +64,6 @@ protected function FromData(HashTable source) {
|
|
|
|
|
|
|
|
|
|
protected function DefaultIt() { |
|
|
|
|
votingTime = 30.0; |
|
|
|
|
minimalRoundsToVote = 1; |
|
|
|
|
allowSpectatorVoting = false; |
|
|
|
|
allowedToSeeVotesGroup.length = 0; |
|
|
|
|
allowedToVoteGroup.length = 0; |
|
|
|
|