added amb1666 - rehaul over the ml api so extensions can easily use translations
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402132
This commit is contained in:
@@ -75,5 +75,6 @@
|
||||
//#define SMEXT_ENABLE_ADMINSYS
|
||||
//#define SMEXT_ENABLE_TEXTPARSERS
|
||||
//#define SMEXT_ENABLE_USERMSGS
|
||||
//#define SMEXT_ENABLE_TRANSLATOR
|
||||
|
||||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||
|
||||
@@ -94,6 +94,9 @@ ITextParsers *textparsers = NULL;
|
||||
#if defined SMEXT_ENABLE_USERMSGS
|
||||
IUserMessages *usermsgs = NULL;
|
||||
#endif
|
||||
#if defined SMEXT_ENABLE_TRANSLATOR
|
||||
ITranslator *translator = NULL;
|
||||
#endif
|
||||
|
||||
/** Exports the main interface */
|
||||
PLATFORM_EXTERN_C IExtensionInterface *GetSMExtAPI()
|
||||
@@ -179,6 +182,9 @@ bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error,
|
||||
#if defined SMEXT_ENABLE_USERMSGS
|
||||
SM_GET_IFACE(USERMSGS, usermsgs);
|
||||
#endif
|
||||
#if defined SMEXT_ENABLE_TRANSLATOR
|
||||
SM_GET_IFACE(TRANSLATOR, translator);
|
||||
#endif
|
||||
|
||||
if (SDK_OnLoad(error, maxlength, late))
|
||||
{
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
#if defined SMEXT_ENABLE_USERMSGS
|
||||
#include <IUserMessages.h>
|
||||
#endif
|
||||
#if defined SMEXT_ENABLE_TRANSLATOR
|
||||
#include <ITranslator.h>
|
||||
#endif
|
||||
|
||||
#if defined SMEXT_CONF_METAMOD
|
||||
#include <ISmmPlugin.h>
|
||||
@@ -283,6 +286,9 @@ extern IAdminSystem *adminsys;
|
||||
#if defined SMEXT_ENABLE_USERMSGS
|
||||
extern IUserMessages *usermsgs;
|
||||
#endif
|
||||
#if defined SMEXT_ENABLE_TRANSLATOR
|
||||
extern ITranslator *translator;
|
||||
#endif
|
||||
|
||||
#if defined SMEXT_CONF_METAMOD
|
||||
PLUGIN_GLOBALVARS();
|
||||
|
||||
Reference in New Issue
Block a user