Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ModdingTools/Headless/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class CommandLineOptions
[Option(Group = "task", HelpText = "Launch editor")]
public bool Editor { get; set; }

[Option(Group = "task", HelpText = "Kill editor")]
public bool KillEditor { get; set; }

[Option("testmap", HelpText = "Test map", Group = "task")]
public string TestMap { get; set; }

Expand Down
7 changes: 7 additions & 0 deletions ModdingTools/Headless/ProgramHeadless.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ static int RunOptionsAndReturnExitCode(CommandLineOptions o)
}
else
{
if(o.KillEditor)
{
Logger.Log(LogLevel.Info, $"Killing editor...");
Utils.KillEditor(false); // no need for async here, we can hold up the line because we're just exiting right after anyways
return 0;
}

if (o.TestMapAll != null)
{
RunSteamAPI(true);
Expand Down
50 changes: 20 additions & 30 deletions ModdingTools/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

285 changes: 201 additions & 84 deletions ModdingTools/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -271,89 +271,206 @@
</data>
<data name="VSCodeTaskTemplate" xml:space="preserve">
<value>{
"version": "2.0.0",
"tasks": [
{
"label": "OMM: Compile",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"c",
"${file}"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "OMM: Compile and Cook",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"cc",
"${file}"
],
"problemMatcher": [],
"group": "build"
},
{
"label": "OMM: Compile and launch editor",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"ce",
"${file}"
],
"problemMatcher": [],
"group": "build"
},
{
"label": "OMM: Compile and Cook and launch game (only mods folder, last visited map)",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"cg",
"${file}"
],
"problemMatcher": [],
"group": "build"
},
{
"label": "OMM: Compile and Cook and launch game (only mods folder, choose map)",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"cm",
"${file}"
],
"problemMatcher": [],
"group": "build"
},
{
"label": "OMM: Compile and Cook and launch game (with workshop mods, last visited map)",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"ci",
"${file}"
],
"problemMatcher": [],
"group": "build"
},
{
"label": "OMM: Compile and Cook and launch game (with workshop mods, choose map)",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"cn",
"${file}"
],
"problemMatcher": [],
"group": "build"
}
]
"version": "2.0.0",
"tasks": [
{
"label": "Compile Mod",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"--mod",
"${workspaceFolderBasename}",
"--compilemod",
"--nologo"
],
"problemMatcher": {
"owner": "uc",
"fileLocation": [
"relative",
"${workspaceFolder}\\..\\"
],
"source": "Unrealscript Compilation",
"pattern": [
{
"regexp": "(?&lt;=(Error|Warn)\\]\\s{2})(.*(?=\\.uc)\\.uc).(\\d*).(?:\\s|:)*(.*)",
"severity": 1,
"file": 2,
"line": 3,
"message": 4
}
]
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"revealProblems": "onProblem",
"clear": true,
"group": "Building"
},
"group": "build"
},
{
"label": "Cook Mod",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"--mod",
"${workspaceFolderBasename}",
"--cookmod",
"--nologo"
],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"group": "Building"
}
},
{
"label": "Compile and Cook",
"dependsOrder": "sequence",
"dependsOn": [
"Compile Mod",
"Cook Mod"
],
"group": "build"
},
{
"label": "Launch Editor",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"--editor",
"--nologo"
],
"problemMatcher": [],
"group": "test",

"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false,
"group": "Testing"
}
},
{
"label": "Launch Game (No Workshop Mods)",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"--mod",
"${workspaceFolderBasename}",
"--testmap",
"${input:TestMap}",
"--nologo"
],
"group": "test",

"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false,
"group": "Testing"
}
},
{
"label": "Launch Game (With Workshop Mods)",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"--mod",
"${workspaceFolderBasename}",
"--testmapall",
"${input:TestMap}",
"--nologo"
],
"group": "test",

"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false,
"group": "Testing"
}
},
{
"label": "Compile &amp; Launch Editor",
"dependsOrder": "sequence",
"dependsOn": [
"Compile Mod",
"Launch Editor"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Compile, Cook &amp; Launch Game (No Workshop Mods)",
"dependsOrder": "sequence",
"dependsOn": [
"Compile and Cook",
"Launch Game (No Workshop Mods)"
],
"group": {
"kind": "test",
"isDefault": true
},
"detail": "You will be asked to input a map name when the game is launched."
},
{
"label": "Compile, Cook &amp; Launch Game (With Workshop Mods)",
"dependsOrder": "sequence",
"dependsOn": [
"Compile and Cook",
"Launch Game (With Workshop Mods)"
],
"group": "test",
"detail": "You will be asked to input a map name when the game is launched."
},
{
"label": "Kill Editor",
"type": "shell",
"command": "##OMM:OMM_EXE_PATH##",
"args": [
"--killeditor",
"--nologo"
],
"group": "none",
"detail": "Instantly ends the editor process. Be careful of unsaved progress!",
"presentation": {
"echo": true,
"reveal": "never",
"focus": false
},
"problemMatcher": []
}
],
"inputs": [
// Map input for launching the game. Defaults to titlescreen
{
"id": "TestMap",
"description": "Map:",
"type": "promptString",
"default": "titlescreen_final",
}
]
}</value>
</data>
<data name="VSCodeWorkspaceTemplate" xml:space="preserve">
Expand All @@ -365,7 +482,7 @@
"path": "./"
},
{
// Docs and release notes
// A Hat In Time Source
"name": "AHiT Source",
"path": "##AHIT:SRC_ROOT##"
}
Expand Down