<commit_before>var Npc = function(x,y,still,dialogue,questid,talking,silence){
	return({
		questid:questid,
		group:"walls",
		tileset:"npc",
		zindex:0, // Needed for zindexed objects
		x:x,
		y:y,
		myDialogue:dialogue,
		iamTalking:false,
		silence:silence,
		shadow:{tileset:"shadows",tile:0},
		frames:{
			still:{ speed:6, frames:still },
			talking:{ speed:6, frames:(talking==null?still:talking) }
		},

		doPlayerAction:function(sw) {
			if (this.silence) toys.generate.AkihabaraAudio.fadeOut(this,"background",null,{channel:"bgmusic"});
			this.iamTalking=true; // go in talking mode
			maingame.startDialogue(this.myDialogue); // Starts its dialogue. Is another object because of z-index
		},

		initialize:function() {
			topview.initialize(this); // Any particular initialization. Just the auto z-index
		},

		first:function(by) {
			this.counter=(this.counter+1)%12;

			if (this.iamTalking) {
				this.frame=help.decideFrame(this.counter,this.frames.talking);
				if (!gbox.getObject("foreground","dialogue")) {// Check if the dialogue ended
					this.iamTalking=false; // Stop talking
					if ((this.questid!=null)&&(!tilemaps.queststatus[this.questid])) {
						tilemaps.queststatus[this.questid]=true; // If related to a quest, the quest is marked as done
						maingame.addQuestClear();
					}
				}
			} else
				this.frame=help.decideFrame(this.counter,this.frames.still);
		},<commit_msg>Using the correct namespace instead of AkihabaraAudio module.<commit_after>var Npc = function(x,y,still,dialogue,questid,talking,silence){
	return({
		questid:questid,
		group:"walls",
		tileset:"npc",
		zindex:0, // Needed for zindexed objects
		x:x,
		y:y,
		myDialogue:dialogue,
		iamTalking:false,
		silence:silence,
		shadow:{tileset:"shadows",tile:0},
		frames:{
			still:{ speed:6, frames:still },
			talking:{ speed:6, frames:(talking==null?still:talking) }
		},

		doPlayerAction:function(sw) {
			if (this.silence) toys.generate.audio.fadeOut(this,"background",null,{channel:"bgmusic"});
			this.iamTalking=true; // go in talking mode
			maingame.startDialogue(this.myDialogue); // Starts its dialogue. Is another object because of z-index
		},

		initialize:function() {
			topview.initialize(this); // Any particular initialization. Just the auto z-index
		},

		first:function(by) {
			this.counter=(this.counter+1)%12;

			if (this.iamTalking) {
				this.frame=help.decideFrame(this.counter,this.frames.talking);
				if (!gbox.getObject("foreground","dialogue")) {// Check if the dialogue ended
					this.iamTalking=false; // Stop talking
					if ((this.questid!=null)&&(!tilemaps.queststatus[this.questid])) {
						tilemaps.queststatus[this.questid]=true; // If related to a quest, the quest is marked as done
						maingame.addQuestClear();
					}
				}
			} else
				this.frame=help.decideFrame(this.counter,this.frames.still);
		},
{'fraction_non_alphanumeric': 0.14994757077944776, 'fraction_numerical': 0.004893393918210416, 'mean_word_length': 4.329608938547486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1614484', 'n_tokens_mistral': 1150, 'n_tokens_neox': 969, 'n_words': 177}