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

Fixes 5804-is-burning regression test #7124

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/test/skript/tests/regressions/5804-is-burning.sk
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# This test is to see if the `is burning` condition works properly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure this explanation is needed, they can just pull up the issue from the github right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They can, just saves a bit of time was my thinking behind it

# Before, something like `if {x} is burning` would try to compare {x} to the burning damage cause
# instead of whether or not the entity was burning.
test "burning":
spawn a pig at event-location
set {_pig} to the last spawned pig
spawn a pig at event-location:
set {_pig} to entity

assert "burning" parsed as damage cause is burning with "burning damage cause compare"
set burning time of {_pig} to 9000 ticks
wait a tick
assert entity within {_pig} is burning with "is burning failed"
assert {_pig} is burning with "is burning failed ##2"
clear entity within {_pig}

ignite {_pig}
assert entity within {_pig} is burning with "entity within is burning failed"
assert {_pig} is burning with "is burning failed"

delete entity within {_pig}