mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-13 07:24:53 +00:00
misc deployables fixes
This commit is contained in:
parent
eb04d37108
commit
dd87d5da89
2 changed files with 17 additions and 6 deletions
|
|
@ -2494,6 +2494,11 @@ class ZoningOperations(
|
||||||
reclaimOurDeployables(continent.DeployableList, player.Name, reassignDeployablesTo(player.GUID))
|
reclaimOurDeployables(continent.DeployableList, player.Name, reassignDeployablesTo(player.GUID))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
//do this to make my deployed telepad appear that way
|
||||||
|
continent.Vehicles.filter(router => router.Definition == GlobalDefinitions.router && router.OwnerName.contains(player.Name))
|
||||||
|
.foreach { obj =>
|
||||||
|
sessionLogic.general.toggleTeleportSystem(obj, TelepadLike.AppraiseTeleportationSystem(obj, continent))
|
||||||
|
}
|
||||||
//begin looking for conditions to set the avatar
|
//begin looking for conditions to set the avatar
|
||||||
context.system.scheduler.scheduleOnce(delay = 250 millisecond, context.self, SessionActor.SetCurrentAvatar(player, 200))
|
context.system.scheduler.scheduleOnce(delay = 250 millisecond, context.self, SessionActor.SetCurrentAvatar(player, 200))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ trait DeployableBehavior {
|
||||||
if DeployableObject.OwnerGuid.nonEmpty =>
|
if DeployableObject.OwnerGuid.nonEmpty =>
|
||||||
val obj = DeployableObject
|
val obj = DeployableObject
|
||||||
if (constructed.contains(true)) {
|
if (constructed.contains(true)) {
|
||||||
loseOwnership(obj, PlanetSideEmpire.NEUTRAL)
|
loseOwnership(obj, obj.Faction)
|
||||||
} else {
|
} else {
|
||||||
obj.OwnerGuid = None
|
obj.OwnerGuid = None
|
||||||
}
|
}
|
||||||
|
|
@ -290,11 +290,17 @@ object DeployableBehavior {
|
||||||
originalFaction.toString,
|
originalFaction.toString,
|
||||||
LocalAction.DeployableMapIcon(Service.defaultPlayerGUID, DeploymentAction.Dismiss, info)
|
LocalAction.DeployableMapIcon(Service.defaultPlayerGUID, DeploymentAction.Dismiss, info)
|
||||||
)
|
)
|
||||||
|
//remove deployable from original owner's toolbox and UI counter
|
||||||
|
zone.AllPlayers.filter(p => obj.OriginalOwnerName.contains(p.Name))
|
||||||
|
.foreach { originalOwner =>
|
||||||
|
originalOwner.avatar.deployables.Remove(obj)
|
||||||
|
originalOwner.Zone.LocalEvents ! LocalServiceMessage(originalOwner.Name, LocalAction.DeployableUIFor(obj.Definition.Item))
|
||||||
|
}
|
||||||
|
//display to the given faction
|
||||||
|
localEvents ! LocalServiceMessage(
|
||||||
|
toFaction.toString,
|
||||||
|
LocalAction.DeployableMapIcon(Service.defaultPlayerGUID, DeploymentAction.Build, info)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
//display to the given faction
|
|
||||||
localEvents ! LocalServiceMessage(
|
|
||||||
toFaction.toString,
|
|
||||||
LocalAction.DeployableMapIcon(Service.defaultPlayerGUID, DeploymentAction.Build, info)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue