aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/DocUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-20 14:49:10 -0400
committerbobzel <zzzman@gmail.com>2024-09-20 14:49:10 -0400
commitda6deb7c3eca25284ec662ce2a891952d86b5b79 (patch)
tree316ac8b4cd204acb639ffa1f314f6ef5eefc054a /src/client/documents/DocUtils.ts
parent988e80e4b8529a02015564f0a16114a3b16aa08f (diff)
parent650ddd4c72510ed29d023d4861dedede0737d3b9 (diff)
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/documents/DocUtils.ts')
-rw-r--r--src/client/documents/DocUtils.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts
index 74a0f5220..1696de7ad 100644
--- a/src/client/documents/DocUtils.ts
+++ b/src/client/documents/DocUtils.ts
@@ -241,7 +241,10 @@ export namespace DocUtils {
Object.keys(scripts).forEach(key => {
const script = scripts[key] as string;
if (ScriptCast(doc[key])?.script.originalScript !== scripts[key] && script) {
+ const additionalItems: { [key: string]: unknown } = {};
+ script.match(/_[a-zA-Z]*_/)?.forEach(match => (additionalItems[match] = 'any'));
(key.startsWith('_') ? doc : Doc.GetProto(doc))[key] = ScriptField.MakeScript(script, {
+ ...additionalItems,
this: Doc.name,
dragData: Doc.DocDragDataName,
value: 'any',