forked from mirror/OpenTTD
Change: [Script] Don't allow scripts to instantiate ScriptEvent (#14276)
This commit is contained in:
@@ -353,7 +353,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
|
||||
else()
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PreRegister(engine, \"${API_SUPER_CLS}\");")
|
||||
endif()
|
||||
if(NOT "${SUPER_CLS}" MATCHES "^ScriptEvent")
|
||||
if(NOT "${SUPER_CLS}" MATCHES "^ScriptEvent" AND NOT "${CLS}" STREQUAL "ScriptEvent")
|
||||
if("${CLS_PARAM_2}" STREQUAL "v")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.AddSQAdvancedConstructor(engine);")
|
||||
else()
|
||||
|
Reference in New Issue
Block a user