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

compare itemtype #4278

Closed
1 task done
vhone opened this issue Aug 15, 2021 · 1 comment
Closed
1 task done

compare itemtype #4278

vhone opened this issue Aug 15, 2021 · 1 comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@vhone
Copy link

vhone commented Aug 15, 2021

Skript/Server Version

Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
Skript's documentation can be found here: https://skriptlang.github.io/Skript
Server Version: git-Paper-127 (MC: 1.17.1)
Skript Version: 2.6-beta2-nightly-bfe39b3

Bug Description

I know aliases are itemtype.
However, when comparing items, the result was different from what I knew.

Expected Behavior

If the type of item is paper
'is paper', 'is a paper' both must be true.

Steps to Reproduce

command /compare.type:
    trigger:
        set {_item::1} to 1 of paper
        set {_item::2} to 2 of paper
        set {_item::3} to 3 of paper

        send "compape 'paper'"
        loop {_item::*}:
            if loop-value is paper:
                send "  is 'paper'"
            else:
                send "  not 'paper'"
                
        send "compape 'a paper'"
        loop {_item::*}:
            if loop-value is a paper:
                send "  is 'a paper'"
            else:
                send "  not 'a paper'"

        send "compape one of"
        loop {_item::*}:
            if 1 of loop-value is paper:
                send "  is paper"
            else:
                send "  not paper"
                
        send "compape type of"
        loop {_item::*}:
            if type of loop-value is paper:
                send "  is paper"
            else:
                send "  not paper"

Errors or Screenshots

2021-08-15_18 07 23

It behaves as if it were an item.
Does aliases contain the number of items?
Returns true only when the number of items also matches.

Other

No response

Agreement

  • I have read the guidelines above and confirm I am following them with this report.
@APickledWalrus
Copy link
Member

This is technically intentional behavior, but it can likely be changed to ignore stack size when comparing with an alias item.

APickledWalrus added a commit to APickledWalrus/Skript that referenced this issue Aug 15, 2021
@APickledWalrus APickledWalrus added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. PR available Issues which have a yet-to-be merged PR resolving it labels Aug 15, 2021
@TPGamesNL TPGamesNL added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants