mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-22 20:51:23 +00:00
removed all changes to helpers
This commit is contained in:
parent
eb1c4e7c6d
commit
e50025de6d
5 changed files with 15 additions and 15 deletions
|
@ -372,13 +372,13 @@ const GatherActions = React.createClass({
|
|||
pickPatternIndicator = <ul className="list-inline">
|
||||
{gather.pickingPattern.map((team, index) => {
|
||||
if (team === 'alien') {
|
||||
if(index <= pickIndex){
|
||||
if (index <= pickIndex) {
|
||||
return <li className="padding-y-1"><div className="pick-pattern-box alien-box-active"></div></li>
|
||||
}else{
|
||||
return <li className="padding-y-1"><div className="pick-pattern-box alien-box"></div></li>
|
||||
}
|
||||
} else {
|
||||
if(index <= pickIndex){
|
||||
if (index <= pickIndex) {
|
||||
return <li className="padding-y-1"><div className="pick-pattern-box marine-box-active"></div></li>
|
||||
}else{
|
||||
return <li className="padding-y-1"><div className="pick-pattern-box marine-box"></div></li>
|
||||
|
|
|
@ -106,7 +106,7 @@ module.exports = function (namespace) {
|
|||
});
|
||||
|
||||
// ***** Generate Test Users *****
|
||||
//if (process.env.POPULATE_GATHER) {
|
||||
if (process.env.POPULATE_GATHER) {
|
||||
let helper = require("./helper");
|
||||
|
||||
GatherPool.forEach(gatherManager => {
|
||||
|
@ -114,7 +114,7 @@ module.exports = function (namespace) {
|
|||
gather: gatherManager.current
|
||||
}, refreshGather());
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
namespace.on("connection", function (socket) {
|
||||
ArchivedGather.recent((error, recentGathers) => {
|
||||
|
|
|
@ -48,7 +48,7 @@ function Gather (options) {
|
|||
this.description = options.description || "No player requirements";
|
||||
|
||||
this.election = {
|
||||
INTERVAL: 5000, // 1 Minute
|
||||
INTERVAL: 60000, // 1 Minute
|
||||
startTime: null,
|
||||
timer: null
|
||||
};
|
||||
|
@ -259,7 +259,7 @@ Gather.prototype.modifyGatherer = function (user, callback){
|
|||
|
||||
Gather.prototype.getPickingPattern = function () {
|
||||
const pickingPattern = [ // 1-2-2-2-2-2-1
|
||||
"alien",
|
||||
"marine",
|
||||
"alien",
|
||||
"alien",
|
||||
"marine",
|
||||
|
@ -278,7 +278,7 @@ Gather.prototype.getPickingPattern = function () {
|
|||
|
||||
// Determines picking order of teams
|
||||
// Marine pick first
|
||||
Gather.prototype.pickingTurn = function () {
|
||||
Gather.prototype.pickingTurnIndex = function () {
|
||||
if (this.current !== 'selection') return null;
|
||||
|
||||
const captainCount = 2;
|
||||
|
@ -309,7 +309,7 @@ Gather.prototype.moveToMarine = function (user, mover) {
|
|||
let leader = this.getGatherer(mover);
|
||||
if (leader.team !== "marine" ||
|
||||
!leader.leader ||
|
||||
this.pickingPattern()[this.pickingTurn()] !== "marine") return;
|
||||
this.pickingPattern()[this.pickingTurnIndex()] !== "marine") return;
|
||||
|
||||
if (user && this.containsUser(user)) {
|
||||
if (this.getGatherer(user).team !== "lobby") return;
|
||||
|
@ -330,7 +330,7 @@ Gather.prototype.moveToAlien = function (user, mover) {
|
|||
let leader = this.getGatherer(mover);
|
||||
if (leader.team !== "alien" ||
|
||||
!leader.leader ||
|
||||
this.getPickingPattern()[this.pickingTurn()] !== "alien") return;
|
||||
this.getPickingPattern()[this.pickingTurnIndex()] !== "alien") return;
|
||||
|
||||
if (user && this.containsUser(user)) {
|
||||
if (this.getGatherer(user).team !== "lobby") return;
|
||||
|
@ -374,8 +374,8 @@ Gather.prototype.toJson = function () {
|
|||
gatherers: this.gatherers,
|
||||
servers: this.getServers(),
|
||||
state: this.current,
|
||||
pickingTurn: this.getPickingPattern()[this.pickingTurn()],
|
||||
pickingTurnIndex: this.pickingTurn(),
|
||||
pickingTurn: this.getPickingPattern()[this.pickingTurnIndex()],
|
||||
pickingTurnIndex: this.pickingTurnIndex(),
|
||||
pickingPattern: this.getPickingPattern().splice(0, this.getPickingPattern().length-2), //why is the picking pattern length 12 anyway ? 12 - 2 captains
|
||||
election: {
|
||||
startTime: this.electionStartTime(),
|
||||
|
|
|
@ -23,7 +23,7 @@ const GATHER_CONFIGS = [
|
|||
name: "Classic Gather",
|
||||
description: "No Requirements",
|
||||
serverMembershipTest: function (server) {
|
||||
//return server.name.toLowerCase().indexOf("promod") === -1;
|
||||
return server.name.toLowerCase().indexOf("promod") === -1;
|
||||
}
|
||||
},
|
||||
/*{
|
||||
|
@ -45,7 +45,7 @@ const GATHER_CONFIGS = [
|
|||
return InvitationalGather.list.some(m => m.id === user.id);
|
||||
},
|
||||
serverMembershipTest: function (server) {
|
||||
//return server.name.toLowerCase().indexOf("promod") === -1;
|
||||
return server.name.toLowerCase().indexOf("promod") === -1;
|
||||
}
|
||||
}
|
||||
// {
|
||||
|
|
|
@ -26,10 +26,10 @@ var createTestUsers = (options, callback) => {
|
|||
console.log("Error while adding gatherers", error);
|
||||
} else {
|
||||
console.log("Loaded gatherers");
|
||||
/*gather.gatherers.forEach((gatherer, index, array) => {
|
||||
gather.gatherers.forEach((gatherer, index, array) => {
|
||||
var candidate = Math.floor(Math.random() * array.length);
|
||||
array[index].leaderVote = array[candidate].id;
|
||||
});*/
|
||||
});
|
||||
console.log("Assigned vote for each gatherer");
|
||||
if (typeof callback === 'function') return callback(gather);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue