From 760452170e611c0c7890dfe904314fbd6e2f849a Mon Sep 17 00:00:00 2001
From: Alex Noir
Date: Thu, 14 Dec 2017 22:57:42 +0300
Subject: [PATCH] Implement ID card slot and ID card description that states
the owner and his job in preparation for identity system
---
.../Source/Items/CharacterInventory.cs | 21 +++++++++++++++---
.../Content/Items/Reactor/reactor.xml | 4 ++--
.../Content/Items/Tools/tools.xml | 2 +-
.../BarotraumaShared/Content/Items/idcard.xml | 7 ++----
Barotrauma/BarotraumaShared/Content/Jobs.xml | 12 +++++-----
.../Content/UI/inventoryIcons.png | Bin 14066 -> 16233 bytes
.../Source/Characters/Character.cs | 2 +-
.../Source/Characters/Jobs/Job.cs | 1 +
.../Source/Items/CharacterInventory.cs | 4 ++--
.../BarotraumaShared/Source/Items/Item.cs | 16 +++++++------
10 files changed, 42 insertions(+), 27 deletions(-)
diff --git a/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs b/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs
index 6ccfbc19c..6c609618e 100644
--- a/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs
+++ b/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs
@@ -39,7 +39,7 @@ namespace Barotrauma
case 3:
case 4:
SlotPositions[i] = new Vector2(
- spacing * 2 + rectWidth + (spacing + rectWidth) * (i - 2),
+ spacing * 2 + rectWidth + (spacing + rectWidth) * (i - 1),
GameMain.GraphicsHeight - (spacing + rectHeight) * 3);
useOnSelfButton[i - 3] = new GUIButton(
@@ -52,16 +52,24 @@ namespace Barotrauma
break;
+ //face
case 5:
SlotPositions[i] = new Vector2(
spacing * 2 + rectWidth + (spacing + rectWidth) * (i - 5),
GameMain.GraphicsHeight - (spacing + rectHeight) * 3);
+ break;
+ //id card
+ case 6:
+ SlotPositions[i] = new Vector2(
+ spacing * 2 + rectWidth + (spacing + rectWidth) * (i - 5),
+ GameMain.GraphicsHeight - (spacing + rectHeight) * 3);
+
break;
default:
SlotPositions[i] = new Vector2(
- spacing * 2 + rectWidth + (spacing + rectWidth) * ((i - 6) % 5),
- GameMain.GraphicsHeight - (spacing + rectHeight) * ((i > 10) ? 2 : 1));
+ spacing * 2 + rectWidth + (spacing + rectWidth) * ((i - 7) % 5),
+ GameMain.GraphicsHeight - (spacing + rectHeight) * ((i > 11) ? 2 : 1));
break;
}
}
@@ -247,6 +255,13 @@ namespace Barotrauma
new Vector2(15.0f, 16.0f), Vector2.One,
SpriteEffects.None, 0.1f);
}
+ else if (i == 6)
+ {
+ spriteBatch.Draw(icons, new Vector2(slotRect.Center.X, slotRect.Center.Y),
+ new Rectangle(62, 36, 22, 18), Color.White * 0.7f, 0.0f,
+ new Vector2(11.0f, 9.0f), Vector2.One,
+ SpriteEffects.None, 0.1f);
+ }
}
base.Draw(spriteBatch);
diff --git a/Barotrauma/BarotraumaShared/Content/Items/Reactor/reactor.xml b/Barotrauma/BarotraumaShared/Content/Items/Reactor/reactor.xml
index 5ac35b6f1..255bf051f 100644
--- a/Barotrauma/BarotraumaShared/Content/Items/Reactor/reactor.xml
+++ b/Barotrauma/BarotraumaShared/Content/Items/Reactor/reactor.xml
@@ -68,7 +68,7 @@
-
+
-
+
diff --git a/Barotrauma/BarotraumaShared/Content/Items/Tools/tools.xml b/Barotrauma/BarotraumaShared/Content/Items/Tools/tools.xml
index 0d6c81251..2f194ca87 100644
--- a/Barotrauma/BarotraumaShared/Content/Items/Tools/tools.xml
+++ b/Barotrauma/BarotraumaShared/Content/Items/Tools/tools.xml
@@ -116,7 +116,7 @@