aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Scripting.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-01-29 11:59:18 -0500
committerMichael <[email protected]>2017-01-29 11:59:18 -0500
commitabfd774638d509a0d5fe5a61fe69b890fa3e0fc6 (patch)
tree62e7e7aea3a98615331180d28a3a5970f298d3a6 /ShiftOS_TheReturn/Scripting.cs
parentb5d51784117f5fdecb14bc1cef6a6d2477a7c810 (diff)
downloadshiftos_thereturn-abfd774638d509a0d5fe5a61fe69b890fa3e0fc6.tar.gz
shiftos_thereturn-abfd774638d509a0d5fe5a61fe69b890fa3e0fc6.tar.bz2
shiftos_thereturn-abfd774638d509a0d5fe5a61fe69b890fa3e0fc6.zip
Scripting changes and background music!
Diffstat (limited to 'ShiftOS_TheReturn/Scripting.cs')
-rw-r--r--ShiftOS_TheReturn/Scripting.cs31
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>