mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-13 15:34:42 +00:00
Loadout Item Issues (#1172)
* issue where contents of inventory did not match loadout specifications of the exo-suit to which the player was switching * accidentally using the loadout change set armor in exo-suit change set armor; reverted
This commit is contained in:
parent
9ed39c6e2f
commit
34ac1e5266
4 changed files with 111 additions and 130 deletions
|
|
@ -350,6 +350,7 @@ class SessionAvatarHandlers(
|
||||||
sendResponse(ObjectDeleteMessage(objGuid, unk1=0))
|
sendResponse(ObjectDeleteMessage(objGuid, unk1=0))
|
||||||
TaskWorkflow.execute(GUIDTask.unregisterEquipment(continent.GUID, obj))
|
TaskWorkflow.execute(GUIDTask.unregisterEquipment(continent.GUID, obj))
|
||||||
}
|
}
|
||||||
|
drops.foreach(item => sendResponse(ObjectDeleteMessage(item.obj.GUID, unk1=0)))
|
||||||
//redraw
|
//redraw
|
||||||
if (maxhand) {
|
if (maxhand) {
|
||||||
TaskWorkflow.execute(HoldNewEquipmentUp(player)(
|
TaskWorkflow.execute(HoldNewEquipmentUp(player)(
|
||||||
|
|
|
||||||
|
|
@ -110,25 +110,34 @@ object Players {
|
||||||
* For any slots that are not yet occupied by an item, search through the `List` and find an item that fits in that slot.
|
* For any slots that are not yet occupied by an item, search through the `List` and find an item that fits in that slot.
|
||||||
* Add that item to the slot and remove it from the list.
|
* Add that item to the slot and remove it from the list.
|
||||||
* @param iter the `Iterator` of `EquipmentSlot`s
|
* @param iter the `Iterator` of `EquipmentSlot`s
|
||||||
* @param list a `List` of all `Equipment` that is not yet assigned to a holster slot or an inventory slot
|
* @param list a list of all `Equipment` not assigned to a new slot
|
||||||
* @return the `List` of all `Equipment` not yet assigned to a holster slot or an inventory slot
|
* @param slotNum current slot index associated with the value extracted from `iter` param
|
||||||
|
* @param placedList a list of all `Equipment` reassigned to a slot
|
||||||
|
* @return two lists:
|
||||||
|
* all `Equipment` reassigned to a slot, and
|
||||||
|
* all `Equipment` not assigned to a new slot
|
||||||
*/
|
*/
|
||||||
@tailrec def fillEmptyHolsters(iter: Iterator[EquipmentSlot], list: List[InventoryItem]): List[InventoryItem] = {
|
@tailrec def fillEmptyHolsters(
|
||||||
|
iter: Iterator[EquipmentSlot],
|
||||||
|
list: List[InventoryItem],
|
||||||
|
slotNum: Int = 0,
|
||||||
|
placedList: List[InventoryItem] = Nil
|
||||||
|
): (List[InventoryItem], List[InventoryItem]) = {
|
||||||
if (!iter.hasNext) {
|
if (!iter.hasNext) {
|
||||||
list
|
(placedList, list)
|
||||||
} else {
|
} else {
|
||||||
val slot = iter.next()
|
val slot = iter.next()
|
||||||
if (slot.Equipment.isEmpty) {
|
if (slot.Equipment.isEmpty) {
|
||||||
list.find(item => item.obj.Size == slot.Size) match {
|
list.indexWhere(item => item.obj.Size == slot.Size) match {
|
||||||
case Some(obj) =>
|
case -1 =>
|
||||||
val index = list.indexOf(obj)
|
fillEmptyHolsters(iter, list, slotNum + 1, placedList)
|
||||||
slot.Equipment = obj.obj
|
case index =>
|
||||||
fillEmptyHolsters(iter, list.take(index) ++ list.drop(index + 1))
|
val entry = list(index)
|
||||||
case None =>
|
entry.start = slotNum
|
||||||
fillEmptyHolsters(iter, list)
|
fillEmptyHolsters(iter, list.take(index) ++ list.drop(index + 1), slotNum + 1, placedList :+ entry)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fillEmptyHolsters(iter, list)
|
fillEmptyHolsters(iter, list, slotNum + 1, placedList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -381,26 +381,8 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
log.info(s"${player.Name} wants to change equipment loadout to their option #${msg.unk1 + 1}")
|
log.info(s"${player.Name} wants to change equipment loadout to their option #${msg.unk1 + 1}")
|
||||||
val originalSuit = player.ExoSuit
|
val originalSuit = player.ExoSuit
|
||||||
val originalSubtype = Loadout.DetermineSubtype(player)
|
val originalSubtype = Loadout.DetermineSubtype(player)
|
||||||
//sanitize exo-suit for change
|
|
||||||
val dropPred = ContainableBehavior.DropPredicate(player)
|
val dropPred = ContainableBehavior.DropPredicate(player)
|
||||||
val oldHolsters = Players.clearHolsters(player.Holsters().iterator)
|
//determine player's next exo-suit
|
||||||
val dropHolsters = oldHolsters.filter(dropPred)
|
|
||||||
val oldInventory = player.Inventory.Clear()
|
|
||||||
val dropInventory = oldInventory.filter(dropPred)
|
|
||||||
val toDeleteOrDrop : List[InventoryItem] = (player.FreeHand.Equipment match {
|
|
||||||
case Some(obj) =>
|
|
||||||
val out = InventoryItem(obj, -1)
|
|
||||||
player.FreeHand.Equipment = None
|
|
||||||
if (dropPred(out)) {
|
|
||||||
List(out)
|
|
||||||
} else {
|
|
||||||
Nil
|
|
||||||
}
|
|
||||||
case _ =>
|
|
||||||
Nil
|
|
||||||
}) ++ dropHolsters ++ dropInventory
|
|
||||||
//a loadout with a prohibited exo-suit type will result in the fallback exo-suit type
|
|
||||||
//imposed 5min delay on mechanized exo-suit switches
|
|
||||||
val (nextSuit, nextSubtype) = {
|
val (nextSuit, nextSubtype) = {
|
||||||
lazy val fallbackSuit = if (Players.CertificationToUseExoSuit(player, originalSuit, originalSubtype)) {
|
lazy val fallbackSuit = if (Players.CertificationToUseExoSuit(player, originalSuit, originalSubtype)) {
|
||||||
//TODO will we ever need to check for the cooldown status of an original non-MAX exo-suit?
|
//TODO will we ever need to check for the cooldown status of an original non-MAX exo-suit?
|
||||||
|
|
@ -430,20 +412,30 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
fallbackSuit
|
fallbackSuit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nextSuit == ExoSuitType.MAX) {
|
//sanitize current exo-suit for change
|
||||||
player.ResistArmMotion(PlayerControl.maxRestriction)
|
val (dropHolsters, oldHolsters) = Players.clearHolsters(player.Holsters().iterator).partition(dropPred)
|
||||||
} else {
|
val (dropInventory, oldInventory) = player.Inventory.Clear().partition(dropPred)
|
||||||
player.ResistArmMotion(Player.neverRestrict)
|
val (dropHand, deleteHand) = player.FreeHand.Equipment match {
|
||||||
|
case Some(obj) =>
|
||||||
|
val out = InventoryItem(obj, -1)
|
||||||
|
player.FreeHand.Equipment = None
|
||||||
|
if (dropPred(out)) {
|
||||||
|
(List(out), Nil)
|
||||||
|
} else {
|
||||||
|
(Nil, List(out))
|
||||||
|
}
|
||||||
|
case _ =>
|
||||||
|
(Nil, Nil)
|
||||||
}
|
}
|
||||||
//sanitize (incoming) inventory
|
//these dropped items exist and must be accounted for
|
||||||
//TODO equipment permissions; these loops may be expanded upon in future
|
val itemsToDrop = dropHand ++ dropHolsters ++ dropInventory
|
||||||
val curatedHolsters = for {
|
val newHolsters = for {
|
||||||
item <- holsters
|
item <- holsters
|
||||||
//id = item.obj.Definition.ObjectId
|
//id = item.obj.Definition.ObjectId
|
||||||
//lastTime = player.GetLastUsedTime(id)
|
//lastTime = player.GetLastUsedTime(id)
|
||||||
if true
|
if true
|
||||||
} yield item
|
} yield item
|
||||||
val curatedInventory = for {
|
val newInventory = for {
|
||||||
item <- inventory
|
item <- inventory
|
||||||
//id = item.obj.Definition.ObjectId
|
//id = item.obj.Definition.ObjectId
|
||||||
//lastTime = player.GetLastUsedTime(id)
|
//lastTime = player.GetLastUsedTime(id)
|
||||||
|
|
@ -461,60 +453,55 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
player.Armor = originalArmor
|
player.Armor = originalArmor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//ensure arm is down, even if it needs to go back up
|
val (afterHolsters, afterInventory) = if (exosuit == nextSuit) {
|
||||||
if (player.DrawnSlot != Player.HandsDownSlot) {
|
//proposed loadout inventory matched the projected exo-suit selection
|
||||||
player.DrawnSlot = Player.HandsDownSlot
|
if (nextSuit == ExoSuitType.MAX) {
|
||||||
}
|
//loadout for a MAX
|
||||||
//a change due to exo-suit permissions mismatch will result in (more) items being re-arranged and/or dropped
|
player.ResistArmMotion(PlayerControl.maxRestriction)
|
||||||
//dropped items are not registered and can just be forgotten
|
player.DrawnSlot = Player.HandsDownSlot
|
||||||
val (afterHolsters, afterInventory) = if (nextSuit == exosuit) {
|
(newHolsters.filter(_.start == 4), newInventory.filterNot(dropPred))
|
||||||
(
|
} else {
|
||||||
//melee slot preservation for MAX
|
//loadout for a vanilla exo-suit
|
||||||
if (nextSuit == ExoSuitType.MAX) {
|
player.ResistArmMotion(Player.neverRestrict)
|
||||||
holsters.filter(_.start == 4)
|
(newHolsters.filterNot(dropPred), newInventory.filterNot(dropPred))
|
||||||
} else {
|
}
|
||||||
curatedHolsters.filterNot(dropPred)
|
|
||||||
},
|
|
||||||
curatedInventory.filterNot(dropPred)
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
//our exo-suit type was hijacked by changing permissions; we shouldn't even be able to use that loadout(!)
|
//proposed loadout conforms to a different inventory layout than the projected exo-suit
|
||||||
//holsters
|
player.ResistArmMotion(Player.neverRestrict)
|
||||||
val leftoversForInventory = Players.fillEmptyHolsters(
|
//holsters (matching holsters will be inserted, the rest will deposited into the inventory)
|
||||||
|
val (finalHolsters, leftoversForInventory) = Players.fillEmptyHolsters(
|
||||||
player.Holsters().iterator,
|
player.Holsters().iterator,
|
||||||
(curatedHolsters ++ curatedInventory).filterNot(dropPred)
|
(newHolsters.filterNot(_.obj.Size == EquipmentSize.Max) ++ newInventory).filterNot(dropPred)
|
||||||
)
|
)
|
||||||
val finalHolsters = player.HolsterItems()
|
//inventory (items will be placed to accommodate the change, or dropped)
|
||||||
//inventory
|
|
||||||
val (finalInventory, _) = GridInventory.recoverInventory(leftoversForInventory, player.Inventory)
|
val (finalInventory, _) = GridInventory.recoverInventory(leftoversForInventory, player.Inventory)
|
||||||
(finalHolsters, finalInventory)
|
(finalHolsters, finalInventory)
|
||||||
}
|
}
|
||||||
(afterHolsters ++ afterInventory).foreach { entry => entry.obj.Faction = player.Faction }
|
(afterHolsters ++ afterInventory).foreach { entry => entry.obj.Faction = player.Faction }
|
||||||
afterHolsters.foreach {
|
afterHolsters.collect {
|
||||||
case InventoryItem(citem: ConstructionItem, _) =>
|
case InventoryItem(citem: ConstructionItem, _) =>
|
||||||
Deployables.initializeConstructionItem(player.avatar.certifications, citem)
|
Deployables.initializeConstructionItem(player.avatar.certifications, citem)
|
||||||
case _ => ;
|
|
||||||
}
|
}
|
||||||
toDeleteOrDrop.foreach { entry => entry.obj.Faction = PlanetSideEmpire.NEUTRAL }
|
|
||||||
//deactivate non-passive implants
|
//deactivate non-passive implants
|
||||||
avatarActor ! AvatarActor.DeactivateActiveImplants()
|
avatarActor ! AvatarActor.DeactivateActiveImplants()
|
||||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
val zone = player.Zone
|
||||||
player.Zone.id,
|
zone.AvatarEvents ! AvatarServiceMessage(
|
||||||
|
zone.id,
|
||||||
AvatarAction.ChangeLoadout(
|
AvatarAction.ChangeLoadout(
|
||||||
player.GUID,
|
player.GUID,
|
||||||
toArmor,
|
toArmor,
|
||||||
nextSuit,
|
nextSuit,
|
||||||
nextSubtype,
|
nextSubtype,
|
||||||
player.LastDrawnSlot,
|
player.LastDrawnSlot,
|
||||||
exosuit == ExoSuitType.MAX,
|
nextSuit == ExoSuitType.MAX,
|
||||||
oldHolsters.map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
oldHolsters.map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
||||||
afterHolsters,
|
afterHolsters,
|
||||||
oldInventory.map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
(oldInventory ++ deleteHand).map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
||||||
afterInventory,
|
afterInventory,
|
||||||
toDeleteOrDrop
|
itemsToDrop
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
zone.AvatarEvents ! AvatarServiceMessage(
|
||||||
player.Name,
|
player.Name,
|
||||||
AvatarAction.TerminalOrderResult(msg.terminal_guid, msg.transaction_type, result=true)
|
AvatarAction.TerminalOrderResult(msg.terminal_guid, msg.transaction_type, result=true)
|
||||||
)
|
)
|
||||||
|
|
@ -617,30 +604,31 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
}
|
}
|
||||||
|
|
||||||
def setExoSuit(exosuit: ExoSuitType.Value, subtype: Int): Boolean = {
|
def setExoSuit(exosuit: ExoSuitType.Value, subtype: Int): Boolean = {
|
||||||
var toDelete : List[InventoryItem] = Nil
|
val willBecomeMax = exosuit == ExoSuitType.MAX
|
||||||
val originalSuit = player.ExoSuit
|
val originalSuit = player.ExoSuit
|
||||||
val originalSubtype = Loadout.DetermineSubtype(player)
|
val originalSubtype = Loadout.DetermineSubtype(player)
|
||||||
val requestToChangeArmor = originalSuit != exosuit || originalSubtype != subtype
|
val changeSuit = originalSuit != exosuit
|
||||||
val allowedToChangeArmor = Players.CertificationToUseExoSuit(player, exosuit, subtype) &&
|
val changeSubtype = originalSubtype != subtype
|
||||||
(if (exosuit == ExoSuitType.MAX) {
|
val doChangeArmor = (changeSuit || changeSubtype) &&
|
||||||
|
Players.CertificationToUseExoSuit(player, exosuit, subtype) &&
|
||||||
|
(if (willBecomeMax) {
|
||||||
val weapon = GlobalDefinitions.MAXArms(subtype, player.Faction)
|
val weapon = GlobalDefinitions.MAXArms(subtype, player.Faction)
|
||||||
player.avatar.purchaseCooldown(weapon) match {
|
player.avatar.purchaseCooldown(weapon)
|
||||||
case Some(_) =>
|
.collect(_ => false)
|
||||||
false
|
.getOrElse {
|
||||||
case None =>
|
|
||||||
avatarActor ! AvatarActor.UpdatePurchaseTime(weapon)
|
avatarActor ! AvatarActor.UpdatePurchaseTime(weapon)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
true
|
true
|
||||||
})
|
})
|
||||||
if (requestToChangeArmor && allowedToChangeArmor) {
|
if (doChangeArmor) {
|
||||||
log.info(s"${player.Name} wants to change to a different exo-suit - $exosuit")
|
log.info(s"${player.Name} wants to change to a different exo-suit - $exosuit")
|
||||||
val beforeHolsters = Players.clearHolsters(player.Holsters().iterator)
|
val beforeHolsters = Players.clearHolsters(player.Holsters().iterator)
|
||||||
val beforeInventory = player.Inventory.Clear()
|
val beforeInventory = player.Inventory.Clear()
|
||||||
//change suit
|
//update suit internally
|
||||||
val originalArmor = player.Armor
|
val originalArmor = player.Armor
|
||||||
player.ExoSuit = exosuit //changes the value of MaxArmor to reflect the new exo-suit
|
player.ExoSuit = exosuit
|
||||||
val toMaxArmor = player.MaxArmor
|
val toMaxArmor = player.MaxArmor
|
||||||
val toArmor = toMaxArmor
|
val toArmor = toMaxArmor
|
||||||
if (originalSuit != exosuit || originalArmor != toMaxArmor) {
|
if (originalSuit != exosuit || originalArmor != toMaxArmor) {
|
||||||
|
|
@ -651,50 +639,32 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
if (player.DrawnSlot != Player.HandsDownSlot) {
|
if (player.DrawnSlot != Player.HandsDownSlot) {
|
||||||
player.DrawnSlot = Player.HandsDownSlot
|
player.DrawnSlot = Player.HandsDownSlot
|
||||||
}
|
}
|
||||||
val normalHolsters = if (originalSuit == ExoSuitType.MAX) {
|
val (toDelete, toDrop, afterHolsters, afterInventory) = if (originalSuit == ExoSuitType.MAX) {
|
||||||
val (maxWeapons, normalWeapons) = beforeHolsters.partition(elem => elem.obj.Size == EquipmentSize.Max)
|
//was max
|
||||||
toDelete ++= maxWeapons
|
val (delete, insert) = beforeHolsters.partition(elem => elem.obj.Size == EquipmentSize.Max)
|
||||||
normalWeapons
|
if (willBecomeMax) {
|
||||||
}
|
//changing to a different kind(?) of max
|
||||||
else {
|
(delete, Nil, insert, beforeInventory)
|
||||||
beforeHolsters
|
} else {
|
||||||
}
|
//changing to a vanilla exo-suit
|
||||||
//populate holsters
|
val (newHolsters, unplacedHolsters) = Players.fillEmptyHolsters(player.Holsters().iterator, insert ++ beforeInventory)
|
||||||
val (afterHolsters, finalInventory) = if (exosuit == ExoSuitType.MAX) {
|
val (inventory, unplacedInventory) = GridInventory.recoverInventory(unplacedHolsters, player.Inventory)
|
||||||
(
|
(delete, unplacedInventory.map(InventoryItem(_, -1)), newHolsters, inventory)
|
||||||
normalHolsters,
|
}
|
||||||
Players.fillEmptyHolsters(List(player.Slot(4)).iterator, normalHolsters) ++ beforeInventory
|
} else if (willBecomeMax) {
|
||||||
)
|
//will be max, drop everything but melee slot
|
||||||
}
|
val (melee, other) = beforeHolsters.partition(elem => elem.obj.Size == EquipmentSize.Melee)
|
||||||
else if (originalSuit == exosuit) { //note - this will rarely be the situation
|
val (inventory, unplacedInventory) = GridInventory.recoverInventory(beforeInventory ++ other, player.Inventory)
|
||||||
(normalHolsters, Players.fillEmptyHolsters(player.Holsters().iterator, normalHolsters))
|
(Nil, unplacedInventory.map(InventoryItem(_, -1)), melee, inventory)
|
||||||
}
|
} else {
|
||||||
else {
|
//was not a max nor will become a max; vanilla exo-suit to a vanilla-exo-suit
|
||||||
val (afterHolsters, toInventory) =
|
val (insert, unplacedHolsters) = Players.fillEmptyHolsters(player.Holsters().iterator, beforeHolsters ++ beforeInventory)
|
||||||
normalHolsters.partition(elem => elem.obj.Size == player.Slot(elem.start).Size)
|
val (inventory, unplacedInventory) = GridInventory.recoverInventory(unplacedHolsters, player.Inventory)
|
||||||
afterHolsters.foreach({ elem => player.Slot(elem.start).Equipment = elem.obj })
|
(Nil, unplacedInventory.map(InventoryItem(_, -1)), insert, inventory)
|
||||||
val remainder = Players.fillEmptyHolsters(player.Holsters().iterator, toInventory ++ beforeInventory)
|
|
||||||
(
|
|
||||||
player.HolsterItems(),
|
|
||||||
remainder
|
|
||||||
)
|
|
||||||
}
|
|
||||||
//put items back into inventory
|
|
||||||
val (stow, drop) = if (originalSuit == exosuit) {
|
|
||||||
(finalInventory, Nil)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
val (a, b) = GridInventory.recoverInventory(finalInventory, player.Inventory)
|
|
||||||
(
|
|
||||||
a,
|
|
||||||
b.map {
|
|
||||||
InventoryItem(_, -1)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
stow.foreach { elem =>
|
|
||||||
player.Inventory.InsertQuickly(elem.start, elem.obj)
|
|
||||||
}
|
}
|
||||||
|
//insert
|
||||||
|
afterHolsters.foreach(elem => player.Slot(elem.start).Equipment = elem.obj)
|
||||||
|
afterInventory.foreach(elem => player.Inventory.InsertQuickly(elem.start, elem.obj))
|
||||||
//deactivate non-passive implants
|
//deactivate non-passive implants
|
||||||
avatarActor ! AvatarActor.DeactivateActiveImplants()
|
avatarActor ! AvatarActor.DeactivateActiveImplants()
|
||||||
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
player.Zone.AvatarEvents ! AvatarServiceMessage(
|
||||||
|
|
@ -705,18 +675,17 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
||||||
exosuit,
|
exosuit,
|
||||||
subtype,
|
subtype,
|
||||||
player.LastDrawnSlot,
|
player.LastDrawnSlot,
|
||||||
exosuit == ExoSuitType.MAX && requestToChangeArmor,
|
willBecomeMax,
|
||||||
beforeHolsters.map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
beforeHolsters.map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
||||||
afterHolsters,
|
afterHolsters,
|
||||||
beforeInventory.map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
beforeInventory.map { case InventoryItem(obj, _) => (obj, obj.GUID) },
|
||||||
stow,
|
afterInventory,
|
||||||
drop,
|
toDrop,
|
||||||
toDelete.map { case InventoryItem(obj, _) => (obj, obj.GUID) }
|
toDelete.map { case InventoryItem(obj, _) => (obj, obj.GUID) }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
true
|
true
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ import net.psforever.types.PlanetSideGUID
|
||||||
class InventoryItem(val obj: Equipment, var start: Int = 0) {
|
class InventoryItem(val obj: Equipment, var start: Int = 0) {
|
||||||
//TODO eventually move this object from storing the item directly to just storing its GUID?
|
//TODO eventually move this object from storing the item directly to just storing its GUID?
|
||||||
def GUID: PlanetSideGUID = obj.GUID
|
def GUID: PlanetSideGUID = obj.GUID
|
||||||
|
|
||||||
|
override def toString: String = s"InventoryItem(${obj.Definition.Name}-$start)"
|
||||||
}
|
}
|
||||||
|
|
||||||
object InventoryItem {
|
object InventoryItem {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue