Adds script hooks, bug fix for empty ScriptIterator

This commit is contained in:
Deukhoofd committed 2024-07-28 11:46:36 +02:00
1 parent 74996d96b0
commit cb2b566388
5 files changed
+495 -19

No files matched your search

@@ -13,7 +13,7 @@ public class ScriptIterator : IEnumerable<ScriptContainer>
_scripts = scripts;
}
bool IncrementToNext()
private bool IncrementToNext()
{
if (_index != -1)
{
@@ -51,6 +51,8 @@ public class ScriptIterator : IEnumerable<ScriptContainer>
/// <inheritdoc />
public IEnumerator<ScriptContainer> GetEnumerator()
{
if (_scripts.Count == 0)
yield break;
while (IncrementToNext())
{
var current = _scripts[_index];