Skip to content

Commit

Permalink
Fix: Hoppity/Choc Factory Updates (#2925)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidArthurCole authored Nov 20, 2024
1 parent 6602467 commit 4b0618b
Show file tree
Hide file tree
Showing 16 changed files with 267 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,38 @@ public class HoppityEggsConfig {
public boolean showClaimedEggs = false;

@Expose
@ConfigOption(name = "Show Collected Locations", desc = "Show the number of found egg locations on this island.\n" +
"§eThis is not retroactive and may not be fully synced with Hypixel's count.")
@ConfigOption(name = "Unclaimed Eggs Order", desc = "Order in which to display unclaimed eggs.")
@ConfigEditorDropdown
public UnclaimedEggsOrder unclaimedEggsOrder = UnclaimedEggsOrder.SOONEST_FIRST;

public enum UnclaimedEggsOrder {
SOONEST_FIRST("Soonest First"),
MEAL_ORDER("Meal Order"),
;

private final String name;

UnclaimedEggsOrder(String name) {
this.name = name;
}

@Override
public String toString() {
return name;
}
}

@Expose
@ConfigOption(
name = "Show Collected Locations", desc = "Show the number of found egg locations on this island.\n" +
"§eThis is not retroactive and may not be fully synced with Hypixel's count."
)
@ConfigEditorBoolean
@FeatureToggle
public boolean showCollectedLocationCount = false;

@Expose
@ConfigOption(name = "Warn When Unclaimed", desc = "Warn when all three eggs are ready to be found.")
@ConfigOption(name = "Warn When Unclaimed", desc = "Warn when all six eggs are ready to be found.")
@ConfigEditorBoolean
@FeatureToggle
public boolean warnUnclaimedEggs = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ data class HoppityEggLocationsJson(
@Expose val timeTowerIndex: Int,
@Expose val shrineIndex: Int,
@Expose val coachRabbitIndex: Int,
@Expose val rabbitHitmanIndex: Int,
@Expose val maxRabbits: Int,
@Expose val maxPrestige: Int,
@Expose val chocolateMilestones: TreeSet<Long>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package at.hannibal2.skyhanni.events.hoppity

import at.hannibal2.skyhanni.api.event.SkyHanniEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggType

class EggFoundEvent(
val type: HoppityEggType,
val slotIndex: Int? = null,
val note: String? = null,
val chatEvent: LorenzChatEvent? = null
) : SkyHanniEvent()
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.events.hoppity

import at.hannibal2.skyhanni.api.event.SkyHanniEvent
import at.hannibal2.skyhanni.features.event.hoppity.HoppityAPI
import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggType

class RabbitFoundEvent(
Expand All @@ -9,6 +10,14 @@ class RabbitFoundEvent(
val rabbitName: String,
val chocGained: Long = 0,
) : SkyHanniEvent() {

constructor(dataSet: HoppityAPI.HoppityStateDataSet) : this(
dataSet.lastMeal ?: HoppityEggType.BREAKFAST,
dataSet.duplicate,
dataSet.lastName,
dataSet.lastDuplicateAmount ?: 0,
)

override fun toString(): String =
"§fType§7: ${eggType.coloredName}\n§fDuplicate§7: §b$duplicate\n§fRabbit§7: $rabbitName\n§fChoc Gained§7: §6$chocGained"
}
Loading

0 comments on commit 4b0618b

Please sign in to comment.