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 actor sheet effects tab for v11 ActiveEffects transfer #326

Merged
merged 7 commits into from
Nov 27, 2023

Conversation

wigmeister2000
Copy link
Contributor

I realised that the new v11 ActiveEffect transfer method (legacyTransferral = false) no longer "transfers" effects. Item effects don't get copied to the actor anymore, which breaks the char sheet effects tab. See also here: foundryvtt/foundryvtt#8978
The Actor4e.getActiveEffects() method returns all effects stored in the actor or transferred from items.

I realised that the new v11 ActiveEffect transfer method (legacyTransferral = false) no longer "transfers" effects. Item effects don't get copied to the actor anymore, which breaks the char sheet effects tab. See also here: foundryvtt/foundryvtt#8978
The Actor4e.getActiveEffects() method returns all effects stored in the actor or transferred from items.
@wigmeister2000
Copy link
Contributor Author

wigmeister2000 commented Nov 16, 2023

This is now using the built-in ActiveEffects getter.
EDIT: Changed back in a later commit, as the built-in ignores inactive transferred effects.

Char sheet fixes for making things work with v11 effect transfer:
- Display of inactive transferred effects.
- The delete button on the character sheet is inactivated if an effect is transferred from an item.
- Power on/off icons for effect toggling.
Embedded effects lose their source name if the item was copied and the original item becomes unavailable (for example when deleted from the Foundry items tab). This commit changes the source name from "Unknown" to the embedding item's name.
@wigmeister2000
Copy link
Contributor Author

I changed a few things in the actor sheet to make things more intuitive with the v11 ActiveEffect transfer:

  • On the character sheet effects tab, the delete button is now active for character-embedded effects only. It is unavailable if an effect is transferred from an item to prevent accidental modification of the item.
  • The toggle effect button changes between power-on/off states.
  • I made a change to the display of the effect source name if the source cannot be found. The sourceName getter of ActiveEffects retrieves the name of the original source and defaults to "Unknown" if that is unavailable. This was often confusing when an item was copied, for example from the Foundry items tab, and the original got deleted later. It now falls back to the embedding item's name instead.

@wigmeister2000
Copy link
Contributor Author

wigmeister2000 commented Nov 19, 2023

Had some error messages when accessing actors in a locked compendium. Turned out that the new (and awesome) default second wind effect function tried to modify the actor persistently.

Add tooltips to the character sheet effects tab to make long labels more readable.
@EndlesNights EndlesNights merged commit 6e071cd into EndlesNights:main Nov 27, 2023
@EndlesNights
Copy link
Owner

Sorry for the delay on the pull on this one. Turns out I need to actually update my Foundry software for bug fixes to actually work. My averment was still on , as I was still on v11.313, I was trying to trouble shoot the issue that was fixed in v11.314.
I am dumb.

@wigmeister2000
Copy link
Contributor Author

No worries at all! Thx for merging.

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.

2 participants