Skip to content

Commit 26c41ad

Browse files
authored
Merge pull request #183 from Suzanna-Linn/Suzanna-Linn-functions-adding-info
Adding info to functions
2 parents 6300241 + 5edbd53 commit 26c41ad

2 files changed

Lines changed: 97 additions & 12 deletions

File tree

lsl_definitions.schema.json

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,18 @@
173173
"slua-type": {
174174
"markdownDescription": "A more specific argument type for slua type-checking.",
175175
"type": "string"
176+
},
177+
"range": {
178+
"markdownDescription": "The minimum and maximum valid values for the argument as [min, max].",
179+
"type": "array",
180+
"minItems": 2,
181+
"maxItems": 2,
182+
"items": {
183+
"anyOf": [
184+
{ "type": "number" },
185+
{ "type": "string" }
186+
]
187+
}
176188
}
177189
},
178190
"required": [
@@ -344,6 +356,23 @@
344356
"if": { "required": ["dispatch-fn"] },
345357
"then": { "required": ["lua-module", "lua-fn"] }
346358
}
359+
},
360+
"usesEnum": {
361+
"markdownDescription": "The name of the category of constants or the list of constants used by the event or function.",
362+
"oneOf": [
363+
{
364+
"type": "string",
365+
"pattern": "^[A-Z][A-Za-z0-9]+$"
366+
},
367+
{
368+
"type": "array",
369+
"items": {
370+
"type": "string",
371+
"pattern": "^[A-Z][A-Z0-9_]*$"
372+
},
373+
"uniqueItems": true
374+
}
375+
]
347376
}
348377
},
349378
"additionalProperties": false,
@@ -577,7 +606,8 @@
577606
"markdownDescription": "A brief description of this event.",
578607
"type": "string"
579608
},
580-
"categories": { "$ref": "#/$defs/functionCategories" }
609+
"categories": { "$ref": "#/$defs/functionCategories" },
610+
"uses-enum": { "$ref": "#/$defs/usesEnum" }
581611
},
582612
"required": [
583613
"tooltip",
@@ -737,7 +767,12 @@
737767
"markdownDescription": "A brief description of this function.",
738768
"type": "string"
739769
},
740-
"categories": { "$ref": "#/$defs/functionCategories" }
770+
"categories": { "$ref": "#/$defs/functionCategories" },
771+
"uses-enum": { "$ref": "#/$defs/usesEnum" },
772+
"other-values": {
773+
"markdownDescription": "Overwrites the other-values field in the category of constants.",
774+
"type": "boolean"
775+
}
741776
},
742777
"required": [
743778
"tooltip",

0 commit comments

Comments
 (0)