mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-24 00:53:35 +00:00
begin initialization of buildings and configuration of their amenities; reorganize entries in Maps.scala to better associate buildings and amenities
This commit is contained in:
parent
71173c171b
commit
77b4890706
5 changed files with 153 additions and 113 deletions
|
|
@ -50,9 +50,7 @@ class InterstellarCluster(zones : List[Zone]) extends Actor {
|
|||
}
|
||||
|
||||
case InterstellarCluster.RequestClientInitialization(tplayer) =>
|
||||
zones.foreach(zone => {
|
||||
sender ! Zone.ClientInitialization(zone.ClientInitialization()) //do this for each Zone
|
||||
})
|
||||
zones.foreach(zone => { sender ! Zone.ClientInitialization(zone.ClientInitialization()) })
|
||||
sender ! InterstellarCluster.ClientInitializationComplete(tplayer) //will be processed after all Zones
|
||||
|
||||
case _ => ;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import net.psforever.objects.guid.actor.UniqueNumberSystem
|
|||
import net.psforever.objects.guid.selector.RandomSelector
|
||||
import net.psforever.objects.guid.source.LimitedNumberSource
|
||||
import net.psforever.objects.serverobject.structures.{Amenity, Building}
|
||||
import net.psforever.packet.GamePacket
|
||||
import net.psforever.packet.game.PlanetSideGUID
|
||||
import net.psforever.types.Vector3
|
||||
|
||||
|
|
@ -218,6 +217,8 @@ class Zone(private val zoneId : String, zoneMap : ZoneMap, zoneNumber : Int) {
|
|||
|
||||
def Transport : ActorRef = transport
|
||||
|
||||
def Buildings : Map[Int, Building] = buildings
|
||||
|
||||
def Building(id : Int) : Option[Building] = {
|
||||
buildings.get(id)
|
||||
}
|
||||
|
|
@ -250,25 +251,7 @@ class Zone(private val zoneId : String, zoneMap : ZoneMap, zoneNumber : Int) {
|
|||
* - `ZonePopulationUpdateMessage`
|
||||
* @return a `List` of `GamePacket` messages
|
||||
*/
|
||||
def ClientInitialization() : List[GamePacket] = {
|
||||
//TODO unimplemented
|
||||
List.empty[GamePacket]
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide bulk correspondence on all server objects that can be composed into packet messages and reported to a client.
|
||||
* These messages are sent in this fashion at the time of joining a specific `Zone`:<br>
|
||||
* - `HackMessage`<br>
|
||||
* - `PlanetsideAttributeMessage`<br>
|
||||
* - `SetEmpireMessage`<br>
|
||||
* - `TimeOfDayMessage`<br>
|
||||
* - `WeatherMessage`
|
||||
* @return a `List` of `GamePacket` messages
|
||||
*/
|
||||
def ClientConfiguration() : List[GamePacket] = {
|
||||
//TODO unimplemented
|
||||
List.empty[GamePacket]
|
||||
}
|
||||
def ClientInitialization() : Zone = this
|
||||
}
|
||||
|
||||
object Zone {
|
||||
|
|
@ -308,11 +291,11 @@ object Zone {
|
|||
|
||||
/**
|
||||
* Message to report the packet messages that initialize the client.
|
||||
* @param list a `List` of `GamePacket` messages
|
||||
* @param zone a `Zone` to have its buildings and continental parameters turned into packet data
|
||||
* @see `Zone.ClientInitialization()`<br>
|
||||
* `InterstallarCluster`
|
||||
*/
|
||||
final case class ClientInitialization(list : List[GamePacket])
|
||||
final case class ClientInitialization(zone : Zone)
|
||||
|
||||
/**
|
||||
* Overloaded constructor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue