kyouryuukunn / renpy-ActionEditor3

125 stars 13 forks source link

def exclusive_check expects key to be a tuple but when selecting sound only 'sound' is passed. #35

Closed paxogre closed 1 month ago

paxogre commented 1 month ago

While running game code: File "game/renpy-ActionEditor3-master/ActionEditor.rpy", line 2965, in open_action_editor renpy.call_screen("_new_action_editor") File "game/renpy-ActionEditor3-master/ActionEditor_screens.rpy", line 1937, in event if self.key and self.key[2] is not None and exclusive_check(self.key): File "game/renpy-ActionEditor3-master/ActionEditor.rpy", line 1643, in exclusive_check tag, layer, prop = key ValueError: too many values to unpack (expected 3)

Went and looked at what keys were passed renpy.write_log("Keys: %r", key)

Keys: ('black', 'master', 'xpos') Keys: ('black', 'master', 'ypos') Keys: (None, 'master', 'xpos') Keys: (None, 'master', 'ypos') Keys: ('black', 'master', 'xpos') Keys: ('black', 'master', 'ypos') Keys: (None, 'master', 'xpos') Keys: (None, 'master', 'ypos') Keys: 'sound'

Should exclusive_check not be used for 'sound' or should it return True/False?

def exclusive_check(key, scene_num=None): #check exclusive properties if scene_num is None: scene_num = current_scene ## tag, layer, prop = key if isinstance(key, tuple): tag, layer, prop = key else: return False

kyouryuukunn commented 1 month ago

Fixed

paxogre commented 1 month ago

Umm what if you say go to 'option' and Set the list of channels for playing in ActionEditor ["music", "sound", "voice"]

Though based off your fix this works if not isinstance(key, tuple): return True

Thanks!