Skip to content

Commit

Permalink
disable gravity wells when entering planet; only trigger combat tag v…
Browse files Browse the repository at this point in the history
…ia gravity well if in a space world
  • Loading branch information
kwazedilla committed Jan 24, 2025
1 parent 81c177b commit 754c98c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import net.horizonsend.ion.server.features.starship.control.controllers.player.U
import net.horizonsend.ion.server.features.starship.damager.AIShipDamager
import net.horizonsend.ion.server.features.starship.damager.Damager
import net.horizonsend.ion.server.features.starship.damager.PlayerDamager
import net.horizonsend.ion.server.features.world.IonWorld.Companion.hasFlag
import net.horizonsend.ion.server.features.world.WorldFlag
import net.horizonsend.ion.server.listener.misc.ProtectionListener
import net.horizonsend.ion.server.miscellaneous.utils.Tasks
import net.horizonsend.ion.server.miscellaneous.utils.listen
Expand Down Expand Up @@ -86,7 +88,7 @@ object CombatTimer : IonServerComponent() {
pilotedStarship.type.typeCategory == TypeCategory.WAR_SHIP) {
val starshipCom = pilotedStarship.centerOfMass.toLocation(player.world)

if (pilotedStarship.isInterdicting) {
if (pilotedStarship.isInterdicting && pilotedStarship.world.hasFlag(WorldFlag.SPACE_WORLD)) {
// Interdicting ships will place combat tags on other player starships that are within the well range, are less than neutral, and not in a protected city
toPlayersInRadius(starshipCom, Interdiction.starshipInterdictionRangeEquation(pilotedStarship)) { otherPlayer ->
val otherStarship = PilotedStarships[otherPlayer]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ object StarshipControl : IonServerComponent() {
.append(text(planet.name, NamedTextColor.BLUE))
.append(text("..."))
)
starship.setIsInterdicting(false)

StarshipTeleportation.teleportStarship(starship, target)
return true
Expand Down

0 comments on commit 754c98c

Please sign in to comment.