Port some includes to transitional API.
This commit is contained in:
parent
db9ee5326a
commit
e5b1b630bb
@ -68,7 +68,7 @@ stock ByteCountToCells(size)
|
||||
* NOT be auto-intialized.
|
||||
* @return New Handle to the array object.
|
||||
*/
|
||||
native Handle:CreateArray(blocksize=1, startsize=0);
|
||||
native ArrayList:CreateArray(blocksize=1, startsize=0);
|
||||
|
||||
/**
|
||||
* Clears an array of all entries. This is the same as ResizeArray(0).
|
||||
@ -281,3 +281,27 @@ native FindStringInArray(Handle:array, const String:item[]);
|
||||
* @error Invalid Handle
|
||||
*/
|
||||
native FindValueInArray(Handle:array, any:item);
|
||||
|
||||
methodmap ArrayList < Handle {
|
||||
public ArrayList() = CreateArray;
|
||||
public Clear() = ClearArray;
|
||||
public Clone() = CloneArray;
|
||||
public Resize() = ResizeArray;
|
||||
public Push() = PushArrayCell;
|
||||
public PushString() = PushArrayString;
|
||||
public PushArray() = PushArrayArray;
|
||||
public Get() = GetArrayCell;
|
||||
public GetString() = GetArrayString;
|
||||
public GetArray() = GetArrayArray;
|
||||
public Set() = SetArrayCell;
|
||||
public SetString() = SetArrayString;
|
||||
public SetArray() = SetArrayArray;
|
||||
public ShiftUp() = ShiftArrayUp;
|
||||
public Erase() = RemoveFromArray;
|
||||
public SwapAt() = SwapArrayItems;
|
||||
public FindString() = FindStringInArray;
|
||||
public FindValue() = FindValueInArray;
|
||||
property int Size {
|
||||
public get() = GetArraySize;
|
||||
}
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ forward bool:OnClientConnect(client, String:rejectmsg[], maxlen);
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientConnected(client);
|
||||
forward void OnClientConnected(client);
|
||||
|
||||
/**
|
||||
* Called when a client is entering the game.
|
||||
@ -96,7 +96,7 @@ forward OnClientConnected(client);
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientPutInServer(client);
|
||||
forward void OnClientPutInServer(client);
|
||||
|
||||
/**
|
||||
* Called when a client is disconnecting from the server.
|
||||
@ -104,7 +104,7 @@ forward OnClientPutInServer(client);
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientDisconnect(client);
|
||||
forward void OnClientDisconnect(client);
|
||||
|
||||
/**
|
||||
* Called when a client is disconnected from the server.
|
||||
@ -112,7 +112,7 @@ forward OnClientDisconnect(client);
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientDisconnect_Post(client);
|
||||
forward void OnClientDisconnect_Post(client);
|
||||
|
||||
/**
|
||||
* Called when a client is sending a command.
|
||||
@ -132,7 +132,7 @@ forward Action:OnClientCommand(client, args);
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientSettingsChanged(client);
|
||||
forward void OnClientSettingsChanged(client);
|
||||
|
||||
/**
|
||||
* Called when a client receives a Steam ID. The state of a client's
|
||||
@ -145,7 +145,7 @@ forward OnClientSettingsChanged(client);
|
||||
* @param auth Client auth string.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientAuthorized(client, const String:auth[]);
|
||||
forward void OnClientAuthorized(client, const String:auth[]);
|
||||
|
||||
/**
|
||||
* Called once a client is authorized and fully in-game, but
|
||||
@ -180,7 +180,7 @@ forward Action:OnClientPreAdminCheck(client);
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientPostAdminFilter(client);
|
||||
forward void OnClientPostAdminFilter(client);
|
||||
|
||||
/**
|
||||
* Called once a client is authorized and fully in-game, and
|
||||
@ -192,7 +192,7 @@ forward OnClientPostAdminFilter(client);
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientPostAdminCheck(client);
|
||||
forward void OnClientPostAdminCheck(client);
|
||||
|
||||
/**
|
||||
* This function will be deprecated in a future release. Use the MaxClients variable instead.
|
||||
|
@ -968,4 +968,4 @@ forward Action:OnClientSayCommand(client, const String:command[], const String:s
|
||||
* @param sArgs Chat argument string.
|
||||
*
|
||||
*/
|
||||
forward OnClientSayCommand_Post(client, const String:command[], const String:sArgs[]);
|
||||
forward void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs);
|
||||
|
@ -98,12 +98,12 @@ native bool:EndOfMapVoteEnabled();
|
||||
* Called when mapchooser removes a nomination from its list.
|
||||
* Nominations cleared on map start will not trigger this forward
|
||||
*/
|
||||
forward OnNominationRemoved(const String:map[], owner);
|
||||
forward void OnNominationRemoved(char[] map, int owner);
|
||||
|
||||
/**
|
||||
* Called when mapchooser starts a Map Vote.
|
||||
*/
|
||||
forward OnMapVoteStarted();
|
||||
forward void OnMapVoteStarted();
|
||||
|
||||
|
||||
public SharedPlugin:__pl_mapchooser =
|
||||
|
@ -152,7 +152,7 @@ enum MenuSource
|
||||
* @param param2 Second action parameter (usually the item).
|
||||
* @noreturn
|
||||
*/
|
||||
functag public MenuHandler(Handle:menu, MenuAction:action, param1, param2);
|
||||
functag public MenuHandler(Menu:menu, MenuAction:action, param1, param2);
|
||||
|
||||
/**
|
||||
* Creates a new, empty menu using the default style.
|
||||
@ -164,7 +164,7 @@ functag public MenuHandler(Handle:menu, MenuAction:action, param1, param2);
|
||||
* the only default actions.
|
||||
* @return A new menu Handle.
|
||||
*/
|
||||
native Handle:CreateMenu(MenuHandler:handler, MenuAction:actions=MENU_ACTIONS_DEFAULT);
|
||||
native Menu:CreateMenu(MenuHandler:handler, MenuAction:actions=MENU_ACTIONS_DEFAULT);
|
||||
|
||||
/**
|
||||
* Displays a menu to a client.
|
||||
@ -528,7 +528,7 @@ stock bool:VoteMenuToAll(Handle:menu, time, flags=0)
|
||||
* defines.
|
||||
* @noreturn
|
||||
*/
|
||||
functag public VoteHandler(Handle:menu,
|
||||
functag public VoteHandler(Menu:menu,
|
||||
num_votes,
|
||||
num_clients,
|
||||
const client_info[][2],
|
||||
@ -546,6 +546,63 @@ functag public VoteHandler(Handle:menu,
|
||||
*/
|
||||
native SetVoteResultCallback(Handle:menu, VoteHandler:callback);
|
||||
|
||||
methodmap Menu < Handle {
|
||||
public Menu() = CreateMenu;
|
||||
public Display() = DisplayMenu;
|
||||
public DisplayAt() = DisplayMenuAtItem;
|
||||
public AddItem() = AddMenuItem;
|
||||
public InsertItem() = InsertMenuItem;
|
||||
public RemoveItem() = RemoveMenuItem;
|
||||
public RemoveAllItems() = RemoveAllMenuItems;
|
||||
public GetItem() = GetMenuItem;
|
||||
public GetTitle() = GetMenuTitle;
|
||||
public SetTitle() = SetMenuTitle;
|
||||
public ToPanel() = CreatePanelFromMenu;
|
||||
public Cancel() = CancelMenu;
|
||||
public DisplayVote() = VoteMenu;
|
||||
public DisplayVoteToAll() = VoteMenuToAll;
|
||||
|
||||
public SetPagination() = SetMenuPagination;
|
||||
property int Pagination {
|
||||
public get() = GetMenuPagination;
|
||||
}
|
||||
|
||||
public SetOptionFlags() = SetMenuOptionFlags;
|
||||
property int OptionFlags {
|
||||
public get() = GetMenuOptionFlags;
|
||||
}
|
||||
|
||||
public SetExitButton() = SetMenuExitButton;
|
||||
property bool ExitButton {
|
||||
public get() = GetMenuExitButton;
|
||||
}
|
||||
public SetExitBackButton() = SetMenuExitBackButton;
|
||||
property bool ExitBackButton {
|
||||
public get() = GetMenuExitBackButton;
|
||||
}
|
||||
public SetNoVoteButton() = SetMenuNoVoteButton;
|
||||
public SetVoteResultCallback() = SetVoteResultCallback;
|
||||
|
||||
property int ItemCount {
|
||||
public get() = GetMenuItemCount;
|
||||
}
|
||||
property Handle Style {
|
||||
public get() = GetMenuStyle;
|
||||
}
|
||||
property bool VoteInProgress {
|
||||
public get() {
|
||||
return IsVoteInProgress(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void CancelVote() {
|
||||
CancelVote();
|
||||
}
|
||||
public int GetSelectionPosition() {
|
||||
return GetMenuSelectionPosition();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the number of seconds you should "wait" before displaying
|
||||
* a publicly invocable menu. This number is the time remaining until
|
||||
|
@ -172,7 +172,7 @@ forward void OnMapStart();
|
||||
/**
|
||||
* Called right before a map ends.
|
||||
*/
|
||||
forward OnMapEnd();
|
||||
forward void OnMapEnd();
|
||||
|
||||
/**
|
||||
* Called when the map has loaded, servercfgfile (server.cfg) has been
|
||||
@ -201,20 +201,20 @@ forward void OnConfigsExecuted();
|
||||
*
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnAutoConfigsBuffered();
|
||||
forward void OnAutoConfigsBuffered();
|
||||
|
||||
/**
|
||||
* @deprecated Use OnConfigsExecuted() instead.
|
||||
*/
|
||||
#pragma deprecated Use OnConfigsExecuted() instead
|
||||
forward OnServerCfg();
|
||||
forward void OnServerCfg();
|
||||
|
||||
/**
|
||||
* Called after all plugins have been loaded. This is called once for
|
||||
* every plugin. If a plugin late loads, it will be called immediately
|
||||
* after OnPluginStart().
|
||||
*/
|
||||
forward OnAllPluginsLoaded();
|
||||
forward void OnAllPluginsLoaded();
|
||||
|
||||
/**
|
||||
* Returns the calling plugin's Handle.
|
||||
@ -461,7 +461,7 @@ native GetExtensionFileStatus(const String:name[], String:error[]="", maxlength=
|
||||
*
|
||||
* @param name Library name.
|
||||
*/
|
||||
forward OnLibraryAdded(const String:name[]);
|
||||
forward void OnLibraryAdded(const String:name[]);
|
||||
|
||||
/**
|
||||
* Called right before a library is removed that the current plugin references
|
||||
@ -470,7 +470,7 @@ forward OnLibraryAdded(const String:name[]);
|
||||
*
|
||||
* @param name Library name.
|
||||
*/
|
||||
forward OnLibraryRemoved(const String:name[]);
|
||||
forward void OnLibraryRemoved(const String:name[]);
|
||||
|
||||
#define MAPLIST_FLAG_MAPSFOLDER (1<<0) /**< On failure, use all maps in the maps folder. */
|
||||
#define MAPLIST_FLAG_CLEARARRAY (1<<1) /**< If an input array is specified, clear it before adding. */
|
||||
@ -564,7 +564,7 @@ forward bool:OnClientFloodCheck(client);
|
||||
* @param blocked True if client flooded last "say", false otherwise.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientFloodResult(client, bool:blocked);
|
||||
forward void OnClientFloodResult(client, bool:blocked);
|
||||
|
||||
/**
|
||||
* Feature types.
|
||||
|
Loading…
Reference in New Issue
Block a user