fix(candy-survival): restrict scarcity weights to prevent spawning any special tiles in Candy Survival

This commit is contained in:
2026-07-08 17:24:04 +08:00
parent 682c5925d3
commit f407551d60
+5 -1
View File
@@ -52,7 +52,11 @@ static func get_tile_weights() -> Dictionary:
weights[tile] = STANDARD_WEIGHT weights[tile] = STANDARD_WEIGHT
# Special tiles # Special tiles
var mode = Engine.get_main_loop().root.get_node_or_null("LobbyManager").get_game_mode() var lobby = Engine.get_main_loop().root.get_node_or_null("LobbyManager")
var mode = lobby.get_game_mode() if lobby else ""
if mode == "Candy Survival":
return weights
var is_restricted = GameMode.is_restricted(mode) var is_restricted = GameMode.is_restricted(mode)
for tile in SPECIAL_TILES: for tile in SPECIAL_TILES:
if is_restricted and tile == TILE_WALL: if is_restricted and tile == TILE_WALL: