Space Engineers - О кубах. IMySlimBlock, целостность, повреждения, функциональный блок
Связь: https://discord.gg/N5bYTDf Донат: https://www.donationalerts.com/r/drabont7
Code:
public Program() { Runtime.UpdateFrequency = UpdateFrequency.Update10; }
public void Main(string arg) {/*mon init*/var m = Me.GetSurface(0); m.ContentType = ContentType.TEXT_AND_IMAGE; m.FontSize = 26.4f/9; m.TextPadding = 0;m.Font = "Monospace";
var s = Me.CubeGrid.GetCubeBlock(new Vector3I(0,5,0)); //IMySlimBlock
if (s != null) { Echo($":{s} ");
//CubeGrid - грид которому принадлежит кубик (здесь: то же, что и Me.CubeGrid)
//FatBlock - функциональный блок
//BlockDefinition - идентификатор блока, вида MyObjectBuilder_Thrust/SmallBlockSmallAtmosphericThrust
//Position - координата "основного" куба блока в гриде
//OwnerId - идентификатор владельца блока, или 0, для "свободных" блоков
//MaxIntegrity - Максимально возможная целостность блока
//BuildIntegrity - целостность блока полученная при строительстве
//CurrentDamage - повреждённость блока (BuildIntegrity - Integrity
//IsFullIntegrity - true - если блок достроен и не поврежден (BuildIntegrity==MaxIntegrity & CurrentDamage==0)
m.WriteText( $"{s}\nMI:{s.MaxIntegrity}\nBI:{s.BuildIntegrity}\nCD:{s.CurrentDamage}\nFI:{s.IsFullIntegrity}\n" );
//m.WriteText( $"{(s.FatBlock as IMyThrust).Enabled}", true);
//BuildLevelRatio, DamageRatio, AccumulatedDamage, HasDeformation, MaxDeformation
//IsDestroyed, IsFullyDismounte, StockpileEmpty, ShowParts, StockpileAllocated
//GetMissingComponents()
//Mass - масса блока, в кг
//ColorMaskHSV - вектор цветовой модели HSV
//SkinSubtypeId - скин
} else Echo(":cube not found");
}
#ЭПАЖ
Other Videos By Богдан Гаврилюк
Other Statistics
Space Engineers Statistics For Богдан Гаврилюк
Богдан Гаврилюк currently has 9,035 views spread across 172 videos for Space Engineers. His channel published over 15 days worth of content for the game, roughly 10.50% of Space Engineers content that Богдан Гаврилюк has uploaded to YouTube.