Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/random/caledonian_meadows.js
Engine.LoadLibrary("rmgen"); | Engine.LoadLibrary("rmgen"); | ||||
Engine.LoadLibrary("rmgen-common"); | Engine.LoadLibrary("rmgen-common"); | ||||
Engine.LoadLibrary("rmbiome"); | Engine.LoadLibrary("rmbiome"); | ||||
Engine.LoadLibrary("heightmap"); | Engine.LoadLibrary("heightmap"); | ||||
var tGrove = "temp_grass_plants"; | var tGrove = "temp_grass_plants"; | ||||
var tPath = "road_rome_a"; | var tPath = "road_rome_a"; | ||||
var oGroveEntities = ["structures/gaul_outpost", "gaia/tree/oak_new"]; | var oGroveEntities = ["structures/gaul/outpost", "gaia/tree/oak_new"]; | ||||
var g_Map = new RandomMap(0, "whiteness"); | var g_Map = new RandomMap(0, "whiteness"); | ||||
/** | /** | ||||
* Design resource spots | * Design resource spots | ||||
*/ | */ | ||||
// Mines | // Mines | ||||
let decorations = [ | let decorations = [ | ||||
Show All 21 Lines | |||||
// Food, fences with domestic animals | // Food, fences with domestic animals | ||||
g_WallStyles.other = { | g_WallStyles.other = { | ||||
"overlap": 0, | "overlap": 0, | ||||
"fence": readyWallElement("structures/fence_long", "gaia"), | "fence": readyWallElement("structures/fence_long", "gaia"), | ||||
"fence_short": readyWallElement("structures/fence_short", "gaia"), | "fence_short": readyWallElement("structures/fence_short", "gaia"), | ||||
"bench": { "angle": Math.PI / 2, "length": 1.5, "indent": 0, "bend": 0, "templateName": "structures/bench" }, | "bench": { "angle": Math.PI / 2, "length": 1.5, "indent": 0, "bend": 0, "templateName": "structures/bench" }, | ||||
"sheep": { "angle": 0, "length": 0, "indent": 0.75, "bend": 0, "templateName": "gaia/fauna_sheep" }, | "sheep": { "angle": 0, "length": 0, "indent": 0.75, "bend": 0, "templateName": "gaia/fauna_sheep" }, | ||||
"foodBin": { "angle": Math.PI / 2, "length": 1.5, "indent": 0, "bend": 0, "templateName": "gaia/treasure/food_bin" }, | "foodBin": { "angle": Math.PI / 2, "length": 1.5, "indent": 0, "bend": 0, "templateName": "gaia/treasure/food_bin" }, | ||||
"farmstead": { "angle": Math.PI, "length": 0, "indent": -3, "bend": 0, "templateName": "structures/brit_farmstead" } | "farmstead": { "angle": Math.PI, "length": 0, "indent": -3, "bend": 0, "templateName": "structures/brit/farmstead" } | ||||
}; | }; | ||||
let fences = [ | let fences = [ | ||||
new Fortress("fence", [ | new Fortress("fence", [ | ||||
"foodBin", "farmstead", "bench", | "foodBin", "farmstead", "bench", | ||||
"turn_0.25", "sheep", "turn_0.25", "fence", | "turn_0.25", "sheep", "turn_0.25", "fence", | ||||
"turn_0.25", "sheep", "turn_0.25", "fence", | "turn_0.25", "sheep", "turn_0.25", "fence", | ||||
"turn_0.25", "sheep", "turn_0.25", "fence" | "turn_0.25", "sheep", "turn_0.25", "fence" | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | createArea( | ||||
]); | ]); | ||||
} | } | ||||
} | } | ||||
// Camps with fire and gold treasure | // Camps with fire and gold treasure | ||||
function placeCamp(point, | function placeCamp(point, | ||||
centerEntity = "actor|props/special/eyecandy/campfire.xml", | centerEntity = "actor|props/special/eyecandy/campfire.xml", | ||||
otherEntities = ["gaia/treasure/metal", "gaia/treasure/standing_stone", | otherEntities = ["gaia/treasure/metal", "gaia/treasure/standing_stone", | ||||
"units/brit_infantry_slinger_b", "units/brit_infantry_javelineer_b", "units/gaul_infantry_slinger_b", "units/gaul_infantry_javelineer_b", "units/gaul_champion_fanatic", | "units/brit/infantry_slinger_b", "units/brit/infantry_javelineer_b", "units/gaul/infantry_slinger_b", "units/gaul/infantry_javelineer_b", "units/gaul/champion_fanatic", | ||||
"actor|props/special/common/waypoint_flag.xml", "actor|props/special/eyecandy/barrel_a.xml", "actor|props/special/eyecandy/basket_celt_a.xml", "actor|props/special/eyecandy/crate_a.xml", "actor|props/special/eyecandy/dummy_a.xml", "actor|props/special/eyecandy/handcart_1.xml", "actor|props/special/eyecandy/handcart_1_broken.xml", "actor|props/special/eyecandy/sack_1.xml", "actor|props/special/eyecandy/sack_1_rough.xml" | "actor|props/special/common/waypoint_flag.xml", "actor|props/special/eyecandy/barrel_a.xml", "actor|props/special/eyecandy/basket_celt_a.xml", "actor|props/special/eyecandy/crate_a.xml", "actor|props/special/eyecandy/dummy_a.xml", "actor|props/special/eyecandy/handcart_1.xml", "actor|props/special/eyecandy/handcart_1_broken.xml", "actor|props/special/eyecandy/sack_1.xml", "actor|props/special/eyecandy/sack_1_rough.xml" | ||||
] | ] | ||||
) | ) | ||||
{ | { | ||||
g_Map.placeEntityPassable(centerEntity, 0, point, randomAngle()); | g_Map.placeEntityPassable(centerEntity, 0, point, randomAngle()); | ||||
let quantity = randIntInclusive(5, 11); | let quantity = randIntInclusive(5, 11); | ||||
let dAngle = 2 * Math.PI / quantity; | let dAngle = 2 * Math.PI / quantity; | ||||
for (let i = 0; i < quantity; ++i) | for (let i = 0; i < quantity; ++i) | ||||
▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator