mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-04 04:30:21 +00:00
expanding Container functionality to include Fit tests; handling LootItemMessage packets
This commit is contained in:
parent
0590b575d0
commit
65c8de0790
4 changed files with 192 additions and 116 deletions
|
|
@ -18,8 +18,6 @@ class LockerContainer extends Equipment with Container {
|
|||
|
||||
def VisibleSlots : Set[Int] = Set.empty[Int]
|
||||
|
||||
def Fit(obj : Equipment) : Option[Int] = inventory.Fit(obj.Definition.Tile)
|
||||
|
||||
def Definition : EquipmentDefinition = GlobalDefinitions.locker_container
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class Player(private val core : Avatar) extends PlanetSideGameObject with Factio
|
|||
|
||||
def Locker : LockerContainer = core.Locker
|
||||
|
||||
def Fit(obj : Equipment) : Option[Int] = {
|
||||
override def Fit(obj : Equipment) : Option[Int] = {
|
||||
recursiveHolsterFit(holsters.iterator, obj.Size) match {
|
||||
case Some(index) =>
|
||||
Some(index)
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ trait Container {
|
|||
*/
|
||||
def Find(guid : PlanetSideGUID) : Option[Int] = Inventory.Find(guid)
|
||||
|
||||
def Fit(obj : Equipment) : Option[Int] = Fit(obj.Definition.Tile)
|
||||
|
||||
def Fit(tile : InventoryTile) : Option[Int] = Inventory.Fit(tile)
|
||||
|
||||
/**
|
||||
* A(n imperfect) reference to a generalized pool of the contained objects.<br>
|
||||
* <br>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue