v1.6.17.0 (Unto the Breach update)
This commit is contained in:
@@ -587,6 +587,39 @@ namespace Barotrauma
|
||||
}
|
||||
GameMain.CharacterEditorScreen.Select();
|
||||
}));
|
||||
|
||||
commands.Add(new Command("settainted", "settainted [true/false]: Sets tainted effect on hovered genetic material.",
|
||||
onExecute: (string[] args) =>
|
||||
{
|
||||
|
||||
if (Character.Controlled == null)
|
||||
{
|
||||
NewMessage("No controlled character!", Color.Red);
|
||||
return;
|
||||
}
|
||||
|
||||
Item focusedItem = Character.Controlled?.FocusedItem ?? Inventory.SelectedSlot?.Item;
|
||||
|
||||
if (focusedItem == null)
|
||||
{
|
||||
NewMessage("No focused item, hover on something!", Color.Red);
|
||||
return;
|
||||
}
|
||||
|
||||
var geneticMaterial = focusedItem.GetComponent<GeneticMaterial>();
|
||||
|
||||
if (geneticMaterial == null)
|
||||
{
|
||||
NewMessage("Not hovering on a genetic material!", Color.Red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool newValue = args.None(arg => string.Equals(arg, "false", StringComparison.InvariantCultureIgnoreCase));
|
||||
geneticMaterial.SetTainted(newValue);
|
||||
NewMessage($"Set tainted to {newValue} for {focusedItem.Name}", Color.Yellow);
|
||||
}
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("quickstart", "Starts a singleplayer sandbox", (string[] args) =>
|
||||
{
|
||||
@@ -625,6 +658,113 @@ namespace Barotrauma
|
||||
GameMain.MainMenuScreen.QuickStart(fixedSeed: false, subName, difficulty, levelGenerationParams);
|
||||
|
||||
}, getValidArgs: () => new[] { SubmarineInfo.SavedSubmarines.Select(s => s.Name).Distinct().OrderBy(s => s).ToArray() }));
|
||||
|
||||
commands.Add(new Command("forcewreck", "forcewreck [wreckname] (optional, ThalamusSpawn)[Random/Forced/Disabled]: When generating levels, ensures a specific wreck is generated. Second optional parameter to control thalamus spawning.", (string[] args) =>
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
var submarineFile = GetSubmarineFile<WreckFile>(args[0]);
|
||||
|
||||
if (submarineFile != null)
|
||||
{
|
||||
var matchingSub = SubmarineInfo.SavedSubmarines.FirstOrDefault(i => i.FilePath == submarineFile.Path.Value);
|
||||
if (matchingSub != null)
|
||||
{
|
||||
NewMessage($"Setting ForceWreck to: {matchingSub.Name}, {submarineFile.Path}", color: Color.Yellow);
|
||||
|
||||
LevelData.ConsoleForceWreck = matchingSub;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NewMessage($"Can't find: {args[0]}", color: Color.Red);
|
||||
}
|
||||
}
|
||||
|
||||
if (args.Length > 1)
|
||||
{
|
||||
string forceThalamusArg = args[1];
|
||||
if (Enum.TryParse(forceThalamusArg, out LevelData.ThalamusSpawn result))
|
||||
{
|
||||
NewMessage($"Setting ThalamusSpawn to: {result}", color: Color.Yellow);
|
||||
LevelData.ForceThalamus = result;
|
||||
}
|
||||
else
|
||||
{
|
||||
NewMessage($"Can't parse argument: {forceThalamusArg}", color: Color.Red);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NewMessage($"Setting ThalamusSpawn to: {LevelData.ThalamusSpawn.Random}", color: Color.Yellow);
|
||||
LevelData.ForceThalamus = LevelData.ThalamusSpawn.Random;
|
||||
}
|
||||
},
|
||||
() =>
|
||||
{
|
||||
return new string[][]
|
||||
{
|
||||
ListSubmarineFileNames<WreckFile>(),
|
||||
new string[] { LevelData.ThalamusSpawn.Random.ToString(), LevelData.ThalamusSpawn.Forced.ToString(), LevelData.ThalamusSpawn.Disabled.ToString() }
|
||||
};
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("forcebeaconstation|forcebeacon", "forcebeaconstation [station name]: When generating levels, ensures a specific beacon station is generated.", (string[] args) =>
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
var submarineFile = GetSubmarineFile<BeaconStationFile>(args[0]);
|
||||
|
||||
if (submarineFile != null)
|
||||
{
|
||||
var matchingSub = SubmarineInfo.SavedSubmarines.FirstOrDefault(i => i.FilePath == submarineFile.Path.Value);
|
||||
if (matchingSub != null)
|
||||
{
|
||||
NewMessage($"Setting ForceBeaconStation to: {matchingSub.Name}, {submarineFile.Path}", color: Color.Yellow);
|
||||
|
||||
LevelData.ConsoleForceBeaconStation = matchingSub;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NewMessage($"Can't find: {args[0]}", color: Color.Red);
|
||||
}
|
||||
}
|
||||
},
|
||||
() =>
|
||||
{
|
||||
return new string[][]
|
||||
{
|
||||
ListSubmarineFileNames<BeaconStationFile>()
|
||||
};
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("reloadcontentfile", "reloadcontentfile [filepath]: Reloads a specific content xml file during runtime.", (string[] args) =>
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
string pathArgument = args[0];
|
||||
var contentFile = GetContentFile(pathArgument);
|
||||
|
||||
if (contentFile != null)
|
||||
{
|
||||
NewMessage($"Reloading content file: {pathArgument}", Color.Yellow);
|
||||
contentFile.UnloadFile();
|
||||
contentFile.LoadFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
NewMessage($"Can't find {args[0]} to reload", color:Color.Red);
|
||||
}
|
||||
}
|
||||
},
|
||||
() =>
|
||||
{
|
||||
return new string[][]
|
||||
{
|
||||
ListContentFilePaths()
|
||||
};
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("steamnetdebug", "steamnetdebug: Toggles Steamworks networking debug logging.", (string[] args) =>
|
||||
{
|
||||
@@ -783,6 +923,7 @@ namespace Barotrauma
|
||||
AssignRelayToServer("spreadsheetexport", false);
|
||||
#if DEBUG
|
||||
AssignRelayToServer("listspamfilters", false);
|
||||
AssignRelayToServer("showitemxml", false);
|
||||
AssignRelayToServer("crash", false);
|
||||
AssignRelayToServer("showballastflorasprite", false);
|
||||
AssignRelayToServer("simulatedlatency", false);
|
||||
@@ -1924,7 +2065,7 @@ namespace Barotrauma
|
||||
addIfMissing($"missionname.{missionId}".ToIdentifier(), language);
|
||||
}
|
||||
|
||||
if (missionPrefab.Type == MissionType.Combat)
|
||||
if (missionPrefab.Type == Tags.MissionTypeCombat)
|
||||
{
|
||||
addIfMissing($"MissionDescriptionNeutral.{missionId}".ToIdentifier(), language);
|
||||
addIfMissing($"MissionDescription1.{missionId}".ToIdentifier(), language);
|
||||
@@ -2360,6 +2501,34 @@ namespace Barotrauma
|
||||
GameMain.SubEditorScreen.LoadSub(wreckedSubmarineInfo);
|
||||
}));
|
||||
|
||||
commands.Add(new Command("showitemxml", "showitemxml [item]: Shows the XML configuration of an item in the console and copies it to the clipboard. Useful for debugging variants that partially override the XML of the base item for example.", (string[] args) =>
|
||||
{
|
||||
if (args.Length == 0)
|
||||
{
|
||||
ThrowError("Please specify the name or identifier of the item.");
|
||||
return;
|
||||
}
|
||||
|
||||
string itemNameOrId = args[0].ToLowerInvariant();
|
||||
ItemPrefab itemPrefab =
|
||||
(MapEntityPrefab.FindByName(itemNameOrId) ??
|
||||
MapEntityPrefab.FindByIdentifier(itemNameOrId.ToIdentifier())) as ItemPrefab;
|
||||
if (itemPrefab == null)
|
||||
{
|
||||
ThrowError("Item \"{itemNameOrId}\" not found!");
|
||||
return;
|
||||
}
|
||||
string xmlStr = itemPrefab.ConfigElement.Element.ToString();
|
||||
NewMessage(xmlStr);
|
||||
Clipboard.SetText(xmlStr);
|
||||
}, getValidArgs: () =>
|
||||
{
|
||||
return new string[][]
|
||||
{
|
||||
GetItemNameOrIdParams().ToArray()
|
||||
};
|
||||
}));
|
||||
|
||||
#if DEBUG
|
||||
commands.Add(new Command("deathprompt", "Shows the death prompt for testing purposes.", (string[] args) =>
|
||||
{
|
||||
@@ -2665,7 +2834,7 @@ namespace Barotrauma
|
||||
string[] lines;
|
||||
try
|
||||
{
|
||||
lines = File.ReadAllLines(sourcePath);
|
||||
lines = File.ReadAllLines(sourcePath, catchUnauthorizedAccessExceptions: false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -2757,7 +2926,6 @@ namespace Barotrauma
|
||||
|
||||
foreach (EventPrefab eventPrefab in EventSet.GetAllEventPrefabs())
|
||||
{
|
||||
if (eventPrefab is not TraitorEventPrefab) { continue; }
|
||||
if (eventPrefab.Identifier.IsEmpty)
|
||||
{
|
||||
continue;
|
||||
@@ -2812,7 +2980,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
string textId = $"EventText.{parentName}";
|
||||
if (!string.IsNullOrEmpty(text) && !text.Contains("EventText.", StringComparison.OrdinalIgnoreCase))
|
||||
if (!string.IsNullOrEmpty(text) && !text.StartsWith("EventText.", StringComparison.OrdinalIgnoreCase) && !text.StartsWith("Tutorial.", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (existingTexts.TryGetValue(text, out string existingTextId))
|
||||
{
|
||||
@@ -2982,9 +3150,18 @@ namespace Barotrauma
|
||||
}));
|
||||
|
||||
#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("checkduplicates", "Checks the given language for duplicate translation keys and writes to file.", (string[] args) =>
|
||||
{
|
||||
if (args.Length != 1) { return; }
|
||||
if (args.Length != 1)
|
||||
{
|
||||
ThrowError("Please specify a language to check.");
|
||||
return;
|
||||
}
|
||||
TextManager.CheckForDuplicates(args[0].ToIdentifier().ToLanguageIdentifier());
|
||||
}));
|
||||
|
||||
@@ -3443,9 +3620,7 @@ namespace Barotrauma
|
||||
}
|
||||
RagdollParams ragdollParams = character.AnimController.RagdollParams;
|
||||
ragdollParams.LimbScale = MathHelper.Clamp(value, RagdollParams.MIN_SCALE, RagdollParams.MAX_SCALE);
|
||||
var pos = character.WorldPosition;
|
||||
character.AnimController.Recreate();
|
||||
character.TeleportTo(pos);
|
||||
character.AnimController.RecreateAndRespawn();
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("jointscale", "Define the jointscale for the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved!", (string[] args) =>
|
||||
@@ -3468,9 +3643,7 @@ namespace Barotrauma
|
||||
}
|
||||
RagdollParams ragdollParams = character.AnimController.RagdollParams;
|
||||
ragdollParams.JointScale = MathHelper.Clamp(value, RagdollParams.MIN_SCALE, RagdollParams.MAX_SCALE);
|
||||
var pos = character.WorldPosition;
|
||||
character.AnimController.Recreate();
|
||||
character.TeleportTo(pos);
|
||||
character.AnimController.RecreateAndRespawn();
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("ragdollscale", "Rescale the ragdoll of the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved!", (string[] args) =>
|
||||
@@ -3494,9 +3667,7 @@ namespace Barotrauma
|
||||
RagdollParams ragdollParams = character.AnimController.RagdollParams;
|
||||
ragdollParams.LimbScale = MathHelper.Clamp(value, RagdollParams.MIN_SCALE, RagdollParams.MAX_SCALE);
|
||||
ragdollParams.JointScale = MathHelper.Clamp(value, RagdollParams.MIN_SCALE, RagdollParams.MAX_SCALE);
|
||||
var pos = character.WorldPosition;
|
||||
character.AnimController.Recreate();
|
||||
character.TeleportTo(pos);
|
||||
character.AnimController.RecreateAndRespawn();
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("recreateragdoll", "Recreate the ragdoll of the controlled character. Provide id or name if you want to target another character.", (string[] args) =>
|
||||
@@ -3507,21 +3678,43 @@ namespace Barotrauma
|
||||
ThrowError("Not controlling any character!");
|
||||
return;
|
||||
}
|
||||
var pos = character.WorldPosition;
|
||||
character.AnimController.Recreate();
|
||||
character.TeleportTo(pos);
|
||||
}, isCheat: true));
|
||||
character.AnimController.RecreateAndRespawn();
|
||||
}, isCheat: true,
|
||||
getValidArgs: () => new[] { GetSpawnedSpeciesNames() }));
|
||||
|
||||
commands.Add(new Command("resetragdoll", "Reset the ragdoll of the controlled character. Provide id or name if you want to target another character.", (string[] args) =>
|
||||
commands.Add(new Command("resetragdoll", "Reset the ragdoll of the controlled character (and all of the same species). Provide species name if you want to target another character.", (string[] args) =>
|
||||
{
|
||||
var character = (args.Length == 0) ? Character.Controlled : FindMatchingCharacter(args, true);
|
||||
if (character == null)
|
||||
IEnumerable<Character> characters;
|
||||
if (args.Length == 0)
|
||||
{
|
||||
ThrowError("Not controlling any character!");
|
||||
if (Character.Controlled == null)
|
||||
{
|
||||
ThrowError("Invalid species name! Press [TAB] to get valid options in this context.");
|
||||
return;
|
||||
}
|
||||
// Reset all characters of the same species, because the same params affect them too.
|
||||
characters = FindMatchingSpecies(Character.Controlled.SpeciesName.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
characters = FindMatchingSpecies(args);
|
||||
}
|
||||
if (characters.None())
|
||||
{
|
||||
ThrowError("Invalid species name!");
|
||||
return;
|
||||
}
|
||||
character.AnimController.ResetRagdoll(forceReload: true);
|
||||
}, isCheat: true));
|
||||
characters.ForEach(c => c.AnimController.ResetRagdoll());
|
||||
foreach (Character character in characters)
|
||||
{
|
||||
// Variant scale multiplier doesn't work without recreating the ragdoll.
|
||||
if (!character.VariantOf.IsEmpty)
|
||||
{
|
||||
character.AnimController.RecreateAndRespawn();
|
||||
}
|
||||
}
|
||||
}, isCheat: true,
|
||||
getValidArgs: () => new[] { GetSpawnedSpeciesNames() }));
|
||||
|
||||
commands.Add(new Command("loadanimation", "Loads an animation variation by name for the controlled character. The animation file has to be in the correct animations folder. Note: the changes are not saved!", (string[] args) =>
|
||||
{
|
||||
@@ -3634,7 +3827,7 @@ namespace Barotrauma
|
||||
ThrowError("Cannot use the flipx command while playing online.");
|
||||
return;
|
||||
}
|
||||
if (Submarine.MainSub.SubBody != null) { Submarine.MainSub?.FlipX(); }
|
||||
if (Submarine.MainSub?.SubBody != null) { Submarine.MainSub.FlipX(); }
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("head", "Load the head sprite and the wearables (hair etc). Required argument: head id. Optional arguments: hair index, beard index, moustache index, face attachment index.", args =>
|
||||
|
||||
Reference in New Issue
Block a user