Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Effect #2

wants to merge 4 commits into from

Conversation

paul07iq
Copy link

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

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 👍

@@ -23,3 +23,36 @@
"red",
"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

) -> 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:
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

@@ -4,7 +4,7 @@
from functools import partial

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