예제 #1
0
 public override void Init(MyObjectBuilder_EntityBase objectBuilder)
 {
     Logging.Instance.WriteLine(string.Format("ADDING Mining Hammer: {0}", Entity.EntityId));
     m_mining = new NaniteMining((IMyTerminalBlock)Entity);
     NaniteConstructionManager.MiningList.Add(m_mining);
     NaniteConstructionManager.NaniteSync.SendNeedHammerTerminalSettings(Entity.EntityId);
 }
예제 #2
0
        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 Mining Hammer: {0}", Entity.EntityId));
                m_mining = new NaniteMining(Entity as IMyTerminalBlock);
                NaniteConstructionManager.MiningList.Add(m_mining);
            }
        }