File tree 4 files changed +16
-9
lines changed 4 files changed +16
-9
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 17
17
CATEGORY_CORRECTIONS = {
18
18
'SQL' : 'Database' ,
19
19
'Collision_shape' : 'Colshape' ,
20
+ 'Weapon_creation' : 'Weapon' ,
20
21
}
21
22
22
23
def clean_category (category_name : str ) -> str :
Original file line number Diff line number Diff line change @@ -84,12 +84,18 @@ if (Array.isArray(event.data.notes) && event.data.notes.length > 0) {
84
84
)}
85
85
86
86
<h4 >Parameters</h4 >
87
- { parametersCode !== " " && <Code code = { parametersCode } lang = " lua" />}
88
- { eventParameters .map ((param : any ) => (
89
- <ul >
90
- <li set :html = { " <strong>" + param .name + " </strong>: " + param .description } />
91
- </ul >
92
- ))}
87
+ { eventParameters .length > 0 ? (
88
+ <>
89
+ <Code code = { parametersCode } lang = " lua" />
90
+ { eventParameters .map ((param : any ) => (
91
+ <ul >
92
+ <li set :html = { " <strong>" + param .name + " </strong>: " + param .description } />
93
+ </ul >
94
+ ))}
95
+ </>
96
+ ) : (
97
+ <p ><em >This event does not pass any parameters to the handler function.</em ></p >
98
+ )}
93
99
94
100
<h4 >Source</h4 >
95
101
<p set:html ={ " <strong>" + event .data .source_element .type + " </strong>: " + event .data .source_element .description } />
@@ -99,7 +105,6 @@ if (Array.isArray(event.data.notes) && event.data.notes.length > 0) {
99
105
` local function ${eventHandlerExample .funcName }(${eventHandlerExample .funcParams })\n ` +
100
106
` -- Your code here\n ` +
101
107
` end\n ` +
102
- ` \n ` +
103
108
` -- Register the event handler\n ` +
104
109
` addEventHandler("${event .id }", elementAttachedTo, ${eventHandlerExample .funcName }) `
105
110
} lang =" lua" />
Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ let eventsByTypeByCategory: EventsByTypeByCategory = {
20
20
} ;
21
21
22
22
for ( let event of eventsCollection ) {
23
- const normalizedPath = path . normalize ( event . filePath || '' ) ;
24
- const folder = path . basename ( path . dirname ( normalizedPath ) ) ;
23
+ let folder = path . basename ( path . dirname ( event . filePath || '' ) ) ;
24
+ folder = folder . replace ( / _ / g, ' ' ) ;
25
+
25
26
if ( ! eventsByCategory [ folder ] ) {
26
27
eventsByCategory [ folder ] = [ ] ;
27
28
}
You can’t perform that action at this time.
0 commit comments