#49 WIP "user interaction" dialog

This commit is contained in:
Exodus4D
2015-10-13 20:44:25 +02:00
parent 56fab30aeb
commit 593278bc00
38 changed files with 221 additions and 867 deletions

View File

@@ -2742,19 +2742,6 @@ define([
}
var defaultSystemStatus = Init.systemStatus[ tempKeys[0] ].id;
// dialog data -------------------------------------------------------------------------------------------------
var data = {
id: config.systemDialogId,
selectClass: config.systemDialogSelectClass
};
// current character log data ----------------------------------------------------------------------------------
var currentCharacterLog = Util.getCurrentCharacterLog();
if(currentCharacterLog !== false){
// set current position as "default" system to add
data.currentSystem = currentCharacterLog.system;
}
// get current map data -> disable systems that are already on it ----------------------------------------------
var mapData = mapContainer.getMapDataFromClient({forceData: true});
@@ -2764,6 +2751,25 @@ define([
mapSystemIds.push( mapSystems[i].systemId );
}
// dialog data -------------------------------------------------------------------------------------------------
var data = {
id: config.systemDialogId,
selectClass: config.systemDialogSelectClass
};
// set current position as "default" system to add -------------------------------------------------------------
var currentCharacterLog = Util.getCurrentCharacterLog();
if(
currentCharacterLog !== false &&
mapSystemIds.indexOf( currentCharacterLog.system.id ) === -1
){
// current system is NOT already on this map
// set current position as "default" system to add
data.currentSystem = currentCharacterLog.system;
}
requirejs(['text!templates/dialog/system.html', 'mustache'], function(template, Mustache) {
var content = Mustache.render(template, data);