fix triggers for multiple slots from one yaml
This commit is contained in:
		
							parent
							
								
									d4c6268a46
								
							
						
					
					
						commit
						969ea5e6ee
					
				|  | @ -23,6 +23,7 @@ import Options | ||||||
| from worlds.alttp import Bosses | from worlds.alttp import Bosses | ||||||
| from worlds.alttp.Text import TextTable | from worlds.alttp.Text import TextTable | ||||||
| from worlds.AutoWorld import AutoWorldRegister | from worlds.AutoWorld import AutoWorldRegister | ||||||
|  | import copy | ||||||
| 
 | 
 | ||||||
| categories = set(AutoWorldRegister.world_types) | categories = set(AutoWorldRegister.world_types) | ||||||
| 
 | 
 | ||||||
|  | @ -330,7 +331,7 @@ def update_weights(weights: dict, new_weights: dict, type: str, name: str) -> di | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def roll_linked_options(weights: dict) -> dict: | def roll_linked_options(weights: dict) -> dict: | ||||||
|     weights = weights.copy()  # make sure we don't write back to other weights sets in same_settings |     weights = copy.deepcopy(weights)  # make sure we don't write back to other weights sets in same_settings | ||||||
|     for option_set in weights["linked_options"]: |     for option_set in weights["linked_options"]: | ||||||
|         if "name" not in option_set: |         if "name" not in option_set: | ||||||
|             raise ValueError("One of your linked options does not have a name.") |             raise ValueError("One of your linked options does not have a name.") | ||||||
|  | @ -352,7 +353,7 @@ def roll_linked_options(weights: dict) -> dict: | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def roll_triggers(weights: dict, triggers: list) -> dict: | def roll_triggers(weights: dict, triggers: list) -> dict: | ||||||
|     weights = weights.copy()  # make sure we don't write back to other weights sets in same_settings |     weights = copy.deepcopy(weights)  # make sure we don't write back to other weights sets in same_settings | ||||||
|     weights["_Generator_Version"] = Utils.__version__ |     weights["_Generator_Version"] = Utils.__version__ | ||||||
|     for i, option_set in enumerate(triggers): |     for i, option_set in enumerate(triggers): | ||||||
|         try: |         try: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue