File: setupgame.js

package info (click to toggle)
warzone2100 4.6.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 660,332 kB
  • sloc: cpp: 676,209; ansic: 391,201; javascript: 78,238; python: 16,632; php: 4,294; sh: 4,094; makefile: 2,629; lisp: 1,492; cs: 489; xml: 404; perl: 224; ruby: 156; java: 89
file content (39 lines) | stat: -rw-r--r-- 918 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function setupGame()
{
	//Use light fog for multiplayer
	setRevealStatus(true);

	if (tilesetType === "ARIZONA")
	{
		setCampaignNumber(1);
	}
	else if (tilesetType === "URBAN")
	{
		setCampaignNumber(2);
		replaceTexture("page-7-barbarians-arizona.png", "page-7-barbarians-urban.png");
	}
	else if (tilesetType === "ROCKIES")
	{
		setCampaignNumber(3);
		replaceTexture("page-7-barbarians-arizona.png", "page-7-barbarians-kevlar.png");
		// for some reason rockies will use arizona babas
	}
	if (tilesetType !== "ARIZONA")
	{
		setSky("texpages/page-25-sky-urban.png", 0.5, 10000.0);
	}
	if (!isSpectator(-1))
	{
		// Disabled by default
		setMiniMap(false);
	}
	// Enable all templates
	setDesign(true);

	// Enable all guide topics
	addGuideTopic("wz2100::**");

	showInterface(); // init buttons. This MUST come before setting the reticule button data
	queue("setMainReticule", TICK_TIME);
	mainReticule = true;
}