-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFezScriptEntityTypeDescriptorTableFormatter.html
More file actions
326 lines (297 loc) · 47.9 KB
/
Copy pathFezScriptEntityTypeDescriptorTableFormatter.html
File metadata and controls
326 lines (297 loc) · 47.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Jenna Sloan">
<title>Fez ScriptEntityTypeDescriptors Table Formatter</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="light dark" />
<style>
body {
white-space: pre-wrap;
font-family: monospace;
}
table,tr,th,td {
border-width: 1px;
border-style: solid;
border-collapse: collapse;
}
.namespace {
font-size: smaller;
}
</style>
<script>
//Note: types that are static do not need Models
/*
ScriptTrigger is ScriptEntityTypeDescriptor.Events
ScriptCondition has ScriptEntityTypeDescriptor.Properties
ScriptAction is ScriptEntityTypeDescriptor.Operations
*/
/*
if ScriptEntityTypeDescriptor.Static is true, ScriptEntityTypeDescriptor.Model has a value
ScriptEntityTypeDescriptor.Model is documented to be one of the following:
ArtObjectInstance, BackgroundPlane, TrileGroup, NpcInstance, MovementPath, Script, or Volume
*/
const ScriptEntityTypeDescriptors = {"ScriptEntityTypeDescriptors": {"ArtObject": {"Name": "ArtObject", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": null, "Interface": {"Name": "IArtObjectService", "FullName": "FezEngine.Services.Scripting.IArtObjectService"}, "Operations": {"SetRotation": {"Name": "SetRotation", "Description": "Replaces the rotation angles (in degrees)", "Parameters": [{"Name": "x", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "y", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "z", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "Rotate": {"Name": "Rotate", "Description": "Rotates over time (in rotations per second)", "Parameters": [{"Name": "dX", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "dY", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "dZ", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "RotateIncrementally": {"Name": "RotateIncrementally", "Description": "Rotates incrementally over time (in time before doubling)", "Parameters": [{"Name": "initPitch", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "initYaw", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "initRoll", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "secondsUntilDouble", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "TiltOnVertex": {"Name": "TiltOnVertex", "Description": "Tilts the art object on its bottom vertex", "Parameters": [{"Name": "durationSeconds", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "Move": {"Name": "Move", "Description": "Moves incrementally over time (in units per second)", "Parameters": [{"Name": "dX", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "dY", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "dZ", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "easeInFor", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "easeOutAfter", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "easeOutFor", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "HoverFloat": {"Name": "HoverFloat", "Description": "Makes the object hover vertically", "Parameters": [{"Name": "height", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "cyclesPerSecond", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "StartEldersSequence": {"Name": "StartEldersSequence", "Description": "Does the whole hex-room sequence", "Parameters": []}, "MoveNutToEnd": {"Name": "MoveNutToEnd", "Description": "Moves a nut&bolt to its end", "Parameters": []}, "MoveNutToHeight": {"Name": "MoveNutToHeight", "Description": "Moves a nut&bolt to a certain height, and gradually", "Parameters": [{"Name": "height", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "GlitchOut": {"Name": "GlitchOut", "Description": "Glitches and removes art object (and associated group if any)", "Parameters": [{"Name": "permanent", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "spawnedActor", "Type": {"Name": "String", "FullName": "System.String"}}]}, "BeamGomez": {"Name": "BeamGomez", "Description": "For the hexahedron", "Parameters": []}, "Pulse": {"Name": "Pulse", "Description": "For the glow blocks", "Parameters": [{"Name": "textureName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "Say": {"Name": "Say", "Description": "For the zuish speech", "Parameters": [{"Name": "text", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "zuish", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {"TreasureOpened": {"Name": "TreasureOpened", "Description": ""}}}, "BigWaterfall": {"Name": "BigWaterfall", "Static": false, "Model": {"Name": "BackgroundPlane", "FullName": "FezEngine.Structure.BackgroundPlane"}, "RestrictTo": {"ActorTypes": ["BigWaterfall"]}, "Interface": {"Name": "IBigWaterfallService", "FullName": "FezEngine.Services.Scripting.IBigWaterfallService"}, "Operations": {"Open": {"Name": "Open", "Description": "", "Parameters": []}}, "Properties": {}, "Events": {}}, "BitDoor": {"Name": "BitDoor", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["EightBitDoor"]}, "Interface": {"Name": "IBitDoorService", "FullName": "FezEngine.Services.Scripting.IBitDoorService"}, "Operations": {}, "Properties": {}, "Events": {"Open": {"Name": "Open", "Description": "When it's opened"}}}, "Camera": {"Name": "Camera", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "ICameraService", "FullName": "FezEngine.Services.Scripting.ICameraService"}, "Operations": {"SetPixelsPerTrixel": {"Name": "SetPixelsPerTrixel", "Description": "Set the number of pixels per trixel (default is 4)", "Parameters": [{"Name": "triles", "Type": {"Name": "Int32", "FullName": "System.Int32"}}]}, "SetCanRotate": {"Name": "SetCanRotate", "Description": "Changes whether Gomez can rotate the camera", "Parameters": [{"Name": "canRotate", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "Rotate": {"Name": "Rotate", "Description": "Forces camera rotation, left (-1 to -3) or right (1 to 3)", "Parameters": [{"Name": "distance", "Type": {"Name": "Int32", "FullName": "System.Int32"}}]}, "RotateTo": {"Name": "RotateTo", "Description": "Rotates to any view orientation (Left, Right, Front, Back)", "Parameters": [{"Name": "viewName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "FadeTo": {"Name": "FadeTo", "Description": "Fades to the chosen color (Black, White, etc.)", "Parameters": [{"Name": "colorName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "FadeFrom": {"Name": "FadeFrom", "Description": "Fades from the chosen color (Black, White, etc.)", "Parameters": [{"Name": "colorName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "Flash": {"Name": "Flash", "Description": "Flashes the chosen color once (Black, White, etc.)", "Parameters": [{"Name": "colorName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "Shake": {"Name": "Shake", "Description": "Shakes the camera and vibrates controller", "Parameters": [{"Name": "distance", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "durationSeconds", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "SetDescending": {"Name": "SetDescending", "Description": "Sets the camera offset as descending (true) or ascending (false)", "Parameters": [{"Name": "descending", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "Unconstrain": {"Name": "Unconstrain", "Description": "Remove the constraints (volume focus etc.)", "Parameters": []}}, "Properties": {}, "Events": {"Rotated": {"Name": "Rotated", "Description": "When the viewpoint changed"}}}, "CodePattern": {"Name": "CodePattern", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["Rumbler", "CodeMachine", "QrCode"]}, "Interface": {"Name": "ICodePatternService", "FullName": "FezEngine.Services.Scripting.ICodePatternService"}, "Operations": {}, "Properties": {}, "Events": {"Activated": {"Name": "Activated", "Description": "When the right pattern is input"}}}, "Dot": {"Name": "Dot", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "IDotService", "FullName": "FezEngine.Services.Scripting.IDotService"}, "Operations": {"Say": {"Name": "Say", "Description": "Makes Dot say a custom text line", "Parameters": [{"Name": "line", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "nearGomez", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "hideAfter", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "ComeBackAndHide": {"Name": "ComeBackAndHide", "Description": "Hides Dot in Gomez's hat", "Parameters": [{"Name": "withCamera", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "SpiralAround": {"Name": "SpiralAround", "Description": "Spiral around the level, yo", "Parameters": [{"Name": "withCamera", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "hideDot", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}, "Game": {"Name": "Game", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "IGameService", "FullName": "FezEngine.Services.Scripting.IGameService"}, "Operations": {"EndTrial": {"Name": "EndTrial", "Description": "Stops the trial EXPERIENCE and requires that the game is bought to continue", "Parameters": [{"Name": "forceRestart", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "Wait": {"Name": "Wait", "Description": "Pauses the script for some time", "Parameters": [{"Name": "seconds", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "GlitchUp": {"Name": "GlitchUp", "Description": "Glitch up", "Parameters": []}, "Reboot": {"Name": "Reboot", "Description": "Reboots", "Parameters": [{"Name": "toLevel", "Type": {"Name": "String", "FullName": "System.String"}}]}, "SetGravity": {"Name": "SetGravity", "Description": "Changes gravity", "Parameters": [{"Name": "inverted", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "factor", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "ShowScroll": {"Name": "ShowScroll", "Description": "Show scroll with localized string, for some time or indefinitely (0 or less), at the top or the bottom of the screen", "Parameters": [{"Name": "localizedString", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "forSeconds", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "onTop", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "onVolume", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "CloseScroll": {"Name": "CloseScroll", "Description": "Hides the current scroll immediately", "Parameters": [{"Name": "key", "Type": {"Name": "String", "FullName": "System.String"}}]}, "SetGlobalState": {"Name": "SetGlobalState", "Description": "Sets a state string that is kept between levels", "Parameters": [{"Name": "state", "Type": {"Name": "String", "FullName": "System.String"}}]}, "SetLevelState": {"Name": "SetLevelState", "Description": "Sets a state string that is local to that level", "Parameters": [{"Name": "state", "Type": {"Name": "String", "FullName": "System.String"}}]}, "AllowMapUsage": {"Name": "AllowMapUsage", "Description": "", "Parameters": []}, "Start32BitCutscene": {"Name": "Start32BitCutscene", "Description": "", "Parameters": []}, "Start64BitCutscene": {"Name": "Start64BitCutscene", "Description": "", "Parameters": []}, "Checkpoint": {"Name": "Checkpoint", "Description": "", "Parameters": []}, "ResolveMapQR": {"Name": "ResolveMapQR", "Description": "", "Parameters": []}, "ResolveSewerQR": {"Name": "ResolveSewerQR", "Description": "", "Parameters": []}, "ResolveZuQR": {"Name": "ResolveZuQR", "Description": "", "Parameters": []}, "ShowCapsuleLetter": {"Name": "ShowCapsuleLetter", "Description": "", "Parameters": []}}, "Properties": {"IsScrollOpen": {"Name": "IsScrollOpen", "Description": "Is there an open scroll?", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "GetGlobalState": {"Name": "GetGlobalState", "Description": "", "Type": {"Name": "String", "FullName": "System.String"}}, "GetLevelState": {"Name": "GetLevelState", "Description": "", "Type": {"Name": "String", "FullName": "System.String"}}, "IsMapQrResolved": {"Name": "IsMapQrResolved", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "IsSewerQrResolved": {"Name": "IsSewerQrResolved", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "IsZuQrResolved": {"Name": "IsZuQrResolved", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}}, "Events": {}}, "Gomez": {"Name": "Gomez", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "IGomezService", "FullName": "FezEngine.Services.Scripting.IGomezService"}, "Operations": {"SetCanControl": {"Name": "SetCanControl", "Description": "Sets whether Gomez can be controlled by the player", "Parameters": [{"Name": "controllable", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "SetAction": {"Name": "SetAction", "Description": "Sets the current action (animation) for Gomez", "Parameters": [{"Name": "actionName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "AllowEnterTunnel": {"Name": "AllowEnterTunnel", "Description": "Allows Gomez to enter that tunnel/passageway by pressing up", "Parameters": []}, "SetFezVisible": {"Name": "SetFezVisible", "Description": "Shows/Hides gomez's fez", "Parameters": [{"Name": "visible", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "SetGomezVisible": {"Name": "SetGomezVisible", "Description": "Shows/Hides gomez", "Parameters": [{"Name": "visible", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {"CollectedCubes": {"Name": "CollectedCubes", "Description": "The number of small golden cubes the player's collected", "Type": {"Name": "Int32", "FullName": "System.Int32"}}, "Grounded": {"Name": "Grounded", "Description": "Is he standing on solid ground?", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "CanControl": {"Name": "CanControl", "Description": "Is Gomez controllable by the player?", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "Visible": {"Name": "Visible", "Description": "Is Gomez visible?", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "IsOnLadder": {"Name": "IsOnLadder", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "Alive": {"Name": "Alive", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "CollectedSplits": {"Name": "CollectedSplits", "Description": "", "Type": {"Name": "Int32", "FullName": "System.Int32"}}}, "Events": {"EnteredDoor": {"Name": "EnteredDoor", "Description": ""}, "Jumped": {"Name": "Jumped", "Description": ""}, "ClimbedLadder": {"Name": "ClimbedLadder", "Description": ""}, "ClimbedVine": {"Name": "ClimbedVine", "Description": ""}, "LookedAround": {"Name": "LookedAround", "Description": ""}, "LiftedObject": {"Name": "LiftedObject", "Description": ""}, "ThrewObject": {"Name": "ThrewObject", "Description": ""}, "OpenedMenuCube": {"Name": "OpenedMenuCube", "Description": ""}, "ReadSign": {"Name": "ReadSign", "Description": ""}, "GrabbedLedge": {"Name": "GrabbedLedge", "Description": ""}, "DropObject": {"Name": "DropObject", "Description": ""}, "DroppedLedge": {"Name": "DroppedLedge", "Description": ""}, "Hoisted": {"Name": "Hoisted", "Description": ""}, "ClimbedOverLadder": {"Name": "ClimbedOverLadder", "Description": ""}, "DroppedFromLadder": {"Name": "DroppedFromLadder", "Description": ""}, "ReadMail": {"Name": "ReadMail", "Description": ""}, "CollectedSplitUpCube": {"Name": "CollectedSplitUpCube", "Description": ""}, "CollectedShard": {"Name": "CollectedShard", "Description": ""}, "CollectedAnti": {"Name": "CollectedAnti", "Description": ""}, "CollectedGlobalAnti": {"Name": "CollectedGlobalAnti", "Description": ""}, "CollectedPieceOfHeart": {"Name": "CollectedPieceOfHeart", "Description": ""}, "OpenedTreasure": {"Name": "OpenedTreasure", "Description": ""}, "Landed": {"Name": "Landed", "Description": ""}}}, "Group": {"Name": "Group", "Static": false, "Model": {"Name": "TrileGroup", "FullName": "FezEngine.Structure.TrileGroup"}, "RestrictTo": null, "Interface": {"Name": "IGroupService", "FullName": "FezEngine.Services.Scripting.IGroupService"}, "Operations": {"StartPath": {"Name": "StartPath", "Description": "Starts the group's moving path (must be set 'Needs Trigger')", "Parameters": [{"Name": "backwards", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "RunPathOnce": {"Name": "RunPathOnce", "Description": "Runs the group's moving path, but only once (must be set 'Needs Trigger')", "Parameters": [{"Name": "backwards", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "RunSingleSegment": {"Name": "RunSingleSegment", "Description": "Runs a single segment of the group's moving path (must be set 'Needs Trigger')", "Parameters": [{"Name": "backwards", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "Stop": {"Name": "Stop", "Description": "Stops or pauses a moving group", "Parameters": []}, "Move": {"Name": "Move", "Description": "Moves a group incrementally over time (units per second)", "Parameters": [{"Name": "dX", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "dY", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "dZ", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "SetEnabled": {"Name": "SetEnabled", "Description": "Enables or disables all of a group's triles", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "MovePathToEnd": {"Name": "MovePathToEnd", "Description": "Moves a moving group to the end of its path", "Parameters": []}, "GlitchyDespawn": {"Name": "GlitchyDespawn", "Description": "Moves a moving group to the end of its path", "Parameters": [{"Name": "permanent", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}, "LaserEmitter": {"Name": "LaserEmitter", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["LaserEmitter"]}, "Interface": {"Name": "ILaserEmitterService", "FullName": "FezEngine.Services.Scripting.ILaserEmitterService"}, "Operations": {"SetEnabled": {"Name": "SetEnabled", "Description": "Starts or stops an emitter", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}, "LaserReceiver": {"Name": "LaserReceiver", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["LaserReceiver"]}, "Interface": {"Name": "ILaserReceiverService", "FullName": "FezEngine.Services.Scripting.ILaserReceiverService"}, "Operations": {}, "Properties": {}, "Events": {"Activate": {"Name": "Activate", "Description": "When a receiver receives a laser"}}}, "Level": {"Name": "Level", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "ILevelService", "FullName": "FezEngine.Services.Scripting.ILevelService"}, "Operations": {"AllowPipeChangeLevel": {"Name": "AllowPipeChangeLevel", "Description": "Changes the level MARIO-STYLE", "Parameters": [{"Name": "levelName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "ChangeLevel": {"Name": "ChangeLevel", "Description": "Changes the level; if 'asDoor' is true, the level change occurs if gomez enters the door, else it's done immediately", "Parameters": [{"Name": "levelName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "asDoor", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "spin", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "trialEnding", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "ReturnToLastLevel": {"Name": "ReturnToLastLevel", "Description": "Returns to the last accessed level; if 'asDoor' is true, the level change occurs if gomez enters the door, else it's done immediately", "Parameters": [{"Name": "asDoor", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "spin", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "ChangeToFarAwayLevel": {"Name": "ChangeToFarAwayLevel", "Description": "Changes the faraway level to a specific volume in the destination level; if 'asDoor' is true, the level change occurs if gomez enters the door, else it's done immediately", "Parameters": [{"Name": "levelName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "toVolume", "Type": {"Name": "Int32", "FullName": "System.Int32"}}, {"Name": "trialEnding", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "ChangeLevelToVolume": {"Name": "ChangeLevelToVolume", "Description": "Changes the level to a specific volume in the destination level; if 'asDoor' is true, the level change occurs if gomez enters the door, else it's done immediately", "Parameters": [{"Name": "levelName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "toVolume", "Type": {"Name": "Int32", "FullName": "System.Int32"}}, {"Name": "asDoor", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "spin", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "trialEnding", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "ExploChangeLevel": {"Name": "ExploChangeLevel", "Description": "Produces an epic explosion and changes level when it's done.", "Parameters": [{"Name": "levelName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "SetWaterHeight": {"Name": "SetWaterHeight", "Description": "Smoothly changes to a new water height", "Parameters": [{"Name": "height", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "RaiseWater": {"Name": "RaiseWater", "Description": "Makes water rise to a certain threshold", "Parameters": [{"Name": "unitsPerSecond", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "stopAtHeight", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "StopWater": {"Name": "StopWater", "Description": "Makes water stop raising immediately", "Parameters": []}, "ResolvePuzzle": {"Name": "ResolvePuzzle", "Description": "Marks a puzzle as solved, and plays the chime", "Parameters": []}, "ResolvePuzzleSilent": {"Name": "ResolvePuzzleSilent", "Description": "Silently resolves a puzzle", "Parameters": []}, "ResolvePuzzleSoundOnly": {"Name": "ResolvePuzzleSoundOnly", "Description": "", "Parameters": []}}, "Properties": {"FirstVisit": {"Name": "FirstVisit", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}}, "Events": {"Start": {"Name": "Start", "Description": "When the level starts"}}}, "Npc": {"Name": "Npc", "Static": false, "Model": {"Name": "NpcInstance", "FullName": "FezEngine.Structure.NpcInstance"}, "RestrictTo": null, "Interface": {"Name": "INpcService", "FullName": "FezEngine.Services.Scripting.INpcService"}, "Operations": {"Say": {"Name": "Say", "Description": "Makes the NPC say a custom text line", "Parameters": [{"Name": "line", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "customSound", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "customAnimation", "Type": {"Name": "String", "FullName": "System.String"}}]}, "CarryGeezerLetter": {"Name": "CarryGeezerLetter", "Description": "CarryGeezerLetter", "Parameters": []}}, "Properties": {}, "Events": {}}, "Owl": {"Name": "Owl", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "IOwlService", "FullName": "FezEngine.Services.Scripting.IOwlService"}, "Operations": {}, "Properties": {"OwlsCollected": {"Name": "OwlsCollected", "Description": "Number of owls collected up to now", "Type": {"Name": "Int32", "FullName": "System.Int32"}}}, "Events": {"OwlCollected": {"Name": "OwlCollected", "Description": ""}, "OwlLanded": {"Name": "OwlLanded", "Description": ""}}}, "Path": {"Name": "Path", "Static": false, "Model": {"Name": "MovementPath", "FullName": "FezEngine.Structure.MovementPath"}, "RestrictTo": null, "Interface": {"Name": "IPathService", "FullName": "FezEngine.Services.Scripting.IPathService"}, "Operations": {"Start": {"Name": "Start", "Description": "Applies the whole path to the camera", "Parameters": [{"Name": "inTransition", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "outTransition", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}, "Pivot": {"Name": "Pivot", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["PivotHandle"]}, "Interface": {"Name": "IPivotService", "FullName": "FezEngine.Services.Scripting.IPivotService"}, "Operations": {"SetEnabled": {"Name": "SetEnabled", "Description": "Enables or disables a pivot handle's rotatability", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "RotateTo": {"Name": "RotateTo", "Description": "Enables or disables a pivot handle's rotatability", "Parameters": [{"Name": "turns", "Type": {"Name": "Int32", "FullName": "System.Int32"}}]}}, "Properties": {"Turns": {"Name": "Turns", "Description": "Gets the number of turns it's relative to the original state", "Type": {"Name": "Int32", "FullName": "System.Int32"}}}, "Events": {"RotatedRight": {"Name": "RotatedRight", "Description": "When it's been rotated right"}, "RotatedLeft": {"Name": "RotatedLeft", "Description": "When it's been rotated left"}}}, "Plane": {"Name": "Plane", "Static": false, "Model": {"Name": "BackgroundPlane", "FullName": "FezEngine.Structure.BackgroundPlane"}, "RestrictTo": null, "Interface": {"Name": "IPlaneService", "FullName": "FezEngine.Services.Scripting.IPlaneService"}, "Operations": {"FadeIn": {"Name": "FadeIn", "Description": "", "Parameters": [{"Name": "seconds", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "FadeOut": {"Name": "FadeOut", "Description": "", "Parameters": [{"Name": "seconds", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "Flicker": {"Name": "Flicker", "Description": "", "Parameters": [{"Name": "factor", "Type": {"Name": "Single", "FullName": "System.Single"}}]}}, "Properties": {}, "Events": {}}, "RotatingGroup": {"Name": "RotatingGroup", "Static": false, "Model": {"Name": "TrileGroup", "FullName": "FezEngine.Structure.TrileGroup"}, "RestrictTo": {"ActorTypes": ["RotatingGroup"]}, "Interface": {"Name": "IRotatingGroupService", "FullName": "FezEngine.Services.Scripting.IRotatingGroupService"}, "Operations": {"Rotate": {"Name": "Rotate", "Description": "", "Parameters": [{"Name": "clockwise", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "turns", "Type": {"Name": "Int32", "FullName": "System.Int32"}}]}, "SetEnabled": {"Name": "SetEnabled", "Description": "", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}, "Script": {"Name": "Script", "Static": false, "Model": {"Name": "Script", "FullName": "FezEngine.Structure.Scripting.Script"}, "RestrictTo": null, "Interface": {"Name": "IScriptService", "FullName": "FezEngine.Services.Scripting.IScriptService"}, "Operations": {"SetEnabled": {"Name": "SetEnabled", "Description": "Enables or disables a script", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "Evaluate": {"Name": "Evaluate", "Description": "Evaluates a script", "Parameters": []}}, "Properties": {}, "Events": {"Complete": {"Name": "Complete", "Description": "When the script timeouts or terminates"}}}, "Sound": {"Name": "Sound", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "ISoundService", "FullName": "FezEngine.Services.Scripting.ISoundService"}, "Operations": {"Play": {"Name": "Play", "Description": "Plays a sound by its filename", "Parameters": [{"Name": "soundName", "Type": {"Name": "String", "FullName": "System.String"}}]}, "PlayNext": {"Name": "PlayNext", "Description": "Plays a sound by its prefix and an auto-incremented index (starts at 1)", "Parameters": [{"Name": "soundPrefix", "Type": {"Name": "String", "FullName": "System.String"}}]}, "SetMusicVolume": {"Name": "SetMusicVolume", "Description": "Changes the volume of BGM", "Parameters": [{"Name": "volume", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "ResetIndices": {"Name": "ResetIndices", "Description": "Resets the indices for a sound", "Parameters": [{"Name": "soundPrefix", "Type": {"Name": "String", "FullName": "System.String"}}]}, "ChangeMusic": {"Name": "ChangeMusic", "Description": "Changes the music track and plays it", "Parameters": [{"Name": "newMusic", "Type": {"Name": "String", "FullName": "System.String"}}]}, "UnmuteTrack": {"Name": "UnmuteTrack", "Description": "Enables a track by its name", "Parameters": [{"Name": "trackName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "fadeDuration", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "MuteTrack": {"Name": "MuteTrack", "Description": "Disables a track by its name", "Parameters": [{"Name": "trackName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "fadeDuration", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "UnmuteAmbience": {"Name": "UnmuteAmbience", "Description": "", "Parameters": [{"Name": "trackName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "fadeDuration", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "MuteAmbience": {"Name": "MuteAmbience", "Description": "", "Parameters": [{"Name": "trackName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "fadeDuration", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "FadeMusicOut": {"Name": "FadeMusicOut", "Description": "Fades the music out", "Parameters": [{"Name": "overSeconds", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "FadeMusicTo": {"Name": "FadeMusicTo", "Description": "", "Parameters": [{"Name": "to", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "overSeconds", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "ChangePhases": {"Name": "ChangePhases", "Description": "", "Parameters": [{"Name": "trackName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "dawn", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "day", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "dusk", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "night", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}, "SpinBlock": {"Name": "SpinBlock", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["SpinBlock"]}, "Interface": {"Name": "ISpinBlockService", "FullName": "FezEngine.Services.Scripting.ISpinBlockService"}, "Operations": {"SetEnabled": {"Name": "SetEnabled", "Description": "Enables or disables a spinblock (which ceases or resumes its spinning)", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}, "SuckBlock": {"Name": "SuckBlock", "Static": false, "Model": {"Name": "TrileGroup", "FullName": "FezEngine.Structure.TrileGroup"}, "RestrictTo": {"ActorTypes": ["SuckBlock"]}, "Interface": {"Name": "ISuckBlockService", "FullName": "FezEngine.Services.Scripting.ISuckBlockService"}, "Operations": {}, "Properties": {"IsSucked": {"Name": "IsSucked", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}}, "Events": {"Sucked": {"Name": "Sucked", "Description": "When it's completely inside its host volume"}}}, "Switch": {"Name": "Switch", "Static": false, "Model": {"Name": "TrileGroup", "FullName": "FezEngine.Structure.TrileGroup"}, "RestrictTo": {"ActorTypes": ["PushSwitch", "ExploSwitch", "PushSwitchPermanent"]}, "Interface": {"Name": "ISwitchService", "FullName": "FezEngine.Services.Scripting.ISwitchService"}, "Operations": {"Activate": {"Name": "Activate", "Description": "Activates this switch", "Parameters": []}, "ChangeTrile": {"Name": "ChangeTrile", "Description": "Changes the visual of this switch's triles", "Parameters": [{"Name": "newTrileId", "Type": {"Name": "Int32", "FullName": "System.Int32"}}]}}, "Properties": {}, "Events": {"Explode": {"Name": "Explode", "Description": "When a bomb explodes near this switch"}, "Push": {"Name": "Push", "Description": "When this switch is pushed completely"}, "Lift": {"Name": "Lift", "Description": "When this switch is lifted back up"}}}, "Time": {"Name": "Time", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "ITimeService", "FullName": "FezEngine.Services.Scripting.ITimeService"}, "Operations": {"SetHour": {"Name": "SetHour", "Description": "Changes the hour of day (0-23), gradually or immediately", "Parameters": [{"Name": "hour", "Type": {"Name": "Int32", "FullName": "System.Int32"}}, {"Name": "immediate", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "SetTimeFactor": {"Name": "SetTimeFactor", "Description": "Sets the speed of time passage (0 = paused)", "Parameters": [{"Name": "factor", "Type": {"Name": "Int32", "FullName": "System.Int32"}}]}, "IncrementTimeFactor": {"Name": "IncrementTimeFactor", "Description": "Increments the time factor (specifying how much time before it doubles up)", "Parameters": [{"Name": "secondsUntilDouble", "Type": {"Name": "Single", "FullName": "System.Single"}}]}}, "Properties": {"Hour": {"Name": "Hour", "Description": "The hour of day (0-23)", "Type": {"Name": "Int32", "FullName": "System.Int32"}}}, "Events": {}}, "Timeswitch": {"Name": "Timeswitch", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["Timeswitch"]}, "Interface": {"Name": "ITimeswitchService", "FullName": "FezEngine.Services.Scripting.ITimeswitchService"}, "Operations": {}, "Properties": {}, "Events": {"ScrewedOut": {"Name": "ScrewedOut", "Description": "When the screw minimally sticks out from the base (it's been screwed out)"}, "HitBase": {"Name": "HitBase", "Description": "When it stop winding back in (hits the base)"}}}, "Tombstone": {"Name": "Tombstone", "Static": true, "Model": null, "RestrictTo": null, "Interface": {"Name": "ITombstoneService", "FullName": "FezEngine.Services.Scripting.ITombstoneService"}, "Operations": {"UpdateAlignCount": {"Name": "UpdateAlignCount", "Description": "", "Parameters": [{"Name": "count", "Type": {"Name": "Int32", "FullName": "System.Int32"}}]}}, "Properties": {"AlignedCount": {"Name": "AlignedCount", "Description": "", "Type": {"Name": "Int32", "FullName": "System.Int32"}}}, "Events": {"MoreThanOneAligned": {"Name": "MoreThanOneAligned", "Description": "When more than one tombstones are aligned"}}}, "Valve": {"Name": "Valve", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["Valve", "BoltHandle"]}, "Interface": {"Name": "IValveService", "FullName": "FezEngine.Services.Scripting.IValveService"}, "Operations": {"SetEnabled": {"Name": "SetEnabled", "Description": "Enables or disables a valve's rotatability", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {"Screwed": {"Name": "Screwed", "Description": "When it's unscrewed"}, "Unscrewed": {"Name": "Unscrewed", "Description": "When it's screwed in"}}}, "Volume": {"Name": "Volume", "Static": false, "Model": {"Name": "Volume", "FullName": "FezEngine.Structure.Volume"}, "RestrictTo": null, "Interface": {"Name": "IVolumeService", "FullName": "FezEngine.Services.Scripting.IVolumeService"}, "Operations": {"FocusCamera": {"Name": "FocusCamera", "Description": "Center the camera view on this volume; set a value <= 0 to pixelsPerTrixels if you don't want to alter it. Immediate doesn't wait for an end-trigger", "Parameters": [{"Name": "pixelsPerTrixel", "Type": {"Name": "Int32", "FullName": "System.Int32"}}, {"Name": "immediate", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "SetEnabled": {"Name": "SetEnabled", "Description": "Disables or enables this volume", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "permanent", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}, "SlowFocusOn": {"Name": "SlowFocusOn", "Description": "Slowly focuses camera on a volume", "Parameters": [{"Name": "duration", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "trixPerPix", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "LoadHexahedronAt": {"Name": "LoadHexahedronAt", "Description": "Loads the hex in the middle of a specified volume, and warp to the specified level afterwards", "Parameters": [{"Name": "toLevel", "Type": {"Name": "String", "FullName": "System.String"}}]}, "PlaySoundAt": {"Name": "PlaySoundAt", "Description": "Plays a sound on the specified volume, looped or not, directional or not (follows volume's enabled directions)", "Parameters": [{"Name": "soundName", "Type": {"Name": "String", "FullName": "System.String"}}, {"Name": "loop", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "initialDelay", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "perLoopDelay", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "directional", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, {"Name": "pitchVariation", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "MoveDotWithCamera": {"Name": "MoveDotWithCamera", "Description": "Moves Dot and the camera to the specified volume's center", "Parameters": []}, "FocusWithPan": {"Name": "FocusWithPan", "Description": "Focuses the camera with panning support", "Parameters": [{"Name": "pixelsPerTrixel", "Type": {"Name": "Int32", "FullName": "System.Int32"}}, {"Name": "verticalPan", "Type": {"Name": "Single", "FullName": "System.Single"}}, {"Name": "horizontalPan", "Type": {"Name": "Single", "FullName": "System.Single"}}]}, "SpawnTrileAt": {"Name": "SpawnTrileAt", "Description": "Spawns a treasure trile at this volume's location", "Parameters": [{"Name": "actorTypeName", "Type": {"Name": "String", "FullName": "System.String"}}]}}, "Properties": {"RegisterNeeded": {"Name": "RegisterNeeded", "Description": "", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "GomezInside": {"Name": "GomezInside", "Description": "Tests if Gomez is inside a certain volume", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}, "IsEnabled": {"Name": "IsEnabled", "Description": "Tests if volume is enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}}, "Events": {"Enter": {"Name": "Enter", "Description": "When the player enters this volume"}, "Exit": {"Name": "Exit", "Description": "When the player exits this volume"}, "GoHigher": {"Name": "GoHigher", "Description": "When the player goes higher than the volume/height-marker"}, "GoLower": {"Name": "GoLower", "Description": "When the player goes lower than the volume/height-marker"}, "CodeAccepted": {"Name": "CodeAccepted", "Description": "If the input code was accepted"}}}, "WarpGate": {"Name": "WarpGate", "Static": false, "Model": {"Name": "ArtObjectInstance", "FullName": "FezEngine.Structure.ArtObjectInstance"}, "RestrictTo": {"ActorTypes": ["WarpGate"]}, "Interface": {"Name": "IWarpGateService", "FullName": "FezEngine.Services.Scripting.IWarpGateService"}, "Operations": {"SetEnabled": {"Name": "SetEnabled", "Description": "", "Parameters": [{"Name": "enabled", "Type": {"Name": "Boolean", "FullName": "System.Boolean"}}]}}, "Properties": {}, "Events": {}}}}
const ModelToFieldMapper = {
"TrileInstance": "Trile",
"TrileGroup": "Group",
"Volume": "Volume",
"Script": "Script",
"ArtObjectInstance": "ArtObject",
"BackgroundPlane": "Plane",
"MovementPath": "Path",
"NpcInstance": "Npc"
};
const TypeKeywordMap = {
"Boolean": "bool",
"Byte" : "byte",
"SByte" : "sbyte",
"Char" : "char",
"Decimal": "decimal",
"Double" : "double",
"Single" : "float",
"Int32" : "int",
"UInt32" : "uint",
"IntPtr" : "nint",
"UIntPtr": "nuint",
"Int64" : "long",
"UInt64" : "ulong",
"Int16" : "short",
"UInt16" : "ushort",
"System.Boolean": "bool",
"System.Byte" : "byte",
"System.SByte" : "sbyte",
"System.Char" : "char",
"System.Decimal": "decimal",
"System.Double" : "double",
"System.Single" : "float",
"System.Int32" : "int",
"System.UInt32" : "uint",
"System.IntPtr" : "nint",
"System.UIntPtr": "nuint",
"System.Int64" : "long",
"System.UInt64" : "ulong",
"System.Int16" : "short",
"System.UInt16" : "ushort",
};
var tableData = {
"Events": [],
"Properties": [],
"Operations": [],
};
Object.values(ScriptEntityTypeDescriptors.ScriptEntityTypeDescriptors).forEach(d=>{
Object.values(d.Events).forEach(a=>{
tableData.Events.push(Object.assign({
"InterfaceName": d.Name,
"InterfaceClassName": d.Interface.Name,
"InterfaceClassFullName": d.Interface.FullName,
"EntityIdentifier": (ModelToFieldMapper[d.Model?.Name] ?? d.Name)+(d.Model ? "[id]" : ""),
"ApplicableEntityTypeName": d.Model?.Name,
"ApplicableEntityTypeFullName": d.Model?.FullName,
"RestrictedToActorTypes": d.RestrictTo?.ActorTypes,
},a));
var name = a.Name;
delete tableData.Events[tableData.Events.length-1].Name;
tableData.Events[tableData.Events.length-1].TriggerName = name;
});
Object.values(d.Properties).forEach(a=>{
tableData.Properties.push(Object.assign({
"InterfaceName": d.Name,
"InterfaceClassName": d.Interface.Name,
"InterfaceClassFullName": d.Interface.FullName,
"EntityIdentifier": (ModelToFieldMapper[d.Model?.Name] ?? d.Name)+(d.Model ? "[id]" : ""),
"ApplicableEntityTypeName": d.Model?.Name,
"ApplicableEntityTypeFullName": d.Model?.FullName,
"RestrictedToActorTypes": d.RestrictTo?.ActorTypes,
},a));
tableData.Properties[tableData.Properties.length-1].Type = TypeKeywordMap[tableData.Properties[tableData.Properties.length-1].Type.Name] ?? tableData.Properties[tableData.Properties.length-1].Type.Name;
var name = a.Name;
delete tableData.Properties[tableData.Properties.length-1].Name;
tableData.Properties[tableData.Properties.length-1].PropertyName = name;
});
Object.values(d.Operations).forEach(a=>{
tableData.Operations.push(Object.assign({
"InterfaceName": d.Name,
"InterfaceClassName": d.Interface.Name,
"InterfaceClassFullName": d.Interface.FullName,
"EntityIdentifier": (ModelToFieldMapper[d.Model?.Name] ?? d.Name)+(d.Model ? "[id]" : ""),
"ApplicableEntityTypeName": d.Model?.Name,
"ApplicableEntityTypeFullName": d.Model?.FullName,
"RestrictedToActorTypes": d.RestrictTo?.ActorTypes,
},a));
//tableData.Operations[tableData.Operations.length-1].ParameterNames = tableData.Operations[tableData.Operations.length-1].Parameters.map(a=>a.Name);
//tableData.Operations[tableData.Operations.length-1].ParameterTypesKeywords = tableData.Operations[tableData.Operations.length-1].Parameters.map(a=>TypeKeywordMap[a.Type.Name] ?? a.Type.Name);
//tableData.Operations[tableData.Operations.length-1].ParameterTypes = tableData.Operations[tableData.Operations.length-1].Parameters.map(a=>a.Type.Name);
//tableData.Operations[tableData.Operations.length-1].ParameterTypesFull = tableData.Operations[tableData.Operations.length-1].Parameters.map(a=>a.Type.FullName);
tableData.Operations[tableData.Operations.length-1].Parameters = tableData.Operations[tableData.Operations.length-1].Parameters.map(a=>(TypeKeywordMap[a.Type.Name] ?? a.Type.Name)+" "+a.Name);
var name = a.Name;
delete tableData.Operations[tableData.Operations.length-1].Name;
tableData.Operations[tableData.Operations.length-1].ActionName = name;
});
});
const columnnames = [
//Shared 1
"EntityIdentifier",
//Events
"TriggerName",
//Properties
"PropertyName", "Type",
//Operations
"ActionName", "Parameters",
//Shared 2
"RestrictedToActorTypes",
"Description",
//Extra junk
"InterfaceName",
"InterfaceClassName",
"InterfaceClassFullName",
"ApplicableEntityTypeName",
"ApplicableEntityTypeFullName",
"/"];
function sortingfunc(arr, dosort, innerindex){
if(!dosort){
return arr;
}
return arr.sort((a,b)=>{
var s = a;
var t = b;
if(innerindex != null){
s = a[innerindex];
t = b[innerindex];
}
var returnfallback = false, tmp;
var check = function(colname){
if(tmp = !columnnames.includes(colname)){
console.warn("Position not found for column name \""+colname+"\"");
}
returnfallback |= tmp;
}
check(s);
check(t);
if(!returnfallback){
return columnnames.indexOf(s) - columnnames.indexOf(t);
}
return s.localeCompare(t);
});
}
const optHtml = {
"targetAttr": "innerHTML",
"tableStart": "<table>",
"tableEnd": "</table>",
"tableHeadStart": "<thead>",
"tableHeadEnd": "</thead>",
"tableBodyStart": "<tbody>",
"tableBodyEnd": "</tbody>",
"tableHeaderStart": "<th>",
"tableHeaderEnd": "</th>",
"tableRowStart": "<tr>",
"tableRowEnd": "</tr>",
"tableDataStart": "<td>",
"tableDataEnd": "</td>",
"header3Start": "<h3>",
"header3End": "</h3>",
};
const optMarkdown = {
"targetAttr": "textContent",
"tableStart": "\n",
"tableEnd": "",
"tableHeadStart": "",
"tableHeadEnd": "|---|\n",
"tableBodyStart": "",
"tableBodyEnd": "",
"tableHeaderStart": "| ",
"tableHeaderEnd": " ",
"tableRowStart": "",
"tableRowEnd": "|\n",
"tableDataStart": "| ",
"tableDataEnd": " ",
"header3Start": "\n### ",
"header3End": "\n",
};
function WriteScriptData(target, options = optHtml, showFullNames = false, showInterface = false, hideApplicableEntityTypeName = true, sortCols = true){
options.target ??= target;
var tablecode = "";
Object.entries(tableData).forEach(tt=>{
tablecode += options.header3Start + tt[0] + options.header3End;
tablecode += options.tableStart;
tablecode += options.tableHeadStart;
tablecode += options.tableRowStart;
sortingfunc(Object.keys(tt[1][0]), sortCols, undefined).forEach(th=>{
if(th.includes("ApplicableEntityTypeName") && hideApplicableEntityTypeName){
return;
}
if(th.includes("Interface") && !showInterface){
return;
}
if(th.includes("FullName") && !showFullNames){
return;
}
tablecode += options.tableHeaderStart;
tablecode += th
tablecode += options.tableHeaderEnd;
});
tablecode += options.tableRowEnd;
tablecode += options.tableHeadEnd;
tablecode += options.tableBodyStart;
tt[1].forEach(tr=>{
tablecode += options.tableRowStart;
sortingfunc(Object.entries(tr), sortCols, 0).forEach(tdkv=>{
var thr = tdkv[0];
var td = tdkv[1];
if(thr.includes("ApplicableEntityTypeName") && hideApplicableEntityTypeName){
return;
}
if(thr.includes("Interface") && !showInterface){
return;
}
if(thr.includes("FullName")){
if(!showFullNames){
return;
}
if(td!=undefined){
let ns = td.split(/(?<=\.)(?=[^\.]*$)/);
td = "<span class=\"namespace\">"+ns[0]+"</span>"+ns[1];
}
}
tablecode += options.tableDataStart;
switch((typeof(td)).toLowerCase()){
case "array":
case "object":
tablecode += Object.values(td).join(", ");
break;
case "string":
tablecode += td;
break;
case "undefined":
tablecode += " ";
break;
default:
debugger
}
tablecode += options.tableDataEnd;
});
tablecode += options.tableRowEnd;
});
tablecode += options.tableBodyEnd;
tablecode += options.tableEnd;
});
tablecode = tablecode.replaceAll(/(?=\[|\])/g,"\\");
if(options.target && options.targetAttr){
options.target[options.targetAttr] = tablecode;
}
return tablecode;
}
document.addEventListener("DOMContentLoaded",()=>{
WriteScriptData(document.getElementById("t_md"), optMarkdown)
WriteScriptData(document.getElementById("t_htm"), optHtml)
//WriteScriptData(document.getElementById("t_md"), optMarkdown, true, true, false, true)
//WriteScriptData(document.getElementById("t_htm"), optHtml, true, true, false, true)
});
</script>
</head>
<body>
<div id="t_htm"></div>
<div id="t_md"></div>
</body>
</html>