Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/selection_panels_helpers.js
Show All 25 Lines | if (template1.trainingRestrictions && template2.trainingRestrictions) | ||||
return template1.trainingRestrictions.category == template2.trainingRestrictions.category; | return template1.trainingRestrictions.category == template2.trainingRestrictions.category; | ||||
if (template1.buildRestrictions && template2.buildRestrictions) | if (template1.buildRestrictions && template2.buildRestrictions) | ||||
return template1.buildRestrictions.category == template2.buildRestrictions.category; | return template1.buildRestrictions.category == template2.buildRestrictions.category; | ||||
return false; | return false; | ||||
} | } | ||||
function getPlayerHighlightColor(player) | |||||
{ | |||||
return "color:" + rgbToGuiColor(g_DisplayedPlayerColors[player], 160); | |||||
} | |||||
/** | /** | ||||
* Returns a "color:255 0 0 Alpha" string based on how many resources are needed. | * Returns a "color:255 0 0 Alpha" string based on how many resources are needed. | ||||
*/ | */ | ||||
function resourcesToAlphaMask(neededResources) | function resourcesToAlphaMask(neededResources) | ||||
{ | { | ||||
let totalCost = 0; | let totalCost = 0; | ||||
for (let resource in neededResources) | for (let resource in neededResources) | ||||
totalCost += +neededResources[resource]; | totalCost += +neededResources[resource]; | ||||
▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator