1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 08:50:59 +01:00

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 a6ccc1872a
commit fa284fc37a

View File

@ -534,7 +534,8 @@ if (isset($_POST['delete'])) {
// Prepend the result to the post body // Prepend the result to the post body
$modifier = ($diceZ != 0) ? ((($diceZ < 0) ? ' - ' : ' + ') . abs($diceZ)) : ''; $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'];
} }
} }