You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Supports game developers choosing nonstandard default colours while still allowing players to customize. Ties a default value to a player number or context value, and the function chooses which to use based on whether the user passed in custom values.
Copy file name to clipboardExpand all lines: src/schemas/schema.json
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -117,12 +117,42 @@
117
117
"required": ["func", "bg", "fg"],
118
118
"additionalProperties": false
119
119
},
120
+
"functionCustom": {
121
+
"description": "Supports game developers choosing nonstandard default colours while still allowing players to customize. Ties a default value to a player number or context value, and the function chooses which to use based on whether the user passed in custom values.",
122
+
"type": "object",
123
+
"properties": {
124
+
"func": {
125
+
"enum": ["custom"]
126
+
},
127
+
"default": {
128
+
"anyOf": [
129
+
{"$ref": "#/$defs/positiveInteger"},
130
+
{"$ref": "#/$defs/colourstrings"},
131
+
{"$ref": "#/$defs/colourfuncs"}
132
+
]
133
+
},
134
+
"palette": {
135
+
"anyOf": [
136
+
{"$ref": "#/$defs/positiveInteger"},
137
+
{"$ref": "#/$defs/colourstrings"},
138
+
{"$ref": "#/$defs/colourfuncs"}
139
+
]
140
+
},
141
+
"paletteType": {
142
+
"description": "Only needed if the `palette` value is a function and so the function can't tell what test to use.",
143
+
"enum": ["player", "context"]
144
+
}
145
+
},
146
+
"required": ["func", "default", "palette"],
147
+
"additionalProperties": false
148
+
},
120
149
"colourfuncs": {
121
150
"description": "Colours can also be derived using various functions.",
0 commit comments