1
0
mirror of synced 2024-11-24 06:20:12 +01:00

Remove some magic numbers and add more documentation

This commit is contained in:
seth 2021-08-02 20:14:08 -05:00 committed by Jennifer Taylor
parent 1c389b6ff5
commit 389f10f8c4
2 changed files with 16 additions and 14 deletions

View File

@ -880,19 +880,19 @@ class IIDXCannonBallers(IIDXCourse, IIDXBase):
music_list = [0, 0, 0, 0] music_list = [0, 0, 0, 0]
cpu_list = [0, 0, 0, 0] cpu_list = [0, 0, 0, 0]
grade_to_percentage_map = { grade_to_percentage_map = {
6: 50, self.GAME_SP_DAN_RANK_1_KYU: 50,
7: 55, self.GAME_SP_DAN_RANK_1_DAN: 55,
8: 60, self.GAME_SP_DAN_RANK_2_DAN: 60,
9: 60, self.GAME_SP_DAN_RANK_3_DAN: 60,
10: 65, self.GAME_SP_DAN_RANK_4_DAN: 65,
11: 65, self.GAME_SP_DAN_RANK_5_DAN: 65,
12: 70, self.GAME_SP_DAN_RANK_6_DAN: 70,
13: 70, self.GAME_SP_DAN_RANK_7_DAN: 70,
14: 75, self.GAME_SP_DAN_RANK_8_DAN: 75,
15: 75, self.GAME_SP_DAN_RANK_9_DAN: 75,
16: 80, self.GAME_SP_DAN_RANK_10_DAN: 80,
17: 80, self.GAME_SP_DAN_RANK_CHUDEN: 80,
18: 80, self.GAME_SP_DAN_RANK_KAIDEN: 80,
} }
for item in request.children: for item in request.children:
if item.name == 'music_list': if item.name == 'music_list':
@ -1385,6 +1385,7 @@ class IIDXCannonBallers(IIDXCourse, IIDXBase):
song = self.data.local.music.get_song(self.game, self.music_version, music_id, class_id) song = self.data.local.music.get_song(self.game, self.music_version, music_id, class_id)
notecount = song.data.get('notecount', 0) notecount = song.data.get('notecount', 0)
# Construct the dictionary for the broadcast # Construct the dictionary for the broadcast
# TODO: Change the strings on the left to a set of constants since these names are very brittle.
card_data = { card_data = {
'DJ Name': name, 'DJ Name': name,
'Song': song.name, 'Song': song.name,

View File

@ -25,7 +25,8 @@ server:
# Whether PCBIDs must be added to the network before games will work. # Whether PCBIDs must be added to the network before games will work.
enforce_pcbid: False enforce_pcbid: False
# Webhook URLs # Webhook URLs. These allow for game scores from games with scorecard support to be broadcasted to outside services.
# Delete this to disable this support.
webhooks: webhooks:
discord: discord:
iidx: iidx: