Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IMyGridTerminalSystem Μ;SortedDictionary<string,SortedList<string,string>>Λ=new SortedDictionary<string,SortedList<
- string,string>>{{"A. Modifier Tags",new SortedList<string,string>{{"exclusionKeyword","exclude"},{"manualKeyword","manual"},{
- "preventCountingKeyword","discount"},{"assemblyOnlyKeyword","assemblyOnly"},{"disassemblyOnlyKeyword","disassemblyOnly"},{"includeGridKeyword",
- "includeGrid"},{"crossGridControlKeyword","crossGrid"},{"autoConveyorKeyword","autoConveyor"},{"globalFilterKeyword",""},{
- "priorityTag","<priority="}}},{"B. Control Keys",new SortedList<string,string>{{"itemIngotKeyword","ingot"},{"itemOreKeyword","ore"},
- {"itemComponentKeyword","component"},{"itemToolKeyword","tool"},{"itemAmmoKeyword","ammo"},{"storageKeyword","cargo"},{
- "itemPanelKeyword","item"},{"outputPanelKeyword","inventory"},{"statusPanelKeyword","status"}}},{"C. Panel Tags",new SortedList<string,
- string>{{"belowQuotaOnlyKeyword","<belowQuota>"},{"ascendingAmountKeyword","<ascendingAmount>"},{"descendingAmountKeyword",
- "<descendingAmount>"},{"ascendingPercentKeyword","<ascendingPercent>"},{"descendingPercentKeyword","<descendingPercent>"},{"detailedKeyword"
- ,"<detailed>"},{"compactPercentKeyword","<compactPercent>"},{"compactAmountKeyword","<compactAmount>"},{
- "nameLengthKeyword","<nameLength="},{"amountLengthKeyword","<amountLength="},{"panelRowCountKeyword","<rows="},{"scrollTickDelayKeyword",
- "<scroll="},{"totalCapacityKeyword","<total>"},{"scrolledLinesTag","<lines="},{"progressBarFullChar","█"},{"progressBarHalfChar",
- "▌"},{"progressBarEmptyChar","."},{"progressBarLengthTag","<progress="}}},{"D. Display",new SortedList<string,string>{{
- "thousandsSuffix","K"},{"millionsSuffix","M"},{"billionsSuffix","B"}}}};SortedList<string,string>Κ=new SortedList<string,string>();
- SortedDictionary<string,SortedList<string,double>>Ι=new SortedDictionary<string,SortedList<string,double>>{{"A. Delays",new SortedList<
- string,double>{{"scanDelay",30},{"delayProcessLimits",20},{"delaySortItems",7.5},{"delayDistributeItems",20},{
- "delaySpreadItems",30},{"delayQueueAssembly",5},{"delayQueueDisassembly",10},{"delayRemoveExcessAssembly",20},{
- "delayRemoveExcessDisassembly",20},{"delaySortBlueprints",12.5},{"delaySortCargoPriority",90},{"delaySpreadBlueprints",20},{"delayLoadouts",15},{
- "delayFillingBottles",30},{"delayTimerLogic",10},{"delayCheckIdleAssemblers",15},{"delayResetIdleAssembler",45},{"delayFindModItems",5},{
- "delaySortRefinery",6},}},{"B. Performance",new SortedList<string,double>{{"actionLimiterMultiplier",0.35},{"runTimeLimiter",0.45},{
- "loopLimiter",0.5},{"overheatAverage",0.6},{"tickWeight",0.005}}},{"C. Defaults",new SortedList<string,double>{{
- "icePerO2/H2Generator",5000},{"fuelPerReactor",25},{"ammoPerGun",40},{"canvasPerParachute",4},}},{"D. Adjustments",new SortedList<string,
- double>{{"balanceRange",0.05},{"allowedExcessPercent",0.1},{"dynamicQuotaPercentageIncrement",0.05},{
- "dynamicQuotaMaxMultiplier",2.5},{"dynamicQuotaNegativeThreshold",3},{"dynamicQuotaPositiveThreshold",9}}}};SortedList<string,SortedList<string,
- bool>>Θ=new SortedList<string,SortedList<string,bool>>{{"A. Basic",new SortedList<string,bool>{{"countItems",ː},{
- "countBlueprints",ː},{"sortItems",ː},{"queueAssembly",ː},{"queueDisassembly",ː},{"distributeItems",ː},{"autoLoadSettings",ː},}},{
- "B. Advanced",new SortedList<string,bool>{{"autoKeyCargoContainers",ː},{"processLimits",ː},{"spreadRefineries",ː},{"spreadReactors",ː
- },{"spreadGuns",ː},{"spreadH2/O2Gens",ː},{"spreadGravelSifters",ː},{"spreadParachutes",ː},{"removeExcessAssembly",ː},{
- "removeExcessDisassembly",ː},{"sortBlueprints",ː},{"sortCargoPriority",ː},{"spreadBlueprints",ː},{"doLoadouts",ː},{"triggerLogic",ː},{
- "resetIdleAssemblers",ː},{"findModItems",ː},{"sortRefineries",ː},}},{"C. Settings",new SortedList<string,bool>{{"useConveyorRefineries",ˏ},{
- "useConveyorReactors",ˏ},{"useConveyorH2/O2Gens",ˏ},{"useConveyorGuns",ˏ},{"dynamicQuota",ː},{"dynamicQuotaIncreaseWhenLow",ː},{
- "sameGridOnly",ˏ},{"survivalKitAssembly",ˏ},{"addLoadoutsToQuota",ː}}}};SortedList<string,int>Η=new SortedList<string,int>(){{
- "updateFrequency",1},{"averageTicks",30},{"outputLimit",15},{"survivalKitQueuedIngots",0},{"autoMergeLengthTolerance",6},{
- "prioritizedOreCount",0},{"autoSizeMode",0}};SortedList<string,List<string>>Ζ=new SortedList<string,List<string>>(){{"excludedDefinitions",
- new List<string>(){"LargeBlockBed","LargeBlockLockerRoom","LargeBlockLockerRoomCorner","LargeBlockLockers",
- "PassengerSeatSmall","PassengerSeatLarge","LargeInteriorTurret","CockpitOpen","OpenCockpitSmall","LargeBlockCockpit","CockpitOpen",
- "LargeInteriorTurret"}},{"basicRefineryTypes",new List<string>(){"Stone","Scrap","Iron","Nickel","Cobalt","Silicon","Magnesium"}},{
- "gravelSifterKeys",new List<string>(){"gravelrefinery","gravelseparator","gravelsifter"}},{"specialManualDefinitions",new List<string>{
- "LargeBlockVaporator","DeuteriumProcessor"}}};Dictionary<string,int[]>Ε=new Dictionary<string,int[]>();SortedList<string,ű>Δ=new SortedList<
- string,ű>();SortedList<string,SortedList<string,Ǭ>>Γ=new SortedList<string,SortedList<string,Ǭ>>();SortedList<string,List<int>
- >Ν=new SortedList<string,List<int>>();Dictionary<string,double>Β=new Dictionary<string,double>();List<IMyTerminalBlock>ΐ=
- new List<IMyTerminalBlock>(1500),Ώ=new List<IMyTerminalBlock>(500),Ύ=new List<IMyTerminalBlock>(100);List<ǝ>Ό=new List<ǝ>(
- 1500),Ί=new List<ǝ>(250),Ή=new List<ǝ>(50);Dictionary<string,ů>Έ=new Dictionary<string,ů>();Dictionary<string,string>Ά=new
- Dictionary<string,string>(),ͽ=new Dictionary<string,string>(),ͼ=new Dictionary<string,string>();HashSet<string>Α=new HashSet<
- string>(),ͻ=new HashSet<string>();List<Ƌ>Ξ=new List<Ƌ>(),ι=new List<Ƌ>();List<int>η=new List<int>(150),ζ=new List<int>(150),ε=
- new List<int>(100),δ=new List<int>(150),γ=new List<int>(50),β=new List<int>(50),α=new List<int>(150),ΰ=new List<int>(50),ί=
- new List<int>(150),ή=new List<int>(500);List<string>έ=new List<string>(50),ά=new List<string>(50),Ϋ=new List<string>{
- "sameGridOnly","survivalKitAssembly"},Ϊ=new List<string>(40),Ω=new List<string>(),Ψ=new List<string>();ű Χ;TimeSpan Φ=new TimeSpan(0),
- Υ=new TimeSpan(0),Τ=new TimeSpan(0);SortedList<string,TimeSpan>Σ=new SortedList<string,TimeSpan>();SortedList<string,Ɲ>Ρ=
- new SortedList<string,Ɲ>();SortedList<string,int>Π=new SortedList<string,int>(),Ο=new SortedList<string,int>();Dictionary<
- string,Ɩ>θ=new Dictionary<string,Ɩ>();Dictionary<string,Vector2>ͺ=new Dictionary<string,Vector2>();DateTime Ͷ=DateTime.Now,ʾ=
- DateTime.Now,ʽ=DateTime.Now;string ʼ="Program",ʻ="Blast Furnace",ʺ="NDS Inventory Manager",ʹ,ʸ,ʷ,ʶ,ʵ,ʿ,ʴ,ʲ="",ʱ="",ʰ=Й[21],ʯ=
- "StoneOreToIngotBasic",ʮ="",ʭ,ʬ,ʫ="",ʪ="",ʩ="M",ʳ="B",ʨ=".",ˁ="█",ͷ="▌";const string ʹ="MyObjectBuilder_Component",ͳ="MyObjectBuilder_Ore",Ͳ=
- "MyObjectBuilder_Ingot",ͱ="MyObjectBuilder_PhysicalGunObject",Ͱ="MyObjectBuilder_GasContainerObject",ˮ="MyObjectBuilder_OxygenContainerObject",
- ˬ="MyObjectBuilder_AmmoMagazine",ˤ="MyObjectBuilder_Datapad",ˣ="MyObjectBuilder_ConsumableItem",ˢ=
- "MyObjectBuilder_PhysicalObject",ˡ="MyObjectBuilder_BlueprintDefinition",ˠ="false",ˑ="true";const bool ː=true,ˏ=false;const MyAssemblerMode ˎ=
- MyAssemblerMode.Assembly,ˍ=MyAssemblerMode.Disassembly;int ˌ=10,ˋ=0,ˊ=0,ˉ=0,ˈ=0,ˇ=0,ˀ=0,ˆ=0,κ=1,Ё=40,Ͽ=0,Ͼ=15;bool Ͻ=ˏ,ϼ=ˏ,ϻ=ː,Ϻ=ˏ,Ϲ=ˏ,
- ϸ=ˏ,Ϸ=ː,ϵ=ˏ,ϴ=ˏ,ϳ=ˏ,ϲ=ˏ,ϱ=ˏ,ϰ=ˏ,ϯ=ː,Ϯ=ˏ,ϭ=ˏ,Ϭ=ˏ,ϫ,Ϫ,ϩ=ˏ,Ϩ=ˏ,Ѐ=ˏ,Ђ=ˏ,К=ː,Л=ˏ;static string[]Й=new string[]{"Main Loop",
- "Main Control Loop","Main Output Loop","Adding Status Item","Painting Output Panel","Painting Cargo Panel","Measuring Capacities",
- "Painting Item Panel","Counting Listed Items","Distribution Loop","Distributing Item","Counting Item In Inventory","Measuring Excess",
- "Sort Loop","Storing Item","Blueprint Count Loop","Count Loop","Scanning","Processing","Listing Items","Tag Simulator",
- "Filling Dictionary","Processing Tags","Transferring Item","Spreading Items","Balancing Items","Distributing Blueprint",
- "Removing Excess Assembly","Drawing Item","Setting Block Quotas","Save","Queue Assembly","Queue Disassembly","Inserting Blueprint",
- "Count Blueprints In Assmbler","Removing Blueprint","Removing Excess Disassembly","Sort Cargo","Cargo Priority Loop","Sorting Cargo Priority",
- "Sort Blueprints","Spread Blueprints","Load","Loadouts","Sort Refineries","Custom Logic","Matching Items","Process Logic",
- "Checking Idle Assemblers","Find Mod Items","Process Setting","Panel Painter","Getting Items For Panel","Processing Item Setting",
- "Match Simulator"};double[]И;double З=0,Ж=0,Е=0,Д=5.09,Г=0,В=0,Б=0,ɢ,А,Џ,Ў,Ѝ,Ќ,Ћ=0.2,Њ=0.05,Љ=0,Ј,Ї=0.008,І=0.1,Ѕ=19.459459,Є=28.8,Ѓ=45,ϧ
- =0,ϒ=0,ϥ=0.005;StringBuilder ϐ=new StringBuilder();Dictionary<string,IEnumerator<bool>>Ϗ=new Dictionary<string,
- IEnumerator<bool>>();const TextAlignment ώ=TextAlignment.LEFT,ύ=TextAlignment.CENTER;IMyInventory ό,ɟ;List<MyInventoryItem>ϋ,ϊ,ω,ψ,
- ϑ,χ,υ,τ,σ,ς,ρ,π,ο,ξ;List<MyProductionItem>ν,μ,φ,λ,ϓ,Ϧ,Ϥ;ǝ ϣ,Ϣ,ϡ,Ϡ,ϟ,Ϟ,ϝ,Ϝ,ϛ,Ϛ,ϙ,Ϙ,ϗ;Program(){Μ=GridTerminalSystem;ϖ();ϋ=
- ę();ϊ=ę();ω=ę();ψ=ę();ϑ=ę();χ=ę();υ=ę();τ=ę();σ=ę();ς=ę();ρ=ę();π=ę();ο=ę();ξ=ę();ν=Ę();μ=Ę();φ=Ę();λ=Ę();ϓ=Ę();Ϧ=Ę();Ϥ=Ę
- ();Χ=k();if(Me.CustomData.Length==0){ϻ=ˏ;ϼ=ː;}}void ϖ(){ʹ=Ē("exclusionKeyword");ʸ=Ē("itemIngotKeyword");ʷ=Ē(
- "itemOreKeyword");ʶ=Ē("itemComponentKeyword");ʵ=Ē("itemAmmoKeyword");ʿ=Ē("itemToolKeyword");ʭ=Ē("globalFilterKeyword");ʴ=Ē(
- "preventCountingKeyword");ʩ=Ē("millionsSuffix",ˏ);ʳ=Ē("billionsSuffix",ˏ);if(Ω.Count==0)Ω=new List<string>{ʸ,ʷ,ʶ,ʿ,ʵ};Ϸ=ď("autoLoadSettings");ϫ=
- ď("dynamicQuota");Ϫ=ď("dynamicQuotaIncreaseWhenLow");Џ=Đ("dynamicQuotaPercentageIncrement");Ў=Đ(
- "dynamicQuotaMaxMultiplier");Ѝ=Đ("dynamicQuotaPositiveThreshold");Ќ=Đ("dynamicQuotaNegativeThreshold");Љ=Đ("allowedExcessPercent");Њ=Đ(
- "balanceRange");Ѓ=Đ("delayResetIdleAssembler");κ=Η["updateFrequency"];if(κ!=1&&κ!=10&&κ!=100)κ=1;ȍ();Ͼ=Η["outputLimit"];ˆ=Η[
- "autoMergeLengthTolerance"];}void ϕ(){Ї=Đ("actionLimiterMultiplier");І=Đ("runTimeLimiter");Ј=Đ("loopLimiter");Ћ=Đ("overheatAverage");ϥ=Đ(
- "tickWeight");Ё=Η["averageTicks"];}void Main(string ɳ){if((!ϸ&&!ϩ)||ϼ){try{Ͷ=DateTime.Now;ɽ();ǹ();Ȕ();Ϲ=ˏ;if(Ϸ&&!ϸ){ˀ++;if(ˀ>=900){Ϊ
- .Add("Autoload");if(Me.CustomData.Length!=ʲ.Length||string.Compare(Me.CustomData,ʲ,ˏ)!=0)ϻ=ː;ˀ=0;}}try{if(ɳ.Length!=0)ɴ(ɳ
- );}catch{Ź($"Error running command: {ɳ}");}if(Ћ<=0.0||ϒ<=Ћ){ˉ=0;if(!Ͻ){щ();}else{if(ϻ){if(ҋ())ϻ=ˏ;}else if(ϼ){if(Ҏ())ϼ=ˏ;
- }else Ҋ();}}else ˉ++;if(ϯ)try{ϔ();}catch{Ź("Error caught in echo");}}catch{Ź("Error in main");}}else{if(ϸ)Echo(
- "Please recompile to complete reset!");if(ϩ)Echo("Remove any settings you want to update/reset and recompile");}}void ϔ(){string C="*",D,Q,T;ˌ+=κ;if(Л){if(ˉ
- ==0){int È;if(ʪ.Length>0){if(ч(Й[20],Й[54],Χ,$"[{ʪ}]")){ʫ=ʪ;ʪ="";Ψ.Clear();È=Χ.Ū();for(int K=0;K<È;K++){D=Χ.ŷ(K);å(D,out Q
- ,out T);C=$"({э(D)})";Ψ.Add($"{µ(Q,T)} {C}");}Χ.Ŭ();}}}}if(ˌ>=7){ˌ=0;if(ϵ){Echo("--Merging Menu--");Echo(
- "--Enter 'merge' to cancel--");if(ʱ.Length==0){Echo("Choose Item");for(int K=0;K<έ.Count;K++)Echo($"{K+1} : {έ[K]}");if(έ.Count==0)ϵ=ˏ;}else{Echo(
- $"Choose Blueprint For {ʱ}");for(int K=0;K<ά.Count;K++)Echo($"{K+1} : {ά[K]}");if(ά.Count==0){ϵ=ˏ;ʱ="";}}}else if(ϲ){Echo("--Merge Help List--");
- Echo("--Enter 'merge?' to hide--");Echo("--Enter 'merge' to begin merge--");for(int K=0;K<έ.Count;K++)Echo($"ITM: {έ[K]}");
- for(int K=0;K<ά.Count;K++)Echo($"BPT: {ά[K]}");}else if(ϱ){Echo($"--Functions List ({Ϗ.Count}/{Ρ.Count})--");Echo(
- "--Enter 'functions?' to hide--");string ɶ,ý;double Ɯ,ƛ,ɵ;bool Ȫ;foreach(KeyValuePair<string,Ɲ>ċ in Ρ){ý=ċ.Key;Ɯ=Ρ[ý].ƚ;ƛ=Ρ[ý].ƙ;ɵ=Ρ[ý].Ɨ.
- TotalMilliseconds;Ȫ=Ĥ(ý);ɶ=ý;if(Ȫ)ɶ+=" : Active";Echo(ɶ);ɶ=$"-Ticks: {ķ(Ɯ)}";if(Ȫ)ɶ+=$" : {ķ(Ρ[ý].Ɯ)}";Echo(ɶ);ɶ=$"-Time: {Ė(ɵ)}";if(Ȫ)ɶ
- +=$" : {Ė(Ρ[ý].æ.TotalMilliseconds)}";Echo(ɶ);ɶ=$"-Actions: {ķ(ƛ)}";if(Ȫ)ɶ+=$" : {ķ(Ρ[ý].ƛ)}ops";Echo(ɶ);if(Ɯ>0)Echo(
- $"-Avg: {(ɵ/Ɯ).ToString("N2")}ms, {Math.Ceiling(ƛ/Ɯ)}ops");Echo($"-Runs: {ķ(Ρ[ý].Ƙ)}");}}else if(Ђ){Echo("--Delay List--");Echo("--Enter 'delays?' to hide--");List<Ÿ>Ƞ=new List<
- Ÿ>{new Ÿ{n=Φ.TotalSeconds,õ="Scan and Process"},new Ÿ{n=Υ.TotalSeconds,õ="Fill Bottles"}};if(Ϸ)Ƞ.Add(new Ÿ{n=15.0-((
- double)ˀ/60.0),õ="Reload"});foreach(KeyValuePair<string,TimeSpan>ċ in Σ)Ƞ.Add(new Ÿ{n=ċ.Value.TotalSeconds,õ=$"{ċ.Key}"});Ƞ=Ƞ.
- OrderBy(Ċ=>Ċ.n).ToList();foreach(Ÿ ȟ in Ƞ)Echo($"{ȟ.õ}: {Math.Ceiling(ȟ.n)}s");}else if(Л){Echo("--Match Simulator--");Echo(
- "--Enter 'match' to hide--");if(ʪ.Length>0){Echo($"--Matching: {ʪ}--");if(ˉ>0)Echo($"Overheat Ticks: {ˉ}");}else Echo(
- "--Enter text and press Run--");if(ʫ.Length>0){Echo($"--Matches for {ʫ}--");for(int K=0;K<Ψ.Count;K++)Echo($"{Ψ[K]}");}}else{Echo($"Main: {ʰ}");Echo(
- $"Current: {ʼ}");Echo($"Last: {ó(Runtime.LastRunTimeMs,4)}");Echo($"Avg: {ó(ϒ,4)}");Echo($"Blocks: {Ό.Count}");Echo(
- $"Panels: {Ί.Count}");Echo($"Active Functions: {Ϗ.Count}");if(έ.Count>0||ά.Count>0){Echo($"Mod Items: {έ.Count}");Echo(
- $"Mod Blueprints: {ά.Count}");if(έ.Count>0&&ά.Count>0)Echo("-Enter 'merge' to begin merge");}if(ˉ>0)Echo($"Overheat Ticks: {ˉ}");if(ʮ.Length>0){Echo
- ($"Last: {ʮ}");if(DateTime.Now>=ʾ)ʮ="";}}for(int K=0;K<10;K++)Echo("");}}void ɴ(string ɳ){string ɲ=ɳ.ToLower(),Ń,ý,Ä,Ë;ã(
- $"Running argument: {ɳ}");Ń=ɲ.Replace(" ","");if(ɲ.Contains(" ")){ý=ɲ.Substring(0,ɲ.IndexOf(" "));Ë=ɲ.Substring(ɲ.IndexOf(" ")+1);}else{ý="";Ë=
- "";}bool ɱ=ϵ||Л;if(Ń=="merge"){ʱ="";ϵ=!ϵ;if(έ.Count==0){ϵ=ˏ;ã("Mod items required for merge");}else if(ά.Count==0){ϵ=ˏ;ã(
- "Mod blueprints required for merge");}else{if(ϵ)ã("Opened Merge Menu");else ã("Closed Merge Menu");}return;}else if(Ń=="match"){Л=!Л;if(!Л)é(new int[]{54,
- 20});return;}if(ϵ){int q;if(int.TryParse(ɳ,out q)){q--;if(ʱ.Length==0){if(q<έ.Count){ʱ=έ[q];}}else if(q<ά.Count){ǻ(ʱ,ά[q])
- ;ά.RemoveAt(q);ʱ="";ϵ=έ.Count>0&&ά.Count>0;ϼ=ː;}}}else if(Л){if(!Ń.Contains(":"))Ń=$"*:{Ń}";if(ʪ.Length==0&&Ń!=ʫ){ʪ=Ń;Χ.Ŭ
- ();}}if(!ɱ){ɱ=ː;string À;switch(Ń){case"ping":Ź("Pong!");break;case"save":if(!ϻ){ã("Started save process");ϼ=ː;}else ã(
- "Load process is active, please wait to save!");break;case"load":if(!ϼ){ã("Started load process");ϻ=ː;}else ã("Save process is active, please wait to load!");break;
- case"clearqueue":for(int K=0;K<η.Count;K++){try{((IMyAssembler)Ό[η[K]].F).ClearQueue();}catch{}}ã("Assembler queues cleared"
- );break;case"reset":Me.CustomData="";ϸ=ː;ϼ=ː;ã("Save and reset process started");break;case"update":ϼ=ː;ϩ=ː;ã(
- "Save and update process started");break;case"clearfunctions":ŧ();ã("Active processes stopped");break;case"merge?":ϲ=!ϲ;if(έ.Count+ά.Count==0){ϲ=ˏ;ã(
- "No mod items or blueprints to display");}else{if(ϲ)ã("Opened Merge Help List");else ã("Closed Merge Help List");}break;case"functions?":ϱ=!ϱ;break;case
- "delays?":Ђ=!Ђ;break;case"scan":Φ=TimeSpan.FromSeconds(0);Σ.Clear();ŧ();ã("Functions and delays reset");break;case"echo":ϯ=!ϯ;
- Echo($"Echo Allowed: {ϯ}");break;case"error":Ϭ=!Ϭ;if(Ϭ)ã("Error filter enabled, use 'error' to disable");else ã(
- "Error filter disabled");break;case"full":for(int K=0;K<Θ.Count;K++)for(int Ċ=0;Ċ<Θ.Values[K].Count;Ċ++){À=Θ.Values[K].Keys[Ċ];Č(À,K<2||(!Ê(À,
- "useconveyor")&&!Ϋ.Contains(À)));}ã("All functions");ϼ=ː;break;case"basic":for(int K=0;K<Θ.Count;K++)for(int Ċ=0;Ċ<Θ.Values[K].Count;
- Ċ++)Č(Θ.Values[K].Keys[Ċ],K==0);ã("Basic functions only");ϼ=ː;break;case"monitor":for(int K=0;K<Θ.Count;K++)for(int Ċ=0;Ċ
- <Θ.Values[K].Count;Ċ++){À=Θ.Values[K].Keys[Ċ];Č(À,À=="autoLoadSettings"||Ê(À,"useconveyor")||Ê(À,"count"));}ã(
- "Monitoring only");ϼ=ː;break;case"resize":ͺ.Clear();break;default:if(ý.Length==0)ã($"Unhandled command: {ɳ}");ɱ=ˏ;break;}}if(!ɱ&&ý.Length
- !=0)switch(ý){case"setgroup":Ä=Ë.Substring(0,Ë.IndexOf(" "));Ë=Ë.Substring(Ë.IndexOf(" ")+1);Õ(Ä,Ë);ϼ=ː;break;case"set":Ä=
- Ë.Substring(0,Ë.IndexOf(" "));Ë=Ë.Substring(Ë.LastIndexOf(" ")+1);Å(Ä,Ë);ϼ=ː;break;default:ã($"Unhandled command: {ɳ}");
- break;}}void ɽ(){Τ=Runtime.TimeSinceLastRun;ç(ref Φ);ç(ref Υ);try{for(int K=0;K<Σ.Count;K++)Σ[Σ.Keys[K]]=ç(Σ.Values[K]);}
- catch{}}TimeSpan ç(TimeSpan æ){if(æ.TotalMilliseconds>=Τ.TotalMilliseconds)return æ-Τ;return new TimeSpan(0);}bool ɼ(string ɬ
- ){if(!Ĥ(Й[53])){ȏ(ɻ(ɬ),Й[53]);if(!Û())return ˏ;}return Ù(Й[53]);}IEnumerator<bool>ɻ(string ɬ){string ɺ=ɬ.Replace("||",";"
- ),ý,Ë,Q="",T="";string[]ɹ=ɺ.Split(';');double ŭ,ɸ,ɷ;bool ɾ=ˏ;int q;Ǭ ª=new Ǭ();for(int K=0;K<ɹ.Length;K++){if(!Û())yield
- return ː;if(į(ɹ[K],out ý,out Ë)){ý=ý.ToLower();if(ý=="type")Q=Ë;else if(ý=="subtype")T=Ë;}if(Q.Length>0&&T.Length>0)break;}if(
- Q.Length>0&&T.Length>0){ȕ(T,T,Q,"");ɾ=Ļ(out ª,$"{Q}/{T}");}if(ɾ){for(int K=0;K<ɹ.Length;K++){if(!Û())yield return ː;if(į(
- ɹ[K],out ý,out Ë)){switch(ý.Replace(" ","").ToLower().Trim()){case"name":ª.ǫ=Ë;break;case"quota":q=Ë.IndexOf("<");if(q>0)
- {if(double.TryParse(Ë.Substring(0,q),out ŭ)&&double.TryParse(Ë.Substring(q+1),out ɷ)){ª.ŭ=ŭ;if(ɷ<ŭ)ɷ=ŭ;if(ɷ<0)ɷ=0;ª.Ǎ=ɷ;}
- }else{if(double.TryParse(Ë,out ŭ)){ª.ŭ=ŭ;if(ŭ<0)ŭ=0;ª.Ǎ=ŭ;}}break;case"category":ª.C=Ë;Ë=Ë.ToLower();if(!Ω.Contains(Ë)){Ω
- .Add(Ë);Ͽ=Math.Max(Ͽ,Ë.Length);}if(!Ν.ContainsKey(Ë))Ν[Ë]=new List<int>();break;case"blueprint":ª.U=Ë;if(Ë.Length>0)έ.
- Remove(ª.ƫ());break;case"assemblymultiplier":if(double.TryParse(Ë,out ɸ))ª.Ǐ=ɸ;break;case"assemble":ª.ƪ=Ř(Ë,ˑ);break;case
- "disassemble":ª.Ʃ=Ř(Ë,ˑ);break;case"refine":ª.ƨ=Ř(Ë,ˑ);break;case"basicrefine":ª.Ʀ=Ř(Ë,ˑ);break;case"display":ª.Ƨ=Ř(Ë,ˑ);break;case
- "orekeys":string[]Ƥ=Ë.Substring(1,Ë.Length-2).Split('|');if(Ƥ.Length>0){ª.Ƥ.Clear();ª.Ƥ.AddRange(Ƥ);}if(ª.Ƥ.Count==0)ª.Ƥ.Add(T);
- break;case"fuel":ª.Ƭ=Ř(Ë,ˑ);break;}}}if(ª.U.Length>0)Έ[ª.U]=Œ(ª);ͼ[ª.ƫ()]=ª.Ơ();Ǻ(ª);}}bool ɣ(ref double ɢ,IMyInventory ɟ,ǝ ɞ
- ,MyInventoryItem E){if(!Ĥ(Й[23])){ȏ(ɠ(ɢ,ɟ,ɞ,E),Й[23]);if(!Û())return ˏ;}bool ɡ=Ù(Й[23]);if(ɡ){ɢ-=З;З=0;return ː;}return ˏ
- ;}IEnumerator<bool>ɠ(double ɢ,IMyInventory ɟ,ǝ ɞ,MyInventoryItem E){ό=ɞ.F.GetInventory(0);if(ό!=ɟ){bool ɝ=ˏ,ɜ=ˏ;double ɛ=
- ɞ.ǜ.ų(ref ɝ,E),ɚ=0,ə=w(E,ɞ.F),ɘ=ɢ;if(ɝ){while(!С(ref ɚ,E,ɞ.F))yield return ː;if((ɛ<=0||ɚ>=ɛ))ɜ=ː;else if(ɘ+ɚ>ɛ)ɘ=ɛ-ɚ;}if(
- !ɜ){if(ɘ>ə)ɘ=ə;if(!d(E))ɘ=Math.Floor(ɘ);if(ɘ>0){if(ό.TransferItemFrom(ɟ,E,(MyFixedPoint)ɘ)){Ź(
- $"Moved {ķ(ɘ).PadRight(6)} {ō(µ(E),12).PadRight(12)} to {ō(ɞ.F.CustomName,12).PadRight(12)}");З=ɘ;}}}}yield return ˏ;}bool ɗ(List<string>Ȧ,ű j=null,List<string>ɖ=null){if(!Ĥ(Й[52])){ȏ(ɥ(Ȧ,j,ɖ),Й[52]);if(!Û())
- return ˏ;}return Ù(Й[52]);}IEnumerator<bool>ɥ(List<string>Ȧ,ű j,List<string>ɖ){string D;if(j!=null){int ɰ=j.Ū();for(int K=0;K<
- ɰ;K++){if(K>0&&!Û())yield return ː;D=j.ŷ(K);if(!Ȧ.Contains(D))Ȧ.Add(D);}}if(ɖ!=null){ű ɯ=k();List<Ǭ>Ò=ĝ();foreach(Ǭ ª in
- Ò){if(!Û())yield return ː;D=ª.ƫ();if(ɖ.Contains(ª.Ơ())&&!Ȧ.Contains(D))Ȧ.Add(D);}}yield return ˏ;}bool ɮ(string ɬ){if(!Ĥ(
- Й[50])){ȏ(ɭ(ɬ),Й[50]);if(!Û())return ˏ;}return Ù(Й[50]);}IEnumerator<bool>ɭ(string ɬ){int q=ɬ.IndexOf("=");string ɫ,ɪ;if(
- q!=-1){string ý=ɬ.Substring(0,q).Trim();ɫ=ɬ.Substring(q+1).Trim();if(Ř(ý,"name")){while(!ɼ(ɬ))yield return ː;}else if(ý==
- "group"){q=ɫ.IndexOf("=");ɪ=ɫ.Substring(0,q).ToLower();ɫ=ɫ.Substring(q+1).Trim();ű j=k();while(!ч(Й[22],Й[46],j,ɫ))yield return
- ː;if(ɪ.Length!=0&&j.Ū()!=0)Δ[ɪ]=j;}else{ɫ=ɬ.Substring(q+1).Trim();double ɩ;bool ɨ=!Ř(ɫ,ˠ);if(!double.TryParse(ɫ,out ɩ))ɩ=
- 0;if(ý=="script"){if(ɫ==ʺ)ϴ=ː;}else if(ý=="version"){if(ɩ==Д)ϳ=ː;}else if(Η.ContainsKey(ý))Η[ý]=(int)ɩ;else if(!Ď(ý,ɫ)&&!
- č(ý,ɩ)&&!Č(ý,ɨ)){if(Ζ.ContainsKey(ý)&&Ê(ɫ,"[")&&ɫ.EndsWith("]")){ɫ=ɫ.Substring(1,ɫ.Length-2);string[]ɧ=ɫ.Split(new char[]
- {'|'},StringSplitOptions.RemoveEmptyEntries);Ζ[ý].Clear();for(int K=0;K<ɧ.Length;K++){if(!Û())yield return ː;Ζ[ý].Add(ɧ[K
- ]);}}}}}yield return ˏ;}bool ɦ(string Ø){if(!Ĥ(Ø)){ȏ(ɤ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>ɤ(){for(int K
- =0;K<η.Count;K++){if(K>0&&!Û())yield return ː;Ϧ.Clear();if(!ļ(η[K]))continue;((IMyAssembler)Ό[η[K]].F).GetQueue(Ϧ);for(
- int IJ=0;IJ<Ϧ.Count;IJ++){if(IJ>0&&!Û())yield return ː;if(Ő(Ϧ[IJ]))Ì(Ϧ[IJ]);}}for(int K=0;K<Ό.Count;K++){if(K>0&&!Û())yield
- return ː;σ.Clear();if(!ļ(K))continue;Ό[K].F.GetInventory(0).GetItems(σ);for(int IJ=0;IJ<σ.Count;IJ++){if(IJ>0&&!Û())yield return ː
- ;if(ő(σ[IJ])){Ź($"Unknown Item: {ō(σ[IJ].Type.SubtypeId,14)}, found in: {ō(Ό[K].F.CustomName,14)}");Í(σ[IJ]);}}}yield return
- ˏ;}bool ʜ(string Ø){if(!Ĥ(Ø)){ȏ(ʛ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>ʛ(){IMyAssembler H;Ɩ ʚ;bool ʙ;List
- <string>ʘ=θ.Keys.ToList();for(int K=0;K<η.Count;K++){if(!Û())yield return ː;if(!ļ(η[K]))continue;ϙ=Ό[η[K]];if(!θ.
- ContainsKey(ϙ.Dz())||ė(B(ϙ.F),"noreset"))continue;ʚ=θ[ϙ.Dz()];ʘ.Remove(ϙ.Dz());if(ʚ.Ƒ(Ѓ)){H=(IMyAssembler)ϙ.F;Ϥ.Clear();H.GetQueue(Ϥ);
- if(ʚ.ƒ){if(Ϥ.Count==ʚ.ƕ.Count){for(int Ċ=0;Ċ<Ϥ.Count;Ċ+=0){ʙ=ˏ;for(int IJ=0;IJ<ʚ.ƕ.Count;IJ++){if(!Û())yield return ː;if(Ϥ[Ċ]
- .BlueprintId.SubtypeName==ʚ.ƕ[IJ].BlueprintId.SubtypeName&&(double)Ϥ[Ċ].Amount>=(double)ʚ.ƕ[IJ].Amount){ʚ.ƕ.RemoveAt(IJ);ʙ=ː
- ;break;}}if(ʙ)Ϥ.RemoveAt(Ċ);else Ċ++;}if(Ϥ.Count==0&&ʚ.ƕ.Count==0){ã($"Reset Idle Assembler: {ō(H.CustomName,15)}");H.
- ClearQueue();ς.Clear();H.GetInventory(0).GetItems(ς);for(int Ċ=0;Ċ<ς.Count;Ċ++)while(!Ч(ς[Ċ],η[K],0))yield return ː;ς.Clear();H.
- GetInventory(1).GetItems(ς);for(int Ċ=0;Ċ<ς.Count;Ċ++)while(!Ч(ς[Ċ],η[K],1))yield return ː;}else ʚ.Ǝ(ˏ);}else ʚ.Ǝ(ˏ);}else ʚ.Ǝ(ː,Ϥ);
- }}for(int K=0;K<ʘ.Count;K++){if(!Û())yield return ː;θ.Remove(ʘ[K]);}yield return ˏ;}bool ʖ(string Ø,ű j,List<string>ɖ,
- string Ä,bool Ŷ=ː,double n=0){if(!Ĥ(Ø)){List<Ǭ>Ò=ĝ();ȏ(ʗ(j,Ò,ɖ,Ä,Ŷ,n),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>ʗ(ű j
- ,List<Ǭ>Ò,List<string>ɖ,string Ä,bool Ŷ,double n){Ǭ ª;bool ʦ=ˏ;if(Ä.Length>0)for(int K=0;K<Ò.Count;K++){if(K>0&&!Û())
- yield return ː;if(ɖ.Contains("*")||ɖ.Contains(Ò[K].Ơ())){ª=Ò[K];if(Ä.Length>2)ʦ=Ä.StartsWith("'")&&Ä.EndsWith("'");if(Ä=="*"
- ||(ʦ&&Ř(ª.ǫ.Replace(" ",""),Ä.Substring(1,Ä.Length-2)))||(!ʦ&&Ê(ª.ǫ,Ä)))j.ŵ(ª.Q,ª.T,n,Ŷ);}}yield return ˏ;}bool ʥ(ǝ ĥ){if(
- !Ĥ(Й[47])){ȏ(ʤ(ĥ),Й[47]);if(!Û())return ˏ;}return Ù(Й[47]);}IEnumerator<bool>ʤ(ǝ ĥ){ĥ.ǘ=new List<ǡ>();List<string>ʣ=new
- List<string>();string ŋ,ʢ,ʡ="[logic",Q="",T="",ŗ=">",û="";string[]ʠ;char ʟ='&';bool ʞ=ˏ,ʝ=ˏ;int q,ɰ,ʧ;ŋ=ĥ.dz().Replace(" ",""
- );while(ŋ.Contains(ʡ)){if(!Û())yield return ː;ŋ=ŋ.Substring(ŋ.IndexOf(ʡ)+ʡ.Length);q=ŋ.IndexOf("]");ʢ=ŋ.Substring(0,q);ŋ=
- ŋ.Substring(q+1);if(ʢ.StartsWith("&")){if(!ʞ&&!ʝ)ʞ=ː;ʢ=ʢ.Substring(1);ʟ='&';}else if(ʢ.StartsWith("|")){if(!ʞ&&!ʝ)ʝ=ː;ʢ=ʢ
- .Substring(1);ʟ='|';}if(ė(ʢ,ʟ.ToString()))ʠ=ʢ.Split(ʟ);else ʠ=new string[]{ʢ};for(int Ċ=0;Ċ<ʠ.Length;Ċ++){if(!Û())yield
- return ː;ʣ.Add(ʠ[Ċ]);}}ĥ.ǒ=ʟ=='&';if(ʣ.Count>0){ű j=k(),ʈ=k();for(int Ċ=0;Ċ<ʣ.Count;Ċ++){if(!Û())yield return ː;try{û=ʣ[Ċ];q=û
- .IndexOf(":");Q=û.Substring(0,q);û=û.Substring(q+1);if(û.Contains(">="))ŗ=">=";else if(û.Contains("<="))ŗ="<=";else if(û.
- Contains(">"))ŗ=">";else if(û.Contains("<"))ŗ="<";else if(û.Contains("="))ŗ="=";q=û.IndexOf(ŗ);T=û.Substring(0,q);û=û.Substring(
- q+ŗ.Length);}catch{}j.Ŭ();while(!ʖ(Й[46],j,new List<string>{Q},T))yield return ː;ɰ=j.Ū();q=û.IndexOf(":");if(q>0){ʈ.Ŭ();Q
- =û.Substring(0,q);T=û.Substring(q+1);while(!ʖ(Й[46],ʈ,new List<string>{Q},T))yield return ː;ʧ=ʈ.Ū();for(int K=0;K<ɰ;K++){
- for(int IJ=0;IJ<ʧ;IJ++){if(!Û())yield return ː;ĥ.ǘ.Add(new ǡ{Q=j.ŷ(K),ť=ʈ.ŷ(IJ),ŗ=ŗ});}}}else{for(int K=0;K<ɰ;K++){if(!Û())
- yield return ː;ĥ.ǘ.Add(new ǡ{Q=j.ŷ(K),ť=û,ŗ=ŗ});}}}}yield return ˏ;}bool ʇ(string Ø){if(!Ĥ(Ø)){ȏ(ʆ(),Ø);if(!Û())return ˏ;}
- return Ù(Ø);}IEnumerator<bool>ʆ(){IMyInventory ʅ,ʄ;int ʉ,ʃ;ű j=k(),ʂ;Ǭ ª;double ʁ;bool ʀ=ˏ;for(int K=0;K<Ό.Count;K++){if(!Û())
- yield return ː;if(!ļ(K))continue;Ϡ=Ό[K];ʉ=Ϡ.Ǜ.Ū();if(ʉ!=0){ʅ=Ϡ.F.GetInventory(0);j.Ŭ();ʂ=new ű(Ϡ.Ǜ);if(Ϡ.F is IMyAssembler&&!
- ((IMyAssembler)Ϡ.F).IsQueueEmpty&&Ϡ.Ǚ!=null)ʂ.ū(Ϡ.Ǚ);while(!г(j,new List<int>{K}))yield return ː;ʃ=j.Ū();for(int Ċ=0;Ċ<ʃ;
- Ċ++){if(!Û())yield return ː;ª=j.ũ(Ċ);if(ª.T.Length>0)ʂ.ŵ(ª.Q,ª.T,-ª.Ǫ);}for(int Ċ=0;Ċ<ʃ&&!ʀ;Ċ++){if(!Û())yield return ː;
- try{ª=ʂ.ũ(Ċ);ʀ=ª.Ǫ<0;}catch{}}if(ʀ){ρ.Clear();ʅ.GetItems(ρ);for(int Ċ=0;Ċ<ρ.Count;Ċ++){ʁ=ʂ.ų(ρ[Ċ]);if(ʁ<0){ʁ*=-1.0;ʁ=Math.
- Min(ʁ,(double)ρ[Ċ].Amount);while(!Ч(ρ[Ċ],K,0,ʁ))yield return ː;}}}for(int Ċ=0;Ċ<ή.Count&&ŏ(ʂ);Ċ++){if(!Û())yield return ː;ρ
- .Clear();if(!ļ(ή[Ċ]))continue;ϟ=Ό[ή[Ċ]];ʄ=ϟ.F.GetInventory(0);ʄ.GetItems(ρ);for(int IJ=0;IJ<ρ.Count&&ŏ(ʂ);IJ++){if(!Û())
- yield return ː;if(ʂ.ų(ρ[IJ])>0){try{ʁ=ʂ.ų(ρ[IJ]);if(ʁ>(double)ρ[IJ].Amount)ʁ=(double)ρ[IJ].Amount;if(!d(ρ[IJ]))ʁ=Math.Floor(ʁ);if(
- ʁ>0){if(ʅ.TransferItemFrom(ʄ,ρ[IJ],(MyFixedPoint)ʁ))ʂ.ŵ(ρ[IJ].Type.TypeId,ρ[IJ].Type.SubtypeId,-ʁ);}}catch{}}}}}}yield
- return ˏ;}bool ɿ(string Ø){if(!Ĥ(Ø)){ȏ(ʕ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>ʕ(){List<Ÿ>Ƞ=new List<Ÿ>();
- IMyInventory ʔ;double ʓ=0,ʒ=0;for(int K=0;K<ί.Count;K++){if(!Û())yield return ː;if(!ļ(ί[K]))continue;Ϙ=Ό[ί[K]];ʔ=Ϙ.F.GetInventory(0)
- ;π.Clear();Ƞ.Clear();ʔ.GetItems(π);if(π.Count<=1){if(Ϙ.F.CustomData.Length==0)Ϙ.ǜ.Ŭ();continue;}for(int Ċ=0;Ċ<π.Count;Ċ++
- ){if(!Û())yield return ː;Ƞ.Add(new Ÿ{n=ŕ(π[Ċ]),Ű=Ċ});if(Ċ==0){ʓ=Ƞ[Ƞ.Count-1].n;ʒ=Ƞ[Ƞ.Count-1].n;}else{ʓ=Math.Min(ʓ,Ƞ[Ƞ.
- Count-1].n);ʒ=Math.Max(ʒ,Ƞ[Ƞ.Count-1].n);}}if(Ϙ.F.CustomData.Length==0)Ϙ.ǜ.Ŭ();if(ʓ!=ʒ){Ƞ=Ƞ.OrderBy(Ċ=>Ċ.n).ToList();ο.Clear(
- );double ʑ=0,Æ=(double)ʔ.MaxVolume/c(π[0]),ʐ;for(int Ċ=0;Ċ<Ƞ.Count;Ċ++){if(!Û())yield return ː;ο.Add(π[Ƞ[Ċ].Ű]);}if(ο.
- Count>1){int ʏ=Η["prioritizedOreCount"];if(ʏ==0){for(int ʍ=1;ʍ<=Ƞ.Count;ʍ++)ʑ+=ʍ;}else{int ʎ=0;for(int ʍ=Ƞ.Count;ʍ>0;ʍ--){if(
- ʎ<ʏ){ʎ++;ʑ+=ʍ;}else ʑ++;}}ʐ=ο.Count;for(int Ċ=0;Ċ<ο.Count;Ċ++){if(!Û())yield return ː;if(Ϙ.F.CustomData.Length==0){if(ʏ>0
- &&Ċ>=ʏ)ʐ=1;Ϙ.ǜ.ŵ(ο[Ċ].Type.TypeId,ο[Ċ].Type.SubtypeId,(ʐ/ʑ)*Æ,ˏ);}for(int ʍ=0;ʍ<ʔ.ItemCount;ʍ++){if(!Û())yield return ː;
- try{MyInventoryItem E=(MyInventoryItem)ʔ.GetItemAt(ʍ);if(E.Type.ToString()==ο[Ċ].Type.ToString()){ʔ.TransferItemFrom(ʔ,ʍ,Ċ,
- ˏ,ο[Ċ].Amount);break;}}catch{}}if(ʐ>1)ʐ--;}}}}yield return ˏ;}bool ʌ(string Ø){if(!Ĥ(Ø)){ȏ(ʋ(),Ø);if(!Û())return ˏ;}
- return Ù(Ø);}IEnumerator<bool>ʋ(){bool ǒ,ʊ=ː;Ǭ ª;for(int K=0;K<Ή.Count;K++){if(K>0&&!Û())yield return ː;Ϟ=Ή[K];if(!(Ϟ.F is
- IMyTimerBlock)||((IMyFunctionalBlock)Ϟ.F).Enabled){ǒ=Ϟ.ǒ;for(int Ċ=0;Ċ<Ϟ.ǘ.Count;Ċ++){if(Ċ>0&&!Û())yield return ː;if(Ļ(out ª,Ϟ.ǘ[Ċ].Q
- ))ʊ=Ŏ(ª,Ϟ.ǘ[Ċ].ŗ,Ϟ.ǘ[Ċ].ť);if((!ʊ&&ǒ)||(ʊ&&!ǒ))break;}if(Ϟ.F is IMyTimerBlock){if(ʊ)((IMyTimerBlock)Ϟ.F).Trigger();}else(
- (IMyFunctionalBlock)Ϟ.F).Enabled=ʊ;}}yield return ˏ;}void Ҋ(){if(!Ĥ(Й[0]))ȏ(ҁ(),Й[0]);else Ù(Й[0]);}IEnumerator<bool>ҁ(){
- while(ː){Ҁ();if(!Û(Ј))yield return ː;Ѿ();ͽ[Й[0]]="";if(!Û(Ј))yield return ː;}}void Ҁ(){if(!Ĥ(Й[1]))ȏ(ѿ(),Й[1]);else Ù(Й[1]);}
- IEnumerator<bool>ѿ(){string ý;while(ː){if(ˈ>=10){ˈ=0;for(int K=2;K<Й.Length;K++){if(!Û())yield return ː;if(Ĥ(Й[K]))Ǹ(Й[K]);}}if(Φ.
- TotalSeconds<=0.0){ϰ=ː;ʰ=Й[17];while(!є(ʰ))yield return ː;ʰ=Й[18];while(!ȇ(ʰ))yield return ː;ä();ϰ=ˏ;Φ=TimeSpan.FromSeconds(Đ(
- "scanDelay"));}if(ď("countItems")){ʰ=Й[16];while(!ї(ʰ))yield return ː;ä();}if(ď("countBlueprints")){ʰ=Й[15];while(!љ(Й[15]))yield
- return ː;ä();}if(ď("sortBlueprints")){ý=Й[40];if(Ŀ(ý)){ʰ=ý;while(!ҳ(ý))yield return ː;ä();Σ[ý]=ø(Đ("delaySortBlueprints"));}}
- if(ď("queueAssembly")&&ď("countBlueprints")){ý=Й[31];if(Ŀ(ý)){ʰ=ý;while(!ѭ(ý))yield return ː;ä();Σ[ý]=ø(Đ(
- "delayQueueAssembly"));}}if(ď("queueDisassembly")&&ď("countBlueprints")){ý=Й[32];if(Ŀ(ý)){ʰ=ý;while(!Ѫ(ý))yield return ː;ä();Σ[ý]=ø(Đ(
- "delayQueueDisassembly"));}}if(ď("removeExcessAssembly")&&ď("countBlueprints")){ý=Й[27];if(Ŀ(ý)){ʰ=ý;while(!ҩ(ý))yield return ː;ä();Σ[ý]=ø(Đ(
- "delayRemoveExcessAssembly"));}}if(ď("removeExcessDisassembly")&&ď("countBlueprints")){ý=Й[36];if(Ŀ(ý)){ʰ=ý;while(!Һ(ý))yield return ː;ä();Σ[ý]=ø(Đ
- ("delayRemoveExcessDisassembly"));}}if(ˋ>0&&ď("sortRefineries")){ý=Й[44];if(Ŀ(ý)){ʰ=ý;while(!ɿ(ý))yield return ː;ä();Σ[ý]
- =ø(Đ("delaySortRefinery"));}}if(Ѐ&&ď("processLimits")){ý=Й[12];if(Ŀ(ý)){ʰ=ý;while(!П(ý))yield return ː;ä();Σ[ý]=ø(Đ(
- "delayProcessLimits"));}}if(ď("sortItems")){ý=Й[13];if(Ŀ(ý)){ʰ=ý;while(!М(ý))yield return ː;ä();Σ[ý]=ø(Đ("delaySortItems"));}}if(ď(
- "distributeItems")){ý=Й[9];if(Ŀ(ý)){if(Đ("delayFillingBottles")>0&&Υ.TotalMilliseconds<=0.0)Ϻ=ː;else Ϻ=ˏ;ʰ=ý;while(!б(ý))yield return ː;ä
- ();if(Ϻ)Υ=ø(Đ("delayFillingBottles"));Σ[ý]=ø(Đ("delayDistributeItems"));}}ý=Й[24];if(Ŀ(ý)){if(ί.Count>1&&ď(
- "spreadRefineries")){ʰ="Spreading Refineries";while(!Ң(ί,ý))yield return ː;}if(ΰ.Count>1&&ď("spreadReactors")){ʰ="Spreading Reactors";
- while(!Ң(ΰ,ý))yield return ː;}if(δ.Count>1&&ď("spreadGuns")){ʰ="Spreading Weapons";while(!Ң(δ,ý))yield return ː;}if(ζ.Count>1
- &&ď("spreadH2/O2Gens")){ʰ="Spreading O2/H2 Gens";while(!Ң(ζ,ý))yield return ː;}if(ε.Count>1&&ď("spreadGravelSifters")){ʰ=
- "Spreading Gravel Sifters";while(!Ң(ε,ý))yield return ː;}if(α.Count>1&&ď("spreadParachutes")){ʰ="Spreading Parachutes";while(!Ң(α,ý))yield return
- ː;}ä();Σ[ý]=ø(Đ("delaySpreadItems"));}if(ϭ&&ď("sortCargoPriority")){ý=Й[38];if(Ŀ(ý)){ʰ=ý;while(!Ҹ(ý))yield return ː;ä();Σ
- [ý]=ø(Đ("delaySortCargoPriority"));}}if(η.Count>1&&ď("spreadBlueprints")){ý=Й[41];if(Ŀ(ý)){ʰ=ý;while(!қ(ý))yield return ː
- ;ä();Σ[ý]=ø(Đ("delaySpreadBlueprints"));}}if(Ϩ&&ď("doLoadouts")){ý=Й[43];if(Ŀ(ý)){ʰ=ý;while(!ʇ(ý))yield return ː;ä();Σ[ý]
- =ø(Đ("delayLoadouts"));}}if(Ή.Count>0&&ď("triggerLogic")){ý=Й[45];if(Ŀ(ý)){ʰ=ý;while(!ʌ(ý))yield return ː;ä();Σ[ý]=ø(Đ(
- "delayTimerLogic"));}}if(η.Count>0&&ď("resetIdleAssemblers")){ý=Й[48];if(Ŀ(ý)){ʰ=ý;while(!ʜ(ý))yield return ː;ä();Σ[ý]=ø(Đ(
- "delayCheckIdleAssemblers"));}}if(ď("findModItems")){ý=Й[49];if(Ŀ(ý)){ʰ=ý;while(!ɦ(ý))yield return ː;ä();Σ[ý]=ø(Đ("delayFindModItems"));}}ͽ[Й[1]]=
- "";yield return ː;}}void Ѿ(){if(!Ĥ(Й[2])){ȏ(ѽ(),Й[2]);if(!Û())return;}Ù(Й[2]);}IEnumerator<bool>ѽ(){List<ǝ>Ѽ=new List<ǝ>(Ί
- );Ϯ=ˏ;Β.Clear();Ε.Clear();К=DateTime.Now>=ʽ;for(int K=0;K<Ѽ.Count;K++){if(!Û())yield return ː;ϗ=Ѽ[K];while(!ϰ&&!ϻ&&!Ⱥ(ϗ))
- yield return ː;if(ϰ||ϻ){é(new int[]{51,52,6,3});К=ˏ;while(ϰ||ϻ)yield return ː;break;}}if(К)ʽ=DateTime.Now.AddSeconds(10);
- yield return ˏ;}bool ѻ(ref double ƅ,List<int>ȭ){if(!Ĥ(Й[6])){ȏ(Ѻ(ȭ),Й[6]);if(!Û())return ˏ;}bool ɡ=Ù(Й[6]);if(ɡ)ƅ=Г;return ɡ;
- }IEnumerator<bool>Ѻ(List<int>ȭ){double Î=0,ƽ=0;IMyInventory ʔ;for(int K=0;K<ȭ.Count;K++){if(K>0&&!Û())yield return ː;if(!
- ļ(ȭ[K]))continue;ʔ=Ό[ȭ[K]].F.GetInventory(0);Î+=(double)ʔ.MaxVolume;ƽ+=(double)ʔ.CurrentVolume;}Г=ƽ/Î;yield return ˏ;}
- bool ѹ(List<int>ȭ){if(!Ĥ(Й[37])){ȏ(Ѹ(ȭ),Й[37]);if(!Û())return ˏ;}return Ù(Й[37]);}IEnumerator<bool>Ѹ(List<int>ȭ){List<Ÿ>Ƞ=
- new List<Ÿ>();for(int K=0;K<ȭ.Count;K++){if(!Û())yield return ː;if(!ļ(ȭ[K]))continue;Ƞ.Add(new Ÿ{n=Ό[ȭ[K]].ł,Ű=ȭ[K]});}ȭ.
- Clear();Ƞ=Ƞ.OrderByDescending(Ċ=>Ċ.n).ToList();for(int K=0;K<Ƞ.Count;K++){if(!Û())yield return ː;ȭ.Add(Ƞ[K].Ű);}yield return
- ˏ;}bool Ґ(ű j){if(!Ĥ(Й[29])){ȏ(ҏ(j),Й[29]);if(!Û())return ˏ;}return Ù(Й[29]);}IEnumerator<bool>ҏ(ű j){List<Ǭ>Ò=ĝ();for(
- int K=0;K<Ò.Count;K++){if(K>0&&!Û())yield return ː;Ò[K].ǣ=j.ų(Ò[K].Q,Ò[K].T);}yield return ˏ;}bool Ҏ(){if(!Ĥ(Й[30])){ã(
- "Saving Data");ȏ(ҍ(),Й[30]);if(!Û())return ˏ;}return Ù(Й[30]);}IEnumerator<bool>ҍ(){StringBuilder ï=new StringBuilder();string Ҍ="";
- foreach(KeyValuePair<string,SortedList<string,Ǭ>>Ĝ in Γ){if(!Û())yield return ː;ð(ref ï,$"Items - {Ģ(Ě(Ĝ.Key))}");foreach(
- KeyValuePair<string,Ǭ>ѕ in Ĝ.Value){if(!Û())yield return ː;Ĵ(ref ï,ѕ.Value);ï.AppendLine();}}ð(ref ï,"Item Groups");foreach(
- KeyValuePair<string,ű>ċ in Δ){if(!Û())yield return ː;ï.Append($"group={ċ.Key}=");while(!ў(ref Ҍ,ċ.Value,'[',']',ˏ,0))yield return ː;
- ï.AppendLine(Ҍ);}if(!ϸ){foreach(KeyValuePair<string,SortedList<string,bool>>Ĝ in Θ){if(!Û())yield return ː;ð(ref ï,
- $"Switches - {Ĝ.Key}");foreach(KeyValuePair<string,bool>ѕ in Ĝ.Value){if(!Û())yield return ː;ï.AppendLine($"{ѕ.Key}={ѕ.Value}");}}foreach(
- KeyValuePair<string,SortedList<string,double>>Ĝ in Ι){if(!Û())yield return ː;ð(ref ï,$"Numbers - {Ĝ.Key}");foreach(KeyValuePair<
- string,double>ѕ in Ĝ.Value){if(!Û())yield return ː;ï.AppendLine($"{ѕ.Key}={ѕ.Value}");}}foreach(KeyValuePair<string,int>ċ in Η
- ){if(!Û())yield return ː;ï.AppendLine($"{ċ.Key}={ċ.Value}");}foreach(KeyValuePair<string,SortedList<string,string>>Ĝ in Λ
- ){if(!Û())yield return ː;ð(ref ï,$"Text - {Ĝ.Key}");foreach(KeyValuePair<string,string>ѕ in Ĝ.Value){if(!Û())yield return
- ː;ï.AppendLine($"{ѕ.Key}={ѕ.Value}");}}ð(ref ï,"Lists");foreach(KeyValuePair<string,List<string>>ċ in Ζ){if(!Û())yield
- return ː;ï.Append($"{ċ.Key}=[");for(int K=0;K<ċ.Value.Count;K++){if(K>0){ï.Append("|");if(!Û())yield return ː;}ï.Append(ċ.
- Value[K]);}ï.AppendLine("]");ï.AppendLine();}ï.AppendLine();ï.AppendLine();ï.AppendLine($"script={ʺ}");if(!ϩ)ï.AppendLine(
- $"version={Д}");else ï.AppendLine("version=-1");}Me.CustomData=ï.ToString().Trim();ʲ=Me.CustomData;ϴ=ː;ϳ=ː;ã("Save Data Complete");
- yield return ˏ;}bool ҋ(){if(!Ĥ(Й[42])){ã("Loading Data");ȏ(ґ(),Й[42]);if(!Û())return ˏ;}return Ù(Й[42]);}IEnumerator<bool>ґ()
- {if(Me.CustomData.Length>0){ϴ=ˏ;ϳ=ˏ;Ω.Clear();yield return ː;string[]ѷ=Me.CustomData.Split(new[]{"\r\n","\r","\n"},
- StringSplitOptions.RemoveEmptyEntries);List<string>Ѷ=new List<string>();for(int K=0;K<ѷ.Length;K++){if(!Û())yield return ː;if(ѷ[K].
- StartsWith("^")&&Ѷ.Count>0)Ѷ[Ѷ.Count-1]+=$"||{ѷ[K].Substring(1).Trim()}";else Ѷ.Add(ѷ[K].Trim());}for(int K=0;K<Ѷ.Count;K++){if(!Û
- ())yield return ː;while(!ɮ(Ѷ[K]))yield return ː;}string Ѯ;for(int K=0;K<Ζ["excludedDefinitions"].Count;K++){if(!Û())yield
- return ː;Ѯ=Ζ["excludedDefinitions"][K];if(Ѯ.Contains("/"))Ζ["excludedDefinitions"][K]=Ѯ.Substring(Ѯ.IndexOf("/")+1);}if(!ϳ||!ϴ
- )ϼ=ː;}else ϼ=ː;if(!Û())yield return ː;ϖ();if(!Û())yield return ː;ϕ();if(!Û())yield return ː;ʲ=Me.CustomData;ã(
- "Load Data Complete");yield return ˏ;}bool ѭ(string Ø){if(!Ĥ(Ø)){ȏ(Ѭ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>Ѭ(){double ѧ;
- foreach(KeyValuePair<string,ů>ċ in Έ){if(!Û())yield return ː;ѧ=ņ(ċ.Value);if(ѧ>0)while(!Ѧ(ċ.Value,ѧ,η))yield return ː;}int ѫ=Η[
- "survivalKitQueuedIngots"];if(ѫ>0){ů S=new ů{U=ʯ};while(!Ѧ(S,ѫ,η,ˎ,ˏ))yield return ː;}yield return ˏ;}bool Ѫ(string Ø){if(!Ĥ(Ø)){ȏ(Ѩ(),Ø);if(!Û()
- )return ˏ;}return Ù(Ø);}IEnumerator<bool>Ѩ(){double ѧ;foreach(KeyValuePair<string,ů>ċ in Έ){if(!Û())yield return ː;ѧ=ņ(ċ.
- Value,ː);if(ѧ>0)while(!Ѧ(ċ.Value,ѧ,η,ˍ))yield return ː;}yield return ˏ;}bool Ѧ(ů S,double n,List<int>ѥ,MyAssemblerMode Ľ=ˎ,
- bool È=ː){if(!Ĥ(Й[26])){ȏ(ѩ(S,n,ѥ,Ľ,È),Й[26]);if(!Û())return ˏ;}return Ù(Й[26]);}IEnumerator<bool>ѩ(ů S,double ѯ,List<int>ѥ,
- MyAssemblerMode Ľ,bool È){double n=ѯ,l=1;string ѵ;if(Ľ==ˍ){l=S.l;n=Math.Floor(ѯ/l);}MyDefinitionId U=MyDefinitionId.Parse(Ň(S));
- IMyTerminalBlock F;SortedList<string,List<Ǡ>>Ѵ=new SortedList<string,List<Ǡ>>();for(int K=0;K<ѥ.Count;K++){if(!Û())yield return ː;if(!ļ(
- ѥ[K]))continue;if(ij(Ό[ѥ[K]],U,Ľ)){F=Ό[ѥ[K]].F;ѵ=ě(F);if(!Ѵ.ContainsKey(ѵ))Ѵ[ѵ]=new List<Ǡ>();Ѵ[ѵ].Add(new Ǡ{q=ѥ[K],ǟ=((
- IMyAssembler)F).IsQueueEmpty,Ǟ=B(F).Contains("<specific>")});}}List<int>ȭ=new List<int>();foreach(KeyValuePair<string,List<Ǡ>>Ĝ in Ѵ
- ){if(!Û())yield return ː;foreach(Ǡ ѳ in Ĝ.Value){if(!Û())yield return ː;if(!ѳ.Ǟ||Ѵ.Count==1){if(ѳ.ǟ)ȭ.Insert(0,ѳ.q);else
- ȭ.Add(ѳ.q);}}}Ѵ.Clear();if(В>0&&Ľ==ˍ)ȭ.RemoveRange(0,(int)Math.Min(В,Math.Ceiling((double)ȭ.Count/2.0)));if(ȭ.Count>0){
- int й,ƻ,Ѳ;й=Math.DivRem((int)n,ȭ.Count,out ƻ);if(S.U==ʯ){ƻ=0;й=(int)n;}for(int K=0;K<ȭ.Count&&K<n;K++){Ѳ=й;if(K<ƻ)Ѳ++;if(Ѳ>
- 0)while(!ѱ(U,Ѳ*l,(IMyAssembler)Ό[ȭ[K]].F,Ľ,È))yield return ː;}}yield return ˏ;}bool ѱ(MyDefinitionId U,double n,
- IMyAssembler H,MyAssemblerMode Ľ,bool È=ː){if(!Ĥ(Й[33])){ȏ(Ѱ(U,n,H,Ľ,È),Й[33]);if(!Û())return ˏ;}return Ù(Й[33]);}IEnumerator<bool>Ѱ
- (MyDefinitionId U,double n,IMyAssembler H,MyAssemblerMode Ľ,bool È){double Ѳ=Math.Floor(n);bool Ү,ҭ=ė(B(H),"nosort");H.
- Mode=Ľ;if(H.Mode!=Ľ)H.Mode=Ľ;if(H.Mode==Ľ){if(H.IsQueueEmpty)H.AddQueueItem(U,Ѳ);else{ν.Clear();bool Ҭ=ˏ;double ҫ=0,Ҫ=0;if(Ľ
- ==ˎ)ҫ=Ł(U);H.GetQueue(ν);Ү=ˏ;for(int K=0;!Ү&&K<ν.Count;K++){if(K>0&&!Û())yield return ː;if(ν[K].BlueprintId.SubtypeName==U
- .SubtypeName){Ү=ː;if(U.SubtypeName==ʯ)Ѳ=Math.Floor(Ѳ-(double)ν[K].Amount);}}if(Ѳ>0&&(Ү||(Ľ==ˎ&&!ҭ)))for(int K=0;K<ν.Count
- ;K++){if(K>0&&!Û())yield return ː;if(!Ү&&Ľ==ˎ)Ҫ=Ł(ν[K].BlueprintId);if((!Ү&&ҫ<=Ҫ)||ν[K].BlueprintId.SubtypeName==U.
- SubtypeName){H.InsertQueueItem(K,U,Ѳ);Ҭ=ː;break;}}if(!Ҭ&&Ѳ>0)H.AddQueueItem(U,Ѳ);}if(È)ȋ(U.SubtypeName,Ľ==ˎ,Ѳ,ː);}yield return ˏ;}
- bool ҩ(string Ø){if(!Ĥ(Ø)){ȏ(Ҩ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>Ҩ(){Ǭ ª;double ҧ;foreach(KeyValuePair<
- string,ů>ċ in Έ){if(!Û())yield return ː;if(Ļ(out ª,$"{ċ.Value.Q}/{ċ.Value.T}")){ҧ=Math.Floor(ª.Ʊ);if(ҧ>0)while(!Ҧ(ċ.Value,ҧ))
- yield return ː;}}yield return ˏ;}bool Ҧ(ů S,double n,MyAssemblerMode Ľ=ˎ){if(!Ĥ(Й[35])){ȏ(ҥ(S,n,Ľ),Й[35]);if(!Û())return ˏ;}
- return Ù(Й[35]);}IEnumerator<bool>ҥ(ů S,double n,MyAssemblerMode Ľ){double ү,Ұ=n;μ.Clear();for(int K=0;K<η.Count&&Ұ>0;K++){
- IMyAssembler H;if(!ļ(η[K]))continue;H=(IMyAssembler)Ό[η[K]].F;if(!Û())yield return ː;if(H.Mode==Ľ&&!H.IsQueueEmpty){μ.Clear();H.
- GetQueue(μ);for(int Ċ=μ.Count-1;Ċ>=0&&Ұ>0;Ċ--){if(!Û())yield return ː;if(μ[Ċ].BlueprintId.SubtypeName==S.U){ү=(double)μ[Ċ].
- Amount;if(ү>Ұ)ү=Ұ;H.RemoveQueueItem(Ċ,(MyFixedPoint)ү);ȋ(S.U,Ľ==ˎ,-ү,ː);Ұ-=ү;}}}}yield return ˏ;}bool Һ(string Ø){if(!Ĥ(Ø)){ȏ(
- ҹ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>ҹ(){Ǭ ª;double ҧ;foreach(KeyValuePair<string,ů>ċ in Έ){if(!Û())
- yield return ː;if(Ļ(out ª,$"{ċ.Value.Q}/{ċ.Value.T}")){ҧ=Math.Floor(ª.ư);if(ҧ>0)while(!Ҧ(ċ.Value,ҧ,ˍ))yield return ː;}}yield
- return ˏ;}bool Ҹ(string Ø){if(!Ĥ(Ø)){ȏ(ҷ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>ҷ(){foreach(KeyValuePair<string,
- List<int>>ċ in Ν){if(!Û())yield return ː;if(ċ.Value.Count>1&&ͻ.Contains(ċ.Key))while(!Ҷ(ċ.Value))yield return ː;}yield
- return ˏ;}bool Ҷ(List<int>ȭ){if(!Ĥ(Й[39])){ȏ(ҵ(ȭ),Й[39]);if(!Û())return ˏ;}return Ù(Й[39]);}IEnumerator<bool>ҵ(List<int>ȭ){int
- Ҵ=0;while(Ҵ<ȭ.Count){if(!Û())yield return ː;if(r(ȭ[Ҵ])>=0.985)Ҵ++;else break;}for(int K=Ҵ+1;K<ȭ.Count;K++){if(!Û())yield
- return ː;if(!ļ(ȭ[K]))continue;if(r(ȭ[Ҵ])>=0.985)Ҵ++;if(K>Ҵ){ξ.Clear();try{Ϝ=Ό[ȭ[K]];}catch{continue;}Ϝ.F.GetInventory(0).
- GetItems(ξ);for(int Ċ=0;Ċ<ξ.Count;Ċ++){if(!Û())yield return ː;if(Ϝ.Ǜ.ų(ξ[Ċ])<=0.0)while(!Ч(ξ[Ċ],ȭ[K],0,-1,K,Ҵ))yield return ː;}}
- }yield return ˏ;}bool ҳ(string Ø){if(!Ĥ(Ø)){ȏ(Ҳ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>Ҳ(){List<Ÿ>Ƞ=new
- List<Ÿ>();φ.Clear();IMyAssembler H;int ұ;bool Ҕ,ҝ;double Ҥ,ʓ=0,ʒ=0;for(int K=0;K<η.Count;K++){if(!Û())yield return ː;φ.Clear
- ();ҝ=ˏ;if(!ļ(η[K])||ė(B(Ό[η[K]].F),"nosort"))continue;H=(IMyAssembler)Ό[η[K]].F;Ҕ=H.Mode==ˎ;if(!H.IsQueueEmpty&&H.Enabled
- ){H.GetQueue(φ);if(φ.Count>1){Ƞ.Clear();for(int Ċ=0;Ċ<φ.Count;Ċ++){if(!Û())yield return ː;ұ=(int)φ[Ċ].Amount;if(Ċ==0&&H.
- CurrentProgress>=0.1f){if(ұ>10)ұ-=3;else ұ=0;}if(ұ>0){if(Ҕ){Ҥ=Ł(φ[Ċ].BlueprintId);if(Ċ==0)ʓ=Ҥ;else ʓ=Math.Min(ʓ,Ҥ);if(Ċ==0)ʒ=Ҥ;else ʒ=
- Math.Max(ʒ,Ҥ);}else{if(W(φ[Ċ])){Ҥ=double.MaxValue;ҝ=ː;}else Ҥ=Ċ;}Ƞ.Add(new Ÿ{n=Ҥ,Ű=ұ,ý=φ[Ċ].BlueprintId.SubtypeName});}}if((
- !Ҕ&&!ҝ)||(Ҕ&&ʓ==ʒ))continue;Ƞ=Ƞ.OrderBy(Ċ=>Ċ.n).ToList();if(Ƞ[0].ý==φ[0].BlueprintId.SubtypeName){Ƞ.RemoveAt(0);for(int Ċ
- =φ.Count-1;Ċ>=1;Ċ--){if(!Û())yield return ː;H.RemoveQueueItem(Ċ,φ[Ċ].Amount);}}else if(H.CurrentProgress>=0.1f){for(int Ċ
- =φ.Count-1;Ċ>=0;Ċ--){if(!Û())yield return ː;if(Ċ!=0)H.RemoveQueueItem(Ċ,φ[Ċ].Amount);else if((double)φ[Ċ].Amount>10)H.
- RemoveQueueItem(Ċ,(MyFixedPoint)((double)φ[Ċ].Amount-1));}}else H.ClearQueue();for(int Ċ=0;Ċ<Ƞ.Count;Ċ++){if(!Û())yield return ː;while(
- !ѱ(MyDefinitionId.Parse($"{ˡ}/{Ƞ[Ċ].ý}"),Ƞ[Ċ].Ű,H,H.Mode,ˏ))yield return ː;}}}}yield return ˏ;}bool қ(string Ø){if(!Ĥ(Ø))
- {ȏ(Ҝ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>Ҝ(){List<int>Қ=new List<int>(),Ҙ=new List<int>();Dictionary<
- string,ů>җ=new Dictionary<string,ů>(),Җ=new Dictionary<string,ů>();λ.Clear();string ý;IMyAssembler H;bool ҕ=ˏ,Ҕ,ғ,Ғ;double n;
- int ҙ;for(int K=0;K<η.Count;K++){if(!Û())yield return ː;if(!ļ(η[K]))continue;H=(IMyAssembler)Ό[η[K]].F;if(H.Enabled){if(!H.
- IsQueueEmpty)ҕ=ː;if(H.Mode==ˎ||H.IsQueueEmpty)Қ.Add(η[K]);else Ҙ.Add(η[K]);}}if(ҕ&&(Қ.Count>1||Ҙ.Count>1)){for(int K=0;K<η.Count;K++
- ){if(!Û())yield return ː;if(!ļ(η[K])||ė(B(Ό[η[K]].F),"nospread"))continue;λ.Clear();H=(IMyAssembler)Ό[η[K]].F;H.GetQueue(
- λ);Ҕ=H.Mode==ˎ;ғ=!Ҕ&&K<В&&K<Math.Ceiling((double)η.Count/2.0);for(int Ċ=λ.Count-1;Ċ>=0;Ċ--){if(!Û())yield return ː;n=(
- double)λ[Ċ].Amount;if(λ.Count>1&&Ċ==0&&n<=50&&!ғ)break;ý=λ[Ċ].BlueprintId.SubtypeName;if(n>1||Ċ>0){if(!ғ){n=Math.Ceiling(n*0.9
- );if(n==(double)λ[Ċ].Amount&&Ċ==0)n-=1;}if(n>0){if(!Û())yield return ː;ҙ=ң(Ό[η[K]],λ[Ċ].BlueprintId,H.Mode);if(!Û())yield
- return ː;if(ҙ>1){Ғ=ː;if(Ҕ){if(!җ.ContainsKey(ý))җ[ý]=new ů{n=n,U=ý};else җ[ý].n+=n;}else{if(ю(ý)==1){if(!Җ.ContainsKey(ý))Җ[ý]
- =new ů{n=n,U=ý};else Җ[ý].n+=n;}else Ғ=ˏ;}if(Ғ)try{H.RemoveQueueItem(Ċ,n);}catch{}}}}}}foreach(KeyValuePair<string,ů>ċ in
- җ){if(!Û())yield return ː;while(!Ѧ(ċ.Value,ċ.Value.n,Қ,ˎ,ˏ))yield return ː;}foreach(KeyValuePair<string,ů>ċ in Җ){if(!Û()
- )yield return ː;while(!Ѧ(ċ.Value,ċ.Value.n,Ҙ,ˍ,ˏ))yield return ː;}}yield return ˏ;}int ң(ǝ F,MyDefinitionId U,
- MyAssemblerMode Ľ){int È=0;for(int K=0;K<η.Count;K++)if(ij(F,U,Ľ))È++;return È;}bool Ң(List<int>ȭ,string Ø){if(!Ĥ(Ø)){ȏ(ҡ(ȭ),Ø);if(!Û())
- return ˏ;}return Ù(Ø);}IEnumerator<bool>ҡ(List<int>ȭ){ű j=k();while(!г(j,ȭ))yield return ː;if(j.Ò.Count>0)while(!Ҡ(j.Ò,ȭ,ˬ))
- yield return ː;yield return ˏ;}bool Ҡ(SortedList<string,double>j,List<int>ȭ,string Ҟ){if(!Ĥ(Й[25])){ȏ(ҟ(j,ȭ,Ҟ),Й[25]);if(!Û()
- )return ˏ;}return Ù(Й[25]);}IEnumerator<bool>ҟ(SortedList<string,double>j,List<int>ȭ,string Ҟ){double È;int q=0;
- IMyTerminalBlock F,њ;for(int K=0;K<ȭ.Count;K++){foreach(KeyValuePair<string,double>ċ in j){if(q>0&&!Û())yield return ː;È=0;if(!ļ(ȭ[K]))
- continue;F=Ό[ȭ[K]].F;while(!С(ref È,Ҟ,ċ.Key,F))yield return ː;if(o(È,ċ.Value/(double)ȭ.Count,Њ)){ϋ.Clear();F.GetInventory(0).
- GetItems(ϋ);for(int Ċ=ϋ.Count-1;Ċ>=0;Ċ--){if(!Û())yield return ː;if(!p(Ҟ,ϋ[Ċ])||ϋ[Ċ].Type.SubtypeId!=ċ.Key)ϋ.RemoveAt(Ċ);}if(ϋ.
- Count>0){double Н=È-(ċ.Value/(double)ȭ.Count);SortedList<int,double>Я=new SortedList<int,double>();for(int Ċ=0;Ċ<ȭ.Count;Ċ++)
- {if(K!=Ċ){if(!Û())yield return ː;È=0;try{њ=Ό[ȭ[Ċ]].F;}catch{continue;}while(!С(ref È,Ҟ,ċ.Key,њ))yield return ː;if(t(È,ċ.
- Value/(double)ȭ.Count,Њ))Я[ȭ[Ċ]]=È;}}if(Я.Count>0)while(!с(ϋ[0],F,Я,Н))yield return ː;}}q++;}}yield return ˏ;}bool г(ű È,List
- <int>в,string Q="",string T=""){if(!Ĥ(Й[8])){ȏ(д(È,в,Q,T),Й[8]);if(!Û())return ˏ;}return Ù(Й[8]);}IEnumerator<bool>д(ű È,
- List<int>в,string Q,string T){for(int K=0;K<в.Count;K++){if(K>0&&!Û())yield return ː;ϊ.Clear();if(!ļ(в[K]))continue;Ό[в[K]].
- F.GetInventory(0).GetItems(ϊ);for(int Ċ=0;Ċ<ϊ.Count;Ċ++){if(!Û())yield return ː;if((Q.Length==0||ϊ[Ċ].Type.TypeId==Q)&&(T
- .Length==0||ϊ[Ċ].Type.SubtypeId==T))È.ŵ(ϊ[Ċ]);}}yield return ˏ;}bool б(string Ø){if(!Ĥ(Ø)){ȏ(а(),Ø);if(!Û())return ˏ;}
- return Ù(Ø);}IEnumerator<bool>а(){string T;SortedList<int,double>Я=new SortedList<int,double>();for(int K=0;K<ή.Count;K++){if(
- K>0&&!Û())yield return ː;if(!ļ(ή[K]))continue;ϣ=Ό[ή[K]];IMyInventory ʔ=ϣ.F.GetInventory(0);if(ʔ.ItemCount==0)continue;ω.
- Clear();ʔ.GetItems(ω);for(int Ċ=0;Ċ<ω.Count;Ċ++){if(!Û())yield return ː;if(h(ω[Ċ],ϣ)){T=ω[Ċ].Type.SubtypeId;Я.Clear();if(X(ω[
- Ċ])){if(T=="Ice"){if(ζ.Count>0)ĩ(ref Я,ζ);}else{if(ί.Count>0)ĩ(ref Я,ί);}}else if(W(ω[Ċ])){if(δ.Count>0)ĩ(ref Я,δ);}else
- if(Y(ω[Ċ])&&T=="Stone"){if(ε.Count>0)ĩ(ref Я,ε);}else if(R(ω[Ċ])&&T=="Canvas"){if(α.Count>0)ĩ(ref Я,α);}else if(Z(ω[Ċ])&&Ϻ
- ){if(ω[Ċ].Type.TypeId==ˮ&&β.Count>0)ĩ(ref Я,β);else if(ω[Ċ].Type.TypeId==Ͱ&&γ.Count>0)ĩ(ref Я,γ);else if(ζ.Count>0)ĩ(ref
- Я,ζ);}if(º(ω[Ċ])){if(ΰ.Count>0)ĩ(ref Я,ΰ);}if(Я.Count>0)while(!с(ω[Ċ],ϣ.F,Я))yield return ː;}}}yield return ˏ;}bool с(
- MyInventoryItem E,IMyTerminalBlock F,SortedList<int,double>Я,double п=-1){if(!Ĥ(Й[10])){ȏ(о(E,F,Я,п),Й[10]);if(!Û())return ˏ;}return Ù(
- Й[10]);}IEnumerator<bool>о(MyInventoryItem E,IMyTerminalBlock F,SortedList<int,double>в,double н){IMyTerminalBlock ĥ;
- SortedList<int,double>м=new SortedList<int,double>();List<int>л=new List<int>();foreach(KeyValuePair<int,double>ċ in в)м[ċ.Key]=ċ.
- Value;double ɚ,к,й,и,Æ,Њ,з,Ĉ,ж=0;for(int K=0;K<м.Count;K+=0){if(!Û())yield return ː;if(ļ(м.Keys[K])&&r(м.Keys[K])<0.99&&Ĭ(Ό[м
- .Keys[K]],E)){л.Add(м.Keys[K]);K++;}else м.Remove(м.Keys[K]);}if(м.Count>0){ű j=k();while(!г(j,л,E.Type.TypeId,E.Type.
- SubtypeId))yield return ː;л.Clear();к=(double)E.Amount;Њ=Đ("balanceRange");if(н>0&&к>н)к=н;bool р=d(E);j.ŵ(E.Type.TypeId,E.Type.
- SubtypeId,к);if(j.Ū()>0&&м.Count>0){з=j.ų(E)/(double)м.Count;for(int K=0;K<м.Count;K+=0){if(!Û())yield return ː;ɚ=м.Values[K];if(
- ɚ==-1){ɚ=0;ĥ=Ό[м.Keys[K]].F;while(!С(ref ɚ,E,ĥ))yield return ː;м[м.Keys[K]]=ɚ;}if(ɚ>з+(з*Њ))м.RemoveAt(K);else K++;}}if(м
- .Count>0){int ý;try{Æ=v(E,Ό[м.Keys[0]].F);}catch{Æ=double.MaxValue;}bool Т=ˏ;Ĉ=Ό[м.Keys[0]].ǜ.ų(ref Т,E);if(Т)Æ=Ĉ;if(Æ<
- double.MaxValue)Т=ː;for(int K=0;K<м.Count;K++){й=к/((double)м.Count-K);ɚ=м.Values[K];ý=м.Keys[K];if(!Û())yield return ː;if(ɚ==
- -1){ɚ=0;ĥ=Ό[м.Keys[K]].F;if(Т)while(!С(ref ɚ,E,ĥ))yield return ː;}if(й+ɚ>Æ)й=Æ-ɚ;if(!р){ж+=й-Math.Floor(й);й=Math.Floor(й
- );if(ж>=1&&(ɚ+й+1<=Æ)){й++;ж--;}}if(K+1==м.Count&&й+ж<=Æ)й+=ж;и=й;while(!ɣ(ref й,F.GetInventory(0),Ό[м.Keys[K]],E))yield
- return ː;if(й>0)к-=и-й;}}}yield return ˏ;}bool С(ref double n,MyInventoryItem E,IMyTerminalBlock F){if(!Ĥ(Й[11])){ȏ(Р(E.Type.
- TypeId,E.Type.SubtypeId,F),Й[11]);if(!Û())return ˏ;}if(Ù(Й[11])){n=0+Ж;Ж=0;return ː;}return ˏ;}bool С(ref double n,string D,
- string T,IMyTerminalBlock F){if(!Ĥ(Й[11])){ȏ(Р(D,T,F),Й[11]);if(!Û())return ˏ;}if(Ù(Й[11])){n=Ж;Ж=0;return ː;}return ˏ;}
- IEnumerator<bool>Р(string D,string T,IMyTerminalBlock F){ψ.Clear();F.GetInventory(0).GetItems(ψ);for(int K=0;K<ψ.Count;K++){if(!Û()
- )yield return ː;if(ψ[K].Type.TypeId==D&&ψ[K].Type.SubtypeId==T)Ж+=(double)ψ[K].Amount;}yield return ˏ;}bool П(string Ø){
- if(!Ĥ(Ø)){ȏ(О(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>О(){double Ī=0,Н;for(int K=0;K<Ό.Count;K++){if(!Û())
- yield return ː;if(!ļ(K))continue;Ϣ=Ό[K];if(!Û())yield return ː;if(Ϣ.ǜ.Ū()>0){ϑ.Clear();Ϣ.F.GetInventory(0).GetItems(ϑ);if(!Û(
- ))yield return ː;for(int Ċ=0;Ċ<ϑ.Count;Ċ++){if(!Û())yield return ː;if(Ħ(Ϣ,ref Ī,ϑ[Ċ])){Н=(double)ϑ[Ċ].Amount-Ī;if(Н>0)
- while(!Ч(ϑ[Ċ],K,0,Н))yield return ː;}}}}yield return ˏ;}bool М(string Ø){if(!Ĥ(Ø)){ȏ(Ю(),Ø);if(!Û())return ˏ;}return Ù(Ø);}
- IEnumerator<bool>Ю(){string ŋ,Э=Ē("manualKeyword");IMyTerminalBlock F;for(int K=0;K<Ό.Count;K++){if(!ļ(K))continue;ϡ=Ό[K];F=ϡ.F;if(
- !Û())yield return ː;ŋ=B(F);bool Ь=ė(ŋ,"+in"),Ы=ė(ŋ,"+out"),Ъ=ė(ŋ,"-in"),Щ=ė(ŋ,"-out"),Ш=ė(ŋ,Э);if(Ъ||(!Ш&&N(ϡ,0))){χ.
- Clear();F.GetInventory(0).GetItems(χ);for(int Ċ=0;Ċ<χ.Count;Ċ++){if(!Û())yield return ː;if(Ъ||N(χ[Ċ],ϡ))while(!Ч(χ[Ċ],K,0))
- yield return ː;}}if(F.InventoryCount>1&&(Щ||(!Ш&&N(ϡ,1)))){χ.Clear();F.GetInventory(1).GetItems(χ);for(int Ċ=0;Ċ<χ.Count;Ċ++)
- {if(!Û())yield return ː;if(Щ||N(χ[Ċ],ϡ,1))while(!Ч(χ[Ċ],K,1))yield return ː;}}}yield return ˏ;}bool Ч(MyInventoryItem E,
- int Х,int I,double Î=-1,int У=-1,int Ф=0){if(!Ĥ(Й[14])){ȏ(Ц(E,Х,I,Î,У,Ф),Й[14]);if(!Û())return ˏ;}return Ù(Й[14]);}
- IEnumerator<bool>Ц(MyInventoryItem E,int Х,int I,double Î,int У,int Ф){List<int>л=new List<int>();string D=E.Type.ToString(),Q;ϛ=Ό[
- Х];IMyTerminalBlock њ;Q=E.Type.TypeId;ɢ=(double)E.Amount;if(Î>0&&ɢ>Î)ɢ=Î;if(ɢ>(double)E.Amount)ɢ=(double)E.Amount;А=ɢ;ɟ=ϛ
- .F.GetInventory(I);if(А>0){if(ͼ.ContainsKey(D)&&Ν.ContainsKey(ͼ[D]))л.AddRange(Ν[ͼ[D]]);if(л.Count==0){if(R(E)){if(Ν.
- ContainsKey(ʶ))л.AddRange(Ν[ʶ]);}else if(O(E)){if(Ν.ContainsKey(ʿ))л.AddRange(Ν[ʿ]);}else if(W(E)){if(Ν.ContainsKey(ʵ))л.AddRange(Ν
- [ʵ]);}else if(Y(E)){if(Ν.ContainsKey(ʸ))л.AddRange(Ν[ʸ]);}else if(X(E)){if(Ν.ContainsKey(ʷ))л.AddRange(Ν[ʷ]);}}if(л.Count
- ==0)л.AddRange(ή);for(int K=Ф;K<л.Count&&(У<=0||K<У);K++){if(K>0&&!Û())yield return ː;if(!ļ(л[K])||r(л[K])>=0.985)continue
- ;њ=Ό[л[K]].F;if(ϛ.F!=њ){while(!ɣ(ref ɢ,ɟ,Ό[л[K]],E))yield return ː;if(ɢ<=0)break;}}}yield return ˏ;}bool љ(string Ø){if(!
- Ĥ(Ø)){ȏ(ј(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>ј(){ϓ.Clear();IMyAssembler H;bool Ȍ;for(int K=0;K<η.Count;
- K++){if(K>0&&!Û())yield return ː;if(!ļ(η[K]))continue;ϓ.Clear();ϝ=Ό[η[K]];ϝ.Ǚ.Ŭ();H=(IMyAssembler)ϝ.F;H.GetQueue(ϓ);if(ϓ.
- Count==0)H.Mode=ˎ;Ȍ=((IMyAssembler)ϝ.F).Mode==ˎ;for(int Ċ=0;Ċ<ϓ.Count;Ċ++){if(Ċ>0&&!Û())yield return ː;ȋ(ϓ[Ċ],Ȍ);}}В=0;
- foreach(KeyValuePair<string,SortedList<string,Ǭ>>Ĝ in Γ){if(!Û())yield return ː;foreach(KeyValuePair<string,Ǭ>ѕ in Ĝ.Value){if(
- !Û())yield return ː;ѕ.Value.ǁ();ѕ.Value.Ƽ(Љ);В+=ѕ.Value.Ʈ;}}yield return ˏ;}bool ї(string Ø){if(!Ĥ(Ø)){ȏ(і(),Ø);if(!Û())
- return ˏ;}return Ù(Ø);}IEnumerator<bool>і(){ˋ=0;IMyTerminalBlock F;for(int K=0;K<Ό.Count;K++){if(K>0&&!Û())yield return ː;if(!
- ļ(K))continue;F=Ό[K].F;if(!B(F).Contains(ʴ)){υ.Clear();F.GetInventory(0).GetItems(υ);for(int Ċ=0;Ċ<υ.Count;Ċ++){if(Ċ>0&&!
- Û())yield return ː;ǀ(υ[Ċ]);}if(F.InventoryCount>1){if(!Û())yield return ː;υ.Clear();F.GetInventory(1).GetItems(υ);for(int
- Ċ=0;Ċ<υ.Count;Ċ++){if(Ċ>0&&!Û())yield return ː;ǀ(υ[Ċ]);}}}}foreach(KeyValuePair<string,SortedList<string,Ǭ>>Ĝ in Γ){if(!Û
- ())yield return ː;foreach(KeyValuePair<string,Ǭ>ѕ in Ĝ.Value){ѕ.Value.ƹ(Ў,ϫ&&ѕ.Value.U.Length>0,Ќ,Ѝ,Џ,Ϫ);if(X(ѕ.Value.Q)
- &&ѕ.Value.T!="Ice"&&ѕ.Value.Ǫ>=0.5&&ѕ.Value.ƨ)ˋ++;}}yield return ˏ;}bool є(string Ø){if(!Ĥ(Ø)){ȏ(ћ(),Ø);if(!Û())return ˏ;}
- return Ù(Ø);}IEnumerator<bool>ћ(){ί.Clear();η.Clear();ΰ.Clear();δ.Clear();ζ.Clear();ε.Clear();ή.Clear();Ν.Clear();α.Clear();γ.
- Clear();β.Clear();Ί.Clear();Ή.Clear();Ώ.Clear();ΐ.Clear();Ό.Clear();ͻ.Clear();string ŝ=Ē("itemPanelKeyword"),ś=Ē(
- "outputPanelKeyword"),Ŝ=Ē("storageKeyword"),Ś=Ē("statusPanelKeyword"),Ѥ=Ē("includeGridKeyword"),ѣ=Ē("crossGridControlKeyword");bool Ѣ=ď(
- "sameGridOnly");for(int K=0;K<3;K++)yield return ː;Ύ.Clear();Μ.GetBlocksOfType<IMyTerminalBlock>(Ύ);List<IMyCubeGrid>ѡ=new List<
- IMyCubeGrid>{Me.CubeGrid};IMyTerminalBlock Ѡ;for(int K=0;K<Ύ.Count;K++){if(!Û())yield return ː;Ѡ=Ύ[K];if(İ(Ѡ)&&Ѡ.CubeGrid!=Me.
- CubeGrid&&(Ѡ.InventoryCount>0||(Ѡ is IMyTextPanel))&&Ѡ.CustomData.Length>0&&ė(B(Ѡ).Replace(" ",""),Ѥ)){if(!ѡ.Contains(Ѡ.CubeGrid
- ))ѡ.Add(Ѡ.CubeGrid);}}if(!Û())yield return ː;Μ.GetBlocksOfType<IMyEntity>(ΐ);for(int K=ΐ.Count-1;K>=0;K--){if(!Û())yield
- return ː;Ѡ=ΐ[K];if(!(Ѡ.IsFunctional&&İ(Ѡ)&&(!Ѣ||ѡ.Contains(Ѡ.CubeGrid)||(!(Ѡ is IMyProgrammableBlock)&&Ѡ.CustomData.Length>0&&
- ė(B(Ѡ).Replace(" ",""),ѣ)))&&(Ѡ.InventoryCount>0||(Ѡ is IMyTextSurfaceProvider&&Ş(Ѡ,ŝ,Ŝ,ś,Ś))||(!(Ѡ is
- IMyProgrammableBlock)&&Š(Ѡ))||(Ѡ is IMyProgrammableBlock))&&((Ѡ is IMyProgrammableBlock)||!ė(B(Ѡ),ʹ))))ΐ.RemoveAt(K);}List<IMyBlockGroup>џ=
- new List<IMyBlockGroup>();Μ.GetBlockGroups(џ,ĭ=>Ê(ĭ.Name,$"nds {ʹ}"));for(int K=0;K<џ.Count;K++){if(!Û())yield return ː;Ύ.
- Clear();џ[K].GetBlocks(Ύ);for(int Ċ=0;Ċ<Ύ.Count;Ċ++){if(!Û())yield return ː;if(!Ώ.Contains(Ύ[Ċ]))Ώ.Add(Ύ[Ċ]);}}Ύ.Clear();
- yield return ˏ;}bool ў(ref string ȑ,ű j,char í='[',char ì=']',bool ќ=ː,int ɛ=4){if(j.Ū()==0){ȑ="";return ː;}if(!Ĥ(Й[19])){ȏ(ѝ
- (j,ќ,ɛ,í,ì),Й[19]);if(!Û())return ˏ;}if(Ù(Й[19])){ȑ=ϐ.ToString();ϐ.Clear();return ː;}return ˏ;}IEnumerator<bool>ѝ(ű j,
- bool ќ,int ɛ,char í,char ì){int ђ=0;string Q,C,D,T;for(int K=0;K<j.Ò.Count;K++){if(K>0&&!Û())yield return ː;D=j.Ò.Keys[K];å(
- D,out Q,out T);C=э(D);if(ɛ>0&&ђ>=ɛ){ϐ.AppendLine($"{ì}");ђ=0;}if(ђ>0)ϐ.Append(":");else ϐ.Append(í);if(ќ&&ђ==0)ϐ.Append(
- $"{j.Ò.Values[K]}:");if(ђ==0)ϐ.Append($"{C}:'{µ(Q,T)}'");else ϐ.Append($"'{µ(Q,T)}'");if(K+1>=j.Ò.Count)ϐ.Append(ì);ђ++;}if(ɛ>0&&j.Ò.Count>
- 0)ϐ.AppendLine();yield return ˏ;}void щ(){if(!Ĥ(Й[21])){ȏ(ш(),Й[21]);if(!Û())return;}Ͻ=Ù(Й[21]);}IEnumerator<bool>ш(){ȕ(
- "Bulletproof Glass","BulletproofGlass",ʹ,"BulletproofGlass");ȕ("Canvas","Canvas",ʹ,"Canvas");ȕ("Computer","Computer",ʹ,"ComputerComponent")
- ;yield return ː;ȕ("Construction Comp","Construction",ʹ,"ConstructionComponent");ȕ("Detector Component","Detector",ʹ,
- "DetectorComponent");ȕ("Display","Display",ʹ,"Display");yield return ː;ȕ("Explosives","Explosives",ʹ,"ExplosivesComponent");ȕ("Girder",
- "Girder",ʹ,"GirderComponent");ȕ("Gravity Gen. Comp","GravityGenerator",ʹ,"GravityGeneratorComponent");yield return ː;ȕ(
- "Interior Plate","InteriorPlate",ʹ,"InteriorPlate");ȕ("Large Steel Tube","LargeTube",ʹ,"LargeTube");ȕ("Medical Component","Medical",ʹ,
- "MedicalComponent");yield return ː;ȕ("Metal Grid","MetalGrid",ʹ,"MetalGrid");ȕ("Motor","Motor",ʹ,"MotorComponent");ȕ("Power Cell",
- "PowerCell",ʹ,"PowerCell");yield return ː;ȕ("Radio Comm. Comp","RadioCommunication",ʹ,"RadioCommunicationComponent");ȕ(
- "Reactor Component","Reactor",ʹ,"ReactorComponent");ȕ("Small Steel Tube","SmallTube",ʹ,"SmallTube");yield return ː;ȕ("Solar Cell",
- "SolarCell",ʹ,"SolarCell");ȕ("Steel Plate","SteelPlate",ʹ,"SteelPlate");ȕ("Superconductor","Superconductor",ʹ,"Superconductor");
- yield return ː;ȕ("Thruster Component","Thrust",ʹ,"ThrustComponent");ȕ("Zone Chip","ZoneChip",ʹ,"None",ˏ);ȕ("Automatic Rifle",
- "AutomaticRifleItem",ͱ,"AutomaticRifle");yield return ː;ȕ("Precise Rifle","PreciseAutomaticRifleItem",ͱ,"PreciseAutomaticRifle");ȕ(
- "Rapid Fire Rifle","RapidFireAutomaticRifleItem",ͱ,"RapidFireAutomaticRifle");ȕ("Ultimate Rifle","UltimateAutomaticRifleItem",ͱ,
- "UltimateAutomaticRifle");yield return ː;ȕ("Welder 1","WelderItem",ͱ,"Welder");ȕ("Welder 2","Welder2Item",ͱ,"Welder2");ȕ("Welder 3",
- "Welder3Item",ͱ,"Welder3");yield return ː;ȕ("Welder 4","Welder4Item",ͱ,"Welder4");ȕ("Grinder 1","AngleGrinderItem",ͱ,"AngleGrinder");
- ȕ("Grinder 2","AngleGrinder2Item",ͱ,"AngleGrinder2");yield return ː;ȕ("Grinder 3","AngleGrinder3Item",ͱ,"AngleGrinder3");
- ȕ("Grinder 4","AngleGrinder4Item",ͱ,"AngleGrinder4");ȕ("Drill 1","HandDrillItem",ͱ,"HandDrill");yield return ː;ȕ(
- "Drill 2","HandDrill2Item",ͱ,"HandDrill2");ȕ("Drill 3","HandDrill3Item",ͱ,"HandDrill3");ȕ("Drill 4","HandDrill4Item",ͱ,
- "HandDrill4");yield return ː;ȕ("Datapad","Datapad",ˤ,"Datapad",ˏ);ȕ("Powerkit","Powerkit",ˣ,"None",ˏ);ȕ("Medkit","Medkit",ˣ,"None",ˏ
- );yield return ː;ȕ("Clang Cola","ClangCola",ˣ,"None",ˏ);ȕ("Cosmic Coffee","CosmicCoffee",ˣ,"None",ˏ);ȕ("SpaceCredit",
- "SpaceCredit",ˢ,"None",ˏ);yield return ː;ȕ("Oxygen Bottle","OxygenBottle",ˮ,"OxygenBottle");ȕ("Hydrogen Bottle","HydrogenBottle",Ͱ,
- "HydrogenBottle");ȕ("NATO 5.56x45mm","NATO_5p56x45mm",ˬ,"NATO_5p56x45mmMagazine");yield return ː;ȕ("NATO 25x184mm","NATO_25x184mm",ˬ,
- "NATO_25x184mmMagazine");ȕ("Missile 200mm","Missile200mm",ˬ,"Missile200mm");ȕ("Cobalt Ore","Cobalt",ͳ);yield return ː;ȕ("Gold Ore","Gold",ͳ);ȕ(
- "Ice","Ice",ͳ);ȕ("Iron Ore","Iron",ͳ);yield return ː;ȕ("Magnesium Ore","Magnesium",ͳ);ȕ("Nickel Ore","Nickel",ͳ);ȕ(
- "Platinum Ore","Platinum",ͳ);yield return ː;ȕ("Scrap Ore","Scrap",ͳ,"",ˏ);ȕ("Silicon Ore","Silicon",ͳ);ȕ("Silver Ore","Silver",ͳ);
- yield return ː;ȕ("Stone","Stone",ͳ);ȕ("Uranium Ore","Uranium",ͳ);ȕ("Cobalt Ingot","Cobalt",Ͳ);yield return ː;ȕ("Gold Ingot",
- "Gold",Ͳ);ȕ("Gravel","Stone",Ͳ);ȕ("Iron Ingot","Iron",Ͳ,"",ː,new List<string>(){"Scrap","Stone"});yield return ː;ȕ(
- "Magnesium Powder","Magnesium",Ͳ);ȕ("Nickel Ingot","Nickel",Ͳ,"",ː,new List<string>(){"Stone"});ȕ("Platinum Ingot","Platinum",Ͳ,"");yield
- return ː;ȕ("Silicon Wafer","Silicon",Ͳ,"",ː,new List<string>(){"Stone"});ȕ("Silver Ingot","Silver",Ͳ);ȕ("Uranium Ingot",
- "Uranium",Ͳ);yield return ˏ;}bool ч(string ц,string у,ű ŭ,string õ,char í='[',char ì=']',char ʟ='|'){if(õ.Length==0)return ː;if(!
- Ĥ(ц)){ȏ(ф(у,ŭ,õ,í,ì,ʟ),ц);if(!Û())return ˏ;}return Ù(ц);}IEnumerator<bool>ф(string у,ű ŭ,string õ,char í,char ì,char ʟ){
- string[]х=õ.Split(í),т,ъ;List<string>ѓ=new List<string>(),ё=new List<string>();int q;for(int K=0;K<х.Length;K++){if(!Û())yield
- return ː;q=х[K].IndexOf(ì);if(q>0)ѓ.Add(х[K].Substring(0,q));}double ѐ=0;bool я;string Q;for(int K=0;K<ѓ.Count;K++){if(!Û())
- yield return ː;т=ѓ[K].Split(ʟ);Q="*";for(int IJ=0;IJ<т.Length;IJ++){if(!Û())yield return ː;ъ=т[IJ].Split(':');ё.Clear();я=ˏ;for(
- int ʍ=0;ʍ<ъ.Length;ʍ++){if(!Û())yield return ː;if(ʍ==0){if(double.TryParse(ъ[ʍ],out ѐ))continue;else ѐ=0;}if(ʍ<2&&!я&&ß(ъ[ʍ
- ])){Q=ъ[ʍ];я=ː;}else ё.Add(ъ[ʍ]);}if(я&&ъ.Length==1&&Q=="*")ё.Add("*");for(int ʍ=0;ʍ<ё.Count;ʍ++)while(!ʖ(у,ŭ,new List<
- string>{Q},ё[ʍ],ˏ,ѐ))yield return ː;}}yield return ˏ;}double ю(string ý){if(Έ.ContainsKey(ý))return Έ[ý].l;return 1;}string э(
- string D){if(ͼ.ContainsKey(D))return ͼ[D];string Q,T;å(D,out Q,out T);if(W(Q))return ʵ;else if(R(Q))return ʶ;else if(Y(Q))
- return ʸ;else if(X(Q))return ʷ;else if(O(Q))return ʿ;return Q;}bool ь(string Ë){return Ë.Length>0&&Ë!="None";}bool ы(
- MyInventoryItem E,ref string Ɖ){if(ˆ<0)return ˏ;try{string ġ=ğ(E.Type.SubtypeId),Ġ;for(int K=0;K<ά.Count;K++){Ġ=ğ(ά[K]);if(Math.Abs(Ġ.
- Length-ġ.Length)>ˆ)continue;if(Ê(ġ,Ġ)||ġ.EndsWith(Ġ)||Ê(Ġ,ġ)||Ġ.EndsWith(ġ)){Ɖ=ά[K];return ː;}}}catch{Ź(
- "Error/Temp: Error finding blueprint match");}return ˏ;}bool е(MyProductionItem S,ref string Ɖ){if(ˆ<0)return ˏ;try{string ġ,Ġ=ğ(S.BlueprintId.SubtypeName),T,Q;for
- (int K=0;K<έ.Count;K++){å(έ[K],out Q,out T);ġ=ğ(T);if(Math.Abs(Ġ.Length-ġ.Length)>ˆ)continue;if(Ê(ġ,Ġ)||ġ.EndsWith(Ġ)||Ê(
- Ġ,ġ)||Ġ.EndsWith(ġ)){Ɖ=έ[K];return ː;}}}catch{Ź("Error/Temp: Error finding blueprint item");}return ˏ;}string ğ(string Ğ)
- {return Ğ.ToLower().Replace("component","").Replace("magazine","").Replace("blueprint","").Replace("tier","t").Replace(
- "hydrogen","hydro").Replace("thruster","thrust");}List<Ǭ>ĝ(){List<Ǭ>Ò=new List<Ǭ>();foreach(KeyValuePair<string,SortedList<string,
- Ǭ>>Ĝ in Γ)Ò.AddRange(Ĝ.Value.Values);return Ò;}string Ģ(string õ){if(õ.Length>1)return
- $"{õ.Substring(0,1).ToUpper()}{õ.Substring(1).ToLower()}";return õ.ToUpper();}string Ě(string õ){int q=õ.IndexOf("_");if(q>=0)return õ.Substring(q+1);return õ;}List<
- MyInventoryItem>ę(){return new List<MyInventoryItem>();}List<MyProductionItem>Ę(){return new List<MyProductionItem>();}bool ė(string á,
- string ý){return á.ToLower().Contains(ý.ToLower());}string Ė(double ĕ){if(ĕ>=1000.0)return$"{ķ(ĕ/1000.0)}s";return$"{ķ(ĕ)}ms";
- }string ě(IMyTerminalBlock F){return F.BlockDefinition.SubtypeName;}bool Ĥ(string ý){return Ϗ.ContainsKey(ý);}bool İ(
- IMyTerminalBlock F){return ʭ.Length==0||ė(F.CustomName,ʭ);}bool į(string õ,out string ý,out string Ë){int q=õ.IndexOf("=");if(q!=-1){ý=õ
- .Substring(0,q);Ë=õ.Substring(q+1);return ː;}ý=õ;Ë=õ;return ˏ;}int Į(ǝ ĥ){try{if(ĥ.F!=null){IMyTerminalBlock F=ĥ.F;if(!((
- IMyFunctionalBlock)F).Enabled)return-1;else{if(F is IMyAssembler){if(((IMyAssembler)F).IsProducing||!((IMyAssembler)F).IsQueueEmpty)return
- 1;else return 0;}else if(F is IMyRefinery){if(F.GetInventory(0).ItemCount==0)return 0;else return 1;}else if(F is
- IMyGasGenerator){τ.Clear();F.GetInventory(0).GetItems(τ,ĭ=>ĭ.Type.SubtypeId=="Ice");if(τ.Count==0)return 0;else return 1;}else if(F is
- IMyReactor){if(F.GetInventory(0).ItemCount==0)return 0;else return 1;}else if(F is IMyUserControllableGun){if(F.GetInventory(0).
- ItemCount==0)return 0;else return 1;}}}}catch{}return-1;}bool Ĭ(ǝ ĥ,MyInventoryItem E){IMyTerminalBlock F=ĥ.F;bool ī=ˏ;double Ī=ĥ
- .ǜ.ų(ref ī,E);if(ī&&Ī<=0)return ˏ;if(F is IMyRefinery){if(X(E)){if(ě(F)==ʻ){if(Ζ["basicRefineryTypes"].Contains(E.Type.
- SubtypeId))return ː;Ǭ ª;if(Ļ(out ª,E.Type.ToString()))return ª.Ʀ;}}}if(W(E)&&Ά.ContainsKey(ě(ĥ.F)))return Ά[ě(ĥ.F)]==E.Type.
- SubtypeId;return ː;}void ĩ(ref SortedList<int,double>Ĩ,List<int>ħ){for(int K=0;K<ħ.Count;K++)Ĩ[ħ[K]]=-1;}bool Ħ(ǝ ĥ,ref double ı,
- MyInventoryItem E){bool Ĕ=ˏ;double Ĉ=ĥ.ǜ.ų(ref Ĕ,E);if(!Ĕ)Ĉ=ĥ.Ǜ.ų(ref Ĕ,E);if(Ĕ){ı=Ĉ;return ː;}return ˏ;}string ć(string õ){string[]Ć=
- new string[]{"{}","[]","<>"};string ą,Ą=õ;char ă,Ă;int ā,Ā;for(int K=0;K<Ć.Length;K++){ą=Ą;Ą="";ă=Ć[K][0];Ă=Ć[K][1];ā=ą.
- IndexOf(ă);Ā=ą.IndexOf(Ă);while(ā!=-1&&Ā!=-1&&Ā>ā){if(ā>0)Ą+=ą.Substring(0,ā);ą=ą.Substring(Ā+1);ā=ą.IndexOf(ă);Ā=ą.IndexOf(Ă);
- }Ą+=ą;}return Ą;}bool ÿ(string ý,string ù){return ė(ù,Ē(ý));}bool þ(ref string õ,string ý,string ù){try{string ü=Ē(ý),û;
- if(ė(ù,ü)){û=ù.Substring(ù.IndexOf(ü)+ü.Length);û=û.Substring(0,û.IndexOf(">"));õ=û;return û.Length>0;}}catch{}return ˏ;}
- bool ú(ref int ò,string ý,string ù){try{string ü=Ē(ý),û;int ē;if(ė(ù,ü)){û=ù.Substring(ù.IndexOf(ü)+ü.Length);û=û.Substring(
- 0,û.IndexOf(">"));if(int.TryParse(û,out ē)){ò=ē;return ː;}}}catch{}return ˏ;}string Ē(string ý,bool đ=ː){foreach(
- KeyValuePair<string,SortedList<string,string>>ċ in Λ)if(ċ.Value.ContainsKey(ý)){if(đ)return ċ.Value[ý].ToLower();return ċ.Value[ý];}
- return"-0.1";}double Đ(string ý){foreach(KeyValuePair<string,SortedList<string,double>>ċ in Ι)if(ċ.Value.ContainsKey(ý))return
- ċ.Value[ý];return-0.1;}bool ď(string ý){foreach(KeyValuePair<string,SortedList<string,bool>>ċ in Θ)if(ċ.Value.ContainsKey
- (ý))return ċ.Value[ý];return ˏ;}bool Ď(string ý,string Ë){foreach(KeyValuePair<string,SortedList<string,string>>ċ in Λ)if
- (ċ.Value.ContainsKey(ý)){ċ.Value[ý]=Ë;return ː;}return ˏ;}bool č(string ý,double Ë){foreach(KeyValuePair<string,
- SortedList<string,double>>ċ in Ι)if(ċ.Value.ContainsKey(ý)){ċ.Value[ý]=Ë;return ː;}return ˏ;}bool Č(string ý,bool Ë){foreach(
- KeyValuePair<string,SortedList<string,bool>>ċ in Θ)if(ċ.Value.ContainsKey(ý)){ċ.Value[ý]=Ë;return ː;}return ˏ;}Vector2 ĉ(float Ċ=0f,
- float IJ=0f){return new Vector2(Ċ,IJ);}bool Ř(string Ŗ,string ĭ){return string.Compare(Ŗ,ĭ,ː)==0;}double ŕ(MyInventoryItem E){
- double Ŕ=-1,œ;Ǭ ª;if(Γ.ContainsKey(Ͳ)){SortedList<string,Ǭ>Ò=Γ[Ͳ];for(int K=0;K<Ò.Count;K++){try{ª=Ò.Values[K];œ=ª.Ƥ.IndexOf(E
- .Type.SubtypeId);if(œ!=-1){if(Ŕ==-1)Ŕ=ª.ƺ()+(œ*0.00001);else Ŕ=Math.Min(Ŕ,ª.ƺ()+(œ*0.00001));}}catch{}}}return Ŕ;}ů Œ(Ǭ ª
- ){return new ů{U=ª.U,T=ª.T,Q=ª.Q,l=ª.Ǐ};}bool ő(MyInventoryItem E){Ǭ ª;return!έ.Contains(E.Type.ToString())&&!Ļ(out ª,E.
- Type.ToString());}bool Ő(MyProductionItem S){if(S.BlueprintId.SubtypeName==ʯ)return ˏ;return!ά.Contains(S.BlueprintId.
- SubtypeName)&&!Έ.ContainsKey(S.BlueprintId.SubtypeName);}bool ŏ(ű j){return ŏ(j.Ò);}bool ŏ(SortedList<string,double>ħ){for(int K=0;
- K<ħ.Count;K++)if(ħ.Values[K]>0)return ː;return ˏ;}bool Ŏ(Ǭ ª,string ŗ,string ř){try{string ť=ř.ToLower();double Ŧ=0,Ť;if(
- ť.StartsWith("quota")){Ŧ=ª.ƴ;int ţ=ť.IndexOf("+"),Ţ=ť.IndexOf("*");if(ţ>0){if(!double.TryParse(ť.Substring(ţ+1),out Ť))Ŧ
- +=Ť;}else if(Ţ>0){if(!double.TryParse(ť.Substring(Ţ+1),out Ť))Ŧ*=Ť;}}else if(ř.Contains("/")){Ǭ š;if(Ļ(out š,ř))Ŧ=š.Ǫ;}
- else if(!double.TryParse(ť,out Ŧ))return ˏ;if(ŗ==">=")return ª.Ǫ>=Ŧ;else if(ŗ=="<=")return ª.Ǫ<=Ŧ;else if(ŗ==">")return ª.Ǫ>
- Ŧ;else if(ŗ=="<")return ª.Ǫ<Ŧ;else if(ŗ=="=")return ª.Ǫ==Ŧ;}catch{}return ˏ;}bool Š(IMyTerminalBlock F){string ŋ=B(F);
- return ė(ŋ,"[logic&")||ė(ŋ,"[logic|");}bool Ş(IMyTerminalBlock F,string ŝ,string Ŝ,string ś,string Ś){string Ë;if(F is
- IMyTextPanel){Ë=F.CustomName.Replace(" ","").ToLower();return Ş(Ë,ŝ,Ŝ,ś,Ś);}else if(F is IMyTextSurfaceProvider){
- IMyTextSurfaceProvider ş=(IMyTextSurfaceProvider)F;for(int K=0;K<ş.SurfaceCount;K++){StringBuilder ï=new StringBuilder();ş.GetSurface(K).
- ReadText(ï);Ë=ï.ToString();if(Ş(Ë,ŝ,Ŝ,ś,Ś))return ː;}}return ˏ;}bool Ş(string Ë,string ŝ,string Ŝ,string ś,string Ś){if(ė(Ë,ŝ)||
- ė(Ë,Ŝ)||ė(Ë,ś)||ė(Ë,Ś))return ː;foreach(string C in Ω)if(ė(Ë,C))return ː;return ˏ;}string ō(string Ä,int Ō=20){if(Ä.
- Length<=Ō)return Ä;return
- $"{Ä.Substring(0,(int)Math.Ceiling(((double)Ō-1.0)/2.0))}.{Ä.Substring(Ä.Length-(int)Math.Floor(((double)Ō-1.0)/2.0))}";}bool ļ(int q){try{if(q>=Ό.Count)return ˏ;Ϛ=Ό[q];if(Ϛ.F==null)return ˏ;if(Ϛ.F.CubeGrid.CubeExists(Ϛ.F.Position)&&Ϛ.F.
- IsFunctional)return ː;}catch{}return ˏ;}bool Ļ(out Ǭ ª,string D){string Q,T;å(D,out Q,out T);if(Γ.ContainsKey(Q)&&Γ[Q].TryGetValue(T
- ,out ª))return ː;ª=null;return ˏ;}string ĺ(double Ĺ){if(Ĺ<1)return$"{ó(Ĺ*100.0)}";if(Ĺ==1)return"100";if(Ĺ<10)return
- $"{Math.Floor(Ĺ*100.0)}";return"999";}string ĸ(double ò){if(ò==0)return"0";if(ò<0.0001)return ò.ToString("0.0E0");if(ò<10)return Ķ(ò,4);if(ò<100
- )return Ķ(ò,3);if(ò<1000)return Ķ(ò,2);if(ò<10000)return Ķ(ò,1);if(ò<1000000)return Math.Floor(ò).ToString();if(ò<
- 10000000)return$"{Ķ(ò/1000000.0,3)}{ʩ}";if(ò<100000000)return$"{Ķ(ò/1000000.0,2)}{ʩ}";if(ò<1000000000)return
- $"{Ķ(ò/1000000.0,1)}{ʩ}";if(ò<10000000000)return$"{Ķ(ò/1000000000.0,3)}{ʳ}";if(ò<100000000000)return$"{Ķ(ò/1000000000.0,2)}{ʳ}";if(ò<
- 1000000000000)return$"{Ķ(ò/1000000000.0,1)}{ʳ}";return ò.ToString("0.00E0");}string ķ(double ò){string í="";if(ò<0)í="-";return
- $"{í}{ĸ(Math.Abs(ò))}";}string Ķ(double ò,int ĵ){return(Math.Floor(ò*(Math.Pow(10.0,ĵ)))/(Math.Pow(10.0,ĵ))).ToString();}void Ĵ(ref
- StringBuilder ï,Ǭ ª){ï.Append($"Name={ª.ǫ}||Category={Ģ(ª.C)}||Quota={ª.ŭ}");if(ª.ŭ>=0&&ª.Ǎ>ª.ŭ)ï.AppendLine($"<{ª.Ǎ}");else ï.
- AppendLine();ï.Append($"^Type={ª.Q}||Subtype={ª.T}");if(ь(ª.U))ï.Append(
- $"||Blueprint={ª.U}||Assembly Multiplier={ª.Ǐ}||Assemble={ª.ƪ}||Disassemble={ª.Ʃ}");if(X(ª.Q)){ï.Append($"||Refine={ª.ƨ}||BasicRefine={ª.Ʀ}");}ï.Append($"||Fuel={ª.Ƭ}||Display={ª.Ƨ}");if(Y(ª.Q)){ï.
- Append("||Ore Keys=[");for(int K=0;K<ª.Ƥ.Count;K++){if(K>0)ï.Append("|");ï.Append(ª.Ƥ[K]);}ï.Append("]");}ï.AppendLine();}bool
- ij(ǝ F,MyDefinitionId U,MyAssemblerMode Ľ){IMyAssembler H=(IMyAssembler)F.F;if(!H.Enabled)return ˏ;string ŋ=F.dz();bool Ŋ=ˏ
- ,ʼn=ˏ,ň=ď("survivalKitAssembly");if(!ň&&U.SubtypeName!=ʯ&&ė(ě(H),"survival"))return ˏ;if(ÿ("assemblyOnlyKeyword",ŋ))Ŋ=ː;
- else if(ÿ("disassemblyOnlyKeyword",ŋ))ʼn=ː;if((Ŋ&&Ľ==ˍ)||(ʼn&&Ľ==ˎ))return ˏ;return H.CanUseBlueprint(U)&&(H.IsQueueEmpty||H.
- Mode==Ľ);}string Ň(ů S){return$"{ˡ}/{S.U}";}double ņ(ů S,bool Ņ=ˏ){Ǭ ª;if(Ļ(out ª,$"{S.Q}/{S.T}")){if(Ņ&&ª.Ƶ<0)return-ª.Ƶ;
- else if(!Ņ&&ª.Ƶ>0)return ª.Ƶ;}return 0;}double ń(IMyTerminalBlock F){try{string Ń="";double ł;if(þ(ref Ń,"priorityTag",B(F))
- &&double.TryParse(Ń,out ł))return ł;}catch{}return 1;}double Ł(MyDefinitionId U){if(U.SubtypeName==ʯ)return double.
- MaxValue;string Q,T;if(V(U.SubtypeName,out Q,out T))return ŀ(Q,T);return-1;}double ŀ(string Q,string T){Ǭ ª;if(Ļ(out ª,
- $"{Q}/{T}"))return ª.ƺ();return 100;}bool Ŀ(string ľ){if(!Σ.ContainsKey(ľ)){Σ[ľ]=new TimeSpan(0);return ː;}return Σ[ľ].
- TotalMilliseconds<=0.0;}TimeSpan ø(double u){return TimeSpan.FromSeconds(u);}double P(IMyTerminalBlock F){return(double)F.GetInventory(0)
- .MaxVolume-(double)F.GetInventory(0).CurrentVolume;}double r(int q){return(double)Ό[q].F.GetInventory(0).CurrentVolume/(
- double)Ό[q].F.GetInventory(0).MaxVolume;}bool p(string Q,MyInventoryItem E){return(W(Q)&&W(E))||(R(Q)&&R(E))||(Y(Q)&&Y(E))||(X
- (Q)&&X(E))||(O(Q)&&O(E));}bool o(double n,double m,double l){return n>m+(m*l);}bool t(double n,double m,double l){return
- n<m-(m*l);}ű k(){ű j=new ű{Ů=this};return j;}bool h(MyInventoryItem E,ǝ F){string T=E.Type.SubtypeId;bool g=Z(E)&&Ϻ;if(!g
- &&!ė(F.dz(),"<distribute>")&&F.Ǜ.ų(E)>0)return ˏ;return(X(E)&&f(E))||W(E)||º(E)||(ε.Count>0&&Y(E)&&T=="Stone")||(R(E)&&T==
- "Canvas")||g;}bool f(MyInventoryItem E){Ǭ e;if(Ļ(out e,E.Type.ToString()))return e.ƨ;return ː;}double v(MyInventoryItem E,
- IMyTerminalBlock F){return v(E.Type.TypeId,E.Type.SubtypeId,F);}double v(string Q,string T,IMyTerminalBlock F){if(F is IMyGasGenerator){
- if(X(Q)&&T=="Ice")return Á(Đ("icePerO2/H2Generator"),Q,T,F);}else if(F is IMyRefinery){if(ˋ>0)return((double)F.
- GetInventory(0).MaxVolume/ˋ)/c(Q,T);}else if(F is IMyUserControllableGun)return Math.Ceiling(Á(Đ("ammoPerGun"),Q,T,F));else if(F is
- IMyReactor)return Á(Đ("fuelPerReactor"),Q,T,F);else if(F is IMyParachute)return Math.Ceiling(Á(Đ("canvasPerParachute"),Q,T,F));
- return double.MaxValue;}double Á(double À,string Q,string T,IMyTerminalBlock F){if(À<=1.0)return((double)F.GetInventory(0).
- MaxVolume/c(Q,T))*À;return À;}double c(string Q,string T){try{Ǭ e;if(Ļ(out e,$"{Q}/{T}")&&e.ƶ!=0.0)return e.ƶ;}catch{}return 0.17
- ;}bool º(MyInventoryItem E){Ǭ ª;return Ļ(out ª,E.Type.ToString())&&ª.Ƭ;}string µ(MyInventoryItem E){return µ(E.Type.
- TypeId,E.Type.SubtypeId);}string µ(string Q,string T){Ǭ ª;if(Ļ(out ª,$"{Q}/{T}"))return ª.ǫ;return T;}double w(MyInventoryItem
- E,IMyTerminalBlock F){return P(F)/c(E);}bool d(MyInventoryItem E){return E.Type.GetItemInfo().UsesFractions;}bool N(ǝ J,
- int I){IMyTerminalBlock F=J.F;if(J.Ǖ)return I==1;if(F is IMyRefinery)return I==1;if(F is IMyAssembler){IMyAssembler H=(
- IMyAssembler)F;return(H.IsQueueEmpty||((H.Mode==ˎ&&I==1)||(H.Mode==ˍ&&I==0)));}if(F is IMyReactor||F is IMyParachute||F is
- IMyUserControllableGun||F is IMySafeZoneBlock)return ˏ;return ː;}bool M(IMyTerminalBlock F){string L=ě(F);for(int K=0;K<Ζ["gravelSifterKeys"].
- Count;K++){if(ė(L,Ζ["gravelSifterKeys"][K]))return ː;}return ˏ;}bool N(MyInventoryItem E,ǝ J,int I=0){IMyTerminalBlock F=J.F;
- if(A(J,E)||G(J,E)||(F is IMyGasGenerator&&(E.Type.SubtypeId=="Ice"||(Z(E)&&Ϻ))))return ˏ;if(F is IMyAssembler){
- IMyAssembler H=(IMyAssembler)F;return H.IsQueueEmpty||(I==0&&H.Mode==ˍ)||(I==1&&H.Mode==ˎ);}if(F is IMyShipWelder&&((IMyShipWelder)F
- ).Enabled&&R(E))return ˏ;return ː;}bool G(ǝ F,MyInventoryItem E){string D=E.Type.ToString(),C;if(ͼ.ContainsKey(D)){C=ͼ[D]
- ;return F.Ǘ.Contains(C)||(F.Ǘ.Count>0&&(!Ν.ContainsKey(C)||Ν[C].Count==0));}else{if(W(E))return F.Ǘ.Contains(ʵ);if(R(E))
- return F.Ǘ.Contains(ʶ);if(Y(E))return F.Ǘ.Contains(ʸ);if(X(E))return F.Ǘ.Contains(ʷ);if(O(E))return F.Ǘ.Contains(ʿ);}return ˏ;
- }string B(IMyTerminalBlock F){return F.CustomData.ToLower().Replace("\n","").Replace("\r","");}bool A(ǝ F,MyInventoryItem
- E){return F.Ǜ.ų(E)>0||F.Ǚ.ų(E)>0;}double c(MyInventoryItem E){return E.Type.GetItemInfo().Volume;}bool Z(MyInventoryItem
- E){return Z(E.Type.TypeId);}bool Z(string Q){return Ř(Q,Ͱ)||Ř(Q,ˮ);}bool Y(string Q){return Q=="*"||Ř(Q,Ͳ)||Ř(Q,ʸ)||(Q.
- Length>1&&Ê(ʸ,Q));}bool X(string Q){return Q=="*"||Ř(Q,ͳ)||Ř(Q,ʷ)||(Q.Length>1&&Ê(ʷ,Q));}bool W(string Q){return Q=="*"||Ř(Q,ˬ
- )||Ř(Q,ʵ)||(Q.Length>1&&Ê(ʵ,Q));}bool W(MyProductionItem E){string Q,T;if(V(E.BlueprintId.SubtypeName,out Q,out T))return
- W(Q);return ˏ;}bool V(string U,out string Q,out string T){ů S;Q="";T="";if(Έ.TryGetValue(U,out S)){Q=S.Q;T=S.T;return ː;}
- return ˏ;}bool R(string Q){return Q=="*"||Ř(Q,ʹ)||Ř(Q,ʶ)||(Q.Length>1&&Ê(ʶ,Q));}bool O(string Q){return Q=="*"||Ř(Q,ͱ)||Z(Q)||
- Ř(Q,ˤ)||Ř(Q,ˣ)||Ř(Q,ˢ)||Ř(Q,ʿ)||(Q.Length>1&&(Ê(ͱ,Q)||Ê(ˤ,Q)||Ê(ˣ,Q)||Ê(ˢ,Q)||Ê(ʿ,Q)));}bool Ê(string á,string à){return
- á.Replace(" ","").ToLower().StartsWith(à.Replace(" ","").ToLower());}bool Y(MyInventoryItem E){return E.Type.GetItemInfo(
- ).IsIngot;}bool X(MyInventoryItem E){return E.Type.GetItemInfo().IsOre;}bool R(MyInventoryItem E){return E.Type.
- GetItemInfo().IsComponent;}bool O(MyInventoryItem E){return E.Type.GetItemInfo().IsTool||O(E.Type.TypeId);}bool W(MyInventoryItem E
- ){return E.Type.GetItemInfo().IsAmmo;}bool ß(string Q){return Q=="*"||Q=="all"||Ω.Contains(Q.ToLower());}bool Ý(
- IMyTerminalBlock F,ref bool Ü){string ª=ě(F);Ü=!Ζ["specialManualDefinitions"].Contains(ª);if(Ζ["excludedDefinitions"].Contains(ª))return
- ː;if(ė(B(F),ʹ))return ː;return Ώ.Contains(F);}bool Û(double l=0.95){double Ú=l;if(Ћ>0)Ú=Math.Min(Ú,1.0-(ϒ/(Ћ*1.5)));if(Ú
- <=0)Ú=0.01;return(Runtime.CurrentInstructionCount<(Runtime.MaxInstructionCount*Ї*Ú)&&(DateTime.Now-Ͷ).TotalMilliseconds<І*
- Ú);}bool Ù(string Ø){ʼ=Ø;bool Þ,Ö;DateTime â=DateTime.Now,ö;int ô=Runtime.CurrentInstructionCount;try{Þ=Ϗ[Ø].MoveNext();ö
- =DateTime.Now;Ρ[Ø].ƛ+=Runtime.CurrentInstructionCount-ô;Ρ[Ø].Ɯ++;if(!Ϊ.Contains(Ø))Ϊ.Add(Ø);}catch{Ź(
- $"Error in function: {Ø} : {Κ[Ø]}");Ǹ(Ø);return ː;}if(Ø.Length!=0)Ρ[Ø].æ+=ö-â;Ö=ͽ.ContainsKey(Ø);if(!Þ||Ö){if(Ö)ͽ.Remove(Ø);Ρ[Ø].ƚ=Ρ[Ø].Ɯ;Ρ[Ø].Ɯ=0;Ρ[Ø].ƙ=
- Ρ[Ø].ƛ;Ρ[Ø].ƛ=0;Ρ[Ø].Ɨ=TimeSpan.FromMilliseconds(Ρ[Ø].æ.TotalMilliseconds);Ρ[Ø].æ-=Ρ[Ø].æ;Ρ[Ø].Ƙ++;if(!Þ)Ǹ(Ø);}return!Þ;}
- double ó(double ò,int ñ=2){return Math.Round(ò,ñ);}void ð(ref StringBuilder ï,string î){string í="",ì="",ë="",ê="";for(int K=0
- ;K<î.Length;K++){í+="/";ì+=@"\";ë+=" ";ê+="|";}ï.AppendLine();ï.AppendLine($"{í}{ë}{ì}");ï.AppendLine($"{ê} {î} {ê}");ï
- .AppendLine($"{ì}{ë}{í}");ï.AppendLine();}void é(int[]è){for(int K=0;K<è.Length;K++)Ǹ(Й[è[K]]);}void ç(ref TimeSpan æ){æ=
- ç(æ);}void å(string D,out string Q,out string T){int q=D.IndexOf("/");Q=D.Substring(0,q);T=D.Substring(q+1);}void ä(){ʰ=
- "Idle";}void ã(string õ){ʮ=õ;ʾ=DateTime.Now.AddSeconds(15);}void Õ(string Ä,string Ã){ű j;double n,Æ;Â(Ã,out n,out Æ);if(Δ.
- TryGetValue(Ä.ToLower(),out j)){int È=j.Ū();for(int K=0;K<È;K++)Ç(j.ŷ(K),n,Æ);}}void Ç(string D,double n,double Æ){string É,T;å(D,
- out É,out T);Ç(É,T,n,Æ);}void Ç(string Q,string T,double n,double Æ){Ǭ ª;if(Ļ(out ª,$"{Q}/{T}"))Ï(ª,n,Æ);}void Å(string Ä,
- string Ã){if(Ä.Length>0){double n,Æ;Â(Ã,out n,out Æ);if(ß(Ä)){if(Ä=="*"||Ä=="all")Ô(n,Æ,"","");else Ô(n,Æ,"",Ä);}else Ô(n,Æ,Ä)
- ;}}void Â(string Ë,out double n,out double Æ){int q=Ë.IndexOf("<");if(q>0){n=double.Parse(Ë.Substring(0,q));Æ=double.
- Parse(Ë.Substring(q+1));}else{n=double.Parse(Ë);Æ=n;}}void Ô(double n,double Æ,string Ó="",string C=""){List<Ǭ>Ò=ĝ();string Ñ
- =Ó.Replace(" ","");bool Ð=ˏ;if(Ñ.Length>2){if(Ñ.StartsWith("'")&&Ñ.EndsWith("'")){Ð=ː;Ñ=Ñ.Substring(1,Ñ.Length-2);}}for(
- int K=0;K<Ò.Count;K++)if((C.Length==0||Ř(C,Ò[K].C))&&(Ñ.Length==0||(!Ð&&Ê(Ò[K].ǫ,Ñ))||(Ð&&Ř(Ò[K].ǫ.Replace(" ",""),Ñ))))Ï(Ò
- [K],n,Æ);}void Ï(Ǭ ª,double n,double Î){double Æ=Î+ª.ǣ;ª.ŭ=n;ª.Ǎ=Æ;if(ª.Ǎ<n)ª.Ǎ=n;if(ª.Ǎ<0)ª.Ǎ=0;ª.ģ();}void Í(
- MyInventoryItem E){try{string T,D=E.Type.ToString();T=E.Type.SubtypeId;ʬ=T;ȕ(T,T,E.Type.TypeId);ϼ=ː;if(Y(E)||X(E))return;if(ά.Contains(
- ʬ)||ы(E,ref ʬ)){Ǭ ª;if(Ļ(out ª,D)){ã($"Merged Mod Item: {ō(T,15)}");ª.U=ʬ;ά.Remove(ʬ);έ.Remove(D);ϼ=ː;}}else if(!έ.
- Contains(D))έ.Add(D);}catch{Ź("Error/Temp: Error adding mod item");}}void Ì(MyProductionItem S){try{string T;T=S.BlueprintId.
- SubtypeName;ʬ="";if(е(S,ref ʬ)){Ǭ ª;if(Ļ(out ª,ʬ)){ã($"Added Mod Item: {ō(ª.ǫ,15)}");ª.U=T;έ.Remove(ʬ);ά.Remove(T);ϼ=ː;}}else if(!ά
- .Contains(T))ά.Add(T);}catch{Ź("Error/Temp: Error adding mod blueprint");}}void ŧ(){for(int K=0;K<Й.Length;K++)if(Ĥ(Й[K])
- )Ǹ(Й[K]);}void Ȕ(){if(Ё>0){if(И==null||И.Length!=Ё){И=new double[Ё];ˊ=0;for(int K=0;K<И.Length;K++)И[K]=-1;}И[ˊ]=Runtime.
- LastRunTimeMs;ˊ++;if(ˊ>=И.Length)ˊ=0;double ȓ=0,Ɯ=0;for(int K=0;K<И.Length;K++){if(И[K]!=-1){ȓ+=И[K];Ɯ++;}}Е=ȓ/Ɯ;}else{if(И!=null)И=
- null;Е=0;}ϧ+=Runtime.LastRunTimeMs*ϥ;ϧ*=1.0-ϥ;ϒ=Math.Max(Е,ϧ);}void Ź(string ȑ){if(ȑ.Length!=0){if(Ê(ȑ,"Error")){ˈ++;ˇ++;Ȓ(ȑ
- ,ref ι);ã(ȑ);}Ȓ(ȑ,ref Ξ,Ͼ);}}void Ȓ(string ȑ,ref List<Ƌ>ħ,int Ī=30){bool Ȑ=ː;for(int K=0;K<ħ.Count;K++){if(ħ[K].õ==ȑ){ħ[K
- ].È++;ħ.Move(K,0);Ȑ=ˏ;break;}}if(Ȑ)ħ.Insert(0,new Ƌ{õ=ȑ});if(ħ.Count>Ī)ħ.RemoveRange(Ī,ħ.Count-Ī);}void ȏ(IEnumerator<
- bool>Ȏ,string Ø){Ϗ[Ø]=Ȏ;if(!Ρ.ContainsKey(Ø))Ρ[Ø]=new Ɲ();Κ[Ø]="Initialize";}void ȍ(){Runtime.UpdateFrequency=
- UpdateFrequency.None;Runtime.UpdateFrequency&=~UpdateFrequency.Update1;Runtime.UpdateFrequency&=~UpdateFrequency.Update10;Runtime.
- UpdateFrequency&=~UpdateFrequency.Update100;if(κ==100)Runtime.UpdateFrequency=UpdateFrequency.Update100;else if(κ==1)Runtime.
- UpdateFrequency=UpdateFrequency.Update1;else Runtime.UpdateFrequency=UpdateFrequency.Update10;}void ȋ(string U,bool Ȍ,double n,bool ƽ){
- ů S;if(Έ.TryGetValue(U,out S))ȋ(S.Q,S.T,Ȍ,n,ƽ);}void ȋ(MyProductionItem E,bool Ȍ,bool ƽ=ˏ){if(Έ.ContainsKey(E.BlueprintId
- .SubtypeName)){ů S=Έ[E.BlueprintId.SubtypeName];ȋ(S.Q,S.T,Ȍ,(double)E.Amount,ƽ);}}void ȋ(string Q,string T,bool Ȍ,double
- n,bool ƽ){Ǭ ª;if(Ļ(out ª,$"{Q}/{T}")){if(Ȍ)ª.ƿ((MyFixedPoint)n,ƽ);else ª.ƾ((MyFixedPoint)n,ƽ);}}void ǀ(MyInventoryItem E,
- bool ƽ=ˏ){Ǭ ª;if(Ļ(out ª,E.Type.ToString())){ª.ǀ(E.Amount,ƽ);if(ª.ƶ==0)ª.ƶ=E.Type.GetItemInfo().Volume;}}void ș(
- IMyTerminalBlock F){bool Ș=ˏ,ȗ=ÿ("autoConveyorKeyword",B(F)),Ȗ;if(F is IMyAssembler)((IMyProductionBlock)F).UseConveyorSystem=ː;else if(
- F is IMyRefinery)((IMyProductionBlock)F).UseConveyorSystem=ȗ||ď("useConveyorRefineries");else if(F is IMyReactor)((
- IMyReactor)F).UseConveyorSystem=ȗ||ď("useConveyorReactors");else if(F is IMyGasGenerator)((IMyGasGenerator)F).UseConveyorSystem=ȗ
- ||ď("useConveyorH2/O2Gens");else if(F is IMySmallGatlingGun){Ȗ=((IMySmallGatlingGun)F).UseConveyorSystem;if(ȗ||ď(
- "useConveyorGuns"))Ș=!Ȗ;else Ș=Ȗ;}else if(F is IMyLargeGatlingTurret){Ȗ=((IMyLargeGatlingTurret)F).UseConveyorSystem;if(ȗ||ď(
- "useConveyorGuns"))Ș=!Ȗ;else Ș=Ȗ;}else if(F is IMyLargeMissileTurret){Ȗ=((IMyLargeMissileTurret)F).UseConveyorSystem;if(ȗ||ď(
- "useConveyorGuns"))Ș=!Ȗ;else Ș=Ȗ;}else if(F is IMySmallMissileLauncherReload){Ȗ=((IMySmallMissileLauncherReload)F).UseConveyorSystem;if(ȗ
- ||ď("useConveyorGuns"))Ș=!Ȗ;else Ș=Ȗ;}else if(F is IMySmallMissileLauncher){Ȗ=((IMySmallMissileLauncher)F).
- UseConveyorSystem;if(ȗ||ď("useConveyorGuns"))Ș=!Ȗ;else Ș=Ȗ;}if(Ș)F.ApplyAction("UseConveyor");}void ȕ(string Ä,string T,string Q,string U
- ="None",bool Ƨ=ː,List<string>Ƥ=null){if(!Γ.ContainsKey(Q))Γ[Q]=new SortedList<string,Ǭ>();if(!Γ[Q].ContainsKey(T)){Γ[Q][T
- ]=new Ǭ{Q=Q,T=T,ǫ=Ä,U=U,Ƨ=Ƨ};if(ь(U))ά.Remove(U);Ȋ($"{Q}/{T}",U,Ƥ);}}void Ȋ(string D,string U="",List<string>Ƥ=null){Ǭ ª;
- if(Ļ(out ª,D)){if(Y(ª.Q)){ª.ŭ=100;ª.Ǎ=100;if(ª.T=="Uranium")ª.Ƭ=ː;}ª.C=э(ª.ƫ());ǻ(D,U,Ƥ);}}void ǻ(string D,string U="",
- List<string>Ƥ=null){Ǭ ª;if(Ļ(out ª,D)){if(Y(ª.Q))ª.Ƥ.Add(ª.T);if(Ƥ!=null)ª.Ƥ.AddRange(Ƥ);ª.Ƥ=ª.Ƥ.Distinct().ToList();if(ь(U)
- ){ª.U=U;Έ[U]=Œ(ª);}string C=ª.Ơ();ͼ[ª.ƫ()]=C;if(!Ω.Contains(C)){Ω.Add(C);Ͽ=Math.Max(Ͽ,C.Length);}Ǻ(ª);}}void Ǻ(Ǭ ª){if(!Y
- (ª.Q)&&!X(ª.Q)&&ª.U.Length==0){if(!έ.Contains(ª.ƫ()))έ.Add(ª.ƫ());}else έ.Remove(ª.ƫ());}void ǹ(){if(!Ϲ){try{Ϲ=ː;for(int
- K=0;K<Ο.Count;K++)Ο[Ο.Keys[K]]=Ο.Values[K]+1;}catch{Ź("Error advancing scroll ticks");}}}void Ǹ(string Ø){try{Ϗ[Ø].
- Dispose();}catch{}try{Ϗ[Ø]=null;}catch{}Ϗ.Remove(Ø);Κ.Remove(Ø);}void Ƿ(ref StringBuilder Ƅ,ref int Ɗ,ref int Ƕ,int È,string í)
- {if(È>0){if(Ƕ==0){Ƅ.Append($"| {í}: {ķ(È)}".PadRight(24));Ƕ=1;Ɗ--;}else{Ƅ.Append("-");Ƅ.Append($" {í}: {ķ(È)}".PadRight(
- 23));Ƅ.AppendLine("|");Ƕ=0;}}}void ǵ(ǝ L){string Ǵ=L.F.EntityId.ToString();if(L.ş)Ǵ+=$":{L.Ž}";else Ǵ+=":0";if(!Α.Contains
- (Ǵ)){Α.Add(Ǵ);IMyTextSurface ź=L.ǰ();if(ź.ContentType!=ContentType.TEXT_AND_IMAGE)ź.ContentType=ContentType.
- TEXT_AND_IMAGE;}}void ȉ(ref string õ,string Ȉ,bool ş){õ=Ȉ;if(!ş){õ+=" Capacity";õ=õ.PadRight(Ͽ+9);}else õ=õ.PadRight(Ͽ);}bool ȇ(string
- Ø){if(!Ĥ(Ø)){ȏ(Ȇ(),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>Ȇ(){IMyTerminalBlock F;string ȅ=Ē("manualKeyword"),
- Ȅ,ȃ,ŋ,Ä,ś,Ŝ,Ȃ,ȁ,Ȁ,ǿ,Q,T;ȃ=Ē("storageKeyword");if(!Û())yield return ː;ś=Ē("outputPanelKeyword");Ŝ=Ē("storageKeyword");ȁ=Ē(
- "statusPanelKeyword");Ȅ=$"{ȃ}";for(int K=0;K<Ω.Count;K++)Ȅ+=$" {Ω[K]}";bool Ǿ=ď("autoKeyCargoContainers"),ǽ,Ǽ=ˏ,Ü=ː,Ț;int q;if(!Û())yield
- return ː;List<string>Ʉ=new List<string>();ű Ƀ=k();bool ɂ,Ɂ=ď("addLoadoutsToQuota");ϭ=ˏ;Ѐ=ˏ;Ϩ=ˏ;for(int K=0;K<ΐ.Count;K++){if(K
- >0&&!Û())yield return ː;F=ΐ[K];ǿ=F.EntityId.ToString();if(F is IMyProgrammableBlock)ɂ=ˏ;else ɂ=Ý(F,ref Ü);ǝ L=new ǝ{F=F,ǜ
- =k(),Ǜ=k(),ǚ=k(),Ǚ=k(),ş=F is IMyCockpit||F is IMyProgrammableBlock};if(F is IMyProgrammableBlock){Ȁ="";ŋ="";}else{ŋ=B(F)
- ;if(!Û(0.5))yield return ː;Ȁ=ć(ŋ);if(ŋ=="<definition>")F.CustomData=F.BlockDefinition.ToString();}if(!Û())yield return ː;
- Ä=F.CustomName.ToLower();if(!ɂ&&F.InventoryCount>0){q=Ό.Count;ǽ=F is IMyCargoContainer||ė(Ȁ,ȃ);ș(F);if(!Û())yield return
- ː;if(Ü&&!ė(ŋ,ȅ)){if(M(F)){L.Ǖ=ː;ε.Add(q);}else if(F is IMyAssembler){if(!θ.ContainsKey(ǿ))θ[ǿ]=new Ɩ{Ľ=((IMyAssembler)F).
- Mode,H=(IMyAssembler)F};η.Add(q);}else if(F is IMyRefinery)ί.Add(q);else if(F is IMyReactor)ΰ.Add(q);else if(F is
- IMyUserControllableGun)δ.Add(q);else if(F is IMyGasGenerator){ζ.Add(q);((IMyGasGenerator)F).AutoRefill=ː;}else if(F is IMyParachute)α.Add(q);
- else if(F is IMyGasTank){if(ė(ě(F),"hydrogen"))γ.Add(q);else β.Add(q);((IMyGasTank)F).AutoRefillBottles=ː;}}if(Ü&&ǽ){if(Ǿ&&(
- ŋ.Length==0||ŋ==ȃ)){F.CustomData=Ȅ;ŋ=Ȁ=B(F);}foreach(string C in Ω){if(!Û())yield return ː;if(ė(Ȁ,C)){L.Ǘ.Add(C);Ǽ=ː;if(!
- Ν.ContainsKey(C))Ν[C]=new List<int>(50);Ν[C].Add(q);}}if(Ǽ){ή.Add(q);L.ł=ń(F);if(L.ł!=1){ϭ=ː;foreach(string C in L.Ǘ){if(
- !Û())yield return ː;if(!ͻ.Contains(C))ͻ.Add(C);}}}Ǽ=ˏ;}if(!Û())yield return ː;while(!ч(Й[22],Й[46],L.Ǜ,ŋ,'{','}'))yield
- return ː;if(!Ϩ&&ŏ(L.Ǜ))Ϩ=ː;while(!ч(Й[22],Й[46],L.ǜ,ŋ))yield return ː;if(!Ѐ&&(Ϩ||L.ǜ.Ū()>0))Ѐ=ː;if(Ü){if(F is
- IMyUserControllableGun&&!ŏ(L.Ǜ)){Ȃ=ě(F);if(!Ά.ContainsKey(Ȃ)){if(F.GetInventory(0).ItemCount>0){List<MyInventoryItem>ɀ=new List<
- MyInventoryItem>();F.GetInventory(0).GetItems(ɀ);Ά[Ȃ]=ɀ[0].Type.ToString();}}if(Ά.ContainsKey(Ȃ)){å(Ά[Ȃ],out Q,out T);L.Ǜ.Ò[Ά[Ȃ]]=v(Q,T
- ,F);}}if(F is IMyParachute&&!ŏ(L.Ǜ))L.Ǜ.Ò[$"{ʹ}/Canvas"]=v(ʹ,"Canvas",F);}if(!Û(0.5))yield return ː;if(Ɂ)Ƀ.ū(L.Ǜ);Ό.Add(L
- );}Ț=F is IMyTimerBlock||(ŋ.Length>0&&Š(F));if(Ț||F is IMyTextSurfaceProvider){if(F is IMyTextPanel){foreach(string C in
- Ω){if(!Û())yield return ː;if(ė(Ä,C))L.ǖ.Add(C);}while(!ч(Й[22],Й[46],L.ǚ,ŋ))yield return ː;if(L.ǖ.Count==0&&L.ǚ.Ū()==0){L
- .ǔ=ė(Ä,ś);L.Ǔ=ė(Ä,Ŝ);L.Ǒ=ė(Ä,ȁ);}if(L.ǔ||L.Ǔ||L.Ǒ||L.ǖ.Count>0||L.ǚ.Ū()>0){ǵ(L);Ʉ.Add(L.Dz());Ί.Add(L);}}else if(F is
- IMyTextSurfaceProvider){int ȿ=((IMyTextSurfaceProvider)F).SurfaceCount;for(int Ⱦ=0;Ⱦ<ȿ;Ⱦ++){if(!Û())yield return ː;string Ƚ=ŋ,ȼ=$"nds:{Ⱦ}";int
- Ȼ=Ƚ.IndexOf(ȼ);if(Ƚ.Length>0&&Ȼ>=0){Ƚ=Ƚ.Substring(Ȼ+ȼ.Length);Ȼ=Ƚ.IndexOf("nds:");if(Ȼ>0)Ƚ=Ƚ.Substring(0,Ȼ);L=new ǝ{F=F,ş
- =ː,ǜ=k(),Ǜ=k(),ǚ=k(),Ǚ=k(),Ž=Ⱦ,};if(!Û(0.5))yield return ː;Ȁ=ć(Ƚ);foreach(string C in Ω){if(!Û())yield return ː;if(ė(Ȁ,C)
- )L.ǖ.Add(C);}while(!ч(Й[22],Й[46],L.ǚ,Ƚ))yield return ː;if(L.ǖ.Count==0&&L.ǚ.Ū()==0){L.ǔ=ė(Ƚ,ś);L.Ǔ=ė(Ƚ,Ŝ);L.Ǒ=ė(Ƚ,ȁ);}if
- (L.ǔ||L.Ǔ||L.Ǒ||L.ǖ.Count>0||L.ǚ.Ū()>0){ǵ(L);Ʉ.Add(L.Dz());Ί.Add(L);}}}}else{while(!ʥ(L))yield return ː;Ή.Add(L);}}if(!Û()
- )yield return ː;if(Ȁ.Contains("explain")){StringBuilder ï=new StringBuilder();string Ŵ="";while(!ў(ref Ŵ,L.ǜ,'[',']'))
- yield return ː;if(Ŵ.Length>0)ï.AppendLine(Ŵ.Trim());while(!ў(ref Ŵ,L.Ǜ,'{','}'))yield return ː;if(Ŵ.Length>0)ï.AppendLine(Ŵ.
- Trim());while(!ў(ref Ŵ,L.ǚ,'[',']',ˏ))yield return ː;if(Ŵ.Length>0)ï.AppendLine(Ŵ.Trim());ï.Append(Ȁ.Replace("explain",""));
- F.CustomData=ï.ToString();}}ΐ.Clear();Ώ.Clear();if(ϭ){while(!ѹ(ή))yield return ː;for(int K=0;K<Ν.Count;K++){if(ͻ.Contains
- (Ν.Keys[K]))while(!ѹ(Ν.Values[K]))yield return ː;}}if(Ɂ)while(!Ґ(Ƀ))yield return ː;string ý;for(int K=0;K<Ο.Count;K++){if
- (!Û())yield return ː;ý=Ο.Keys[K];if(!Ʉ.Contains(ý)){Ο.Remove(ý);Π.Remove(ý);}}}bool Ⱥ(ǝ ĥ){if(!Ĥ(Й[51])){ȏ(Ʌ(ĥ),Й[51]);if
- (!Û())return ˏ;}return Ù(Й[51]);}IEnumerator<bool>Ʌ(ǝ ĥ){IMyTextSurface ź=ĥ.ǰ();string ý=ĥ.Dz();double ɕ,ɔ=0;int q;Vector2
- ſ=ź.SurfaceSize;ƀ(ref ſ,ĥ);string ù=ĥ.dz(),õ="",ǐ=ź.Font,ȼ;if(ĥ.ş){ý+=$":{ĥ.Ž}";ȼ=$"nds:{ĥ.Ž}";q=ù.IndexOf(ȼ);if(q>=0){ù=ù
- .Substring(q+ȼ.Length);if(!Û())yield return ː;if(ù.Contains("nds:"))ù=ù.Substring(0,ù.IndexOf("nds:"));}}bool ɓ=ĥ.ǚ.Ū()>0
- ||ĥ.ǖ.Count>0,ɒ=ÿ("ascendingAmountKeyword",ù),ɑ=ˏ,ɐ=ˏ,ɏ=ˏ,Ɏ=ˏ,ɍ=ˏ,Ɍ=ˏ,ɋ=ˏ;StringBuilder Ƅ=new StringBuilder();if(!ɒ){if(ÿ(
- "descendingAmountKeyword",ù))ɑ=ː;else if(ÿ("ascendingPercentKeyword",ù))ɐ=ː;else if(ÿ("descendingPercentKeyword",ù))ɏ=ː;}if(!Π.ContainsKey(ý)){Π[
- ý]=0;Ο[ý]=0;}int Ɗ=5,Ɋ=18,ɉ=6,Ɉ=Π[ý],ɇ=0,Ɇ=300,ȸ=6,ȧ=1,ȷ=0,Ƕ=0;if(ſ.X<512)Ɋ=10;if(!Û())yield return ː;if(ú(ref Ɗ,
- "panelRowCountKeyword",ù))Ɏ=ː;if(ú(ref Ɋ,"nameLengthKeyword",ù))ɍ=ː;ú(ref ȸ,"progressBarLengthTag",ù);ú(ref ȧ,"scrolledLinesTag",ù);ú(ref ɉ,
- "amountLengthKeyword",ù);ú(ref Ɇ,"scrollTickDelayKeyword",ù);ǐ=ź.Font;if(!Ɏ)ż(ĥ,new List<bool>{ˏ},ý,ź,ref Ɗ);if(!Û())yield return ː;if(ɓ){
- List<string>Ȧ=new List<string>();bool ȥ=ÿ("detailedKeyword",ù),Ȥ=ˏ,ȣ=ˏ,Ȣ=ÿ("belowQuotaOnlyKeyword",ù);int ȡ;if(!ȥ){if(ÿ(
- "compactPercentKeyword",ù))Ȥ=ː;else if(ÿ("compactAmountKeyword",ù))ȣ=ː;}if(!Ɏ)ż(ĥ,new List<bool>{ɓ,ȥ},ý,ź,ref Ɗ);if(ĥ.ǚ.Ū()>0)while(!ɗ(Ȧ,ĥ.ǚ))
- yield return ː;if(ĥ.ǖ.Count>0)while(!ɗ(Ȧ,null,ĥ.ǖ))yield return ː;ȡ=Ȧ.Count;Ǭ ª;for(int K=0;K<Ȧ.Count;K+=0){if(!Û())yield
- return ː;if(Ļ(out ª,Ȧ[K])&&(!ª.Ƨ||(Ȣ&&ª.Ǫ>=ª.ƴ))){Ȧ.RemoveAt(K);if(!ª.Ƨ)ȡ--;}else K++;}List<Ÿ>Ƞ=new List<Ÿ>();for(int K=0;K<Ȧ.
- Count;K++){if(!Û())yield return ː;if(Ļ(out ª,Ȧ[K])){Ÿ ȟ=new Ÿ{ý=Ȧ[K]};if(ɒ||ɑ)ȟ.n=ª.Ǫ;else if(ɐ||ɏ)ȟ.n=ª.Ǫ/ª.ƴ;else ȟ.õ=ª.ǫ;Ƞ
- .Add(ȟ);}}if(ɒ||ɐ)Ƞ=Ƞ.OrderBy(Ċ=>Ċ.n).ToList();else if(ɑ||ɏ)Ƞ=Ƞ.OrderByDescending(Ċ=>Ċ.n).ToList();else Ƞ=Ƞ.OrderBy(Ċ=>Ċ.
- õ).ToList();Ȧ.Clear();for(int K=0;K<Ƞ.Count;K++){if(K>0&&!Û())yield return ː;Ȧ.Add(Ƞ[K].ý);}if(Ɏ&&Ɗ==0)Ɗ=Ȧ.Count;for(int
- ȝ=0;ȝ<Ɗ&&ɇ<Ȧ.Count;ȝ++){if(Ɉ>=Ȧ.Count)Ɉ=0;if(Ļ(out ª,Ȧ[Ɉ])){if(ª.ƴ>0)ɕ=ª.Ǫ/ª.ƴ;else ɕ=1;if(ȥ){Ƅ.AppendLine(
- $"{ō(ª.ǫ,Ɋ).PadRight(Ɋ)} {ķ(ª.Ǫ).PadLeft(ɉ)}/{ķ(ª.ƭ).PadRight(ɉ)}{Ɔ(ɕ,ȸ)}");if(ª.ǩ>0)õ=$"Assembling: {ķ(ª.ǩ).PadRight(ɉ)}";else if(ª.Ǩ>0)õ=$"Disassembling: {ķ(ª.Ǩ).PadRight(ɉ)}";else if(X(ª.Q)){
- if(ª.ƨ)õ="Enabled";else õ="Disabled";}else õ="";Ƅ.Append($" {õ}");if(ª.Ǥ>=0)õ="+";else õ="";õ+=$"{ķ(ª.Ǥ)}/s";Ƅ.AppendLine(
- $" {õ}");ȝ++;}else if(ȣ)Ƅ.AppendLine($"{ō(ª.ǫ,Ɋ).PadRight(Ɋ)} {ķ(ª.Ǫ).PadLeft(ɉ)}");else if(Ȥ)Ƅ.AppendLine(
- $"{ō(ª.ǫ,Ɋ).PadRight(Ɋ)}{Ɔ(ɕ,ȸ)}");else Ƅ.AppendLine($"{ō(ª.ǫ,Ɋ).PadRight(Ɋ)} {ķ(ª.Ǫ).PadLeft(ɉ)}/{ķ(ª.ƭ).PadRight(ɉ)}{Ɔ(ɕ,ȸ)}");ɇ++;}Ɉ++;if(ȥ&&ȝ+1>=Ɗ)
- break;}ȷ=Ȧ.Count;if(ɇ<Ȧ.Count)Ɍ=ː;else ɋ=ː;if(Ȣ&&Ȧ.Count==0)Ƅ.Append($"All {ȡ} Items Meet Set Quotas");}else if(ĥ.Ǔ){bool Ȝ=ÿ
- ("totalCapacityKeyword",ù);if(Ȝ){ȉ(ref õ,"Total",ĥ.ş);if(!Ϯ){while(!ѻ(ref ɔ,ή))yield return ː;Б=ɔ;Ϯ=ː;}else ɔ=Б;Ƅ.
- AppendLine($"{õ} {Ɔ(ɔ,ȸ)}");}else{foreach(string C in Ω){if(!Û())yield return ː;if(!Β.ContainsKey(C)){if(Ν.ContainsKey(C))while(!ѻ
- (ref ɔ,Ν[C]))yield return ː;else ɔ=1;}else ɔ=Β[C];Β[C]=ɔ;ȉ(ref õ,Ģ(C),ĥ.ş);Ƅ.AppendLine($"{õ} {Ɔ(ɔ,ȸ)}");}}}else if(ĥ.ǔ){
- Ƅ.AppendLine($"| NDS Inventory Manager 5".PadRight(48)+"|");Ƅ.AppendLine($"| {ʰ}".PadRight(48)+"|");Ƅ.AppendLine(
- $"| Runtime: {ó(ϒ,4).ToString().PadRight(6)}".PadRight(48)+"|");Ƅ.AppendLine($"| Managed Blocks: {Ό.Count}".PadRight(48)+"|");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,η.Count,
- "Assemblers");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,ζ.Count,"H2/O2 Gens");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,ή.Count,"Storages");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,δ.Count,
- "Weapons");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,ί.Count,"Refineries");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,ΰ.Count,"Reactors");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,γ.Count,
- "Hydrogen Tanks");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,β.Count,"Oxygen Tanks");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,ε.Count,"Sifters");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,έ.Count+ά.Count
- ,"Mod Items");Ƿ(ref Ƅ,ref Ɗ,ref Ƕ,ˈ,"Errors");if(Ƕ==1)Ƅ.AppendLine("|".PadLeft(25));List<Ƌ>ț=Ξ;if(Ϭ)ț=ι;for(int K=0;K<ț.
- Count&&K<Ɗ;K++){if(!Û())yield return ː;õ=$"| {ț[K].Ź().PadRight(45)} |";Ƅ.AppendLine(õ);}}else if(ĥ.Ǒ){if(!ɍ)Ɋ=12;Ƅ.
- AppendLine("(Active/Total)");if(η.Count>0){while(!ȯ(Й[3],η,"Assemblers",Ƅ,21+Ɋ))yield return ː;if(!Ɏ)Ɗ--;}if(ί.Count>0){while(!ȯ(Й
- [3],ί,"Refineries",Ƅ,21+Ɋ))yield return ː;if(!Ɏ)Ɗ--;}if(ζ.Count>0){while(!ȯ(Й[3],ζ,"H2/O2 Gens",Ƅ,21+Ɋ))yield return ː;if
- (!Ɏ)Ɗ--;}if(ΰ.Count>0){while(!ȯ(Й[3],ΰ,"Reactors",Ƅ,21+Ɋ))yield return ː;if(!Ɏ)Ɗ--;}if(δ.Count>0){while(!ȯ(Й[3],δ,
- "Weapons",Ƅ,21+Ɋ))yield return ː;if(!Ɏ)Ɗ--;}Ǭ ª;List<Ÿ>Ȟ=new List<Ÿ>();foreach(KeyValuePair<string,ů>ċ in Έ){if(!Û())yield return
- ː;if(Ļ(out ª,$"{ċ.Value.Q}/{ċ.Value.T}")){if(ª.ǩ>0)Ȟ.Add(new Ÿ{õ=$"Assembling {ķ(ª.ǩ)} {ō(ª.ǫ,Ɋ)}".PadRight(21+Ɋ),n=ª.ǩ})
- ;if(ª.Ǩ>0)Ȟ.Add(new Ÿ{õ=$"Disassembling {ķ(ª.Ǩ)} {ō(ª.ǫ,Ɋ)}".PadRight(21+Ɋ),n=ª.Ǩ});}}Ȟ=Ȟ.OrderBy(Ċ=>Ċ.n).ToList();if(Ȟ.
- Count==0)Ȟ.Add(new Ÿ{õ="Nothing Queued".PadRight(21+Ɋ)});if(Ɏ&&Ɗ==0)Ɗ=Ȟ.Count;for(int K=0;K<Ɗ&&K<Ȟ.Count;K++){if(!Û())yield
- return ː;if(Ɉ>=Ȟ.Count)Ɉ=0;Ƅ.AppendLine(Ȟ[Ɉ].õ);Ɉ++;}ȷ=Ȟ.Count;if(Ȟ.Count>Ɗ&&Ɇ>=0)Ɍ=ː;else ɋ=ː;}if(Ɇ<=0)ɋ=ː;if(Ɍ&&!ɋ){if(Ο[ý]
- >=Ɇ){Ο[ý]=0;Ɉ=Π[ý];for(int K=0;K<ȧ;K++){Ɉ++;if(Ɉ>=ȷ)Ɉ=0;}Π[ý]=Ɉ;}}else if(ɋ){Ο[ý]=0;Π[ý]=0;}if(!Û())yield return ː;string
- ȶ=Ƅ.ToString().Trim();ź.WriteText(ȶ);string[]ȵ=ȶ.Split(new[]{"\r\n","\r","\n"},StringSplitOptions.RemoveEmptyEntries);if(
- !Û())yield return ː;double ȴ=0,ȳ=ȵ.Length,Ȳ=0,ȱ;Vector2 Ȱ;for(int K=0;K<ȵ.Length;K++){if(!Û())yield return ː;Ȱ=ȹ(ȵ[K],ǐ,ź
- );Ȳ=Math.Max(Ȳ,Ȱ.Y);ȴ=Math.Max(ȴ,Ȱ.X);}if(!ͺ.ContainsKey(ý))ͺ[ý]=ĉ((float)ȴ,(float)Ȳ);else ͺ[ý]=ĉ(Math.Max(ͺ[ý].X,(float)
- ȴ),Math.Max(ͺ[ý].Y,(float)Ȳ));Ȳ*=ȵ.Length;ȱ=Math.Min((ſ.X/ȴ)*((100f-(ź.TextPadding*2f))/100F),(ſ.Y/Ȳ)*((100f-(ź.
- TextPadding*2f))/100F));if(ȱ>=0.1&&ȱ<=10.0)ź.FontSize=(float)ȱ;yield return ˏ;}bool ȯ(string Ø,List<int>ȭ,string Ȭ,StringBuilder Ƅ,
- int ȫ){if(!Ĥ(Ø)){ȏ(Ȯ(ȭ,Ȭ,Ƅ,ȫ),Ø);if(!Û())return ˏ;}return Ù(Ø);}IEnumerator<bool>Ȯ(List<int>ȭ,string Ȭ,StringBuilder Ƅ,int
- ȫ){int Ȫ=0,ȩ,Ȩ=0;if(Ε.ContainsKey(Ȭ)){Ȫ=Ε[Ȭ][0];Ȩ=Ε[Ȭ][1];}else{for(int K=0;K<ȭ.Count;K++){if(!Û())yield return ː;if(!ļ(ȭ
- [K])){Ȩ++;continue;}ȩ=Į(Ό[ȭ[K]]);switch(ȩ){case-1:Ȩ++;break;case 1:Ȫ++;break;}}Ε[Ȭ]=new int[]{Ȫ,Ȩ};}Ƅ.Append(
- $"{Ȭ} ({Ȫ}/{ȭ.Count}");if(Ȩ>0)Ƅ.Append($"-{Ȩ}");Ƅ.Append(")");if(Ƅ.Length<ȫ)Ƅ.Append("".PadRight(ȫ-Ƅ.Length));Ƅ.AppendLine();yield return ˏ;}
- Vector2 ȹ(string õ,string ǐ,IMyTextSurface ź){StringBuilder ï=new StringBuilder();if(õ.Length==0)return ĉ();int Ƈ=Η[
- "autoSizeMode"];Ƈ=Math.Min(Math.Max(Ƈ,0),2);if(Ƈ==0&&Me.SurfaceCount<2){if(ǐ=="Monospace")Ƈ=2;else Ƈ=1;}switch(Ƈ){case 0:ï.Append(õ);
- return Me.GetSurface(1).MeasureStringInPixels(ï,ǐ,1f);case 1:ï.Append(õ);return ź.MeasureStringInPixels(ï,ǐ,1f);case 2:return
- ĉ((float)õ.Length*(float)Ѕ,(float)Є);}return ĉ();}string Ɔ(double ƅ,int Ō=6){StringBuilder Ƅ=new StringBuilder();if(Ō>=3)
- {double Ĺ=(double)ƅ,ƃ=1.0/((double)Ō-2.0),Ƃ=0,ƈ=0,Ɓ=0;if(Ĺ>1.0)Ĺ=1.0;if(Ĺ>0){Ƃ=Math.Floor((double)Ĺ/(double)ƃ);Ɓ=(Ĺ/ƃ)-
- Math.Floor((double)Ĺ/(double)ƃ);}if(Ɓ>=ƃ*0.5)ƈ++;Ɓ=Ō-(Ƃ+ƈ+2);Ƅ.Append(" [");for(int K=1;K<=(int)Ƃ;K++)Ƅ.Append(ˁ);if(ƈ>0)Ƅ.
- Append(ͷ);for(int K=1;K<=(int)Ɓ;K++)Ƅ.Append(ʨ);Ƅ.Append($"] {ĺ(ƅ)}%".PadRight(8));}return Ƅ.ToString();}void ƀ(ref Vector2 ſ,
- ǝ ĥ){try{string ž=ĥ.F.BlockDefinition.SubtypeName.ToLower();int Ž=ĥ.Ž;if(ž.Contains("blockcorner_lcd_")){if(ž.Contains(
- "small")){ſ.X*=2f;ſ.Y*=2f;}else{ſ.X*=4f;ſ.Y*=4f;}}else if(ĥ.F is IMyCockpit){if(ž=="cockpitopen"){ſ.X*=4f;ſ.Y*=4f;}else if(ž==
- "largeblockcockpit"||(ž=="opencockpitlarge"&&Ž==0)||ž=="opencockpitsmall"){}else if(ž=="dbsmallblockfightercockpit"){if(Ž==0){ſ.X*=2f;ſ.Y*=
- 2f;}else if(Ž==4){ſ.X*=2f;ſ.Y*=4f;}else{ſ.X*=4f;ſ.Y*=4f;}}else if(ž=="smallblockcockpitindustrial"){if(Ž==3||Ž==4){ſ.X*=4;
- ſ.Y*=4;}else{ſ.X*=2f;ſ.Y*=2f;}}else{ſ.X*=2f;ſ.Y*=2f;}}}catch{}}void ż(ǝ ĥ,List<bool>Ż,string ý,IMyTextSurface ź,ref int Ɗ
- ){if(ͺ.ContainsKey(ý)&&ͺ[ý].X>0f&&ͺ[ý].Y>=0f){float Ɵ=ź.SurfaceSize.X/ͺ[ý].X;Vector2 ƞ=ĉ(ź.SurfaceSize.X/Ɵ,ź.SurfaceSize.
- Y/Ɵ);Ɗ=(int)Math.Floor(ƞ.Y/ͺ[ý].Y);}else if(Ż[0]){if(Ż[1]){Ɗ=32;}else{Ɗ=32;}}else if(ĥ.ǔ){Ɗ=31;}else if(ĥ.Ǒ){Ɗ=22;}}class
- Ɲ{public int Ɯ=0,ƛ=0,ƚ=0,ƙ=0,Ƙ=0;public TimeSpan æ=new TimeSpan(0),Ɨ=new TimeSpan(0);}class Ɩ{public MyAssemblerMode Ľ;
- public List<MyProductionItem>ƕ=new List<MyProductionItem>();public DateTime Ɣ=DateTime.Now;public float Ɠ=0f;public
- IMyAssembler H;public bool ƒ=ˏ;public bool Ƒ(double Ɛ){try{if(DateTime.Now<Ɣ)return ˏ;bool Ə=H.Enabled&&!H.IsQueueEmpty&&H.
- CurrentProgress==Ɠ&&H.Mode==Ľ;if(!Ə){ƕ.Clear();ƒ=ˏ;Ɣ=DateTime.Now.AddSeconds(5);}else Ɣ=DateTime.Now.AddSeconds(Ɛ);Ľ=H.Mode;Ɠ=H.
- CurrentProgress;return Ə;}catch{}return ˏ;}public void Ǝ(bool ƍ,List<MyProductionItem>ƌ=null){ƒ=ƍ;ƕ.Clear();if(ƌ!=null)ƕ.AddRange(ƌ);}}
- class Ƌ{public string õ="";public int È=1;public string Ź(){if(È>1)return$"{õ} x{È}";else return õ;}}class Ÿ{public double n=
- 0;public string ý="",õ="";public int Ű=0;}class ů{public string U="",Q="",T="";public double n=0,l=1;}class ű{public
- Program Ů;public SortedList<string,double>Ò=new SortedList<string,double>();public ű(ű ŭ){Ò=new SortedList<string,double>(ŭ.Ò);
- Ů=ŭ.Ů;}public ű(){}public void Ŭ(){Ò.Clear();}public void ū(ű Ŗ){foreach(KeyValuePair<string,double>ċ in Ŗ.Ò){if(Ò.
- ContainsKey(ċ.Key))Ò[ċ.Key]+=ċ.Value;else Ò[ċ.Key]=ċ.Value;}}public int Ū(){return Ò.Count;}public Ǭ ũ(int q){if(q<Ò.Count)return Ũ
- (q);return new Ǭ();}private Ǭ Ũ(int q){string Q,T;Ů.å(Ò.Keys[q],out Q,out T);return new Ǭ{Q=Q,T=T,Ǫ=Ò.Values[q]};}public
- string ŷ(int q){return Ò.Keys[q];}public void ŵ(string Q,string T,double n,bool Ŷ=ː){string D=$"{Q}/{T}";if(!Ŷ||!Ò.ContainsKey
- (D))Ò[D]=n;else Ò[D]+=n;}public void ŵ(MyInventoryItem E){ŵ(E.Type.TypeId,E.Type.SubtypeId,(double)E.Amount);}public
- double ų(MyInventoryItem E){bool Ŵ=ˏ;return ų(ref Ŵ,E);}public double ų(string Q,string T){bool Ŵ=ˏ;return ų(ref Ŵ,Q,T);}
- public double ų(ref bool Ų,MyInventoryItem E){return ų(ref Ų,E.Type.TypeId,E.Type.SubtypeId);}public double ų(ref bool Ų,
- string Q,string T){Ų=ː;double È;string D=$"{Q}/{T}";if(Ò.TryGetValue(D,out È))return È;Ų=ˏ;return 0;}}class ǡ{public string Q=
- "",ŗ="",ť="";}class Ǡ{public int q;public bool ǟ,Ǟ;}class ǝ{public IMyTerminalBlock F;public ű ǜ,Ǜ,ǚ,Ǚ;public List<ǡ>ǘ;
- public List<string>Ǘ=new List<string>(),ǖ=new List<string>();public bool Ǖ=ˏ,ǔ=ˏ,Ǔ=ˏ,ǒ=ː,ş=ˏ,Ǒ=ˏ;public double ł=1;public int
- Ž=0;public string dz(){if(ş){IMyTextSurface ź=ǰ();StringBuilder ï=new StringBuilder();ź.ReadText(ï);return ï.ToString().
- ToLower().Replace("\n","").Replace("\r","");}return F.CustomData.ToLower().Replace("\n","").Replace("\r","");}public string Dz()
- {string DZ=F.EntityId.ToString();if(ş)DZ+=$":{Ž}";return DZ;}public IMyTextSurface ǰ(){if(F is IMyTextPanel)return(
- IMyTextSurface)F;else if((ş)&&((IMyTextSurfaceProvider)F).SurfaceCount>Ž)return((IMyTextSurfaceProvider)F).GetSurface(Ž);return null;}
- }class ǯ{public double È=0,Ǯ=0;public DateTime ǭ=DateTime.Now;}class Ǭ{public string Q="",T="",U="",ǫ="",C="";public
- double Ǫ=0,ǩ=0,Ǩ=0,ǧ=0,Ǧ=0,ǥ=0,ŭ=0,Ǥ=0,ǣ=0,Ǣ=1,Ǐ=1,Ƹ=0,Ǎ=0,ƶ=0,Ƶ=0,ƴ=0,Ƴ=0,Ʋ=0,Ʊ=0,ư=0,Ư=0,Ʈ=0,ƭ=0,Ʒ=0;public bool Ƭ=ˏ,ƪ=ː,Ʃ=ː
- ,ƨ=ː,Ƨ=ː,Ʀ=ˏ,ƥ=ˏ;public List<string>Ƥ=new List<string>();public List<ǯ>ƣ=new List<ǯ>();public DateTime Ƣ=DateTime.Now,ơ=
- DateTime.Now;public string ƫ(){return Q+"/"+T;}public string Ơ(){return C.ToLower();}public void ƹ(double ǎ,bool nj,double Nj,
- double NJ,double lj,bool Lj){Ǫ=ǧ;ǧ=0;if(DateTime.Now>=Ƣ){ƣ.Add(new ǯ{È=Ǫ,ǭ=DateTime.Now,Ǯ=Ǩ});Ƣ=DateTime.Now.AddSeconds(1.25);if(
- ƣ.Count>12)ƣ.RemoveRange(0,ƣ.Count-12);}double LJ=Math.Min(20,(DateTime.Now-ƣ[0].ǭ).TotalSeconds+0.0001),dž=(DateTime.Now-ơ
- ).TotalSeconds,Dž,DŽ=0,ǃ=Math.Max(ƣ[0].Ǯ,Ǩ);if(ƣ.Count>1&&LJ==20)ƣ.RemoveAt(0);bool ǂ=Ǫ<1.0;if(LJ>0)Ǥ=(Ǫ-ƣ[0].È)/LJ;else Ǥ=0;Dž
- =Ǥ;if(ŭ>0)DŽ+=ŭ;if(ǣ>0)DŽ+=ŭ;if(nj&&DŽ>0){if(dž>=1){if(Lj&&ǂ)Dž-=DŽ*0.001;if(!ǂ&&Dž==0.0)Dž+=DŽ*0.1;if(ǃ>=1)Dž=DŽ*0.005;if(Ǫ>=DŽ)Dž=DŽ*
- 0.15;Ƹ+=((Dž/DŽ)*LJ)*Math.Min(2.5,dž);if(Ƹ<=-Nj){Ǣ+=lj;if(Ǣ>ǎ)Ǣ=ǎ;Ƹ=0;}else if(Ƹ>=NJ){Ǣ-=lj;if(Ǣ<1)Ǣ=1;Ƹ=0;}ơ=DateTime.Now;}}else{Ǣ=
- 1;ơ=DateTime.Now;Ƹ=NJ*0.95;}ģ();}public void ǁ(){ǩ=Math.Floor(Ǧ);Ǩ=Math.Floor(ǥ);Ǧ=0;ǥ=0;}public void ǀ(MyFixedPoint n,
- bool ƽ){if(ƽ)ǧ+=(double)n;else ǧ+=(double)n;}public void ƿ(MyFixedPoint n,bool ƽ){if(ƽ)ǩ+=(double)n;else Ǧ+=(double)n;}
- public void ƾ(MyFixedPoint n,bool ƽ){if(ƽ)Ǩ+=(double)n;else ǥ+=(double)n;}public void Ƽ(double ƻ){Ʈ=0;Ƶ=0;Ʊ=0;ư=0;Ƴ=ǩ*Ǐ;Ʋ=Ǩ;Ʒ=
- Ǫ+(Ƴ)-(Ʋ);ģ();if(U.Length>0&&U!="None"){if(ƴ<0)Ư=0;else{if(Ǎ>ƴ)Ư=Ǎ;else if(ƴ>0)Ư=Math.Floor(ƴ*(1.0+ƻ));else Ư=double.
- MaxValue;}if(!ƥ){if(Ƴ>0&&Ǫ+Ƴ>Ư)Ʊ=(Ǫ+Ƴ)-Ư;if(Ʋ>0&&Ǫ-Ʋ<ƴ)ư=ƴ-(Ǫ-Ʋ);}else{Ʊ=ǩ;if(Ʋ>0&&Ʋ>Ǫ)ư=Ʋ-Ǫ;}if(Ʊ>0)Ʊ=Math.Floor(Ʊ/Ǐ);if(Ʋ>0&&Ʋ
- <Ǐ)ư=Ʋ;if(!ƪ)Ʊ=0;if(!Ʃ)ư=0;if(ƥ){if(Ʒ>0)Ƶ=-Ʒ;}else{if(ƴ==0)Ƶ=0;else{if(Ʒ<ƴ)Ƶ=ƴ-Ʒ;else if(Ʒ>Ư)Ƶ=Ư-Ʒ;}}if(Ƶ>0){Ƶ=Math.
- Ceiling(Ƶ/Ǐ);}else if(Ƶ<0){if(Math.Abs(Ƶ)<Ǐ)Ƶ=0;else Ƶ=Math.Floor(Math.Abs(Ƶ)/Ǐ)*-Ǐ;}if(Ƶ>0)Ʈ=Ƶ;if(Ƶ>0&&(Ʋ>0||!ƪ))Ƶ=0;if(Ƶ<0&&(
- Ƴ>0||!Ʃ))Ƶ=0;}}public void ģ(){ƴ=0;if(ŭ>0)ƴ+=ŭ;if(ǣ>0)ƴ+=ǣ;ƥ=ƴ==0&&ŭ<0;if(!ƥ&&ƴ>0)ƴ*=Ǣ;ƴ=Math.Floor(ƴ);ƭ=ƴ;if(ƥ)ƭ=-1;}
- public double ƺ(){if(ƴ==0)return 100;return(Ǫ/ƴ)*100.0;}}
Add Comment
Please, Sign In to add comment