v1.1.18.0 (Treacherous Tides Update)
This commit is contained in:
@@ -163,10 +163,22 @@ namespace Barotrauma
|
||||
{
|
||||
if (SelectedAny)
|
||||
{
|
||||
SubEditorScreen.StoreCommand(new AddOrDeleteCommand(new List<MapEntity>(SelectedList), true));
|
||||
if (SelectedList.Any(static t => t is Item it && it.GetComponent<CircuitBox>() is not null))
|
||||
{
|
||||
GUI.AskForConfirmation(SubEditorScreen.CircuitBoxDeletionWarningHeader, SubEditorScreen.CircuitBoxDeletionWarningBody, onConfirm: Delete);
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
|
||||
void Delete()
|
||||
{
|
||||
SubEditorScreen.StoreCommand(new AddOrDeleteCommand(new List<MapEntity>(SelectedList), true));
|
||||
SelectedList.ForEach(static e => { if (!e.Removed) { e.Remove(); } });
|
||||
SelectedList.Clear();
|
||||
}
|
||||
}
|
||||
SelectedList.ForEach(e => { if (!e.Removed) { e.Remove(); } });
|
||||
SelectedList.Clear();
|
||||
}
|
||||
|
||||
if (PlayerInput.IsCtrlDown())
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
Sprite sprite = iconSprites[SpawnType.ToString()];
|
||||
Sprite sprite2 = null;
|
||||
if (spawnType == SpawnType.Human && AssignedJob?.Icon != null)
|
||||
{
|
||||
sprite = iconSprites["Path"];
|
||||
@@ -67,17 +68,29 @@ namespace Barotrauma
|
||||
else if (ConnectedDoor != null)
|
||||
{
|
||||
sprite = iconSprites["Door"];
|
||||
if (ConnectedDoor.IsHorizontal && Ladders == null)
|
||||
if (Ladders != null)
|
||||
{
|
||||
sprite2 = iconSprites["Ladder"];
|
||||
}
|
||||
else if (ConnectedDoor.IsHorizontal)
|
||||
{
|
||||
//connected to a hatch but not ladders, something's probably off here
|
||||
clr = Color.Yellow;
|
||||
}
|
||||
if (!Submarine.RectContains(ConnectedDoor.Item.WorldRect, WorldPosition))
|
||||
{
|
||||
clr = Color.Red;
|
||||
}
|
||||
}
|
||||
else if (Ladders != null)
|
||||
{
|
||||
sprite = iconSprites["Ladder"];
|
||||
}
|
||||
sprite.Draw(spriteBatch, drawPos, clr, scale: iconSize / (float)sprite.SourceRect.Width, depth: 0.001f);
|
||||
sprite.RelativeOrigin = Vector2.One * 0.5f;
|
||||
|
||||
float spriteScale = iconSize / (float)sprite.SourceRect.Width;
|
||||
sprite.Draw(spriteBatch, drawPos, clr, origin: sprite.size / 2, scale: spriteScale, depth: 0.001f);
|
||||
sprite2?.Draw(spriteBatch, drawPos + sprite.size * spriteScale * 0.5f, clr, origin: sprite2.size / 2, scale: spriteScale, depth: 0.001f);
|
||||
|
||||
if (spawnType == SpawnType.Human && AssignedJob?.Icon != null)
|
||||
{
|
||||
AssignedJob.Icon.Draw(spriteBatch, drawPos, AssignedJob.UIColor, scale: iconSize / (float)AssignedJob.Icon.SourceRect.Width * 0.8f, depth: 0.0f);
|
||||
|
||||
Reference in New Issue
Block a user