Exemple #1
0
    def apply(self):
        for f_name in self.context_data.parsed:
            raw_content = self.context_data.side_data[f_name]
            wiki_content = self.context_data.wiki_side[f_name]
            description = self.get_docs(self.context_data.wiki_raw, f_name)
            if not description:
                print(f'[ERROR] Page without a description: {f_name}',
                      file=sys.stderr)

            # TODO: refactor
            if raw_content.client is not None:
                return_doc = self.get_return_docs(f_name, raw_content.client,
                                                  wiki_content.client)
                args_doc, description_mixin = self.get_args_docs(
                    f_name, raw_content.client, wiki_content.client)
                self.context_data.parsed[f_name].client[0].docs = FunctionDoc(
                    description=(description + '\n' +
                                 description_mixin).strip(),
                    arguments=args_doc,
                    result=return_doc)

            if raw_content.server is not None:
                return_doc = self.get_return_docs(f_name, raw_content.server,
                                                  wiki_content.server)
                args_doc, description_mixin = self.get_args_docs(
                    f_name, raw_content.server, wiki_content.server)
                self.context_data.parsed[f_name].server[0].docs = FunctionDoc(
                    description=(description + '\n' +
                                 description_mixin).strip(),
                    arguments=args_doc,
                    result=return_doc)

        print('Docs parse complete\u001b[0m')
Exemple #2
0
                 variable_length=False,
             ),
             arguments=FunctionArgumentValues(
                 arguments=[
                     
                 ],
                 variable_length=False,
             ),
             generic_types=[
                 
             ],
         ),
         docs=FunctionDoc(
             description='This function returns all the currently loaded modules of the server.' ,
             arguments={
                 
             },
             result='returns a table of all the currently loaded modules. if no modules are loaded, the table will be empty.' ,
         ),
         url='getLoadedModules',
     )
     ],
     client=[
         
     ],
 ),
 CompoundFunctionData(
     server=[
         FunctionData(
         signature=FunctionSignature(
             name='getModuleInfo',
                                            names=['element'],
                                            is_optional=False,
                                        ),
                                        default_value=None,
                                    )
                                ]],
                     variable_length=False,
                 ),
                 generic_types=[],
             ),
             docs=FunctionDoc(
                 description=
                 'This function is intended to load data from a loaded XML file into the element tree. This could be used for loading an external map, or part of another map.',
                 arguments={
                     "node":
                     """The node that you wish to load into the element tree. """,
                     "parent":
                     """The node you wish to be the parent of the new map data. """
                 },
                 result=
                 'returns an element object that corresponds to the root of the new data added, i.e. an element that represents the node xmlnode passed to the function. returns false if the arguments are invalid.',
             ),
             url='loadMapData',
         )
     ],
     client=[],
 ),
 CompoundFunctionData(
     server=[
         FunctionData(
             signature=FunctionSignature(
                 name='resetMapInfo',
                        variable_length=False,
                    ),
                    generic_types=[],
                ),
                docs=FunctionDoc(
                    description=
                    'This function will add a ban for the specified IP/username/serial to the server.',
                    arguments={
                        "IP":
                        """The IP to be banned. If you dont want to ban by IP, set this to nil.
'''or''' """,
                        "Username":
                        """The http://community.mtasa.com/ MTA Community username to be banned (now obsolete). If you dont want to ban by username, set this to nil.
'''or''' """,
                        "Serial":
                        """The serial to be banned. If you dont want to ban by serial, set this to nil.
''' or any combination.''' """,
                        "responsibleElement":
                        """The element that is responsible for banning the IP/username/serial. This can be a player or the root (getRootElement()). """,
                        "reason":
                        """The reason the IP/username/serial will be banned from the server. """,
                        "seconds":
                        """The amount of seconds the player will be banned from the server for. This can be 0 for an infinite amount of time. """
                    },
                    result=
                    'returns the new ban if the ip/username/serial was banned successfully, false if invalid arguments are specified.',
                ),
                url='addBan',
            )
        ],
        client=[],
Exemple #5
0
                                    default_value='nil',
                                )
                            ]],
                 variable_length=False,
             ),
             generic_types=[],
         ),
         docs=FunctionDoc(
             description=
             'Creates an explosion of a certain type at a specified point in the world. If creator is specified, the explosion will occur only in its dimension.',
             arguments={
                 "x":
                 """a float value that specifies the X world coordinate where the explosion is created at. """,
                 "y":
                 """a float value that specifies the Y world coordinate where the explosion is created at. """,
                 "z":
                 """a float value that specifies the Z world coordinate where the explosion is created at. """,
                 "theType":
                 """an integer specifying the explosion type. Valid types are: """,
                 "creator":
                 """the explosions simulated creator, the player responsible for it. """
             },
             result='',
         ),
         url='createExplosion',
     )
 ],
 client=[
     FunctionData(
         signature=FunctionSignature(
             name='createExplosion',
Exemple #6
0
                                            is_optional=True,
                                        ),
                                        default_value='false',
                                    )
                                ]],
                     variable_length=False,
                 ),
                 generic_types=[],
             ),
             docs=FunctionDoc(
                 description=
                 'This function adds an account to the list of registered accounts of the current server.',
                 arguments={
                     "name":
                     """The name of the account you wish to make, this normally is the players name. """,
                     "pass":
                     """The password to set for this account for future logins. """,
                     "allowCaseVariations":
                     """Whether the username is case sensitive (if this is set to true, usernames Bob and bob will refer to different accounts) """
                 },
                 result=
                 'returns an account or false if the account already exists or an error occured.',
             ),
             url='addAccount',
         )
     ],
     client=[],
 ),
 CompoundFunctionData(
     server=[
         FunctionData(
             signature=FunctionSignature(
                         argument_type=FunctionType(
                             names=['team'],
                             is_optional=False,
                         ),
                         default_value=None,
                     )
                 ]],
                 variable_length=False,
             ),
             generic_types=[],
         ),
         docs=FunctionDoc(
             description=
             'This function is for returning the number of players in the specified team.',
             arguments={
                 "theTeam":
                 """The team you wish to retrieve the player count of. """
             },
             result=
             'returns an integer containing the number of players in the team, false if it could not be retrieved.',
         ),
         url='countPlayersInTeam',
     ),
     field=FunctionOOPField(
         name='playerCount',
         types=[FunctionType(
             names=['int'],
             is_optional=False,
         )],
     ),
     is_static=False,
 )
Exemple #8
0
                                            names=['float'],
                                            is_optional=True,
                                        ),
                                        default_value='1.8',
                                    )
                                ]],
                     variable_length=False,
                 ),
                 generic_types=[],
             ),
             docs=FunctionDoc(
                 description=
                 'Creates a patch of fire that will spread a bit and die out after a while. Because its a client side only function, other players wont see it, so custom events or custom objects will be needed to make a fire visible to some players.',
                 arguments={
                     "x, y, z":
                     """the coordinates when the initial patch of fire will be created. """,
                     "size":
                     """a float value indicating the size of the initial patch of fire, this value also affects the duration of how long the fire remains. """
                 },
                 result=
                 'returns true if successful, false if bad arguments were passed or the limit of active fires was reached. there can be a maximum of 60 active fires.',
             ),
             url='createFire',
         )
     ],
 ),
 CompoundFunctionData(
     server=[],
     client=[
         FunctionData(
             signature=FunctionSignature(
                 name='extinguishFire',
                             name='theTimer',
                             argument_type=FunctionType(
                                 names=['timer'],
                                 is_optional=False,
                             ),
                             default_value=None,
                         )
                     ]],
                     variable_length=False,
                 ),
                 generic_types=[],
             ),
             docs=FunctionDoc(
                 description=
                 'This function is for getting the details of a running timer.',
                 arguments={"theTimer": """A timer element. """},
                 result=
                 '* integer one represents the time left in miliseconds (1000th of a second) of the current time left in the loop.\n* integer two represents the amount of times the timer has left to execute.\n* integer three represents the time interval of timer.\n* returns false if the timer doesnt exist or stopped running. also, debugscript will say bad argument @ gettimerdetails. to prevent this, you can check if the timer exists with istimer().',
             ),
             url='getTimerDetails',
         ),
         field=None,
         is_static=False,
     )
 ],
 client=[
     FunctionOOP(
         description=None,
         base_function_name="getTimerDetails",
         class_name='timer',
         method=FunctionData(
Exemple #10
0
                             name='settingName',
                             argument_type=FunctionType(
                                 names=['string'],
                                 is_optional=False,
                             ),
                             default_value=None,
                         )
                     ]],
                     variable_length=False,
                 ),
                 generic_types=[],
             ),
             docs=FunctionDoc(
                 description=
                 'This function gets a settings value, or a group of settings values, from the settings system|settings registry.',
                 arguments={},
                 result=
                 'returns the value of the setting if a single setting was specified and found, or a table (in associative-array form) containing:\n*the list of global setting name/value pairs if . is passed as a setting name,\n*the list of resource settings if a resource name followed by a . is passed,\n*the list of the scripts resource settings if an empty string is passed.\nit returns false if the specified setting or settings group doesnt exist, or if the settings group you are trying to retrieve doesnt have any public or protected settings.',
             ),
             url='get',
         )
     ],
     client=[],
 ),
 CompoundFunctionData(
     server=[
         FunctionData(
             signature=FunctionSignature(
                 name='set',
                 return_types=FunctionReturnTypes(
                     return_types=[
Exemple #11
0
# See https://github.com/mtasa-typescript/mtasa-wiki-parser/issues/32
from to_python.core.types import \
    FunctionData, \
    FunctionDoc, \
    FunctionSignature, \
    FunctionReturnTypes, \
    FunctionArgumentValues, \
    FunctionType, \
    FunctionArgument

dx_create_texture_function: FunctionData = FunctionData(
    url='dxCreateTexture',
    docs=FunctionDoc(
        description='This function creates a texture '
        'element that can be used in the dxDraw functions',
        arguments={},
        result='Returns a texture if successful, '
        'false if invalid arguments were passed to the function.'),
    signature=FunctionSignature(
        name='dxCreateTexture',
        return_types=FunctionReturnTypes(
            return_types=[
                FunctionType(is_optional=False, names=['DxTexture'])
            ],
            variable_length=False,
        ),
        arguments=FunctionArgumentValues(
            arguments=[
                [
                    FunctionArgument(
                        name='width',
    def resolve_multiple_signatures(data_list: List[FunctionData],
                                    index_in_list: int) -> bool:
        """
        Example: export function fun(a?: int, b: int): int;
        Will be splitted into
        export function fun(a: int, b: int): int; // and
        export function fun(b: int): int;
        :return: Should index be saved (not incremented)
        """
        index_should_be_increased = True

        data = data_list[index_in_list]
        signature = data.signature

        first_optional_index = -1
        for index, argument_list in enumerate(signature.arguments.arguments):
            is_optional = len([
                argument
                for argument in argument_list
                if
                argument.argument_type and argument.argument_type.is_optional
            ]) != 0

            if len([argument
                    for argument in argument_list
                    if not argument.argument_type]) != 0:
                is_optional = True

            if is_optional:
                if first_optional_index == -1:
                    first_optional_index = index

                continue

            if not is_optional:
                if first_optional_index == -1:
                    continue

                # There were optional arguments.
                #   And the current is a required argument
                index_should_be_increased = False
                new_signature = deepcopy(signature)

                # Remove (index - first_optional_index - 1)
                #   arguments from the new signature
                for _ in range(first_optional_index, index):
                    new_signature.arguments.arguments.pop(first_optional_index)

                # Make arguments required in the origin signature
                for i in range(first_optional_index, index):
                    for arg in signature.arguments.arguments[i]:
                        if not arg.argument_type:
                            continue

                        arg.argument_type.is_optional = False

                # Save the new signature
                data_list.append(
                    FunctionData(
                        signature=new_signature,
                        docs=FunctionDoc(description='',
                                         arguments=dict(),
                                         result='', ),
                        url=data.url,
                    ),
                )
                first_optional_index = -1

        return index_should_be_increased
                             names=['string'],
                             is_optional=False,
                         )
                     ],
                     variable_length=False,
                 ),
                 arguments=FunctionArgumentValues(
                     arguments=[],
                     variable_length=False,
                 ),
                 generic_types=[],
             ),
             docs=FunctionDoc(
                 description=
                 'This function retrieves the current gametype as set by setGameType. The game type is displayed in the server browser next to the servers name.',
                 arguments={},
                 result=
                 'returns the gametype as a string. if no gametype is set it returns nil.',
             ),
             url='getGameType',
         )
     ],
     client=[],
 ),
 CompoundFunctionData(
     server=[
         FunctionData(
             signature=FunctionSignature(
                 name='getMapName',
                 return_types=FunctionReturnTypes(
                     return_types=[
    FunctionSignature, \
    FunctionDoc, \
    EventData, \
    CompoundEventData

DUMP_PARTIAL = [
    CompoundEventData(
        server=[],
        client=[
            EventData(
                name='onClientProjectileCreation',
                docs=FunctionDoc(
                    description=
                    'This event is triggered when a projectile is created.',
                    arguments={
                        "creator":
                        """the element that created the projectile. """
                    },
                    result='',
                ),
                arguments=FunctionArgumentValues(
                    arguments=[[
                        FunctionArgument(
                            name='creator',
                            argument_type=FunctionType(
                                names=['element'],
                                is_optional=False,
                            ),
                            default_value=None,
                        )
                    ]],
Exemple #15
0
    FunctionSignature, \
    FunctionDoc, \
    EventData, \
    CompoundEventData

DUMP_PARTIAL = [
    CompoundEventData(
        server=[],
        client=[
            EventData(
                name='onClientCharacter',
                docs=FunctionDoc(
                    description=
                    'This event triggers whenever the user presses an alphanumeric character on their keyboard. This also includes special characters, ie.  / # %   { }.',
                    arguments={
                        "character":
                        """: a string representing the pressed character. """
                    },
                    result='',
                ),
                arguments=FunctionArgumentValues(
                    arguments=[[
                        FunctionArgument(
                            name='character',
                            argument_type=FunctionType(
                                names=['string'],
                                is_optional=False,
                            ),
                            default_value=None,
                        )
                    ]],
Exemple #16
0
    EventData, \
    CompoundEventData

DUMP_PARTIAL = [
    CompoundEventData(
        server=[
            
        ],
        client=[
            EventData(
            name='onClientResourceFileDownload',
            docs=FunctionDoc(
                description='' ,
                arguments={
                    "fileResource": """Resource the file belongs to. """,
                    "fileName": """Relative resource file path. """,
                    "fileSize": """Size of the file in bytes. """,
                    "state": """Possible values: <code>queued</code> or <code>finished</code> or <code>failed</code>. """
                },
                result='' ,
            ),
            arguments=FunctionArgumentValues(
                    arguments=[
                        [
                            FunctionArgument(
                                name='fileResource',
                                argument_type=FunctionType(
                                    names=['resource'],
                                    is_optional=False,
                                ),
                                default_value=None,
                            )
                                ),
                                default_value=None,
                            )
                        ]
                    ],
                    variable_length=True,
                ),
                generic_types=[
                    
                ],
            ),
            docs=FunctionDoc(
                description='This function executes a database query using the supplied connection. No result is returned.' ,
                arguments={
                    "databaseConnection": """A database connection element previously returned from dbConnect """,
                    "query": """An SQL query. Positions where parameter values will be inserted are marked with a ? """,
                    "paramX": """A variable number of parameters. These must be strings or numbers - it is important to make sure they are of the correct type. Also, the number of parameters passed must be equal to the number of ? characters in the query string.
String parameters are automatically quoted and escaped as required. (If you do not want a string quoted, use '''??''') Make sure that numbers are in number format as a string number is treated differently. """
                },
                result='returns true unless the connection is incorrect, in which case it returns false.' ,
            ),
            url='dbExec',
        ),
                field=None,
                is_static=False,
            )
        ],
        client=[
            
        ],
    ),
    CompoundOOPData(
Exemple #18
0
                     argument_type=FunctionType(
                         names=['light'],
                         is_optional=False,
                     ),
                     default_value=None,
                 )
             ]],
             variable_length=False,
         ),
         generic_types=[],
     ),
     docs=FunctionDoc(
         description=
         'This function returns the color for a Element/Light|light element.',
         arguments={
             "theLight":
             """The Element/Light|light that you wish to retrieve the color of. """
         },
         result=
         'returns three ints corresponding to the amount of red, green and blue (respectively) of the light, false if invalid arguments were passed.',
     ),
     url='getLightColor',
 ),
 field=FunctionOOPField(
     name='color',
     types=[
         FunctionType(
             names=['int'],
             is_optional=False,
         ),
         FunctionType(
             names=['int'],
                             is_optional=False,
                         ),
                         default_value=None,
                     )
                 ]
             ],
             variable_length=False,
         ),
         generic_types=[
             
         ],
     ),
     docs=FunctionDoc(
         description='This function is used to get the name of a body part on a player.' ,
         arguments={
             "bodyPartID": """: An integer representing the body part ID you wish to retrieve the name of. """
         },
         result='this function returns a string containing the body part name if the id is valid, false otherwise.' ,
     ),
     url='getBodyPartName',
 )
 ],
 client=[
     FunctionData(
     signature=FunctionSignature(
         name='getBodyPartName',
         return_types=FunctionReturnTypes(
             return_types=[
                 FunctionType(
                             names=['string'],
                             is_optional=False,
                                               ),
                                               default_value=None,
                                           )
                                       ]],
                            variable_length=False,
                        ),
                        generic_types=[],
                    ),
                    docs=FunctionDoc(
                        description=
                        'This function gets a weapon property of the specified Element/Weapon|custom weapon (clientside only) or specified Weapons|player-held weapon (both client and server).',
                        arguments={
                            "weaponID or weaponName":
                            """The ID or name of the weapon you want to get info of. Names can be: """,
                            "weaponSkill":
                            """Either: pro, std or poor """,
                            "property":
                            """The property you want to get the value of:
The following properties are get only: """
                        },
                        result=
                        'on success:\nint: the weapon property\non failure:\nbool: false if the passed arguments were invalid',
                    ),
                    url='getWeaponProperty',
                ),
                field=None,
                is_static=False,
            )
        ],
        client=[
            FunctionOOP(
    CompoundEventData

DUMP_PARTIAL = [
    CompoundEventData(
        server=[
            
        ],
        client=[
            EventData(
            name='onClientChatMessage',
            docs=FunctionDoc(
                description='This event is triggered when any text is output to chatbox, including MTAs internal messages.' ,
                arguments={
                    "text": """The text that was output to chatbox. """,
                    "r": """The amount of red in the color of the text. """,
                    "g": """The amount of green in the color of the text. """,
                    "b": """The amount of blue in the color of the text. """,
                    "messageType": """The type of message as a number. """
                },
                result='' ,
            ),
            arguments=FunctionArgumentValues(
                    arguments=[
                        [
                            FunctionArgument(
                                name='text',
                                argument_type=FunctionType(
                                    names=['string'],
                                    is_optional=False,
                                ),
                                default_value=None,
Exemple #22
0
                                           ),
                                           default_value=None,
                                       )
                                   ]],
                        variable_length=False,
                    ),
                    generic_types=[],
                ),
                docs=FunctionDoc(
                    description=
                    'This function gets the original weapon property of the specified weapons specified weapon type.',
                    arguments={
                        "weaponID or weaponName":
                        """The ID or name of the weapon you want to get info of. Names can be: """,
                        "weaponSkill":
                        """Either: pro, std or poor """,
                        "property":
                        """The property you want to get the value of:
The following properties are get only: """
                    },
                    result=
                    'on success:\nint: the weapon property\non failure:\nbool: false if the passed arguments were invalid',
                ),
                url='getOriginalWeaponProperty',
            )
        ],
        client=[
            FunctionData(
                signature=FunctionSignature(
                    name='getOriginalWeaponProperty',
                    return_types=FunctionReturnTypes(
                             is_optional=True,
                         ),
                         default_value='getRootElement()',
                     )
                 ]
             ],
             variable_length=False,
         ),
         generic_types=[
             
         ],
     ),
     docs=FunctionDoc(
         description='' ,
         arguments={
             "clearFor": """The player whose chat is to be cleared. By default, this is set to the root element, which will affect all players. """
         },
         result='returns true if the players chat was cleared successfully, false otherwise.' ,
     ),
     url='clearChatBox',
 )
 ],
 client=[
     FunctionData(
     signature=FunctionSignature(
         name='clearChatBox',
         return_types=FunctionReturnTypes(
             return_types=[
                 FunctionType(
                             names=['bool'],
                             is_optional=False,
                             is_optional=False,
                         ),
                         default_value=None,
                     )
                 ]
             ],
             variable_length=False,
         ),
         generic_types=[
             
         ],
     ),
     docs=FunctionDoc(
         description='This function gets the end position of a Element/Searchlight|searchlight element.' ,
         arguments={
             "theSearchLight": """: the searchlight to get the position where the searchlights light cone ends. """
         },
         result='if the specified searchlight element is valid, this function will return three float, which are the three coordinates of searchlights end position. if not, it will return false plus an error message.' ,
     ),
     url='getSearchLightEndPosition',
 ),
         field=FunctionOOPField(
                         name='endPosition',
                         types=[
                             FunctionType(
                             names=['float'],
                             is_optional=False,
                         ),
                             FunctionType(
                             names=['float'],
                             is_optional=False,
    FunctionDoc, \
    EventData, \
    CompoundEventData

DUMP_PARTIAL = [
    CompoundEventData(
        server=[
            
        ],
        client=[
            EventData(
            name='onClientPickupHit',
            docs=FunctionDoc(
                description='This event triggers whenever a pickup is hit clientside.' ,
                arguments={
                    "thePlayer": """the player that hit the pickup """,
                    "matchingDimension": """true if thePlayer is in the same dimension as the pickup, false otherwise. """
                },
                result='' ,
            ),
            arguments=FunctionArgumentValues(
                    arguments=[
                        [
                            FunctionArgument(
                                name='thePlayer',
                                argument_type=FunctionType(
                                    names=['player'],
                                    is_optional=False,
                                ),
                                default_value=None,
                            )
                        ],
Exemple #26
0
                         argument_type=FunctionType(
                             names=['projectile'],
                             is_optional=False,
                         ),
                         default_value=None,
                     )
                 ]],
                 variable_length=False,
             ),
             generic_types=[],
         ),
         docs=FunctionDoc(
             description=
             'Get the time left before a projectile detonates.',
             arguments={
                 "projectile":
                 """: the projectile to get the timer of. """
             },
             result=
             'returns the the time in milliseconds to detonation which depending on the projectile type will do different things:\n* grenades will explode when it hits 0\n* teargas may be a duration timer\n* both types of rockets will explode when it hits 0\n* satchels restarts so i do not think it does anything',
         ),
         url='getProjectileCounter',
     ),
     field=FunctionOOPField(
         name='counter',
         types=[FunctionType(
             names=['int'],
             is_optional=False,
         )],
     ),
     is_static=False,
 )
def function_generator_fixture() -> TypeScriptFunctionGenerator:
    data = FunctionData(
        signature=FunctionSignature(
            name='getZoneName',
            return_types=FunctionReturnTypes(
                return_types=[
                    FunctionType(
                        names=['string', 'mixed'],
                        is_optional=True,
                    ),
                    FunctionType(
                        names=['int'],
                        is_optional=False,
                    ),
                ],
                variable_length=True,
            ),
            arguments=FunctionArgumentValues(
                arguments=[[
                    FunctionArgument(
                        name='x',
                        argument_type=FunctionType(
                            names=['float'],
                            is_optional=False,
                        ),
                        default_value=None,
                    )
                ],
                           [
                               FunctionArgument(
                                   name='y',
                                   argument_type=FunctionType(
                                       names=['float'],
                                       is_optional=False,
                                   ),
                                   default_value=None,
                               )
                           ],
                           [
                               FunctionArgument(
                                   name='z',
                                   argument_type=FunctionType(
                                       names=['float'],
                                       is_optional=False,
                                   ),
                                   default_value=None,
                               ),
                               FunctionArgument(
                                   name='z_1',
                                   argument_type=FunctionType(
                                       names=['string'],
                                       is_optional=False,
                                   ),
                                   default_value=None,
                               ),
                           ],
                           [
                               FunctionArgument(
                                   name='citiesonly',
                                   argument_type=FunctionType(
                                       names=['bool'],
                                       is_optional=True,
                                   ),
                                   default_value='false',
                               )
                           ]],
                variable_length=True,
            ),
        ),
        url='getZoneName',
        docs=FunctionDoc(
            description="This function allows you to retrieve "
            "the zone name of a certain location. ",
            arguments={
                "x":
                """The X axis position """,
                "y":
                """The Y axis position """,
                "z":
                """The Z axis position """,
                "citiesonly": (": An optional argument to choose if you want "
                               "to return one of the following city names:\n"
                               "** Tierra Robada\n"
                               "** Bone County\n"
                               "** Las Venturas\n"
                               "** San Fierro\n"
                               "** Red County\n"
                               "** Whetstone\n"
                               "** Flint County\n"
                               "** Los Santos ")
            },
            result="""returns the string of the zone name """,
        ),
    )
    url = PageUrl(
        url="/wiki/GetZoneName",
        name="getZoneName",
        category="World functions",
        type=ListType.SERVER,
    )

    return TypeScriptFunctionGenerator(data=data,
                                       url=url,
                                       host_name='https://example.com')
                             ),
                             default_value='true',
                         )
                     ]
                 ],
                 variable_length=False,
             ),
             generic_types=[
                 
             ],
         ),
         docs=FunctionDoc(
             description='This function applies a shader to one or more world textures.\n* The resource Shader_examples#Texture_names|shader_tex_names can help in finding the names of world textures.\n* When replacing the texture for a ped using the CJ skin, set textureName to CJ\n* The shader inherits the render states of the original when it is drawn, so texture stage 0 will already be set to the original texture.\n* When using with a ped, ensure you have set ped or all in the elementTypes when calling dxCreateShader\n* CJ body parts textures can be replaced by using: cj_ped_head, cj_ped_hat, cj_ped_torso, cj_ped_legs, cj_ped_feet, cj_ped_glasses, cj_ped_necklace, cj_ped_watch and cj_ped_extra1. Latest version of http://wiki.multitheftauto.com/wiki/Shader_examples#Texture_names shader_tex_names will show what is being used.' ,
             arguments={
                 "shader": """The shader which is to be applied """,
                 "textureName": """The name of the world texture to apply the shader to. Wildcard matching e.g. ro?ds* can be used to apply to more than one texture at a time. """,
                 "targetElement": """The element to restrict applying the shader to. If this is not set the shader will be applied to everything using the texture name. Valid element types for targetElement are vehicle|vehicles, Object|objects and Ped|peds. """,
                 "appendLayers": """allows two or more layered shaders to be applied in the same texture. You may want to modify the DepthBias in the technique pass to avoid Z-fighting artifacts when using this. """
             },
             result='returns true if the shader was successfully applied, false otherwise.' ,
         ),
         url='engineApplyShaderToWorldTexture',
     ),
             field=None,
             is_static=False,
         )
     ],
 ),
 CompoundOOPData(
     server=[
         
     ],
# Autogenerated file. ANY CHANGES WILL BE OVERWRITTEN
from to_python.core.types import FunctionType, \
    FunctionArgument, \
    FunctionArgumentValues, \
    FunctionReturnTypes, \
    FunctionSignature, \
    FunctionDoc, \
    EventData, \
    CompoundEventData

DUMP_PARTIAL = [
    CompoundEventData(
        server=[
            EventData(
                name='onWeaponFire',
                docs=FunctionDoc(
                    description=
                    'This event is triggered when a custom weapon gets fired.',
                    arguments={},
                    result='',
                ),
                arguments=FunctionArgumentValues(
                    arguments=[],
                    variable_length=False,
                ),
            )
        ],
        client=[],
    )
]
Exemple #30
0
                                 is_optional=False,
                             ),
                             default_value=None,
                         )
                     ]
                 ],
                 variable_length=False,
             ),
             generic_types=[
                 
             ],
         ),
         docs=FunctionDoc(
             description='This function creates an ACL entry in the Access Control List system with the specified name.' ,
             arguments={
                 "aclName": """The name of the ACL entry to add. """
             },
             result='returns the created acl object if successful. returns false if an acl of the given name could not be created.' ,
         ),
         url='aclCreate',
     )
     ],
     client=[
         
     ],
 ),
 CompoundFunctionData(
     server=[
         FunctionData(
         signature=FunctionSignature(
             name='aclCreateGroup',