The Blockmap (#852)

* separating geometry classes

* 2d geometry; retirement of the *3D suffix

* makings of an early block map datastructure

* entities in a zone - players, corpses, vehicles, deployables, ground clutter, and buildings - divided between sectors of the zone upon creation, management, or mounting; superfluous messages to keep track of blockmap state, for now

* trait for entities to be added to the blockmap; internal entity data keeps track of current blockmap sector information; calls to add/remove/update functions changed

* modified pieces of environment into an entities that can be added to a block map and have a countable bounding region; fixes for vehicle control seat occcupant collection; fix for squad individual callback references (original issue still remains?)

* introduced the block map into various existijng game calculationa where target selection can be reduced by its probing

* he_mines and jammer_mines now trigger if a valid target is detected at the initial point of deploy; they also trigger later, after a valid target has moved into the arming range of the mine

* conversion of interactions with zone into a queued, periodic set of tasks

* explosive deployable control -> mine deployable control

* tests repaired and all tests working

* mostly comments and documentation

* amenities are now represented on the blockmap
This commit is contained in:
Fate-JH 2021-06-11 23:02:48 -04:00 committed by GitHub
parent 8bf0c4cbff
commit 3966b0264d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 2701 additions and 1011 deletions

View file

@ -4,6 +4,8 @@ package objects
import akka.actor.{ActorRef, Props}
import akka.testkit.TestProbe
import base.{ActorTest, FreedContextActorTest}
import akka.actor.typed.scaladsl.adapter._
import net.psforever.actors.zone.ZoneActor
import net.psforever.objects.avatar.{Avatar, Certification, PlayerControl}
import net.psforever.objects.{ConstructionItem, Deployables, GlobalDefinitions, Player}
import net.psforever.objects.ce.{Deployable, DeployedItem}
@ -32,6 +34,8 @@ class DeployableBehaviorSetupTest extends ActorTest {
override def AvatarEvents: ActorRef = eventsProbe.ref
override def LocalEvents: ActorRef = eventsProbe.ref
override def Deployables: ActorRef = deployables
this.actor = new TestProbe(system).ref.toTyped[ZoneActor.Command]
}
guid.register(jmine, number = 1)
jmine.Faction = PlanetSideEmpire.TR
@ -91,6 +95,8 @@ class DeployableBehaviorSetupOwnedP1Test extends ActorTest {
override def Deployables: ActorRef = deployables
override def Players = List(avatar)
override def LivePlayers = List(player)
this.actor = new TestProbe(system).ref.toTyped[ZoneActor.Command]
}
guid.register(jmine, number = 1)
guid.register(citem, number = 2)
@ -136,6 +142,8 @@ class DeployableBehaviorSetupOwnedP2Test extends FreedContextActorTest {
override def Players = List(avatar)
override def LivePlayers = List(player)
override def tasks: ActorRef = eventsProbe.ref
this.actor = new TestProbe(system).ref.toTyped[ZoneActor.Command]
}
guid.register(jmine, number = 1)
guid.register(citem, number = 2)
@ -238,6 +246,8 @@ class DeployableBehaviorDeconstructTest extends ActorTest {
override def LocalEvents: ActorRef = eventsProbe.ref
override def tasks: ActorRef = eventsProbe.ref
override def Deployables: ActorRef = deployables
this.actor = new TestProbe(system).ref.toTyped[ZoneActor.Command]
}
guid.register(jmine, number = 1)
jmine.Faction = PlanetSideEmpire.TR
@ -295,6 +305,8 @@ class DeployableBehaviorDeconstructOwnedTest extends FreedContextActorTest {
override def Players = List(avatar)
override def LivePlayers = List(player)
override def tasks: ActorRef = eventsProbe.ref
this.actor = new TestProbe(system).ref.toTyped[ZoneActor.Command]
}
guid.register(jmine, number = 1)
guid.register(citem, number = 2)