Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/reference/common/load.js
Show First 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | |||||
* that are auto-researched. | * that are auto-researched. | ||||
* | * | ||||
* @return {array} List of techs that are researched automatically | * @return {array} List of techs that are researched automatically | ||||
*/ | */ | ||||
function findAllAutoResearchedTechs() | function findAllAutoResearchedTechs() | ||||
{ | { | ||||
let techList = []; | let techList = []; | ||||
for (let filename of Engine.BuildDirEntList(g_TechnologyPath, "*.json", true)) | for (let filename of Engine.ListDirectoryFiles(g_TechnologyPath, "*.json", true)) | ||||
{ | { | ||||
// -5 to strip off the file extension | // -5 to strip off the file extension | ||||
let templateName = filename.slice(g_TechnologyPath.length, -5); | let templateName = filename.slice(g_TechnologyPath.length, -5); | ||||
let data = loadTechData(templateName); | let data = loadTechData(templateName); | ||||
if (data && data.autoResearch) | if (data && data.autoResearch) | ||||
techList.push(templateName); | techList.push(templateName); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator