This attempts to not change any existing behavior, but instead fix several issues. For example, I think it might be good to change the behavior of set_virtualchest, but that's not within the scope of this PR.
Size wasn't getting saved/retrieved to/from CArrays properly, so using chestdata to recreate a chest defaulted it to 54.
TriggerExternal/@event is deprecated, so it needed its own event handlers.
Using chestdata keys when setting the contents would constantly post warnings under certain settings. It also threw 3 exceptions in a non-exceptional case, which is slower than just checking.
Some docs and numargs weren't updated.
set_virtualchest with null arg wasn't checking the correct arg.
A few functions were running methods redundantly.
A setter (update_virtualchest) was sometimes returning cnull, sometimes cvoid. For now I set it to only return cvoid, but maybe it should throw an exception when the virtualchest doesn't exist. This is inconsistent with other functions, so maybe all functions should throw exceptions in those cases.
Some errors were reporting function names (and/or args) that may or may not have called the method.
This attempts to not change any existing behavior, but instead fix several issues. For example, I think it might be good to change the behavior of set_virtualchest, but that's not within the scope of this PR.