Skip to content

Commit

Permalink
move gravity wells to their own marker set
Browse files Browse the repository at this point in the history
  • Loading branch information
kwazedilla committed Nov 12, 2024
1 parent 5367794 commit 6e2d6bc
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import kotlin.random.Random

object SpaceMap : IonServerComponent(true) {
private lateinit var markerSet: MarkerSet
private lateinit var gravityWellMarkerSet: MarkerSet

override fun onEnable() {
if (!getPluginManager().isPluginEnabled("dynmap")) {
Expand All @@ -31,6 +32,8 @@ object SpaceMap : IonServerComponent(true) {

markerAPI.getMarkerSet("space")?.deleteMarkerSet()
markerSet = markerAPI.createMarkerSet("space", "Space", null, false)
markerAPI.getMarkerSet("gravity_well")?.deleteMarkerSet()
gravityWellMarkerSet = markerAPI.createMarkerSet("gravity_well", "Gravity Wells", null, false)

for (star in Space.getStars()) {
if (star.name == "EdenHack") continue
Expand All @@ -46,7 +49,7 @@ object SpaceMap : IonServerComponent(true) {
false // ??
)

markerSet.createCircleMarker(
gravityWellMarkerSet.createCircleMarker(
"${star.id}_gravity_well",
"${star.name}'s Gravity Well",
false,
Expand Down Expand Up @@ -109,7 +112,7 @@ object SpaceMap : IonServerComponent(true) {
}

// gravity well indicator
markerSet.createCircleMarker(
gravityWellMarkerSet.createCircleMarker(
"${planet.id}_gravity_well",
"${planet.name}'s Gravity Well",
false,
Expand Down

0 comments on commit 6e2d6bc

Please sign in to comment.