Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/african_plains.js
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | [ | ||||
scaleByMapAreaAbsolute(8), | scaleByMapAreaAbsolute(8), | ||||
scaleByMapAreaAbsolute(8) | scaleByMapAreaAbsolute(8) | ||||
], | ], | ||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0)); | avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0)); | ||||
Engine.SetProgress(75); | Engine.SetProgress(75); | ||||
// Roaming animals | // Roaming animals | ||||
{ | { | ||||
var placeRoaming = function(name, objs) | const placeRoaming = function(name, objs) | ||||
{ | { | ||||
g_Map.log("Creating roaming " + name); | g_Map.log("Creating roaming " + name); | ||||
const group = new SimpleGroup(objs, true, clFood); | const group = new SimpleGroup(objs, true, clFood); | ||||
createObjectGroups(group, 0, | createObjectGroups(group, 0, | ||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | ||||
scaleByMapSize(3, 9), 50 | scaleByMapSize(3, 9), 50 | ||||
); | ); | ||||
}; | }; | ||||
Show All 20 Lines | createFood( | ||||
], | ], | ||||
avoidClasses(clFood, 20, clWater, 5, clHill, 2, clPlayer, 16), | avoidClasses(clFood, 20, clWater, 5, clHill, 2, clPlayer, 16), | ||||
clFood); | clFood); | ||||
} | } | ||||
// Animals that hang around watering holes | // Animals that hang around watering holes | ||||
{ | { | ||||
// TODO: these have a high retry factor because our mapgen constraint logic is bad. | // TODO: these have a high retry factor because our mapgen constraint logic is bad. | ||||
var placeWateringHoleAnimals = function(name, objs, numberOfGroups) | const placeWateringHoleAnimals = function(name, objs, numberOfGroups) | ||||
{ | { | ||||
g_Map.log("Creating " + name + " around watering holes"); | g_Map.log("Creating " + name + " around watering holes"); | ||||
const group = new SimpleGroup(objs, true, clFood); | const group = new SimpleGroup(objs, true, clFood); | ||||
createObjectGroups(group, 0, | createObjectGroups(group, 0, | ||||
borderClasses(clWater, 6, 3), | borderClasses(clWater, 6, 3), | ||||
numberOfGroups, 50 | numberOfGroups, 50 | ||||
); | ); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator