public IDictionary <string, object> QueryCPRGForge(Character character, long sourceEid, long targetEid, Container container, PBSCalibrationProgramForgeFacility calibrationProgramForgeFacility)
        {
            var sourceCalibration = (CalibrationProgram)container.GetItemOrThrow(sourceEid, true);
            var targetCalibration = (CalibrationProgram)container.GetItemOrThrow(targetEid, true);

            sourceCalibration.CheckTargetForForgeAndThrowIfFailed(targetCalibration);

            int materialEfficiency;
            int timeEfficiency;

            calibrationProgramForgeFacility.CalculateResultingPoints(sourceCalibration, targetCalibration, character, out materialEfficiency, out timeEfficiency);

            var forgeTimeSeconds = calibrationProgramForgeFacility.CalculateCPRGForgeTimeSeconds(character, materialEfficiency);

            var price = forgeTimeSeconds * calibrationProgramForgeFacility.GetPricePerSecond();

            var result = new Dictionary <string, object>
            {
                { k.productionTime, forgeTimeSeconds },
                { k.materialEfficiency, materialEfficiency },
                { k.timeEfficiency, timeEfficiency },
                { k.price, Math.Round(price, 0) }
            };

            return(result);
        }
        public IDictionary <string, object> StartCalibrationProgramForge(Character character, long sourceEid, long targetEid, Container container, PBSCalibrationProgramForgeFacility calibrationProgramForgeFacility, bool useCorporationWallet)
        {
            calibrationProgramForgeFacility.CheckFacilitySlots(character);

            var newProduction = calibrationProgramForgeFacility.StartCPRGForge(character, sourceEid, targetEid, container, useCorporationWallet);

            //save to sql
            newProduction.InsertProductionInProgess();

            container.Save();

            //add to ram
            Transaction.Current.OnCommited(() => AddToRunningProductions(newProduction));

            newProduction.SendProductionEventToCorporationMembersOnCommitted(Commands.ProductionRemoteStart);

            //return info

            var replyDict = new Dictionary <string, object>
            {
                { k.production, newProduction.ToDictionary() },
                { k.facility, calibrationProgramForgeFacility.GetFacilityInfo(character) },
                { k.sourceContainer, container.ToDictionary() }
            };

            return(replyDict);
        }