class DeployableToolbox extends AnyRef
A class that keeps track - "manages" - deployables that are owned by the avatar.
Deployables belong to the Engineering certification line of certifications.
CombatEngineering
and above certifications include permissions for different types of deployables,
and one unique type of deployable is available through the GroundSupport
and one that also requires AdvancedHacking
.
(They are collectively called "ce" for that reason.)
Not only does the level of certification change the maximum number of deployables that can be managed by type
but it also influences the maximum number of deployables that can be managed by category.
Individual deployables are counted by type and category individually in special data structures
to avoid having to probe the primary list of deployable references whenever a question of quantity is asked.
As deployables are added and removed, and tracked certifications are added and removed,
these structures are updated to reflect proper count.
For example, the greatest number of spitfire turrets that can be placed is 15 (individual count)
and the greatest number of shadow turrets and cerebus turrets that can be placed is 5 each (individual counts)
but the maximum number of small turrets that can be placed overall is only 15 (categorical count).
Spitfire turrets, shadow turrets, and cerebus turrets are all included in the category of small turrets.
- Source
- DeployableToolbox.scala
- Alphabetic
- By Inheritance
- DeployableToolbox
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DeployableToolbox()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def Accept(obj: AcceptableDeployable): Boolean
Determine if the given deployable can be managed by this toolbox.
Determine if the given deployable can be managed by this toolbox.
- obj
the deployable
- returns
true
, if it can be managed under the current conditions;false
, otherwise
- See also
Valid
Available
Contains
- def Add(obj: AcceptableDeployable): Boolean
Manage the provided deployable.
Although proper testing should be performed prior to attempting to add the deployable to this toolbox, three tests are administered to determine whether space is available prior to insertion.Manage the provided deployable.
Although proper testing should be performed prior to attempting to add the deployable to this toolbox, three tests are administered to determine whether space is available prior to insertion. The first two tests check for available space in the category count and in the unit count and the third test checks whether the deployable is already being managed by this toolbox. No changes should occur if the deployable is not properly added.- obj
the deployable
- returns
true
, if the deployable is added;false
, otherwise
- def AddOverLimit(obj: AcceptableDeployable): Boolean
Manage the provided deployable, the maximum number of governable units be damned.
Manage the provided deployable, the maximum number of governable units be damned. It still needs to be a unique unit of a governable deployable type, however.
- obj
the deployable
- returns
true
, if the deployable is added;false
, otherwise
- def Available(obj: AcceptableDeployable): Boolean
Determine if the given deployable can be managed by this toolbox by testing if the specific deployable list and the deployable category list have available slots.
Determine if the given deployable can be managed by this toolbox by testing if the specific deployable list and the deployable category list have available slots. In this case, a "slot" is merely the difference between the current count is less than the maximum count.
- obj
the deployable
- returns
true
, if the deployable can be added to the support lists and counted;false
, otherwise
- def Category(filter: ce.DeployableCategory.Value): List[PlanetSideGUID]
Reference all managed deployables in the same category.
Reference all managed deployables in the same category.
- filter
the type of deployable
- returns
a list of globally unique identifiers that should be valid for the current zone
- def Category(filter: AcceptableDeployable): List[PlanetSideGUID]
Reference all managed deployables in the same category as an example deployable.
Reference all managed deployables in the same category as an example deployable.
- filter
the example deployable
- returns
a list of globally unique identifiers that should be valid for the current zone
- def Clear(): List[PlanetSideGUID]
Remove all managed deployables.
Remove all managed deployables.
- returns
a list of globally unique identifiers that should be valid for the current zone
- def ClearCategory(item: ce.DeployedItem.Value): List[PlanetSideGUID]
Remove all managed deployables that belong to the same category.
Remove all managed deployables that belong to the same category.
- item
the deployable type belonging to a category
- returns
a list of globally unique identifiers that should be valid for the current zone
- def ClearDeployable(item: ce.DeployedItem.Value): List[PlanetSideGUID]
Remove all managed deployables that are the same type.
Remove all managed deployables that are the same type.
- item
the deployable type
- returns
a list of globally unique identifiers that should be valid for the current zone
- def Contains(obj: AcceptableDeployable): Boolean
Check if this deployable is already being managed by the toolbox by determining whether or not it is already being managed by this toolbox.
Check if this deployable is already being managed by the toolbox by determining whether or not it is already being managed by this toolbox.
- obj
the deployable
- returns
true
, if the deployable can be found in one of the lists;false
, otherwise
- def CountCategory(item: ce.DeployedItem.Value): (Int, Int)
Check the current capacity for the same category of deployable as the example.
Check the current capacity for the same category of deployable as the example.
- item
the example deployable
- returns
the current quantity of deployables and the maximum number
- def CountDeployable(item: ce.DeployedItem.Value): (Int, Int)
Check the current capacity for the same type of deployable as the example.
Check the current capacity for the same type of deployable as the example.
- item
the example deployable
- returns
the current quantity of deployables and the maximum number
- def Deployables(filter: ce.DeployedItem.Value): List[PlanetSideGUID]
Reference all managed deployables of the same type.
Reference all managed deployables of the same type.
- filter
the type of deployable
- returns
a list of globally unique identifiers that should be valid for the current zone
- def Deployables(filter: AcceptableDeployable): List[PlanetSideGUID]
Reference all managed deployables of the same type as an example deployable.
Reference all managed deployables of the same type as an example deployable.
- filter
the example deployable
- returns
a list of globally unique identifiers that should be valid for the current zone
- def DisplaceFirst(category: ce.DeployableCategory.Value): Option[AcceptableDeployable]
Remove the first managed deployable from a category.
Remove the first managed deployable from a category. The only test performed is whether there is any valid deployable managed for the category.
- category
the target category
- returns
any deployable that is found
- def DisplaceFirst(obj: AcceptableDeployable, rule: (Deployable) => Boolean): Option[AcceptableDeployable]
Remove the first managed deployable that satisfies a test and belongs to the same category as the example.
Remove the first managed deployable that satisfies a test and belongs to the same category as the example. The test in question is used to pinpoint the first qualifying deployable; but, if the test fails to find any valid targets, the first deployable in the list of managed deployables for that category is selected to be removed. The only test performed is whether there is any valid deployable managed for the category.
- obj
the example deployable
- rule
the testing rule for determining a valid deployable
- returns
any deployable that is found
- def DisplaceFirst(obj: AcceptableDeployable): Option[AcceptableDeployable]
Remove the first managed deployable that matches the same type of deployable as the example.
Remove the first managed deployable that matches the same type of deployable as the example. The explicit tests is defined to find the first deployable whose type matches.
- obj
the example deployable
- returns
any deployable that is found
- def Initialize(certifications: Set[Certification]): Boolean
Set up the initial deployable counts by providing certification values to be used in category and unit selection.
Set up the initial deployable counts by providing certification values to be used in category and unit selection.
- certifications
a group of certifications for the initial values
- returns
true
, if this is the first time and actual "initialization" is performed;false
, otherwise
- def Remove(obj: AcceptableDeployable): Boolean
Stop managing the provided deployable.
Although proper testing should be performed prior to attempting to remove the deployable to this toolbox, a single test is administered to determine whether the removal can take place.Stop managing the provided deployable.
Although proper testing should be performed prior to attempting to remove the deployable to this toolbox, a single test is administered to determine whether the removal can take place. If the deployable is found to currently being managed by this toolbox, then it is properly removed. No changes should occur if the deployable is not properly removed.- obj
the deployable
- returns
true
, if the deployable is removed;false
, otherwise
- def UpdateMaxCounts(certifications: Set[Certification]): Unit
- def UpdateUI(certifications: List[Certification]): List[(Int, Int, Int, Int)]
- def UpdateUI(entry: Certification): List[(Int, Int, Int, Int)]
- def UpdateUI(): List[(Int, Int, Int, Int)]
- def UpdateUIElement(entry: ce.DeployedItem.Value): List[(Int, Int, Int, Int)]
- def Valid(obj: AcceptableDeployable): Boolean
Determine if the given deployable can be managed by this toolbox by testing if the specific deployable maximum and the deployable category maximum is non-zero
Determine if the given deployable can be managed by this toolbox by testing if the specific deployable maximum and the deployable category maximum is non-zero
- obj
the deployable
- returns
true
, if both category maximum and deployable type maximum are positive non-zero integers;false
, otherwise
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()