forked from mirrors/0ad
Fix SimpleGroup and RandomGroup placement retries
Reviewed by: FeXoR. Fixes: #4294 Differential Revision: https://code.wildfiregames.com/D249 This was SVN commit r19929.
This commit is contained in:
@@ -256,7 +256,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGiraffe, 2,4, 0,4), new SimpleObject(oGiraffe2, 0,2, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
@@ -266,7 +266,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oElephant, 2,4, 0,4), new SimpleObject(oElephant2, 0,2, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
@@ -276,7 +276,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oLion, 0,1, 0,4), new SimpleObject(oLioness, 2,3, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
|
||||
@@ -507,21 +507,21 @@ RMS.SetProgress(65);
|
||||
|
||||
log("Creating stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
log("Creating small stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
log("Creating metal mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -532,7 +532,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -543,7 +543,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -555,7 +555,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -565,7 +565,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clHill, 1, clFood, 10),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -575,7 +575,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oRabbit, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -590,7 +590,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clHill, 1, clPlayer, 12, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -602,7 +602,7 @@ var planetm = 1;
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill, 2, clPlayer, 2, clDirt, 0),
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -612,7 +612,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0),
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -622,7 +622,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill, 1, clPlayer, 1, clDirt, 1),
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -249,7 +249,7 @@ addElements(shuffleArray([
|
||||
RMS.SetProgress(80);
|
||||
|
||||
log("Adding lillies...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(g_Decoratives.lillies, 5, 12, 1, 4),
|
||||
|
||||
@@ -245,14 +245,14 @@ RMS.SetProgress(55);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(1,4), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(1,4), 100
|
||||
);
|
||||
@@ -260,7 +260,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1),
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
@@ -273,7 +273,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -286,7 +286,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -300,7 +300,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oRabbid, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20),
|
||||
6 * numPlayers, 50
|
||||
);
|
||||
@@ -311,7 +311,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clHill, 1, clFood, 20),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -324,7 +324,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSheep, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -342,7 +342,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clHill, 1, clPlayer, 13, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -353,7 +353,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0),
|
||||
scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -365,7 +365,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill, 1, clPlayer, 1, clDirt, 1),
|
||||
scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -310,7 +310,7 @@ for (var i = 0; i < sizes.length; i++)
|
||||
new SimpleObject(aCeltHouse, 0,1, 4,5),
|
||||
new SimpleObject(aCeltLongHouse, 1,1, 4,5)
|
||||
], true, clHillDeco);
|
||||
createObjectGroupsByAreas(
|
||||
createObjectGroupsByAreasDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clHillDeco, 3), stayClasses(clHill, 3)],
|
||||
ravine.length * 5, 20,
|
||||
@@ -321,7 +321,7 @@ for (var i = 0; i < sizes.length; i++)
|
||||
[
|
||||
new SimpleObject(aCeltHomestead, 1,1, 1,1)
|
||||
], true, clHillDeco);
|
||||
createObjectGroupsByAreas(
|
||||
createObjectGroupsByAreasDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clHillDeco, 5), stayClasses(clHill, 4)],
|
||||
ravine.length * 2, 100,
|
||||
@@ -499,7 +499,7 @@ RMS.SetProgress(75);
|
||||
log("Creating stone mines...");
|
||||
// create stone quarries
|
||||
var group = new SimpleGroup([new SimpleObject(oStoneSmall, 1,2, 0,4), new SimpleObject(oStoneLarge, 0,1, 0,4)], true, clRock);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 4, clForest, 2, clPlayer, 20, clRock, 10)],
|
||||
scaleByMapSize(6,20), 100,
|
||||
[explorableArea]
|
||||
@@ -507,7 +507,7 @@ createObjectGroupsByAreas(group, 0,
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 4, clForest, 2, clPlayer, 20, clRock, 10)],
|
||||
scaleByMapSize(6,20), 100,
|
||||
[explorableArea]
|
||||
@@ -516,7 +516,7 @@ createObjectGroupsByAreas(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalSmall, 1,2, 0,4), new SimpleObject(oMetalLarge, 0,1, 0,4)], true, clMetal);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 4, clForest, 2, clPlayer, 20, clMetal, 10, clRock, 5)],
|
||||
scaleByMapSize(6,20), 100,
|
||||
[explorableArea]
|
||||
@@ -530,7 +530,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
avoidClasses(clHill, 4, clForest, 0, clPlayer, 0, clBaseResource, 20),
|
||||
3 * numPlayers, 100,
|
||||
[explorableArea]
|
||||
@@ -540,7 +540,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBoar, 2,3, 0,5)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
avoidClasses(clHill, 4, clForest, 0, clPlayer, 0, clBaseResource, 15),
|
||||
numPlayers, 50,
|
||||
[explorableArea]
|
||||
@@ -550,7 +550,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBear, 1,1, 0,4)],
|
||||
false, clFood
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
avoidClasses(clHill, 4, clForest, 0, clPlayer, 20),
|
||||
scaleByMapSize(3, 12), 200,
|
||||
[explorableArea]
|
||||
@@ -564,7 +564,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 4, clFood, 20),
|
||||
randIntInclusive(3, 12) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -580,7 +580,7 @@ group = new SimpleGroup(
|
||||
],
|
||||
true
|
||||
);
|
||||
createObjectGroupsByAreas(
|
||||
createObjectGroupsByAreasDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0),
|
||||
scaleByMapSize(5, 50), 50,
|
||||
@@ -600,7 +600,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
true, clForest
|
||||
);
|
||||
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
avoidClasses(clForest, 4, clHill, 5, clPlayer, 10, clBaseResource, 2, clMetal, 5, clRock, 5),
|
||||
num, 20,
|
||||
[explorableArea]
|
||||
@@ -614,7 +614,7 @@ log("Creating grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassLarge, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
avoidClasses(clHill, 2, clPlayer, 2),
|
||||
scaleByMapSize(50, 300), 20,
|
||||
[explorableArea]
|
||||
|
||||
@@ -284,7 +284,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFood, 2,3, 0,2)],
|
||||
true, clTreasure
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 18, clHill, 1, clFood, 5),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -295,7 +295,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oWood, 2,3, 0,2)],
|
||||
true, clTreasure
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 18, clHill, 1),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -316,7 +316,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clHill, 2),
|
||||
num
|
||||
);
|
||||
|
||||
@@ -379,7 +379,7 @@ addElements(shuffleArray([
|
||||
RMS.SetProgress(80);
|
||||
|
||||
log("Adding more decoratives...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject("actor|props/special/eyecandy/awning_wood_small.xml", 1, 1, 1, 7),
|
||||
@@ -403,7 +403,7 @@ RMS.SetProgress(85);
|
||||
log("Creating food treasures...");
|
||||
for (let treasure of ["wood", "food_bin"])
|
||||
{
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject("gaia/special_treasure_" + treasure, 1, 1, 0, 2)],
|
||||
true
|
||||
@@ -421,7 +421,7 @@ for (let treasure of ["wood", "food_bin"])
|
||||
RMS.SetProgress(90);
|
||||
|
||||
log("Creating shipwrecks...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject("other/special_treasure_shipwreck_sail_boat_cut", 1, 1, 0, 1)],
|
||||
true
|
||||
|
||||
@@ -197,7 +197,7 @@ for (let i = 0; i < 2; ++i)
|
||||
scaleByMapSize(4, 20));
|
||||
|
||||
log("Creating reeds...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(aReeds, 20, 40, 0, 4),
|
||||
@@ -231,7 +231,7 @@ for (let size of [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8,
|
||||
RMS.SetProgress(50);
|
||||
|
||||
log("Creating stone mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(oStoneSmall, 0, 2, 0, 4),
|
||||
@@ -244,7 +244,7 @@ createObjectGroups(
|
||||
scaleByMapSize(4, 16),
|
||||
100);
|
||||
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oStoneSmall, 2, 5, 1, 3)], true, clRock),
|
||||
0,
|
||||
[avoidClasses(clWater, 0, clPlayer, 20, clRock, 10, clHill, 1)],
|
||||
@@ -252,7 +252,7 @@ createObjectGroups(
|
||||
100);
|
||||
|
||||
log("Creating metal mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal),
|
||||
0,
|
||||
[avoidClasses(clWater, 0, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1)],
|
||||
@@ -261,7 +261,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(60);
|
||||
|
||||
log("Creating small decorative rocks...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(aRockMedium, 1, 3, 0, 1)], true),
|
||||
0,
|
||||
avoidClasses(clPlayer, 1),
|
||||
@@ -270,7 +270,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(65);
|
||||
|
||||
log("Creating large decorative rocks...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(aRockLarge, 1, 2, 0, 1),
|
||||
@@ -284,7 +284,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(70);
|
||||
|
||||
log("Creating lions...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(oLion, 0, 1, 0, 4),
|
||||
@@ -298,7 +298,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating zebras...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oZebra, 4, 6, 0, 4)],
|
||||
true,
|
||||
@@ -309,7 +309,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating wildebeest...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oWildebeest, 2, 4, 0, 4)],
|
||||
true,
|
||||
@@ -320,7 +320,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating crocodiles...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oCrocodile, 2, 3, 0, 4)],
|
||||
true,
|
||||
@@ -331,7 +331,7 @@ createObjectGroups(
|
||||
200);
|
||||
|
||||
log("Creating gazelles...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oGazelle, 4, 6, 0, 4)],
|
||||
true,
|
||||
@@ -343,7 +343,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(75);
|
||||
|
||||
log("Creating rabbits...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oRabbit, 6, 8, 0, 2)],
|
||||
true,
|
||||
@@ -354,7 +354,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating rhinos...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oRhino, 1, 1, 0, 2)],
|
||||
true,
|
||||
@@ -365,7 +365,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating elephants...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oElephant, 2, 3, 0, 4), new SimpleObject(oElephantInfant, 1, 1, 0, 4)],
|
||||
true,
|
||||
@@ -376,7 +376,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating berry bushes...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5, 7, 0, 4)],
|
||||
true,
|
||||
@@ -390,7 +390,7 @@ RMS.SetProgress(80);
|
||||
log("Creating straggler trees...");
|
||||
let treeTypes = [oToona, oBaobab, oBush, oBush];
|
||||
for (let treeType of treeTypes)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(treeType, 1, 3, 0, 3)],
|
||||
true,
|
||||
@@ -401,7 +401,7 @@ for (let treeType of treeTypes)
|
||||
RMS.SetProgress(85);
|
||||
|
||||
log("Creating small grass tufts...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(aGrassShort, 1, 2, 0, 1, -PI/8, PI/8)]),
|
||||
0,
|
||||
avoidClasses(clWater, 2, clPlayer, 13, clDirt, 0),
|
||||
@@ -409,7 +409,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(90);
|
||||
|
||||
log("Creating large grass tufts...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([
|
||||
new SimpleObject(aGrass, 2, 4, 0, 1.8, -PI/8, PI/8),
|
||||
new SimpleObject(aGrassShort, 3, 6, 1.2, 2.5, -PI/8, PI/8)
|
||||
@@ -420,7 +420,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(95);
|
||||
|
||||
log("Creating bushes...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(aBushMedium, 1, 2, 0, 2),
|
||||
@@ -432,7 +432,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating flowering shrubs...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(aShrub, 1, 1, 0, 2)]),
|
||||
0,
|
||||
avoidClasses(clWater, 1, clPlayer, 13, clDirt, 1),
|
||||
@@ -440,7 +440,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating decorative palms...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(aPalm, 1, 3, 0, 2)]),
|
||||
0,
|
||||
avoidClasses(clWater, 2, clPlayer, 12, clDirt, 1),
|
||||
@@ -448,7 +448,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating shrubs,flowers and other decorations...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(aFlower, 0, 6, 0, 2),
|
||||
|
||||
@@ -209,7 +209,7 @@ log("Creating reeds...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aReeds, 5,10, 0,4), new SimpleObject(aLillies, 0,1, 0,4)], true
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[borderClasses(clWater, 3, 0), stayClasses(clWater, 1)],
|
||||
numLakes, 100,
|
||||
waterAreas
|
||||
@@ -217,7 +217,7 @@ createObjectGroupsByAreas(group, 0,
|
||||
RMS.SetProgress(20);
|
||||
|
||||
log("Creating fish...");
|
||||
createObjectGroupsByAreas(
|
||||
createObjectGroupsByAreasDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oFish, 1,1, 0,1)],
|
||||
true, clFood
|
||||
|
||||
@@ -457,7 +457,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aTree, 1,1, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clLand, 5),
|
||||
scaleByMapSize(200, 800), 50
|
||||
|
||||
@@ -366,7 +366,7 @@ for (var i = 0; i < numPlayers; i++)
|
||||
createObjectGroup(group, 0);
|
||||
|
||||
group = new SimpleGroup([new SimpleObject(ePine, 1,3, 1,4),new SimpleObject(ePalmTall, 0,1, 1,4),new SimpleObject(eFanPalm, 0,1, 0,2)], true, clForest);
|
||||
createObjectGroups(group, 0, [avoidClasses(clBaseResource,3, clSettlement,0), stayClasses(clPlayer,1)], 150, 1000);
|
||||
createObjectGroupsDeprecated(group, 0, [avoidClasses(clBaseResource,3, clSettlement,0), stayClasses(clPlayer,1)], 150, 1000);
|
||||
}
|
||||
|
||||
RMS.SetProgress(40);
|
||||
@@ -535,14 +535,14 @@ RMS.SetProgress(65);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(eStoneMine, 1,1, 0,0),new SimpleObject(aBushB, 1,1, 2,2), new SimpleObject(aBushA, 0,2, 1,3)], true, clBaseResource);
|
||||
createObjectGroups(group, 0,[stayClasses(clCorsica, 1),avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1)], scaleByMapSize(6,25), 1000 );
|
||||
createObjectGroups(group, 0,[stayClasses(clSardinia, 1),avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1)], scaleByMapSize(6,25), 1000 );
|
||||
createObjectGroupsDeprecated(group, 0,[stayClasses(clCorsica, 1),avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1)], scaleByMapSize(6,25), 1000 );
|
||||
createObjectGroupsDeprecated(group, 0,[stayClasses(clSardinia, 1),avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1)], scaleByMapSize(6,25), 1000 );
|
||||
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(eMetalMine, 1,1, 0,0),new SimpleObject(aBushB, 1,1, 2,2), new SimpleObject(aBushA, 0,2, 1,3)], true, clBaseResource);
|
||||
createObjectGroups(group, 0,[avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1),stayClasses(clCorsica, 1)], scaleByMapSize(6,25), 1000 );
|
||||
createObjectGroups(group, 0,[avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1),stayClasses(clSardinia, 1)], scaleByMapSize(6,25), 1000 );
|
||||
createObjectGroupsDeprecated(group, 0,[avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1),stayClasses(clCorsica, 1)], scaleByMapSize(6,25), 1000 );
|
||||
createObjectGroupsDeprecated(group, 0,[avoidClasses(clWater, 3, clPlayer,2 , clBaseResource, 2,clCliffs,1),stayClasses(clSardinia, 1)], scaleByMapSize(6,25), 1000 );
|
||||
|
||||
log("Creating grass patches...");
|
||||
placer = new ClumpPlacer(20, 0.3, 0.06, 0.5);
|
||||
@@ -551,8 +551,8 @@ createAreas( placer, [painter,paintClass(clForest)], avoidClasses(clWater, 1,clP
|
||||
|
||||
log ("creating forests");
|
||||
var TreeGroup = new SimpleGroup([new SimpleObject(ePine, 3,6, 1,3),new SimpleObject(ePalmTall, 1,3, 1,3),new SimpleObject(eFanPalm, 0,2, 0,2),new SimpleObject(eApple, 0,1, 1,2)], true, clForest);
|
||||
createObjectGroups(TreeGroup, 0, [avoidClasses(clWater, 1, clForest, 0,clPlayer, 0,clBaseResource, 2,clCliffs,2), stayClasses(clCorsica, 3)], scaleByMapSize(350,2500), 100 );
|
||||
createObjectGroups(TreeGroup, 0, [avoidClasses(clWater, 1, clForest, 0,clPlayer, 0,clBaseResource, 2,clCliffs,2), stayClasses(clSardinia, 3)], scaleByMapSize(350,2500), 100 );
|
||||
createObjectGroupsDeprecated(TreeGroup, 0, [avoidClasses(clWater, 1, clForest, 0,clPlayer, 0,clBaseResource, 2,clCliffs,2), stayClasses(clCorsica, 3)], scaleByMapSize(350,2500), 100 );
|
||||
createObjectGroupsDeprecated(TreeGroup, 0, [avoidClasses(clWater, 1, clForest, 0,clPlayer, 0,clBaseResource, 2,clCliffs,2), stayClasses(clSardinia, 3)], scaleByMapSize(350,2500), 100 );
|
||||
|
||||
RMS.SetProgress(75);
|
||||
|
||||
@@ -560,7 +560,7 @@ RMS.SetProgress(75);
|
||||
// create small decorative rocks
|
||||
log("Creating small decorative rocks...");
|
||||
group = new SimpleGroup( [new SimpleObject(aRock, 1,3, 0,1),new SimpleObject(aStandingStone, 0,2, 0,3)], true );
|
||||
createObjectGroups( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0,clBaseResource, 0, clPassage, 2),
|
||||
createObjectGroupsDeprecated( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0,clBaseResource, 0, clPassage, 2),
|
||||
scaleByMapSize(16, 262), 50
|
||||
);
|
||||
|
||||
@@ -569,26 +569,26 @@ createObjectGroups( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0,
|
||||
log("Creating large decorative rocks...");
|
||||
group = new SimpleGroup( [new SimpleObject(aLargeRock, 1,2, 0,1), new SimpleObject(aRock, 1,3, 0,2)], true
|
||||
);
|
||||
createObjectGroups( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0,clBaseResource, 0, clPassage, 2),
|
||||
createObjectGroupsDeprecated( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0,clBaseResource, 0, clPassage, 2),
|
||||
scaleByMapSize(8, 131), 50
|
||||
);
|
||||
createObjectGroups( group, 0, borderClasses(clWater, 5,10), scaleByMapSize(100,800), 500);
|
||||
createObjectGroupsDeprecated( group, 0, borderClasses(clWater, 5,10), scaleByMapSize(100,800), 500);
|
||||
|
||||
// create decorative grass
|
||||
log("Creating beautification...");
|
||||
group = new SimpleGroup( [new SimpleObject(aPlantA, 3,7, 0,3),new SimpleObject(aPlantB, 3,6, 0,3),new SimpleObject(aPlantC, 1,4, 0,4)], true );
|
||||
createObjectGroups( group, 0, avoidClasses(clWater, 0,clBaseResource, 0, clShore,3), scaleByMapSize(100, 600), 50 );
|
||||
createObjectGroupsDeprecated( group, 0, avoidClasses(clWater, 0,clBaseResource, 0, clShore,3), scaleByMapSize(100, 600), 50 );
|
||||
group = new SimpleGroup( [new SimpleObject(aPlantB, 5,20, 0,5),new SimpleObject(aPlantC, 4,10, 0,4)], true );
|
||||
createObjectGroups( group, 0, avoidClasses(clWater, 0,clBaseResource, 0, clShore,3), scaleByMapSize(100, 600), 50 );
|
||||
createObjectGroupsDeprecated( group, 0, avoidClasses(clWater, 0,clBaseResource, 0, clShore,3), scaleByMapSize(100, 600), 50 );
|
||||
|
||||
RMS.SetProgress(80);
|
||||
|
||||
log("Creating animals...");
|
||||
group = new SimpleGroup( [new SimpleObject(ePig, 2,4, 0,3)] );
|
||||
createObjectGroups( group, 0, avoidClasses(clWater, 3,clBaseResource, 0), scaleByMapSize(20, 100), 50 );
|
||||
createObjectGroupsDeprecated( group, 0, avoidClasses(clWater, 3,clBaseResource, 0), scaleByMapSize(20, 100), 50 );
|
||||
|
||||
group = new SimpleGroup( [new SimpleObject(eFish, 1,2, 0,3)] );
|
||||
createObjectGroups( group, 0, [avoidClasses(clCreek,3,clShore,3),stayClasses(clWater, 3)], scaleByMapSize(50, 150), 100 );
|
||||
createObjectGroupsDeprecated( group, 0, [avoidClasses(clCreek,3,clShore,3),stayClasses(clWater, 3)], scaleByMapSize(50, 150), 100 );
|
||||
|
||||
RMS.SetProgress(90);
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ RMS.SetProgress(42);
|
||||
|
||||
log("Creating stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clForest, 1, clHill, 1, clPlayer, 5, clRock, 6)],
|
||||
scaleByMapSize(4,16), 200, areas
|
||||
);
|
||||
@@ -363,7 +363,7 @@ RMS.SetProgress(46);
|
||||
|
||||
log("Creating small stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clForest, 1, clHill, 1, clPlayer, 5, clRock, 2)],
|
||||
scaleByMapSize(4,16), 200, areas
|
||||
);
|
||||
@@ -371,7 +371,7 @@ RMS.SetProgress(50);
|
||||
|
||||
log("Creating metal mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clForest, 1, clHill, 1, clPlayer, 5, clMetal, 6, clRock, 6)],
|
||||
scaleByMapSize(4,16), 200, areas
|
||||
);
|
||||
@@ -409,7 +409,7 @@ RMS.SetProgress(62);
|
||||
|
||||
log("Creating straggler trees...");
|
||||
for (let tree of [oCarob, oBeech, oLombardyPoplar, oLombardyPoplar, oPine])
|
||||
createObjectGroupsByAreas(
|
||||
createObjectGroupsByAreasDeprecated(
|
||||
new SimpleGroup([new SimpleObject(tree, 1,1, 0,1)], true, clForest),
|
||||
0,
|
||||
avoidClasses(clWater, 2, clForest, 2, clCity, 3, clBaseResource, 1, clRock, 6, clMetal, 6, clPlayer, 1, clHill, 1),
|
||||
@@ -422,7 +422,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oCypress2, 1,3, 0,3), new SimpleObject(oCypress1, 0,2, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clForest, 2, clCity, 3, clBaseResource, 1, clRock, 6, clMetal, 6, clPlayer, 1, clHill, 1),
|
||||
scaleByMapSize(5, 75), 50, areas
|
||||
);
|
||||
@@ -433,7 +433,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDateS, 1,3, 0,3), new SimpleObject(oDateT, 0,2, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clForest, 1, clCity, 0, clBaseResource, 1, clRock, 6, clMetal, 6, clPlayer, 1, clHill, 1),
|
||||
scaleByMapSize(5, 75), 50, areas
|
||||
);
|
||||
@@ -444,7 +444,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockSmall, 0,3, 0,2), new SimpleObject(aRockMed, 0,2, 0,2),
|
||||
new SimpleObject(aRockLarge, 0,1, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clCity, 0),
|
||||
scaleByMapSize(30, 180), 50
|
||||
);
|
||||
@@ -455,7 +455,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clForest, 1, clHill, 1, clCity, 10, clMetal, 6, clRock, 2, clFood, 8),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -463,7 +463,7 @@ RMS.SetProgress(82);
|
||||
|
||||
log("Creating berry bushes...");
|
||||
group = new SimpleGroup([new SimpleObject(oBerryBush, 5,7, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clForest, 1, clHill, 1, clCity, 10, clMetal, 6, clRock, 2, clFood, 8),
|
||||
1.5 * numPlayers, 100
|
||||
);
|
||||
@@ -471,7 +471,7 @@ RMS.SetProgress(86);
|
||||
|
||||
log("Creating Fish...");
|
||||
group = new SimpleGroup([new SimpleObject(oFish, 1,1, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[stayClasses(clWater,1),avoidClasses(clFood, 8)],
|
||||
scaleByMapSize(40,200), 100
|
||||
);
|
||||
@@ -479,7 +479,7 @@ RMS.SetProgress(90);
|
||||
|
||||
log("Creating Whales...");
|
||||
group = new SimpleGroup([new SimpleObject(oWhale, 1,1, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[stayClasses(clWater,1),avoidClasses(clFood, 8, clPlayer,4,clIsland,4)],
|
||||
scaleByMapSize(10,40), 100
|
||||
);
|
||||
@@ -487,7 +487,7 @@ RMS.SetProgress(94);
|
||||
|
||||
log("Creating shipwrecks...");
|
||||
group = new SimpleGroup([new SimpleObject(oShipwreck, 1,1, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[stayClasses(clWater,1),avoidClasses(clFood, 8)],
|
||||
scaleByMapSize(6,16), 100
|
||||
);
|
||||
@@ -495,7 +495,7 @@ RMS.SetProgress(98);
|
||||
|
||||
log("Creating shipwreck debris...");
|
||||
group = new SimpleGroup([new SimpleObject(oShipDebris, 1,2, 0,4)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[stayClasses(clWater,1),avoidClasses(clFood, 8)],
|
||||
scaleByMapSize(10,20), 100
|
||||
);
|
||||
|
||||
@@ -528,7 +528,7 @@ log("Paint seabed...");
|
||||
paintTerrainBasedOnHeight(-20, -3, 3, tSeaDepths);
|
||||
|
||||
log("Creating island metal mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal),
|
||||
0,
|
||||
[avoidClasses(clMetal, 50, clRock, 10), stayClasses(clIsland, 5)],
|
||||
@@ -536,7 +536,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating island stone mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oStoneLarge, 1, 1, 0, 4)], true, clRock),
|
||||
0,
|
||||
[avoidClasses(clMetal, 10, clRock, 50), stayClasses(clIsland, 5)],
|
||||
@@ -545,7 +545,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(65);
|
||||
|
||||
log("Creating island towers...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oTower, 1, 1, 0, 4)], true, clTower),
|
||||
0,
|
||||
[avoidClasses(clMetal, 4, clRock, 4, clTower, 20), stayClasses(clIsland, 7)],
|
||||
@@ -553,7 +553,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating island outposts...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oOutpost, 1, 1, 0, 4)], true, clOutpost),
|
||||
0,
|
||||
[avoidClasses(clMetal, 4, clRock, 4, clTower, 5, clOutpost, 20), stayClasses(clIsland, 7)],
|
||||
@@ -561,7 +561,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating metal mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal),
|
||||
0,
|
||||
[avoidClasses(clForest, 4, clBaseResource, 20, clMetal, 50, clRock, 20, clWater, 4, clHill, 4, clGauls, 5, clPath, 5)],
|
||||
@@ -569,7 +569,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating stone mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oStoneLarge, 1, 1, 0, 4)], true, clRock),
|
||||
0,
|
||||
[avoidClasses(clForest, 4, clBaseResource, 20, clMetal, 20, clRock, 50, clWater, 4, clHill, 4, clGauls, 5, clPath, 5)],
|
||||
@@ -577,7 +577,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating stone ruins...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oStoneRuins, 1, 1, 0, 4)], true, clRock),
|
||||
0,
|
||||
[avoidClasses(clForest, 2, clPlayer, 12, clMetal, 6, clRock, 25, clWater, 4, clHill, 4, clGauls, 5, clPath, 1)],
|
||||
@@ -714,7 +714,7 @@ RMS.SetProgress(98);
|
||||
|
||||
log("Creating treasures...");
|
||||
for (let i = 0; i < randomTreasureCount; ++i)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(pickRandom(oTreasures), 1, 1, 0, 2)],
|
||||
true, clTreasure
|
||||
@@ -747,7 +747,7 @@ createDecoration(
|
||||
);
|
||||
|
||||
log("Creating spawn points for ships...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(triggerPointShipSpawn, 1, 1, 0, 0)], true, clShip),
|
||||
0,
|
||||
[avoidClasses(clShip, 5, clIsland, 4), stayClasses(clWater, 10)],
|
||||
@@ -756,7 +756,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating patrol points for ships...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(triggerPointShipPatrol, 1, 1, 0, 0)], true, clShipPatrol),
|
||||
0,
|
||||
[avoidClasses(clShipPatrol, 5, clIsland, 3), stayClasses(clWater, 4)],
|
||||
@@ -766,7 +766,7 @@ createObjectGroups(
|
||||
|
||||
log("Creating ungarrison points for ships...");
|
||||
for (let i = 0; i < 2; ++i)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(
|
||||
i == 0 ? triggerPointShipUnloadLeft : triggerPointShipUnloadRight,
|
||||
@@ -784,7 +784,7 @@ log("Creating patrol points for land attackers...");
|
||||
addToClass(mapSize/2, mapSize/2, clMiddle);
|
||||
for (let i = 0; i < 2; ++i)
|
||||
{
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(
|
||||
i == 0 ? triggerPointLandPatrolLeft : triggerPointLandPatrolRight,
|
||||
@@ -802,7 +802,7 @@ for (let i = 0; i < 2; ++i)
|
||||
);
|
||||
|
||||
if (gallicCC)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(
|
||||
i == 0 ? triggerPointCCAttackerPatrolLeft : triggerPointCCAttackerPatrolRight,
|
||||
@@ -831,7 +831,7 @@ for (let i = 0; i < 2; ++i)
|
||||
}
|
||||
|
||||
log("Creating water logs...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(aWaterLog, 1, 1, 0, 0)], true, clWaterLog),
|
||||
0,
|
||||
[avoidClasses(clShip, 3, clIsland, 4), stayClasses(clWater, 4)],
|
||||
|
||||
@@ -285,7 +285,7 @@ createLayeredPatches(
|
||||
RMS.SetProgress(50);
|
||||
|
||||
log("Creating stone mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(oStoneSmall, 0, 2, 0, 4),
|
||||
@@ -308,7 +308,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(55);
|
||||
|
||||
log("Creating small stone quarries...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oStoneSmall, 2, 5, 1, 3)], true, clRock),
|
||||
0,
|
||||
[
|
||||
@@ -325,7 +325,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(60);
|
||||
|
||||
log("Creating metal mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal),
|
||||
0,
|
||||
[
|
||||
@@ -343,7 +343,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(65);
|
||||
|
||||
log("Creating towers...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oTower, 1, 1, 0, 4)], true, clTower),
|
||||
0,
|
||||
[
|
||||
@@ -464,7 +464,7 @@ log("Creating straggler trees and bushes...");
|
||||
var types = [oTree, oTree2, oTree3, oTree4, oBush];
|
||||
var num = Math.floor(numStragglers / types.length);
|
||||
for (let type of types)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(type, 1, 1, 0, 3)],
|
||||
true,
|
||||
@@ -484,7 +484,7 @@ for (let type of types)
|
||||
RMS.SetProgress(90);
|
||||
|
||||
log("Creating straggler bushes...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oBush, 1, 3, 0, 3)],
|
||||
true,
|
||||
@@ -504,7 +504,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(95);
|
||||
|
||||
log("Creating rain drops...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(aRain, 2, 2, 1, 4)],
|
||||
true,
|
||||
|
||||
@@ -296,7 +296,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2, 3, 0, 2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill, 10, clFood, 20),
|
||||
10 * numPlayers, 60
|
||||
);
|
||||
@@ -411,7 +411,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1, 2, 0, 1, -PI / 8, PI / 8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clMountain, 2, clPlayer, 2, clDirt, 0), stayClasses(clHill, 8)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
|
||||
@@ -202,7 +202,7 @@ log("Creating reeds...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aReeds, 5,10, 0,4), new SimpleObject(aLillies, 0,1, 0,4)], true
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
[borderClasses(clWater, 3, 0), stayClasses(clWater, 1)],
|
||||
numLakes, 100,
|
||||
waterAreas
|
||||
@@ -210,7 +210,7 @@ createObjectGroupsByAreas(group, 0,
|
||||
RMS.SetProgress(25);
|
||||
|
||||
log("Creating fish...");
|
||||
createObjectGroupsByAreas(
|
||||
createObjectGroupsByAreasDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oFish, 1,1, 0,1)],
|
||||
true, clFood
|
||||
|
||||
@@ -405,7 +405,7 @@ createMines(
|
||||
);
|
||||
|
||||
log("Creating fish...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oFish, 1,1, 0,3)], true, clFood),
|
||||
0,
|
||||
[stayClasses(clWater, 8), avoidClasses(clFood, 14)],
|
||||
|
||||
@@ -239,7 +239,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[stayClasses(clWater, 2), avoidClasses(clFood, 3)],
|
||||
numPlayers, 50
|
||||
);
|
||||
@@ -373,14 +373,14 @@ RMS.SetProgress(80);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 20, clRock, 10, clSea, 2, clHill, 2)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 20, clRock, 10, clSea, 2, clHill, 2)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -388,7 +388,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clSea, 0, clHill, 2)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -401,7 +401,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0, clSea, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -415,7 +415,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0, clSea, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -428,7 +428,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 0, clFood, 5, clSea, 0, clFlatlands, 0),
|
||||
6 * numPlayers, 50
|
||||
);
|
||||
@@ -440,7 +440,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGoat, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 0, clFood, 20, clSea, 0),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -451,7 +451,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 6, clForest, 0, clPlayer, 20, clHill, 1, clFood, 10),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -462,7 +462,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBoar, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 0, clFood, 20, clSea, 0, clFlatlands, 0),
|
||||
2 * numPlayers, 50
|
||||
);
|
||||
@@ -478,7 +478,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clForest, 1, clHill, 1, clPlayer, 10, clMetal, 6, clRock, 6, clSea, 1, clHighlands, 25),
|
||||
num
|
||||
);
|
||||
@@ -490,7 +490,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 2, clPlayer, 2, clDirt, 0, clSea, 1),
|
||||
scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -501,7 +501,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0, clSea, 1),
|
||||
scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -513,7 +513,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clHill, 1, clPlayer, 1, clDirt, 1, clSea, 1),
|
||||
scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -187,7 +187,7 @@ for (let i = 0; i < scaleByMapSize(12, 30); ++i)
|
||||
}
|
||||
|
||||
log("Creating metal mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal),
|
||||
0,
|
||||
avoidClasses(clPlayer, 20, clMetal, 10, clRock, 8, clWater, 4),
|
||||
@@ -196,7 +196,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(65);
|
||||
|
||||
log("Creating small decorative rocks...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(aRock, 1, 3, 0, 3)],
|
||||
true
|
||||
@@ -208,7 +208,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(70);
|
||||
|
||||
log("Creating boar...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oBoar, 1, 2, 0, 4)],
|
||||
true, clFood
|
||||
@@ -219,7 +219,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating tigers...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oTiger, 2, 2, 0, 4)],
|
||||
true, clFood
|
||||
@@ -230,7 +230,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating crocodiles...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oCrocodile, 2, 4, 0, 4)],
|
||||
true, clFood
|
||||
@@ -240,7 +240,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating elephants...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(oElephant, 2, 4, 0, 4),
|
||||
@@ -254,7 +254,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating rabbits...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oRabbit, 5, 6, 0, 4)],
|
||||
true, clFood
|
||||
@@ -275,7 +275,7 @@ createFood(
|
||||
);
|
||||
|
||||
log("Creating berry bush...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5, 7, 0, 4)],
|
||||
true, clFood
|
||||
@@ -287,7 +287,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(85);
|
||||
|
||||
log("Creating trees...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(oTree, 1, 7, 0, 3)],
|
||||
true, clForest
|
||||
@@ -298,7 +298,7 @@ createObjectGroups(
|
||||
);
|
||||
|
||||
log("Creating large grass tufts...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(aBush, 2, 4, 0, 1.8, -PI/8, PI/8)]
|
||||
),
|
||||
|
||||
@@ -423,7 +423,7 @@ if (random_terrain == g_BiomeDesert)
|
||||
[new SimpleObject(oObelisk, 1, 1, 0, 1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clBaseResource, 0, clHill, 0, clRock, 0, clMetal, 0, clFood, 0), stayClasses(clLand, 1)],
|
||||
scaleByMapSize(3, 8), 1000
|
||||
@@ -468,7 +468,7 @@ let group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1, 3, 0, 1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clHill, 0), stayClasses(clLand, 2)],
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -479,7 +479,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1, 2, 0, 1), new SimpleObject(aRockMedium, 1, 3, 0, 2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clHill, 0), stayClasses(clLand, 2)],
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -490,7 +490,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2, 3, 0, 2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clLand, 4, clFood, 20),
|
||||
25 * numPlayers, 60
|
||||
);
|
||||
@@ -500,7 +500,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oWhale, 1, 1, 0, 3)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clLand, 4),avoidClasses(clFood, 8)],
|
||||
scaleByMapSize(5, 20), 100
|
||||
);
|
||||
@@ -510,7 +510,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oShipwreck, 1, 1, 0, 1)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clLand, 4),avoidClasses(clFood, 8)],
|
||||
scaleByMapSize(12, 16), 100
|
||||
);
|
||||
@@ -520,7 +520,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oShipDebris, 1, 1, 0, 1)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clLand, 4),avoidClasses(clFood, 8)],
|
||||
scaleByMapSize(10, 20), 100
|
||||
);
|
||||
@@ -532,7 +532,7 @@ let planetm = random_terrain == 7 ? 8 : 1;
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1, 2, 0, 1, -PI / 8, PI / 8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 0), stayClasses(clLand, 3)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -543,7 +543,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2, 4, 0, 1.8, -PI / 8, PI / 8), new SimpleObject(aGrassShort, 3, 6, 1.2,2.5, -PI / 8, PI / 8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), stayClasses(clLand, 5)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
|
||||
@@ -411,14 +411,14 @@ RMS.SetProgress(55);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 0, clRock, 10, clHill, 1), stayClasses(clLand, 5)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 0, clRock, 10, clHill, 1), stayClasses(clLand, 5)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -426,7 +426,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 0, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 5)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -439,7 +439,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 5)],
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -452,7 +452,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 5)],
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -466,7 +466,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oMainHuntableAnimal, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 1, clFood, 20), stayClasses(clLand, 5)],
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -479,7 +479,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSecondaryHuntableAnimal, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 1, clFood, 20), stayClasses(clLand, 5)],
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -490,7 +490,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFruitBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 8, clHill, 1, clFood, 20), stayClasses(clLand, 5)],
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -501,7 +501,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clLand, 4, clForest, 2, clPlayer, 2, clHill, 2, clFood, 20),
|
||||
25 * numPlayers, 60
|
||||
);
|
||||
@@ -519,7 +519,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clHill, 1, clPlayer, 0, clMetal, 6, clRock, 6), stayClasses(clLand, 6)],
|
||||
num
|
||||
);
|
||||
@@ -534,7 +534,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 0), stayClasses(clLand, 6)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -546,7 +546,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), stayClasses(clLand, 5)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -558,7 +558,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 1, clPlayer, 1, clDirt, 1), stayClasses(clLand, 6)],
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -315,14 +315,14 @@ for (var i = 0; i < sizes.length; i++)
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -330,7 +330,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -341,7 +341,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
3*scaleByMapSize(16, 262), 50
|
||||
@@ -354,7 +354,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
3*scaleByMapSize(8, 131), 50
|
||||
@@ -365,7 +365,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBush1, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 2, clPlayer, 2, clDirt, 0),
|
||||
8 * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -377,7 +377,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBush2, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aBush1, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0),
|
||||
8 * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -389,7 +389,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBush3, 1,2, 0,2), new SimpleObject(aBush2, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clHill, 1, clPlayer, 1, clDirt, 1),
|
||||
8 * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
@@ -406,7 +406,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clForest, 1, clHill, 1, clPlayer, 12, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -418,7 +418,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 10, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -431,7 +431,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 6, clForest, 0, clPlayer, 20, clHill, 1, clFood, 10),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -442,7 +442,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSheep, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 22, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -453,7 +453,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clFood, 20), stayClasses(clWater, 6)],
|
||||
25 * numPlayers, 60
|
||||
);
|
||||
|
||||
@@ -430,7 +430,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aBushSmall, 0,2, 0,2), new SimpleObject(aBushSmallDry, 0,2, 0,2),
|
||||
new SimpleObject(aBushMed, 0,1, 0,2), new SimpleObject(aBushMedDry, 0,1, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 4, clCliff, 2),
|
||||
scaleByMapSize(9, 146), 50
|
||||
);
|
||||
@@ -441,7 +441,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockSmall, 0,3, 0,2), new SimpleObject(aRockMed, 0,2, 0,2),
|
||||
new SimpleObject(aRockLarge, 0,1, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clCliff, 1),
|
||||
scaleByMapSize(9, 146), 50
|
||||
);
|
||||
@@ -449,20 +449,20 @@ RMS.SetProgress(50);
|
||||
|
||||
log("Creating large stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clForest, 4, clPlayer, 40, clRock, 60, clMetal, 10, clCliff, 3),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
log("Creating small stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 4, clWater, 1, clPlayer, 40, clRock, 30, clMetal, 10, clCliff, 3),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
log("Creating metal mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,2)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 4, clWater, 1, clPlayer, 40, clMetal, 50, clCliff, 3),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -472,7 +472,7 @@ log("Creating straggler trees...");
|
||||
for (let tree of [oCarob, oBeech, oLombardyPoplar, oLombardyPoplar, oPine])
|
||||
{
|
||||
group = new SimpleGroup([new SimpleObject(tree, 1,1, 0,1)], true, clForest);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clCliff, 4, clForest, 2, clPlayer, 15, clMetal, 6, clRock, 6),
|
||||
scaleByMapSize(2, 38), 50
|
||||
);
|
||||
@@ -484,7 +484,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oCypress2, 1,3, 0,3), new SimpleObject(oCypress1, 0,2, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clCliff, 4, clForest, 2, clPlayer, 15, clMetal, 6, clRock, 6),
|
||||
scaleByMapSize(5, 75), 50
|
||||
);
|
||||
@@ -492,7 +492,7 @@ RMS.SetProgress(80);
|
||||
|
||||
log("Creating sheep...");
|
||||
group = new SimpleGroup([new SimpleObject(oSheep, 2,4, 0,2)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clForest, 2, clCliff, 1, clPlayer, 20, clMetal, 6, clRock, 6, clFood, 8),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -528,7 +528,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clForest, 2, clCliff, 1, clPlayer, 20, clMetal, 6, clRock, 6, clFood, 8),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -536,7 +536,7 @@ RMS.SetProgress(95);
|
||||
|
||||
log("Creating berry bushes...");
|
||||
group = new SimpleGroup([new SimpleObject(oBerryBush, 5,7, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clForest, 2, clCliff, 1, clPlayer, 20, clMetal, 6, clRock, 6, clFood, 8),
|
||||
1.5 * numPlayers, 100
|
||||
);
|
||||
|
||||
@@ -348,14 +348,14 @@ RMS.SetProgress(80);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 15, clRock, 10, clHill, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 15, clRock, 10, clHill, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -363,7 +363,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 15, clMetal, 10, clRock, 5, clHill, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -376,7 +376,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -389,7 +389,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -402,7 +402,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 15, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -414,7 +414,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oRabbit, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 15, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -425,7 +425,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 15, clHill, 1, clFood, 10),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -440,7 +440,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clForest, 7, clHill, 1, clPlayer, 5, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -451,7 +451,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 2, clPlayer, 2, clDirt, 0),
|
||||
scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -462,7 +462,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0),
|
||||
scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -473,7 +473,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clHill, 1, clPlayer, 1, clDirt, 1),
|
||||
scaleByMapSize(13, 200), 50
|
||||
);
|
||||
@@ -483,7 +483,7 @@ log("Creating shallow flora...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aLillies, 1,2, 0,2), new SimpleObject(aReeds, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clShallow, 1),
|
||||
60 * scaleByMapSize(13, 200), 80
|
||||
);
|
||||
|
||||
@@ -281,7 +281,7 @@ addElements(shuffleArray([
|
||||
RMS.SetProgress(80);
|
||||
|
||||
log("Adding reeds...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(g_Decoratives.reeds, 5, 12, 1, 2),
|
||||
|
||||
@@ -342,7 +342,7 @@ RMS.SetProgress(46);
|
||||
|
||||
log("Creating stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1), stayClasses(clLand, 7)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -350,7 +350,7 @@ RMS.SetProgress(50);
|
||||
|
||||
log("Creating small stone quarries...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1), stayClasses(clLand, 7)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -359,7 +359,7 @@ RMS.SetProgress(54);
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 7)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -371,7 +371,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 6)],
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -384,7 +384,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 6)],
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -396,7 +396,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oMainHuntableAnimal, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), stayClasses(clLand, 7)],
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -407,7 +407,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSecondaryHuntableAnimal, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), stayClasses(clLand, 7)],
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -418,14 +418,14 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFruitBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 8, clHill, 1, clFood, 20), stayClasses(clLand, 7)],
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
RMS.SetProgress(78);
|
||||
|
||||
log("Creating fish...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oFish, 2,3, 0,2)], true, clFood),
|
||||
0,
|
||||
avoidClasses(clLand, 2, clPlayer, 2, clHill, 0, clFood, 20),
|
||||
@@ -442,7 +442,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clHill, 1, clPlayer, 9, clMetal, 6, clRock, 6), stayClasses(clLand, 9)],
|
||||
num
|
||||
);
|
||||
@@ -455,7 +455,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 0), stayClasses(clLand, 6)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -465,7 +465,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), stayClasses(clLand, 6)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -475,7 +475,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 1, clPlayer, 1, clDirt, 1), stayClasses(clLand, 6)],
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -275,7 +275,7 @@ group = new SimpleGroup(
|
||||
[new RandomObject([aDecorativeRock, aBush2, aBush3], 3,8, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
borderClasses(clHill1, 0, 3),
|
||||
scaleByMapSize(40,200), 50,
|
||||
hillAreas
|
||||
@@ -306,8 +306,7 @@ terrainPainter = new LayeredPainter(
|
||||
elevationPainter = new SmoothElevationPainter(ELEVATION_MODIFY, 16, 1);
|
||||
createAreas(placer, [terrainPainter, elevationPainter],
|
||||
[stayClasses(clHill1, 0)],
|
||||
scaleByMapSize(15,25), 50,
|
||||
hillAreas
|
||||
scaleByMapSize(15,25), 50
|
||||
);
|
||||
RMS.SetProgress(60);
|
||||
|
||||
@@ -346,20 +345,20 @@ RMS.SetProgress(70);
|
||||
|
||||
log("Creating stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill1, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill1, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
log("Creating metal mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clHill1, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -368,21 +367,21 @@ RMS.SetProgress(80);
|
||||
|
||||
log("Creating gazelles...");
|
||||
group = new SimpleGroup([new SimpleObject(oGazelle, 5,7, 0,4)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 5, clHill1, 1, clFood, 10),
|
||||
scaleByMapSize(5,20), 50
|
||||
);
|
||||
|
||||
log("Creating goats...");
|
||||
group = new SimpleGroup([new SimpleObject(oGoat, 2,4, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 5, clHill1, 1, clFood, 10),
|
||||
scaleByMapSize(5,20), 50
|
||||
);
|
||||
|
||||
log("Creating camels...");
|
||||
group = new SimpleGroup([new SimpleObject(oCamel, 2,4, 0,2)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 5, clHill1, 1, clFood, 10),
|
||||
scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -394,7 +393,7 @@ var num = floor(numStragglers / types.length);
|
||||
for (var i = 0; i < types.length; ++i)
|
||||
{
|
||||
group = new SimpleGroup([new SimpleObject(types[i], 1,1, 0,0)], true);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clHill1, 1, clPlayer, 4, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -403,14 +402,14 @@ RMS.SetProgress(90);
|
||||
|
||||
log("Creating bushes...");
|
||||
group = new SimpleGroup([new RandomObject(aBushes, 2,3, 0,2)]);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill1, 1, clPlayer, 0, clForest, 0),
|
||||
scaleByMapSize(16, 262)
|
||||
);
|
||||
|
||||
log("Creating more decorative rocks...");
|
||||
group = new SimpleGroup([new SimpleObject(aDecorativeRock, 1,2, 0,2)]);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clHill1, 1, clPlayer, 0, clForest, 0),
|
||||
scaleByMapSize(16, 262)
|
||||
);
|
||||
|
||||
@@ -293,7 +293,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
log("Creating iceberg...");
|
||||
// create iceberg
|
||||
group = new SimpleGroup([new SimpleObject(aIceberg, 0,2, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clRock, 6), stayClasses(clWater, 4)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -336,14 +336,14 @@ for (var i = 0; i < sizes.length; i++)
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(8,32), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(8,32), 100
|
||||
);
|
||||
@@ -351,7 +351,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1),
|
||||
scaleByMapSize(8,32), 100
|
||||
);
|
||||
@@ -369,7 +369,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clForest, 1, clHill, 1, clPlayer, 12, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -381,7 +381,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oWalrus, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -394,7 +394,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oWolf, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -405,7 +405,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clFood, 20), stayClasses(clWater, 6)],
|
||||
25 * numPlayers, 60
|
||||
);
|
||||
|
||||
@@ -258,13 +258,13 @@ if (mapSize > 150 && randBool())
|
||||
}
|
||||
log("Creating some straggler trees around the Passage...");
|
||||
group = new SimpleGroup([new SimpleObject(ePalmTall, 1,1, 0,0),new SimpleObject(ePalmShort, 1,2, 1,2), new SimpleObject(aBushA, 0,2, 1,3)], true, clForest);
|
||||
createObjectGroups(group, 0, stayClasses(clPassage,1), scaleByMapSize(60,250), 100 );
|
||||
createObjectGroupsDeprecated(group, 0, stayClasses(clPassage,1), scaleByMapSize(60,250), 100 );
|
||||
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(eStoneMine, 1,1, 0,0),new SimpleObject(ePalmShort, 1,2, 3,3),new SimpleObject(ePalmTall, 0,1, 3,3)
|
||||
,new SimpleObject(aBushB, 1,1, 2,2), new SimpleObject(aBushA, 0,2, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 10, clForest, 1, clPlayer, 30, clRock, 10,clBaseResource, 2, clHill, 1),
|
||||
scaleByMapSize(6,25), 100
|
||||
);
|
||||
@@ -273,7 +273,7 @@ log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(eMetalMine, 1,1, 0,0),new SimpleObject(ePalmShort, 1,2, 2,3),new SimpleObject(ePalmTall, 0,1, 2,2)
|
||||
,new SimpleObject(aBushB, 1,1, 2,2), new SimpleObject(aBushA, 0,2, 1,3)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 10, clForest, 1, clPlayer, 30, clMetal, 10,clBaseResource, 2, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(6,25), 100
|
||||
);
|
||||
@@ -281,7 +281,7 @@ RMS.SetProgress(65);
|
||||
|
||||
log("Creating small decorative rocks...");
|
||||
group = new SimpleGroup( [new SimpleObject(aRock, 2,4, 0,2)], true, undefined );
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), 30, scaleByMapSize(10,50) );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), 30, scaleByMapSize(10,50) );
|
||||
|
||||
RMS.SetProgress(70);
|
||||
// create deer
|
||||
@@ -290,7 +290,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(eCamel, 1,2, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 10, clHill, 1, clFood, 20),
|
||||
1 * numPlayers, 50
|
||||
);
|
||||
@@ -303,7 +303,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(eGazelle, 2,4, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 10, clHill, 1, clFood, 20),
|
||||
1 * numPlayers, 50
|
||||
);
|
||||
@@ -330,7 +330,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(rba1, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 2, clPlayer, 2, clDirt, 0),
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -344,7 +344,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushB, 1,2, 0,2), new SimpleObject(aBushA, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 1, clPlayer, 1, clPassage, 1),
|
||||
scaleByMapSize(10, 40), 20
|
||||
);
|
||||
|
||||
@@ -291,14 +291,14 @@ RMS.SetProgress(50);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1, clCP, 1)],
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1, clCP, 1)],
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
@@ -306,7 +306,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clHill, 1, clCP, 1)],
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
@@ -315,14 +315,14 @@ createObjectGroups(group, 0,
|
||||
log("Creating centeral stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clCP, 6),
|
||||
5*scaleByMapSize(5,30), 50
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clCP, 6),
|
||||
5*scaleByMapSize(5,30), 50
|
||||
);
|
||||
@@ -330,7 +330,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating centeral metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clCP, 6),
|
||||
5*scaleByMapSize(5,30), 50
|
||||
);
|
||||
@@ -343,7 +343,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aDecorativeRock, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -357,7 +357,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aBush2, 1,2, 0,1), new SimpleObject(aBush1, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -371,7 +371,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGoat, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 1, clHill, 1, clFood, 20, clCP, 2),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -382,7 +382,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSheep, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 1, clHill, 1, clFood, 20, clCP, 2),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -393,7 +393,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGrapesBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clHill, 1, clFood, 10, clCP, 2),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -404,7 +404,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oCamel, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clCP, 2),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -422,7 +422,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clHill, 1, clPlayer, 1, clMetal, 6, clRock, 6, clCP, 2),
|
||||
num
|
||||
);
|
||||
|
||||
@@ -331,14 +331,14 @@ createAreas(
|
||||
log("Creating cyprus stone mines...");
|
||||
// create cyprus large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clIsland, 9),
|
||||
14 * scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create cyprus small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clIsland, 9),
|
||||
14 * scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -346,7 +346,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating cyprus metal mines...");
|
||||
// create cyprus large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clIsland, 9),
|
||||
14 * scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -354,14 +354,14 @@ createObjectGroups(group, 0,
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clWater, 3, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clWater, 3, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -369,7 +369,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clWater, 3, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -382,7 +382,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aDecorativeRock, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 1, clForest, 0, clPlayer, 0, clHill, 1),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -395,7 +395,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aBush2, 1,2, 0,1), new SimpleObject(aBush1, 1,3, 0,2), new SimpleObject(aBush4, 1,2, 0,1), new SimpleObject(aBush3, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 3, clPlayer, 0, clHill, 1),
|
||||
scaleByMapSize(40, 360), 50
|
||||
@@ -406,7 +406,7 @@ RMS.SetProgress(70);
|
||||
// create fish
|
||||
log("Creating fish...");
|
||||
group = new SimpleGroup([new SimpleObject(oFish, 1,3, 2,6)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clIsland, 2, clFood, 10), stayClasses(clWater, 5)],
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -414,7 +414,7 @@ createObjectGroups(group, 0,
|
||||
// create sheeps
|
||||
log("Creating sheeps...");
|
||||
group = new SimpleGroup([new SimpleObject(oSheep, 5,7, 0,4)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 7, clWater, 3, clFood, 10, clHill, 1),
|
||||
scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -422,7 +422,7 @@ createObjectGroups(group, 0,
|
||||
// create goats
|
||||
log("Creating goats...");
|
||||
group = new SimpleGroup([new SimpleObject(oGoat, 2,4, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 7, clWater, 3, clFood, 10, clHill, 1),
|
||||
scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -430,7 +430,7 @@ createObjectGroups(group, 0,
|
||||
// create deers
|
||||
log("Creating deers...");
|
||||
group = new SimpleGroup([new SimpleObject(oDeer, 2,4, 0,2)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 7, clWater, 3, clFood, 10, clHill, 1),
|
||||
scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -441,7 +441,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGrapeBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 15, clHill, 1, clFood, 7),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -455,7 +455,7 @@ var num = floor(numStragglers / types.length);
|
||||
for (var i = 0; i < types.length; ++i)
|
||||
{
|
||||
group = new SimpleGroup([new SimpleObject(types[i], 1,1, 0,0)], true);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clWater, 1, clPlayer, 8, clMetal, 6, clHill, 1),
|
||||
num
|
||||
);
|
||||
@@ -467,7 +467,7 @@ var num = 3*floor(numStragglers / types.length);
|
||||
for (var i = 0; i < types.length; ++i)
|
||||
{
|
||||
group = new SimpleGroup([new SimpleObject(types[i], 1,1, 0,0)], true);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clIsland, 9),
|
||||
num
|
||||
);
|
||||
|
||||
@@ -315,7 +315,7 @@ createFood(
|
||||
RMS.SetProgress(85);
|
||||
|
||||
// Create trigger points where wolves spawn
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject("special/trigger_point_A", 1, 1, 0, 0)], true, clWolf),
|
||||
0,
|
||||
avoidClasses(clWater, 2, clMetal, 4, clRock, 4, clPlayer, 15, clHill, 2, clWolf, 20),
|
||||
|
||||
@@ -251,7 +251,7 @@ for (let smoke of smokeActors)
|
||||
RMS.SetProgress(70);
|
||||
|
||||
log("Adding gatherable stone ruins...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject("gaia/special_ruins_stone_statues_roman", 1, 1, 1, 4)],
|
||||
true,
|
||||
@@ -272,7 +272,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(75);
|
||||
|
||||
log("Adding stone ruins...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject("other/unfinished_greek_temple", 0, 1, 1, 4),
|
||||
@@ -304,7 +304,7 @@ var shipwrecks = [
|
||||
"barrels_floating"
|
||||
].map(shipwreck => new SimpleObject("actor|props/special/eyecandy/" + shipwreck + ".xml", 0, 1, 1, 20));
|
||||
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(shipwrecks, true, g_TileClasses.decorative),
|
||||
0,
|
||||
[
|
||||
@@ -326,7 +326,7 @@ var ruins = [
|
||||
"vase_rome_a"
|
||||
].map(ruin => new SimpleObject("actor|props/special/eyecandy/" + ruin + ".xml", 0, 1, 1, 20));
|
||||
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(ruins, true, g_TileClasses.decorative),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -343,7 +343,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(90);
|
||||
|
||||
log("Adding bodies...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject("actor|props/special/eyecandy/skeleton.xml", 3, 10, 1, 7)],
|
||||
true,
|
||||
|
||||
@@ -586,7 +586,7 @@ log("Creating lone trees...");
|
||||
var num = scaleByMapSize(80,400);
|
||||
|
||||
var group = new SimpleGroup([new SimpleObject(oPine, 1,2, 1,3),new SimpleObject(oBeech, 1,2, 1,3)], true, clForest);
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 8,clPyrenneans, 1), num, 20 );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 8,clPyrenneans, 1), num, 20 );
|
||||
|
||||
// Painting
|
||||
log("Painting the map");
|
||||
@@ -694,62 +694,62 @@ RMS.SetProgress(70);
|
||||
// making more in dirt areas so as to appear different
|
||||
log("Creating small grass tufts...");
|
||||
var group = new SimpleGroup( [new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)] );
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 2, clHill, 2, clPlayer, 5, clDirt, 0, clPyrenneans,2), scaleByMapSize(13, 200) );
|
||||
createObjectGroups(group, 0, stayClasses(clDirt,1), scaleByMapSize(13, 200),10);
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 2, clHill, 2, clPlayer, 5, clDirt, 0, clPyrenneans,2), scaleByMapSize(13, 200) );
|
||||
createObjectGroupsDeprecated(group, 0, stayClasses(clDirt,1), scaleByMapSize(13, 200),10);
|
||||
|
||||
log("Creating large grass tufts...");
|
||||
group = new SimpleGroup( [new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)] );
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clHill, 2, clPlayer, 5, clDirt, 1, clForest, 0, clPyrenneans,2), scaleByMapSize(13, 200) );
|
||||
createObjectGroups(group, 0, stayClasses(clDirt,1), scaleByMapSize(13, 200),10);
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clHill, 2, clPlayer, 5, clDirt, 1, clForest, 0, clPyrenneans,2), scaleByMapSize(13, 200) );
|
||||
createObjectGroupsDeprecated(group, 0, stayClasses(clDirt,1), scaleByMapSize(13, 200),10);
|
||||
RMS.SetProgress(75);
|
||||
|
||||
// create bushes
|
||||
log("Creating bushes...");
|
||||
group = new SimpleGroup( [new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)] );
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 2, clPlayer, 1, clPyrenneans, 1), scaleByMapSize(13, 200), 50 );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 2, clPlayer, 1, clPyrenneans, 1), scaleByMapSize(13, 200), 50 );
|
||||
|
||||
RMS.SetProgress(80);
|
||||
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 8, clPyrenneans, 1), scaleByMapSize(4,16), 100 );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 8, clPyrenneans, 1), scaleByMapSize(4,16), 100 );
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 8, clPyrenneans, 1), scaleByMapSize(4,16), 100 );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 8, clPyrenneans, 1), scaleByMapSize(4,16), 100 );
|
||||
|
||||
log("Creating metal mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clMetal, 8, clRock, 5, clPyrenneans, 1), scaleByMapSize(4,16), 100 );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clMetal, 8, clRock, 5, clPyrenneans, 1), scaleByMapSize(4,16), 100 );
|
||||
|
||||
RMS.SetProgress(85);
|
||||
|
||||
log("Creating small decorative rocks...");
|
||||
group = new SimpleGroup( [new SimpleObject(aRockMedium, 1,3, 0,1)], true );
|
||||
createObjectGroups( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0), scaleByMapSize(16, 262), 50 );
|
||||
createObjectGroupsDeprecated( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0), scaleByMapSize(16, 262), 50 );
|
||||
|
||||
log("Creating large decorative rocks...");
|
||||
group = new SimpleGroup( [new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)], true );
|
||||
createObjectGroups( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0), scaleByMapSize(8, 131), 50 );
|
||||
createObjectGroupsDeprecated( group, 0, avoidClasses(clWater, 0, clForest, 0, clPlayer, 0), scaleByMapSize(8, 131), 50 );
|
||||
|
||||
RMS.SetProgress(90);
|
||||
|
||||
log("Creating deer...");
|
||||
group = new SimpleGroup( [new SimpleObject(oDeer, 5,7, 0,4)], true, clFood );
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clPyrenneans, 1, clFood, 15), 3 * numPlayers, 50 );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clPyrenneans, 1, clFood, 15), 3 * numPlayers, 50 );
|
||||
|
||||
log("Creating rabbit...");
|
||||
group = new SimpleGroup( [new SimpleObject(oRabbit, 2,3, 0,2)], true, clFood );
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clPyrenneans, 1, clFood,15), 3 * numPlayers, 50 );
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clPyrenneans, 1, clFood,15), 3 * numPlayers, 50 );
|
||||
|
||||
log("Creating berry bush...");
|
||||
group = new SimpleGroup( [new SimpleObject(oBerryBush, 5,7, 0,4)],true, clFood );
|
||||
createObjectGroups(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clPyrenneans, 1, clFood, 10), randIntInclusive(1, 4) * numPlayers + 2, 50);
|
||||
createObjectGroupsDeprecated(group, 0, avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clPyrenneans, 1, clFood, 10), randIntInclusive(1, 4) * numPlayers + 2, 50);
|
||||
|
||||
log("Creating fish...");
|
||||
group = new SimpleGroup( [new SimpleObject(oFish, 2,3, 0,2)], true, clFood );
|
||||
createObjectGroups(group, 0, [avoidClasses(clFood, 15), stayClasses(clWater, 6)], 20 * numPlayers, 60 );
|
||||
createObjectGroupsDeprecated(group, 0, [avoidClasses(clFood, 15), stayClasses(clWater, 6)], 20 * numPlayers, 60 );
|
||||
|
||||
setSunElevation(randFloat(PI/5, PI / 3));
|
||||
setSunRotation(randFloat(0, TWO_PI));
|
||||
|
||||
@@ -255,7 +255,7 @@ addElements([
|
||||
RMS.SetProgress(80);
|
||||
|
||||
log("Adding reeds...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(g_Decoratives.reeds, 5, 12, 1, 4),
|
||||
@@ -275,7 +275,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(85);
|
||||
|
||||
log("Adding dust...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[new SimpleObject(g_Decoratives.dust, 1, 1, 1, 4)],
|
||||
false
|
||||
|
||||
@@ -201,7 +201,7 @@ log("Creating reeds...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aReeds, 5,10, 0,4), new SimpleObject(aLillies, 5,10, 0,4)], true
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clWater, 1),
|
||||
scaleByMapSize(400,2000), 100
|
||||
);
|
||||
@@ -277,14 +277,14 @@ for (var i = 0; i < sizes.length; i++)
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -292,7 +292,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1)],
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -305,7 +305,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -319,7 +319,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -333,7 +333,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 13),
|
||||
6 * numPlayers, 50
|
||||
);
|
||||
@@ -344,7 +344,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oHorse, 1,3, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 13),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -357,7 +357,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oRabbit, 5,7, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 13),
|
||||
6 * numPlayers, 50
|
||||
);
|
||||
@@ -368,7 +368,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oWolf, 1,3, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 13),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -379,7 +379,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 10),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -396,7 +396,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clHill, 1, clPlayer, 13, clMetal, 6, clRock, 6, clWater, 0),
|
||||
num
|
||||
);
|
||||
@@ -409,7 +409,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 2, clPlayer, 13, clDirt, 0),
|
||||
scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -421,7 +421,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clHill, 2, clPlayer, 13, clDirt, 1, clForest, 0),
|
||||
scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -433,7 +433,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clHill, 1, clPlayer, 13, clDirt, 1),
|
||||
scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -215,7 +215,7 @@ RMS.SetProgress(35);
|
||||
log("Creating gaia...");
|
||||
for (let i = 0; i < 2; ++i)
|
||||
for (let j = 0; j < scaleByMapSize(1, 8); ++j)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(oSpearman, 8, 12, 2, 3),
|
||||
@@ -300,7 +300,7 @@ log("Creating straggler trees...");
|
||||
var types = [oTree, oPalm1, oPalm2];
|
||||
var num = Math.floor(numStragglers / types.length);
|
||||
for (let type of types)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(type, 1, 1, 0, 3)], true, clForest),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -352,7 +352,7 @@ for (let i = 0; i < sizes.length; ++i)
|
||||
scaleByMapSize(20, 80));
|
||||
|
||||
log("Creating stone mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup(
|
||||
[
|
||||
new SimpleObject(oStoneSmall, 0, 2, 0, 4),
|
||||
@@ -372,7 +372,7 @@ createObjectGroups(
|
||||
100);
|
||||
|
||||
log("Creating small stone mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oStoneSmall, 2, 5, 1, 3)], true, clRock),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -386,7 +386,7 @@ createObjectGroups(
|
||||
100);
|
||||
|
||||
log("Creating metal mines...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -401,7 +401,7 @@ createObjectGroups(
|
||||
100);
|
||||
|
||||
log("Creating small decorative rocks...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(aRockMedium, 1, 3, 0, 1)], true),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -415,7 +415,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating large decorative rocks...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([
|
||||
new SimpleObject(aRockLarge, 1, 2, 0, 1),
|
||||
new SimpleObject(aRockMedium, 1, 3, 0, 2)
|
||||
@@ -433,7 +433,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating small grass tufts...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(aBush1, 1, 2, 0, 1, -PI/8, PI/8)]),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -447,7 +447,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(70);
|
||||
|
||||
log("Creating large grass tufts...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([
|
||||
new SimpleObject(aBush2, 2, 4, 0, 1.8, -PI/8, PI/8),
|
||||
new SimpleObject(aBush1, 3, 6, 1.2, 2.5, -PI/8, PI/8)
|
||||
@@ -465,7 +465,7 @@ log("Creating large grass tufts...");
|
||||
RMS.SetProgress(85);
|
||||
|
||||
log("Creating bushes...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([
|
||||
new SimpleObject(aBush3, 1, 2, 0, 2),
|
||||
new SimpleObject(aBush2, 2, 4, 0, 2)
|
||||
@@ -479,7 +479,7 @@ log("Creating bushes...");
|
||||
8 * scaleByMapSize(13, 200), 50);
|
||||
|
||||
log("Creating deer...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oDeer, 5, 7, 0, 4)], true, clFood),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -493,7 +493,7 @@ log("Creating deer...");
|
||||
50);
|
||||
|
||||
log("Creating boar...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oBoar, 2, 4, 0, 4)], true, clFood),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -507,7 +507,7 @@ log("Creating boar...");
|
||||
50);
|
||||
|
||||
log("Creating tigers...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oTiger, 1, 1, 0, 4)], true, clFood),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -522,7 +522,7 @@ createObjectGroups(
|
||||
RMS.SetProgress(95);
|
||||
|
||||
log("Creating berry bush...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oBush, 5, 7, 0, 4)], true, clFood),
|
||||
0,
|
||||
avoidClasses(
|
||||
@@ -536,7 +536,7 @@ createObjectGroups(
|
||||
50);
|
||||
|
||||
log("Creating fish...");
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(oFish, 2, 3, 0, 2)], true, clFood),
|
||||
0,
|
||||
[avoidClasses(clFood, 15), stayClasses(clWater, 4)],
|
||||
|
||||
@@ -94,8 +94,11 @@ function min(a, b)
|
||||
/**
|
||||
* Retries the given function with those arguments as often as specified.
|
||||
*/
|
||||
function retryPlacing(placeFunc, placeArgs, retryFactor, amount, getResult)
|
||||
function retryPlacing(placeFunc, placeArgs, retryFactor, amount, getResult, behaveDeprecated = false)
|
||||
{
|
||||
if (behaveDeprecated && !(placeArgs.placer instanceof SimpleGroup || placeArgs.placer instanceof RandomGroup))
|
||||
warn("Deprecated version of createFoo should only be used for SimpleGroup and RandomGroup placers!");
|
||||
|
||||
let maxFail = amount * retryFactor;
|
||||
|
||||
let results = [];
|
||||
@@ -106,7 +109,7 @@ function retryPlacing(placeFunc, placeArgs, retryFactor, amount, getResult)
|
||||
{
|
||||
let result = placeFunc(placeArgs);
|
||||
|
||||
if (result !== undefined)
|
||||
if (result !== undefined || behaveDeprecated)
|
||||
{
|
||||
++good;
|
||||
if (getResult)
|
||||
@@ -150,11 +153,23 @@ function randomizePlacerCoordinatesFromAreas(placer, areas)
|
||||
placer.z = pt.z;
|
||||
}
|
||||
|
||||
// TODO this is a hack to simulate the old behaviour of those functions
|
||||
// until all old maps are changed to use the correct version of these functions
|
||||
function createObjectGroupsDeprecated(placer, player, constraint, amount, retryFactor = 10)
|
||||
{
|
||||
return createObjectGroups(placer, player, constraint, amount, retryFactor, true);
|
||||
}
|
||||
|
||||
function createObjectGroupsByAreasDeprecated(placer, player, constraint, amount, retryFactor, areas)
|
||||
{
|
||||
return createObjectGroupsByAreas(placer, player, constraint, amount, retryFactor, areas, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to place the given number of areas in random places of the map.
|
||||
* Returns actually placed areas.
|
||||
*/
|
||||
function createAreas(centeredPlacer, painter, constraint, amount, retryFactor = 10)
|
||||
function createAreas(centeredPlacer, painter, constraint, amount, retryFactor = 10, behaveDeprecated = false)
|
||||
{
|
||||
let placeFunc = function (args) {
|
||||
randomizePlacerCoordinates(args.placer, args.halfMapSize);
|
||||
@@ -168,14 +183,14 @@ function createAreas(centeredPlacer, painter, constraint, amount, retryFactor =
|
||||
"halfMapSize": g_Map.size / 2
|
||||
};
|
||||
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, true);
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, true, behaveDeprecated);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to place the given number of areas in random places of the given areas.
|
||||
* Returns actually placed areas.
|
||||
*/
|
||||
function createAreasInAreas(centeredPlacer, painter, constraint, amount, retryFactor, areas)
|
||||
function createAreasInAreas(centeredPlacer, painter, constraint, amount, retryFactor, areas, behaveDeprecated = false)
|
||||
{
|
||||
if (!areas.length)
|
||||
return [];
|
||||
@@ -193,14 +208,14 @@ function createAreasInAreas(centeredPlacer, painter, constraint, amount, retryFa
|
||||
"halfMapSize": g_Map.size / 2
|
||||
};
|
||||
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, true);
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, true, behaveDeprecated);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to place the given number of groups in random places of the map.
|
||||
* Returns the number of actually placed groups.
|
||||
*/
|
||||
function createObjectGroups(placer, player, constraint, amount, retryFactor = 10)
|
||||
function createObjectGroups(placer, player, constraint, amount, retryFactor = 10, behaveDeprecated = false)
|
||||
{
|
||||
let placeFunc = function (args) {
|
||||
randomizePlacerCoordinates(args.placer, args.halfMapSize);
|
||||
@@ -214,14 +229,14 @@ function createObjectGroups(placer, player, constraint, amount, retryFactor = 10
|
||||
"halfMapSize": g_Map.size / 2 - 3
|
||||
};
|
||||
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, false);
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, false, behaveDeprecated);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to place the given number of groups in random places of the given areas.
|
||||
* Returns the number of actually placed groups.
|
||||
*/
|
||||
function createObjectGroupsByAreas(placer, player, constraint, amount, retryFactor, areas)
|
||||
function createObjectGroupsByAreas(placer, player, constraint, amount, retryFactor, areas, behaveDeprecated = false)
|
||||
{
|
||||
if (!areas.length)
|
||||
return 0;
|
||||
@@ -238,7 +253,7 @@ function createObjectGroupsByAreas(placer, player, constraint, amount, retryFact
|
||||
"areas": areas
|
||||
};
|
||||
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, false);
|
||||
return retryPlacing(placeFunc, args, retryFactor, amount, false, behaveDeprecated);
|
||||
}
|
||||
|
||||
function createTerrain(terrain)
|
||||
|
||||
@@ -516,7 +516,7 @@ SimpleGroup.prototype.place = function(player, constraint)
|
||||
var objs = element.place(this.x, this.z, player, this.avoidSelf, constraint);
|
||||
|
||||
if (objs === undefined)
|
||||
return false;
|
||||
return undefined;
|
||||
|
||||
resultObjs = resultObjs.concat(objs);
|
||||
}
|
||||
@@ -532,7 +532,7 @@ SimpleGroup.prototype.place = function(player, constraint)
|
||||
this.tileClass.add(Math.floor(obj.position.x/CELL_SIZE), Math.floor(obj.position.z/CELL_SIZE));
|
||||
}
|
||||
|
||||
return true;
|
||||
return resultObjs;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -560,7 +560,7 @@ RandomGroup.prototype.place = function(player, constraint)
|
||||
{
|
||||
var resultObjs = pickRandom(this.elements).place(this.x, this.z, player, this.avoidSelf, constraint);
|
||||
if (resultObjs === undefined)
|
||||
return false;
|
||||
return undefined;
|
||||
|
||||
// Add placed objects to map
|
||||
for (let obj of resultObjs)
|
||||
@@ -572,5 +572,5 @@ RandomGroup.prototype.place = function(player, constraint)
|
||||
this.tileClass.add(Math.floor(obj.position.x/CELL_SIZE), Math.floor(obj.position.z/CELL_SIZE));
|
||||
}
|
||||
|
||||
return true;
|
||||
return resultObjs;
|
||||
};
|
||||
|
||||
@@ -188,7 +188,7 @@ function createMines(mines, constraint, tileclass, count)
|
||||
for (var i = 0; i < mines.length; ++i)
|
||||
{
|
||||
var group = new SimpleGroup(mines[i], true, tileclass);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
constraint,
|
||||
count, 70
|
||||
);
|
||||
@@ -229,7 +229,7 @@ function createDecoration(objects, counts, constraint)
|
||||
objects[i],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
constraint,
|
||||
counts[i], 5
|
||||
@@ -248,7 +248,7 @@ function createFood(objects, counts, constraint, tileclass)
|
||||
objects[i],
|
||||
true, tileclass
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
constraint,
|
||||
counts[i], 50
|
||||
@@ -273,7 +273,7 @@ function createStragglerTrees(types, constraint, tileclass)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, tileclass
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
constraint,
|
||||
num
|
||||
);
|
||||
|
||||
@@ -343,7 +343,7 @@ function addDecoration(constraint, size, deviation, fill)
|
||||
{
|
||||
var decorCount = Math.floor(counts[i] * fill);
|
||||
var group = new SimpleGroup(decorations[i], true);
|
||||
createObjectGroups(group, 0, constraint, decorCount, 5);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, decorCount, 5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,10 +486,10 @@ function addLakes(constraint, size, deviation, fill)
|
||||
]);
|
||||
|
||||
var group = new SimpleGroup([new SimpleObject(g_Decoratives.rockMedium, 1, 3, 1, 3)], true, g_TileClasses.dirt);
|
||||
createObjectGroups(group, 0, [stayClasses(g_TileClasses.water, 1), borderClasses(g_TileClasses.water, 4, 3)], 1000, 100);
|
||||
createObjectGroupsDeprecated(group, 0, [stayClasses(g_TileClasses.water, 1), borderClasses(g_TileClasses.water, 4, 3)], 1000, 100);
|
||||
|
||||
group = new SimpleGroup([new SimpleObject(g_Decoratives.reeds, 10, 15, 1, 3), new SimpleObject(g_Decoratives.rockMedium, 1, 3, 1, 3)], true, g_TileClasses.dirt);
|
||||
createObjectGroups(group, 0, [stayClasses(g_TileClasses.water, 2), borderClasses(g_TileClasses.water, 4, 3)], 1000, 100);
|
||||
createObjectGroupsDeprecated(group, 0, [stayClasses(g_TileClasses.water, 2), borderClasses(g_TileClasses.water, 4, 3)], 1000, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -678,12 +678,12 @@ function addProps(constraint, size, deviation, fill)
|
||||
{
|
||||
var propCount = Math.floor(counts[i] * fill);
|
||||
var group = new SimpleGroup(props[i], true);
|
||||
createObjectGroups(group, 0, constraint, propCount, 5);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, propCount, 5);
|
||||
}
|
||||
|
||||
// Add decorative trees
|
||||
var trees = new SimpleObject(g_Decoratives.tree, 5 * offset, 30 * offset, 2, 3 * offset + 10);
|
||||
createObjectGroups(new SimpleGroup([trees], true), 0, constraint, counts[0] * 5 * fill, 5);
|
||||
createObjectGroupsDeprecated(new SimpleGroup([trees], true), 0, constraint, counts[0] * 5 * fill, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -759,7 +759,7 @@ function addAnimals(constraint, size, deviation, fill)
|
||||
for (var i = 0; i < animals.length; ++i)
|
||||
{
|
||||
var group = new SimpleGroup(animals[i], true, g_TileClasses.animals);
|
||||
createObjectGroups(group, 0, constraint, Math.floor(counts[i]), 50);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, Math.floor(counts[i]), 50);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,7 +780,7 @@ function addBerries(constraint, size, deviation, fill)
|
||||
for (var i = 0; i < berries.length; ++i)
|
||||
{
|
||||
var group = new SimpleGroup(berries[i], true, g_TileClasses.berries);
|
||||
createObjectGroups(group, 0, constraint, Math.floor(count), 40);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, Math.floor(count), 40);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -805,7 +805,7 @@ function addFish(constraint, size, deviation, fill)
|
||||
for (var i = 0; i < fish.length; ++i)
|
||||
{
|
||||
var group = new SimpleGroup(fish[i], true, g_TileClasses.fish);
|
||||
createObjectGroups(group, 0, constraint, floor(counts[i]), 50);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, floor(counts[i]), 50);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -868,7 +868,7 @@ function addMetal(constraint, size, deviation, fill)
|
||||
for (var i = 0; i < mines.length; ++i)
|
||||
{
|
||||
var group = new SimpleGroup(mines[i], true, g_TileClasses.metal);
|
||||
createObjectGroups(group, 0, constraint, count, 100);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, count, 100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -881,7 +881,7 @@ function addSmallMetal(constraint, size, mixes, amounts)
|
||||
for (let i = 0; i < mines.length; ++i)
|
||||
{
|
||||
let group = new SimpleGroup(mines[i], true, g_TileClasses.metal);
|
||||
createObjectGroups(group, 0, constraint, count, 100);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, count, 100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -909,7 +909,7 @@ function addStone(constraint, size, deviation, fill)
|
||||
for (var i = 0; i < mines.length; ++i)
|
||||
{
|
||||
var group = new SimpleGroup(mines[i], true, g_TileClasses.rock);
|
||||
createObjectGroups(group, 0, constraint, count, 100);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, count, 100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -964,7 +964,7 @@ function addStragglerTrees(constraint, size, deviation, fill)
|
||||
min = Math.min(min, treesMax);
|
||||
|
||||
var group = new SimpleGroup([new SimpleObject(trees[i], min, treesMax, minDist, maxDist)], true, g_TileClasses.forest);
|
||||
createObjectGroups(group, 0, constraint, count);
|
||||
createObjectGroupsDeprecated(group, 0, constraint, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -226,14 +226,14 @@ RMS.SetProgress(60);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 26, clRock, 10, clWater, 1),
|
||||
2*scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 26, clRock, 10, clWater, 1),
|
||||
2*scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -241,7 +241,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 26, clMetal, 10, clRock, 5, clWater, 1),
|
||||
2*scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -252,7 +252,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aDecorativeRock, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 1, clForest, 0, clPlayer, 0, clPond, 1),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -264,7 +264,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aBush2, 1,2, 0,1), new SimpleObject(aBush1, 1,3, 0,2), new SimpleObject(aBush4, 1,2, 0,1), new SimpleObject(aBush3, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 1, clPlayer, 0, clPond, 1),
|
||||
scaleByMapSize(10, 100), 50
|
||||
@@ -276,7 +276,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aDecorativeRock, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
stayClasses(clRock, 0),
|
||||
5*scaleByMapSize(16, 262), 50
|
||||
@@ -286,7 +286,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aDecorativeRock, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
stayClasses(clMetal, 0),
|
||||
5*scaleByMapSize(16, 262), 50
|
||||
@@ -295,7 +295,7 @@ createObjectGroups(
|
||||
// create gazelles
|
||||
log("Creating gazelles...");
|
||||
group = new SimpleGroup([new SimpleObject(oGazelle, 5,7, 0,4)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
borderClasses(clWater, 8, 5),
|
||||
6*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -303,7 +303,7 @@ createObjectGroups(group, 0,
|
||||
// create goats
|
||||
log("Creating goats...");
|
||||
group = new SimpleGroup([new SimpleObject(oGoat, 2,4, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
borderClasses(clWater, 8, 5),
|
||||
5*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -311,13 +311,13 @@ createObjectGroups(group, 0,
|
||||
// create treasures
|
||||
log("Creating treasures...");
|
||||
group = new SimpleGroup([new SimpleObject(oFood, 1,1, 0,2)], true, clTreasure);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
borderClasses(clWater, 8, 5),
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
|
||||
group = new SimpleGroup([new SimpleObject(oWood, 1,1, 0,2)], true, clTreasure);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
borderClasses(clWater, 8, 5),
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -325,7 +325,7 @@ createObjectGroups(group, 0,
|
||||
// create camels
|
||||
log("Creating camels...");
|
||||
group = new SimpleGroup([new SimpleObject(oCamel, 2,4, 0,2)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
borderClasses(clWater, 14, 5),
|
||||
5*scaleByMapSize(5,20), 50
|
||||
);
|
||||
|
||||
@@ -225,7 +225,7 @@ for (var i = 0; i < scaleByMapSize(12,30); ++i)
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clPlayer, 20, clMetal, 10, clRock, 8, clWater, 4),
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
@@ -238,7 +238,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRock, 1,3, 0,3)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clPlayer, 7, clWater, 1),
|
||||
scaleByMapSize(200, 1200), 1
|
||||
@@ -252,7 +252,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGazelle, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clPlayer, 20, clFood, 11),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
@@ -263,7 +263,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oZebra, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clPlayer, 20, clFood, 11),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
@@ -274,7 +274,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGiraffe, 2,4, 0,4), new SimpleObject(oGiraffeInfant, 0,2, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clPlayer, 20, clFood, 11),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
@@ -285,7 +285,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oElephant, 2,4, 0,4), new SimpleObject(oElephantInfant, 0,2, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clPlayer, 20, clFood, 11),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
@@ -296,7 +296,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oLion, 0,1, 0,4), new SimpleObject(oLioness, 2,3, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 1, clPlayer, 20, clFood, 11),
|
||||
scaleByMapSize(4,12), 50
|
||||
);
|
||||
@@ -307,7 +307,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 12, clRock, 7, clMetal, 6),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -322,7 +322,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBaobab, 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clMetal, 6, clRock, 7, clWater, 1),
|
||||
num
|
||||
);
|
||||
@@ -333,7 +333,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBush, 2,4, 0,1.8, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clPlayer, 2, clForest, 0),
|
||||
scaleByMapSize(100, 1200)
|
||||
);
|
||||
|
||||
@@ -351,14 +351,14 @@ RMS.SetProgress(55);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -366,7 +366,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -379,7 +379,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -392,7 +392,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -406,7 +406,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oWildebeest, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 5),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -419,7 +419,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGazelle, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 5),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -430,7 +430,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oElephant, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 5),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -441,7 +441,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGiraffe, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 5),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -452,7 +452,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oZebra, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 5),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -463,7 +463,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clFood, 20), stayClasses(clWater, 6)],
|
||||
25 * numPlayers, 60
|
||||
);
|
||||
@@ -474,7 +474,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clForest, 0, clPlayer, 20, clHill, 1, clFood, 10),
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -491,7 +491,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 5, clForest, 1, clHill, 1, clPlayer, 12, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -503,7 +503,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 2, clPlayer, 2),
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -515,7 +515,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 3, clHill, 2, clPlayer, 2, clForest, 0),
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -527,7 +527,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clWater, 2, clHill, 1, clPlayer, 1),
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -408,7 +408,7 @@ var types = [aReeds]; // some variation
|
||||
for (var i = 0; i < types.length; ++i)
|
||||
{
|
||||
var group = new SimpleGroup([new SimpleObject(types[i], 1,1, 0,0)], true);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
borderClasses(clWater, 0, 6),
|
||||
scaleByMapSize(960, 2000), 1000
|
||||
);
|
||||
|
||||
@@ -1712,14 +1712,14 @@ RMS.SetProgress(55);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1), stayClasses(clLand, 5)],
|
||||
5*scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1), stayClasses(clLand, 5)],
|
||||
5*scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -1727,7 +1727,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 5)],
|
||||
5*scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -1772,7 +1772,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 4)],
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -1785,7 +1785,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 4)],
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -1799,7 +1799,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oMainHuntableAnimal, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -1812,7 +1812,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSecondaryHuntableAnimal, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -1823,7 +1823,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFruitBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -1841,7 +1841,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clHill, 1, clPlayer, 9, clMetal, 6, clRock, 6), stayClasses(clLand, 4)],
|
||||
num
|
||||
);
|
||||
@@ -1856,7 +1856,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 0), stayClasses(clLand, 4)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -1868,7 +1868,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), stayClasses(clLand, 4)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -1880,7 +1880,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clHill, 1, clPlayer, 1, clDirt, 1), stayClasses(clLand, 4)],
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -171,7 +171,7 @@ paintTerrainBasedOnHeight(3.12, 29, 1, tCliff);
|
||||
paintTileClassBasedOnHeight(3.12, 29, 1, clHill);
|
||||
|
||||
for (let triggerPointTreasure of triggerPointTreasures)
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
new SimpleGroup([new SimpleObject(triggerPointTreasure, 1, 1, 0, 0)], true, clWomen),
|
||||
0,
|
||||
[avoidClasses(clForest, 5, clPlayer, 5, clHill, 5), stayClasses(clLand, 5)],
|
||||
|
||||
@@ -274,14 +274,14 @@ RMS.SetProgress(70);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1, clGrass, 1)],
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3), new RandomObject(aBushes, 2,4, 0,2)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1, clGrass, 1)],
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
@@ -289,7 +289,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4), new RandomObject(aBushes, 2,4, 0,2)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clHill, 1, clGrass, 1)],
|
||||
scaleByMapSize(2,8), 100
|
||||
);
|
||||
@@ -300,7 +300,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRock, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -313,7 +313,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aBushB, 1,2, 0,1), new SimpleObject(aBushA, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(50, 500), 50
|
||||
@@ -327,7 +327,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oGazelle, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 1, clHill, 1, clFood, 20, clGrass, 2),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -338,7 +338,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oLion, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 1, clHill, 1, clFood, 20, clGrass, 2),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -349,7 +349,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oCamel, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 1, clHill, 1, clFood, 20, clGrass, 2),
|
||||
3 * numPlayers, 50
|
||||
);
|
||||
@@ -368,7 +368,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clHill, 1, clPlayer, 1, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
@@ -384,7 +384,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clHill, 1, clPlayer, 1, clMetal, 6, clRock, 6), stayClasses(clGrass, 3)],
|
||||
num
|
||||
);
|
||||
|
||||
@@ -315,7 +315,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aReeds, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
stayClasses(clPond, 1),
|
||||
numLakes, 100,
|
||||
waterAreas
|
||||
@@ -326,7 +326,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aLillies, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroupsByAreas(group, 0,
|
||||
createObjectGroupsByAreasDeprecated(group, 0,
|
||||
stayClasses(clPond, 1),
|
||||
numLakes, 100,
|
||||
waterAreas
|
||||
@@ -401,14 +401,14 @@ RMS.SetProgress(60);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clWater, 1, clPond, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clWater, 1, clPond, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -416,7 +416,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clWater, 1, clPond, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -424,14 +424,14 @@ createObjectGroups(group, 0,
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clWater, 1, clPond, 1), stayClasses(clDesert, 3)],
|
||||
scaleByMapSize(6,20), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clWater, 1, clPond, 1), stayClasses(clDesert, 3)],
|
||||
scaleByMapSize(6,20), 100
|
||||
);
|
||||
@@ -439,7 +439,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clWater, 1, clPond, 1), stayClasses(clDesert, 3)],
|
||||
scaleByMapSize(6,20), 100
|
||||
);
|
||||
@@ -452,7 +452,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aDecorativeRock, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 1, clForest, 0, clPlayer, 0, clPond, 1),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -465,7 +465,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aBush2, 1,2, 0,1), new SimpleObject(aBush1, 1,3, 0,2), new SimpleObject(aBush4, 1,2, 0,1), new SimpleObject(aBush3, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clWater, 1, clPlayer, 0, clPond, 1),
|
||||
scaleByMapSize(20, 180), 50
|
||||
@@ -476,7 +476,7 @@ RMS.SetProgress(70);
|
||||
// create gazelles
|
||||
log("Creating gazelles...");
|
||||
group = new SimpleGroup([new SimpleObject(oGazelle, 5,7, 0,4)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clWater, 1, clFood, 10, clDesert, 5, clPond, 1),
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -484,7 +484,7 @@ createObjectGroups(group, 0,
|
||||
// create goats
|
||||
log("Creating goats...");
|
||||
group = new SimpleGroup([new SimpleObject(oGoat, 2,4, 0,3)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clWater, 1, clFood, 10, clDesert, 5, clPond, 1),
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -492,13 +492,13 @@ createObjectGroups(group, 0,
|
||||
// create treasures
|
||||
log("Creating treasures...");
|
||||
group = new SimpleGroup([new SimpleObject(oFood, 1,1, 0,2)], true, clTreasure);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clWater, 1, clFood, 2, clDesert, 5, clTreasure, 6, clPond, 1),
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
|
||||
group = new SimpleGroup([new SimpleObject(oWood, 1,1, 0,2)], true, clTreasure);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clWater, 1, clFood, 2, clDesert, 5, clTreasure, 6, clPond, 1),
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -506,7 +506,7 @@ createObjectGroups(group, 0,
|
||||
// create camels
|
||||
log("Creating camels...");
|
||||
group = new SimpleGroup([new SimpleObject(oCamel, 2,4, 0,2)], true, clFood);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 20, clWater, 1, clFood, 10, clDesert, 5, clTreasure, 2, clPond, 1),
|
||||
3*scaleByMapSize(5,20), 50
|
||||
);
|
||||
@@ -520,7 +520,7 @@ var num = floor(0.5 * numStragglers / types.length);
|
||||
for (var i = 0; i < types.length; ++i)
|
||||
{
|
||||
group = new SimpleGroup([new SimpleObject(types[i], 1,1, 0,0)], true);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clWater, 1, clPlayer, 20, clMetal, 6, clDesert, 1, clTreasure, 2, clPond, 1),
|
||||
num
|
||||
);
|
||||
@@ -531,7 +531,7 @@ var num = floor(0.1 * numStragglers / types.length);
|
||||
for (var i = 0; i < types.length; ++i)
|
||||
{
|
||||
group = new SimpleGroup([new SimpleObject(types[i], 1,1, 0,0)], true);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 0, clWater, 1, clPlayer, 20, clMetal, 6, clTreasure, 2),
|
||||
num
|
||||
);
|
||||
@@ -544,7 +544,7 @@ var num = floor(numStragglers / types.length);
|
||||
for (var i = 0; i < types.length; ++i)
|
||||
{
|
||||
group = new SimpleGroup([new SimpleObject(types[i], 1,1, 0,0)], true);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
borderClasses(clPond, 1, 4),
|
||||
num
|
||||
);
|
||||
@@ -556,7 +556,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(eObelisk, 1,1, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 4, clForest, 3, clPlayer, 20, clMetal, 6, clRock, 2, clPond, 4, clTreasure, 2), stayClasses(clDesert, 3)],
|
||||
scaleByMapSize(5, 30), 50
|
||||
@@ -567,7 +567,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(ePyramid, 1,1, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 7, clForest, 6, clPlayer, 20, clMetal, 5, clRock, 5, clPond, 7, clTreasure, 2), stayClasses(clDesert, 3)],
|
||||
scaleByMapSize(2, 6), 50
|
||||
|
||||
@@ -1857,14 +1857,14 @@ RMS.SetProgress(55);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), stayClasses(clLand, 4)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), stayClasses(clLand, 4)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
@@ -1872,7 +1872,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 4)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
@@ -1885,7 +1885,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 4)],
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -1898,7 +1898,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 4)],
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -1912,7 +1912,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oMainHuntableAnimal, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
randIntInclusive(numPlayers+3, 5*numPlayers+4), 50
|
||||
);
|
||||
@@ -1923,7 +1923,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFruitBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -1936,7 +1936,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSecondaryHuntableAnimal, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
randIntInclusive(numPlayers+3, 5*numPlayers+4), 50
|
||||
);
|
||||
@@ -1947,7 +1947,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clLand, 5, clForest, 0, clPlayer, 0, clHill, 0, clFood, 20),
|
||||
randIntInclusive(15, 40) * numPlayers, 60
|
||||
);
|
||||
@@ -1965,7 +1965,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clForest, 1, clHill, 1, clPlayer, 0, clMetal, 6, clRock, 6), stayClasses(clLand, 4)],
|
||||
num
|
||||
);
|
||||
@@ -1980,7 +1980,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 2, clHill, 2, clPlayer, 2, clDirt, 0), stayClasses(clLand, 4)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -1992,7 +1992,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 3, clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), stayClasses(clLand, 4)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -2004,7 +2004,7 @@ log("Creating shallow flora...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aLillies, 1,2, 0,2), new SimpleObject(aReeds, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clShallow, 1),
|
||||
60 * scaleByMapSize(13, 200), 80
|
||||
);
|
||||
@@ -2014,7 +2014,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clHill, 1, clPlayer, 1, clDirt, 1), stayClasses(clLand, 3)],
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -1625,14 +1625,14 @@ RMS.SetProgress(55);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), stayClasses(clLand, 4)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), stayClasses(clLand, 4)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
@@ -1640,7 +1640,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 4)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
@@ -1653,7 +1653,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 4)],
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -1666,7 +1666,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 4)],
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -1680,7 +1680,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oMainHuntableAnimal, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
randIntInclusive(numPlayers+3, 5*numPlayers+4), 50
|
||||
);
|
||||
@@ -1691,7 +1691,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFruitBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -1704,7 +1704,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSecondaryHuntableAnimal, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 20, clHill, 1, clFood, 20), stayClasses(clLand, 4)],
|
||||
randIntInclusive(numPlayers+3, 5*numPlayers+4), 50
|
||||
);
|
||||
@@ -1715,7 +1715,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clLand, 5, clForest, 0, clPlayer, 0, clHill, 0, clFood, 20),
|
||||
randIntInclusive(15, 40) * numPlayers, 60
|
||||
);
|
||||
@@ -1733,7 +1733,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clForest, 7, clHill, 1, clPlayer, 0, clMetal, 6, clRock, 6), stayClasses(clLand, 4)],
|
||||
num
|
||||
);
|
||||
@@ -1748,7 +1748,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 2, clHill, 2, clPlayer, 2, clDirt, 0), stayClasses(clLand, 4)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -1760,7 +1760,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 3, clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), stayClasses(clLand, 4)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -1772,7 +1772,7 @@ log("Creating shallow flora...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aLillies, 1,2, 0,2), new SimpleObject(aReeds, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clShallow, 1),
|
||||
60 * scaleByMapSize(13, 200), 80
|
||||
);
|
||||
@@ -1782,7 +1782,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clHill, 1, clPlayer, 1, clDirt, 1), stayClasses(clLand, 3)],
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -1496,14 +1496,14 @@ RMS.SetProgress(55);
|
||||
log("Creating stone mines...");
|
||||
// create large stone quarries
|
||||
var group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1), stayClasses(clLand, 3)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1), stayClasses(clLand, 3)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
@@ -1511,7 +1511,7 @@ createObjectGroups(group, 0,
|
||||
log("Creating metal mines...");
|
||||
// create large metal quarries
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 3)],
|
||||
randIntInclusive(scaleByMapSize(2,9),scaleByMapSize(9,40)), 100
|
||||
);
|
||||
@@ -1524,7 +1524,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 3)],
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -1537,7 +1537,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 3)],
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -1551,7 +1551,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oDeer, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 8, clHill, 1, clFood, 20), stayClasses(clLand, 2)],
|
||||
randIntInclusive(numPlayers+3, 5*numPlayers+4), 50
|
||||
);
|
||||
@@ -1562,7 +1562,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oBerryBush, 5,7, 0,4)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 8, clHill, 1, clFood, 20), stayClasses(clLand, 2)],
|
||||
randIntInclusive(1, 4) * numPlayers + 2, 50
|
||||
);
|
||||
@@ -1575,7 +1575,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oSheep, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 0, clForest, 0, clPlayer, 8, clHill, 1, clFood, 20), stayClasses(clLand, 2)],
|
||||
randIntInclusive(numPlayers+3, 5*numPlayers+4), 50
|
||||
);
|
||||
@@ -1586,7 +1586,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(oFish, 2,3, 0,2)],
|
||||
true, clFood
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clLand, 4, clForest, 0, clPlayer, 0, clHill, 0, clFood, 20),
|
||||
randIntInclusive(15, 40) * numPlayers, 60
|
||||
);
|
||||
@@ -1604,7 +1604,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clForest, 1, clHill, 1, clPlayer, 0, clMetal, 6, clRock, 6), stayClasses(clLand, 4)],
|
||||
num
|
||||
);
|
||||
@@ -1620,7 +1620,7 @@ log("Creating small grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 2, clHill, 2, clPlayer, 2, clDirt, 0), stayClasses(clLand, 3)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -1632,7 +1632,7 @@ log("Creating large grass tufts...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 3, clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), stayClasses(clLand, 3)],
|
||||
planetm * scaleByMapSize(13, 200)
|
||||
);
|
||||
@@ -1644,7 +1644,7 @@ log("Creating shallow flora...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aLillies, 1,2, 0,2), new SimpleObject(aReeds, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
stayClasses(clShallow, 1),
|
||||
60 * scaleByMapSize(13, 200), 80
|
||||
);
|
||||
@@ -1654,7 +1654,7 @@ log("Creating bushes...");
|
||||
group = new SimpleGroup(
|
||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)]
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
[avoidClasses(clWater, 1, clHill, 1, clPlayer, 1, clDirt, 1), stayClasses(clLand, 3)],
|
||||
planetm * scaleByMapSize(13, 200), 50
|
||||
);
|
||||
|
||||
@@ -232,21 +232,21 @@ for (var i = 0; i < sizes.length; i++)
|
||||
|
||||
log("Creating stone mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
// create small stone quarries
|
||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
|
||||
log("Creating metal mines...");
|
||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clHill, 1),
|
||||
scaleByMapSize(4,16), 100
|
||||
);
|
||||
@@ -258,7 +258,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockMedium, 1,3, 0,1)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(16, 262), 50
|
||||
@@ -270,7 +270,7 @@ group = new SimpleGroup(
|
||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)],
|
||||
true
|
||||
);
|
||||
createObjectGroups(
|
||||
createObjectGroupsDeprecated(
|
||||
group, 0,
|
||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0),
|
||||
scaleByMapSize(8, 131), 50
|
||||
@@ -287,7 +287,7 @@ for (var i = 0; i < types.length; ++i)
|
||||
[new SimpleObject(types[i], 1,1, 0,3)],
|
||||
true, clForest
|
||||
);
|
||||
createObjectGroups(group, 0,
|
||||
createObjectGroupsDeprecated(group, 0,
|
||||
avoidClasses(clForest, 1, clHill, 1, clPlayer, 12, clMetal, 6, clRock, 6),
|
||||
num
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user