Jon Atkins b595af30ad more work on fixing things for the 2014-05-23 changes
it's a big job - much is still broken
2014-05-23 23:50:37 +01:00

22 lines
564 B
JavaScript

// ENTITY DETAILS TOOLS //////////////////////////////////////////////
// hand any of these functions the details-hash of an entity (i.e.
// portal, link, field) and they will return useful data.
// given the entity detail data, returns the team the entity belongs
// to. Uses TEAM_* enum values.
window.getTeam = function(details) {
return teamStringToId(details.team);
}
window.teamStringToId = function(teamStr) {
var team = TEAM_NONE;
if(teamStr === 'ENLIGHTENED') team = TEAM_ENL;
if(teamStr === 'RESISTANCE') team = TEAM_RES;
return team;
}