[#modding] [Moddability] `BodyPart`s should fire the `"QuerySlotList"` event on their `Defa...

Issue #6275 resolved
Freehold Games Bot Account created an issue

Marked for crossposting by: Noelle Lavenza (transgendeer)

Message (jump):

<Noelle Lavenza (transgendeer)> [Moddability] BodyParts should fire the "QuerySlotList" event on their DefaultBehavior, so that natural weapons can prevent equipping certain items without having to add a 0/0 Armor part. This would allow them to selectively allow/restrict equipping certain items. This could probably just be achieved by removing the Parts loop and return true; at the end of the E.ID == "QuerySlotList" block, which would lead to it being fired on equipped items, cybernetics, default behaviors, and other body parts.

Comments (3)

  1. chaos

    That's not how QuerySlotList works; it is never routed to any Equipped or Cybernetics object, rather it results in the minevent QueryEquippableListEvent being checked repeatedly on the object to be equipped. Equipped and Cybernetics items have the opportunity to deny the slot via CanBeUnequipped.

    Next update will have an event you can use:

    The QueryItemList event now gives DefaultBehavior objects the opportunity to prevent usage of their body part via the event CanEquipOverDefaultBehavior (parameters Object, the object to be equipped, Subject, the object it is potentially to be equippped on, and Part, the BodyPart being examined); returning false will prevent the object from being equipped in that slot.

  2. Log in to comment