This PR augments WITCH scripts being pulled up for editing with a (has ...) section that reflects an object's key value data and updates that key value data when saving a script.
This means that updating things like name and description actually have a meaningful effect (though you might have to drop/pick up the edited item before the UI reflects a name change...)
The one caveat to this PR is that when (has ...) is written back out, it runs the whole map together on one line. I couldn't think of a great, easy way to fix this so I'm leaving it alone for now.
This PR also includes a check in the call to (set-data k v) that avoids messing with the object's data if it's currently being edited.
This PR augments WITCH scripts being pulled up for editing with a
(has ...)
section that reflects an object's key value data and updates that key value data when saving a script.This means that updating things like
name
anddescription
actually have a meaningful effect (though you might have to drop/pick up the edited item before the UI reflects a name change...)The one caveat to this PR is that when
(has ...)
is written back out, it runs the whole map together on one line. I couldn't think of a great, easy way to fix this so I'm leaving it alone for now.This PR also includes a check in the call to
(set-data k v)
that avoids messing with the object's data if it's currently being edited.