Condition_IsBargainable
Script condition function to check if a game object is bargainable.
This condition determines whether a game object (BaseObject) can be bargained by a character (NonBaseObject). The bargainability check differs based on the site type: for TinyShop sites, it checks the shop's bargain rules; for other sites (e.g., flea markets), it checks ownership.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | Game object entity to check for bargainability |
| CompareType | Not used internally |
Notes
- The character entity is resolved internally via ScriptContext (NonBaseObject).
- Returns false if either BaseObject or NonBaseObject entity is invalid.
- Returns false if the game object's located site is invalid.
- For TinyShop sites: Uses TinyShopComponent.IsBargainable() to check bargain eligibility.
- For non-TinyShop sites (e.g., flea markets): Falls back to Condition_HasOwnership check.
- CompareType is not used internally.
Examples
| Description | BaseObject | Command | CompareType |
|---|---|---|---|
| Check if object can be bargained | Self | IsBargainable | Equal |