Unstable 0.17.3.0
This commit is contained in:
@@ -168,25 +168,34 @@ namespace Barotrauma
|
||||
};
|
||||
}));
|
||||
|
||||
void printMapEntityPrefabs<T>(IEnumerable<T> prefabs) where T : MapEntityPrefab
|
||||
{
|
||||
NewMessage("***************", Color.Cyan);
|
||||
foreach (T prefab in prefabs)
|
||||
{
|
||||
if (prefab.Name.IsNullOrEmpty()) { continue; }
|
||||
string text = $"- {prefab.Name}";
|
||||
if (prefab.Tags.Any())
|
||||
{
|
||||
text += $" ({string.Join(", ", prefab.Tags)})";
|
||||
}
|
||||
if (prefab.AllowedLinks?.Any() ?? false)
|
||||
{
|
||||
text += $", Links: {string.Join(", ", prefab.AllowedLinks)}";
|
||||
}
|
||||
NewMessage(text, prefab.ContentPackage == ContentPackageManager.VanillaCorePackage ? Color.Cyan : Color.Purple);
|
||||
}
|
||||
NewMessage("***************", Color.Cyan);
|
||||
}
|
||||
|
||||
commands.Add(new Command("items|itemlist", "itemlist: List all the item prefabs available for spawning.", (string[] args) =>
|
||||
{
|
||||
NewMessage("***************", Color.Cyan);
|
||||
foreach (ItemPrefab itemPrefab in ItemPrefab.Prefabs)
|
||||
{
|
||||
if (itemPrefab.Name.IsNullOrEmpty()) { continue; }
|
||||
string text = $"- {itemPrefab.Name}";
|
||||
if (itemPrefab.Tags.Any())
|
||||
{
|
||||
text += $" ({string.Join(", ", itemPrefab.Tags)})";
|
||||
}
|
||||
if (itemPrefab.AllowedLinks.Any())
|
||||
{
|
||||
text += $", Links: {string.Join(", ", itemPrefab.AllowedLinks)}";
|
||||
}
|
||||
NewMessage(text, Color.Cyan);
|
||||
}
|
||||
NewMessage("***************", Color.Cyan);
|
||||
printMapEntityPrefabs(ItemPrefab.Prefabs);
|
||||
}));
|
||||
|
||||
commands.Add(new Command("itemassemblies", "itemassemblies: List all the item assemblies available for spawning.", (string[] args) =>
|
||||
{
|
||||
printMapEntityPrefabs(ItemAssemblyPrefab.Prefabs);
|
||||
}));
|
||||
|
||||
|
||||
@@ -202,6 +211,7 @@ namespace Barotrauma
|
||||
string[] creatureAndJobNames =
|
||||
CharacterPrefab.Prefabs.Select(p => p.Identifier.Value)
|
||||
.Concat(JobPrefab.Prefabs.Select(p => p.Identifier.Value))
|
||||
.OrderBy(s => s)
|
||||
.ToArray();
|
||||
|
||||
return new string[][]
|
||||
@@ -732,9 +742,16 @@ namespace Barotrauma
|
||||
{
|
||||
#if CLIENT
|
||||
if (Screen.Selected == GameMain.SubEditorScreen) { return; }
|
||||
Character.Controlled = null;
|
||||
GameMain.GameScreen.Cam.TargetPos = Vector2.Zero;
|
||||
GameMain.Client?.SendConsoleCommand("freecam");
|
||||
|
||||
if (GameMain.Client == null)
|
||||
{
|
||||
Character.Controlled = null;
|
||||
GameMain.GameScreen.Cam.TargetPos = Vector2.Zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
GameMain.Client?.SendConsoleCommand("freecam");
|
||||
}
|
||||
#endif
|
||||
}, isCheat: true));
|
||||
|
||||
@@ -2382,7 +2399,7 @@ namespace Barotrauma
|
||||
|
||||
public static void ThrowError(LocalizedString error, Exception e = null, bool createMessageBox = false, bool appendStackTrace = false)
|
||||
{
|
||||
ThrowError(error.Value);
|
||||
ThrowError(error.Value, e, createMessageBox, appendStackTrace);
|
||||
}
|
||||
|
||||
public static void ThrowError(string error, Exception e = null, bool createMessageBox = false, bool appendStackTrace = false)
|
||||
|
||||
Reference in New Issue
Block a user