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

Show the modifier in the result string

This commit is contained in:
Michael Walker 2014-05-07 05:56:29 +01:00
parent f19d0cdda6
commit 4f201537b2

View File

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