mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-01 03:03:39 +00:00
* adding chat and event messages that have been neglected since; these are easy additions * completely retooled water interactions for players and vehicles to handle a wading status, before drowning; when player with llu or vehicle with player with llu come into contact with water in this wading state, the llu is lost and the facility hack ends; adding messages to support this and differentiate from an llu facility capture timeout * periodic message while the llu is active, whether or not there is a carrier, until the hack is finished * message when inventory is full (assumes player inventory destination, but item winds up in hand due to lack of space, but it works) * when changing exo-suits, complain if equipment has to be deleted; dropped equipment is limited to special equipment; report a player pointlessly * announce ams decay to players who have just spawned on an ams, when they spawn on that ams, and for the last round of spawnees when the vehicle finally deconstructs; due to use of the word 'bound' this may be an incorrect application, but matrixing doesn't work anyway * deconstruction message for would-be driver when vehicle is abandoned on spawn pad; tempo on message delivery is different than usual * message when player is kicked from orbital shuttle gantry; message when player attempts to bail in a warp gate; message when player attempts to bail from a droppod; stop player from succeeding in bailing from a droppod * vehicle pad deconstruction complete message; message when nc max shield deactivates when out of capacitor power or when max opens fire; message when ams can not deploy because it is blocked by other entities; message when facility capture requires ntu * message for deployables being blocked; cleaning up dev test section * Yellow Ownership (#1226) * just some tinkering and clean-up * converted DeployItem from AvatarService to LocalService; attempt at resolving missing overwhip yellow ring is complicated; vehicle ownership packet wqorks on deployables that are mountable, but is less successful on normal simple deployables * 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 * initial packet for GenericObjectAction2Message and tests; repaired transcoders and tests for TRAP and small turrets * force redraw of the whole boomer to assert reassignment of ownership; it's heavy-handed but it works * deployable ownership should be asserted during both re-zoning and revival; refactoring of code in ZoningOperations * message when inventory is full (assumes player inventory destination, but item winds up in hand due to lack of space, but it works) * vehicle deployment messages added in, then deployment was fixed to accommodate an explicit caller, and that changed a whole lot of the deployment loop for messages; environmental activity was modified to maointain a more responsible start/stop transition; many many test changes (still an issue with a lot of them) * moving around conditions for losing the llu * 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 * duplicate capture lost message eliminated; flag lost violently due to environment in general rather than just water interaction; flag lost violently due to warp gate envelope interaction; flag lost due to be dropped in an unsafe position * vary the testing depth for water interaction * darn tests * fixed vehicle interference; added missing ArmorShieldOff message; clearing countdown after vehicle spawn should stop countdown from appearing in subsequent vehicle spawns * the router needs 20m of clearance * removing the shared group interference information from routers
48 lines
1.5 KiB
Scala
48 lines
1.5 KiB
Scala
// Copyright (c) 2020 PSForever
|
|
package objects
|
|
|
|
import akka.actor.DeadLetter
|
|
import akka.testkit.TestProbe
|
|
import base.ActorTest
|
|
import net.psforever.objects.Default
|
|
import org.specs2.mutable.Specification
|
|
|
|
import scala.concurrent.duration._
|
|
|
|
class DefaultTest extends Specification {
|
|
"Default.Cancellable" should {
|
|
"always act like it can be cancelled successfully" in {
|
|
Default.Cancellable.cancel() mustEqual true
|
|
}
|
|
|
|
"always act like it was cancelled successfully" in {
|
|
Default.Cancellable.isCancelled mustEqual true
|
|
}
|
|
}
|
|
}
|
|
|
|
//class DefaultActorStartedTest extends ActorTest {
|
|
// "Default.Actor" should {
|
|
// "send messages to deadLetters" in {
|
|
// //after being started
|
|
// val probe = new TestProbe(system)
|
|
// system.eventStream.subscribe(probe.ref, classOf[DeadLetter])
|
|
// Default.Actor ! "hello world"
|
|
// val msg1 = probe.receiveOne(5000 milliseconds)
|
|
// assert(msg1.isInstanceOf[DeadLetter])
|
|
// assert(msg1.asInstanceOf[DeadLetter].message equals "hello world")
|
|
//
|
|
// //if it was stopped
|
|
// system.stop(Default.Actor)
|
|
// Default.Actor ! "hello world"
|
|
// val msg2 = probe.receiveOne(5000 milliseconds)
|
|
// assert(msg2.isInstanceOf[DeadLetter])
|
|
// assert(msg2.asInstanceOf[DeadLetter].message equals "hello world")
|
|
// }
|
|
// }
|
|
//}
|
|
|
|
object DefaultActorTest {
|
|
//due to being a singleton, the original original value of the Default.Actor is cached here
|
|
val Original = Default.Actor
|
|
}
|