diff options
Diffstat (limited to 'ShiftOS_TheReturn/Scripting.cs')
| -rw-r--r-- | ShiftOS_TheReturn/Scripting.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Scripting.cs b/ShiftOS_TheReturn/Scripting.cs index bea2568..4d5c1a7 100644 --- a/ShiftOS_TheReturn/Scripting.cs +++ b/ShiftOS_TheReturn/Scripting.cs @@ -148,6 +148,37 @@ namespace ShiftOS.Engine.Scripting } } + [Exposed("console")] + public class ConsoleFunctions + { + public void write(dynamic text) + { + Console.Write(text.ToString()); + } + + public void writeLine(dynamic text) + { + Console.WriteLine(text.ToString()); + } + } + + [Exposed("sos")] + public class SystemFunctions + { + public int getCodepoints() { return SaveSystem.CurrentSave.Codepoints; } + + + public bool runCommand(string cmd) + { + var args = TerminalBackend.GetArgs(ref cmd); + + return TerminalBackend.RunClient(cmd, args); + } + + + } + + public class ExposedAttribute : Attribute { /// <summary> |
