Interaction Events

Interaction Completed Event

class BBOnInteractionCompletedEvent(mod_identity, sim_info, interaction, target)

Bases: BBEvent

An event that occurs when a Sim finished performing an interaction.

Usage:

@BBEventHandlerRegistry.register(ModIdentity(), BBOnInteractionCompletedEvent) def _bbl_handle_on_interaction_completed(event: BBOnInteractionCompletedEvent):

Example usage:

from bluuberrylibrary.events.event_handling.bb_event_handler_registry import BBEventHandlerRegistry
from bluuberrylibrary.classes.bb_test_result import BBTestResult

@BBEventHandlerRegistry.register(ModIdentity(), BBOnInteractionCompletedEvent)
def _bbl_handle_on_interaction_completed(event: BBOnInteractionCompletedEvent) -> BBRunResult:
    return BBRunResult.TRUE
Parameters:
  • mod_identity (BBModIdentity) – The identity of the mod that owns this event.

  • sim_info (SimInfo) – The info of a Sim.

  • interaction (Interaction) – The interaction that was completed.

  • target (GameObject or Sim) – The target of the interaction.

property finished_naturally

True, if the interaction exited on its own. False, if the interaction did not exit on its own, for example, being cancelled by the Player.

property interaction

The interaction that was completed.

property sim_info

The Sim that performed the interaction.

property target

The target of the interaction.

property was_user_cancelled

True, if the interaction was cancelled by the Player. False, if the interaction was not cancelled by the Player.