Skip to content

Conversation

@paul07iq
Copy link

Added clear effect to entity.py
Added effects to _types.py

paul07iq added 4 commits May 19, 2024 13:43
Added clear_effect
Added effects to _types.py
Used effect list from _types.py
Update _types.py
Copy link
Owner

@icezyclon icezyclon left a 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-commitnoch formatieren!
Ansonsten mag ich die Idee


EFFECTE: TypeAlias = Literal[
"speed",
"slowness",
Copy link
Owner

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 👍

"black",
]

EFFECTE: TypeAlias = Literal[
Copy link
Owner

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

pbool = str(not bool(particles)).lower()
self.runCommand(f"effect give @s {effect} {int(seconds)} {amplifier} {pbool}")

def clear_effect(self, EFFECT: str = "") -> None:
Copy link
Owner

@icezyclon icezyclon May 26, 2024

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


from ._base import HasStub, _EntityProvider
from ._types import COLOR
from ._types import COLOR, EFFECT
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants