Correct Plugin API Documentation Formatting (#1019)
This commit is contained in:
+32
-32
@@ -38,7 +38,7 @@
|
||||
#include <version>
|
||||
|
||||
/** If this gets changed, you need to update Core's check. */
|
||||
#define SOURCEMOD_PLUGINAPI_VERSION 5
|
||||
#define SOURCEMOD_PLUGINAPI_VERSION 5
|
||||
|
||||
struct PlVers
|
||||
{
|
||||
@@ -53,10 +53,10 @@ struct PlVers
|
||||
*/
|
||||
enum Action
|
||||
{
|
||||
Plugin_Continue = 0, /**< Continue with the original action */
|
||||
Plugin_Changed = 1, /**< Inputs or outputs have been overridden with new values */
|
||||
Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */
|
||||
Plugin_Stop = 4, /**< Immediately stop the hook chain and handle the original */
|
||||
Plugin_Continue = 0, /**< Continue with the original action */
|
||||
Plugin_Changed = 1, /**< Inputs or outputs have been overridden with new values */
|
||||
Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */
|
||||
Plugin_Stop = 4 /**< Immediately stop the hook chain and handle the original */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -82,17 +82,17 @@ public PlVers __version =
|
||||
*/
|
||||
enum PluginStatus
|
||||
{
|
||||
Plugin_Running=0, /**< Plugin is running */
|
||||
Plugin_Running=0, /**< Plugin is running */
|
||||
/* All states below are "temporarily" unexecutable */
|
||||
Plugin_Paused, /**< Plugin is loaded but paused */
|
||||
Plugin_Error, /**< Plugin is loaded but errored/locked */
|
||||
Plugin_Paused, /**< Plugin is loaded but paused */
|
||||
Plugin_Error, /**< Plugin is loaded but errored/locked */
|
||||
/* All states below do not have all natives */
|
||||
Plugin_Loaded, /**< Plugin has passed loading and can be finalized */
|
||||
Plugin_Failed, /**< Plugin has a fatal failure */
|
||||
Plugin_Created, /**< Plugin is created but not initialized */
|
||||
Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */
|
||||
Plugin_BadLoad, /**< Plugin failed to load */
|
||||
Plugin_Evicted /**< Plugin was unloaded due to an error */
|
||||
Plugin_Loaded, /**< Plugin has passed loading and can be finalized */
|
||||
Plugin_Failed, /**< Plugin has a fatal failure */
|
||||
Plugin_Created, /**< Plugin is created but not initialized */
|
||||
Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */
|
||||
Plugin_BadLoad, /**< Plugin failed to load */
|
||||
Plugin_Evicted /**< Plugin was unloaded due to an error */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -112,11 +112,11 @@ enum PluginStatus
|
||||
*/
|
||||
enum PluginInfo
|
||||
{
|
||||
PlInfo_Name, /**< Plugin name */
|
||||
PlInfo_Author, /**< Plugin author */
|
||||
PlInfo_Description, /**< Plugin description */
|
||||
PlInfo_Version, /**< Plugin version */
|
||||
PlInfo_URL, /**< Plugin URL */
|
||||
PlInfo_Name, /**< Plugin name */
|
||||
PlInfo_Author, /**< Plugin author */
|
||||
PlInfo_Description, /**< Plugin description */
|
||||
PlInfo_Version, /**< Plugin version */
|
||||
PlInfo_URL /**< Plugin URL */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -124,10 +124,10 @@ enum PluginInfo
|
||||
*/
|
||||
struct Extension
|
||||
{
|
||||
public const char[] name; /**< Short name */
|
||||
public const char[] file; /**< Default file name */
|
||||
public bool autoload; /**< Whether or not to auto-load */
|
||||
public bool required; /**< Whether or not to require */
|
||||
public const char[] name; /**< Short name */
|
||||
public const char[] file; /**< Default file name */
|
||||
public bool autoload; /**< Whether or not to auto-load */
|
||||
public bool required; /**< Whether or not to require */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -135,13 +135,13 @@ struct Extension
|
||||
*/
|
||||
struct SharedPlugin
|
||||
{
|
||||
public const char[] name; /**< Short name */
|
||||
public const char[] file; /**< File name */
|
||||
public bool required; /**< Whether or not to require */
|
||||
public const char[] name; /**< Short name */
|
||||
public const char[] file; /**< File name */
|
||||
public bool required; /**< Whether or not to require */
|
||||
};
|
||||
|
||||
public float NULL_VECTOR[3]; /**< Pass this into certain functions to act as a C++ NULL */
|
||||
public const char NULL_STRING[1]; /**< pass this into certain functions to act as a C++ NULL */
|
||||
public float NULL_VECTOR[3]; /**< Pass this into certain functions to act as a C++ NULL */
|
||||
public const char NULL_STRING[1]; /**< pass this into certain functions to act as a C++ NULL */
|
||||
|
||||
/**
|
||||
* Check if the given vector is the NULL_VECTOR.
|
||||
@@ -177,7 +177,7 @@ native int VerifyCoreVersion();
|
||||
* or otherwise non-existent, the plugin will still work. Calling
|
||||
* removed natives results in a run-time error.
|
||||
*
|
||||
* @param name Native name.
|
||||
* @param name Native name.
|
||||
*/
|
||||
native void MarkNativeAsOptional(const char[] name);
|
||||
|
||||
@@ -187,7 +187,7 @@ public void __ext_core_SetNTVOptional()
|
||||
MarkNativeAsOptional("RequireFeature");
|
||||
MarkNativeAsOptional("AddCommandListener");
|
||||
MarkNativeAsOptional("RemoveCommandListener");
|
||||
|
||||
|
||||
MarkNativeAsOptional("BfWriteBool");
|
||||
MarkNativeAsOptional("BfWriteByte");
|
||||
MarkNativeAsOptional("BfWriteChar");
|
||||
@@ -247,7 +247,7 @@ public void __ext_core_SetNTVOptional()
|
||||
MarkNativeAsOptional("BfRead.ReadVecNormal");
|
||||
MarkNativeAsOptional("BfRead.ReadAngles");
|
||||
MarkNativeAsOptional("BfRead.BytesLeft.get");
|
||||
|
||||
|
||||
MarkNativeAsOptional("PbReadInt");
|
||||
MarkNativeAsOptional("PbReadFloat");
|
||||
MarkNativeAsOptional("PbReadBool");
|
||||
@@ -310,7 +310,7 @@ public void __ext_core_SetNTVOptional()
|
||||
MarkNativeAsOptional("Protobuf.ReadMessage");
|
||||
MarkNativeAsOptional("Protobuf.ReadRepeatedMessage");
|
||||
MarkNativeAsOptional("Protobuf.AddMessage");
|
||||
|
||||
|
||||
VerifyCoreVersion();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user