 8541c87c97
			
		
	
	8541c87c97
	
	
	
		
			
			* Paint: Implement New Game * Add docstring * Remove unnecessary self.multiworld references * Implement start_inventory_from_pool * Convert logic to use LogicMixin * Add location_exists_with_options function to deduplicate code * Simplify starting tool creation * Add Paint to supported games list * Increment version to 0.4.1 * Update docs to include color selection features * Fix world attribute definitions * Fix linting errors * De-duplicate lists of traps * Move LogicMixin to __init__.py * 0.5.0 features - adjustable canvas size increment, updated similarity metric * Fix OptionError formatting * Create OptionError when generating single-player game with error-prone settings * Increment version to 0.5.1 * Update CODEOWNERS * Update documentation for 0.5.2 client changes * Simplify region creation * Add comments describing logic * Remove unnecessary f-strings * Remove unused import * Refactor rules to location class * Remove unnecessary self.multiworld references * Update logic to correctly match client-side item caps --------- Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
		
			
				
	
	
		
			49 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| from typing import NamedTuple, Dict
 | |
| 
 | |
| from BaseClasses import Item, ItemClassification
 | |
| 
 | |
| 
 | |
| class PaintItem(Item):
 | |
|     game = "Paint"
 | |
| 
 | |
| 
 | |
| class PaintItemData(NamedTuple):
 | |
|     code: int
 | |
|     type: ItemClassification
 | |
| 
 | |
| 
 | |
| item_data_table: Dict[str, PaintItemData] = {
 | |
|     "Progressive Canvas Width":         PaintItemData(198501, ItemClassification.progression),
 | |
|     "Progressive Canvas Height":        PaintItemData(198502, ItemClassification.progression),
 | |
|     "Progressive Color Depth (Red)":    PaintItemData(198503, ItemClassification.progression),
 | |
|     "Progressive Color Depth (Green)":  PaintItemData(198504, ItemClassification.progression),
 | |
|     "Progressive Color Depth (Blue)":   PaintItemData(198505, ItemClassification.progression),
 | |
|     "Free-Form Select":                 PaintItemData(198506, ItemClassification.useful),
 | |
|     "Select":                           PaintItemData(198507, ItemClassification.useful),
 | |
|     "Eraser/Color Eraser":              PaintItemData(198508, ItemClassification.useful),
 | |
|     "Fill With Color":                  PaintItemData(198509, ItemClassification.useful),
 | |
|     "Pick Color":                       PaintItemData(198510, ItemClassification.progression),
 | |
|     "Magnifier":                        PaintItemData(198511, ItemClassification.useful),
 | |
|     "Pencil":                           PaintItemData(198512, ItemClassification.useful),
 | |
|     "Brush":                            PaintItemData(198513, ItemClassification.useful),
 | |
|     "Airbrush":                         PaintItemData(198514, ItemClassification.useful),
 | |
|     "Text":                             PaintItemData(198515, ItemClassification.useful),
 | |
|     "Line":                             PaintItemData(198516, ItemClassification.useful),
 | |
|     "Curve":                            PaintItemData(198517, ItemClassification.useful),
 | |
|     "Rectangle":                        PaintItemData(198518, ItemClassification.useful),
 | |
|     "Polygon":                          PaintItemData(198519, ItemClassification.useful),
 | |
|     "Ellipse":                          PaintItemData(198520, ItemClassification.useful),
 | |
|     "Rounded Rectangle":                PaintItemData(198521, ItemClassification.useful),
 | |
|     # "Change Background Color":          PaintItemData(198522, ItemClassification.useful),
 | |
|     "Additional Palette Color":         PaintItemData(198523, ItemClassification.filler),
 | |
|     "Undo Trap":                        PaintItemData(198524, ItemClassification.trap),
 | |
|     "Clear Image Trap":                 PaintItemData(198525, ItemClassification.trap),
 | |
|     "Invert Colors Trap":               PaintItemData(198526, ItemClassification.trap),
 | |
|     "Flip Horizontal Trap":             PaintItemData(198527, ItemClassification.trap),
 | |
|     "Flip Vertical Trap":               PaintItemData(198528, ItemClassification.trap),
 | |
| }
 | |
| 
 | |
| item_table = {name: data.code for name, data in item_data_table.items()}
 | |
| traps = ["Undo Trap", "Clear Image Trap", "Invert Colors Trap", "Flip Horizontal Trap", "Flip Vertical Trap"]
 | |
| deathlink_traps = ["Invert Colors Trap", "Flip Horizontal Trap", "Flip Vertical Trap"]
 |