Differential D2577 Diff 11077 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/PerPlayer/Dropdowns/PlayerCiv.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/PerPlayer/Dropdowns/PlayerCiv.js
Show All 24 Lines | PlayerSettingControls.PlayerCiv = class extends GameSettingControlDropdown | ||||
onMapChange(mapData) | onMapChange(mapData) | ||||
{ | { | ||||
let mapPData = this.gameSettingsControl.getPlayerData(mapData, this.playerIndex); | let mapPData = this.gameSettingsControl.getPlayerData(mapData, this.playerIndex); | ||||
this.fixedCiv = mapPData && mapPData.Civ || undefined; | this.fixedCiv = mapPData && mapPData.Civ || undefined; | ||||
} | } | ||||
onAssignPlayer(source, target) | onAssignPlayer(source, target) | ||||
{ | { | ||||
if (g_GameAttributes.mapType != "scenario" && source && target) | if (this.playerIndex == 0 && g_GameAttributes.mapType != "scenario" && source && target) | ||||
[source.Civ, target.Civ] = [target.Civ, source.Civ]; | [source.Civ, target.Civ] = [target.Civ, source.Civ]; | ||||
} | } | ||||
onGameAttributesChange() | onGameAttributesChange() | ||||
{ | { | ||||
let pData = this.gameSettingsControl.getPlayerData(g_GameAttributes, this.playerIndex); | let pData = this.gameSettingsControl.getPlayerData(g_GameAttributes, this.playerIndex); | ||||
if (!pData || !g_GameAttributes.mapType) | if (!pData || !g_GameAttributes.mapType) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator