<commit_before>import {Injectable} from '@angular/core';
import {Effect, Actions} from '@ngrx/effects';
import {
  GameStateActionTypes,
  GameStateLoadSuccessAction,
  GameStateTravelAction,
  GameStateSaveAction,
  GameStateLoadAction,
  GameStateTravelFailAction,
  GameStateTravelSuccessAction
} from './models/game-state/game-state.actions';
import {replace} from '@ngrx/router-store';
import {LoadingService} from './components/loading';

@Injectable()
export class AppEffects {

  constructor(private actions$: Actions, private loading: LoadingService) {
  }

  // When the game state is loaded, update the route
  @Effect() gameStateLoaded$ = this.actions$
    .ofType(GameStateActionTypes.LOAD_SUCCESS)
    .distinctUntilChanged()
    .map((action: GameStateLoadSuccessAction) => {
      return replace(['world', action.payload.map]);
    });

  // When the game is loading or traveling, show the loading ui.
  @Effect({dispatch: false}) loadingIndicator$ = this.actions$
    .ofType(GameStateActionTypes.TRAVEL)
    .distinctUntilChanged()
    .do((action: GameStateTravelAction|GameStateSaveAction|GameStateLoadAction) => {
      console.log("Traveling to " + action.payload);
      this.loading.loading = true;
    });
  // When the game is loading or traveling, show the loading ui.
  @Effect({dispatch: false}) loadingDoneIndicator$ = this.actions$
    .ofType(GameStateActionTypes.TRAVEL_SUCCESS, GameStateActionTypes.TRAVEL_FAIL)
    .distinctUntilChanged()
    .do((action: GameStateTravelSuccessAction|GameStateTravelFailAction) => {
      console.log("Traveling completed with result " + action.payload);
      this.loading.loading = false;
    });
}
<commit_msg>chore: remove redundant app effect<commit_after>import {Injectable} from '@angular/core';
import {Effect, Actions} from '@ngrx/effects';
import {
  GameStateActionTypes,
  GameStateTravelAction,
  GameStateSaveAction,
  GameStateLoadAction,
  GameStateTravelFailAction,
  GameStateTravelSuccessAction
} from './models/game-state/game-state.actions';
import {LoadingService} from './components/loading';

@Injectable()
export class AppEffects {

  constructor(private actions$: Actions, private loading: LoadingService) {
  }

  // When the game is loading or traveling, show the loading ui.
  @Effect({dispatch: false}) loadingIndicator$ = this.actions$
    .ofType(GameStateActionTypes.TRAVEL)
    .distinctUntilChanged()
    .do((action: GameStateTravelAction|GameStateSaveAction|GameStateLoadAction) => {
      console.log("Traveling to " + action.payload);
      this.loading.loading = true;
    });
  // When the game is loading or traveling, show the loading ui.
  @Effect({dispatch: false}) loadingDoneIndicator$ = this.actions$
    .ofType(GameStateActionTypes.TRAVEL_SUCCESS, GameStateActionTypes.TRAVEL_FAIL)
    .distinctUntilChanged()
    .do((action: GameStateTravelSuccessAction|GameStateTravelFailAction) => {
      console.log("Traveling completed with result " + action.payload);
      this.loading.loading = false;
    });
}

{'fraction_non_alphanumeric': 0.1143801652892562, 'fraction_numerical': 0.0, 'mean_word_length': 4.7748091603053435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '318423', 'n_tokens_mistral': 881, 'n_tokens_neox': 860, 'n_words': 194}