TmpMenu/scripts
maybegreat48 1c34e2a1b6 Update for b3258 (#3288)
* fix: update script names
* fix: use original chat sender
* feat(tunables): fix tunable service
* fix: explode patch (thanks @Mr-X-GTA)
* fix: fix compile errors
* fix: use unique_ptr
* Added 1.69 vehicles.
* Added new weather for 1.69 and updated stack sizes.
* Fixed garage.
* Made Unload button a developer-only feature. (Disabled on Release)
* Redesigned Network tab to not be a giant mess.
* Added new json_serializer code from @tupoy-ya.
* chore: correct dependency

------

Co-authored-by: maybegreat48 <email@hostname>
Co-authored-by: Andreas Maerten <24669514+Yimura@users.noreply.github.com>
Co-authored-by: gir489returns <redacted@example.com>
2024-07-03 23:04:06 +02:00
..
crossmap.txt Update for b3258 (#3288) 2024-07-03 23:04:06 +02:00
doc_gen.py lua io.exists (#2771) 2024-02-24 11:10:58 +01:00
generate_natives.py refactor!: repo cleanup (#2650) 2023-12-30 16:05:18 +01:00
natives_gen.py lua natives: try to handle Any* parameters properly (#2785) 2024-02-28 23:47:33 +01:00
natives.json Update for b3258 (#3288) 2024-07-03 23:04:06 +02:00
README.md refactor!: repo cleanup (#2650) 2023-12-30 16:05:18 +01:00

Scripts

This directory contains a collection of scripts used to generate certain parts of the code base.

Doc Gen

doc_gen.py is used to generate the Lua documentation that's provided by YimMenu. It relies on specifically formatted code comments to generate Lua documentation.

Generate Natives

generate_natives.py is responsible for generating the src/natives.hpp and src/invoker/crossmap.hpp files.

It takes a natives.json from here and a crossmap.txt file which needs follow a certain format of:

[first_seen_native_hash]<comma>[current_native_hash]

Example:

0xE1A0450ED46A7812,0x11FD21BA1B765FE2
0x39BE7CEA8D9CC8E6,0x5F7C6361179DFFC4
0x3C5FD37B5499582E,0x54BC5E0B6A29AE8A
0xE2A99A9B524BEFFF,0x1FDE21A286357401
0x51F1A8E48C3D2F6D,0xD1BAD83E70275AEB
0x0A6D923DFFC9BD89,0x93693D93BD53ACB1
0x112CEF1615A1139F,0x203607236413B185
0xD47A2C1BA117471D,0x4F3198DEED415E95
0xC2F7FE5309181C7D,0xCFE92984BF3486D5
0x23789E777D14CE44,0x2B3725FC402B94A8
0x350AA5EBC03D3BD2,0x606408352C7741AD
0x498C1E05CE5F7877,0x59E8FA762FB527C5
...

Natives Gen

natives_gen.py is used to generate the Lua bindings for all the natives currently present in the menu. It'll read through the src/natives.hpp file and generate the appropriate bindings under src/lua/natives/.