int TicketCollectorImplementation::handleObjectMenuSelect(CreatureObject* player, byte selectedID) {
	if (selectedID == 20) {
		player->executeObjectControllerAction(0x5DCD41A2); //boardShuttle
	} else if (selectedID == 193 && JediManager::instance()->getJediProgressionType() == JediManager::VILLAGEJEDIPROGRESSION) {
		Zone* thisZone = getZone();

		if (thisZone == NULL)
			return 0;

		ManagedReference<PlanetManager*> planetManager = thisZone->getPlanetManager();

		if (planetManager == NULL)
			return 0;

		PlanetTravelPoint* ptp = planetManager->getNearestPlanetTravelPoint(_this.getReferenceUnsafeStaticCast(), 64.f);

		if (ptp != NULL && ptp->isInterplanetary()) {
			PlayerObject* ghost = player->getPlayerObject();

			if (ghost != NULL && ghost->hasActiveQuestBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03) && !ghost->hasCompletedQuestsBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03)) {
				Lua* lua = DirectorManager::instance()->getLuaInstance();
				Reference<LuaFunction*> luaObtainData = lua->createFunction("FsCrafting4", "obtainSatelliteData", 0);
				*luaObtainData << player;
				*luaObtainData << _this.getReferenceUnsafeStaticCast();

				luaObtainData->callFunction();
			}
		}
	}

	return 0;
}
void TicketCollectorImplementation::fillObjectMenuResponse(ObjectMenuResponse* menuResponse, CreatureObject* player) {
	if (JediManager::instance()->getJediProgressionType() == JediManager::VILLAGEJEDIPROGRESSION) {
		Zone* thisZone = getZone();

		if (thisZone == NULL)
			return;

		ManagedReference<PlanetManager*> pMan = thisZone->getPlanetManager();

		if (pMan == NULL)
			return;

		PlanetTravelPoint* ptp = pMan->getNearestPlanetTravelPoint(_this.getReferenceUnsafeStaticCast(), 64.f);

		if (ptp != NULL && ptp->isInterplanetary()) {
			PlayerObject* ghost = player->getPlayerObject();

			if (ghost != NULL && ghost->hasActiveQuestBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03) && !ghost->hasCompletedQuestsBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03))
				menuResponse->addRadialMenuItem(193, 3, "@quest/force_sensitive/fs_crafting:tracking_data_menu_obtain_data"); // Obtain Satellite Data
		}
	}
}
void FsVillageAreaImplementation::notifyEnter(SceneObject* player) {
	ActiveAreaImplementation::notifyEnter(player);

	if (!player->isPlayerCreature()) {
		return;
	}

	float x = player->getPositionX();
	float y = player->getPositionY();

	float diffY = y - getPositionY();
	float diffX = x - getPositionX();

	float angle = atan2(diffY == 0.f ? 1 : diffY, diffX == 0.f ? 1 : diffX);

	CreatureObject* playerCreature = cast<CreatureObject*>(player);
	PlayerObject* ghost = playerCreature->getPlayerObject();
	float rad = getRadius() * 1.05;

	float newPosX = getPositionX() + (cos(angle) * rad);
	float newPosY = getPositionY() + (sin(angle) * rad);

	// Those who aren't a valid player, do not currently have or have had the Village elder quest cannot enter.
	if (ghost != NULL) {
		if (ghost->hasGodMode())
			return;

		if (!ghost->hasActiveQuestBitSet(PlayerQuestData::FS_VILLAGE_ELDER) && !ghost->hasCompletedQuestsBitSet(PlayerQuestData::FS_VILLAGE_ELDER)) {
			playerCreature->teleport(newPosX, getZone()->getHeight(newPosX, newPosY), newPosY, 0);
			playerCreature->sendSystemMessage("@base_player:fs_village_unavailable");
		} else if (playerCreature->isInCombat()) {
			playerCreature->teleport(newPosX, getZone()->getHeight(newPosX, newPosY), newPosY, 0);
			playerCreature->sendSystemMessage("@base_player:fs_village_no_combat");
		}
	}
}