Jump to content

[Mod Compatibility+Futureproofing] `trader.acceptnontradable` does not apply while riding.


Hornete
  • Pending

In the case where an inventory item with the trader component and the acceptnontradable field to true, the GIVE action unfortunately does not appear in the specific case while riding a beefalo.

Spoiler

image.png.6fd370ae02a5b1ddd7e4eb08bb8209fd.png

The spear in the above image does not have the tradable component, but it is expected that since the `Speargun` item above has acceptnontradable to true, it should be able to provide the action.

It seems that in componentactions@USEITEM:inventoryitem it is explicitly checked that the player is not riding before allowing the action tied to the conditional of allowing any item to be given

--componentactions.lua:1175
elseif not (doer.replica.rider ~= nil and doer.replica.rider:IsRiding()) then
                if target:HasTag("alltrader") then
                    table.insert(actions, ACTIONS.GIVE)

I hope that this can be adjusted/changed to allow for what would be the intuitively expected behaviour when setting a field such as 'acceptnontradable' to be true.

Thanks!


Steps to Reproduce

1. Have an inventoryitem+trader with the `acceptnontradable` field set to true

2. Can't actually accept any non-tradable while mounted, Woe!

 




User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...