Damage Source#7876
Conversation
sovdeeth
left a comment
There was a problem hiding this comment.
I'm still not a huge fan of having some sources be editable and some not
I'd like some others' opinions on the topic, whether it should be allowed as is or if sources should be only editable upon creation (say, within the exprsec). It would mean the wrapper class wouldn't be needed.
|
I'm in agreeance with sovde here, a damage source should only be modifiable via the exprsec as a means to limit ambiguity, unsure how it would allow removal of the wrapper, it's still needed I would assume unless we store custom information onto the event. |
You can just store a builder on the exprsection, yes |
We would still need the wrapper for a couple of reasons. I feel the wrapper should be kept, since |
The event-value thing could be easily done via just building the builder when necessary, but I see your point about future proofing given this api still seems very unfinished. |
|
btw, can you remove the |
APickledWalrus
left a comment
There was a problem hiding this comment.
I think this is looking really good so far. Here's what I found
…urce # Conflicts: # src/main/java/ch/njol/skript/registrations/Feature.java
APickledWalrus
left a comment
There was a problem hiding this comment.
This is looking really good - almost ready for primetime! My comments are mainly formatting suggestions for your convenience 🙂
APickledWalrus
left a comment
There was a problem hiding this comment.
Looks great - excellent work! I might like for some of the examples (ex: conditions) to be more detailed (maybe have them send a fun message or something - ideally, they're runnable)
…urce # Conflicts: # src/main/java/ch/njol/skript/registrations/Feature.java
…kriptTest into dev/DamageSource
Problem
No current support for Damage Sources, including reading and checking data of damage sources, no previous event values for damage sources, and unable to create custom damage sources
Solution
New module for damage sources. Adds expressions and conditions to get/set/check the data of damage sources
Updates
EffHealthto allow use of custom damage sourcesDamageSourceWrapperfor a continuous data setting of a custom damage source.Testing Completed
The newly created test file
Supporting Information
Had to add an ignore list in
ClassLoaderTestbecause when loading theDamageSourceWrapperon 1.19.4, was throwing an exception.Completes: none
Related: none