mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
make script runner less drunk
This commit is contained in:
parent
abe535200b
commit
a9d7195f1e
1 changed files with 8 additions and 7 deletions
|
@ -96,10 +96,11 @@ namespace ShiftOS.Server
|
|||
{
|
||||
Name = "run",
|
||||
GUID = "Server",
|
||||
Contents = $@"{{
|
||||
script:""{File.ReadAllText($"scripts/{user}/{script}.lua").Replace("\"", "\\\"")}"",
|
||||
args:""{sArgs}""
|
||||
}}"
|
||||
Contents = JsonConvert.SerializeObject(new
|
||||
{
|
||||
script = File.ReadAllText($"scripts/{user}/{script}.lua"),
|
||||
args = sArgs
|
||||
})
|
||||
}));
|
||||
}
|
||||
else
|
||||
|
@ -115,7 +116,7 @@ namespace ShiftOS.Server
|
|||
{
|
||||
Name = "Error",
|
||||
GUID = "Server",
|
||||
Contents = JsonConvert.SerializeObject(new MudException("Command parse error"))
|
||||
Contents = JsonConvert.SerializeObject(new MudException("<script_runner> Script not found or script error detected."))
|
||||
}));
|
||||
}
|
||||
catch
|
||||
|
@ -182,8 +183,8 @@ namespace ShiftOS.Server
|
|||
GUID = "server",
|
||||
Contents = JsonConvert.SerializeObject(saveFile)
|
||||
}));
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
foreach (var sve in Directory.GetFiles("saves"))
|
||||
|
@ -199,8 +200,8 @@ namespace ShiftOS.Server
|
|||
GUID = "server",
|
||||
Contents = JsonConvert.SerializeObject(saveFile)
|
||||
}));
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue