import struct MappinUtils
{
	public import static function GetGlobalProfile() : MappinUIGlobalProfile_Record;
	public import static function GetDistrictRecord( districtType : gamedataDistrict ) : weak< District_Record >;
	public import static function GetMappinsGroup( mappinVariant : gamedataMappinVariant ) : weak< MappinsGroup_Record >;
	private import static function GetFilterGroupFromFilter( filter : gamedataWorldMapFilter ) : weak< MappinUIFilterGroup_Record >;
	private import static function GetFilterGroupFromVariant( mappinVariant : gamedataMappinVariant ) : weak< MappinUIFilterGroup_Record >;

	public static function GetFilterGroup( filter : gamedataWorldMapFilter ) : weak< MappinUIFilterGroup_Record >
	{
		return GetFilterGroupFromFilter( filter );
	}

	public static function GetFilterGroup( mappinVariant : gamedataMappinVariant ) : weak< MappinUIFilterGroup_Record >
	{
		return GetFilterGroupFromVariant( mappinVariant );
	}

}

import struct MappinUIUtils
{
	public import static function GetEngineTime() : EngineTime;
	public import static function IsPlayerInArea( mappin : weak< IMappin > ) : Bool;

	public static function IsMappinServicePoint( mappinVariant : gamedataMappinVariant ) : Bool
	{
		switch( mappinVariant )
		{
			case gamedataMappinVariant.ServicePointClothesVariant:
			case gamedataMappinVariant.ServicePointFoodVariant:
			case gamedataMappinVariant.ServicePointBarVariant:
			case gamedataMappinVariant.ServicePointGunsVariant:
			case gamedataMappinVariant.Zzz14_ServicePointBlackMarketVariant:
			case gamedataMappinVariant.ServicePointMedsVariant:
			case gamedataMappinVariant.ServicePointMeleeTrainerVariant:
			case gamedataMappinVariant.ServicePointNetTrainerVariant:
			case gamedataMappinVariant.ServicePointProstituteVariant:
			case gamedataMappinVariant.ServicePointRipperdocVariant:
			case gamedataMappinVariant.ServicePointTechVariant:
			case gamedataMappinVariant.ServicePointJunkVariant:
			case gamedataMappinVariant.ServicePointDropPointVariant:
				return true;
		}
		return false;
	}

	public static function MappinToTexturePart( mappin : weak< IMappin > ) : CName
	{
		return MappinToTexturePart( mappin.GetVariant(), mappin.GetPhase() );
	}

	public static function MappinToTexturePart( mappinVariant : gamedataMappinVariant, mappinPhase : gamedataMappinPhase ) : CName
	{
		return MappinToTexturePart( mappinVariant );
	}

	public static function MappinToTexturePart( mappinVariant : gamedataMappinVariant ) : CName
	{
		switch( mappinVariant )
		{
			case gamedataMappinVariant.DefaultVariant:
				return 'quest';
			case gamedataMappinVariant.DefaultQuestVariant:
				return 'minor_quest';
			case gamedataMappinVariant.DefaultInteractionVariant:
				return 'quest';
			case gamedataMappinVariant.ConversationVariant:
				return 'talk';
			case gamedataMappinVariant.QuestGiverVariant:
				return 'gigs';
			case gamedataMappinVariant.MinorActivityVariant:
				return 'map_bounty';
			case gamedataMappinVariant.Zzz06_NCPDGigVariant:
				return 'map_bounty';
			case gamedataMappinVariant.ExclamationMarkVariant:
				return 'quest';
			case gamedataMappinVariant.RetrievingVariant:
				return 'gigs';
			case gamedataMappinVariant.ThieveryVariant:
				return 'gigs';
			case gamedataMappinVariant.SabotageVariant:
				return 'gigs';
			case gamedataMappinVariant.ClientInDistressVariant:
				return 'gigs';
			case gamedataMappinVariant.BountyHuntVariant:
				return 'gigs';
			case gamedataMappinVariant.CourierVariant:
				return 'gigs';
			case gamedataMappinVariant.GangWatchVariant:
				return 'map_bounty';
			case gamedataMappinVariant.OutpostVariant:
				return 'map_bounty';
			case gamedataMappinVariant.ResourceVariant:
				return 'resource';
			case gamedataMappinVariant.HiddenStashVariant:
				return 'map_bounty';
			case gamedataMappinVariant.HuntForPsychoVariant:
				return 'hunt_for_psycho';
			case gamedataMappinVariant.SmugglersDenVariant:
				return 'smugglers';
			case gamedataMappinVariant.WanderingMerchantVariant:
				return 'wandering_merchant';
			case gamedataMappinVariant.ConvoyVariant:
				return 'gigs';
			case gamedataMappinVariant.FixerVariant:
				return 'fixer';
			case gamedataMappinVariant.DropboxVariant:
				return 'dropbox';
			case gamedataMappinVariant.ApartmentVariant:
				return 'apartment';
			case gamedataMappinVariant.ServicePointClothesVariant:
				return 'clothes';
			case gamedataMappinVariant.ServicePointFoodVariant:
				return 'food_vendor';
			case gamedataMappinVariant.ServicePointBarVariant:
				return 'bar';
			case gamedataMappinVariant.ServicePointGunsVariant:
				return 'gun';
			case gamedataMappinVariant.Zzz14_ServicePointBlackMarketVariant:
				return 'black_market_vendor';
			case gamedataMappinVariant.ServicePointMedsVariant:
				return 'medicine';
			case gamedataMappinVariant.ServicePointMeleeTrainerVariant:
				return 'melee';
			case gamedataMappinVariant.ServicePointNetTrainerVariant:
				return 'netservice';
			case gamedataMappinVariant.ServicePointProstituteVariant:
				return 'prostitute';
			case gamedataMappinVariant.ServicePointRipperdocVariant:
				return 'ripperdoc';
			case gamedataMappinVariant.ServicePointTechVariant:
				return 'tech';
			case gamedataMappinVariant.ServicePointJunkVariant:
				return 'junk_shop';
			case gamedataMappinVariant.FastTravelVariant:
				return 'fast_travel';
			case gamedataMappinVariant.EffectDropPointVariant:
				return 'dropbox';
			case gamedataMappinVariant.ServicePointDropPointVariant:
				return 'dropbox';
			case gamedataMappinVariant.VehicleVariant:
				return 'car';
			case gamedataMappinVariant.Zzz03_MotorcycleVariant:
				return 'motorcycle';
			case gamedataMappinVariant.Zzz01_CarForPurchaseVariant:
				return 'car_to_buy';
			case gamedataMappinVariant.Zzz02_MotorcycleForPurchaseVariant:
				return 'motorcycle_to_buy';
			case gamedataMappinVariant.Zzz04_PreventionVehicleVariant:
				return 'map_bounty';
			case gamedataMappinVariant.Zzz05_ApartmentToPurchaseVariant:
				return 'apartment_to_buy';
			case gamedataMappinVariant.Zzz11_RoadBlockadeVariant:
				return 'roadblock';
			case gamedataMappinVariant.GrenadeVariant:
				return 'grenade';
			case gamedataMappinVariant.CustomPositionVariant:
				return 'dynamic_event';
			case gamedataMappinVariant.InvalidVariant:
				return 'invalid';
			case gamedataMappinVariant.SitVariant:
				return 'Sit';
			case gamedataMappinVariant.GetInVariant:
				return 'GetIn';
			case gamedataMappinVariant.GetUpVariant:
				return 'GetUp';
			case gamedataMappinVariant.AllowVariant:
				return 'Allow';
			case gamedataMappinVariant.BackOutVariant:
				return 'BackOut';
			case gamedataMappinVariant.JackInVariant:
				return 'JackIn';
			case gamedataMappinVariant.HitVariant:
				return 'Hit';
			case gamedataMappinVariant.TakeDownVariant:
				return 'TakeDown';
			case gamedataMappinVariant.NonLethalTakedownVariant:
				return 'NonLethalTakedown';
			case gamedataMappinVariant.TakeControlVariant:
				return 'TakeControl';
			case gamedataMappinVariant.OpenVendorVariant:
				return 'OpenVendor';
			case gamedataMappinVariant.DistractVariant:
				return 'Distract';
			case gamedataMappinVariant.ChangeToFriendlyVariant:
				return 'ChangeToFriendly';
			case gamedataMappinVariant.GunSuicideVariant:
				return 'GunSuicide';
			case gamedataMappinVariant.LifepathCorpoVariant:
				return 'LifepathCorpo';
			case gamedataMappinVariant.LifepathNomadVariant:
				return 'LifepathNomad';
			case gamedataMappinVariant.LifepathStreetKidVariant:
				return 'LifepathStreetKid';
			case gamedataMappinVariant.AimVariant:
				return 'Aim';
			case gamedataMappinVariant.JamWeaponVariant:
				return 'JamWeapon';
			case gamedataMappinVariant.OffVariant:
				return 'Off';
			case gamedataMappinVariant.UseVariant:
				return 'Use';
			case gamedataMappinVariant.PhoneCallVariant:
				return 'PhoneCall';
			case gamedataMappinVariant.SpeechVariant:
				return 'talk';
			case gamedataMappinVariant.GPSPortalVariant:
				return 'quest';
			case gamedataMappinVariant.FailedCrossingVariant:
				return 'failed_crossing';
			case gamedataMappinVariant.TarotVariant:
				return 'tarot_card';
			case gamedataMappinVariant.Zzz09_CourierSandboxActivityVariant:
				return 'courier';
			case gamedataMappinVariant.Zzz10_RemoteControlDrivingVariant:
				return 'remote_control';
			case gamedataMappinVariant.Zzz12_WorldEncounterVariant:
				return 'outpost';
			case gamedataMappinVariant.Zzz13_DogtownGateVariant:
				return 'dogtown_gate';
			case gamedataMappinVariant.Zzz16_RelicDeviceBasicVariant:
				return 'relic_access_point';
			case gamedataMappinVariant.Zzz16_RelicDeviceSpecialVariant:
				return 'relic_dataterm';
			case gamedataMappinVariant.Zzz17_NCARTVariant:
				return 'fast_travel_metro';
			case gamedataMappinVariant.Zzz18_RacingVariant:
				return 'racing';
			default:
				return 'invalid';
		}
	}

	public static function MappinToString( mappinVariant : gamedataMappinVariant, mappinPhase : gamedataMappinPhase ) : CName
	{
		return MappinToString( mappinVariant );
	}

	public static function MappinToString( mappinVariant : gamedataMappinVariant ) : CName
	{
		switch( mappinVariant )
		{
			case gamedataMappinVariant.DefaultQuestVariant:
				return 'UI-MappinTypes-MinorQuest';
			case gamedataMappinVariant.ConversationVariant:
				return 'UI-MappinTypes-Conversation';
			case gamedataMappinVariant.QuestGiverVariant:
				return 'UI-MappinTypes-QuestGiver';
			case gamedataMappinVariant.MinorActivityVariant:
				return 'UI-MappinTypes-MinorActivity';
			case gamedataMappinVariant.Zzz06_NCPDGigVariant:
				return 'UI-MappinTypes-MinorActivity';
			case gamedataMappinVariant.ExclamationMarkVariant:
				return 'UI-MappinTypes-Quest';
			case gamedataMappinVariant.RetrievingVariant:
				return 'UI-MappinTypes-Retrieving';
			case gamedataMappinVariant.ThieveryVariant:
				return 'UI-MappinTypes-Thievery';
			case gamedataMappinVariant.SabotageVariant:
				return 'UI-MappinTypes-Sabotage';
			case gamedataMappinVariant.ClientInDistressVariant:
				return 'UI-MappinTypes-ClientinDistress';
			case gamedataMappinVariant.BountyHuntVariant:
				return 'UI-MappinTypes-BountyHunt';
			case gamedataMappinVariant.CourierVariant:
				return 'UI-MappinTypes-Courier';
			case gamedataMappinVariant.Zzz09_CourierSandboxActivityVariant:
				return 'UI-MappinTypes-CourierTitleDiscovered';
			case gamedataMappinVariant.GangWatchVariant:
				return 'UI-MappinTypes-GangWatch';
			case gamedataMappinVariant.OutpostVariant:
				return 'UI-MappinTypes-Outpost';
			case gamedataMappinVariant.ResourceVariant:
				return 'UI-MappinTypes-Resource';
			case gamedataMappinVariant.HiddenStashVariant:
				return 'UI-MappinTypes-HiddenStash';
			case gamedataMappinVariant.HuntForPsychoVariant:
				return 'UI-MappinTypes-HuntforPsycho';
			case gamedataMappinVariant.SmugglersDenVariant:
				return 'UI-MappinTypes-SmugglersDen';
			case gamedataMappinVariant.WanderingMerchantVariant:
				return 'UI-MappinTypes-WanderingMerchant';
			case gamedataMappinVariant.ConvoyVariant:
				return 'UI-MappinTypes-Convoy';
			case gamedataMappinVariant.FixerVariant:
				return 'UI-MappinTypes-Fixer';
			case gamedataMappinVariant.DropboxVariant:
				return 'UI-MappinTypes-Dropbox';
			case gamedataMappinVariant.ApartmentVariant:
				return 'UI-MappinTypes-Apartment';
			case gamedataMappinVariant.Zzz05_ApartmentToPurchaseVariant:
				return 'UI-MappinTypes-ApartmentToPurchase';
			case gamedataMappinVariant.ServicePointClothesVariant:
				return 'UI-MappinTypes-ClothingServicePoint';
			case gamedataMappinVariant.ServicePointFoodVariant:
				return 'UI-MappinTypes-FoodServicePoint';
			case gamedataMappinVariant.ServicePointBarVariant:
				return 'UI-MappinTypes-BarServicePoint';
			case gamedataMappinVariant.ServicePointGunsVariant:
				return 'UI-MappinTypes-GunServicePoint';
			case gamedataMappinVariant.Zzz14_ServicePointBlackMarketVariant:
				return 'UI-MappinTypes-BlackMarketServicePoint';
			case gamedataMappinVariant.ServicePointMedsVariant:
				return 'UI-MappinTypes-MedicineServicePoint';
			case gamedataMappinVariant.ServicePointMeleeTrainerVariant:
				return 'UI-MappinTypes-MeleeServicePoint';
			case gamedataMappinVariant.ServicePointNetTrainerVariant:
				return 'UI-MappinTypes-NetTrainerServicePoint';
			case gamedataMappinVariant.ServicePointProstituteVariant:
				return 'UI-MappinTypes-Prostitute';
			case gamedataMappinVariant.ServicePointRipperdocVariant:
				return 'UI-MappinTypes-RipperdocServicePoint';
			case gamedataMappinVariant.ServicePointTechVariant:
				return 'UI-MappinTypes-TechServicePoint';
			case gamedataMappinVariant.ServicePointJunkVariant:
				return 'UI-MappinTypes-JunkServicePoint';
			case gamedataMappinVariant.FastTravelVariant:
				return 'UI-MappinTypes-FastTravel';
			case gamedataMappinVariant.EffectDropPointVariant:
				return 'UI-MappinTypes-Dropbox';
			case gamedataMappinVariant.ServicePointDropPointVariant:
				return 'UI-MappinTypes-Dropbox';
			case gamedataMappinVariant.VehicleVariant:
				return 'UI-MappinTypes-Vehicle';
			case gamedataMappinVariant.Zzz03_MotorcycleVariant:
				return 'UI-MappinTypes-Vehicle';
			case gamedataMappinVariant.Zzz01_CarForPurchaseVariant:
				return 'UI-MappinTypes-CarForPurchase';
			case gamedataMappinVariant.Zzz02_MotorcycleForPurchaseVariant:
				return 'UI-MappinTypes-MotorcycleForPurchase';
			case gamedataMappinVariant.CustomPositionVariant:
				return 'UI-MappinTypes-CustomLocation';
			case gamedataMappinVariant.InvalidVariant:
				return 'UI-MappinTypes-Invalid';
			case gamedataMappinVariant.SitVariant:
				return 'UI-MappinTypes-Sit';
			case gamedataMappinVariant.GetInVariant:
				return 'UI-MappinTypes-GetIn';
			case gamedataMappinVariant.GetUpVariant:
				return 'UI-MappinTypes-GetUp';
			case gamedataMappinVariant.AllowVariant:
				return 'UI-MappinTypes-Allow';
			case gamedataMappinVariant.BackOutVariant:
				return 'UI-MappinTypes-BackOut';
			case gamedataMappinVariant.JackInVariant:
				return 'UI-MappinTypes-JackIn';
			case gamedataMappinVariant.HitVariant:
				return 'UI-MappinTypes-Hit';
			case gamedataMappinVariant.TakeDownVariant:
				return 'UI-MappinTypes-TakeDown';
			case gamedataMappinVariant.NonLethalTakedownVariant:
				return 'NonLethalTakedown';
			case gamedataMappinVariant.TakeControlVariant:
				return 'TakeControl';
			case gamedataMappinVariant.OpenVendorVariant:
				return 'UI-MappinTypes-OpenVendor';
			case gamedataMappinVariant.DistractVariant:
				return 'UI-MappinTypes-Distract';
			case gamedataMappinVariant.ChangeToFriendlyVariant:
				return 'UI-MappinTypes-ChangeToFriendly';
			case gamedataMappinVariant.GunSuicideVariant:
				return 'UI-MappinTypes-GunSuicide';
			case gamedataMappinVariant.LifepathCorpoVariant:
				return 'UI-MappinTypes-LifepathCorpo';
			case gamedataMappinVariant.LifepathNomadVariant:
				return 'UI-MappinTypes-LifepathNomad';
			case gamedataMappinVariant.LifepathStreetKidVariant:
				return 'UI-MappinTypes-LifepathStreetKid';
			case gamedataMappinVariant.AimVariant:
				return 'UI-MappinTypes-Aim';
			case gamedataMappinVariant.JamWeaponVariant:
				return 'UI-MappinTypes-JamWeapon';
			case gamedataMappinVariant.OffVariant:
				return 'UI-MappinTypes-Off';
			case gamedataMappinVariant.UseVariant:
				return 'UI-MappinTypes-Use';
			case gamedataMappinVariant.PhoneCallVariant:
				return 'UI-MappinTypes-PhoneCall';
			case gamedataMappinVariant.FailedCrossingVariant:
				return 'UI-MappinTypes-FailedCrossing';
			case gamedataMappinVariant.TarotVariant:
				return 'UI-MappinTypes-Tarot';
			case gamedataMappinVariant.Zzz12_WorldEncounterVariant:
				return 'UI-MappinTypes-WorldEncounter';
			case gamedataMappinVariant.Zzz13_DogtownGateVariant:
				return 'UI-MappinTypes-DogtownGate';
			case gamedataMappinVariant.Zzz16_RelicDeviceBasicVariant:
				return 'Gameplay-Devices-DisplayNames-CorporateCoreDataHolder';
			case gamedataMappinVariant.Zzz16_RelicDeviceSpecialVariant:
				return 'Gameplay-Devices-DisplayNames-CorporateDataHolder';
			case gamedataMappinVariant.Zzz17_NCARTVariant:
				return 'UI-Ncart-ncart_mappin_name';
		}
		return 'UI-MappinTypes-UNKNOWN';
	}

	public static function GetFixerVariantData( questSystem : QuestsSystem, mappin : IMappin ) : FixerTooltipMapData
	{
		var characterID : TweakDBID;
		var iconID : TweakDBID;
		var poiMappin : PointOfInterestMappin;
		var fixerData : FixerTooltipMapData;
		var thresholdsArray : array< Int32 >;
		var i, thresholdsAmount : Int32;
		var factName : CName;
		fixerData.fixerLocKey = '';
		fixerData.fixerIcon = NULL;
		fixerData.allQuestsAmount = 0;
		fixerData.generalQuestsProgress = 0;
		fixerData.currentPackageProgress = 0;
		fixerData.allQuestsInCurrentPackage = 0;
		poiMappin = ( ( PointOfInterestMappin )( mappin ) );
		if( poiMappin != NULL )
		{
			characterID = poiMappin.GetCharacterRecordID();
			fixerData.fixerLocKey = TweakDBInterface.GetCharacterRecord( characterID ).FullDisplayName();
			iconID = TDB.GetForeignKey( characterID + T".tooltipAvatar" );
			fixerData.fixerIcon = TweakDBInterface.GetUIIconRecord( iconID );
			fixerData.allQuestsAmount = TweakDBInterface.GetInt( characterID + T".amountOfQuests", 0 );
			factName = TweakDBInterface.GetCName( characterID + T".factCounterName", '' );
			fixerData.generalQuestsProgress = questSystem.GetFact( factName );
			fixerData.additionalDescriptionKey = TweakDBInterface.GetCName( characterID + T".additionalDescription", '' );
			thresholdsArray = TweakDBInterface.GetIntArray( characterID + T".thresholds" );
			thresholdsAmount = thresholdsArray.Size();
			if( thresholdsAmount == 0 )
			{
				fixerData.currentPackageProgress = fixerData.generalQuestsProgress;
				fixerData.allQuestsInCurrentPackage = fixerData.allQuestsAmount;
				return fixerData;
			}
			if( fixerData.generalQuestsProgress > thresholdsArray[ ( thresholdsAmount - 1 ) ] )
			{
				fixerData.currentPackageProgress = fixerData.generalQuestsProgress - thresholdsArray[ thresholdsAmount ];
				fixerData.allQuestsInCurrentPackage = fixerData.allQuestsAmount - thresholdsArray[ thresholdsAmount ];
				return fixerData;
			}
			for( i = 0; i < thresholdsAmount; i += 1 )
			{
				if( fixerData.generalQuestsProgress < thresholdsArray[ i ] )
				{
					if( i == 0 )
					{
						fixerData.currentPackageProgress = fixerData.generalQuestsProgress;
						fixerData.allQuestsInCurrentPackage = thresholdsArray[ i ];
						return fixerData;
					}
					fixerData.currentPackageProgress = fixerData.generalQuestsProgress - thresholdsArray[ ( i - 1 ) ];
					fixerData.allQuestsInCurrentPackage = thresholdsArray[ i ] - thresholdsArray[ ( i - 1 ) ];
					return fixerData;
				}
			}
		}
		return fixerData;
	}

	public static function MappinToDescriptionString( mappinVariant : gamedataMappinVariant ) : CName
	{
		switch( mappinVariant )
		{
			case gamedataMappinVariant.DefaultQuestVariant:
				return 'UI-MappinTypes-MinorQuestDescription';
			case gamedataMappinVariant.ConversationVariant:
				return 'UI-MappinTypes-ConversationDescription';
			case gamedataMappinVariant.QuestGiverVariant:
				return 'UI-MappinTypes-QuestGiverDescription';
			case gamedataMappinVariant.MinorActivityVariant:
				return 'UI-MappinTypes-MinorActivityDescription';
			case gamedataMappinVariant.ExclamationMarkVariant:
				return 'UI-MappinTypes-QuestDescription';
			case gamedataMappinVariant.RetrievingVariant:
				return 'UI-MappinTypes-RetrievingDescription';
			case gamedataMappinVariant.ThieveryVariant:
				return 'UI-MappinTypes-ThieveryDescription';
			case gamedataMappinVariant.SabotageVariant:
				return 'UI-MappinTypes-SabotageDescription';
			case gamedataMappinVariant.ClientInDistressVariant:
				return 'UI-MappinTypes-ClientinDistressDescription';
			case gamedataMappinVariant.BountyHuntVariant:
				return 'UI-MappinTypes-BountyHuntDescription';
			case gamedataMappinVariant.CourierVariant:
				return 'UI-MappinTypes-CourierDescription';
			case gamedataMappinVariant.Zzz09_CourierSandboxActivityVariant:
				return 'UI-MappinTypes-CourierDescDiscovered';
			case gamedataMappinVariant.GangWatchVariant:
				return 'UI-MappinTypes-GangWatchDescription';
			case gamedataMappinVariant.OutpostVariant:
				return 'UI-MappinTypes-OutpostDescription';
			case gamedataMappinVariant.ResourceVariant:
				return 'UI-MappinTypes-ResourceDescription';
			case gamedataMappinVariant.HiddenStashVariant:
				return 'UI-MappinTypes-HiddenStashDescription';
			case gamedataMappinVariant.HuntForPsychoVariant:
				return 'UI-MappinTypes-HuntforPsychoDescription';
			case gamedataMappinVariant.SmugglersDenVariant:
				return 'UI-MappinTypes-SmugglersDenDescription';
			case gamedataMappinVariant.WanderingMerchantVariant:
				return 'UI-MappinTypes-WanderingMerchantDescription';
			case gamedataMappinVariant.ConvoyVariant:
				return 'UI-MappinTypes-ConvoyDescription';
			case gamedataMappinVariant.FixerVariant:
				return '';
			case gamedataMappinVariant.DropboxVariant:
				return 'UI-MappinTypes-DropboxDescription';
			case gamedataMappinVariant.ApartmentVariant:
				return 'UI-MappinTypes-ApartmentDescription';
			case gamedataMappinVariant.Zzz05_ApartmentToPurchaseVariant:
				return 'UI-MappinTypes-ApartmentToPurchaseDescription';
			case gamedataMappinVariant.ServicePointClothesVariant:
				return '';
			case gamedataMappinVariant.ServicePointFoodVariant:
				return '';
			case gamedataMappinVariant.ServicePointBarVariant:
				return '';
			case gamedataMappinVariant.ServicePointGunsVariant:
				return '';
			case gamedataMappinVariant.Zzz14_ServicePointBlackMarketVariant:
				return 'UI-MappinTypes-BlackMarketServicePointDescription';
			case gamedataMappinVariant.ServicePointMedsVariant:
				return '';
			case gamedataMappinVariant.ServicePointMeleeTrainerVariant:
				return '';
			case gamedataMappinVariant.ServicePointNetTrainerVariant:
				return 'UI-MappinTypes-NetTrainerServicePointDescription';
			case gamedataMappinVariant.ServicePointProstituteVariant:
				return 'UI-MappinTypes-ProstituteDescription';
			case gamedataMappinVariant.ServicePointRipperdocVariant:
				return 'UI-MappinTypes-RipperdocServicePointDescription';
			case gamedataMappinVariant.ServicePointTechVariant:
				return 'UI-MappinTypes-TechServicePointDescription';
			case gamedataMappinVariant.ServicePointJunkVariant:
				return 'UI-MappinTypes-JunkServicePointDescription';
			case gamedataMappinVariant.FastTravelVariant:
				return 'UI-MappinTypes-FastTravelDescription';
			case gamedataMappinVariant.EffectDropPointVariant:
				return 'UI-MappinTypes-DropboxDescription';
			case gamedataMappinVariant.ServicePointDropPointVariant:
				return 'UI-MappinTypes-DropboxDescription';
			case gamedataMappinVariant.VehicleVariant:
				return 'UI-MappinTypes-VehicleDescription';
			case gamedataMappinVariant.Zzz03_MotorcycleVariant:
				return 'UI-MappinTypes-VehicleDescription';
			case gamedataMappinVariant.Zzz01_CarForPurchaseVariant:
				return 'UI-MappinTypes-CarForPurchaseDescription';
			case gamedataMappinVariant.Zzz02_MotorcycleForPurchaseVariant:
				return 'UI-MappinTypes-MotorcycleForPurchaseDescription';
			case gamedataMappinVariant.CustomPositionVariant:
				return 'UI-MappinTypes-CustomLocationDescription';
			case gamedataMappinVariant.InvalidVariant:
				return 'UI-MappinTypes-Invalid-Description';
			case gamedataMappinVariant.SitVariant:
				return 'UI-MappinTypes-Sit-Description';
			case gamedataMappinVariant.GetInVariant:
				return 'UI-MappinTypes-GetIn-Description';
			case gamedataMappinVariant.GetUpVariant:
				return 'UI-MappinTypes-GetUp-Description';
			case gamedataMappinVariant.AllowVariant:
				return 'UI-MappinTypes-Allow-Description';
			case gamedataMappinVariant.BackOutVariant:
				return 'UI-MappinTypes-BackOut-Description';
			case gamedataMappinVariant.JackInVariant:
				return 'UI-MappinTypes-JackIn-Description';
			case gamedataMappinVariant.HitVariant:
				return 'UI-MappinTypes-Hit-Description';
			case gamedataMappinVariant.TakeDownVariant:
				return 'UI-MappinTypes-TakeDown-Description';
			case gamedataMappinVariant.NonLethalTakedownVariant:
				return 'NonLethalTakedown-Description';
			case gamedataMappinVariant.TakeControlVariant:
				return 'TakeControl-Description';
			case gamedataMappinVariant.OpenVendorVariant:
				return 'UI-MappinTypes-OpenVendor-Description';
			case gamedataMappinVariant.DistractVariant:
				return 'UI-MappinTypes-Distract-Description';
			case gamedataMappinVariant.ChangeToFriendlyVariant:
				return 'UI-MappinTypes-ChangeToFriendly-Description';
			case gamedataMappinVariant.GunSuicideVariant:
				return 'UI-MappinTypes-GunSuicide-Description';
			case gamedataMappinVariant.LifepathCorpoVariant:
				return 'UI-MappinTypes-LifepathCorpo-Description';
			case gamedataMappinVariant.LifepathNomadVariant:
				return 'UI-MappinTypes-LifepathNomad-Description';
			case gamedataMappinVariant.LifepathStreetKidVariant:
				return 'UI-MappinTypes-LifepathStreetKid-Description';
			case gamedataMappinVariant.AimVariant:
				return 'UI-MappinTypes-Aim-Description';
			case gamedataMappinVariant.JamWeaponVariant:
				return 'UI-MappinTypes-JamWeapon-Description';
			case gamedataMappinVariant.OffVariant:
				return 'UI-MappinTypes-Off-Description';
			case gamedataMappinVariant.UseVariant:
				return 'UI-MappinTypes-Use-Description';
			case gamedataMappinVariant.PhoneCallVariant:
				return 'UI-MappinTypes-PhoneCall-Description';
			case gamedataMappinVariant.FailedCrossingVariant:
				return 'UI-MappinTypes-FailedCrossingDescription';
			case gamedataMappinVariant.TarotVariant:
				return 'UI-MappinTypes-TarotDescription';
			case gamedataMappinVariant.Zzz12_WorldEncounterVariant:
				return 'UI-MappinTypes-WorldEncounterDescription';
			case gamedataMappinVariant.Zzz13_DogtownGateVariant:
				return 'UI-MappinTypes-DogtownGateDescription';
			case gamedataMappinVariant.Zzz16_RelicDeviceBasicVariant:
				return 'Gameplay-Devices-LocalizedDescription-CorePerkDeviceDescription';
			case gamedataMappinVariant.Zzz16_RelicDeviceSpecialVariant:
				return 'Gameplay-Devices-LocalizedDescription-PerkDeviceDescription';
			case gamedataMappinVariant.Zzz17_NCARTVariant:
				return 'UI-Ncart-ncart_mappin_desc';
		}
		return 'UI-MappinTypes-UNKNOWN';
	}

	public static function MappinToObjectiveString( mappinVariant : gamedataMappinVariant ) : CName
	{
		switch( mappinVariant )
		{
			case gamedataMappinVariant.GangWatchVariant:
				return 'UI-MappinTypes-GangWatchObjective';
			case gamedataMappinVariant.OutpostVariant:
				return 'UI-MappinTypes-OutpostObjective';
			case gamedataMappinVariant.ResourceVariant:
				return 'UI-MappinTypes-ResourceObjective';
			case gamedataMappinVariant.HiddenStashVariant:
				return 'UI-MappinTypes-HiddenStashObjective';
			case gamedataMappinVariant.HuntForPsychoVariant:
				return 'UI-MappinTypes-HuntforPsychoObjective';
			case gamedataMappinVariant.SmugglersDenVariant:
				return 'UI-MappinTypes-SmugglersDenObjective';
			case gamedataMappinVariant.FailedCrossingVariant:
				return 'UI-MappinTypes-FailedCrossingObjective';
			case gamedataMappinVariant.CustomPositionVariant:
				return 'UI-MappinTypes-DynamicEventObjective';
			case gamedataMappinVariant.TarotVariant:
				return 'UI-MappinTypes-TarotObjective';
		}
		return 'UI-MappinTypes-UNKNOWN';
	}

	public static function PlayPreventionBlinkAnimation( widget : weak< inkWidget >, out initialState : CName ) : inkAnimProxy
	{
		var engineTime : Float;
		var engineTimeInt : Int32;
		var timeDelay : Float;
		var animDef : inkAnimDef;
		var animInterp : inkAnimPadding;
		var animOptions : inkAnimOptions;
		engineTime = EngineTime.ToFloat( GetEngineTime() );
		engineTimeInt = ( ( Int32 )( engineTime ) );
		timeDelay = 1.0 - ( engineTime - ( ( Float )( engineTimeInt ) ) );
		if( timeDelay > 0.5 )
		{
			timeDelay -= 0.5;
			initialState = 'Prevention_Blue';
		}
		else
		{
			initialState = 'Prevention_Red';
		}
		animDef = new inkAnimDef;
		animInterp = new inkAnimPadding;
		animInterp.SetDuration( 0.5 );
		animDef.AddInterpolator( animInterp );
		animOptions.loopType = inkanimLoopType.Cycle;
		animOptions.loopInfinite = true;
		animOptions.executionDelay = timeDelay;
		return widget.PlayAnimationWithOptions( animDef, animOptions );
	}

	public static function CyclePreventionState( out state : CName )
	{
		state = ( ( state == 'Prevention_Red' ) ? ( 'Prevention_Blue' ) : ( 'Prevention_Red' ) );
	}

}

