public override void Init(MyObjectBuilder_CubeBlock objectBuilder, MyCubeGrid cubeGrid)
        {
            base.Init(objectBuilder, cubeGrid);

            var ob = (MyObjectBuilder_TerminalBlock)objectBuilder;

            if (ob.CustomName != null)
            {
                CustomName.Clear().Append(ob.CustomName);
                DisplayNameText = ob.CustomName;
            }
            else
            {
                CustomName.Clear();
                GetTerminalName(CustomName);
            }

            if (Sync.IsServer && Sync.Clients != null)
            {
                Sync.Clients.ClientRemoved += ClientRemoved;
            }

            ShowOnHUD           = ob.ShowOnHUD;
            ShowInTerminal      = ob.ShowInTerminal;
            ShowInInventory     = ob.ShowInInventory;
            ShowInToolbarConfig = ob.ShowInToolbarConfig;
            AddDebugRenderComponent(new MyDebugRenderComponentTerminal(this));
        }
示例#2
0
        public override void Init(MyObjectBuilder_CubeBlock objectBuilder, MyCubeGrid cubeGrid)
        {
            base.Init(objectBuilder, cubeGrid);

            var ob = (MyObjectBuilder_TerminalBlock)objectBuilder;

            if (ob.CustomName != null)
            {
                CustomName.Clear().Append(ob.CustomName);
                DisplayNameText = ob.CustomName;
            }
            else
            {
                CustomName.Clear();
                GetTerminalName(CustomName);
            }

            ShowOnHUD      = ob.ShowOnHUD;
            ShowInTerminal = ob.ShowInTerminal;
            AddDebugRenderComponent(new MyDebugRenderComponentTerminal(this));
        }
示例#3
0
 public override void UpdateBeforeSimulation10()
 {
     base.UpdateBeforeSimulation10();
     CustomName.Clear();
     GetTerminalName(CustomName);
 }