<commit_before>package main.swapship.systems;

import main.swapship.components.SpatialComp;
import main.swapship.components.diff.PlayerComp;

import com.artemis.ComponentMapper;
import com.artemis.Entity;
import com.artemis.Filter;
import com.artemis.systems.EntityProcessingSystem;
import com.badlogic.gdx.Gdx;

/**
 * System used to cull bullets and enemies that go out of the screen
 * @author Brandon
 *
 */
public class CullingSys extends EntityProcessingSystem {

	private ComponentMapper<SpatialComp> scm;
	
	public CullingSys() {
		super(Filter.allComponents(SpatialComp.class).exclude(PlayerComp.class));
	}
	
	@Override
	public void initialize() {
		this.scm = world.getMapper(SpatialComp.class);
	}
	
	@Override
	public void process(Entity e) {
		SpatialComp sc = scm.get(e);
		
		// Left
		if (sc.x - sc.width < 0) {
			e.deleteFromWorld();
			return;
		}		
		// Right
		if (sc.x > Gdx.graphics.getWidth()) {
			e.deleteFromWorld();
			return;
		}		
		// Bottom
		if (sc.y - sc.height < 0) {
			e.deleteFromWorld();
			return;
		}		
		// Top
		if (sc.y > Gdx.graphics.getHeight()) {
			e.deleteFromWorld();
			return;
		}
	}
}<commit_msg>Made it so enemy ships weren't culled (they have removal code)<commit_after>package main.swapship.systems;

import main.swapship.components.SpatialComp;
import main.swapship.components.diff.PlayerComp;
import main.swapship.components.other.PathFollowComp;

import com.artemis.ComponentMapper;
import com.artemis.Entity;
import com.artemis.Filter;
import com.artemis.systems.EntityProcessingSystem;
import com.badlogic.gdx.Gdx;

/**
 * System used to cull bullets and enemies that go out of the screen
 * @author Brandon
 *
 */
public class CullingSys extends EntityProcessingSystem {

	private ComponentMapper<SpatialComp> scm;
	
	public CullingSys() {
		// Excluding the path followers because they already have deletion methods
		super(Filter.allComponents(SpatialComp.class).exclude(PlayerComp.class, PathFollowComp.class));
	}
	
	@Override
	public void initialize() {
		this.scm = world.getMapper(SpatialComp.class);
	}
	
	@Override
	public void process(Entity e) {
		SpatialComp sc = scm.get(e);
		
		// Left
		if (sc.x - sc.width < 0) {
			e.deleteFromWorld();
			return;
		}		
		// Right
		if (sc.x > Gdx.graphics.getWidth()) {
			e.deleteFromWorld();
			return;
		}		
		// Bottom
		if (sc.y + sc.height < 0) {
			e.deleteFromWorld();
			return;
		}		
		// Top
		if (sc.y > Gdx.graphics.getHeight()) {
			e.deleteFromWorld();
			return;
		}
	}
}
{'fraction_non_alphanumeric': 0.1223021582733813, 'fraction_numerical': 0.0015987210231814548, 'mean_word_length': 3.6095764272559854, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4731221', 'n_tokens_mistral': 968, 'n_tokens_neox': 845, 'n_words': 187}