v0.13.0.11
This commit is contained in:
@@ -299,7 +299,12 @@ namespace Barotrauma
|
||||
{
|
||||
var textContainer = new GUIFrame(new RectTransform(new Vector2(1.0f, 0.0f), listBox.Content.RectTransform), style: "InnerFrame", color: Color.White)
|
||||
{
|
||||
CanBeFocused = false
|
||||
CanBeFocused = true,
|
||||
OnSecondaryClicked = (component, data) =>
|
||||
{
|
||||
GUIContextMenu.CreateContextMenu(new ContextMenuOption("editor.copytoclipboard", true, () => { Clipboard.SetText(msg.Text); }));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
var textBlock = new GUITextBlock(new RectTransform(new Point(listBox.Content.Rect.Width - 5, 0), textContainer.RectTransform, Anchor.TopLeft) { AbsoluteOffset = new Point(2, 2) },
|
||||
msg.Text, textAlignment: Alignment.TopLeft, font: GUI.SmallFont, wrap: true)
|
||||
@@ -480,7 +485,7 @@ namespace Barotrauma
|
||||
var subInfo = new SubmarineInfo(string.Join(" ", args));
|
||||
Submarine.MainSub = Submarine.Load(subInfo, true);
|
||||
}
|
||||
GameMain.SubEditorScreen.Select();
|
||||
GameMain.SubEditorScreen.Select(enableAutoSave: Screen.Selected != GameMain.GameScreen);
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("editparticles|particleeditor", "editparticles/particleeditor: Switch to the Particle Editor to edit particle effects.", (string[] args) =>
|
||||
@@ -620,6 +625,11 @@ namespace Barotrauma
|
||||
NewMessage(SubEditorScreen.ShouldDrawGrid ? "Enabled submarine grid." : "Disabled submarine grid.", GUI.Style.Green);
|
||||
}));
|
||||
|
||||
commands.Add(new Command("spreadsheetexport", "Export items in format recognized by the spreadsheet importer.", (string[] args) =>
|
||||
{
|
||||
SpreadsheetExport.Export();
|
||||
}));
|
||||
|
||||
commands.Add(new Command("wikiimage_character", "Save an image of the currently controlled character with a transparent background.", (string[] args) =>
|
||||
{
|
||||
if (Character.Controlled == null) { return; }
|
||||
@@ -649,6 +659,7 @@ namespace Barotrauma
|
||||
AssignRelayToServer("bindkey", false);
|
||||
AssignRelayToServer("unbindkey", false);
|
||||
AssignRelayToServer("savebinds", false);
|
||||
AssignRelayToServer("spreadsheetexport", false);
|
||||
#if DEBUG
|
||||
AssignRelayToServer("crash", false);
|
||||
AssignRelayToServer("showballastflorasprite", false);
|
||||
@@ -1236,6 +1247,7 @@ namespace Barotrauma
|
||||
GameMain.DebugDraw = false;
|
||||
GameMain.LightManager.LightingEnabled = true;
|
||||
GameMain.LightManager.LosEnabled = true;
|
||||
GameMain.LightManager.LosAlpha = 1f;
|
||||
}
|
||||
NewMessage(HumanAIController.debugai ? "AI debug info visible" : "AI debug info hidden", Color.White);
|
||||
});
|
||||
@@ -1523,7 +1535,9 @@ namespace Barotrauma
|
||||
List<string> lines = missingTags.Select(t => "\"" + t.Key + "\"\n missing from " + string.Join(", ", t.Value)).ToList();
|
||||
|
||||
string filePath = "missingloca.txt";
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = true;
|
||||
File.WriteAllLines(filePath, lines);
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = false;
|
||||
ToolBox.OpenFileWithShell(Path.GetFullPath(filePath));
|
||||
TextManager.Language = "English";
|
||||
}));
|
||||
@@ -1532,7 +1546,9 @@ namespace Barotrauma
|
||||
{
|
||||
var debugLines = EventSet.GetDebugStatistics();
|
||||
string filePath = "eventstats.txt";
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = true;
|
||||
File.WriteAllLines(filePath, debugLines);
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = false;
|
||||
ToolBox.OpenFileWithShell(Path.GetFullPath(filePath));
|
||||
}));
|
||||
|
||||
@@ -1705,6 +1721,15 @@ namespace Barotrauma
|
||||
{
|
||||
GameMain.Client?.ForceTimeOut();
|
||||
}, isCheat: false));
|
||||
commands.Add(new Command("bumpitem", "", (string[] args) =>
|
||||
{
|
||||
float vel = 10.0f;
|
||||
if (args.Length > 0)
|
||||
{
|
||||
float.TryParse(args[0], NumberStyles.Number, CultureInfo.InvariantCulture, out vel);
|
||||
}
|
||||
Character.Controlled?.FocusedItem?.body?.ApplyLinearImpulse(Rand.Vector(vel));
|
||||
}, isCheat: false));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1813,7 +1838,9 @@ namespace Barotrauma
|
||||
lines.Add("<EntityName." + me.Identifier + ">" + me.Name + "</EntityName." + me.Identifier + ">");
|
||||
lines.Add("<EntityDescription." + me.Identifier + ">" + me.Description + "</EntityDescription." + me.Identifier + ">");
|
||||
}
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = true;
|
||||
File.WriteAllLines(filePath, lines);
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = false;
|
||||
}));
|
||||
|
||||
commands.Add(new Command("dumpeventtexts", "dumpeventtexts [filepath]: gets the texts from event files and and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EventTexts.txt", (string[] args) =>
|
||||
@@ -1832,16 +1859,15 @@ namespace Barotrauma
|
||||
docs.Add(eventPrefab.ConfigElement.Document);
|
||||
getTextsFromElement(eventPrefab.ConfigElement, lines, eventPrefab.Identifier);
|
||||
}
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = true;
|
||||
File.WriteAllLines(filePath, lines);
|
||||
|
||||
ToolBox.OpenFileWithShell(Path.GetFullPath(filePath));
|
||||
|
||||
System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings
|
||||
{
|
||||
Indent = true,
|
||||
NewLineOnAttributes = false
|
||||
};
|
||||
|
||||
};
|
||||
foreach (XDocument doc in docs)
|
||||
{
|
||||
using (var writer = XmlWriter.Create(new System.Uri(doc.BaseUri).LocalPath, settings))
|
||||
@@ -1850,6 +1876,7 @@ namespace Barotrauma
|
||||
writer.Flush();
|
||||
}
|
||||
}
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = false;
|
||||
|
||||
void getTextsFromElement(XElement element, List<string> list, string parentName)
|
||||
{
|
||||
@@ -1996,10 +2023,17 @@ namespace Barotrauma
|
||||
lines.Add("[/table]");
|
||||
lines.Add("");
|
||||
}
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = true;
|
||||
File.WriteAllLines(filePath, lines);
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = false;
|
||||
ToolBox.OpenFileWithShell(Path.GetFullPath(filePath));
|
||||
}));
|
||||
#if DEBUG
|
||||
commands.Add(new Command("playovervc", "Plays a sound over voice chat.", (args) =>
|
||||
{
|
||||
VoipCapture.Instance?.SetOverrideSound(args.Length > 0 ? args[0] : null);
|
||||
}));
|
||||
|
||||
commands.Add(new Command("querylobbies", "Queries all SteamP2P lobbies", (args) =>
|
||||
{
|
||||
TaskPool.Add("DebugQueryLobbies",
|
||||
@@ -2033,7 +2067,9 @@ namespace Barotrauma
|
||||
commands.Add(new Command("printproperties", "Goes through the currently collected property list for missing localizations and writes them to a file.", (string[] args) =>
|
||||
{
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\propertylocalization.txt";
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = true;
|
||||
File.WriteAllLines(path, SerializableEntityEditor.MissingLocalizations);
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = false;
|
||||
}));
|
||||
|
||||
commands.Add(new Command("getproperties", "Goes through the MapEntity prefabs and checks their serializable properties for localization issues.", (string[] args) =>
|
||||
@@ -2248,12 +2284,15 @@ namespace Barotrauma
|
||||
"revokeperm",
|
||||
(string[] args) =>
|
||||
{
|
||||
if (args.Length < 1) return;
|
||||
if (args.Length < 1) { return; }
|
||||
|
||||
NewMessage("Valid permissions are:", Color.White);
|
||||
foreach (ClientPermissions permission in Enum.GetValues(typeof(ClientPermissions)))
|
||||
if (args.Length < 2)
|
||||
{
|
||||
NewMessage(" - " + permission.ToString(), Color.White);
|
||||
NewMessage("Valid permissions are:", Color.White);
|
||||
foreach (ClientPermissions permission in Enum.GetValues(typeof(ClientPermissions)))
|
||||
{
|
||||
NewMessage(" - " + permission.ToString(), Color.White);
|
||||
}
|
||||
}
|
||||
|
||||
ShowQuestionPrompt("Permission to revoke from client " + args[0] + "?", (perm) =>
|
||||
|
||||
Reference in New Issue
Block a user