12. Fleet-related functions (unlocalised.php)
This section will explain the functions associated with the fleet dispatch and continue to be annotated; As the functions involved are more numerous, it will take a lot of time to digest.
-------------------------------------------------------------------///Below is a list of functions to be used by the fleet dispatch/////------------------ -------------------------------------------------//Compute the distance between two planets function Gettargetdistance ($OrigGalaxy, $ Destgalaxy, $OrigSystem, $DestSystem, $OrigPlanet, $DestPlanet)//Calculate the time required for the fleet to reach the specified distance, consider the server's speed setting function
Getmissionduration ($GameSpeed, $MaxFleetSpeed, $Distance, $SpeedFactor)//Get the game set after the fleet Speed function Getgamespeedfactor () Calculate the maximum speed of the fleet function Getfleetmaxspeed ($FleetArray, $Fleet, $Player)//compute the HH consumption function getshipconsumption of a single ship species ($Ship,
$Player)//Compute the fleet's HH consumption, here is the actual HH consumption, passed a lot of parameter function getfleetconsumption ($FleetArray, $SpeedFactor, $MissionDuration, $MissionDistance, $FleetMaxSpeed, $Player)//-------------------------------------------------------------------/
///Below is a list of formatted display functions for strings////-------------------------------------------------------------------//Formatting time, in the form of: Xxd xxh XXM function Pretty_time ($seconds)//format minutes, in the form of: Xxmin function Pretty_time_hOur ($seconds)//build time format, preceded by a description of function showbuildtime ($time)//orphaned functions, not called function add_points ($resources, $userid)//Isolate function, not called function remove_points ($resources, $userid)//orphaned functions, no called function get_userdata ()//------------------------- ------------------------------------------////The following is a list of read/write/Use functions for template files////------------------------------------------ -------------------------//Read file content by filename function readfromfile ($filename)//orphaned function, not called function SaveToFile ($filename, $content)//Earlier, replace the function parsetemplate ($template, $array) with $array value and/or, that is, to obtain the content function GetTemplate of the specified template file ($ templatename)//Include different language file function Includelang ($filename, $ext = '. Mo ')//--------------------------------------- ----------------------------////Below is a list of Fleet link class functions////--------------------------------------------------------------- ----//construction of a fleet-starting Planet Star map hyperlink function Getstartadresslink ($FleetRow, $FleetType)//construction of a fleet Destination Planet map Hyperlink function Gettargetadres Slink ($FleetRow, $FleetType)//construct a star of a designated planetFigure Hyperlink Function Buildplanetadresslink ($CurrentPlanet)//construct a send message to the attacker to the hyperlink function Buildhostilefleetplayerlink ($Fleet ROW)//Get the next month gate Opening time function Getnextjumpwaittime ($CurMoon)//Construct an Attack Fleet detail list function Createfleetpopupedfleetlink ($Fle Etrow, $Texte, $FleetType)//construct a detailed list of returned fleets, including resource function Createfleetpopupedmissionlink ($FleetRow, $Texte, $ Fleettype)