Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Correctly creating link anchors in TextEditor & dragging items to hotbar #304

Merged
merged 12 commits into from
Jan 18, 2023

Conversation

bakbakbakbakbak
Copy link
Collaborator

resolves #278

may fix #277 (Depends on if items should be allowed to be dragged from the Items sidebar when not owned by an actor, which is not allowed today)

By using the defined method toDragData() from the Item implementation and then adding data necessary, we are able to properly construct the uuid which now includes a reference to the Actor. While at it I took a look at the macro-code and had to re-write it to reflect changes.

@anthonyronda
Copy link
Member

Regarding your comment

(Depends on if items should be allowed to be dragged from the Items sidebar when not owned by an actor, which is not allowed today)

I'll double check what happens when the behavior here is fixed. There is an override for rolling rollable items (it might just be for weapons) and a default for all items (show item description).

Showing an item description for items you can see somehow is a good overall macro for any helpful player who wants to share the item description for chat.

Allowing a player to roll an item their owned actor doesn't own is confusing. I would say that's not desirable behavior

@anthonyronda anthonyronda self-requested a review January 18, 2023 13:37
@anthonyronda
Copy link
Member

I just did a sanity check in the system

No one, including GM, can drag items from the directory to the macro bar for any reason (even as an "open this item" macro). GM not having this ability is a little unexpected for me but apparently how it has always worked and out of scope for the issue this fixes.

Players with observer-only permission on an actor can't drag items from that actor. Makes sense, likely the core functionality.

As for the main usecase:

Copying them over now works correctly. 🎉

It appears as though we're not properly error checking in the macros themselves re:checking for a selected actor. If there's not an actor selected, we get console errors instead

Uncaught (in promise) TypeError: actor is undefined
[Detected 2 packages: system:ose-test, lib-wrapper]
    rollItemMacro macros.js:64
    anonymous foundry.js line 20080 > AsyncFunction:3
    _executeScript foundry.js:20082
    execute foundry.js:20037
    _onClickMacro foundry.js:68365
    jQuery 9
    activateListeners foundry.js:68284
    _render foundry.js:5138
    render foundry.js:5067
    initializeUI foundry.js:8071
    setupGame foundry.js:7931
    _initializeGameView foundry.js:8999
    _initializeView foundry.js:8975
    initialize foundry.js:7825
    call_wrapped libWrapper-wrapper.js:507
    libWrapperInit libWrapper-api.js:803
    initialize#0 libWrapper-wrapper.js:187
    <anonymous> foundry.js:79693
    async* foundry.js:79675

@bakbakbakbakbak
Copy link
Collaborator Author

I'll try to make write a test for it and extend the ticket if I can figure it out!

@bakbakbakbakbak
Copy link
Collaborator Author

I discovered that unlinked tokens can't create macros either!

@bakbakbakbakbak
Copy link
Collaborator Author

I have no idea how to write a test for unlinked tokens, and since I couldn't figure out how to create a scene using code, I manually tested this.

The behavior now is that either you have to have a token you own selected (User Configuration) OR you own an actor you haven't selected, but a token (linked or non-linked) is present on the scene.

Copy link
Member

@anthonyronda anthonyronda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I ran into some bugs with this one, please take a look

@@ -11,11 +11,11 @@
*/
export async function createOseMacro(data, slot) {
if (data.type !== "Item") return;
if (!("data" in data))
if (!(!(data.tokenId && data.sceneId) || data.uuid.indexOf("Actor") < 0 ))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is written such that pulling from the Item directory results in the following logic (sorry if this is confusing)

data.tokenId = null;
data.tokenId is false, so (data.tokenId && data.sceneId) is false
!(false) is true, ignore everything after the ||
!(!(false)||ignored) = !(true) = false

as a result, it does not run our if statement to return our UI error when dragging from the item directory, and then we get a console error because it can't find item from the (null) actor

Uncaught (in promise) TypeError: item is undefined
[Detected 1 package: system:ose-test]
    createOseMacro macros.js:21
    <anonymous> ose.js:137
    #call foundry.js:724
    call foundry.js:706
    _onDrop foundry.js:68425
    callback foundry.js:56837
    _handleDrop foundry.js:56888
    bind foundry.js:56822
    _activateCoreListeners foundry.js:5371
    _activateCoreListeners foundry.js:5371
    _render foundry.js:5137
    render foundry.js:5067
    _onUpdate foundry.js:22829
    callback foundry.js:12823
    documents foundry.js:12766
    _handleUpdateDocuments foundry.js:12766
    _updateDocuments foundry.js:12639
    update commons.js:6796
    updateDocuments commons.js:6153
    update commons.js:6250
    assignHotbarMacro foundry.js:22684
    createOseMacro macros.js:34
    <anonymous> ose.js:137
    #call foundry.js:724
    call foundry.js:706
    _onDrop foundry.js:68425
    callback foundry.js:56837
    _handleDrop foundry.js:56888
    bind foundry.js:56822
    _activateCoreListeners foundry.js:5371
    _activateCoreListeners foundry.js:5371
    _render foundry.js:5137
    render foundry.js:5067
    _onUpdate foundry.js:22829
    callback foundry.js:12823
    documents foundry.js:12766
    _handleUpdateDocuments foundry.js:12766
    _updateDocuments foundry.js:12639
    update commons.js:6796

Copy link
Collaborator Author

@bakbakbakbakbak bakbakbakbakbak Jan 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of this, and there seem to be no possible scenario where an item is dragged from something other than:

  1. Actor sheet
  2. Items sidebar
  3. Compendium

The latest commit checks for the index of Item. in the uuid-string that is generated for the item using Item.toDragData(). Every time this string is generated, the "Item." part of the string is located after the initial position of the string (which was the bug previously, that we didn't use Item.toDragData() to generate the string). The occurences where it is dragged from Item sidebar och a Compendium, it's either in the 0-position or absent from the string.

  • From unlinked token: Scene.sceneId.Token.tokenId.Item.itemId
  • From linked token / owned actor: Actor.actorId.Item.itemId
  • From Items sidebar: Item.itemId
  • From Compendium: Compendium.world.itemName.itemId

Thus, the logic was changed to reflect that in commit 4a748cc.

@anthonyronda
Copy link
Member

This isn't your fault but I just noticed OSE.warn.noItemWithName should be OSE.error.noItemWithName in macros.js:67. While looking over the changes could you fix that please? 😇 🙏

Copy link
Member

@anthonyronda anthonyronda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -11,7 +11,7 @@
*/
export async function createOseMacro(data, slot) {
if (data.type !== "Item") return;
if (!(!(data.tokenId && data.sceneId) || data.uuid.indexOf("Actor") < 0 ))
if ( data.uuid.indexOf("Item.") <= 0 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 clever haha

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes it happens :P

@anthonyronda anthonyronda merged commit afdaead into vttred:main Jan 18, 2023
@bakbakbakbakbak bakbakbakbakbak deleted the issue_278 branch January 18, 2023 21:55
bakbakbakbakbak added a commit to bakbakbakbakbak/ose that referenced this pull request Jan 18, 2023
…to hotbar (vttred#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
bakbakbakbakbak added a commit to bakbakbakbakbak/ose that referenced this pull request Jan 18, 2023
…to hotbar (vttred#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
anthonyronda added a commit that referenced this pull request Jan 23, 2023
* fix: async restores treasure result text (#272)

* fix: async restores treasure result text

* fix: avoid race conditions with flag "async:false"

* fix: Monster Data Model bugfixes (#279)

* fix: On dropping item onto actor, check for existence before checking for anything related to containers

* fix: Remove pre-container-data-model code for handling containers on monsters

* fix: Programmers and linguists agree: Why Plurals?

* fix: don't reroll on round 1 if already rolled (#280)

* Create CNAME

* docs: add Haxxer as a contributor for code (#281)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* fix(temporary): removed caching from the build ci

* fix: AC/AAC display fix + party overview fix (#286)

* fix: Add missing usesAscendingAC key

* fix: Update deprecated code

* fix: use game.system.id instead of OSE.systemName when getting party members

* fix: Additional v1.7.x fixes (#289)

* fix: Character generator now properly sets scores

* fix: Items should once again properly display their descriptions.

* fix: Treasure items should be created under the Treasure inventory heading

* fix: Item and armor descriptions should target the correct fields

* fix: replaced broken chart with "translated" badge

* chore: update README to where people can find the Discord invite

* feat: add Catalan and Chinese support to manifest

* Updates to Item Piles system integration (#292)

* Updates to system integration

* Added unstackable item types

* [enhancement] Added option to revert Ctrl/Meta behavior (#294)

* [enhancement] Added option to revert Ctrl/Meta behavior

* Extracted skipDialogCheck to method

* Removed comment about monster testing.

* Moved skipRollDialogcheck to helper collection

* cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* docs: add bakbakbakbakbak as a contributor for code (#302)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add adn770 as a contributor for translation (#303)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* [enhancement] Container delete confirmation (#299)

* [enhancement] Added confirmation when deleting containers containing items

* [fix] Container now pushes out containing items.

* Changed to Dialog.confirm

* Cleanup

* cleanup

* Allow first item check condition to allow no item

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: shopping cart now deducts gold

* Remove confusing monster options (#308)

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* [fix] Correctly creating link anchors in TextEditor & dragging items to hotbar (#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: Macro for same item name now creates

Co-authored-by: Anthony Ronda <anthonyronda@gmail.com>
Co-authored-by: Tim <tim.snyder.work@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Adam Oresten <adamoresten@gmail.com>
Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
bakbakbakbakbak added a commit to bakbakbakbakbak/ose that referenced this pull request Jan 24, 2023
…to hotbar (vttred#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
bakbakbakbakbak added a commit to bakbakbakbakbak/ose that referenced this pull request Jan 28, 2023
* fix: async restores treasure result text (vttred#272)

* fix: async restores treasure result text

* fix: avoid race conditions with flag "async:false"

* fix: Monster Data Model bugfixes (vttred#279)

* fix: On dropping item onto actor, check for existence before checking for anything related to containers

* fix: Remove pre-container-data-model code for handling containers on monsters

* fix: Programmers and linguists agree: Why Plurals?

* fix: don't reroll on round 1 if already rolled (vttred#280)

* Create CNAME

* docs: add Haxxer as a contributor for code (vttred#281)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* fix(temporary): removed caching from the build ci

* fix: AC/AAC display fix + party overview fix (vttred#286)

* fix: Add missing usesAscendingAC key

* fix: Update deprecated code

* fix: use game.system.id instead of OSE.systemName when getting party members

* fix: Additional v1.7.x fixes (vttred#289)

* fix: Character generator now properly sets scores

* fix: Items should once again properly display their descriptions.

* fix: Treasure items should be created under the Treasure inventory heading

* fix: Item and armor descriptions should target the correct fields

* fix: replaced broken chart with "translated" badge

* chore: update README to where people can find the Discord invite

* feat: add Catalan and Chinese support to manifest

* Updates to Item Piles system integration (vttred#292)

* Updates to system integration

* Added unstackable item types

* [enhancement] Added option to revert Ctrl/Meta behavior (vttred#294)

* [enhancement] Added option to revert Ctrl/Meta behavior

* Extracted skipDialogCheck to method

* Removed comment about monster testing.

* Moved skipRollDialogcheck to helper collection

* cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* docs: add bakbakbakbakbak as a contributor for code (vttred#302)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add adn770 as a contributor for translation (vttred#303)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* [enhancement] Container delete confirmation (vttred#299)

* [enhancement] Added confirmation when deleting containers containing items

* [fix] Container now pushes out containing items.

* Changed to Dialog.confirm

* Cleanup

* cleanup

* Allow first item check condition to allow no item

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: shopping cart now deducts gold

* Remove confusing monster options (vttred#308)

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* [fix] Correctly creating link anchors in TextEditor & dragging items to hotbar (vttred#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: Macro for same item name now creates

Co-authored-by: Anthony Ronda <anthonyronda@gmail.com>
Co-authored-by: Tim <tim.snyder.work@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Adam Oresten <adamoresten@gmail.com>
Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
bakbakbakbakbak added a commit to bakbakbakbakbak/ose that referenced this pull request Jan 28, 2023
* fix: async restores treasure result text (vttred#272)

* fix: async restores treasure result text

* fix: avoid race conditions with flag "async:false"

* fix: Monster Data Model bugfixes (vttred#279)

* fix: On dropping item onto actor, check for existence before checking for anything related to containers

* fix: Remove pre-container-data-model code for handling containers on monsters

* fix: Programmers and linguists agree: Why Plurals?

* fix: don't reroll on round 1 if already rolled (vttred#280)

* Create CNAME

* docs: add Haxxer as a contributor for code (vttred#281)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* fix(temporary): removed caching from the build ci

* fix: AC/AAC display fix + party overview fix (vttred#286)

* fix: Add missing usesAscendingAC key

* fix: Update deprecated code

* fix: use game.system.id instead of OSE.systemName when getting party members

* fix: Additional v1.7.x fixes (vttred#289)

* fix: Character generator now properly sets scores

* fix: Items should once again properly display their descriptions.

* fix: Treasure items should be created under the Treasure inventory heading

* fix: Item and armor descriptions should target the correct fields

* fix: replaced broken chart with "translated" badge

* chore: update README to where people can find the Discord invite

* feat: add Catalan and Chinese support to manifest

* Updates to Item Piles system integration (vttred#292)

* Updates to system integration

* Added unstackable item types

* [enhancement] Added option to revert Ctrl/Meta behavior (vttred#294)

* [enhancement] Added option to revert Ctrl/Meta behavior

* Extracted skipDialogCheck to method

* Removed comment about monster testing.

* Moved skipRollDialogcheck to helper collection

* cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* docs: add bakbakbakbakbak as a contributor for code (vttred#302)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add adn770 as a contributor for translation (vttred#303)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* [enhancement] Container delete confirmation (vttred#299)

* [enhancement] Added confirmation when deleting containers containing items

* [fix] Container now pushes out containing items.

* Changed to Dialog.confirm

* Cleanup

* cleanup

* Allow first item check condition to allow no item

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: shopping cart now deducts gold

* Remove confusing monster options (vttred#308)

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* [fix] Correctly creating link anchors in TextEditor & dragging items to hotbar (vttred#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: Macro for same item name now creates

Co-authored-by: Anthony Ronda <anthonyronda@gmail.com>
Co-authored-by: Tim <tim.snyder.work@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Adam Oresten <adamoresten@gmail.com>
Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
bakbakbakbakbak added a commit to bakbakbakbakbak/ose that referenced this pull request Jan 28, 2023
* fix: async restores treasure result text (vttred#272)

* fix: async restores treasure result text

* fix: avoid race conditions with flag "async:false"

* fix: Monster Data Model bugfixes (vttred#279)

* fix: On dropping item onto actor, check for existence before checking for anything related to containers

* fix: Remove pre-container-data-model code for handling containers on monsters

* fix: Programmers and linguists agree: Why Plurals?

* fix: don't reroll on round 1 if already rolled (vttred#280)

* Create CNAME

* docs: add Haxxer as a contributor for code (vttred#281)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* fix(temporary): removed caching from the build ci

* fix: AC/AAC display fix + party overview fix (vttred#286)

* fix: Add missing usesAscendingAC key

* fix: Update deprecated code

* fix: use game.system.id instead of OSE.systemName when getting party members

* fix: Additional v1.7.x fixes (vttred#289)

* fix: Character generator now properly sets scores

* fix: Items should once again properly display their descriptions.

* fix: Treasure items should be created under the Treasure inventory heading

* fix: Item and armor descriptions should target the correct fields

* fix: replaced broken chart with "translated" badge

* chore: update README to where people can find the Discord invite

* feat: add Catalan and Chinese support to manifest

* Updates to Item Piles system integration (vttred#292)

* Updates to system integration

* Added unstackable item types

* [enhancement] Added option to revert Ctrl/Meta behavior (vttred#294)

* [enhancement] Added option to revert Ctrl/Meta behavior

* Extracted skipDialogCheck to method

* Removed comment about monster testing.

* Moved skipRollDialogcheck to helper collection

* cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* docs: add bakbakbakbakbak as a contributor for code (vttred#302)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add adn770 as a contributor for translation (vttred#303)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* [enhancement] Container delete confirmation (vttred#299)

* [enhancement] Added confirmation when deleting containers containing items

* [fix] Container now pushes out containing items.

* Changed to Dialog.confirm

* Cleanup

* cleanup

* Allow first item check condition to allow no item

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: shopping cart now deducts gold

* Remove confusing monster options (vttred#308)

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* [fix] Correctly creating link anchors in TextEditor & dragging items to hotbar (vttred#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: Macro for same item name now creates

Co-authored-by: Anthony Ronda <anthonyronda@gmail.com>
Co-authored-by: Tim <tim.snyder.work@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Adam Oresten <adamoresten@gmail.com>
Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
bakbakbakbakbak added a commit to bakbakbakbakbak/ose that referenced this pull request Jan 29, 2023
…to hotbar (vttred#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
anthonyronda added a commit that referenced this pull request Apr 7, 2023
* feat: Add linting packages and config

* chore: Get ready for Prettier

* chore: Get eslint --fix ready to roll; add eslint globals

* fix: Explicitly support array-flat and array-includes

* fix: Don't fix linting issues during the build step

* feat: Add linting packages and config

* chore: Get ready for Prettier

* chore: Get eslint --fix ready to roll; add eslint globals

* fix: Explicitly support array-flat and array-includes

* fix: Don't fix linting issues during the build step

* fix: async restores treasure result text (#272)

* fix: async restores treasure result text

* fix: avoid race conditions with flag "async:false"

* fix: Monster Data Model bugfixes (#279)

* fix: On dropping item onto actor, check for existence before checking for anything related to containers

* fix: Remove pre-container-data-model code for handling containers on monsters

* fix: Programmers and linguists agree: Why Plurals?

* fix: don't reroll on round 1 if already rolled (#280)

* Create CNAME

* docs: add Haxxer as a contributor for code (#281)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* fix(temporary): removed caching from the build ci

* fix: AC/AAC display fix + party overview fix (#286)

* fix: Add missing usesAscendingAC key

* fix: Update deprecated code

* fix: use game.system.id instead of OSE.systemName when getting party members

* fix: `lint:js` script now lints the correct folder

* fix: == to ===

* chore: Disable some less useful linting rules

* chore: Add file summary to ose.scss.js

* chore: Fix ose.js per linting rules

* feat: Get prettier set up to sort imports

* chore: Use prettier-eslint to sort imports

* fix: Macro for same item name now creates (#314)

* fix: async restores treasure result text (#272)

* fix: async restores treasure result text

* fix: avoid race conditions with flag "async:false"

* fix: Monster Data Model bugfixes (#279)

* fix: On dropping item onto actor, check for existence before checking for anything related to containers

* fix: Remove pre-container-data-model code for handling containers on monsters

* fix: Programmers and linguists agree: Why Plurals?

* fix: don't reroll on round 1 if already rolled (#280)

* Create CNAME

* docs: add Haxxer as a contributor for code (#281)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* fix(temporary): removed caching from the build ci

* fix: AC/AAC display fix + party overview fix (#286)

* fix: Add missing usesAscendingAC key

* fix: Update deprecated code

* fix: use game.system.id instead of OSE.systemName when getting party members

* fix: Additional v1.7.x fixes (#289)

* fix: Character generator now properly sets scores

* fix: Items should once again properly display their descriptions.

* fix: Treasure items should be created under the Treasure inventory heading

* fix: Item and armor descriptions should target the correct fields

* fix: replaced broken chart with "translated" badge

* chore: update README to where people can find the Discord invite

* feat: add Catalan and Chinese support to manifest

* Updates to Item Piles system integration (#292)

* Updates to system integration

* Added unstackable item types

* [enhancement] Added option to revert Ctrl/Meta behavior (#294)

* [enhancement] Added option to revert Ctrl/Meta behavior

* Extracted skipDialogCheck to method

* Removed comment about monster testing.

* Moved skipRollDialogcheck to helper collection

* cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* docs: add bakbakbakbakbak as a contributor for code (#302)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add adn770 as a contributor for translation (#303)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* [enhancement] Container delete confirmation (#299)

* [enhancement] Added confirmation when deleting containers containing items

* [fix] Container now pushes out containing items.

* Changed to Dialog.confirm

* Cleanup

* cleanup

* Allow first item check condition to allow no item

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: shopping cart now deducts gold

* Remove confusing monster options (#308)

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* [fix] Correctly creating link anchors in TextEditor & dragging items to hotbar (#304)

* [fix] Use item.getDragData to fix bad link

* [fix] Macro creation when dragging item from actor

* Fixed macro warning for non-actor items

* Tests for item macros

* Cleanup

* Unlinked token macro fix

* Fixed typo in en.json

* Fixed bug on row 67

* Non-destructive macro removal

* Macro logic

* Cleanup

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: Macro for same item name now creates

Co-authored-by: Anthony Ronda <anthonyronda@gmail.com>
Co-authored-by: Tim <tim.snyder.work@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Adam Oresten <adamoresten@gmail.com>
Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* chore: eslint-prettier automatic fixes

* chore: Ignore unused expressions when writing tests

* chore: Oh no

* chore: Autofix rebased changes

* chore: Requested PR fixes

* chore: Remove unnecessary eslint disables

* chore: Combine two ESlint disables into one

* chore(tests): helpers, actor, dialog, item, party

* chore: renaming helpers & imports

* fix: exporting functions for test for treasure

* fix(test): missing method import

* chore(test): make sure token vision

* Cleanup & comment fix

* fix: entity-tweaks-tests

* fix: Config tag_images not returning properly

* fix(macro): Allow macro to be dragged to hotbar

* fix(party): Fix recursive folder adding for 1.8.x (#346)

* fix(party): Fix recursive folder adding

* fix: Actor, not Folder

---------

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix(item): Make spendSpell async for 1.8.x (#352)

* fix(item): Make spendSpell async

* cleanup & lint

---------

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix(dice): Dice rolling fixes for 1.8.x (#345)

* fix: dice rolling fixes

* chore(test): dice rolling

* chore(test): sendAttackRoll cleanup

* chore(desc): Added description to attackIsSuccess

* Added descriptions to helpers-dice.js

* chore(test): Added tests for issue #340

* chore(desc): Better test descriptions for #340

* cleanup

* fix(dice): Always allow hit when untargeted, #333

* cleanup

---------

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix(treasure): Make drawTreasure asynchronous

* fix: making percent call synchronous

* chore(utils): testUtils tweaks

* chore(test): Actor testing up to sheet

* chore(lint): Test linting & remova assert(false)

* chore(structure): Better naming of test suite

* chore(structure): Fixed remaining test names

* fix(test): revert closeSheets to standard delay

* fix(test): renamed cleanUpActorsKey

* chore(lint): spacing and linting to dice tests

* chore(lint): sheet linewidth linting

* fix: defined type for key in cleanUpActorsByKey

* fix(tweaks): Added class to entity tweaks

* fix: wyrmisis comments

* Symlinker now supports array of dataPaths (#360)

* fix(symlink): support path array

* fix(symlink): capitalization & typedef

* fix: Array for right term

---------

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* chore: data migration to default img (#325)

* chore: data migration to default img

* fix: checking for empty instead of undef

---------

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix(item): Dragging a container onto itself pops it from inventory sheet (#359)

* fix(actor-sheet): use item in _removeItemFromActor

* fix(actor-sheet): dropping items on container

* chore(test): Issue #357 tests

* fix(container): Container drop onto itself #357

* chore: Updated comment

---------

Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>

* fix: isNew() tests now check against saves (#386)

* feat: added itemId tag to spell card for AA compat

* fix: the isNew tests now check against saves

* fix: undo ItemIds commit

* feat: added itemId tag to spell card for AA compat

* fix: resolve conflicts mistakes part 1

* fix: character creation autoroll no longer broken

* fix: actor's language delete button

* fix: additional "data" to "system" fixes

---------

Co-authored-by: wyrmisis <tim.snyder.work@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: bakbakbakbakbak <105067023+bakbakbakbakbak@users.noreply.github.com>
Co-authored-by: Adam Oresten <adamoresten@gmail.com>
Co-authored-by: bakbakbakbakbak <bakbakbakbak@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uuid broken when dragging items from character or monster sheet to chat FoundryVTT macro bug
2 participants