-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Effect #2
base: main
Are you sure you want to change the base?
Effect #2
Conversation
Added clear_effect
Added effects to _types.py
Used effect list from _types.py
Update _types.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Konnte wegen ImportError diesen PR noch nicht ausprobieren. Bitte in Zukunft den PR selbst ausprobieren und anschließend mit pre-commit
noch formatieren!
Ansonsten mag ich die Idee
|
||
EFFECTE: TypeAlias = Literal[ | ||
"speed", | ||
"slowness", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es fehlen drei Effekte: darkness, luck und unluck. Bitte diese noch hinzufügen.
Ich würde auch empfehlen, die Effekte im Literal alphabetisch zu sortieren!
Damit kann man viel leichter sehen, was man hat, was fehlt, auch wenn wir die Liste später updaten wollen 👍
@@ -23,3 +23,36 @@ | |||
"red", | |||
"black", | |||
] | |||
|
|||
EFFECTE: TypeAlias = Literal[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bitte Einzahl, also EFFECT anstelle von EFFECTE
) -> None: | ||
pbool = str(not bool(particles)).lower() | ||
self.runCommand(f"effect give @s {effect} {int(seconds)} {amplifier} {pbool}") | ||
|
||
def clear_effect(self, EFFECT: str = "") -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bitte argument klein schreiben, und den richtigen Typen angeben: Also, (self, effect: EFFECT | None = None)
und dann auf das None eingehen.
Und auch bitte CamelCase verwenden
@@ -4,7 +4,7 @@ | |||
from functools import partial | |||
|
|||
from ._base import HasStub, _EntityProvider | |||
from ._types import COLOR | |||
from ._types import COLOR, EFFECT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Konnte wegen Typo dieses Befehl nicht testen (in _types heißt der Typ EFFECTE, bitte dort ausbesser), im Moment ist das ein ImportError!
Added clear effect to entity.py
Added effects to _types.py