2015-07-22 23:30:14 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Implements User Model
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
var client = require("../ensl/client")();
|
|
|
|
|
|
|
|
function User (user) {
|
|
|
|
this.id = user['id'];
|
2015-07-29 10:46:30 +00:00
|
|
|
this.online = true;
|
2015-07-22 23:30:14 +00:00
|
|
|
this.username = user['username'];
|
|
|
|
this.country = user['country'];
|
|
|
|
this.time_zone = user['time_zone'];
|
|
|
|
this.avatar = client.baseUrl + user['avatar'];
|
|
|
|
this.admin = user['admin'];
|
2015-07-24 15:01:56 +00:00
|
|
|
// this.steam = {
|
|
|
|
// url: user['steam']['url'],
|
|
|
|
// nickname: user['steam']['nickname']
|
|
|
|
// };
|
2015-07-25 12:00:56 +00:00
|
|
|
this.ability = {
|
|
|
|
division: "Div " + (Math.floor(Math.random() * 4) + 1),
|
2015-07-26 11:54:35 +00:00
|
|
|
lifeforms: [["Lerk", "Onos", "Fade"][Math.floor(Math.random() * 3)]],
|
|
|
|
commander: true
|
2015-07-25 12:00:56 +00:00
|
|
|
}
|
2015-07-22 23:30:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = User;
|