<commit_before>import "dart:async";
import "dart:html";

import "SBURBSim.dart";
import 'navbar.dart';

void bardQuestMode(){
	if(window.confirm("Behold the Majesty of the CodTier? Y/N")){
		bardQuest = true;
	}else{
		window.alert("But thou must!f");
		bardQuestMode();
	}

}



void faceOffMode(){
	faceOff = true;
	window.alert("Wait...so...if this is 'face off' mode....does that mean the creepy flesh masks were their real faces all along, and THIS is what was hidden underneath???");
	for(num i = 0; i<curSessionGlobalVar.players.length; i++){
		curSessionGlobalVar.players[i].grimDark = 4;
	}
}



void pen15Ouija(){
	ouija = true;
	window.alert("thats the spooky thing about penis ouija you can never be sure who did the dicks");
	window.alert("was it you or me or maybe a ghoooost???");
	querySelector('body').style.backgroundColor = "#f8c858";
	querySelector('body').style.backgroundImage = "url(images/pen15_bg1.png)";
}



void coolK1DMode(){
	window.alert("H3Y TH3R3 COOL K1D 1S TH1S YOU???");
}



//no. you gots to flip it TURN-WAYS, dunkass.
//rendering shouldu be different
//making new scenes to be different
void sbahjMode(){
	if(!doNotRender) window.alert("where MAKING THIS HAPEN");
	//when kr has their stuff read, render it after everything else is done , or just, like put it on a 30 second timer. needs comedic timing, needs to be on top
	//maybe my laughing reaction shot sbahj_author.jpg goes then, too
	appendHtml(querySelector("#story"),"<img src = 'images/AUTHORSBAHJ.jpg' style='position:absolute; top:111px'><img src = 'images/sbahj_author.jpg' style='position:absolute; left:0px; z-index: 999;'>");


	new Timer(new Duration(milliseconds: 10000), () =>appendHtml(querySelector("#story"),"<img src = 'images/kR_falls_DOWN_stairs_forever.gif' style='position:fixed; top:0px;; z-index: 999;'>"));

	querySelector('body').style.backgroundColor = "#0000ff";
	querySelector('body').style.backgroundImage = "none";
	querySelector('#story').style.backgroundColor = "#ff00ff";
	curSessionGlobalVar.sbahj = true;
	for(num j = 0; j<curSessionGlobalVar.players.length; j++){
		Player p = curSessionGlobalVar.players[j];
		p.sbahj = true;
		p.quirk.lettersToReplaceIgnoreCase =sbahj_quirks;
	}
}



//will get called twice for initialization purposes.
void checkEasterEgg(callBack, that){  //only yellow yard session uses 'that' because it needs to get back to the session context after doing easter egg.
	//authorMessage();
	//i cannot resist
	if(curSessionGlobalVar.session_id == 413){
		session413();
	}else if(curSessionGlobalVar.session_id == 612){
		session612();
	}else if(curSessionGlobalVar.session_id == 613){
		session613();
	}else if(curSessionGlobalVar.session_id == 1025){
		session1025();
	}else if(curSessionGlobalVar.session_id == 33){
		session33();
	}else if(curSessionGlobalVar.session_id == 111111){
		session111111();
	}else if(curSessionGlobalVar.session_id == 88888888){
		session88888888();
	}else if(curSessionGlobalVar.session_id == 420){
		session420();
	}else if(curSessionGlobalVar.session_id == 0){
		session0();
	}

	if(getParameterByName("images",null)  == "pumpkin"){
		doNotRender = true;
	}

	if(getParameterByName("easter",null)  == "egg"){
		easter_egg = true;
		window.alert("Yo Dawg, I herd you liek easter eggs???");
	}


	if(getParameterByName("selfInsertOC",null)  == "true"){
		// call a method, method will determine what other params exist, like reddit=true and shit.;
		processFanOCs(callBack,that);
		return; //do nothing else. processFanOCs will handle the callback, since it's the reason it exists in the first place, 'cause async
	}

	//not an else if because this OVERIDES other easter egg sessions. but called here and not where other params are 'cause needs to have session initialized first.
	if(getParameterByName("nepeta",null)  == ":33"){
		nepetaQuest(); //ANY session can be all nepetas.
	}

	if(getParameterByName("luck",null)  == "AAAAAAAALL"){
		lucky8rk();
	}

	if(getParameterByName("honk",null)  == ":o)"){
		fridgeQuest();
	}

	if(getParameterByName("shenanigans",null)  == "temporal"){
		aradiaQuest();
	}

	if(getParameterByName("home",null)  == "stuck"){
		homestuck();
	}

	if(getParameterByName("hive",null)  == "bent"){
		hivebent();
	}

	if(getParameterByName("open",null)  == "bound"){
		openBound();
	}

	if(getParameterByName("rumpus",null)  == "fruity"){
		fruityRumpusAssholeFactory();
	}

	if(getParameterByName("lawnring",null)  == "yellow"){
		janusReward();
	}

	processXStuck(); //might not do anything.
  if(that != null) {
    callBack(that); //TODO might never need to do this again in Dart.
  }else {
    callBack();
  }
}



void janusReward(){
	curSessionGlobalVar.janusReward = true;
}



//omg, so easy, KnightStuck = true, SylphStuck = true, PageStuck = true.;
//if last word is stuck, look for first word in either all class, or all aspects, mod the approriate thing to be the first word.
//auto works with new claspects, too. genius
void processXStuck(){
	//TODO get this working again. window.location.search is empty.
	if(window.location.search.isEmpty) {
	  print("no params to look at");
		return;
	}
	String params1 = window.location.search.substring(0);
	String params2 = simulatedParamsGlobalVar;
	print("~~~~~~~~~~~~~~~~~~params2 is " + params2);
	List<String> tmp = SBURBClassManager.allClassNames;
	String params = "";
	if(params1 != null){
		params = params1;
		if(params2!= null){
			params += "&" + params2;
		}
	}else if(params2 != null) params = params2;
	var paramsArray = params.split("&");
	for(num i = 0; i<paramsArray.length; i++){
		var stuck = paramsArray[i].split("Stuck");
		print("stuck is: " + stuck.toString());
		if(stuck.length == 2){
			var classOrAspect = stuck[0];
			if(tmp.indexOf(stuck[0]) != -1){
				setAllClassesTo(stuck[0].trim());
			}else if(all_aspects.indexOf(stuck[0]) != -1){
				setAllAspectsTo(stuck[0].trim());<commit_msg>hell yes stuck is fixed<commit_after>import "dart:async";
import "dart:html";

import "SBURBSim.dart";
import 'navbar.dart';

void bardQuestMode(){
	if(window.confirm("Behold the Majesty of the CodTier? Y/N")){
		bardQuest = true;
	}else{
		window.alert("But thou must!f");
		bardQuestMode();
	}

}



void faceOffMode(){
	faceOff = true;
	window.alert("Wait...so...if this is 'face off' mode....does that mean the creepy flesh masks were their real faces all along, and THIS is what was hidden underneath???");
	for(num i = 0; i<curSessionGlobalVar.players.length; i++){
		curSessionGlobalVar.players[i].grimDark = 4;
	}
}



void pen15Ouija(){
	ouija = true;
	window.alert("thats the spooky thing about penis ouija you can never be sure who did the dicks");
	window.alert("was it you or me or maybe a ghoooost???");
	querySelector('body').style.backgroundColor = "#f8c858";
	querySelector('body').style.backgroundImage = "url(images/pen15_bg1.png)";
}



void coolK1DMode(){
	window.alert("H3Y TH3R3 COOL K1D 1S TH1S YOU???");
}



//no. you gots to flip it TURN-WAYS, dunkass.
//rendering shouldu be different
//making new scenes to be different
void sbahjMode(){
	if(!doNotRender) window.alert("where MAKING THIS HAPEN");
	//when kr has their stuff read, render it after everything else is done , or just, like put it on a 30 second timer. needs comedic timing, needs to be on top
	//maybe my laughing reaction shot sbahj_author.jpg goes then, too
	appendHtml(querySelector("#story"),"<img src = 'images/AUTHORSBAHJ.jpg' style='position:absolute; top:111px'><img src = 'images/sbahj_author.jpg' style='position:absolute; left:0px; z-index: 999;'>");


	new Timer(new Duration(milliseconds: 10000), () =>appendHtml(querySelector("#story"),"<img src = 'images/kR_falls_DOWN_stairs_forever.gif' style='position:fixed; top:0px;; z-index: 999;'>"));

	querySelector('body').style.backgroundColor = "#0000ff";
	querySelector('body').style.backgroundImage = "none";
	querySelector('#story').style.backgroundColor = "#ff00ff";
	curSessionGlobalVar.sbahj = true;
	for(num j = 0; j<curSessionGlobalVar.players.length; j++){
		Player p = curSessionGlobalVar.players[j];
		p.sbahj = true;
		p.quirk.lettersToReplaceIgnoreCase =sbahj_quirks;
	}
}



//will get called twice for initialization purposes.
void checkEasterEgg(callBack, that){  //only yellow yard session uses 'that' because it needs to get back to the session context after doing easter egg.
	//authorMessage();
	//i cannot resist
	if(curSessionGlobalVar.session_id == 413){
		session413();
	}else if(curSessionGlobalVar.session_id == 612){
		session612();
	}else if(curSessionGlobalVar.session_id == 613){
		session613();
	}else if(curSessionGlobalVar.session_id == 1025){
		session1025();
	}else if(curSessionGlobalVar.session_id == 33){
		session33();
	}else if(curSessionGlobalVar.session_id == 111111){
		session111111();
	}else if(curSessionGlobalVar.session_id == 88888888){
		session88888888();
	}else if(curSessionGlobalVar.session_id == 420){
		session420();
	}else if(curSessionGlobalVar.session_id == 0){
		session0();
	}

	if(getParameterByName("images",null)  == "pumpkin"){
		doNotRender = true;
	}

	if(getParameterByName("easter",null)  == "egg"){
		easter_egg = true;
		window.alert("Yo Dawg, I herd you liek easter eggs???");
	}


	if(getParameterByName("selfInsertOC",null)  == "true"){
		// call a method, method will determine what other params exist, like reddit=true and shit.;
		processFanOCs(callBack,that);
		return; //do nothing else. processFanOCs will handle the callback, since it's the reason it exists in the first place, 'cause async
	}

	//not an else if because this OVERIDES other easter egg sessions. but called here and not where other params are 'cause needs to have session initialized first.
	if(getParameterByName("nepeta",null)  == ":33"){
		nepetaQuest(); //ANY session can be all nepetas.
	}

	if(getParameterByName("luck",null)  == "AAAAAAAALL"){
		lucky8rk();
	}

	if(getParameterByName("honk",null)  == ":o)"){
		fridgeQuest();
	}

	if(getParameterByName("shenanigans",null)  == "temporal"){
		aradiaQuest();
	}

	if(getParameterByName("home",null)  == "stuck"){
		homestuck();
	}

	if(getParameterByName("hive",null)  == "bent"){
		hivebent();
	}

	if(getParameterByName("open",null)  == "bound"){
		openBound();
	}

	if(getParameterByName("rumpus",null)  == "fruity"){
		fruityRumpusAssholeFactory();
	}

	if(getParameterByName("lawnring",null)  == "yellow"){
		janusReward();
	}

	processXStuck(); //might not do anything.
  if(that != null) {
    callBack(that); //TODO might never need to do this again in Dart.
  }else {
    callBack();
  }
}



void janusReward(){
	curSessionGlobalVar.janusReward = true;
}



//omg, so easy, KnightStuck = true, SylphStuck = true, PageStuck = true.;
//if last word is stuck, look for first word in either all class, or all aspects, mod the approriate thing to be the first word.
//auto works with new claspects, too. genius
void processXStuck(){
	//TODO get this working again. window.location.search is empty.
	if(window.location.search.isEmpty) {
	  print("no params to look at");
		return;
	}
	String params1 = window.location.search.substring(1);
	String params2 = simulatedParamsGlobalVar;
	print("~~~~~~~~~~~~~~~~~~params2 is " + params2);
	List<String> tmp = SBURBClassManager.allClassNames;
	String params = "";
	if(params1 != null){
		params = params1;
		if(params2!= null){
			params += "&" + params2;
		}
	}else if(params2 != null) params = params2;
	List<String> paramsArray = params.split("&");
	for(num i = 0; i<paramsArray.length; i++){
		List<String> stuck = paramsArray[i].split("Stuck");
		print("stuck is: " + stuck.toString());
		if(stuck.length == 2){
			if(tmp.indexOf(stuck[0]) != -1){
				setAllClassesTo(stuck[0].trim());
			}else if(all_aspects.indexOf(stuck[0]) != -1){
				setAllAspectsTo(stuck[0].trim());
{'fraction_non_alphanumeric': 0.15163620909477263, 'fraction_numerical': 0.022354441138971524, 'mean_word_length': 4.847912524850894, 'pattern_counts': {'":': 4, '<': 19, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 2, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5096072', 'n_tokens_mistral': 4365, 'n_tokens_neox': 3994, 'n_words': 1056}