greedyj4ck / DEGENESIS-FoundryVTT

DEGENESIS: Rebirth system for Foundry Virtual Tabletop
26 stars 22 forks source link

moving renderRollCard for skill rolls to actor-degenesis.js #80

Closed dmdorman closed 1 year ago

dmdorman commented 1 year ago

Hello! This is a suggested change for rendering the skill roll chat message. These changes came up when I was trying to add DEGENESIS as supported system for the module "Let Me Roll That For You" (LMRTY), but I believe these changes will be useful for other modules as well.

I moved DegenesisChat.renderRollCard from DegenesisActorSheet to DegenesisActor. The reason why it may be useful to render the chat message directly from the DegenesisActor is for rolling skills without needing to access DegenesisActorSheet.

I added the other function parameter "override" to rollSkill in order to be able to change the prefilled data dialog. The reason I added this was to be able to set skill roll difficulties when called from outside the DegenesisActorSheet.

greedyj4ck commented 1 year ago

Looking good, gonna get it tested next week and release it with 0.5.2 :)