so others may contribute

This commit is contained in:
Stefan Breunig
2013-02-01 13:11:14 +01:00
commit a07ee0cc3d
24 changed files with 3278 additions and 0 deletions

15
code/entity_info.js Normal file
View File

@ -0,0 +1,15 @@
// 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) {
var team = TEAM_NONE;
if(details.controllingTeam.team === 'ALIENS') team = TEAM_ENL;
if(details.controllingTeam.team === 'RESISTANCE') team = TEAM_RES;
return team;
}