public GridStamp(List <MyCubeGrid> Grids) { float DisassembleRatio = 0; double EstimatedValue = 0; BlockTypeCount.Add("Reactors", 0); BlockTypeCount.Add("Turrets", 0); BlockTypeCount.Add("StaticGuns", 0); BlockTypeCount.Add("Refineries", 0); BlockTypeCount.Add("Assemblers", 0); foreach (MyCubeGrid SingleGrid in Grids) { if (SingleGrid.GridSizeEnum == MyCubeSize.Large) { if (SingleGrid.IsStatic) { StaticGrids += 1; EstimatedValue += SingleGrid.BlocksCount * Config.StaticGridMarketMultiplier; } else { LargeGrids += 1; EstimatedValue += SingleGrid.BlocksCount * Config.LargeGridMarketMultiplier; } } else { SmallGrids += 1; EstimatedValue += SingleGrid.BlocksCount * Config.SmallGridMarketMultiplier; } foreach (MyCubeBlock SingleBlock in SingleGrid.GetFatBlocks()) { var Block = (IMyCubeBlock)SingleBlock; if (SingleBlock.BuiltBy != 0) { UpdatePCUCounter(SingleBlock.BuiltBy, SingleBlock.BlockDefinition.PCU); } if (Block as IMyLargeTurretBase != null) { BlockTypeCount["Turrets"] += 1; } if (Block as IMySmallGatlingGun != null) { BlockTypeCount["Turrets"] += 1; } if (Block as IMyGunBaseUser != null) { BlockTypeCount["StaticGuns"] += 1; } if (Block as IMyRefinery != null) { BlockTypeCount["Refineries"] += 1; } if (Block as IMyAssembler != null) { BlockTypeCount["Assemblers"] += 1; } //Main.Debug("Block:" + Block.BlockDefinition + " ratio: " + Block.BlockDefinition.); DisassembleRatio += SingleBlock.BlockDefinition.DeformationRatio; NumberofBlocks += 1; } BlockTypeCount["Reactors"] += SingleGrid.NumberOfReactors; NumberOfGrids += 1; GridMass += SingleGrid.Mass; GridPCU += SingleGrid.BlocksPCU; } if (Grids[0].BigOwners.Count > 0) { Grids[0].GridSystems.JumpSystem.GetMaxJumpDistance(Grids[0].BigOwners[0]); } //Get Total Build Percent GridBuiltPercent = DisassembleRatio / NumberofBlocks; MarketValue = EstimatedValue; }