Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/SLuaEvent.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ if (!eventDef) {

const args = Object.values(eventDef.arguments);

// Build event signature with Luau typing
const params = args.map((arg: Argument) => `${arg.name}: ${toLuauType(arg.type)}`).join(', ');
const signature = `function ${name}(${params})`;
// Build event signature with Luau typing for LLEvents:on format
const params = args
.map((arg: Argument) => `${arg.name}: ${toLuauType(arg.type)}`)
.join(', ');
const signature = `LLEvents:on("${name}", function(${params})\n -- ...\nend)`;

// Map arguments to Luau types for display
const luauArgs: Record<string, Argument> = {};
Expand Down
1 change: 1 addition & 0 deletions src/utils/lsl-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ function convertArguments(argRecords: Record<string, Argument>[]): Record<string
const args: Record<string, Argument> = {};
for (const record of argRecords) {
for (const key in record) {
record[key].name = key;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes argument name being undefined.

args[key] = record[key];
}
}
Expand Down