#Conditional Hooks
$Application: FS2_Open

$On Game Init:
[
    ba.print("Hello World")
    require "droneWeapon"
    require "spawnShips"
    require "laserArray"
	require "Util.lua"
]

$Weapon Class: Drone Deploy.
$On Weapon Delete: [ droneWeaponSpawn(hv.Weapon) ]

$Weapon Class: lokiSpawn.
$On Weapon Delete: [ lokiWeaponSpawn(hv.Weapon) ]

$Weapon Class: Turret Deploy.
$On Weapon Delete: [ spawnWatchdog(hv.Weapon) ]

$Weapon Class: Turret Deploy Jump.
$On Weapon Delete: [ spawnWatchdogJump(hv.Weapon) ]

$Weapon Class: Subach HL-7 Drone
$On Weapon Fired: [ damageDrone(hv.User) ]

$On Death: [ spawnSwarm(hv.Self) ]

$Mission: Testmission.fs2
$On Gameplay Start: [
	switchBatteryScript(true)

	initializeArray()
	local localArray = {"Breaker Battery","Breaker 1",}
	handleNameArray(1,localArray)

	localArray = {"Swarmer Battery","Swarmer 1",}
	handleNameArray(2,localArray)
]

$Mission: Testmission.fs2
$On Mission End: [
	targetArray(0)
	switchBatteryScript(false)
]

$On HUD Draw:
[
	if hu.HUDDrawn then
		drawBasicBatteryHUD(2,10,10,10)
	end
]

$Keypress: 1
$On Key Pressed: [
	targetArray(1)
]
$Keypress: 2
$On Key Pressed: [
	targetArray(2)
]
$Keypress: 3
$On Key Pressed: [
	targetArray(3)
]

$Keypress: 0
$On Key Pressed: [
	--targetArray(0)
]

$Action: Communications Menu
$On Action: [ switchCommandScript() ] 

#End
