Don't show dice sum if only 1 die was rolled

This commit is contained in:
Michael Walker 2014-05-07 06:02:10 +01:00
parent 4f201537b2
commit 1f35e5a2b5

View File

@ -534,7 +534,8 @@ if (isset($_POST['delete'])) {
// Prepend the result to the post body
$modifier = ($diceZ != 0) ? ((($diceZ < 0) ? ' - ' : ' + ') . abs($diceZ)) : '';
$post['body'] = 'Rolled ' . implode(', ', $dicerolls) . $modifier . ' = ' . $dicesum . "\r\n" . $post['body'];
$dicesum = ($diceX > 1) ? ' = ' . $dicesum : '';
$post['body'] = 'Rolled ' . implode(', ', $dicerolls) . $modifier . $dicesum . "\r\n" . $post['body'];
}
}