Add a PluginIterator methodmap (#1779)

* Add a PluginIterator methodmap

* Follow convention

* Update sourcemod.inc

* Turn method ReadPlugin into property Plugin

* Requested change

* Update sourcemod.inc

* Curse you VSC

* Follow behavior of other iterators instead of the natives

* Fix a stray space

* Implement a hacked CPluginIterator

* Oops

Copy paste go brr

* Revert a change made before the custom impl
This commit is contained in:
Deathreus
2022-06-24 11:46:03 +02:00
committed by GitHub
parent 28a5d4b342
commit 37c2a83523
2 changed files with 149 additions and 2 deletions
+22
View File
@@ -243,6 +243,28 @@ forward void OnAllPluginsLoaded();
*/
native Handle GetMyHandle();
methodmap PluginIterator < Handle
{
// Returns an iterator that can be used to search through plugins.
//
// @return A new Handle to a PluginIterator.
public native PluginIterator();
// Advances the iterator. Returns whether there are more plugins available in the iterator.
//
// @return True on more plugins, false otherwise.
// @error Invalid Handle.
public native bool Next();
// Returns the current plugin in the iterator.
//
// @return Current plugin the iterator is at
// @error Invalid Handle.
property Handle Plugin {
public native get();
}
}
/**
* Returns an iterator that can be used to search through plugins.
*