forked from ArchipelagoMW/Archipelago
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Witness: The big dumb refactor (ArchipelagoMW#3007)
- Loading branch information
Showing
48 changed files
with
1,060 additions
and
1,021 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
from dataclasses import dataclass | ||
from enum import Enum | ||
from typing import Dict, List, Optional | ||
|
||
from BaseClasses import ItemClassification | ||
|
||
|
||
class ItemCategory(Enum): | ||
SYMBOL = 0 | ||
DOOR = 1 | ||
LASER = 2 | ||
USEFUL = 3 | ||
FILLER = 4 | ||
TRAP = 5 | ||
JOKE = 6 | ||
EVENT = 7 | ||
|
||
|
||
CATEGORY_NAME_MAPPINGS: Dict[str, ItemCategory] = { | ||
"Symbols:": ItemCategory.SYMBOL, | ||
"Doors:": ItemCategory.DOOR, | ||
"Lasers:": ItemCategory.LASER, | ||
"Useful:": ItemCategory.USEFUL, | ||
"Filler:": ItemCategory.FILLER, | ||
"Traps:": ItemCategory.TRAP, | ||
"Jokes:": ItemCategory.JOKE | ||
} | ||
|
||
|
||
@dataclass(frozen=True) | ||
class ItemDefinition: | ||
local_code: int | ||
category: ItemCategory | ||
|
||
|
||
@dataclass(frozen=True) | ||
class ProgressiveItemDefinition(ItemDefinition): | ||
child_item_names: List[str] | ||
|
||
|
||
@dataclass(frozen=True) | ||
class DoorItemDefinition(ItemDefinition): | ||
panel_id_hexes: List[str] | ||
|
||
|
||
@dataclass(frozen=True) | ||
class WeightedItemDefinition(ItemDefinition): | ||
weight: int | ||
|
||
|
||
@dataclass() | ||
class ItemData: | ||
""" | ||
ItemData for an item in The Witness | ||
""" | ||
ap_code: Optional[int] | ||
definition: ItemDefinition | ||
classification: ItemClassification | ||
local_only: bool = False |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.