diff --git a/game/scripts/interface/topbar.rpy b/game/scripts/interface/topbar.rpy index 484b06e4..24212909 100644 --- a/game/scripts/interface/topbar.rpy +++ b/game/scripts/interface/topbar.rpy @@ -24,13 +24,12 @@ label update_ui_points: $ hufflepuff_points = text_points(hufflepuff) #Check who's in the lead - $ housepoints = [slytherin, gryffindor, ravenclaw, hufflepuff] - $ housepoints_sorted = sorted(housepoints, reverse=True) + $ housepoints_sorted = sorted((slytherin, gryffindor, ravenclaw, hufflepuff), reverse=True) - $ slytherin_place = housepoints_sorted.index(housepoints[0])+1 - $ gryffindor_place = housepoints_sorted.index(housepoints[1])+1 - $ ravenclaw_place = housepoints_sorted.index(housepoints[2])+1 - $ hufflepuff_place = housepoints_sorted.index(housepoints[3])+1 + $ slytherin_place = housepoints_sorted.index(slytherin)+1 + $ gryffindor_place = housepoints_sorted.index(gryffindor)+1 + $ ravenclaw_place = housepoints_sorted.index(ravenclaw)+1 + $ hufflepuff_place = housepoints_sorted.index(hufflepuff)+1 # Set banners yanchor depending on the placement (ascending) $ housepoints_y = [None, 0.0, 0.25, 0.5, 0.75]