<commit_before>part of entity;

abstract class Tree extends Plant {
	static final String SKILL = "arborology";
	String rewardItemType;
	DateTime lastWeatherUpdate = new DateTime.now();

	int maturity;

	Tree(String id, int x, int y, String streetName) : super(id, x, y, streetName) {
		actions..add({"action":"harvest",
			"timeRequired":actionTime,
			"enabled":true,
			"actionWord":"harvesting",
			"requires":[{
					'num':5,
					'of':['energy'],
					"error": "You need at least 5 energy to harvest."
				}],
				"associatedSkill": SKILL
			})..add({"action":"water",
			"timeRequired":actionTime,
			"enabled":true,
			"actionWord":"watering",
			"requires":[
				{
					"num":1,
					"of":["watering_can", "irrigator_9000"],
					"error": "Trees don't like to be peed on. Go find some clean water, please."
				},
				{
					"num": 2,
					"of": ['energy'],
					"error": "You need at least 2 energy to water."
				}
			]})..add({"action":"pet",
			"timeRequired":actionTime,
			"enabled":true,
			"actionWord":"petting",
			"requires":[
				{
					'num':2,
					'of':['energy'],
					'error': "You need at least 2 energy to pet."
				}
			]});
	}

	void update() {
		super.update();

		if (state > 0) {
			setActionEnabled("harvest", true);
		} else {
			setActionEnabled("harvest", false);
		}

		if (
			WeatherEndpoint.currentState == WeatherState.RAINING &&
			new DateTime.now().difference(lastWeatherUpdate).inSeconds > 23
		) {
			// Every 23 seconds while raining
			state = (state + 1).clamp(0, maxState);
			lastWeatherUpdate = new DateTime.now();
		}
	}
<commit_msg>make trees not pitiful (maybe? untested.)<commit_after>part of entity;

abstract class Tree extends Plant {
	static final String SKILL = "arborology";
	String rewardItemType;
	DateTime lastWeatherUpdate = new DateTime.now();

	int maturity;

	Tree(String id, int x, int y, String streetName) : super(id, x, y, streetName) {
		actions..add({"action":"harvest",
			"timeRequired":actionTime,
			"enabled":true,
			"actionWord":"harvesting",
			"requires":[{
					'num':5,
					'of':['energy'],
					"error": "You need at least 5 energy to harvest."
				}],
				"associatedSkill": SKILL
			})..add({"action":"water",
			"timeRequired":actionTime,
			"enabled":true,
			"actionWord":"watering",
			"requires":[
				{
					"num":1,
					"of":["watering_can", "irrigator_9000"],
					"error": "Trees don't like to be peed on. Go find some clean water, please."
				},
				{
					"num": 2,
					"of": ['energy'],
					"error": "You need at least 2 energy to water."
				}
			]})..add({"action":"pet",
			"timeRequired":actionTime,
			"enabled":true,
			"actionWord":"petting",
			"requires":[
				{
					'num':2,
					'of':['energy'],
					'error': "You need at least 2 energy to pet."
				}
			]});

		maturity = (maturity * 2).clamp(0, states.length);
	}

	void update() {
		super.update();

		if (state > 0) {
			setActionEnabled("harvest", true);
		} else {
			setActionEnabled("harvest", false);
		}

		if (
			WeatherEndpoint.currentState == WeatherState.RAINING &&
			new DateTime.now().difference(lastWeatherUpdate).inSeconds > 23
		) {
			// Every 23 seconds while raining
			state = (state + 1).clamp(0, maxState);
			lastWeatherUpdate = new DateTime.now();
		}
	}

{'fraction_non_alphanumeric': 0.17332513829133375, 'fraction_numerical': 0.011677934849416103, 'mean_word_length': 3.2604712041884816, 'pattern_counts': {'":': 46, '<': 3, '<?xml version=': 0, '>': 7, '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': '3380333', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1092, 'n_words': 271}