mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-03-01 11:33:41 +00:00
Ensure tower pain fields start up correctly
This commit is contained in:
parent
61360d97e0
commit
01a8ecd39e
1 changed files with 9 additions and 5 deletions
|
|
@ -18,6 +18,8 @@ class PainboxControl(painbox: Painbox) extends Actor {
|
|||
var bBoxMaxCorner = Vector3.Zero
|
||||
var bBoxMidPoint = Vector3.Zero
|
||||
|
||||
var disabled = false // Temporary to disable cavern non-radius fields
|
||||
|
||||
def receive: Receive = {
|
||||
case "startup" =>
|
||||
if (painbox.Definition.HasNearestDoorDependency) {
|
||||
|
|
@ -35,14 +37,12 @@ class PainboxControl(painbox: Painbox) extends Actor {
|
|||
case _ =>
|
||||
log.error(s"Painbox ${painbox.GUID} on ${painbox.Owner.Continent} - ${painbox.Position} can not find a door that it is dependent on")
|
||||
}
|
||||
|
||||
context.become(Stopped)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (painbox.Definition.Radius == 0f) {
|
||||
if (painbox.Owner.Continent.matches("c[0-9]")) {
|
||||
// todo: handle non-radius painboxes in caverns properly
|
||||
log.warn(s"Skipping initialization of ${painbox.GUID} on ${painbox.Owner.Continent} - ${painbox.Position}")
|
||||
disabled = true
|
||||
} else {
|
||||
painbox.Owner match {
|
||||
case obj: Building =>
|
||||
|
|
@ -83,9 +83,13 @@ class PainboxControl(painbox: Painbox) extends Actor {
|
|||
case _ => None
|
||||
}
|
||||
}
|
||||
context.become(Stopped)
|
||||
}
|
||||
}
|
||||
|
||||
if(!disabled) {
|
||||
context.become(Stopped)
|
||||
}
|
||||
|
||||
case _ => ;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue