feat: rollback fix

This commit is contained in:
2026-06-10 10:48:20 +08:00
parent 5653473c12
commit 8520f9db3c
6 changed files with 81 additions and 69 deletions
+9 -11
View File
@@ -1854,18 +1854,16 @@ func randomize_item_at_position(grid_position: Vector2i):
break
if is_ground:
var new_item = 7
var get_mode_specific_tile = func():
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors" and LobbyManager.game_mode != "Candy Cannon Survival":
# 60% Chance for Common (7-10), 40% for PowerUp
if randf() <= 0.6:
return [7, 8, 9, 10].pick_random()
else:
return ScarcityModel.SPECIAL_TILES.pick_random()
return ScarcityController.get_random_tile_id()
var get_mode_specific_tile = func():
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors" and LobbyManager.game_mode != "Candy Cannon Survival":
# 60% Chance for Common (7-10), 40% for PowerUp
if randf() <= 0.6:
return [7, 8, 9, 10].pick_random()
else:
return ScarcityModel.SPECIAL_TILES.pick_random()
return ScarcityController.get_random_tile_id()
new_item = get_mode_specific_tile.call()
var new_item = get_mode_specific_tile.call()
# If we are replacing an existing item, try to ensure it changes
if current_item != -1: