Skip to main content

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

ParameterDescription
BaseObjectGame object entity to check for bargainability
CompareTypeNot 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

DescriptionBaseObjectCommandCompareType
Check if object can be bargainedSelfIsBargainableEqual