mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-03-01 19:43:42 +00:00
restoration of yellow ring of ownership around deployables; changes to variant of CommonFieldData transcorder used on certain deployable transcoders; static values are assigned parameter names and public variables are given types for completion
This commit is contained in:
parent
c6860bc718
commit
73a0bf5ae7
29 changed files with 127 additions and 144 deletions
|
|
@ -524,18 +524,16 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
log.warn(s"${player.Name} failed to pick up an item ($item_guid) from the ground because $reason")
|
||||
|
||||
case Player.BuildDeployable(obj: TelepadDeployable, tool: Telepad) =>
|
||||
obj.Router = tool.Router //necessary; forwards link to the router that prodcued the telepad
|
||||
obj.Router = tool.Router //necessary; forwards link to the router that produced the telepad
|
||||
setupDeployable(obj, tool)
|
||||
|
||||
case Player.BuildDeployable(obj, tool) =>
|
||||
setupDeployable(obj, tool)
|
||||
|
||||
case Zone.Deployable.IsBuilt(obj: BoomerDeployable) =>
|
||||
obj.Actor ! Deployable.Ownership(player)
|
||||
deployablePair match {
|
||||
case Some((deployable, tool)) if deployable eq obj =>
|
||||
val zone = player.Zone
|
||||
//boomers
|
||||
val trigger = new BoomerTrigger
|
||||
trigger.Companion = obj.GUID
|
||||
obj.Trigger = trigger
|
||||
|
|
@ -558,7 +556,6 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
deployablePair = None
|
||||
|
||||
case Zone.Deployable.IsBuilt(obj: TelepadDeployable) =>
|
||||
obj.Actor ! Deployable.Ownership(player)
|
||||
deployablePair match {
|
||||
case Some((deployable, tool: Telepad)) if deployable eq obj =>
|
||||
RemoveOldEquipmentFromInventory(player)(tool)
|
||||
|
|
@ -576,7 +573,6 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
deployablePair = None
|
||||
|
||||
case Zone.Deployable.IsBuilt(obj) =>
|
||||
obj.Actor ! Deployable.Ownership(player)
|
||||
deployablePair match {
|
||||
case Some((deployable, tool)) if deployable eq obj =>
|
||||
Players.buildCooldownReset(player.Zone, player.Name, obj)
|
||||
|
|
|
|||
|
|
@ -278,15 +278,6 @@ object DeployableBehavior {
|
|||
val originalFaction = obj.Faction
|
||||
val zone = obj.Zone
|
||||
val localEvents = zone.LocalEvents
|
||||
val ownershipAction = {
|
||||
val owner = info.player_guid
|
||||
LocalAction.SendPlanetsideAttributeMessage(
|
||||
owner,
|
||||
owner,
|
||||
PlanetsideAttributeEnum.OwnershipAssignment,
|
||||
dGuid.guid.toLong
|
||||
)
|
||||
}
|
||||
if (originalFaction != toFaction) {
|
||||
obj.Faction = toFaction
|
||||
//visual tells in regards to ownership by faction
|
||||
|
|
@ -299,18 +290,11 @@ object DeployableBehavior {
|
|||
originalFaction.toString,
|
||||
LocalAction.DeployableMapIcon(Service.defaultPlayerGUID, DeploymentAction.Dismiss, info)
|
||||
)
|
||||
} else {
|
||||
//old owner no longer owner
|
||||
obj.OwnerName.collect { case fromOwner if !fromOwner.equals(toOwner) =>
|
||||
localEvents ! LocalServiceMessage(fromOwner, ownershipAction)
|
||||
}
|
||||
}
|
||||
//display to the given faction
|
||||
localEvents ! LocalServiceMessage(
|
||||
toFaction.toString,
|
||||
LocalAction.DeployableMapIcon(Service.defaultPlayerGUID, DeploymentAction.Build, info)
|
||||
)
|
||||
//new owner is owner
|
||||
localEvents ! LocalServiceMessage(toOwner, ownershipAction)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@ object AegisShieldGeneratorData extends Marshallable[AegisShieldGeneratorData] {
|
|||
implicit val codec: Codec[AegisShieldGeneratorData] = (
|
||||
("deploy" | CommonFieldDataWithPlacement.codec) ::
|
||||
("health" | uint8L) ::
|
||||
uint32 :: uint32 :: uint32 :: uint4L //100 bits
|
||||
uint32 ::
|
||||
uint32 ::
|
||||
uint32 ::
|
||||
uint4L
|
||||
).exmap[AegisShieldGeneratorData](
|
||||
{
|
||||
case deploy :: health :: 0 :: 0 :: 0 :: 0 :: HNil =>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ object BattleFrameRoboticsData extends Marshallable[BattleFrameRoboticsData] {
|
|||
("proper_anim" | bool) :: //when unflagged, bfr stands, even if unmanned
|
||||
("unk3" | uint4) ::
|
||||
("show_bfr_shield" | bool) ::
|
||||
optional(bool, target = "inventory" | MountableInventory.custom_inventory_codec(pos.vel.isDefined, VehicleFormat.Battleframe))
|
||||
("inventory" | optional(bool, MountableInventory.custom_inventory_codec(pos.vel.isDefined, VehicleFormat.Battleframe)))
|
||||
}
|
||||
).exmap[BattleFrameRoboticsData] (
|
||||
{
|
||||
|
|
@ -107,7 +107,7 @@ object BattleFrameRoboticsData extends Marshallable[BattleFrameRoboticsData] {
|
|||
("unk3" | uint4) ::
|
||||
("show_bfr_shield" | bool) ::
|
||||
("unk4" | bool) ::
|
||||
optional(bool, target = "inventory" | MountableInventory.custom_inventory_codec(pos.vel.isDefined, VehicleFormat.BattleframeFlight))
|
||||
("inventory" | optional(bool, MountableInventory.custom_inventory_codec(pos.vel.isDefined, VehicleFormat.BattleframeFlight)))
|
||||
}
|
||||
).exmap[BattleFrameRoboticsData] (
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ object CaptureFlagData extends Marshallable[CaptureFlagData] {
|
|||
("targetBaseGuid" | uint8L) ::
|
||||
uint8L ::
|
||||
("milliseconds_remaining" | uint32L) ::
|
||||
uint(1)
|
||||
uint(bits = 1)
|
||||
).exmap[CaptureFlagData](
|
||||
{
|
||||
case pos :: faction :: false :: 4 :: 0 :: owningBaseGuid :: 0 :: targetBaseGuid :: 0 :: milliseconds_remaining :: 0 :: HNil =>
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ object CharacterAppearanceData extends Marshallable[CharacterAppearanceData] {
|
|||
("unk6" | bool) :: //stream misalignment when set
|
||||
("charging_pose" | bool) ::
|
||||
("unk7" | bool) :: //alternate charging pose?
|
||||
optional(bool, "on_zipline" | zipline_codec)
|
||||
("on_zipline" | optional(bool, zipline_codec))
|
||||
).exmap[CharacterAppearanceB](
|
||||
{
|
||||
case outfit_id :: outfit :: logo :: u1 :: bpack :: u2 :: u3 :: u4 :: facingPitch :: facingYawUpper :: lfs :: gstate :: cloaking :: u5 :: u6 :: charging :: u7 :: zipline :: HNil =>
|
||||
|
|
@ -493,5 +493,5 @@ object CharacterAppearanceData extends Marshallable[CharacterAppearanceData] {
|
|||
}
|
||||
)
|
||||
|
||||
implicit val codec: Codec[CharacterAppearanceData] = codec(0)
|
||||
implicit val codec: Codec[CharacterAppearanceData] = codec(name_padding = 0)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ import shapeless.{::, HNil}
|
|||
object ImplantEffects extends Enumeration {
|
||||
type Type = Value
|
||||
|
||||
val SurgeEffects = Value(9)
|
||||
val PersonalShieldEffects = Value(5)
|
||||
val DarklightEffects = Value(3)
|
||||
val RegenEffects = Value(0)
|
||||
val NoEffects = Value(1)
|
||||
val SurgeEffects: ImplantEffects.Value = Value(9)
|
||||
val PersonalShieldEffects: ImplantEffects.Value = Value(5)
|
||||
val DarklightEffects: ImplantEffects.Value = Value(3)
|
||||
val RegenEffects: ImplantEffects.Value = Value(0)
|
||||
val NoEffects: ImplantEffects.Value = Value(1)
|
||||
|
||||
implicit val codec = PacketHelpers.createEnumerationCodec(this, uint4L)
|
||||
implicit val codec: Codec[ImplantEffects.Value] = PacketHelpers.createEnumerationCodec(this, uint4L)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -120,9 +120,9 @@ object CharacterData extends Marshallable[CharacterData] {
|
|||
("armor" | uint8L) ::
|
||||
(("uniform_upgrade" | UniformStyle.codec) >>:~ { style =>
|
||||
uint(bits = 3) :: //uniform_upgrade is actually interpreted as a 6u field, but the lower 3u seems to be discarded
|
||||
("command_rank" | uintL(3)) ::
|
||||
listOfN(uint2, "implant_effects" | ImplantEffects.codec) ::
|
||||
("cosmetics" | conditional(BattleRank.showCosmetics(style), Cosmetic.codec))
|
||||
("command_rank" | uint(bits = 3)) ::
|
||||
("implant_effects" | listOfN(uint2, ImplantEffects.codec)) ::
|
||||
("cosmetics" | conditional(BattleRank.showCosmetics(style), Cosmetic.codec))
|
||||
})
|
||||
).exmap[CharacterData](
|
||||
{
|
||||
|
|
@ -158,24 +158,24 @@ object CharacterData extends Marshallable[CharacterData] {
|
|||
def codec_seated(is_backpack: Boolean): Codec[CharacterData] =
|
||||
(
|
||||
("uniform_upgrade" | UniformStyle.codec) >>:~ { style =>
|
||||
uint(3) :: //uniform_upgrade is actually interpreted as a 6u field, but the lower 3u seems to be discarded
|
||||
("command_rank" | uintL(3)) ::
|
||||
listOfN(uint2, "implant_effects" | ImplantEffects.codec) ::
|
||||
("cosmetics" | conditional(BattleRank.showCosmetics(style), Cosmetic.codec))
|
||||
uint(bits = 3) :: //uniform_upgrade is actually interpreted as a 6u field, but the lower 3u seems to be discarded
|
||||
("command_rank" | uintL(bits = 3)) ::
|
||||
("implant_effects" | listOfN(uint2, ImplantEffects.codec)) ::
|
||||
("cosmetics" | conditional(BattleRank.showCosmetics(style), Cosmetic.codec))
|
||||
}
|
||||
).exmap[CharacterData](
|
||||
{
|
||||
case uniform :: unk :: cr :: implant_effects :: cosmetics :: HNil =>
|
||||
Attempt.Successful(
|
||||
new CharacterData(
|
||||
100,
|
||||
0,
|
||||
health = 100,
|
||||
armor = 0,
|
||||
uniform,
|
||||
unk,
|
||||
cr,
|
||||
implant_effects,
|
||||
cosmetics
|
||||
)(is_backpack, true)
|
||||
)(is_backpack, is_seated = true)
|
||||
)
|
||||
|
||||
case _ =>
|
||||
|
|
@ -195,5 +195,5 @@ object CharacterData extends Marshallable[CharacterData] {
|
|||
}
|
||||
)
|
||||
|
||||
implicit val codec: Codec[CharacterData] = codec(false)
|
||||
implicit val codec: Codec[CharacterData] = codec(is_backpack = false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,19 +75,19 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
|||
* @return a `CommonFieldData` object
|
||||
*/
|
||||
def apply(): CommonFieldData =
|
||||
CommonFieldData(PlanetSideEmpire.NEUTRAL, false, false, false, None, false, None, None, PlanetSideGUID(0))
|
||||
CommonFieldData(PlanetSideEmpire.NEUTRAL, bops = false, alternate = false, v1 = false, None, jammered = false, None, None, PlanetSideGUID(0))
|
||||
|
||||
def apply(faction: PlanetSideEmpire.Value): CommonFieldData =
|
||||
CommonFieldData(faction, false, false, false, None, false, None, None, PlanetSideGUID(0))
|
||||
CommonFieldData(faction, bops = false, alternate = false, v1 = false, None, jammered = false, None, None, PlanetSideGUID(0))
|
||||
|
||||
def apply(faction: PlanetSideEmpire.Value, unk: Int): CommonFieldData =
|
||||
CommonFieldData(faction, false, false, unk > 1, None, unk > 0, None, None, PlanetSideGUID(0))
|
||||
CommonFieldData(faction, bops = false, alternate = false, v1 = unk > 1, None, jammered = unk > 0, None, None, PlanetSideGUID(0))
|
||||
|
||||
def apply(faction: PlanetSideEmpire.Value, unk: Int, player_guid: PlanetSideGUID): CommonFieldData =
|
||||
CommonFieldData(faction, false, false, unk > 1, None, unk > 0, None, None, player_guid)
|
||||
CommonFieldData(faction, bops = false, alternate = false, v1 = unk > 1, None, jammered = unk > 0, None, None, player_guid)
|
||||
|
||||
def apply(faction: PlanetSideEmpire.Value, destroyed: Boolean, unk: Int): CommonFieldData =
|
||||
CommonFieldData(faction, false, destroyed, unk > 1, None, unk > 0, None, None, PlanetSideGUID(0))
|
||||
CommonFieldData(faction, bops = false, alternate = destroyed, v1 = unk > 1, None, jammered = unk > 0, None, None, PlanetSideGUID(0))
|
||||
|
||||
def apply(
|
||||
faction: PlanetSideEmpire.Value,
|
||||
|
|
@ -95,7 +95,7 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
|||
unk: Int,
|
||||
player_guid: PlanetSideGUID
|
||||
): CommonFieldData =
|
||||
CommonFieldData(faction, false, destroyed, unk > 1, None, unk % 1 == 1, None, None, player_guid)
|
||||
CommonFieldData(faction, bops = false, alternate = destroyed, v1 = unk > 1, None, jammered = false/*unk % 1 == 1*/, None, None, player_guid)
|
||||
|
||||
def apply(
|
||||
faction: PlanetSideEmpire.Value,
|
||||
|
|
@ -107,7 +107,7 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
|||
): CommonFieldData = {
|
||||
val jammeredField = if (jammered) { Some(0) }
|
||||
else { None }
|
||||
CommonFieldData(faction, bops, destroyed, unk > 1, None, unk % 1 == 1, None, jammeredField, player_guid)
|
||||
CommonFieldData(faction, bops, destroyed, unk > 1, None, jammered = false/*unk % 1 == 1*/, None, jammeredField, player_guid)
|
||||
}
|
||||
|
||||
def codec(extra: Boolean): Codec[CommonFieldData] =
|
||||
|
|
@ -116,9 +116,9 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
|||
("bops" | bool) ::
|
||||
("alternate" | bool) ::
|
||||
("v1" | bool) :: //the purpose of this bit changes depending on the previous bit
|
||||
conditional(extra, "v2" | CommonFieldDataExtra.codec(unk1 = false)) ::
|
||||
("v2" | conditional(extra, CommonFieldDataExtra.codec(unk1 = false))) ::
|
||||
("jammered" | bool) ::
|
||||
optional(bool, "v5" | uint16L) ::
|
||||
("v5" | optional(bool, uint16L)) ::
|
||||
("guid" | PlanetSideGUID.codec)
|
||||
).xmap[CommonFieldData](
|
||||
{
|
||||
|
|
@ -139,9 +139,9 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
|||
("bops" | bool) ::
|
||||
("alternate" | bool) ::
|
||||
("v1" | bool) :: //though the code path differs depending on the previous bit, this one gets read one way or another
|
||||
conditional(extra, codec = "v2" | CommonFieldDataExtra.codec(unk1 = false)) ::
|
||||
("v2" | conditional(extra, CommonFieldDataExtra.codec(unk1 = false))) ::
|
||||
("jammered" | bool) ::
|
||||
optional(bool, "v5" | uint16L) ::
|
||||
("v5" | optional(bool, uint16L)) ::
|
||||
("v4" | bool) ::
|
||||
("guid" | PlanetSideGUID.codec)
|
||||
).exmap[CommonFieldData](
|
||||
|
|
@ -158,5 +158,5 @@ object CommonFieldData extends Marshallable[CommonFieldData] {
|
|||
}
|
||||
)
|
||||
|
||||
val codec2: Codec[CommonFieldData] = codec2(false)
|
||||
val codec2: Codec[CommonFieldData] = codec2(extra = false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ object DetailedAmmoBoxData extends Marshallable[DetailedAmmoBoxData] {
|
|||
|
||||
def apply(unk: Int, mag: Int): DetailedAmmoBoxData = {
|
||||
DetailedAmmoBoxData(
|
||||
CommonFieldData(PlanetSideEmpire.NEUTRAL, false, false, unk > 0, None, false, None, None, PlanetSideGUID(0)),
|
||||
CommonFieldData(PlanetSideEmpire.NEUTRAL, bops = false, alternate = false, v1 = unk > 0, None, jammered = false, None, None, PlanetSideGUID(0)),
|
||||
mag
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ final case class ImplantEntry(implant: ImplantType, initialization: Option[Int],
|
|||
extends StreamBitSize {
|
||||
override def bitsize: Long = {
|
||||
val timerSize = initialization match {
|
||||
case Some(_) => 8L;
|
||||
case Some(_) => 8L
|
||||
case None => 1L
|
||||
}
|
||||
9L + timerSize
|
||||
|
|
@ -271,7 +271,7 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
|||
private val implant_entry_codec: Codec[ImplantEntry] = (
|
||||
("implant" | uint8L) ::
|
||||
(bool >>:~ { guard =>
|
||||
newcodecs.binary_choice(guard, uint(1), uint8L).hlist
|
||||
newcodecs.binary_choice(guard, uint(bits = 1), uint8L).hlist
|
||||
})
|
||||
).xmap[ImplantEntry](
|
||||
{
|
||||
|
|
@ -305,7 +305,7 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
|||
(
|
||||
uint8 >>:~ { size =>
|
||||
conditional(size > 0, dcd_extra1_codec(padFunc(size))) ::
|
||||
PacketHelpers.listOfNSized(size - 1, dcd_extra1_codec(0))
|
||||
PacketHelpers.listOfNSized(size - 1, dcd_extra1_codec(pad = 0))
|
||||
}
|
||||
).xmap[List[DCDExtra1]](
|
||||
{
|
||||
|
|
@ -376,7 +376,7 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
|||
* `Codec` for a `ImprintingProgress` object.
|
||||
*/
|
||||
private val imprint_progress_codec: Codec[ImprintingProgress] = (
|
||||
uint(5) ::
|
||||
uint(bits = 5) ::
|
||||
uint8L
|
||||
).as[ImprintingProgress]
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
|||
def paddingCalculations(contextOffset: Option[Int], implants: List[ImplantEntry], prevLists: List[List[Any]])(
|
||||
currListLen: Long
|
||||
): Int = {
|
||||
paddingCalculations(3, contextOffset, implants, prevLists)(currListLen)
|
||||
paddingCalculations(base = 3, contextOffset, implants, prevLists)(currListLen)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -532,9 +532,9 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
|||
("stamina" | uint16L) ::
|
||||
conditional(suit == ExoSuitType.MAX, uint32L) ::
|
||||
("unk6" | uint16L) ::
|
||||
("unk7" | uint(3)) ::
|
||||
("unk7" | uint(bits = 3)) ::
|
||||
("unk8" | uint32L) ::
|
||||
("unk9" | PacketHelpers.listOfNSized(6, uint16L)) :: //always length of 6
|
||||
("unk9" | PacketHelpers.listOfNSized(size = 6, uint16L)) :: //always length of 6
|
||||
("certs" | listOfN(uint8L, Certification.codec))
|
||||
).exmap[DetailedCharacterA](
|
||||
{
|
||||
|
|
@ -591,7 +591,7 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
|||
|
||||
def b_codec(bep: Long, pad_length: Option[Int]): Codec[DetailedCharacterB] =
|
||||
(
|
||||
optional(bool, "unk1" | uint32L) ::
|
||||
("unk1" | optional(bool, uint32L)) ::
|
||||
(("implants" | PacketHelpers.listOfNSized(
|
||||
BattleRank.withExperience(bep).implantSlots,
|
||||
implant_entry_codec
|
||||
|
|
@ -607,17 +607,17 @@ object DetailedCharacterData extends Marshallable[DetailedCharacterData] {
|
|||
("unk6" | uint32L) ::
|
||||
("unk7" | uint32L) ::
|
||||
("unk8" | uint32L) ::
|
||||
(optional(isFalse, "imprinting" | imprint_progress_codec) >>:~ { imprinting =>
|
||||
(("imprinting" | optional(isFalse, imprint_progress_codec)) >>:~ { imprinting =>
|
||||
("unkA" | listOfN(uint16L, uint32L)) ::
|
||||
("unkB" | unkBCodec(
|
||||
paddingCalculations(
|
||||
displaceByOptionTest(pad_length, imprinting, 5),
|
||||
displaceByOptionTest(pad_length, imprinting, value = 5),
|
||||
implants,
|
||||
List(imprinting.toList, tut, fte, unk3, unk2)
|
||||
)
|
||||
)) ::
|
||||
("unkC" | bool) ::
|
||||
conditional(bep >= BattleRank.BR24.experience, "cosmetics" | Cosmetic.codec)
|
||||
("cosmetics" | conditional(bep >= BattleRank.BR24.experience, Cosmetic.codec))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ object DetailedConstructionToolData extends Marshallable[DetailedConstructionToo
|
|||
def apply(data: CommonFieldData): DetailedConstructionToolData = DetailedConstructionToolData(data, 0)
|
||||
|
||||
implicit val codec: Codec[DetailedConstructionToolData] = (
|
||||
("data" | CommonFieldData.codec(false)) ::
|
||||
("data" | CommonFieldData.codec(extra = false)) ::
|
||||
uint8 :: //n > 1 produces a stack of construction items (tends to crash the client)
|
||||
("mode" | uint16) ::
|
||||
uint2 ::
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ object DetailedPlayerData extends Marshallable[DetailedPlayerData] {
|
|||
drawn_slot: DrawnSlot.Value
|
||||
): DetailedPlayerData = {
|
||||
val appearance = basic_appearance(5)
|
||||
DetailedPlayerData(None, appearance, character_data(appearance.altModelBit), Some(inventory), drawn_slot)(false)
|
||||
DetailedPlayerData(None, appearance, character_data(appearance.altModelBit), Some(inventory), drawn_slot)(position_defined = false)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -91,7 +91,7 @@ object DetailedPlayerData extends Marshallable[DetailedPlayerData] {
|
|||
drawn_slot: DrawnSlot.Value
|
||||
): DetailedPlayerData = {
|
||||
val appearance = basic_appearance(5)
|
||||
DetailedPlayerData(None, appearance, character_data(appearance.altModelBit), None, drawn_slot)(false)
|
||||
DetailedPlayerData(None, appearance, character_data(appearance.altModelBit), None, drawn_slot)(position_defined = false)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -113,7 +113,7 @@ object DetailedPlayerData extends Marshallable[DetailedPlayerData] {
|
|||
drawn_slot: DrawnSlot.Value
|
||||
): DetailedPlayerData = {
|
||||
val appearance = basic_appearance(PlayerData.PaddingOffset(Some(pos)))
|
||||
DetailedPlayerData(Some(pos), appearance, character_data(appearance.altModelBit), Some(inventory), drawn_slot)(true)
|
||||
DetailedPlayerData(Some(pos), appearance, character_data(appearance.altModelBit), Some(inventory), drawn_slot)(position_defined = true)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -133,14 +133,14 @@ object DetailedPlayerData extends Marshallable[DetailedPlayerData] {
|
|||
drawn_slot: DrawnSlot.Value
|
||||
): DetailedPlayerData = {
|
||||
val appearance = basic_appearance(PlayerData.PaddingOffset(Some(pos)))
|
||||
DetailedPlayerData(Some(pos), appearance, character_data(appearance.altModelBit), None, drawn_slot)(true)
|
||||
DetailedPlayerData(Some(pos), appearance, character_data(appearance.altModelBit), None, drawn_slot)(position_defined = true)
|
||||
}
|
||||
|
||||
def codec(position_defined: Boolean): Codec[DetailedPlayerData] =
|
||||
(conditional(position_defined, "pos" | PlacementData.codec) >>:~ { pos =>
|
||||
("basic_appearance" | CharacterAppearanceData.codec(PlayerData.PaddingOffset(pos))) >>:~ { app =>
|
||||
("character_data" | DetailedCharacterData.codec(app.a.exosuit, app.altModelBit)) ::
|
||||
optional(bool, "inventory" | InventoryData.codec_detailed) ::
|
||||
("inventory" | optional(bool, InventoryData.codec_detailed)) ::
|
||||
("drawn_slot" | DrawnSlot.codec) ::
|
||||
bool //usually false
|
||||
}
|
||||
|
|
@ -155,5 +155,5 @@ object DetailedPlayerData extends Marshallable[DetailedPlayerData] {
|
|||
}
|
||||
)
|
||||
|
||||
implicit val codec: Codec[DetailedPlayerData] = codec(false)
|
||||
implicit val codec: Codec[DetailedPlayerData] = codec(position_defined = false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ object DetailedREKData extends Marshallable[DetailedREKData] {
|
|||
uint16L ::
|
||||
uint4L ::
|
||||
("unk" | uint8) ::
|
||||
uint(7)
|
||||
uint(bits = 7)
|
||||
).exmap[DetailedREKData](
|
||||
{
|
||||
case data :: 2 :: 0 :: 8 :: unk :: 0 :: HNil =>
|
||||
|
|
|
|||
|
|
@ -56,11 +56,11 @@ object DetailedWeaponData extends Marshallable[DetailedWeaponData] {
|
|||
DetailedWeaponData(
|
||||
CommonFieldData(
|
||||
PlanetSideEmpire(unk1 & 3),
|
||||
false,
|
||||
false,
|
||||
(unk2 & 8) == 8,
|
||||
bops = false,
|
||||
alternate = false,
|
||||
v1 = (unk2 & 8) == 8,
|
||||
None,
|
||||
(unk2 & 4) == 4,
|
||||
jammered = (unk2 & 4) == 4,
|
||||
None,
|
||||
None,
|
||||
PlanetSideGUID(0)
|
||||
|
|
@ -92,11 +92,11 @@ object DetailedWeaponData extends Marshallable[DetailedWeaponData] {
|
|||
DetailedWeaponData(
|
||||
CommonFieldData(
|
||||
PlanetSideEmpire(unk1 & 3),
|
||||
false,
|
||||
false,
|
||||
(unk2 & 8) == 8,
|
||||
bops = false,
|
||||
alternate = false,
|
||||
v1 = (unk2 & 8) == 8,
|
||||
None,
|
||||
(unk2 & 4) == 4,
|
||||
jammered = (unk2 & 4) == 4,
|
||||
None,
|
||||
None,
|
||||
PlanetSideGUID(0)
|
||||
|
|
@ -112,7 +112,7 @@ object DetailedWeaponData extends Marshallable[DetailedWeaponData] {
|
|||
uint8 ::
|
||||
("fire_mode" | uint8) ::
|
||||
uint2 ::
|
||||
optional(bool, "ammo" | InventoryData.codec_detailed) ::
|
||||
("ammo" | optional(bool, InventoryData.codec_detailed)) ::
|
||||
("unk" | bool)
|
||||
).exmap[DetailedWeaponData](
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ object DroppodData extends Marshallable[DroppodData] {
|
|||
("basic" | CommonFieldDataWithPlacement.codec) ::
|
||||
bool ::
|
||||
("health" | uint8L) :: //health
|
||||
uintL(5) :: //0x0
|
||||
uintL(bits = 5) :: //0x0
|
||||
uint4L :: //0xF
|
||||
uintL(6) :: //0x0
|
||||
uintL(bits = 6) :: //0x0
|
||||
("boosters" | uint4L) :: //0x9 on standby, 0x0 when burning and occupied (basic.player_guid?)
|
||||
("unk" | bool)
|
||||
).exmap[DroppodData](
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ object HandheldData extends Marshallable[HandheldData] {
|
|||
implicit val codec: Codec[HandheldData] = (
|
||||
("data" | CommonFieldData.codec) ::
|
||||
("mode" | uint8) ::
|
||||
("unk" | uint(3))
|
||||
("unk" | uint(bits = 3))
|
||||
).exmap[HandheldData](
|
||||
{
|
||||
case data :: mode :: unk :: HNil =>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ object InternalSlot {
|
|||
* Used for `0x18` `ObjectCreateDetailedMessage` packets
|
||||
*/
|
||||
val codec_detailed: Codec[InternalSlot] = (
|
||||
("objectClass" | uintL(11)) >>:~ { obj_cls =>
|
||||
("objectClass" | uintL(bits = 11)) >>:~ { obj_cls =>
|
||||
("guid" | PlanetSideGUID.codec) ::
|
||||
("parentSlot" | PacketHelpers.encodedStringSize) ::
|
||||
("obj" | ObjectClass.selectDataDetailedCodec(obj_cls)) //it's fine for this call to fail
|
||||
|
|
@ -57,7 +57,7 @@ object InternalSlot {
|
|||
* Used for `0x17` `ObjectCreateMessage` packets
|
||||
*/
|
||||
val codec: Codec[InternalSlot] = (
|
||||
("objectClass" | uintL(11)) >>:~ { obj_cls =>
|
||||
("objectClass" | uintL(bits = 11)) >>:~ { obj_cls =>
|
||||
("guid" | PlanetSideGUID.codec) ::
|
||||
("parentSlot" | PacketHelpers.encodedStringSize) ::
|
||||
("obj" | ObjectClass.selectDataCodec(obj_cls)) //it's fine for this call to fail
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ object LargeDeployableData extends Marshallable[LargeDeployableData] {
|
|||
implicit val codec: Codec[LargeDeployableData] = (
|
||||
("deploy" | CommonFieldDataWithPlacement.codec2) ::
|
||||
("health" | uint8L) ::
|
||||
uintL(7) ::
|
||||
uintL(bits = 7) ::
|
||||
uint4L ::
|
||||
uint2L ::
|
||||
optional(bool, "internals" | InventoryData.codec)
|
||||
("internals" | optional(bool, InventoryData.codec))
|
||||
).exmap[LargeDeployableData](
|
||||
{
|
||||
case deploy :: health :: 0 :: 0xf :: 0 :: internals :: HNil =>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,11 @@ object LockerContainerData extends Marshallable[LockerContainerData] {
|
|||
new LockerContainerData(Some(InventoryData(inventory)))
|
||||
|
||||
implicit val codec: Codec[LockerContainerData] = (
|
||||
uint32 :: uint32 :: uint(17) ::
|
||||
uint32 ::
|
||||
uint32 ::
|
||||
uint(bits = 17) ::
|
||||
uint2L ::
|
||||
uint(21) ::
|
||||
uint(bits = 21) ::
|
||||
("inventory" | optional(bool, InventoryData.codec))
|
||||
).exmap[LockerContainerData](
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1216,22 +1216,21 @@ object ObjectClass {
|
|||
case ObjectClass.advanced_ace => DroppedItemData(HandheldData.codec, "advanced ace")
|
||||
case ObjectClass.router_telepad => DroppedItemData(HandheldData.codec, "router telepad")
|
||||
case ObjectClass.boomer_trigger => DroppedItemData(HandheldData.codec, "boomer trigger")
|
||||
case ObjectClass.boomer => ConstructorData(CommonFieldDataWithPlacement.codec2, "ace deployable")
|
||||
case ObjectClass.he_mine => ConstructorData(CommonFieldDataWithPlacement.codec2, "ace deployable")
|
||||
case ObjectClass.jammer_mine => ConstructorData(CommonFieldDataWithPlacement.codec2, "ace deployable")
|
||||
case ObjectClass.motionalarmsensor => ConstructorData(CommonFieldDataWithPlacement.codec2, "ace deployable")
|
||||
case ObjectClass.sensor_shield => ConstructorData(CommonFieldDataWithPlacement.codec2, "ace deployable")
|
||||
case ObjectClass.boomer => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable")
|
||||
case ObjectClass.he_mine => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable")
|
||||
case ObjectClass.jammer_mine => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable")
|
||||
case ObjectClass.motionalarmsensor => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable")
|
||||
case ObjectClass.sensor_shield => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable")
|
||||
case ObjectClass.spitfire_aa => ConstructorData(SmallTurretData.codec, "small turret")
|
||||
case ObjectClass.spitfire_cloaked => ConstructorData(SmallTurretData.codec, "small turret")
|
||||
case ObjectClass.spitfire_turret => ConstructorData(SmallTurretData.codec, "small turret")
|
||||
case ObjectClass.tank_traps => ConstructorData(TRAPData.codec, "trap")
|
||||
case ObjectClass.deployable_shield_generator =>
|
||||
ConstructorData(AegisShieldGeneratorData.codec, "shield generator")
|
||||
case ObjectClass.portable_manned_turret => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.portable_manned_turret_nc => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.portable_manned_turret_tr => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.portable_manned_turret_vs => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.router_telepad_deployable => DroppedItemData(TelepadDeployableData.codec, "telepad deployable")
|
||||
case ObjectClass.deployable_shield_generator => ConstructorData(AegisShieldGeneratorData.codec, "shield generator")
|
||||
case ObjectClass.portable_manned_turret => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.portable_manned_turret_nc => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.portable_manned_turret_tr => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.portable_manned_turret_vs => ConstructorData(OneMannedFieldTurretData.codec, "field turret")
|
||||
case ObjectClass.router_telepad_deployable => DroppedItemData(TelepadDeployableData.codec, "telepad deployable")
|
||||
//projectiles
|
||||
case ObjectClass.aphelion_plasma_cloud => ConstructorData(RadiationCloudData.codec, "radiation cloud")
|
||||
case ObjectClass.aphelion_starfire_projectile => ConstructorData(RemoteProjectileData.codec, "projectile")
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ final case class OneMannedFieldTurretData(
|
|||
}
|
||||
|
||||
object OneMannedFieldTurretData extends Marshallable[OneMannedFieldTurretData] {
|
||||
|
||||
/**
|
||||
* Overloaded constructor that mandates information about the internal weapon of the field turret.
|
||||
* @param deploy data common to objects spawned by the (advanced) adaptive construction engine
|
||||
|
|
@ -55,10 +54,10 @@ object OneMannedFieldTurretData extends Marshallable[OneMannedFieldTurretData] {
|
|||
PlanetSideGUID.codec :: //hoist/extract with the deploy.owner_guid in field above
|
||||
bool ::
|
||||
("health" | uint8L) ::
|
||||
uint(5) ::
|
||||
uint(bits = 5) ::
|
||||
uint4 ::
|
||||
uint2 ::
|
||||
optional(bool, "internals" | InventoryData.codec)
|
||||
("internals" | optional(bool, InventoryData.codec))
|
||||
).exmap[OneMannedFieldTurretData](
|
||||
{
|
||||
case deploy :: player :: false :: health :: 0 :: 0xf :: 0 :: internals :: HNil =>
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ object OrbitalShuttleData extends Marshallable[OrbitalShuttleData] {
|
|||
|
||||
implicit val codec: Codec[OrbitalShuttleData] = (
|
||||
("faction" | PlanetSideEmpire.codec) ::
|
||||
uintL(25) ::
|
||||
uintL(bits = 25) ::
|
||||
uint8L :: //255
|
||||
uintL(5) ::
|
||||
uintL(bits = 5) ::
|
||||
uint4L :: //7
|
||||
uint2L
|
||||
).exmap[OrbitalShuttleData](
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ object PlayerData extends Marshallable[PlayerData] {
|
|||
): PlayerData = {
|
||||
val appearance = basic_appearance(5)
|
||||
PlayerData(None, appearance, character_data(appearance.altModelBit.isDefined, true), Some(inventory), drawn_slot)(
|
||||
false
|
||||
position_defined = false
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ object PlayerData extends Marshallable[PlayerData] {
|
|||
drawn_slot: DrawnSlot.Type
|
||||
): PlayerData = {
|
||||
val appearance = basic_appearance(5)
|
||||
PlayerData(None, appearance, character_data(appearance.altModelBit.isDefined, true), None, drawn_slot)(false)
|
||||
PlayerData(None, appearance, character_data(appearance.altModelBit.isDefined, true), None, drawn_slot)(position_defined = false)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -124,7 +124,7 @@ object PlayerData extends Marshallable[PlayerData] {
|
|||
character_data(appearance.altModelBit.isDefined, false),
|
||||
Some(inventory),
|
||||
drawn_slot
|
||||
)(true)
|
||||
)(position_defined = true)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -144,7 +144,7 @@ object PlayerData extends Marshallable[PlayerData] {
|
|||
drawn_slot: DrawnSlot.Type
|
||||
): PlayerData = {
|
||||
val appearance = basic_appearance(PaddingOffset(Some(pos)))
|
||||
PlayerData(Some(pos), appearance, character_data(appearance.altModelBit.isDefined, false), None, drawn_slot)(true)
|
||||
PlayerData(Some(pos), appearance, character_data(appearance.altModelBit.isDefined, false), None, drawn_slot)(position_defined = true)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -205,7 +205,7 @@ object PlayerData extends Marshallable[PlayerData] {
|
|||
CharacterData.codec(app.b.backpack),
|
||||
CharacterData.codec_seated(app.b.backpack)
|
||||
)) ::
|
||||
optional(bool, "inventory" | InventoryData.codec) ::
|
||||
("inventory" | optional(bool, InventoryData.codec)) ::
|
||||
("drawn_slot" | DrawnSlot.codec) ::
|
||||
bool //usually false
|
||||
}
|
||||
|
|
@ -232,14 +232,14 @@ object PlayerData extends Marshallable[PlayerData] {
|
|||
(
|
||||
("basic_appearance" | CharacterAppearanceData.codec(offset)) >>:~ { app =>
|
||||
("character_data" | CharacterData.codec_seated(app.b.backpack)) ::
|
||||
optional(bool, "inventory" | InventoryData.codec) ::
|
||||
("inventory" | optional(bool, InventoryData.codec)) ::
|
||||
("drawn_slot" | DrawnSlot.codec) ::
|
||||
bool //usually false
|
||||
}
|
||||
).xmap[PlayerData](
|
||||
{
|
||||
case app :: data :: inv :: hand :: _ :: HNil =>
|
||||
PlayerData(None, app, data, inv, hand)(false)
|
||||
PlayerData(None, app, data, inv, hand)(position_defined = false)
|
||||
},
|
||||
{
|
||||
case PlayerData(_, app, data, inv, hand) =>
|
||||
|
|
@ -247,5 +247,5 @@ object PlayerData extends Marshallable[PlayerData] {
|
|||
}
|
||||
)
|
||||
|
||||
implicit val codec: Codec[PlayerData] = codec(false)
|
||||
implicit val codec: Codec[PlayerData] = codec(position_defined = false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ object REKData extends Marshallable[REKData] {
|
|||
implicit val codec: Codec[REKData] = (
|
||||
("data" | CommonFieldData.codec2) ::
|
||||
("unk1" | uint16) ::
|
||||
("unk2" | uint(10))
|
||||
("unk2" | uint(bits = 10))
|
||||
).exmap[REKData](
|
||||
{
|
||||
case data :: u1 :: u2 :: HNil =>
|
||||
|
|
|
|||
|
|
@ -26,19 +26,19 @@ object FlightPhysics extends Enumeration {
|
|||
type Type = Value
|
||||
|
||||
//valid (extremely small distance) (requires non-zero unk4, unk5)
|
||||
val State3 = Value(3)
|
||||
val State3: FlightPhysics.Value = Value(3)
|
||||
//valid (infinite) (if unk4 == 0 unk5 == 0, minimum distance + time)
|
||||
val State4 = Value(4)
|
||||
val State4: FlightPhysics.Value = Value(4)
|
||||
//valid(infinite)
|
||||
val State5 = Value(5)
|
||||
val State5: FlightPhysics.Value = Value(5)
|
||||
//valid (uses velocity) (infinite)
|
||||
val State6 = Value(6)
|
||||
val State6: FlightPhysics.Value = Value(6)
|
||||
//valid (uses velocity) (infinite)
|
||||
val State7 = Value(7)
|
||||
val State7: FlightPhysics.Value = Value(7)
|
||||
//valid (uses velocity) (time > 0 is infinite) (unk5 == 2)
|
||||
val State15 = Value(15)
|
||||
val State15: FlightPhysics.Value = Value(15)
|
||||
|
||||
implicit val codec = PacketHelpers.createEnumerationCodec(this, uint4L)
|
||||
implicit val codec: Codec[FlightPhysics.Value] = PacketHelpers.createEnumerationCodec(this, uint4L)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ object SmallTurretData extends Marshallable[SmallTurretData] {
|
|||
new SmallTurretData(deploy, health, Some(internals))
|
||||
|
||||
implicit val codec: Codec[SmallTurretData] = (
|
||||
("deploy" | CommonFieldDataWithPlacement.codec2) ::
|
||||
("deploy" | CommonFieldDataWithPlacement.codec) ::
|
||||
("health" | uint8L) ::
|
||||
uintL(7) ::
|
||||
uintL(bits = 7) ::
|
||||
uint4L ::
|
||||
uint2L ::
|
||||
optional(bool, "internals" | InventoryData.codec)
|
||||
("internals" | optional(bool, InventoryData.codec))
|
||||
).exmap[SmallTurretData](
|
||||
{
|
||||
case deploy :: health :: 0 :: 0xf :: 0 :: internals :: HNil =>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ final case class TRAPData(deploy: CommonFieldDataWithPlacement, health: Int) ext
|
|||
|
||||
object TRAPData extends Marshallable[TRAPData] {
|
||||
implicit val codec: Codec[TRAPData] = (
|
||||
("deploy" | CommonFieldDataWithPlacement.codec2) ::
|
||||
("deploy" | CommonFieldDataWithPlacement.codec) ::
|
||||
("health" | uint8L) ::
|
||||
uint(7) ::
|
||||
uint(bits = 7) ::
|
||||
uint4L ::
|
||||
uint(3)
|
||||
uint(bits = 3)
|
||||
).exmap[TRAPData](
|
||||
{
|
||||
case deploy :: health :: 0 :: 15 :: 0 :: HNil =>
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ object VehicleData extends Marshallable[VehicleData] {
|
|||
cloak: Boolean,
|
||||
inventory: Option[InventoryData]
|
||||
): VehicleData = {
|
||||
VehicleData(pos, basic, false, health, false, false, driveState, false, false, cloak, None, inventory)(
|
||||
VehicleData(pos, basic, unk3 = false, health, unk4 = false, no_mount_points = false, driveState, unk5 = false, unk6 = false, cloak = cloak, None, inventory)(
|
||||
VehicleFormat.Normal
|
||||
)
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ object VehicleData extends Marshallable[VehicleData] {
|
|||
format: UtilityVehicleData,
|
||||
inventory: Option[InventoryData]
|
||||
): VehicleData = {
|
||||
VehicleData(pos, basic, false, health, false, false, driveState, false, false, cloak, Some(format), inventory)(
|
||||
VehicleData(pos, basic, unk3 = false, health, unk4 = false, no_mount_points = false, driveState, unk5 = false, unk6 = false, cloak = cloak, Some(format), inventory)(
|
||||
VehicleFormat.Utility
|
||||
)
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ object VehicleData extends Marshallable[VehicleData] {
|
|||
format: VariantVehicleData,
|
||||
inventory: Option[InventoryData]
|
||||
): VehicleData = {
|
||||
VehicleData(pos, basic, false, health, false, false, driveState, false, false, cloak, Some(format), inventory)(
|
||||
VehicleData(pos, basic, unk3 = false, health, unk4 = false, no_mount_points = false, driveState, unk5 = false, unk6 = false, cloak = cloak, Some(format), inventory)(
|
||||
VehicleFormat.Variant
|
||||
)
|
||||
}
|
||||
|
|
@ -227,8 +227,8 @@ object VehicleData extends Marshallable[VehicleData] {
|
|||
("unk5" | bool) :: //unknown but generally false; can cause stream misalignment if set when unexpectedly
|
||||
("unk6" | bool) ::
|
||||
("cloak" | bool) :: //cloak as wraith, phantasm
|
||||
conditional(vehicle_type != VehicleFormat.Normal,"vehicle_format_data" | selectFormatReader(vehicle_type)) ::
|
||||
optional(bool, target = "inventory" | MountableInventory.custom_inventory_codec(pos.vel.isDefined, vehicle_type))
|
||||
("vehicle_format_data" | conditional(vehicle_type != VehicleFormat.Normal, selectFormatReader(vehicle_type))) ::
|
||||
("inventory" | optional(bool, MountableInventory.custom_inventory_codec(pos.vel.isDefined, vehicle_type)))
|
||||
}
|
||||
).exmap[VehicleData](
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ object WeaponData extends Marshallable[WeaponData] {
|
|||
WeaponData(
|
||||
CommonFieldData(
|
||||
PlanetSideEmpire(unk1 & 3),
|
||||
false,
|
||||
false,
|
||||
bops = false,
|
||||
alternate = false,
|
||||
(unk2 & 8) == 8,
|
||||
None,
|
||||
(unk2 & 4) == 4,
|
||||
|
|
@ -91,8 +91,8 @@ object WeaponData extends Marshallable[WeaponData] {
|
|||
WeaponData(
|
||||
CommonFieldData(
|
||||
PlanetSideEmpire(unk1 & 3),
|
||||
false,
|
||||
false,
|
||||
bops = false,
|
||||
alternate = false,
|
||||
(unk2 & 8) == 8,
|
||||
None,
|
||||
(unk2 & 4) == 4,
|
||||
|
|
@ -137,8 +137,8 @@ object WeaponData extends Marshallable[WeaponData] {
|
|||
WeaponData(
|
||||
CommonFieldData(
|
||||
PlanetSideEmpire(unk1 & 3),
|
||||
false,
|
||||
false,
|
||||
bops = false,
|
||||
alternate = false,
|
||||
(unk2 & 8) == 8,
|
||||
None,
|
||||
(unk2 & 4) == 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue