-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
new /proc/new_verb(Destination)
- Loading branch information
Showing
9 changed files
with
92 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace OpenDreamRuntime.Procs { | ||
public readonly ref struct DreamProcArguments { | ||
public int Count => Values.Length; | ||
namespace OpenDreamRuntime.Procs; | ||
|
||
public readonly ReadOnlySpan<DreamValue> Values; | ||
public readonly ref struct DreamProcArguments { | ||
public int Count => Values.Length; | ||
|
||
public DreamProcArguments() { | ||
Values = Array.Empty<DreamValue>(); | ||
} | ||
public readonly ReadOnlySpan<DreamValue> Values; | ||
|
||
public DreamProcArguments(ReadOnlySpan<DreamValue> values) { | ||
Values = values; | ||
} | ||
public DreamProcArguments() { | ||
Values = Array.Empty<DreamValue>(); | ||
} | ||
|
||
public DreamProcArguments(params DreamValue[] values) { | ||
Values = values; | ||
} | ||
public DreamProcArguments(ReadOnlySpan<DreamValue> values) { | ||
Values = values; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public DreamValue GetArgument(int argumentPosition) { | ||
if (Count > argumentPosition) { | ||
return Values[argumentPosition]; | ||
} | ||
public DreamProcArguments(params DreamValue[] values) { | ||
Values = values; | ||
} | ||
|
||
return DreamValue.Null; | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public DreamValue GetArgument(int argumentPosition) { | ||
if (Count > argumentPosition) { | ||
return Values[argumentPosition]; | ||
} | ||
|
||
public override string ToString() { | ||
return $"<Arguments {Count}>"; | ||
} | ||
return DreamValue.Null; | ||
} | ||
|
||
public override string ToString() { | ||
return $"<Arguments {Count}>"; | ||
} | ||
} |