mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
29b67a3ef0
* Pass "interaction" to HOOK_ALLOW_PVP_ATTACK and HOOK_ON_PVP_ATTACK This let's you test for the kind of attack in the hook; for example, you can do `interaction & INT_KICK ~= 0` to test if the attack is a kick. * Fix broken links in wiki Have to go up one directory
1.6 KiB
1.6 KiB
⏪ Lua Reference
Setting up Visual Studio Code will allow you to have all of the modern benefits of IDEs like autocomplete.
- Install the
Lua
extension bysumneko
in VS Code:
- Goto settings (
ctrl+,
) and typediagnostics disable
in the settings search bar:
- Add a new item called
lowercase-global
and clickok
- Type
workspace library
in the settings search bar:
- Add a new item containing the location of
<your repro>/autogen/lua_definitions
Note: For your custom functions you will need to provide type definitions to get autocomplete.
For instance, this will not autocomplete for the mario struct:
function mario_update(m)
-- code here
end
But this will autocomplete for the mario struct:
--- @param m MarioState
function mario_update(m)
-- code here
end