Skip to content

Commit

Permalink
compile_script_docs.py: on callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
capt-t committed Oct 27, 2020
1 parent 63b3369 commit 6254b02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compile_script_docs.py
Expand Up @@ -233,6 +233,7 @@ def generateDocs(self, stream):
stream.write('<div class="ui-widget ui-widget-content ui-corner-all">')
stream.write('<p>Some of the types in the parameters:</p>')
stream.write('<ul>\n')
stream.write('<li>ScriptSimpleCallback / function: Note that the callback function must reference something global, otherwise you get an error like "??[convert<ScriptSimpleCallback>::param] Upvalue 1 of function is not a table...". Use e.g. `math.abs(0) -- Provides global context for SeriousProton` to do nothing.</li>\n')
stream.write('<li>EAlertLevel: "Normal", "YELLOW ALERT", "RED ALERT" (<code>playerSpaceship.cpp</code>)</li>\n')
stream.write('<li>ECrewPosition: "Helms", "Weapons", "Engineering", "Science", "Relay" (<code>playerInfo.cpp</code>)</li>\n')
stream.write('<li>EMissileSizes: "small", "medium", "large"</li>\n')
Expand Down

0 comments on commit 6254b02

Please sign in to comment.