예제 #1
0
 private void HandleEntRemoveReq(EntityUid entityUid)
 {
     //TODO: Some form of admin check
     if (_entityManager.TryGetEntity(entityUid, out var entity))
     {
         _entityManager.DeleteEntity(entity);
     }
 }
예제 #2
0
 public void HandleAdminMessage(NetMessage adminMsgType, NetIncomingMessage messageBody)
 {
     switch (adminMsgType)
     {
     case NetMessage.RequestEntityDeletion:
         int entId = messageBody.ReadInt32();
         //if (
         //    IoCManager.Resolve<IPlayerManager>().GetSessionByConnection(messageBody.SenderConnection).
         //        adminPermissions.isAdmin || true)
         //TEMPORARY. REMOVE THE 'TRUE' LATER ON. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         //{
         IEntity delEnt = EntityManager.GetEntity(entId);
         if (delEnt != null)
         {
             EntityManager.DeleteEntity(delEnt);
         }
         //}
         break;
     }
 }