|
3.
|
|
|
Creator-defined statements must be defined in a python early block. What's more, the filename containing the user-defined statement must be be loaded earlier than any file that uses it. Since Ren'Py loads files in unicode sort order, it generally makes sense to prefix the name of any file containing a user-defined statement with 01, or some other small number.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/cds.rst:12
|
|
4.
|
|
|
A user-defined statement cannot be used in the file in which it is defined.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/cds.rst:18
|
|
5.
|
|
|
Creator-defined statement are registered using the renpy.register_statement function.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/cds.rst:20
|
|
6.
|
|
|
This registers a user-defined statement.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/statement_register:5
|
|
7.
|
|
|
`name`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/statement_register:10
|
|
8.
|
|
|
This is either a space-separated list of names that begin the statement, or the empty string to define a new default statement (the default statement will replace the say statement).
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/statement_register:8
|
|
9.
|
|
|
`parse`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/statement_register:15
|
|
10.
|
|
|
This is a function that takes a Lexer object. This function should parse the statement, and return an object. This object is passed as an argument to all the other functions. The lexer argument has the following methods:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/statement_register:13
|
|
11.
|
|
|
`lint`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/statement_register:19
|
|
12.
|
|
|
This is called to check the statement. It is passed a single object, the argument returned from parse. It should call renpy.error to report errors.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/statement_register:18
|