Renamed screens (EditMapScreen -> SubEditorScreen, EditCharacterScreen -> CharacterEditorScreen)

This commit is contained in:
Joonas Rikkonen
2017-11-18 15:13:03 +02:00
parent cda08b1745
commit 765587efd7
19 changed files with 37 additions and 38 deletions
@@ -1072,7 +1072,7 @@ namespace Barotrauma
if (distanceToItem > item.InteractDistance && item.InteractDistance > 0.0f) return false;
if (!item.Prefab.InteractThroughWalls && Screen.Selected != GameMain.EditMapScreen && !insideTrigger)
if (!item.Prefab.InteractThroughWalls && Screen.Selected != GameMain.SubEditorScreen && !insideTrigger)
{
Vector2 itemPosition = item.SimPosition;
if (Submarine == null && item.Submarine != null)
@@ -1253,7 +1253,7 @@ namespace Barotrauma
return;
}
if ((!isLocalPlayer && IsKeyHit(InputType.Select) && GameMain.Server == null) ||
(isLocalPlayer && (findFocusedTimer <= 0.0f || Screen.Selected == GameMain.EditMapScreen)))
(isLocalPlayer && (findFocusedTimer <= 0.0f || Screen.Selected == GameMain.SubEditorScreen)))
{
focusedCharacter = FindCharacterAtPosition(mouseSimPos);
focusedItem = FindItemAtPosition(mouseSimPos, AnimController.InWater ? 0.5f : 0.25f);
@@ -109,7 +109,7 @@ namespace Barotrauma.Items.Components
}
else //the submarine is not being loaded, which means we're either in the sub editor or the item has been spawned mid-round
{
if (Screen.Selected == GameMain.EditMapScreen)
if (Screen.Selected == GameMain.SubEditorScreen)
{
//in the sub editor, attach
AttachToWall();
@@ -107,7 +107,7 @@ namespace Barotrauma.Items.Components
var rightHand = picker.AnimController.GetLimb(LimbType.RightHand);
pickTimer = 0.0f;
while (pickTimer < requiredTime && Screen.Selected != GameMain.EditMapScreen)
while (pickTimer < requiredTime && Screen.Selected != GameMain.SubEditorScreen)
{
if (picker.IsKeyDown(InputType.Aim) || !picker.CanInteractWith(item))
{
@@ -214,7 +214,7 @@ namespace Barotrauma.Items.Components
if (connections[0] != null && connections[0].Item.Submarine != null) sub = connections[0].Item.Submarine;
if (connections[1] != null && connections[1].Item.Submarine != null) sub = connections[1].Item.Submarine;
if ((item.Submarine != sub || sub == null) && Screen.Selected != GameMain.EditMapScreen)
if ((item.Submarine != sub || sub == null) && Screen.Selected != GameMain.SubEditorScreen)
{
ClearConnections();
return;
@@ -339,7 +339,7 @@ namespace Barotrauma.Items.Components
private Vector2 RoundNode(Vector2 position, Hull hull)
{
if (Screen.Selected == GameMain.EditMapScreen)
if (Screen.Selected == GameMain.SubEditorScreen)
{
position.X = MathUtils.Round(position.X, Submarine.GridSize.X / 2.0f);
position.Y = MathUtils.Round(position.Y, Submarine.GridSize.Y / 2.0f);
@@ -1052,7 +1052,7 @@ namespace Barotrauma
foreach (ItemComponent ic in components)
{
bool pickHit = false, selectHit = false;
if (Screen.Selected == GameMain.EditMapScreen)
if (Screen.Selected == GameMain.SubEditorScreen)
{
pickHit = picker.IsKeyHit(InputType.Select);
selectHit = picker.IsKeyHit(InputType.Select);
@@ -1083,7 +1083,7 @@ namespace Barotrauma
if (tempRequiredSkill != null) requiredSkill = tempRequiredSkill;
bool showUiMsg = picker == Character.Controlled && Screen.Selected != GameMain.EditMapScreen;
bool showUiMsg = picker == Character.Controlled && Screen.Selected != GameMain.SubEditorScreen;
if (!ignoreRequiredItems && !ic.HasRequiredItems(picker, showUiMsg)) continue;
if ((ic.CanBePicked && pickHit && ic.Pick(picker)) ||
(ic.CanBeSelected && selectHit && ic.Select(picker)))
@@ -1115,7 +1115,7 @@ namespace Barotrauma
}
#if CLIENT
if (!hasRequiredSkills && Character.Controlled == picker && Screen.Selected != GameMain.EditMapScreen)
if (!hasRequiredSkills && Character.Controlled == picker && Screen.Selected != GameMain.SubEditorScreen)
{
GUI.AddMessage("Your skills may be insufficient to use the item!", Color.Red, 5.0f);
if (requiredSkill != null)
@@ -131,7 +131,7 @@ namespace Barotrauma
LinkedSubmarine linkedSub = null;
if (Screen.Selected == GameMain.EditMapScreen)
if (Screen.Selected == GameMain.SubEditorScreen)
{
//string filePath = ToolBox.GetAttributeString(element, "filepath", "");