<commit_before>part of coUserver;

class StreetSpiritFirebog extends Vendor {
	int openCount = 0;

	StreetSpiritFirebog(String id, String streetName, String tsid, int x, int y) : super(id, streetName, tsid, x, y) {
		speed = -75;
		itemsPredefined = false;
		states = {
			"idle_cry":new Spritesheet("idle_cry", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_idle_cry_png_1354832895.png', 856, 732, 107, 244, 24, false),
			"idle_move":new Spritesheet("idle_move", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_idle_move_png_1354832884.png', 856, 732, 107, 244, 24, false),
			"open":new Spritesheet("open", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_open_png_1354832888.png', 749, 732, 107, 244, 19, false),
			"close":new Spritesheet("close", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_close_png_1354832889.png', 963, 488, 107, 244, 17, false),
			"talk":new Spritesheet("talk", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_talk_png_1354832886.png', 963, 1708, 107, 244, 17, false)
		};
		currentState = states['idle_cry'];
	}

	void update() {
		if(respawn != null && respawn.compareTo(new DateTime.now()) <= 0) {
			//if we just cried, we should say we're facing the other way
			//then we should start moving (that's why we turned around after all)
			if(currentState.stateName == 'idle_cry') {
				if (rand.nextInt(5) == 1) {
					facingRight = !facingRight;
					currentState = states['idle_move'];
					int length = (currentState.numFrames / 30 * 1000).toInt();
					respawn = new DateTime.now().add(new Duration(milliseconds:length));
					return;
				}
			} else {
				//sometimes use talk so that the blinking isn't predictable
				int roll = rand.nextInt(3);
				if(roll == 1) {
					currentState = states['talk'];
				} else {
					currentState = states['idle_move'];
					respawn = null;
				}
				return;
			}<commit_msg>slow down firebog vendors<commit_after>part of coUserver;

class StreetSpiritFirebog extends Vendor {
	int openCount = 0;

	StreetSpiritFirebog(String id, String streetName, String tsid, int x, int y) : super(id, streetName, tsid, x, y) {
		speed = 10;
		itemsPredefined = false;
		states = {
			"idle_cry":new Spritesheet("idle_cry", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_idle_cry_png_1354832895.png', 856, 732, 107, 244, 24, false),
			"idle_move":new Spritesheet("idle_move", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_idle_move_png_1354832884.png', 856, 732, 107, 244, 24, false),
			"open":new Spritesheet("open", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_open_png_1354832888.png', 749, 732, 107, 244, 19, false),
			"close":new Spritesheet("close", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_close_png_1354832889.png', 963, 488, 107, 244, 17, false),
			"talk":new Spritesheet("talk", 'http://c2.glitch.bz/items/2012-12-06/street_spirit_firebog_size_large_x1_talk_png_1354832886.png', 963, 1708, 107, 244, 17, false)
		};
		currentState = states['idle_move'];
	}

	void update() {
		if(respawn != null && respawn.compareTo(new DateTime.now()) <= 0) {
			//if we just cried, we should say we're facing the other way
			//then we should start moving (that's why we turned around after all)
			if(currentState.stateName == 'idle_cry') {
				if (rand.nextInt(5) == 1) {
					facingRight = !facingRight;
					currentState = states['idle_move'];
					int length = (currentState.numFrames / 30 * 1000).toInt();
					respawn = new DateTime.now().add(new Duration(milliseconds:length));
					return;
				}
			} else {
				//sometimes use talk so that the blinking isn't predictable
				int roll = rand.nextInt(3);
				if(roll == 1) {
					currentState = states['talk'];
				} else {
					currentState = states['idle_move'];
					respawn = null;
				}
				return;
			}
{'fraction_non_alphanumeric': 0.14310865191146882, 'fraction_numerical': 0.09305835010060362, 'mean_word_length': 4.267549668874172, 'pattern_counts': {'":': 10, '<': 5, '<?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': '7142569', 'n_tokens_mistral': 1940, 'n_tokens_neox': 1471, 'n_words': 303}