the question of one extra bit for small deployables; also, all tests pass successfully, tho resource silo use remains coin flip; what sorcery is this

This commit is contained in:
Fate-JH 2024-08-31 09:43:04 -04:00
parent af118be24d
commit ab1933ea76
8 changed files with 141 additions and 110 deletions

View file

@ -9,15 +9,15 @@ import net.psforever.types.PlanetSideGUID
import scala.util.{Failure, Success, Try} import scala.util.{Failure, Success, Try}
class SmallDeployableConverter extends ObjectCreateConverter[Deployable]() { class SmallDeployableConverter extends ObjectCreateConverter[Deployable]() {
override def ConstructorData(obj: Deployable): Try[CommonFieldDataWithPlacement] = { override def ConstructorData(obj: Deployable): Try[SmallDeployableData] = {
Success( Success(
CommonFieldDataWithPlacement( SmallDeployableData(CommonFieldDataWithPlacement(
PlacementData(obj.Position, obj.Orientation), PlacementData(obj.Position, obj.Orientation),
CommonFieldData( CommonFieldData(
obj.Faction, obj.Faction,
bops = false, bops = false,
alternate = obj.Destroyed, alternate = obj.Destroyed,
false, v1 = false,
None, None,
jammered = obj match { jammered = obj match {
case o: JammableUnit => o.Jammed case o: JammableUnit => o.Jammed
@ -30,10 +30,10 @@ class SmallDeployableConverter extends ObjectCreateConverter[Deployable]() {
case None => PlanetSideGUID(0) case None => PlanetSideGUID(0)
} }
) )
) ))
) )
} }
override def DetailedConstructorData(obj: Deployable): Try[CommonFieldDataWithPlacement] = override def DetailedConstructorData(obj: Deployable): Try[SmallDeployableData] =
Failure(new Exception("converter should not be used to generate detailed small deployable data")) Failure(new Exception("converter should not be used to generate detailed small deployable data"))
} }

View file

@ -1216,11 +1216,11 @@ object ObjectClass {
case ObjectClass.advanced_ace => DroppedItemData(HandheldData.codec, "advanced ace") case ObjectClass.advanced_ace => DroppedItemData(HandheldData.codec, "advanced ace")
case ObjectClass.router_telepad => DroppedItemData(HandheldData.codec, "router telepad") case ObjectClass.router_telepad => DroppedItemData(HandheldData.codec, "router telepad")
case ObjectClass.boomer_trigger => DroppedItemData(HandheldData.codec, "boomer trigger") case ObjectClass.boomer_trigger => DroppedItemData(HandheldData.codec, "boomer trigger")
case ObjectClass.boomer => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable") case ObjectClass.boomer => ConstructorData(SmallDeployableData.codec, "ace deployable")
case ObjectClass.he_mine => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable") case ObjectClass.he_mine => ConstructorData(SmallDeployableData.codec, "ace deployable")
case ObjectClass.jammer_mine => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable") case ObjectClass.jammer_mine => ConstructorData(SmallDeployableData.codec, "ace deployable")
case ObjectClass.motionalarmsensor => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable") case ObjectClass.motionalarmsensor => ConstructorData(SmallDeployableData.codec, "ace deployable")
case ObjectClass.sensor_shield => ConstructorData(CommonFieldDataWithPlacement.codec, "ace deployable") case ObjectClass.sensor_shield => ConstructorData(SmallDeployableData.codec, "ace deployable")
case ObjectClass.spitfire_aa => ConstructorData(SmallTurretData.codec, "small turret") case ObjectClass.spitfire_aa => ConstructorData(SmallTurretData.codec, "small turret")
case ObjectClass.spitfire_cloaked => 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.spitfire_turret => ConstructorData(SmallTurretData.codec, "small turret")

View file

@ -0,0 +1,32 @@
// Copyright (c) 2024 PSForever
package net.psforever.packet.game.objectcreate
import net.psforever.packet.Marshallable
import scodec.{Attempt, Codec, Err}
import scodec.codecs._
import shapeless.{::, HNil}
final case class SmallDeployableData(deploy: CommonFieldDataWithPlacement) extends ConstructorData {
override def bitsize: Long = {
deploy.bitsize + 1
}
}
object SmallDeployableData extends Marshallable[SmallDeployableData] {
implicit val codec: Codec[SmallDeployableData] = (
("deploy" | CommonFieldDataWithPlacement.codec) ::
ignore(size = 1)
).exmap[SmallDeployableData](
{
case deploy :: _ :: HNil =>
Attempt.successful(SmallDeployableData(deploy))
case data =>
Attempt.failure(Err(s"invalid small deployable data format - $data"))
},
{
case SmallDeployableData(deploy) =>
Attempt.successful(deploy :: () :: HNil)
}
)
}

View file

@ -20,7 +20,7 @@ class CommonFieldDataWithPlacementTest extends Specification {
guid mustEqual PlanetSideGUID(3840) guid mustEqual PlanetSideGUID(3840)
parent.isDefined mustEqual false parent.isDefined mustEqual false
data match { data match {
case CommonFieldDataWithPlacement(pos, com) => case SmallDeployableData(CommonFieldDataWithPlacement(pos, com)) =>
pos.coord mustEqual Vector3(4704.172f, 5546.4375f, 82.234375f) pos.coord mustEqual Vector3(4704.172f, 5546.4375f, 82.234375f)
pos.orient mustEqual Vector3.z(272.8125f) pos.orient mustEqual Vector3.z(272.8125f)
com match { com match {
@ -46,10 +46,10 @@ class CommonFieldDataWithPlacementTest extends Specification {
} }
"encode" in { "encode" in {
val obj = CommonFieldDataWithPlacement( val obj = SmallDeployableData(CommonFieldDataWithPlacement(
PlacementData(Vector3(4704.172f, 5546.4375f, 82.234375f), Vector3.z(272.8125f)), PlacementData(Vector3(4704.172f, 5546.4375f, 82.234375f), Vector3.z(272.8125f)),
CommonFieldData(PlanetSideEmpire.TR, bops = false, alternate = false, v1 = false, None, jammered = false, None, None, PlanetSideGUID(4145)) CommonFieldData(PlanetSideEmpire.TR, bops = false, alternate = false, v1 = false, None, jammered = false, None, None, PlanetSideGUID(4145))
) ))
val msg = ObjectCreateMessage(ObjectClass.boomer, PlanetSideGUID(3840), obj) val msg = ObjectCreateMessage(ObjectClass.boomer, PlanetSideGUID(3840), obj)
val pkt = PacketCoding.encodePacket(msg).require.toByteVector val pkt = PacketCoding.encodePacket(msg).require.toByteVector
pkt mustEqual string_boomer pkt mustEqual string_boomer

View file

@ -32,9 +32,9 @@ class ConverterTest extends Specification {
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
bops = false, bops = false,
alternate = false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -50,9 +50,9 @@ class ConverterTest extends Specification {
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
bops = false, bops = false,
alternate = false, alternate = false,
false, v1 = false,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -71,7 +71,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.DetailedConstructorData(obj) match { obj.Definition.Packet.DetailedConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual DetailedWeaponData( pkt mustEqual DetailedWeaponData(
CommonFieldData(PlanetSideEmpire.NEUTRAL, false, false, true, None, false, None, None, PlanetSideGUID(0)), CommonFieldData(PlanetSideEmpire.NEUTRAL, bops = false, alternate = false, v1 = true, None, jammered = false, None, None, PlanetSideGUID(0)),
0, 0,
List(InternalSlot(Ammo.shotgun_shell.id, PlanetSideGUID(90), 0, DetailedAmmoBoxData(8, 12))) List(InternalSlot(Ammo.shotgun_shell.id, PlanetSideGUID(90), 0, DetailedAmmoBoxData(8, 12)))
) )
@ -81,7 +81,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.ConstructorData(obj) match { obj.Definition.Packet.ConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual WeaponData( pkt mustEqual WeaponData(
CommonFieldData(PlanetSideEmpire.NEUTRAL, false, false, true, None, false, None, None, PlanetSideGUID(0)), CommonFieldData(PlanetSideEmpire.NEUTRAL, bops = false, alternate = false, v1 = true, None, jammered = false, None, None, PlanetSideGUID(0)),
0, 0,
List( List(
InternalSlot( InternalSlot(
@ -90,11 +90,11 @@ class ConverterTest extends Specification {
0, 0,
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
false, v1 = false,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -115,7 +115,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.DetailedConstructorData(obj) match { obj.Definition.Packet.DetailedConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual DetailedWeaponData( pkt mustEqual DetailedWeaponData(
CommonFieldData(PlanetSideEmpire.NEUTRAL, false, false, true, None, false, None, None, PlanetSideGUID(0)), CommonFieldData(PlanetSideEmpire.NEUTRAL, bops = false, alternate = false, v1 = true, None, jammered = false, None, None, PlanetSideGUID(0)),
0, 0,
List( List(
InternalSlot(Ammo.bullet_9mm.id, PlanetSideGUID(90), 0, DetailedAmmoBoxData(8, 30)), InternalSlot(Ammo.bullet_9mm.id, PlanetSideGUID(90), 0, DetailedAmmoBoxData(8, 30)),
@ -132,17 +132,17 @@ class ConverterTest extends Specification {
PlanetSideEmpire.NEUTRAL, //TODO need faction affinity PlanetSideEmpire.NEUTRAL, //TODO need faction affinity
bops = false, bops = false,
alternate = false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
), ),
0, 0,
List( List(
InternalSlot(Ammo.bullet_9mm.id, PlanetSideGUID(90), 0, CommonFieldData()(false)), InternalSlot(Ammo.bullet_9mm.id, PlanetSideGUID(90), 0, CommonFieldData()(flag = false)),
InternalSlot(Ammo.rocket.id, PlanetSideGUID(91), 1, CommonFieldData()(false)) InternalSlot(Ammo.rocket.id, PlanetSideGUID(91), 1, CommonFieldData()(flag = false))
) )
) )
case _ => case _ =>
@ -164,7 +164,7 @@ class ConverterTest extends Specification {
} }
obj.Definition.Packet.ConstructorData(obj) match { obj.Definition.Packet.ConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual CommonFieldData()(false) pkt mustEqual CommonFieldData()(flag = false)
case _ => case _ =>
ko ko
} }
@ -177,7 +177,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.DetailedConstructorData(obj) match { obj.Definition.Packet.DetailedConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual DetailedConstructionToolData( pkt mustEqual DetailedConstructionToolData(
CommonFieldData(PlanetSideEmpire.NEUTRAL, false, false, true, None, false, None, None, PlanetSideGUID(0)) CommonFieldData(PlanetSideEmpire.NEUTRAL, bops = false, alternate = false, v1 = true, None, jammered = false, None, None, PlanetSideGUID(0))
) )
case _ => case _ =>
ko ko
@ -188,11 +188,11 @@ class ConverterTest extends Specification {
pkt mustEqual HandheldData( pkt mustEqual HandheldData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -216,11 +216,11 @@ class ConverterTest extends Specification {
pkt mustEqual DetailedREKData( pkt mustEqual DetailedREKData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, //TODO faction affinity PlanetSideEmpire.NEUTRAL, //TODO faction affinity
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -234,11 +234,11 @@ class ConverterTest extends Specification {
pkt mustEqual REKData( pkt mustEqual REKData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -257,7 +257,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.DetailedConstructorData(obj) match { obj.Definition.Packet.DetailedConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual DetailedConstructionToolData( pkt mustEqual DetailedConstructionToolData(
CommonFieldData(PlanetSideEmpire.NEUTRAL, false, false, true, None, false, None, None, PlanetSideGUID(0)) CommonFieldData(PlanetSideEmpire.NEUTRAL, bops = false, alternate = false, v1 = true, None, jammered = false, None, None, PlanetSideGUID(0))
) )
case _ => case _ =>
ko ko
@ -265,7 +265,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.ConstructorData(obj) match { obj.Definition.Packet.ConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual HandheldData( pkt mustEqual HandheldData(
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))
) )
case _ => case _ =>
ko ko
@ -282,11 +282,11 @@ class ConverterTest extends Specification {
pkt mustEqual HandheldData( pkt mustEqual HandheldData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
false, v1 = false,
None, None,
false, jammered = false,
None, None,
Some(1001), Some(1001),
PlanetSideGUID(0) PlanetSideGUID(0)
@ -301,11 +301,11 @@ class ConverterTest extends Specification {
pkt mustEqual DetailedConstructionToolData( pkt mustEqual DetailedConstructionToolData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
Some(1001), Some(1001),
PlanetSideGUID(0) PlanetSideGUID(0)
@ -333,20 +333,20 @@ class ConverterTest extends Specification {
obj.Definition.Packet.ConstructorData(obj) match { obj.Definition.Packet.ConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual CommonFieldDataWithPlacement( pkt mustEqual SmallDeployableData(CommonFieldDataWithPlacement(
PlacementData(Vector3.Zero, Vector3.Zero), PlacementData(Vector3.Zero, Vector3.Zero),
CommonFieldData( CommonFieldData(
PlanetSideEmpire.TR, PlanetSideEmpire.TR,
false, bops = false,
false, alternate = false,
false, v1 = false,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
) )
) ))
case _ => case _ =>
ko ko
} }
@ -369,11 +369,11 @@ class ConverterTest extends Specification {
PlacementData(Vector3.Zero, Vector3.Zero), PlacementData(Vector3.Zero, Vector3.Zero),
CommonFieldData( CommonFieldData(
PlanetSideEmpire.TR, PlanetSideEmpire.TR,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -389,11 +389,11 @@ class ConverterTest extends Specification {
WeaponData( WeaponData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -406,11 +406,11 @@ class ConverterTest extends Specification {
0, 0,
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
false, v1 = false,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -444,11 +444,11 @@ class ConverterTest extends Specification {
PlacementData(Vector3.Zero, Vector3.Zero), PlacementData(Vector3.Zero, Vector3.Zero),
CommonFieldData( CommonFieldData(
PlanetSideEmpire.TR, PlanetSideEmpire.TR,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -464,11 +464,11 @@ class ConverterTest extends Specification {
WeaponData( WeaponData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -481,11 +481,11 @@ class ConverterTest extends Specification {
0, 0,
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
false, v1 = false,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -519,9 +519,9 @@ class ConverterTest extends Specification {
PlanetSideEmpire.TR, PlanetSideEmpire.TR,
bops = false, bops = false,
alternate = false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -584,9 +584,9 @@ class ConverterTest extends Specification {
PlanetSideEmpire.TR, PlanetSideEmpire.TR,
bops = false, bops = false,
alternate = false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
Some(1001), Some(1001),
PlanetSideGUID(5001) PlanetSideGUID(5001)
@ -616,9 +616,9 @@ class ConverterTest extends Specification {
PlanetSideEmpire.TR, PlanetSideEmpire.TR,
bops = false, bops = false,
alternate = true, alternate = true,
true, v1 = true,
None, None,
false, jammered = false,
None, None,
Some(1001), Some(1001),
PlanetSideGUID(0) PlanetSideGUID(0)
@ -751,7 +751,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.DetailedConstructorData(obj) match { obj.Definition.Packet.DetailedConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual DetailedLockerContainerData( pkt mustEqual DetailedLockerContainerData(
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)),
None None
) )
case _ => case _ =>
@ -783,11 +783,11 @@ class ConverterTest extends Specification {
DetailedREKData( DetailedREKData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -809,11 +809,11 @@ class ConverterTest extends Specification {
REKData( REKData(
CommonFieldData( CommonFieldData(
PlanetSideEmpire.NEUTRAL, PlanetSideEmpire.NEUTRAL,
false, bops = false,
false, alternate = false,
true, v1 = true,
None, None,
false, jammered = false,
Some(false), Some(false),
None, None,
PlanetSideGUID(0) PlanetSideGUID(0)
@ -841,7 +841,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.ConstructorData(obj) match { obj.Definition.Packet.ConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual CommonFieldData(PlanetSideEmpire.NEUTRAL)(false) pkt mustEqual CommonFieldData(PlanetSideEmpire.NEUTRAL)(flag = false)
case _ => case _ =>
ko ko
} }
@ -861,7 +861,7 @@ class ConverterTest extends Specification {
obj.Definition.Packet.ConstructorData(obj) match { obj.Definition.Packet.ConstructorData(obj) match {
case Success(pkt) => case Success(pkt) =>
pkt mustEqual CommonFieldData(PlanetSideEmpire.NEUTRAL)(false) pkt mustEqual CommonFieldData(PlanetSideEmpire.NEUTRAL)(flag = false)
case _ => case _ =>
ko ko
} }

View file

@ -104,11 +104,11 @@ class InteractsWithZoneEnvironmentTest extends ActorTest {
obj.Position = Vector3(1, 3, 2.7f) obj.Position = Vector3(1, 3, 2.7f)
obj.zoneInteractions() obj.zoneInteractions()
// val msg2 = testProbe.receiveOne(4.seconds) val msg2 = testProbe.receiveOne(4.seconds)
// msg2 match { msg2 match {
// case RespondsToZoneEnvironment.Timer(EnvironmentAttribute.Water, _, _, _) => () case RespondsToZoneEnvironment.Timer(EnvironmentAttribute.Water, _, _, _) => ()
// case _ => assert(false, "") case _ => assert(false, "")
// } }
testProbe.expectNoMessage() testProbe.expectNoMessage()
} }
@ -130,19 +130,19 @@ class InteractsWithZoneEnvironmentTest extends ActorTest {
obj.zoneInteractions() obj.zoneInteractions()
val msgs = testProbe.receiveN(4, 4.seconds) val msgs = testProbe.receiveN(4, 4.seconds)
msgs.head match { msgs.head match {
case Vitality.Damage(_) => () case RespondsToZoneEnvironment.StopTimer(EnvironmentAttribute.Water) => ()
case _ => assert(InteractsWithZoneEnvironmentTest.fail, "") case _ => assert(InteractsWithZoneEnvironmentTest.fail, "")
} }
msgs(1) match { msgs(1) match {
case AuraEffectBehavior.StartEffect(Aura.Fire, _) => () case Vitality.Damage(_) => ()
case _ => assert(InteractsWithZoneEnvironmentTest.fail, "") case _ => assert(InteractsWithZoneEnvironmentTest.fail, "")
} }
msgs(2) match { msgs(2) match {
case RespondsToZoneEnvironment.Timer(EnvironmentAttribute.Lava, _, _, _) => () case AuraEffectBehavior.StartEffect(Aura.Fire, _) => ()
case _ => assert(InteractsWithZoneEnvironmentTest.fail, "") case _ => assert(InteractsWithZoneEnvironmentTest.fail, "")
} }
msgs(3) match { msgs(3) match {
case RespondsToZoneEnvironment.StopTimer(EnvironmentAttribute.Water) => () case RespondsToZoneEnvironment.Timer(EnvironmentAttribute.Lava, _, _, _) => ()
case _ => assert(InteractsWithZoneEnvironmentTest.fail, "") case _ => assert(InteractsWithZoneEnvironmentTest.fail, "")
} }
} }

View file

@ -15,7 +15,6 @@ import net.psforever.objects.vehicles.{Utility, UtilityType}
import net.psforever.objects.zones.{Zone, ZoneDeployableActor, ZoneMap} import net.psforever.objects.zones.{Zone, ZoneDeployableActor, ZoneMap}
import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent import net.psforever.packet.game.objectcreate.ObjectCreateMessageParent
import net.psforever.packet.game._ import net.psforever.packet.game._
import net.psforever.services.avatar.{AvatarAction, AvatarServiceMessage}
import net.psforever.services.local.{LocalAction, LocalServiceMessage} import net.psforever.services.local.{LocalAction, LocalServiceMessage}
import net.psforever.types.{DriveState, PlanetSideGUID, Vector3} import net.psforever.types.{DriveState, PlanetSideGUID, Vector3}

View file

@ -14,7 +14,7 @@ import net.psforever.objects.guid.NumberPoolHub
import net.psforever.objects.guid.source.MaxNumberSource import net.psforever.objects.guid.source.MaxNumberSource
import net.psforever.objects.serverobject.CommonMessages import net.psforever.objects.serverobject.CommonMessages
import net.psforever.objects.serverobject.environment._ import net.psforever.objects.serverobject.environment._
import net.psforever.objects.serverobject.environment.interaction.{EscapeFromEnvironment, InteractingWithEnvironment, RespondsToZoneEnvironment} import net.psforever.objects.serverobject.environment.interaction.{InteractingWithEnvironment, RespondsToZoneEnvironment}
import net.psforever.objects.serverobject.environment.interaction.common.Watery.OxygenStateTarget import net.psforever.objects.serverobject.environment.interaction.common.Watery.OxygenStateTarget
import net.psforever.objects.serverobject.mount.Mountable import net.psforever.objects.serverobject.mount.Mountable
import net.psforever.objects.sourcing.VehicleSource import net.psforever.objects.sourcing.VehicleSource