fix exports

This commit is contained in:
Matteo Pagliazzi
2019-10-01 17:53:48 +02:00
parent 4faa06f37d
commit cca5b8492b
144 changed files with 271 additions and 315 deletions

View File

@@ -5,7 +5,7 @@ import isNumber from 'lodash/isNumber';
// Because the same op needs to be performed on the client and the server (critical hits, item drops, etc),
// we need things to be "random", but technically predictable so that they don't go out-of-sync
module.exports = function predictableRandom (user, seed) {
export default function predictableRandom (user, seed) {
if (!seed || seed === Math.PI) {
let stats = user.stats.toObject ? user.stats.toObject() : user.stats;
// These items are not part of the stat object but exists on the server (see controllers/user#getUser)
@@ -23,4 +23,4 @@ module.exports = function predictableRandom (user, seed) {
let x = Math.sin(seed++) * 10000;
return x - Math.floor(x);
};
}