Accessing the Builtin Magics of the dragdata Object
I am working through the settings of a dragdata object for a Skill die dragged into the Dice Tower.
I have come across some behind the scenes (builtin?) functionality that I need help with.
Here is a code snippet from ...\rulesets\CoreRPG\scripts\manager_actions.lua
Code:
function encodeRollForDrag(draginfo, i, vRoll)
for k,v in pairs(vRoll) do
if k == "sType" then
draginfo.setSlotType(v);
elseif k == "sDesc" then
draginfo.setStringData(v);
elseif k == "aDice" then
draginfo.setDieList(v);
elseif k == "nMod" then
draginfo.setNumberData(v);
elseif type(k) ~= "table" then
...
The value of the argument, "v", in the setDieList(v) function call highlighted above is "{ #1 = s'd20' }".
Yet, if I do a draginfo.getDieList() the value that is returned is " { #1 = { s'type' = s'd20' }, s'expr' = s'd20' }".
Put one thing in the box, if you pull it back out of the box it has morphed into something completely different. Is there a way for me to access these "magics"?