<commit_before>define([
    'ash', 'game/GlobalSignals', 'game/nodes/LogNode', 'game/constants/UIConstants',
], function (Ash, GlobalSignals, LogNode, UIConstants) {
    var UIOutLogSystem = Ash.System.extend({
	
		logNodes: null,
		
		lastUpdateTimeStamp: 0,
		updateFrequency: 1000 * 15,

        constructor: function () {
        },

        addToEngine: function (engine) {
			var logSystem = this;
            this.logNodes = engine.getNodeList(LogNode);
			this.onPlayerMoved = function(playerPosition) {
				logSystem.checkPendingMessages(playerPosition);
			};
			GlobalSignals.playerMovedSignal.add(this.onPlayerMoved);
			this.update();
        },

        removeFromEngine: function (engine) {
            this.logNodes = null;
			GlobalSignals.playerMovedSignal.remove(this.onPlayerMoved);
        },

        update: function (time) {
            if (this.gameState.isPaused) return;
			var timeStamp = new Date().getTime();
			var isTime = timeStamp - this.lastUpdateTimeStamp > this.updateFrequency;
			var hasNewMessages = false;
			
			var messages = [];
			for (var node = this.logNodes.head; node; node = node.next) {
				messages = messages.concat(node.logMessages.messages);
				hasNewMessages = hasNewMessages || node.logMessages.hasNewMessages;
				node.logMessages.hasNewMessages = false;
			}
		<commit_msg>add missing reference<commit_after>define([
    'ash', 'game/GlobalSignals', 'game/nodes/LogNode', 'game/constants/UIConstants',
], function (Ash, GlobalSignals, LogNode, UIConstants) {
    var UIOutLogSystem = Ash.System.extend({
	
        gameState: null,
		logNodes: null,
		
		lastUpdateTimeStamp: 0,
		updateFrequency: 1000 * 15,

        constructor: function (gameState) {
            this.gameState = gameState;
        },

        addToEngine: function (engine) {
			var logSystem = this;
            this.logNodes = engine.getNodeList(LogNode);
			this.onPlayerMoved = function(playerPosition) {
				logSystem.checkPendingMessages(playerPosition);
			};
			GlobalSignals.playerMovedSignal.add(this.onPlayerMoved);
			this.update();
        },

        removeFromEngine: function (engine) {
            this.logNodes = null;
			GlobalSignals.playerMovedSignal.remove(this.onPlayerMoved);
        },

        update: function (time) {
            if (this.gameState.isPaused) return;
			var timeStamp = new Date().getTime();
			var isTime = timeStamp - this.lastUpdateTimeStamp > this.updateFrequency;
			var hasNewMessages = false;
			
			var messages = [];
			for (var node = this.logNodes.head; node; node = node.next) {
				messages = messages.concat(node.logMessages.messages);
				hasNewMessages = hasNewMessages || node.logMessages.hasNewMessages;
				node.logMessages.hasNewMessages = false;
			}
		
{'fraction_non_alphanumeric': 0.11390101892285298, 'fraction_numerical': 0.005094614264919942, 'mean_word_length': 3.158850226928896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5092431', 'n_tokens_mistral': 933, 'n_tokens_neox': 812, 'n_words': 157}