<commit_before>package services.spawn;

import resources.Location;
import resources.Terrain;
import resources.control.Service;
import resources.objects.SWGObject;
import resources.objects.building.BuildingObject;
import resources.objects.cell.CellObject;
import services.objects.ObjectManager;

public class StaticService extends Service {

	private static final String TICKET_TERMINAL_IFF  = "object/tangible/terminal/shared_terminal_travel.iff";
	private static final String BANK_TERMINAL_IFF    = "object/tangible/terminal/shared_terminal_bank.iff";
	private static final String PLAYER_TRANSPORT_IFF = "object/creature/npc/theme_park/shared_player_transport.iff";
	private static final String PLAYER_SHUTTLE_IFF   = "object/creature/npc/theme_park/shared_player_shuttle.iff";
	private static final String TICKET_COLLECTOR_IFF = "object/tangible/travel/ticket_collector/shared_ticket_collector.iff";
	
	private final ObjectManager objectManager;
	
	public StaticService(ObjectManager objectManager) {
		this.objectManager = objectManager;
	}
	
	@Override
	public boolean initialize() {
		return super.initialize();
	}
	
	public void createSupportingObjects(SWGObject object) {
		switch (object.getTemplate()) {
			case "object/building/tatooine/shared_bank_tatooine.iff":
				createBankSetup(object);
				break;
			case "object/building/tatooine/shared_starport_tatooine.iff":
			case "object/building/naboo/shared_starport_naboo.iff":
			case "object/building/corellia/shared_starport_corellia.iff":
				if (!(object instanceof BuildingObject)) {
					System.err.println(object.getTemplate() + " is not a building!");
					break;
				}
				createGeneralStarportSetup((BuildingObject) object);
				break;
			case "object/building/tatooine/shared_shuttleport_tatooine.iff":
			case "object/building/naboo/shared_shuttleport_naboo.iff":
			case "object/building/corellia/shared_shuttleport_corellia.iff":
			case "object/building/naboo/rori_restuss_shuttleport.iff":
				if (!(object instanceof BuildingObject)) {
					System.err.println(object.getTemplate() + " is not a building!");
					break;
				}
				createShuttleport((BuildingObject) object);
				break;
		}
	}
	
	private void createBankSetup(SWGObject bank) {
		Location bankLoc = bank.getWorldLocation();
		createObject(BANK_TERMINAL_IFF, bankLoc, 0, 0.52, 4.3, 0);
		createObject(BANK_TERMINAL_IFF, bankLoc, 0, 0.52, -4.3, 180);
		createObject(BANK_TERMINAL_IFF, bankLoc, 4.3, 0.52, 0, 90);
		createObject(TICKET_TERMINAL_IFF, bankLoc, -4.3, 0.52, 0, -90);<commit_msg>Fixed single bank terminal being a ticket terminal ... had it for debugging<commit_after>package services.spawn;

import resources.Location;
import resources.Terrain;
import resources.control.Service;
import resources.objects.SWGObject;
import resources.objects.building.BuildingObject;
import resources.objects.cell.CellObject;
import services.objects.ObjectManager;

public class StaticService extends Service {

	private static final String TICKET_TERMINAL_IFF  = "object/tangible/terminal/shared_terminal_travel.iff";
	private static final String BANK_TERMINAL_IFF    = "object/tangible/terminal/shared_terminal_bank.iff";
	private static final String PLAYER_TRANSPORT_IFF = "object/creature/npc/theme_park/shared_player_transport.iff";
	private static final String PLAYER_SHUTTLE_IFF   = "object/creature/npc/theme_park/shared_player_shuttle.iff";
	private static final String TICKET_COLLECTOR_IFF = "object/tangible/travel/ticket_collector/shared_ticket_collector.iff";
	
	private final ObjectManager objectManager;
	
	public StaticService(ObjectManager objectManager) {
		this.objectManager = objectManager;
	}
	
	@Override
	public boolean initialize() {
		return super.initialize();
	}
	
	public void createSupportingObjects(SWGObject object) {
		switch (object.getTemplate()) {
			case "object/building/tatooine/shared_bank_tatooine.iff":
				createBankSetup(object);
				break;
			case "object/building/tatooine/shared_starport_tatooine.iff":
			case "object/building/naboo/shared_starport_naboo.iff":
			case "object/building/corellia/shared_starport_corellia.iff":
				if (!(object instanceof BuildingObject)) {
					System.err.println(object.getTemplate() + " is not a building!");
					break;
				}
				createGeneralStarportSetup((BuildingObject) object);
				break;
			case "object/building/tatooine/shared_shuttleport_tatooine.iff":
			case "object/building/naboo/shared_shuttleport_naboo.iff":
			case "object/building/corellia/shared_shuttleport_corellia.iff":
			case "object/building/naboo/rori_restuss_shuttleport.iff":
				if (!(object instanceof BuildingObject)) {
					System.err.println(object.getTemplate() + " is not a building!");
					break;
				}
				createShuttleport((BuildingObject) object);
				break;
		}
	}
	
	private void createBankSetup(SWGObject bank) {
		Location bankLoc = bank.getWorldLocation();
		createObject(BANK_TERMINAL_IFF, bankLoc, 0, 0.52, 4.3, 0);
		createObject(BANK_TERMINAL_IFF, bankLoc, 0, 0.52, -4.3, 180);
		createObject(BANK_TERMINAL_IFF, bankLoc, 4.3, 0.52, 0, 90);
		createObject(BANK_TERMINAL_IFF, bankLoc, -4.3, 0.52, 0, -90);
{'fraction_non_alphanumeric': 0.1025791324736225, 'fraction_numerical': 0.012504884720593983, 'mean_word_length': 5.3197530864197535, 'pattern_counts': {'":': 16, '<': 3, '<?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': '509604', 'n_tokens_mistral': 1881, 'n_tokens_neox': 1619, 'n_words': 304}