Unique Number System Operations (#906)

* propagation of the ask pattern into the unique number actor

* TaskWorkflow as a replacement for TaskResolver; includes working tests

* AvailabilityPolicy has been changed slightly; number source restriction mechanic has been completely removed

* TaskResolver is gone and done and TaskWorkflow replaces it

* number pool variety

* every zone gets a custom tailored 'environment' number pool, as well as all other number pools; uns involves many more static functions and hard-defined variables

* repairs to uns and guidtask tests; worked uns into unops, an actorless version, but did not integrate into server

* shuffled around files in the guid package, causing import threshing; wrote extensive comments; repaired tests; classes related to the old unique number system have been removed

* created straightforward tasks; simplified number pool actor calls; repaired tests due to modifications to generic pool

* bad merge recovery
This commit is contained in:
Fate-JH 2021-08-15 21:27:45 -04:00 committed by GitHub
parent ce2a3f5422
commit 9841b7e97d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
114 changed files with 2323 additions and 3374 deletions

View file

@ -3,19 +3,21 @@ package objects.guidtask
import base.ActorTest
import net.psforever.objects._
import net.psforever.objects.guid.{GUIDTask, TaskResolver}
import net.psforever.objects.guid.{GUIDTask, TaskBundle, TaskWorkflow}
import scala.concurrent.duration._
class GUIDTaskRegisterAmmoTest extends ActorTest {
"RegisterEquipment -> RegisterObjectTask" in {
val (_, uns, taskResolver, probe) = GUIDTaskTest.CommonTestSetup
val obj = AmmoBox(GlobalDefinitions.energy_cell)
val (_, uns, probe) = GUIDTaskTest.CommonTestSetup
val obj = AmmoBox(GlobalDefinitions.energy_cell)
assert(!obj.HasGUID)
taskResolver ! TaskResolver.GiveTask(
TaskWorkflow.execute(TaskBundle(
new GUIDTaskTest.RegisterTestTask(probe.ref),
List(GUIDTask.RegisterEquipment(obj)(uns))
)
probe.expectMsg(scala.util.Success)
GUIDTask.registerEquipment(uns, obj)
))
probe.expectMsg(5.second, scala.util.Success(true))
assert(obj.HasGUID)
}
}