NiceTSY / nice-cypher-add-ons

Small QOL for the Cypher System on FoundryVTT
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

New "type" is not recognized by the system #35

Open paulyhedral opened 8 months ago

paulyhedral commented 8 months ago

Describe the bug
New "type" is not recognized by the system

Steps to reproduce the behavior

  1. Go to Compendium Packs
  2. Create Journal Compendium called "Types: Destiny"
  3. In Compendium view, click "Create Journal Entry" and name it "Delve"
  4. Click "Add Page", select type "Text", and name it "Delve"
  5. Click edit icon in upper-right corner
  6. Enter Delve contents, particularly "@type" as the initial text, and other content
  7. Also make sure to add "@ability @tier 1"
  8. Save
  9. Create new Actor
  10. Drag "Delve" entry from Compendium view onto Actor sheet
  11. See nothing happen

Expected behavior
The Actor's "type" field should have the "Delve" entry show up, be clickable, and the "Abilities" tab should include the ability that was added to the type.

Setup

Additional context
I basically copied the format of Type entries from the Cypher System Compendium so that I could add the types in Numenera Destiny.

paulyhedral commented 8 months ago

Found this in the Javascript console:

module_creation.js:591 Uncaught (in promise) TypeError: object.match is not a function
    at journalsReading (module_creation.js:591:23)
    at async journalsToArray (module_creation.js:506:2)

(anonymous) @   add-ons.js:98
#call   @   foundry.js:730
call    @   foundry.js:712
_onDrop @   foundry.js:71189
callback    @   foundry.js:65650
🎁call_wrapped   @   libWrapper-wrapper.js:507
🎁DragDrop.prototype.callback#item-piles @   libwrapper.js:58
🎁call_wrapper   @   libWrapper-wrapper.js:616
🎁DragDrop.prototype.callback#0  @   libWrapper-wrapper.js:189
_handleDrop @   foundry.js:65701
paulyhedral commented 8 months ago

I think I found the problem.

I added a @cypher entry, but it was just text and not an Item reference. Once I removed the @cypher tag, dragging the journal entry worked as expected.