Skip to content

Commit

Permalink
Fix: Zombie Shootout QOL (hannibal002#2507)
Browse files Browse the repository at this point in the history
Co-authored-by: CalMWolfs <[email protected]>
Co-authored-by: hannibal2 <[email protected]>
  • Loading branch information
3 people authored Sep 14, 2024
1 parent 7160089 commit c20e817
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public class ZombieShootoutConfig {
public boolean coloredHitboxes = true;

@Expose
@ConfigOption(name = "Colored Lines", desc = "Display a colored line to lamps.")
@ConfigOption(name = "Highest Only", desc = "Only draw colored hitboxes for the highest scoring zombies.")
@ConfigEditorBoolean
public boolean coloredLines = true;
public boolean highestOnly = false;

@Expose
@ConfigOption(name = "Highest Only", desc = "Only draw colored hitboxes/lines for the highest scoring zombies.")
@ConfigOption(name = "Colored Line", desc = "Display a colored line to lamps.")
@ConfigEditorBoolean
public boolean highestOnly = false;
public boolean coloredLines = true;

@Expose
@ConfigOption(name = "Lamp Timer", desc = "Show time until current lamp disappears.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ object CarnivalZombieShootout {
)

enum class ZombieType(val points: Int, val helmet: String, val color: Color) {
LEATHER(30, "Leather Cap", Color(165, 42, 42)), //Brown
IRON(50, "Iron Helmet", Color(192, 192, 192)), //Silver
GOLD(80, "Golden Helmet", Color(255, 215, 0)), //Gold
LEATHER(30, "Leather Cap", Color(165, 42, 42)), //Brown
IRON(50, "Iron Helmet", Color(192, 192, 192)), //Silver
GOLD(80, "Golden Helmet", Color(255, 215, 0)), //Gold
DIAMOND(120, "Diamond Helmet", Color(185, 242, 255)) //Diamond
}

Expand All @@ -86,7 +86,10 @@ object CarnivalZombieShootout {
zombie to type
}.toMap()

drawZombies = nearbyZombies.filterValues { it == nearbyZombies.values.maxByOrNull { it.points } }
drawZombies =
if (config.highestOnly) nearbyZombies.filterValues { zombieType -> zombieType == nearbyZombies.values.maxByOrNull { it.points } }
else nearbyZombies

lastUpdate.zombie = SimpleTimeMark.now()
}

Expand Down

0 comments on commit c20e817

Please sign in to comment.