Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Add PropertyType.SHOULD

Open aabssmc opened this issue 2 years ago • 7 comments

Suggestion

There should be a SHOULD Type in PropertyType for property conditions, for example for the condition shouldBurnInDay().

Why?

Instead of making a normal Condition and doing all the extra stuff, a PropertyType.SHOULD would be useful for making small conditions; the patterns could be something like %type% should %property% %type% should(n't| not) %property%

Other

No response

Agreement

  • [X] I have read the guidelines above and affirm I am following them with this suggestion.

aabssmc avatar Feb 05 '24 06:02 aabssmc

IMO will does the job well, even the description of that class says will burn in the sunlight.

AyhamAl-Ali avatar Feb 05 '24 08:02 AyhamAl-Ali

Personally I'm open for should to be added while I do like will both make sense and might be possible to combine them as they target future states.

if %livingentity% will burn in sunlight
if projectile will consume item

if %livingentity% should burn in sunlight
if projectile should consume item

Fusezion avatar Feb 05 '24 08:02 Fusezion

It's similar issue to boolean expressions https://github.com/SkriptLang/Skript/pull/5219

TheLimeGlass avatar Feb 05 '24 11:02 TheLimeGlass

Personally I'm open for should to be added while I do like will both make sense and might be possible to combine them as they target future states.

if %livingentity% will burn in sunlight
if projectile will consume item

if %livingentity% should burn in sunlight
if projectile should consume item

if project should consume item how does that work?

EquipableMC avatar Feb 05 '24 12:02 EquipableMC

I'm also of the opinion that will is a better way to say the same thing. Should is kind of wishy washy and doesn't make any exact claims. Will does the same jobs make is clear on exactly what will happen, so it's more explicit.

sovdeeth avatar Feb 17 '24 21:02 sovdeeth

I am still for should to be added, it's used in java method naming and makes sense, however as I said prior there's still the option to just merge should into will. if zombie will burn and if zombie should burn both work and the method naming is shouldBurnInDay

Fusezion avatar Feb 17 '24 21:02 Fusezion

should sounds like an effect statement rather than condition

AyhamAl-Ali avatar Feb 17 '24 21:02 AyhamAl-Ali