(3d7994d75) Added a command that resets selected items and structures to prefab values
This commit is contained in:
@@ -555,6 +555,28 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
commands.Add(new Command("resetselected", "Reset selected items and structures to prefabs. Only applicable in the subeditor.", args =>
|
||||||
|
{
|
||||||
|
if (Screen.Selected == GameMain.SubEditorScreen)
|
||||||
|
{
|
||||||
|
foreach (MapEntity entity in MapEntity.SelectedList)
|
||||||
|
{
|
||||||
|
if (entity is Item item)
|
||||||
|
{
|
||||||
|
item.Reset();
|
||||||
|
item.CreateEditingHUD();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (entity is Structure structure)
|
||||||
|
{
|
||||||
|
structure.Reset();
|
||||||
|
structure.CreateEditingHUD();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
commands.Add(new Command("alpha", "Change the alpha (as bytes from 0 to 255) of the selected item/structure instances. Applied only in the subeditor.", (string[] args) =>
|
commands.Add(new Command("alpha", "Change the alpha (as bytes from 0 to 255) of the selected item/structure instances. Applied only in the subeditor.", (string[] args) =>
|
||||||
{
|
{
|
||||||
if (Screen.Selected == GameMain.SubEditorScreen)
|
if (Screen.Selected == GameMain.SubEditorScreen)
|
||||||
|
|||||||
Reference in New Issue
Block a user