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

Shop items that cost an item with an <attribute> aren't purchasable #1167

Open
mitchts opened this issue Apr 8, 2023 · 0 comments
Open

Shop items that cost an item with an <attribute> aren't purchasable #1167

mitchts opened this issue Apr 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mitchts
Copy link

mitchts commented Apr 8, 2023

Take the following XML as an example.

You first purchase the Red Bowling Shoes for a single emerald. These can then be traded up with 2 emeralds for the Blue Bowling Shoes. However, while the <attribute ../> modifier is present on the item you receive and the payment, PGM never registeres that you have the required payment needed to purchase the item.

Removing the <attribute ../> tags from the purchasable item and the payment requirement allows you to purchase the blue shoes.

<shops>
    <shop id="ball-shop" name="Bowling Ball Upgrades">
        <category id="boots" name="`rSpeed" material="leather boots">
            <item material="leather boots" color="993333" name="`rRed Bowling Shoes">
                <attribute operation="add" amount="0.1">generic.movementSpeed</attribute>
                <payment currency="emerald" price="1"/>
            </item>
            <item material="leather boots" color="334CB2" name="`rBlue Bowling Shoes">
                <attribute operation="add" amount="0.2">generic.movementSpeed</attribute>
                <payment currency="emerald" price="2"/>
                <payment price="1">
                    <item material="leather boots" color="993333" name="`rRed Bowling Shoes">
                        <attribute operation="add" amount="0.1">generic.movementSpeed</attribute>
                    </item>
                </payment>
            </item>
        </category>
    </shop>
</shops>
<shopkeepers>
    <shopkeeper name="`bAdam" shop="ball-shop">
        <point yaw="-90">-48,7,-0</point>
    </shopkeeper>
</shopkeepers>

The same behaviour is seen with non-armour items as well.

Using PGM v0.16-SNAPSHOT (git-7da1edd)

@Electroid Electroid added the bug Something isn't working label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants