Fix variable type reference being incorrect when same literals
Description
Makes a fix for re-parsing variables that have the same literal name.
Example of this can be setting a variable to a snowball. Skript assumes it's an itemtype. Now when using that variable in an entitydata expression, Skript attempts to convert but can't as no converters exist for ItemType -> EntityData. That's where this fix steps in.
With the knowledge from my pull request at https://github.com/SkriptLang/Skript/pull/5503 I knew exactly what Skript was doing and how to fix it.
I also cleaned up the EffShoot class to be up to date with standards while I was debugging.
Note that this pull request https://github.com/SkriptLang/Skript/pull/5457 also helps this issue and solidifies that Skript will understand local variables
Target Minecraft Versions: any Requirements: none Related Issues: https://github.com/SkriptLang/Skript/issues/3753, https://github.com/SkriptLang/Skript/issues/5493 there are probably more, but nothing came up relating to index "variable"
The type coercion that Kenzie mentioned earlier is still an issue:
on load:
set {_a} to "2"
set {_b} to "5 dirt of sharpness"
set {_c} to 12 tnt entities
broadcast "2 + {_a} - expected: 2, actual: %2 + {_a}%"
broadcast "enchantments of {_b}: expected: <none>, actual: %enchantments of {_b}%"
broadcast "item amount of {_c}: expected: <none>, actual: %item amount of {_c}%"
2.7.1:
This PR's nightly:
Closing for inactivity