Transport
extends Missions
in package
Transport Class
Table of Contents
- $combat_caps : mixed
- $lang : mixed
- $missionsModel : Missions
- Contains the model
- $objects : mixed
- $pricelist : mixed
- $resource : mixed
- __construct() : void
- Constructor
- transportMission() : void
- Transport mission - deliver resources between planets
- canCompleteMission() : bool
- Check if the mission can be completed
- canStartMission() : bool
- Check if the mission can be started
- loadLang() : void
- Load a language file using CI Library
- makeUpdate() : void
- Update planet resources, ships, and queues
- removeFleet() : void
- removeFleet
- restoreFleet() : void
- restoreFleet
- returnFleet() : void
- returnFleet
- storeResources() : void
- storeResources
- getTradingPlanetsData() : array<string|int, mixed>
- Get data for the planets that are trading resources
- sendDeliveryMessageToOwner() : void
- Send a delivery message to the fleet owner
- sendDeliveryMessageToReceiver() : void
- Send a delivery message to the receiver, only if the target planet is not a planet from the same user
- sendReturnMessage() : void
- Send a message informing that the fleet is back
- setObjectsClass() : void
- setObjectsClass
Properties
$combat_caps
protected
mixed
$combat_caps
$lang
protected
static mixed
$lang
$missionsModel
Contains the model
protected
Missions
$missionsModel
$objects
protected
static mixed
$objects
$pricelist
protected
mixed
$pricelist
$resource
protected
mixed
$resource
Methods
__construct()
Constructor
public
__construct() : void
Return values
void —transportMission()
Transport mission - deliver resources between planets
public
transportMission(array<string|int, mixed> $fleet) : void
Parameters
- $fleet : array<string|int, mixed>
Return values
void —canCompleteMission()
Check if the mission can be completed
protected
canCompleteMission(array<string|int, mixed> $fleet) : bool
Parameters
- $fleet : array<string|int, mixed>
Return values
bool —canStartMission()
Check if the mission can be started
protected
canStartMission(array<string|int, mixed> $fleet) : bool
Parameters
- $fleet : array<string|int, mixed>
Return values
bool —loadLang()
Load a language file using CI Library
protected
loadLang(string|array<string|int, mixed> $language_file) : void
Parameters
- $language_file : string|array<string|int, mixed>
Return values
void —makeUpdate()
Update planet resources, ships, and queues
protected
makeUpdate(int $galaxy, int $system, int $planet, int $type) : void
Parameters
- $galaxy : int
-
Galaxy
- $system : int
-
System
- $planet : int
-
Planet
- $type : int
-
Planet Type
Return values
void —removeFleet()
removeFleet
protected
removeFleet(int $fleet_id) : void
Parameters
- $fleet_id : int
-
Fleed ID
Return values
void —restoreFleet()
restoreFleet
protected
restoreFleet(array<string|int, mixed> $fleet_row[, bool $start = true ]) : void
Parameters
- $fleet_row : array<string|int, mixed>
-
Fleet row
- $start : bool = true
-
Start
Return values
void —returnFleet()
returnFleet
protected
returnFleet(int $fleet_id) : void
Parameters
- $fleet_id : int
-
Fleed ID
Return values
void —storeResources()
storeResources
protected
storeResources(array<string|int, mixed> $fleet_row[, bool $start = false ]) : void
Parameters
- $fleet_row : array<string|int, mixed>
-
Fleet row
- $start : bool = false
-
Start
Return values
void —getTradingPlanetsData()
Get data for the planets that are trading resources
private
getTradingPlanetsData(array<string|int, mixed> $fleet) : array<string|int, mixed>
Parameters
- $fleet : array<string|int, mixed>
Return values
array<string|int, mixed> —sendDeliveryMessageToOwner()
Send a delivery message to the fleet owner
private
sendDeliveryMessageToOwner(array<string|int, mixed> $fleet, array<string|int, mixed> $trading_planets) : void
Parameters
- $fleet : array<string|int, mixed>
- $trading_planets : array<string|int, mixed>
Return values
void —sendDeliveryMessageToReceiver()
Send a delivery message to the receiver, only if the target planet is not a planet from the same user
private
sendDeliveryMessageToReceiver(array<string|int, mixed> $fleet, array<string|int, mixed> $trading_planets) : void
Parameters
- $fleet : array<string|int, mixed>
- $trading_planets : array<string|int, mixed>
Return values
void —sendReturnMessage()
Send a message informing that the fleet is back
private
sendReturnMessage(array<string|int, mixed> $fleet, array<string|int, mixed> $trading_planets) : void
Parameters
- $fleet : array<string|int, mixed>
- $trading_planets : array<string|int, mixed>
Return values
void —setObjectsClass()
setObjectsClass
private
setObjectsClass() : void