object MountableInventory
- Source
- MountableInventory.scala
- Alphabetic
- By Inheritance
- MountableInventory
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 CumulativeSeatedPlayerNamePadding(accumulative: Long): Int
Calculate the padding value for the next mounted player character's name
String
.Calculate the padding value for the next mounted player character's name
String
. Due to the depth of seated player characters, thename
field can have a variable amount of padding between the string size field and the first character. Specifically, the padding value is the number of bits after the size field that would cause the first character of the name to be aligned to the first bit of the next byte. The 35 counts the object class, unique identifier, and slot fields of the enclosingInternalSlot
. The 23 counts all of the fields before the player'sname
field inCharacterAppearanceData
.- accumulative
current entry stream offset (start of this player's entry)
- returns
the padding value, 0-7 bits
- See also
InternalSlot
CharacterAppearanceData.name
VehicleData.InitialStreamLengthToSeatEntries
- def CumulativeSeatedPlayerNamePadding(base: Long, next: Option[StreamBitSize]): Int
Increment the distance to the next mounted player's
name
field with the length of the previous entry, then calculate the new padding value for that next entry'sname
field.Increment the distance to the next mounted player's
name
field with the length of the previous entry, then calculate the new padding value for that next entry'sname
field.- base
the original distance to the last entry
- next
the length of the last entry, if one was parsed
- returns
the padding value, 0-7 bits
- def InitialStreamLengthToSeatEntries(hasVelocity: Boolean, format: VehicleFormat): Long
Distance from the length field of a vehicle creation packet up until the start of the vehicle's inventory data.
Distance from the length field of a vehicle creation packet up until the start of the vehicle's inventory data. The only field excluded belongs to the original opcode for the packet. The parameters outline reasons why the length of the stream would be different and are used to determine the exact difference value.
Note:
198 includes theObjectCreateMessage
packet fields, without parent data, theVehicleData
fields, and the first three fields of theInternalSlot
.- hasVelocity
the presence of a velocity field -
vel
- in thePlacementData
object for this vehicle- format
the subtype for this vehicle
- returns
the length of the bitstream
- See also
ObjectCreateMessage
- def PlayerData(basic_appearance: (Int) => CharacterAppearanceData, character_data: (Boolean, Boolean) => CharacterData, drawn_slot: Type, accumulative: Long): PlayerData
Constructor for
PlayerData
that ignores the coordinate information and the inventory and performs a vehicle-unique calculation of the padding value.Constructor for
PlayerData
that ignores the coordinate information and the inventory and performs a vehicle-unique calculation of the padding value. It passes information between the three major divisions for the purposes of offset calculations. This constructor should be used for players that are mounted.- basic_appearance
a curried function for the common fields regarding the the character's appearance
- character_data
a curried function for the class-specific data that explains about the character
- drawn_slot
the holster that is initially drawn
- accumulative
the input position for the stream up to which this entry; used to calculate the padding value for the player's name in
CharacterAppearanceData
- returns
a
PlayerData
object
- def PlayerData(basic_appearance: (Int) => CharacterAppearanceData, character_data: (Boolean, Boolean) => CharacterData, inventory: InventoryData, drawn_slot: Type, accumulative: Long): PlayerData
Constructor that ignores the coordinate information and performs a vehicle-unique calculation of the padding value.
Constructor that ignores the coordinate information and performs a vehicle-unique calculation of the padding value. It passes information between the three major divisions for the purposes of offset calculations. This constructor should be used for players that are mounted.
- basic_appearance
a curried function for the common fields regarding the the character's appearance
- character_data
a curried function for the class-specific data that explains about the character
- inventory
the player's inventory
- drawn_slot
the holster that is initially drawn
- accumulative
the input position for the stream up to which this entry; used to calculate the padding value for the player's name in
CharacterAppearanceData
- returns
a
PlayerData
object
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def custom_inventory_codec(length: Long): Codec[InventoryData]
A special method of handling mounted players within the same inventory space as normal
Equipment
can be encountered before restoring normal inventory operations.
Due to variable-length fields withinPlayerData
extracted from the input, the distance of the bit(stream) vector to the initial inventory entry is calculated to produce the initial value for padding thePlayerData
object's name field.A special method of handling mounted players within the same inventory space as normal
Equipment
can be encountered before restoring normal inventory operations.
Due to variable-length fields withinPlayerData
extracted from the input, the distance of the bit(stream) vector to the initial inventory entry is calculated to produce the initial value for padding thePlayerData
object's name field. After player-related entries have been extracted and processed in isolation, the remainder of the inventory must be handled as standard inventory and finally both groups must be repackaged into a single standardInventoryData
object. Due to the unique value for the mounted players that must be updated for each entry processed, the entries are temporarily formatted into a linked list before being put back into a normalList
.
6 June 2018:
Due to curious behavior in the vehicle mount access controls, please only encode and decode the driver mount even though all seats are currently reachable.- length
the distance in bits to the first inventory entry
- returns
a
Codec
that translatesInventoryData
- def custom_inventory_codec(hasVelocity: Boolean, format: VehicleFormat): Codec[InventoryData]
A special method of handling mounted players within the same inventory space as normal
Equipment
can be encountered before restoring normal inventory operations.A special method of handling mounted players within the same inventory space as normal
Equipment
can be encountered before restoring normal inventory operations.- hasVelocity
the presence of a velocity field -
vel
- in thePlacementData
object for this vehicle- format
the subtype for this vehicle
- returns
a
Codec
that translatesInventoryData
- See also
custom_inventory_codec(Long)
InitialStreamLengthToSeatEntries(Boolean, VehicleFormat)
- 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()