misc deployables fixes

This commit is contained in:
ScrawnyRonnie 2025-02-02 21:33:32 -05:00
parent eb04d37108
commit dd87d5da89
2 changed files with 17 additions and 6 deletions

View file

@ -2494,6 +2494,11 @@ class ZoningOperations(
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
context.system.scheduler.scheduleOnce(delay = 250 millisecond, context.self, SessionActor.SetCurrentAvatar(player, 200))
}

View file

@ -68,7 +68,7 @@ trait DeployableBehavior {
if DeployableObject.OwnerGuid.nonEmpty =>
val obj = DeployableObject
if (constructed.contains(true)) {
loseOwnership(obj, PlanetSideEmpire.NEUTRAL)
loseOwnership(obj, obj.Faction)
} else {
obj.OwnerGuid = None
}
@ -290,11 +290,17 @@ object DeployableBehavior {
originalFaction.toString,
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)
)
}
}