Esempio n. 1
0
        public override void UpdateOnceBeforeFrame()
        {
            base.UpdateOnceBeforeFrame();

            Logging.Instance.WriteLine($"ADDING Deconstruction Beacon: {Entity.EntityId}", 1);
            m_beacon = new NaniteBeaconDeconstruct((IMyFunctionalBlock)Entity);
        }
        public override void Init(MyObjectBuilder_EntityBase objectBuilder)
        {
            Logging.Instance.WriteLine(string.Format("ADDING Area Beacon: {0}", Entity.EntityId));
            m_beacon = new NaniteAreaBeacon((IMyTerminalBlock)Entity);
            NaniteConstructionManager.BeaconList.Add(m_beacon);

            if (Sync.IsClient)
            {
                NaniteConstructionManager.NaniteSync.SendNeedBeaconTerminalSettings(Entity.EntityId);
            }
        }
Esempio n. 3
0
        public override void UpdateOnceBeforeFrame()
        {
            try {
                base.UpdateOnceBeforeFrame();

                Logging.Instance.WriteLine($"ADDING Deconstruction Beacon: {Entity.EntityId}", 1);
                m_beacon = new NaniteBeaconDeconstruct((IMyFunctionalBlock)Entity);
            } catch (Exception exc) {
                MyLog.Default.WriteLineAndConsole($"##MOD: nanites UpdateOnceBeforeFrame, ERROR: {exc}");
            }
        }
Esempio n. 4
0
        public override void UpdateOnceBeforeFrame()
        {
            base.UpdateOnceBeforeFrame();

            Logging.Instance.WriteLine($"ADDING Area Beacon: {Entity.EntityId}", 1);
            m_beacon = new NaniteAreaBeacon((IMyFunctionalBlock)Entity);

            if (Sync.IsClient)
            {
                NaniteConstructionManager.NaniteSync.SendNeedBeaconTerminalSettings(Entity.EntityId);
            }
        }
        public override void Init(MyObjectBuilder_EntityBase objectBuilder)
        {
            if (m_lock == null)
            {
                m_lock = new FastResourceLock();
            }

            base.Init(objectBuilder);

            using (m_lock.AcquireExclusiveUsing())
            {
                Logging.Instance.WriteLine(string.Format("ADDING Area Beacon: {0}", Entity.EntityId));
                m_beacon = new NaniteAreaBeacon((IMyTerminalBlock)Entity);
                NaniteConstructionManager.BeaconList.Add(m_beacon);
            }
        }
Esempio n. 6
0
        public override void UpdateOnceBeforeFrame()
        {
            try {
                base.UpdateOnceBeforeFrame();

                Logging.Instance.WriteLine($"ADDING Area Beacon: {Entity.EntityId}", 1);
                m_beacon = new NaniteAreaBeacon((IMyFunctionalBlock)Entity);

                if (Sync.IsClient)
                {
                    NaniteConstructionManager.NaniteSync.SendNeedBeaconTerminalSettings(Entity.EntityId);
                }
            } catch (Exception exc) {
                MyLog.Default.WriteLineAndConsole($"##MOD: nanites UpdateOnceBeforeFrame, ERROR: {exc}");
            }
        }
 public override void Init(MyObjectBuilder_EntityBase objectBuilder)
 {
     Logging.Instance.WriteLine(string.Format("ADDING Projection Beacon: {0}", Entity.EntityId));
     m_beacon = new NaniteBeaconProjection((IMyTerminalBlock)Entity);
     NaniteConstructionManager.BeaconList.Add(m_beacon);
 }