Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/gamesetup.js
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Selectable options (player, AI, unassigned) in the player assignment dropdowns and | * Selectable options (player, AI, unassigned) in the player assignment dropdowns and | ||||
* their colorized, textual representation. | * their colorized, textual representation. | ||||
*/ | */ | ||||
var g_PlayerAssignmentList = {}; | var g_PlayerAssignmentList = {}; | ||||
/** | /** | ||||
* Remembers which clients are assigned to which player slots and whether they are ready. | * Remembers which clients are assigned to which player slots and whether they are ready. | ||||
* The keys are guids or "local" in Singleplayer. | * The keys are GUIDs or "local" in single-player. | ||||
*/ | */ | ||||
var g_PlayerAssignments = {}; | var g_PlayerAssignments = {}; | ||||
var g_DefaultPlayerData = []; | var g_DefaultPlayerData = []; | ||||
var g_GameAttributes = { "settings": {} }; | var g_GameAttributes = { "settings": {} }; | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 920 Lines • ▼ Show 20 Lines | function init(attribs) | ||||
if (!g_IsNetworked) | if (!g_IsNetworked) | ||||
g_PlayerAssignments = { | g_PlayerAssignments = { | ||||
"local": { | "local": { | ||||
"name": singleplayerName(), | "name": singleplayerName(), | ||||
"player": 1 | "player": 1 | ||||
} | } | ||||
}; | }; | ||||
// Replace empty playername when entering a singleplayermatch for the first time | // Replace empty player name when entering a single-player match for the first time. | ||||
if (!g_IsNetworked) | if (!g_IsNetworked) | ||||
Engine.ConfigDB_CreateAndWriteValueToFile("user", "playername.singleplayer", singleplayerName(), "config/user.cfg"); | Engine.ConfigDB_CreateAndWriteValueToFile("user", "playername.singleplayer", singleplayerName(), "config/user.cfg"); | ||||
initDefaults(); | initDefaults(); | ||||
supplementDefaults(); | supplementDefaults(); | ||||
setTimeout(displayGamestateNotifications, 1000); | setTimeout(displayGamestateNotifications, 1000); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,535 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator