Skip to content

Commit

Permalink
feat: Components now behave like dicts for setting/getting the data
Browse files Browse the repository at this point in the history
… field
  • Loading branch information
TheWii committed Apr 16, 2022
1 parent fe2edd8 commit f34e942
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integrity/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def run(self, event_name: str):
node = AstCommand(identifier="function:name", arguments=AstChildren([location]))
self.ref.api._inject_command(node)

def __getitem__(self, key: str):
return self.data[key]

def __setitem__(self, key: str, value: Any):
self.data[key] = value

@dataclass(frozen=True)
class AstEventResourceLocation(AstResourceLocation):
Expand Down

0 comments on commit f34e942

Please sign in to comment.