maplistkarma fix
This commit is contained in:
parent
31a7572836
commit
0daa1e82b5
@ -426,8 +426,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$votes = $karmaPlugin->getMapVotes($map);
|
$votes = $karmaPlugin->getMapVotes($map);
|
||||||
if (is_numeric($karma)) {
|
if (is_numeric($karma)) {
|
||||||
if($this->maniaControl->settingManager->getSetting($karmaPlugin, $karmaPlugin::SETTING_NEWKARMA)) {
|
if($this->maniaControl->settingManager->getSetting($karmaPlugin, $karmaPlugin::SETTING_NEWKARMA)) {
|
||||||
$endKarma = $karma;
|
$karmaText = ' ' . round($karma * 100.) . '% (' . $votes['count'] . ')';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$min = 0;
|
$min = 0;
|
||||||
$plus = 0;
|
$plus = 0;
|
||||||
@ -465,7 +464,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$karmaLabel->setTextSize(0.9);
|
$karmaLabel->setTextSize(0.9);
|
||||||
$karmaLabel->setTextColor('000');
|
$karmaLabel->setTextColor('000');
|
||||||
$karmaLabel->setAlign(Control::CENTER, Control::CENTER);
|
$karmaLabel->setAlign(Control::CENTER, Control::CENTER);
|
||||||
$karmaLabel->setText(' ' . $endKarma . ' (' . $votes['count'] . 'x / ' . round($karma * 100.) . '%)');
|
$karmaLabel->setText($karmaText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user