<commit_before>var plainsEntrances = [];
var plainsCollisions = [];
var plainsEntranceChecking;
var plainsMapWidth = 50;
var plainsNpcArray = [];

function FirstPlainsLoader(){
	world = plains;
	currentMap = plains;
	previousMap = desert;
  //Loading entrances
  var plainsMap = plains.getObject("CollisionLayer").data;
  //Loading Collisions
	for (var i = 0; i < plainsMap.length; i++) {
		if (plainsMap[i] != 0) {
			plainsCollisions.push(i);
		}
	}
	var entrances = plains.getObject("EntranceLayer").data;
    for (var i = 0; i < entrances.length; i++) {
		if (entrances[i] != 0){
		  plainsEntrances.push(i);
		}
	}
  //call loadnpc with map.
  //function LoadNPC(index, range, fileLocation, numSprites) {
	  //LoadNPC(260, 4, './assets/Desert/Sprites/DesertWoman', 4);
	  LoadNPC(540,4,"./assets/Characters/NPCs/Enemy", 4);
	  var characterLayer = plains.getObject("CharacterLayer");
	  plainsNpcArray.push(npcArray[0]);
	characterLayer.addChild(npcArray[0]);
	  //LoadNPC(535,4,"./assets/Characters/NPCs/Enemy", 4);
	  //LoadNPC(535,4,"./assets/Characters/NPCs/Enemy", 4);
	  //LoadNPC(535,4,"./assets/Characters/NPCs/Enemy", 4);
	  
	  NPCMovement();
  mapContainer.addChild(plainsContainer);
  plainsContainer.visible = false;
}

function PlainsLoader(){
  //console.log("Loading Plains");
  plainsContainer.visible = true;
  mapWidth = plainsMapWidth;
  world = plains;
  //////////////////////////////
  //Risk! collisionsIndex is a//
  //pointer to plainsCollisions//
  //Never set collisionsIndex to []//
  ///////////////////////////////////
  collisionsIndex = plainsCollisions;
  mapWidth = plainsMapWidth;
  npcArray = plainsNpcArray;
  if (previousMap == plains) {
	  	startX = 592;
		startY = 1159;
  } else if (previousMap == desert) {
	  	startX = 1360;
		startY = 71;
  } else if (previousMap == forest) {
	  //console.log("Coming from Forest");
	  	startX = 1422;<commit_msg>Added placeholder Characters to plains region. Need to add a king.<commit_after>var plainsEntrances = [];
var plainsCollisions = [];
var plainsEntranceChecking;
var plainsMapWidth = 50;
var plainsNpcArray = [];

function FirstPlainsLoader(){
	world = plains;
	currentMap = plains;
	previousMap = desert;
  //Loading entrances
  var plainsMap = plains.getObject("CollisionLayer").data;
  //Loading Collisions
	for (var i = 0; i < plainsMap.length; i++) {
		if (plainsMap[i] != 0) {
			plainsCollisions.push(i);
		}
	}
	var entrances = plains.getObject("EntranceLayer").data;
    for (var i = 0; i < entrances.length; i++) {
		if (entrances[i] != 0){
		  plainsEntrances.push(i);
		}
	}
	//call loadnpc with map.
	//function LoadNPC(index, range, fileLocation, numSprites) {
	//LoadNPC(260, 4, './assets/Desert/Sprites/DesertWoman', 4);
	npcArray = [];
	var characterLayer = plains.getObject("CharacterLayer");
	LoadNPC(314,6,"./assets/Characters/NPCs/Enemy", 4);
	plainsNpcArray.push(npcArray[0]);
	characterLayer.addChild(plainsNpcArray[0]);
	LoadNPC(1552,2,"./assets/Desert/Sprites/DesertWoman", 4);
	plainsNpcArray.push(npcArray[1]);
	characterLayer.addChild(plainsNpcArray[1]);
	LoadNPC(2006,8,"./assets/Characters/NPCs/Enemy", 4);
	plainsNpcArray.push(npcArray[2]);
	characterLayer.addChild(plainsNpcArray[2]);
	LoadNPC(2264,0,"./assets/Forest/img/elf", 1);
	plainsNpcArray.push(npcArray[3]);
	characterLayer.addChild(plainsNpcArray[3]);
	  
	  NPCMovement();
  mapContainer.addChild(plainsContainer);
  plainsContainer.visible = false;
}

function PlainsLoader(){
  //console.log("Loading Plains");
  plainsContainer.visible = true;
  mapWidth = plainsMapWidth;
  world = plains;
  //////////////////////////////
  //Risk! collisionsIndex is a//
  //pointer to plainsCollisions//
  //Never set collisionsIndex to []//
  ///////////////////////////////////
  collisionsIndex = plainsCollisions;
  mapWidth = plainsMapWidth;
  npcArray = plainsNpcArray;
  if (previousMap == plains) {
	  	startX = 592;
		startY = 1159;
  } else if (previousMap == desert) {
	  	startX = 1360;
		startY = 71;
  } else if (previousMap == forest) {
	  //console.log("Coming from Forest");
	  	startX = 1422;
{'fraction_non_alphanumeric': 0.1780821917808219, 'fraction_numerical': 0.02666340508806262, 'mean_word_length': 3.5687150837988826, 'pattern_counts': {'":': 0, '<': 7, '<?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': '207123', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1411, 'n_words': 280}