DevelopmentsLib
extends XGPCore
in package
DevelopmentsLib Class
Table of Contents
- $lang : mixed
- $objects : mixed
- __construct() : void
- __construct
- areFieldsAvailable() : bool
- Check if there are any fields available
- currentBuilding() : string
- currentBuilding
- developmentPrice() : void
- Get the development price
- developmentTime() : int
- developmentTime
- formatedDevelopmentPrice() : string
- formatedDevelopmentPrice
- formatedDevelopmentTime() : string
- formatedDevelopmentTime
- getTemplate() : Template
- Return a new instance of Template
- isDevelopmentAllowed() : bool
- isDevelopmentAllowed
- isDevelopmentPayable() : bool
- isDevelopmentPayable
- isLabWorking() : bool
- isLabWorking
- isShipyardWorking() : bool
- isShipyardWorking
- maxFields() : void
- maxFields
- setBuildingPage() : string
- setBuildingPage
- setLevelFormat() : void
- setLevelFormat
- tearDownTime() : float
- Calculate tear down time
- loadLang() : void
- Load a language file using CI Library
- setObjectsClass() : void
- setObjectsClass
Properties
$lang
protected
static mixed
$lang
$objects
protected
static mixed
$objects
Methods
__construct()
__construct
public
__construct() : void
Return values
void —areFieldsAvailable()
Check if there are any fields available
public
static areFieldsAvailable(type $current_planet) : bool
Parameters
- $current_planet : type
Return values
bool —currentBuilding()
currentBuilding
public
static currentBuilding(string $call_program, mixed $lang, int $element_id) : string
Parameters
- $call_program : string
-
Call program
- $lang : mixed
- $element_id : int
-
Element ID
Return values
string —developmentPrice()
Get the development price
public
static developmentPrice(array<string|int, mixed> $current_user, array<string|int, mixed> $current_planet, int $element[, bool $incremental = true ][, bool $destroy = false ]) : void
Parameters
- $current_user : array<string|int, mixed>
- $current_planet : array<string|int, mixed>
- $element : int
- $incremental : bool = true
- $destroy : bool = false
Return values
void —developmentTime()
developmentTime
public
static developmentTime(array<string|int, mixed> $current_user, array<string|int, mixed> $current_planet, string $element[, bool $level = false ], int $total_lab_level) : int
Parameters
- $current_user : array<string|int, mixed>
-
Current user
- $current_planet : array<string|int, mixed>
-
Current planet
- $element : string
-
Element
- $level : bool = false
-
Level
- $total_lab_level : int
-
Total lab level
Return values
int —formatedDevelopmentPrice()
formatedDevelopmentPrice
public
static formatedDevelopmentPrice(array<string|int, mixed> $current_user, array<string|int, mixed> $current_planet, string $element, mixed $lang[, bool $userfactor = true ][, bool $level = false ]) : string
Parameters
- $current_user : array<string|int, mixed>
-
Current user
- $current_planet : array<string|int, mixed>
-
Current planet
- $element : string
-
Element
- $lang : mixed
- $userfactor : bool = true
-
User factor
- $level : bool = false
-
Level
Return values
string —formatedDevelopmentTime()
formatedDevelopmentTime
public
static formatedDevelopmentTime(int $time, mixed $lang_line) : string
Parameters
- $time : int
-
Time
- $lang_line : mixed
Return values
string —getTemplate()
Return a new instance of Template
public
static getTemplate() : Template
Return values
Template —isDevelopmentAllowed()
isDevelopmentAllowed
public
static isDevelopmentAllowed(array<string|int, mixed> $current_user, array<string|int, mixed> $current_planet, string $element) : bool
Parameters
- $current_user : array<string|int, mixed>
-
Current user
- $current_planet : array<string|int, mixed>
-
Current planet
- $element : string
-
Element
Return values
bool —isDevelopmentPayable()
isDevelopmentPayable
public
static isDevelopmentPayable(array<string|int, mixed> $current_user, array<string|int, mixed> $current_planet, string $element[, bool $incremental = true ][, bool $destroy = false ]) : bool
Parameters
- $current_user : array<string|int, mixed>
-
Current user
- $current_planet : array<string|int, mixed>
-
Current planet
- $element : string
-
Element
- $incremental : bool = true
-
Incremental
- $destroy : bool = false
-
Destroy
Return values
bool —isLabWorking()
isLabWorking
public
static isLabWorking(array<string|int, mixed> $current_user) : bool
Parameters
- $current_user : array<string|int, mixed>
-
Current user
Return values
bool —isShipyardWorking()
isShipyardWorking
public
static isShipyardWorking(array<string|int, mixed> $current_planet) : bool
Parameters
- $current_planet : array<string|int, mixed>
-
Current planet
Return values
bool —maxFields()
maxFields
public
static maxFields(array<string|int, mixed> $current_planet) : void
Parameters
- $current_planet : array<string|int, mixed>
-
Current planet
Return values
void —setBuildingPage()
setBuildingPage
public
static setBuildingPage(int $element) : string
Parameters
- $element : int
-
Element
Return values
string —setLevelFormat()
setLevelFormat
public
static setLevelFormat(int $level, mixed $lang[, string $element = '' ][, string $current_user = '' ]) : void
Parameters
- $level : int
-
Level
- $lang : mixed
- $element : string = ''
-
Element
- $current_user : string = ''
-
Current user
Return values
void —tearDownTime()
Calculate tear down time
public
static tearDownTime(int $building, int $robotics_factory, int $nanite_factory, int $level) : float
Parameters
- $building : int
- $robotics_factory : int
- $nanite_factory : int
- $level : int
Return values
float —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 —setObjectsClass()
setObjectsClass
private
setObjectsClass() : void