private static HashedString CustomIdleAnim(IdleStates.Instance smi, ref HashedString pre_anim)
    {
        CellOffset offset = new CellOffset(0, -1);
        bool       facing = smi.GetComponent <Facing>().GetFacing();

        switch (smi.GetComponent <Navigator>().CurrentNavType)
        {
        case NavType.Floor:
            offset = ((!facing) ? new CellOffset(-1, -1) : new CellOffset(1, -1));
            break;

        case NavType.Ceiling:
            offset = ((!facing) ? new CellOffset(-1, 1) : new CellOffset(1, 1));
            break;
        }
        HashedString result = "idle_loop";
        int          num    = Grid.OffsetCell(Grid.PosToCell(smi), offset);

        if (Grid.IsValidCell(num) && !Grid.Solid[num])
        {
            pre_anim = "idle_loop_hang_pre";
            result   = "idle_loop_hang";
        }
        return(result);
    }
        private static HashedString CustomIdleAnim_Drecko(IdleStates.Instance smi, ref HashedString pre_anim)
        {
            CellOffset offset         = new CellOffset(0, -1);
            bool       facing         = smi.GetComponent <Facing>().GetFacing();
            NavType    currentNavType = smi.GetComponent <Navigator>().CurrentNavType;

            if (currentNavType != NavType.Floor)
            {
                if (currentNavType == NavType.Ceiling)
                {
                    offset = (facing ? new CellOffset(1, 1) : new CellOffset(-1, 1));
                }
            }
            else
            {
                offset = (facing ? new CellOffset(1, -1) : new CellOffset(-1, -1));
            }
            HashedString result = "idle_loop";
            int          num    = Grid.OffsetCell(Grid.PosToCell(smi), offset);

            if (Grid.IsValidCell(num) && !Grid.Solid[num])
            {
                pre_anim = "idle_loop_hang_pre";
                result   = "idle_loop_hang";
            }
            return(result);
        }