1. Not sure why this is happening so I am looking for some insight. I have used this same code previously with success but have recently injected it into a different mod I have and am seeing some odd results. This snippet of code (not complete but the relevant part) is producing the Puts: "This is a storage container".... when I destroy an auto turret...

    Did anything change recently that would cause this issue?

    Code:
     private void OnEntityDeath(BaseEntity entity, HitInfo hitInfo)
            {
                if (UseFactions)
                {
                    try
                    {
                        if (entity is StorageContainer)
                        {
                            Puts("This is a storage container");
                            Vector3 ContPosition = entity.transform.position;
                            foreach (var box in factionData.Boxes)
                            {
                                BasePlayer factionleader = BasePlayer.FindByID(factionData.leader[box.Key]);
                                if (ContPosition.x == box.Value.x && ContPosition.y == box.Value.y && ContPosition.z == box.Value.z)
                                {
                                    factionData.Boxes.Remove(box.Key);
                                    if (BasePlayer.activePlayerList.Contains(factionleader))
                                        SendMSG(factionleader, lang.GetMessage("TaxBoxDestroyed", this));
                                }                        }
                            return;
                        }
                        if (entity is AutoTurret)
                        {
                            Puts("This is a Auto-Turret");
                            var userid = entity.OwnerID;
                            BasePlayer owner = BasePlayer.FindByID(userid);
     
  2. AutoTurret is a type of StorageContainer. I would just do
    Code:
    if(entity is AutoTurret)
    {
      //Do stuff
    }
    else if (entity is StorageContainer)
    {
      // Other stuff
    }