Ticket #4377: rename_ai_influence_group_v1.patch
File rename_ai_influence_group_v1.patch, 4.3 KB (added by , 7 years ago) |
---|
-
binaries/data/mods/public/simulation/ai/common-api/shared.js
m.SharedScript.prototype.init = function 182 182 this.accessibility.init(state, this.terrainAnalyzer); 183 183 184 184 // Setup resources 185 185 this.resourceInfo = state.resources; 186 186 m.Resources.prototype.types = state.resources.codes; 187 // Resource types: 0= not used for resource maps188 // 1= abundant resource with small amount each189 // 2= spare resource, but huge amount each187 // Resource types: ignore = not used for resource maps 188 // abundant = abundant resource with small amount each 189 // spare = spare resource, but huge amount each 190 190 // The following maps are defined in TerrainAnalysis.js and are used for some building placement (cc, dropsites) 191 191 // They are updated by checking for create and destroy events for all resources 192 this.normalizationFactor = { " 1": 50, "2": 90 };193 this.influenceRadius = { " 1": 36, "2": 48 };194 this.ccInfluenceRadius = { " 1": 60, "2": 120 };192 this.normalizationFactor = { "abundant": 50, "spare": 90 }; 193 this.influenceRadius = { "abundant": 36, "spare": 48 }; 194 this.ccInfluenceRadius = { "abundant": 60, "spare": 120 }; 195 195 this.resourceMaps = {}; // Contains maps showing the density of resources 196 196 this.ccResourceMaps = {}; // Contains maps showing the density of resources, optimized for CC placement. 197 197 this.createResourceMaps(); 198 198 199 199 this.gameState = {}; -
binaries/data/mods/public/simulation/components/GuiInterface.js
GuiInterface.prototype.GetSimulationStat 158 158 "codes": Resources.GetCodes(), 159 159 "names": Resources.GetNames(), 160 160 "aiInfluenceGroups": {} 161 161 }; 162 162 for (let res of ret.resources.codes) 163 ret.resources.aiInfluenceGroups[res] = Resources.GetResource(res).aiAnalysisInfluenceGroup || 0;163 ret.resources.aiInfluenceGroups[res] = Resources.GetResource(res).aiAnalysisInfluenceGroup; 164 164 165 165 // Add basic statistics to each player 166 166 for (let i = 0; i < numPlayers; ++i) 167 167 { 168 168 let playerEnt = cmpPlayerManager.GetPlayerByID(i); -
binaries/data/mods/public/simulation/data/resources/food.json
7 7 "fruit": "Fruit", 8 8 "grain": "Grain", 9 9 "meat": "Meat" 10 10 }, 11 11 "truePrice": 100, 12 "aiAnalysisInfluenceGroup": 012 "aiAnalysisInfluenceGroup": "ignore" 13 13 } -
binaries/data/mods/public/simulation/data/resources/metal.json
4 4 "order": 4, 5 5 "subtypes": { 6 6 "ore": "Ore" 7 7 }, 8 8 "truePrice": 100, 9 "aiAnalysisInfluenceGroup": 29 "aiAnalysisInfluenceGroup": "spare" 10 10 } -
binaries/data/mods/public/simulation/data/resources/stone.json
5 5 "subtypes": { 6 6 "rock": "Rock", 7 7 "ruins": "Ruins" 8 8 }, 9 9 "truePrice": 100, 10 "aiAnalysisInfluenceGroup": 210 "aiAnalysisInfluenceGroup": "spare" 11 11 } -
binaries/data/mods/public/simulation/data/resources/wood.json
5 5 "subtypes": { 6 6 "tree": "Tree", 7 7 "ruins": "Ruins" 8 8 }, 9 9 "truePrice": 100, 10 "aiAnalysisInfluenceGroup": 110 "aiAnalysisInfluenceGroup": "abundant" 11 11 }