-------------------------------------------------------------------------------
-- counts the total number of ships in a player's fleet
--
function Player_NumberOfShips(iPlayer)
local iRace = Player_GetRace(iPlayer) + 1
local ShipCount = 0
dofilepath([[data:scripts/race.lua]])
dofilepath([[data:scripts/building and research/]] .. races[iRace][1] .. [[/build.lua]])
for i, iCount in build do
if (iCount.Type ~= 1) then
ShipCount = ShipCount + Player_GetNumberOfSquadronsOfTypeAwakeOrSleeping(iPlayer, iCount.ThingToBuild)
end
end
return ShipCount
end