コード例 #1
0
        public MapUpdateHistory ApiDeleteSolarSystem(string key, string solarSystemName, string pilotName)
        {
            OnChangeStatus?.Invoke($"[Map.ApiDeleteSolarSystem] Start Delete Solar System for map '{key}' with pilot '{pilotName}'. Deleted solar system name is '{solarSystemName}'");

            var updatedSystems = Global.MapApiFunctions.DeleteSolarSystem(this, solarSystemName);

            return(updatedSystems);
        }
コード例 #2
0
        public void Activate(string owner, string system)
        {
            OnChangeStatus?.Invoke($"[Map.Activate] Start updates for current map '{Key}' for pilot {ActivePilot}");

            ActivePilot             = owner;
            SelectedSolarSystemName = system;
            LocationSolarSystemName = system;
        }
コード例 #3
0
        public MapUpdateHistory ApiDeleteConnectionBeetwenSolarSystems(string solarSystemFrom, string solarSystemTo)
        {
            OnChangeStatus?.Invoke($"[Map.ApiDeleteSolarSystem] For map '{Key}' delete connection beetwen solar systems '{solarSystemFrom}' and '{solarSystemTo}'.");

            var result = Global.MapApiFunctions.DeleteConnectionBetweenSolarSystems(this, ActivePilot, Key, solarSystemFrom, solarSystemTo);

            return(result);
        }
コード例 #4
0
        public MapUpdateHistory ApiPublishSolarSystem(string pilotName, string key, string systemFrom, string systemTo)
        {
            OnChangeStatus?.Invoke($"[Map.ApiPublishSolarSystem] Start Publish Solar System for map '{Key}' with pilot '{pilotName}'. Relocated from '{systemFrom}' to '{systemTo}'");

            var result = Global.MapApiFunctions.PublishSolarSystem(this, pilotName, Key, systemFrom, systemTo, _lastUpdate);

            return(result);
        }
コード例 #5
0
        private void SetIdleState(bool status)
        {
            idle = status;

            OnChangeStatus?.Invoke(idle);

            DCL.Interface.WebInterface.ReportIdleStateChanged(idle);
        }
コード例 #6
0
        public MapUpdateHistory GetUpdates()
        {
            //Global.MapApiFunctions.UpdateMap(SpaceMap);
            OnChangeStatus?.Invoke($"[Map.Update] Start Update Solar System for map '{Key}' with pilot '{ActivePilot}'.");

            var result = Global.MapApiFunctions.UpdateMap(this);

            return(result);
        }
コード例 #7
0
        public MapUpdateHistory ApiPublishDeathNotice(string locationSolarSystem)
        {
            var result = Global.MapApiFunctions.DeleteConnectionBetweenSolarSystems(this, ActivePilot, Key, PreviousLocationSolarSystemName, locationSolarSystem);

            OnChangeStatus?.Invoke($"[Map.ApiPublishDeathNotice] End get updates for map '{Key}' after DeathNotice delete connection from system {PreviousLocationSolarSystemName} to system {locationSolarSystem}. Updated {result.UpdatedSystems} solar systems.");

            _commandsLog.InfoFormat("[Map.ApiPublishDeathNotice] For map with key {0} delete connection from system {2} to system {1}", Key, locationSolarSystem, PreviousLocationSolarSystemName);

            return(result);
        }
コード例 #8
0
        public MapUpdateHistory ApiPublishSignatures(string key, string solarSystemName, string pilotName, List <CosmicSignature> signatures)
        {
            OnChangeStatus?.Invoke($"[Map.ApiPublishSignatures] Start Publish Signatures Solar System '{solarSystemName}' for map '{key}' with pilot '{pilotName}'. signatures count is '{signatures.Count}'");

            var updatedSystems = Global.MapApiFunctions.PublishSignatures(this, pilotName, key, solarSystemName, signatures);

            RemoveSystem(solarSystemName);

            return(updatedSystems);
        }
コード例 #9
0
 private void CallChangeStatus()
 {
     try
     {
         OnChangeStatus?.Invoke(this, new ServerStatusArgs(_listenningStatus));
     }
     catch (Exception ex)
     {
         if (_showFail)
         {
             Debug.Fail(ex.Message, ex.StackTrace);
         }
     }
 }
コード例 #10
0
 private void CallChangeStatus()
 {
     try
     {
         OnChangeStatus?.Invoke(this, new ClientStatusArgs(_connectedStatus));
     }
     catch (Exception ex)
     {
         if (_showFail)
         {
             Debug.Fail(ex.Message, ex.StackTrace);
         }
     }
 }
コード例 #11
0
        public void RemoveSystem(string solarSystem)
        {
            OnChangeStatus?.Invoke($"[Map.RemoveSystem] Check is removed solar system '{solarSystem}' current for selected pilot {Global.Pilots.Selected.Name}...");

            if (solarSystem == LocationSolarSystemName)
            {
                return;
            }

            //var deletedSystem = GetSystem(solarSystem);

            //deletedSystem.IsDeleted = true;

            SelectedSolarSystemName = LocationSolarSystemName;
        }
コード例 #12
0
 void SetState(SequenceStatus state)
 {
     m_State = state;
     OnChangeStatus?.Invoke(state);
 }
コード例 #13
0
ファイル: BuildStateEvents.cs プロジェクト: mohmehdi/Automata
 public void ChangeStatus(int id, Status status)
 {
     OnChangeStatus?.Invoke(id, status);
 }