javierriveracastro / betteroll-swade

A Better Rolls port for SWADE
GNU General Public License v3.0
16 stars 32 forks source link

Add support for skill override #728

Closed david-a-rivera closed 2 months ago

david-a-rivera commented 2 months ago

Allow user to set a skill to use as an override. Also, makes sure "actor_has_item" treats a skill as an item, which it is.

Current behavior: Custom global actions do not provide access to the skillOverride property. The actor_has_item selector does not include "skill" as an option.

New behavior: Custom global actions will now provide access to the skillOverride property to allow access to the functionality that item actions currently have. Also, the actor_has_item selector will now include "skill" as an option. This will allow custom global actions to determine if an actor has a skill in order to show the action.

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request adds support for skill override functionality in the Better Rolls for SWADE 2 module. The changes primarily involve expanding the list of item types and adding a new field for skill override in the WorldGlobalActions class.

File-Level Changes

Change Details Files
Expanded the list of item types to include 'skill'
  • Added 'skill' to the ITEM_TYPES array in the check_selector function
betterrolls-swade2/scripts/global_actions.js
Added support for skill override in WorldGlobalActions class
  • Included 'skillOverride' in the list of fields for WorldGlobalActions
betterrolls-swade2/scripts/global_actions.js

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
david-a-rivera commented 2 months ago

Fixed an issue with get_roll_options failing when optional parameter is not passed in.

javierriveracastro commented 2 months ago

Thanks for the PR. I'll think a bit about adding skill to actor_has_item, right now I'm a little against it.

The rest of the PR is great, I'll merge it when I made a decision about the former issue.

david-a-rivera commented 2 months ago

Thanks for the PR. I'll think a bit about adding skill to actor_has_item, right now I'm a little against it.

The rest of the PR is great, I'll merge it when I made a decision about the former issue.

I've added a separate PR for an actor_has_skill selector so skill can be removed from the list.