Open trioderegion opened 2 years ago
Thanks @trioderegion, I knew I was doing something wrong ...
So the simplest solution might be to use the original token id present on tokenData instead of the actor? Or is a static string generated at runtime better?
Either approach would work. Since its token specific, you dont have to worry about name collisions much at all. Whatever identifier you have on hand that is relatively specific and easy to generate will work. Heck, it could be just "Automated Polymorph" as the name
ty for the support should be solved with 1.0.23
@trioderegion i spoke to soon... i must done something wrong again, there is this issue https://github.com/p4535992/foundryvtt-automated-polymorpher/issues/11
i cannot replicate on my side, but it's seem related to the line:
Here the code used for the mutation:
is a stupid error of mine on the 'updates' object for make failing the 'toObject ()' function?
Hmm, whatever is going on is not immediately apparent to me. I would love to see exactly what is being passed into mutate
. The line you pointed out, while not the safest, should be valid (I noticed this as well and filed an issue on warpgate to fix it).
I really should be logging these inputs on my side 😅 .
For the resolution of this ticket there is a open commissions on the league discrod server for anyone is feeling generous about it.
https://github.com/p4535992/foundryvtt-automated-polymorpher/blob/f5ea5bfe5e3d74c8a61344ce35941ede5cf8536c/src/module/api.ts#L129
This revert is not working due to this line used for the mutation: https://github.com/p4535992/foundryvtt-automated-polymorpher/blob/f5ea5bfe5e3d74c8a61344ce35941ede5cf8536c/src/module/polymorphermanager.ts#L750
where
tokenFromTransform
is defined as: https://github.com/p4535992/foundryvtt-automated-polymorpher/blob/f5ea5bfe5e3d74c8a61344ce35941ede5cf8536c/src/module/polymorphermanager.ts#L532This object is a
TokenData
class, which does not have an actor field, resulting in the ID being used as the mutation name beingnull
, which causes warp gate to generate a random ID as the name of this mutation.