fixed an overall deficiency where libraries did not include extensions. extensions can now mark themselves as libraries, and they thus become fully optional just as plugins do. additionally, a bug was fixed where plugins could be accidentally marked as required instead of optional. these changes resulted in a bcompat API bump to the extension/sharesys interface.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401578
This commit is contained in:
David Anderson
2007-10-15 04:06:57 +00:00
parent 8eaf03c441
commit c803eb8328
13 changed files with 147 additions and 35 deletions
+2 -1
View File
@@ -126,9 +126,10 @@ public SharedPlugin:__pl_adminmenu =
#endif
};
#if !defined REQUIRE_PLUGIN
public __pl_adminmenu_SetNTVOptional()
{
MarkNativeAsOptional("GetAdminTopMenu");
MarkNativeAsOptional("AddTargetsToMenu");
}
#endif
+6 -4
View File
@@ -467,16 +467,18 @@ native bool:LibraryExists(const String:name[]);
native GetExtensionFileStatus(const String:name[], String:error[]="", maxlength=0);
/**
* Called after a library (plugin) is added that the
* current plugin references optionally.
* Called after a library is added that the current plugin references
* optionally. A library is either a plugin name or extension name, as
* exposed via its include file.
*
* @param name Library name.
*/
forward OnLibraryAdded(const String:name[]);
/**
* Called right before a library (plugin) is removed that the
* current plugin references optionally.
* Called right before a library is removed that the current plugin references
* optionally. A library is either a plugin name or extension name, as
* exposed via its include file.
*
* @param name Library name.
*/
+12 -1
View File
@@ -225,7 +225,7 @@ native TopMenuObject:FindTopMenuCategory(Handle:topmenu, const String:name[]);
/**
* Do not edit below this line!
*/
public Extension:__ext_cstrike =
public Extension:__ext_topmenus =
{
name = "TopMenus",
file = "topmenus.ext",
@@ -241,3 +241,14 @@ public Extension:__ext_cstrike =
#endif
};
#if !defined REQUIRE_EXTENSIONS
public __ext_topmenus_SetNTVOptional()
{
MarkNativeAsOptional("CreateTopMenu");
MarkNativeAsOptional("LoadTopMenuConfig");
MarkNativeAsOptional("AddToTopMenu");
MarkNativeAsOptional("RemoveFromTopMenu");
MarkNativeAsOptional("DisplayTopMenu");
MarkNativeAsOptional("FindTopMenuCategory");
}
#endif