enum ScannerNetworkState
{
	NOT_CONNECTED = 0,
	NOT_BREACHED = 1,
	TIER1 = 2,
	TIER2 = 3,
	TIER3 = 4,
	BREACHED = 5,
}

enum ScannerObjectType
{
	INVALID = 0,
	PUPPET = 1,
	VEHICLE = 2,
	DEVICE = 3,
	GENERIC = 4,
}

enum ScannerDataType
{
	None = 0,
	Name = 1,
	Level = 2,
	Health = 3,
	Rarity = 4,
	WeaponBasic = 5,
	WeaponDetailed = 6,
	BountySystem = 7,
	Vulnerabilities = 8,
	Faction = 9,
	Attitude = 10,
	SquadInfo = 11,
	Resistances = 12,
	Abilities = 13,
	Requirements = 14,
	Description = 15,
	DeviceStatus = 16,
	NetworkStatus = 17,
	NetworkLevel = 18,
	DeviceConnections = 19,
	QuestEntry = 20,
	VehicleName = 21,
	VehicleManufacturer = 22,
	VehicleProductionYears = 23,
	VehicleDriveLayout = 24,
	VehicleHorsepower = 25,
	VehicleMass = 26,
	VehicleState = 27,
	VehicleInfo = 28,
	QuickHackDescription = 29,
}

struct scannerQuestEntry
{
	var categoryName : CName;
	var entryName : CName;
	var recordID : TweakDBID;
}

struct scannerDataStructure
{
	var entityName : String;
	var quickHackName : String;
	var quickHackDesc : String;
	var questEntries : array< scannerQuestEntry >;
	var empty : Bool;
	default empty = false;
}

struct ScannerStatDetails
{
	var statType : gamedataStatType;
	var value : Float;
	var baseValue : Float;
}

class ScannerChunk extends IScriptable
{

	public virtual function GetType() : ScannerDataType
	{
		return ScannerDataType.None;
	}

	public const virtual function IsValid() : Bool
	{
		return true;
	}

}

struct BountyUI
{
	var issuedBy : String;
	var moneyReward : Int32;
	var streetCredReward : Int32;
	var transgressions : array< String >;
	var hasAccess : Bool;
	var level : Int32;

	public static function AddTransgression( self : BountyUI, const transgression : ref< String > )
	{
		self.transgressions.PushBack( transgression );
	}

}

class ScannerBountySystem extends ScannerChunk
{
	private var bounty : BountyUI;

	public const function GetBounty() : BountyUI
	{
		return bounty;
	}

	public function Set( const b : ref< BountyUI > )
	{
		bounty = b;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.BountySystem;
	}

}

class ScannerName extends ScannerChunk
{
	private var displayName : String;
	default displayName = "LocKey#42211";
	private var hasArchetype : Bool;
	private var textParams : inkTextParams;

	public const function GetDisplayName() : String
	{
		return displayName;
	}

	public const function GetTextParams() : inkTextParams
	{
		return textParams;
	}

	public function Set( const _displayName : ref< String > )
	{
		displayName = _displayName;
	}

	public function SetTextParams( _params : inkTextParams )
	{
		textParams = _params;
	}

	public function SetArchetype( has : Bool )
	{
		hasArchetype = has;
	}

	public function HasArchetype() : Bool
	{
		return hasArchetype;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Name;
	}

}

class ScannerLevel extends ScannerChunk
{
	private var level : Int32;
	private var isHard : Bool;

	public const function GetLevel() : Int32
	{
		return level;
	}

	public const function GetIndicator() : Bool
	{
		return isHard;
	}

	public function Set( value : Int32 )
	{
		level = value;
	}

	public function SetIndicator( value : Bool )
	{
		isHard = value;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Level;
	}

}

class ScannerRarity extends ScannerChunk
{
	private var rarity : gamedataNPCRarity;
	private var isCivilian : Bool;

	public const function GetRarity() : gamedataNPCRarity
	{
		return rarity;
	}

	public const function IsCivilian() : Bool
	{
		return isCivilian;
	}

	public function Set( r : gamedataNPCRarity, civilian : Bool )
	{
		rarity = r;
		isCivilian = civilian;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Rarity;
	}

}

class ScannerArchetype extends ScannerChunk
{
	private var archetype : gamedataArchetypeType;

	public const function GetArchtype() : gamedataArchetypeType
	{
		return archetype;
	}

	public function Set( a : gamedataArchetypeType )
	{
		archetype = a;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Rarity;
	}

}

class ScannerWeaponBasic extends ScannerChunk
{
	protected var weapon : CName;

	public const function GetWeapon() : CName
	{
		return weapon;
	}

	public function Set( displayName : CName )
	{
		weapon = displayName;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.WeaponBasic;
	}

}

class ScannerWeaponDetailed extends ScannerWeaponBasic
{
	private var damage : CName;

	public const function GetDamage() : CName
	{
		return damage;
	}

	public function Set( displayName, displayDamage : CName )
	{
		weapon = displayName;
		damage = displayDamage;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.WeaponDetailed;
	}

}

class ScannerHealth extends ScannerChunk
{
	private var currentHealth : Int32;
	private var totalHealth : Int32;

	public const function GetCurrentHealth() : Int32
	{
		return currentHealth;
	}

	public const function GetTotalHealth() : Int32
	{
		return totalHealth;
	}

	public function Set( current, total : Int32 )
	{
		currentHealth = current;
		totalHealth = total;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Health;
	}

}

struct Vulnerability
{
	var vulnerabilityName : CName;
	var icon : TweakDBID;
	var isActive : Bool;
}

struct NPCAbility
{
	var abilityName : String;
}

class ScannerVulnerabilities extends ScannerChunk
{
	private var vulnerabilities : array< Vulnerability >;

	public const function GetVulnerabilities() : array< Vulnerability >
	{
		return vulnerabilities;
	}

	public const override function IsValid() : Bool
	{
		return vulnerabilities.Size() > 0;
	}

	public function Set( const vuln : ref< array< Vulnerability > > )
	{
		vulnerabilities = vuln;
	}

	public function PushBack( vuln : Vulnerability )
	{
		vulnerabilities.PushBack( vuln );
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Vulnerabilities;
	}

}

class ScannerFaction extends ScannerChunk
{
	var faction : String;

	public const function GetFaction() : String
	{
		return faction;
	}

	public function Set( const f : ref< String > )
	{
		faction = f;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Faction;
	}

}

class ScannerSquadInfo extends ScannerChunk
{
	var numberOfSquadMembers : Int32;

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.SquadInfo;
	}

}

class ScannerResistances extends ScannerChunk
{
	var resists : array< ScannerStatDetails >;

	public const function GetResistances() : array< ScannerStatDetails >
	{
		return resists;
	}

	public function Set( const r : ref< array< ScannerStatDetails > > )
	{
		resists = r;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Resistances;
	}

}

class ScannerAbilities extends ScannerChunk
{
	var abilities : array< weak< GameplayAbility_Record > >;

	public const function GetAbilities() : array< weak< GameplayAbility_Record > >
	{
		return abilities;
	}

	public function Set( const a : ref< array< weak< GameplayAbility_Record > > > )
	{
		abilities = a;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Abilities;
	}

}

class ScannerAttitude extends ScannerChunk
{
	private var attitude : EAIAttitude;

	public const function GetAttitude() : EAIAttitude
	{
		return attitude;
	}

	public function Set( att : EAIAttitude )
	{
		attitude = att;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Attitude;
	}

}

class ScannerDeviceStatus extends ScannerChunk
{
	private var deviceStatus : String;
	private var deviceStatusFriendlyName : String;

	public const function GetDeviceStatus() : String
	{
		return deviceStatus;
	}

	public const function GetDeviceStatusFriendlyName() : String
	{
		return deviceStatusFriendlyName;
	}

	public function Set( const status : ref< String > )
	{
		deviceStatus = status;
	}

	public function SetFriendlyName( const status : ref< String > )
	{
		deviceStatusFriendlyName = status;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.DeviceStatus;
	}

}

class ScannerNetworkLevel extends ScannerChunk
{
	private var networkLevel : Int32;

	public const function GetNetworkLevel() : Int32
	{
		return networkLevel;
	}

	public function Set( level : Int32 )
	{
		networkLevel = level;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.NetworkLevel;
	}

}

class ScannerNetworkStatus extends ScannerChunk
{
	private var networkStatus : ScannerNetworkState;

	public const function GetNetworkStatus() : ScannerNetworkState
	{
		return networkStatus;
	}

	public function Set( status : ScannerNetworkState )
	{
		networkStatus = status;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.NetworkStatus;
	}

}

class ScannerAuthorization extends ScannerChunk
{
	private var keycard : Bool;
	private var password : Bool;

	public const function ProtectedByKeycard() : Bool
	{
		return keycard;
	}

	public const function ProtectedByPassword() : Bool
	{
		return password;
	}

	public function Set( key : Bool, pass : Bool )
	{
		keycard = key;
		password = pass;
	}

}

class ScannerDescription extends ScannerChunk
{
	private var defaultFluffDescription : String;
	private var customDescriptions : array< String >;

	public const function GetDefaultDescription() : String
	{
		return defaultFluffDescription;
	}

	public const function GetCustomDescriptions() : array< String >
	{
		return customDescriptions;
	}

	public function Set( const defaultDesc : ref< String >, optional customDesc : array< String > )
	{
		defaultFluffDescription = defaultDesc;
		if( customDesc.Size() > 0 )
		{
			customDescriptions = customDesc;
		}
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Description;
	}

}

class ScannerSkillchecks extends ScannerChunk
{
	private var skillchecks : array< UIInteractionSkillCheck >;
	private var authorizationRequired : Bool;
	private var isPlayerAuthorized : Bool;

	public const function GetSkillchecks() : array< UIInteractionSkillCheck >
	{
		return skillchecks;
	}

	public const function GetAuthorization() : Bool
	{
		return authorizationRequired;
	}

	public const function GetPlayerAuthorization() : Bool
	{
		return isPlayerAuthorized;
	}

	public function Set( const sklchs : ref< array< UIInteractionSkillCheck > > )
	{
		skillchecks = sklchs;
	}

	public function SetAuthorization( auth : Bool )
	{
		authorizationRequired = auth;
	}

	public function SetPlayerAuthorization( auth : Bool )
	{
		isPlayerAuthorized = auth;
	}

	public const override function IsValid() : Bool
	{
		return skillchecks.Size() > 0;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.Requirements;
	}

}

struct DeviceConnectionScannerData
{
	var connectionType : String;
	var icon : CName;
	var amount : Int32;
}

class ScannerConnections extends ScannerChunk
{
	private var deviceConnections : array< DeviceConnectionScannerData >;

	public const function GetConnections() : array< DeviceConnectionScannerData >
	{
		return deviceConnections;
	}

	public const override function IsValid() : Bool
	{
		return deviceConnections.Size() > 0;
	}

	public function Set( const connections : ref< array< DeviceConnectionScannerData > > )
	{
		deviceConnections = connections;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.DeviceConnections;
	}

}

class ScannerVehicleName extends ScannerChunk
{
	private var vehicleName : String;

	public const function GetDisplayName() : String
	{
		return vehicleName;
	}

	public function Set( const vehName : ref< String > )
	{
		vehicleName = vehName;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleName;
	}

}

class ScannerVehicleManufacturer extends ScannerChunk
{
	private var vehicleManufacturer : String;

	public const function GetVehicleManufacturer() : String
	{
		return vehicleManufacturer;
	}

	public function Set( const vehManName : ref< String > )
	{
		vehicleManufacturer = vehManName;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleManufacturer;
	}

}

class ScannerVehicleProdYears extends ScannerChunk
{
	private var vehicleProdYears : String;

	public const function GetProdYears() : String
	{
		return vehicleProdYears;
	}

	public function Set( const vehProdYears : ref< String > )
	{
		vehicleProdYears = vehProdYears;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleProductionYears;
	}

}

class ScannerVehicleDriveLayout extends ScannerChunk
{
	private var vehicleDriveLayout : String;

	public const function GetDriveLayout() : String
	{
		return vehicleDriveLayout;
	}

	public function Set( const vehDriveLayout : ref< String > )
	{
		vehicleDriveLayout = vehDriveLayout;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleDriveLayout;
	}

}

class ScannerVehicleHorsepower extends ScannerChunk
{
	private var horsepower : Int32;

	public const function GetHorsepower() : Int32
	{
		return horsepower;
	}

	public const override function IsValid() : Bool
	{
		return horsepower > 0;
	}

	public function Set( hp : Int32 )
	{
		horsepower = hp;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleHorsepower;
	}

}

class ScannerVehicleMass extends ScannerChunk
{
	private var mass : Int32;

	public const function GetMass() : Int32
	{
		return mass;
	}

	public const override function IsValid() : Bool
	{
		return mass > 0;
	}

	public function Set( vehMass : Int32 )
	{
		mass = vehMass;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleMass;
	}

}

class ScannerVehicleState extends ScannerChunk
{
	private var vehicleState : String;

	public const function GetVehicleState() : String
	{
		return vehicleState;
	}

	public function Set( const vehState : ref< String > )
	{
		vehicleState = vehState;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleState;
	}

}

class ScannerVehicleInfo extends ScannerChunk
{
	private var vehicleInfo : String;

	public const function GetVehicleInfo() : String
	{
		return vehicleInfo;
	}

	public function Set( const vehInfo : ref< String > )
	{
		vehicleInfo = vehInfo;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.VehicleInfo;
	}

}

class ScannerQuickHackDescription extends ScannerChunk
{
	private var QuickHackDescription : QuickhackData;

	public const function GetCurrrentQuickHackData() : QuickhackData
	{
		return QuickHackDescription;
	}

	public function Set( vehInfo : QuickhackData )
	{
		QuickHackDescription = vehInfo;
	}

	public override function GetType() : ScannerDataType
	{
		return ScannerDataType.QuickHackDescription;
	}

}

