public void CheckRadiation() { if (jpbTimer.AddSeconds(timerSecond) < DateTime.Now && jpbStartTime.AddSeconds(30) < DateTime.Now) { if ((radiationX - 100 == 6400 && timerSecond == 1) || (radiationX - 100 == 3200 && timerSecond == 1) || (radiationX - 100 == 1600 && timerSecond == 1)) { timerSecond = 30; radiationX -= 100; } else if (radiationX - 100 > 800) { timerSecond = 1; radiationX -= 100; } var newPoi = new POI("jpb_poi", POITypes.RADIATION, POIDesigns.SIMPLE, POIShapes.CIRCLE, new List <Position> { new Position(10400, 6400), new Position(radiationX, radiationY) }, true, true); var oldPoi = Spacemap.POIs.FirstOrDefault(x => x.Value.Id == newPoi.Id).Value; if (oldPoi != null) { Spacemap.POIs.TryRemove(oldPoi.Id, out oldPoi); } Spacemap.POIs.TryAdd("jpb_poi", newPoi); GameManager.SendCommandToMap(Spacemap.Id, newPoi.GetPOICreateCommand()); jpbTimer = DateTime.Now; } }