class CavernRotationService extends AnyRef
A service that assists routine access to a series of game zones
through the manipulation of connections between transmit point structures.
The caverns were a group of game zones that were intended to be situated underground.
Access to the caverns was only sometimes possible
through the use of special above-ground warp gates called geowarps (geowarp gates)
and those geowarps were not always functional.
Usually, two caverns were available at a time and connections to these caverns were fixed
to specific active geowarp gates.
The changing availability of the caverns through the change of geowarp gate activity
was colloquially referred to as a "rotation" since it followed a predictable cycle.
The cycle was not just one of time but one of route
as one specific geowarp gates would open to the same destination cavern.
The client controls warp gate destinations.
The server can only confirm those destinations.
The connectivity of a geowarp gate to a cavern warp gate had to have been determined
by opening the cavern with an appropriate packet
and checking the map description of the cavern gates.
The description text explains which of the geowarp gates in whichever zone has been connected; and,
where usually static and inanimate, that geowarp gate will bubble online and begin to rotate
and have a complementary destination map description.
Opening different combinations of caverns changes the destination these warp gate pairs will connect
and not always being connected at all.
The warp gate pairs for the cavern connections must be re-evaluated for each combination and with each rotation
and all relevant pairings must be defined in advance.
- Source
- CavernRotationService.scala
- See also
ActorContext
Building
ChatMsg
Config.app.game.cavernRotation
GalaxyService
GalaxyAction.LockedZoneUpdate
GalaxyResponse.UnlockedZoneUpdate
InterstellarClusterService
org.log4s.getLogger
resources/zonemaps/lattice.json
SessionActor
SessionActor.SendResponse
StashBuffer
WarpGate
Zone
ZoneForcedCavernConnectionsMessage
ZoneInfoMessage
- Alphabetic
- By Inheritance
- CavernRotationService
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def active(galaxyService: ActorRef): Behavior[Command]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- val firstClosingWarningAtMinutes: Int
how long before any given cavern closure that the first closing message is shown (minutes)
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hurryNextRotation(galaxyService: ActorRef, forcedRotationOverride: Boolean = false): Unit
Progress to the next significant cavern rotation event.
If the time until the next rotation is greater than the time where the cavern closing warning would be displayed, progress to that final cavern closing warning.Progress to the next significant cavern rotation event.
If the time until the next rotation is greater than the time where the cavern closing warning would be displayed, progress to that final cavern closing warning. Adjust the timing for that advancement. If the final cavern closing warning was already displayed, just perform the cavern rotation.- galaxyService
callback to update the server and clients; should be the reference to
GalaxyService
, hence the literal name- forcedRotationOverride
force a cavern rotation in a case where a closing warning would be displayed instead
- See also
GalaxyService
- def hurryRotationToZoneLock(zoneid: String, galaxyService: ActorRef): Boolean
na
na
- zoneid
zone to lock next
- galaxyService
callback to update the server and clients; should be the reference to
GalaxyService
, hence the literal name- returns
true
, if the target zone is locked when complete;false
, otherwise
- See also
GalaxyService
- def hurryRotationToZoneUnlock(zoneid: String, galaxyService: ActorRef): Boolean
na
na
- zoneid
zone to unlock next
- galaxyService
callback to update the server and clients; should be the reference to
GalaxyService
, hence the literal name- returns
true
, if the target zone is unlocked when complete;false
, otherwise
- See also
GalaxyService
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- var lockTimer: Cancellable
timer for cavern rotation - the cavern closing warning
- def lockTimerToDisplayWarning(duration: FiniteDuration, counter: Int = firstClosingWarningAtMinutes): Unit
Update the timer for the cavern closing message.
Update the timer for the cavern closing message.
- duration
new time until message display
- counter
the counter that indicates the next message to display
- def manageCaverns(zones: Seq[Zone]): Boolean
na
na
- zones
the zones for submission
- returns
true
, if the setup has been completed;false
, otherwise
- var managedZones: List[ZoneMonitor]
monitors for the cavern zones
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- var nextToLock: Int
index of the next cavern that will lock
- var nextToUnlock: Int
index of the next cavern that will unlock
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def reportRotationOrder(sendToSession: ActorRef): Unit
na
na
- sendToSession
callback reference
- def retimeZonesUponForcedAdvancement(advanceTimeBy: FiniteDuration, galaxyService: ActorRef): Unit
If the natural process of switching between caverns is hurried, advance the previous start time of each zone monitor to give the impression of the hastened rotation.
If the natural process of switching between caverns is hurried, advance the previous start time of each zone monitor to give the impression of the hastened rotation. This does not actually affect the functional timers nor is it in response to an actual zone rotation event. It only affects the backup parameters of the timers that are maintained by the zone monitors.
- advanceTimeBy
amount of time advancement
- galaxyService
callback to update the zone timers; should be the reference to
GalaxyService
, hence the literal name
- See also
GalaxyService
- def retimeZonesUponForcedRotation(galaxyService: ActorRef): Unit
If the zones are forced to rotate before the timer would normally complete, correct all of the zone monitors to give the impression of the rotation that occurred.
If the zones are forced to rotate before the timer would normally complete, correct all of the zone monitors to give the impression of the rotation that occurred. Only affect the backup parameters of the timers that are maintained by the zone monitors. Do not actually affect the functional timers.
- galaxyService
callback to update the zone timers; should be the reference to
GalaxyService
, hence the literal name
- See also
GalaxyService
- def sendCavernRotationUpdates(sendToSession: ActorRef): Unit
- sendToSession
callback reference
- var simultaneousUnlockedZones: Int
- def start(): Behavior[Command]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timeBetweenRotationsHours: Float
time between individual cavern rotation events (hours)
- var timeToCompleteAllRotationsHours: Float
period of all caverns having rotated (hours)
- def toString(): String
- Definition Classes
- AnyRef → Any
- var unlockTimer: Cancellable
timer for cavern rotation - the actual opening and closing functionality
- def unlockTimerToSwitchZone(duration: FiniteDuration): Unit
Update the timer for the zone switching process.
Update the timer for the zone switching process.
- duration
new time until switching
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def zoneRotationFunc(galaxyService: ActorRef): Unit
Actually perform zone rotation as determined by the managed zone monitors and the timers.
The process of zone rotation occurs by having a zone that is determined to be closing and a zone that is determied to be opening and a potential series of zones "in between" the two that are also open.Actually perform zone rotation as determined by the managed zone monitors and the timers.
The process of zone rotation occurs by having a zone that is determined to be closing and a zone that is determied to be opening and a potential series of zones "in between" the two that are also open. All of the currently opened zones are locked and the zone to be permanently closed is forgotten. The zone that should be opening is added to the aforementioned sequence of zones and then the zones in that sequence are opened. The zones that would otherwise be unaffected by a single zone opening and a single cone closing must be affected because the cavern gates will not connect to the same geowarp gates with the change in the sequence. After the rotation, the indices to the next closing zone and next opening zone are updated. Modifying the zone monitor timekeeping and the actual timers and the indices are the easy parts.- galaxyService
callback to update the server and clients; should be the reference to
GalaxyService
, hence the literal name
- See also
GalaxyService