OrionFive / Hospitality

Orion's "Hospitality" and more
https://www.patreon.com/orionmods
GNU General Public License v3.0
91 stars 54 forks source link

Cash register: Can't sell food if you also sell clothing? #785

Open 32bitx64bit opened 5 months ago

32bitx64bit commented 5 months ago

Describe the bug For some reason, if I'm selling clothing, food goes completely untouched, and wont ever sell. as soon as I remove clothing from my shop, food starts getting sold again.

To Reproduce Sell food, and clothing in the same shop.

Console log No crash.

Error stacktrace No errors happen.

OrionFive commented 5 months ago

I take it that this is an issue with Storefront? Maybe @tomvd can take a look.

tomvd commented 5 months ago

Given he is talking about a shop, I think so- it can be shopping area as well. Shopping area and storefront share 99% of the logic what pawns buy though. Guests generally prefer clothing over food when shopping for recreation. Only pawns that are hungry and used up the food in their inventory will look around to satisfy their hunger need and if they have money, they will buy food. (you can try this in dev mode and make a guest, with silver in their pocket, but not food really hungry - I bet they will go and buy food in your clothing+food shop) But if you remove clothing from the shop, they still want to fulfill their recreation need and don't have any choice to buy food, so its normal they start buying food in that case.

32bitx64bit commented 5 months ago

Given he is talking about a shop, I think so- it can be shopping area as well. Shopping area and storefront share 99% of the logic what pawns buy though. Guests generally prefer clothing over food when shopping for recreation. Only pawns that are hungry and used up the food in their inventory will look around to satisfy their hunger need and if they have money, they will buy food. (you can try this in dev mode and make a guest, with silver in their pocket, but not food really hungry - I bet they will go and buy food in your clothing+food shop) But if you remove clothing from the shop, they still want to fulfill their recreation need and don't have any choice to buy food, so its normal they start buying food in that case.

issue is it wouldn't even appear in the sell area, whats for sale. It would just be completely missing.

(That being the stock level thing, in the "shop" menu on the cash register)

tomvd commented 5 months ago

as soon as I remove clothing from my shop, food starts getting sold again

issue is it wouldn't even appear in the sell area, whats for sale. It would just be completely missing.

(That being the stock level thing, in the "shop" menu on the cash register)

Ok, and is the clothing part still relevant? (just trying to get the steps to reproduce right before I start testing randomly)